Overview
Request 813172 accepted
First submitrequest of a screen (screenrc) wrapper
We use this internally for years already.
See NON_Public:BuildOPS or NON_Public:infrastructure.
I polished this up quite a bit (use _cscreen instead of root),
etc. and it would be nice to have this in openSUSE:Factory
for broader feedback and usage.
130+if [ -d /run/uscreens/S-cscreen ];then 131+ if [ "$1" == "0" ];then 132+ # Only delete on uninstall 133+ rm -rf /run/uscreens/S-cscreen 134+ else 135+ # Adjust to possible new user on upgrade 136+ chmod -R %{USERNAME}:%{GROUPNAME} /run/uscreens/S-cscreen 137+ fi 138+fi
TRAP!
we aware that the postun scrip run is the script of the package that is just being uninstalled - so in case of a package upgrade (let;s say from version 1.0 to 2.0) you get the %post script of pkg version 2.0, but the postun of version 1.0 -if 2.0 would ever use a different USERNAME/GROUPNAME (which is presumably the only reason why chowning on uninstall?!) then you own all files to the OLD username used in version 1,0 - not what 2.0 defined
additional comment:
131+ if [ "$1" == "0" ];then
post/postunscriptlets are run using /bin/sh - i.e. posix compliant shell. but if [ "$1" == "0" ];
is bashism. posix only uses a sinlge =
(see man test)
21+Requires(postun): coreutils
This we also are in process of eliminating as good as possible (think busybox here)
Can you please use Requires(postun): /usr/bin/rm /usr/bin/chmod
here?
Thanks a lot for the detailed review! I'll resubmit.
Request History
trenn created request
First submitrequest of a screen (screenrc) wrapper
We use this internally for years already.
See NON_Public:BuildOPS or NON_Public:infrastructure.
I polished this up quite a bit (use _cscreen instead of root),
etc. and it would be nice to have this in openSUSE:Factory
for broader feedback and usage.
factory-auto added opensuse-review-team as a reviewer
Please review sources
factory-auto accepted review
Check script succeeded
dimstar accepted review
licensedigger accepted review
ok
dimstar_suse added as a reviewer
Being evaluated by staging project "openSUSE:Factory:Staging:adi:165"
dimstar_suse accepted review
Picked "openSUSE:Factory:Staging:adi:165"
dimstar_suse accepted review
Staging Project openSUSE:Factory:Staging:adi:165 got accepted.
dimstar_suse approved review
Staging Project openSUSE:Factory:Staging:adi:165 got accepted.
dimstar_suse accepted request
Staging Project openSUSE:Factory:Staging:adi:165 got accepted.