Summary: | buggy preinstall scriptlet | ||
---|---|---|---|
Product: | Sisyphus | Reporter: | (GalaxyMaster) <galaxy4public> |
Component: | jetty | Assignee: | viy <viy> |
Status: | CLOSED FIXED | QA Contact: | qa-sisyphus |
Severity: | normal | ||
Priority: | P3 | CC: | viy |
Version: | unstable | ||
Hardware: | all | ||
OS: | Linux |
Description
(GalaxyMaster)
2012-08-27 08:53:25 MSK
Thank you very much for the report, fixed in jetty6-6.1.26-alt8_1jpp6.src.rpm and I will be more careful from now on. Well, it's not there yet :(. The latest package has the following scriptlets: === [root@galaxy ~]# rpm -q --scripts jetty preinstall scriptlet (through /bin/sh): groupadd -r jetty || : # Use /bin/sh so init script will start properly. useradd -r -s /bin/sh -d /usr/share/jetty -M \ -g jetty jetty || : postinstall scriptlet (through /bin/sh): [ -x /sbin/chkconfig ] && /sbin/chkconfig --add jetty preuninstall scriptlet (through /bin/sh): if [ $1 = 0 ]; then [ -f /var/lock/subsys/jetty ] && /etc/rc.d/init.d/jetty stop [ -f /etc/rc.d/init.d/jetty -a -x /sbin/chkconfig ] && /sbin/chkconfig --del jetty /usr/sbin/userdel jetty >> /dev/null 2>&1 || : fi postuninstall scriptlet (through /bin/sh): #userdel jetty &>/dev/null || : #groupdel jetty &>/dev/null || : [root@galaxy ~]# === While the following would be much better: === [root@galaxy ~]# rpm -q --scripts jetty preinstall scriptlet (through /bin/sh): getent group jetty >/dev/null || groupadd -r jetty || : # Use /bin/sh so init script will start properly. getent passwd jetty >/dev/null || \ useradd -r -s /bin/sh -d /usr/share/jetty -M \ -g jetty jetty || : postinstall scriptlet (through /bin/sh): [ -x /sbin/chkconfig ] && /sbin/chkconfig --add jetty preuninstall scriptlet (through /bin/sh): if [ $1 = 0 ]; then [ -f /var/lock/subsys/jetty ] && /etc/rc.d/init.d/jetty stop [ -f /etc/rc.d/init.d/jetty -a -x /sbin/chkconfig ] && /sbin/chkconfig --del jetty fi postuninstall scriptlet (through /bin/sh): if [ $1 = 0 ]; then /usr/sbin/userdel jetty || : fi [root@galaxy ~]# === The changes are: * in preinstall: add group/user only if it's not already defined; * in preinstall: do not delete the user there, since "pre*" scriptlets may fail and we will end up with unowned files; * in postinstall: delete user here under the condition that this was the last package (well, we still can end up with the unowned files/dirs, but at this stage there is nothing we can do about it). ok, thanks, will fix in jetty-8.1.5 (next week, I guess) I remember about that bug, but jetty 8.1.5 is delayed (It still does not build). |