Hello community, here is the log from the commit of package dhcp for openSUSE:Factory checked in at 2020-09-23 18:37:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dhcp (Old) and /work/SRC/openSUSE:Factory/.dhcp.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dhcp" Wed Sep 23 18:37:56 2020 rev:121 rq:835242 version:4.3.5 Changes: -------- --- /work/SRC/openSUSE:Factory/dhcp/dhcp.changes 2020-06-29 21:17:57.361708009 +0200 +++ /work/SRC/openSUSE:Factory/.dhcp.new.4249/dhcp.changes 2020-09-23 18:38:43.229228888 +0200 @@ -1,0 +2,23 @@ +Thu Sep 17 14:55:25 UTC 2020 - Reinhard Max <m...@suse.com> + +- Don't create dhclient.leases in %post. It affects transactional + updates and the files don't need to pre-exist (boo#1129951). + +------------------------------------------------------------------- +Thu Sep 3 13:52:57 UTC 2020 - Franck Bui <f...@suse.com> + +- Drop dependency on insserv-compat + + It was required to call the rc_status helpers from the sysvinit + scripts. These scripts are supposed to be called by systemd, which + has its own mechanism to report service status. + + Please note that this package still needs to be converted to ship + proper systemd units. + +------------------------------------------------------------------- +Thu Sep 3 12:56:11 UTC 2020 - Franck Bui <f...@suse.com> + +- /var/run is legacy -> /run should be used instead + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dhcp.spec ++++++ --- /var/tmp/diff_new_pack.6QS9cC/_old 2020-09-23 18:38:46.309231571 +0200 +++ /var/tmp/diff_new_pack.6QS9cC/_new 2020-09-23 18:38:46.313231574 +0200 @@ -101,13 +101,6 @@ %package server Summary: ISC DHCP Server Group: Productivity/Networking/Boot/Servers -%if 0%{?suse_version} > 1500 -# Workaround: require insserv-compat, until this package is -# converted to be shipping proper systemd units (boo#1133632, boo#1173440) -# There are .service units in place, but they call out to sysv init scripts -# that source rc.status -Requires: insserv-compat -%endif Requires: dhcp = %{version} %if 0%{?suse_version} < 1500 Requires: net-tools @@ -466,12 +459,6 @@ %service_del_postun dhcrelay.service %service_del_postun dhcrelay6.service -%post client -test -e %{_localstatedir}/lib/dhcp/dhclient.leases || \ - echo -n > %{_localstatedir}/lib/dhcp/dhclient.leases -test -e %{_localstatedir}/lib/dhcp6/dhclient6.leases || \ - echo -n > %{_localstatedir}/lib/dhcp6/dhclient6.leases - %files %license LICENSE %{_bindir}/omshell ++++++ dhcpd.script ++++++ --- /var/tmp/diff_new_pack.6QS9cC/_old 2020-09-23 18:38:46.557231787 +0200 +++ /var/tmp/diff_new_pack.6QS9cC/_new 2020-09-23 18:38:46.557231787 +0200 @@ -34,7 +34,7 @@ # $DAEMON_STATE$DAEMON_PIDFILE (also # while DHCPD_RUN_CHROOTED=no) now, # as DHCPD_RUN_AS is not allowed to -# create pid files in /var/run. +# create pid files in /run. DHCPv_OPT=$1 ; shift case $DHCPv_OPT in @@ -44,7 +44,7 @@ DAEMON_CONF=/etc/dhcpd.conf DAEMON_STATE=/var/lib/dhcp DAEMON_LEASES=dhcpd.leases - DAEMON_PIDFILE=/var/run/dhcpd.pid + DAEMON_PIDFILE=/run/dhcpd.pid STARTPROC_LOGFILE=/var/log/rc.dhcpd.log LDAP_CONF=/etc/openldap/ldap.conf @@ -59,7 +59,7 @@ DAEMON_CONF=/etc/dhcpd6.conf DAEMON_STATE=/var/lib/dhcp6 DAEMON_LEASES=dhcpd6.leases - DAEMON_PIDFILE=/var/run/dhcpd6.pid + DAEMON_PIDFILE=/run/dhcpd6.pid STARTPROC_LOGFILE=/var/log/rc.dhcpd6.log LDAP_CONF="" @@ -77,20 +77,6 @@ ;; esac -# Shell functions sourced from /etc/rc.status: -# rc_check check and set local and overall rc status -# rc_status check and set local and overall rc status -# rc_status -v ditto but be verbose in local rc status -# rc_status -v -r ditto and clear the local rc status -# rc_failed set local and overall rc status to failed -# rc_failed <num> set local and overall rc status to <num><num> -# rc_reset clear local rc status (overall remains) -# rc_exit exit appropriate to overall rc status -. /etc/rc.status - -# First reset status of this service -rc_reset - # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error @@ -111,13 +97,12 @@ stop) ;; *) echo -n >&2 "\"$DAEMON_BIN\" is not an executable file. Exiting." case $1 in - status) rc_failed 4 ;; - *) rc_failed 5 ;; + status) exit 4 ;; + *) exit 5 ;; esac - rc_status -v ;; esac - rc_exit + exit fi if ! [ -r "$DAEMON_CONF" ] ; then case $1 in @@ -129,9 +114,7 @@ ;; *) echo -n >&2 "\"$DAEMON_CONF\" config file missed. Exiting." - rc_failed 6 - rc_status -v - rc_exit + exit 6 ;; esac fi @@ -149,8 +132,6 @@ ## and return with "program not configured" if ! [ -f $DAEMON_CONF ]; then echo -n "... no configuration file found"; - # Tell the user this has skipped - rc_status -s # service is not configured exit 6; fi @@ -161,8 +142,6 @@ var="DHCPD_INTERFACE" case $DHCPv_OPT in -6) var=DHCPD6_INTERFACE ;; esac echo -n "... set $var in /etc/sysconfig/dhcpd" - # Tell the user this has skipped - rc_status -s # service is not configured exit 6; fi @@ -206,7 +185,7 @@ for i in $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES $LDAP_CONF /etc/{gai.conf,nsswitch.conf,resolv.conf,host.conf,hosts,localtime,bindresvport.blacklist} /dev/urandom; do if ! test -e "$i"; then continue; fi # neither of them is absolutely necessary cp -aL "$i" "${CHROOT_PREFIX}/${i%/*}/" &>/dev/null \ - || { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; } + || { echo "...$0:$LINENO: could not copy $i to chroot jail"; exit 6; } done libdir=@LIBDIR@ if test -x /usr/bin/ldd ; then @@ -236,7 +215,7 @@ for i in $cplibs ; do if [ -s "$i" ]; then cp -pL "$i" "${CHROOT_PREFIX}/$libdir/" \ - || { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; } + || { echo "...$0:$LINENO: could not copy $i to chroot jail"; exit 6; } fi done @@ -247,7 +226,7 @@ DHCPD_ARGS="-chroot $CHROOT_PREFIX -lf /db/$DAEMON_LEASES" ## If there is a pid file containing a pid, the machine might have crashed. pid files in - ## /var/run are always cleaned up at boot time, but this is not the case for the pid file in + ## /run are always cleaned up at boot time, but this is not the case for the pid file in ## the chroot jail. Therefore, and old pid file may exist. This is only a problem if it ## incidentally contains the pid of a running process. If this process is not a 'dhcpd', ## we remove the pid. (dhcpd itself only checks whether the pid is alive or not.) @@ -296,14 +275,11 @@ echo "" echo -n " please see $STARTPROC_LOGFILE for details " ## set status to failed - rc_failed + exit 1 else ln -sf "$DAEMON_STATE$DAEMON_PIDFILE" "$DAEMON_PIDFILE" [ "$DHCPD_RUN_CHROOTED" = "yes" ] && echo -n "[chroot]" || : fi - - # Remember status and be verbose - rc_status -v ;; stop) echo -n "Shutting down $DAEMON " @@ -339,9 +315,7 @@ rm -f $CHROOT_PREFIX/lib*/* fi - # Remember status and be verbose - rc_failed $ret - rc_status -v + exit $ret ;; try-restart) ## Do a restart only if the service was active before. @@ -350,11 +324,7 @@ $0 $DHCPv_OPT status if test $? = 0; then $0 $DHCPv_OPT restart - else - rc_reset # Not running is not a failure. fi - # Remember status and be quiet - rc_status ;; restart) ## Check syntax and when it is OK, stop the service @@ -362,14 +332,11 @@ ## start it again. if ! $0 $DHCPv_OPT check-syntax &>/dev/null ; then echo -n "Syntax check reports errors, see log messages" - rc_failed - rc_status -v + exit 1 else $0 $DHCPv_OPT stop sleep 3 $0 $DHCPv_OPT start - # Remember status and be quiet - rc_status fi ;; force-reload) @@ -381,14 +348,11 @@ echo -n "Reload service $DAEMON" killproc -p $DAEMON_STATE/$DAEMON_PIDFILE -HUP $DAEMON_BIN #touch $DAEMON_STATE/$DAEMON_PIDFILE - rc_status -v elif ! $0 $DHCPv_OPT check-syntax &>/dev/null ; then echo -n "Syntax check reports errors, see log messages" - rc_failed - rc_status -v + exit 1 else $0 $DHCPv_OPT stop && sleep 3 && $0 $DHCPv_OPT start - rc_status fi ;; reload) @@ -400,11 +364,9 @@ # If it supports signalling: killproc -p $DAEMON_STATE/$DAEMON_PIDFILE -HUP $DAEMON_BIN #touch $DAEMON_STATE/$DAEMON_PIDFILE - rc_status -v else ## Otherwise if it does not support reload: - rc_failed 3 - rc_status -v + exit 3 fi ;; status) @@ -414,13 +376,12 @@ # Status has a slightly different for the status command: # 0 - service running - # 1 - service dead, but /var/run/ pid file exists + # 1 - service dead, but /run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running # NOTE: checkproc returns LSB compliant status values. checkproc -p $DAEMON_STATE/$DAEMON_PIDFILE $DAEMON_BIN - rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, @@ -438,15 +399,13 @@ ## this nice bit is from Edwin Groothuis: ## check syntax (quiet) $DAEMON_BIN $DHCPv_OPT -q -t -cf $DAEMON_CONF - rc_status if [ $? -ne 0 ]; then echo "" ## check syntax (verbose) $DAEMON_BIN $DHCPv_OPT -t -cf $DAEMON_CONF echo -ne '\nConfig is NOT okay' - rc_failed + exit 1 fi - rc_status -v ;; check-lease|check-lease-file) echo -n "Checking lease file $DAEMON_LEASES: " @@ -454,22 +413,17 @@ if [ -s ${DAEMON_STATE}/db/$DAEMON_LEASES ] ; then ## check leases file (quiet) $DAEMON_BIN $DHCPv_OPT -q -T -cf /dev/null -lf ${DAEMON_STATE}/db/$DAEMON_LEASES - rc_status if [ $? -ne 0 ]; then echo "" ## check leases file (verbose) $DAEMON_BIN $DHCPv_OPT -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES echo -ne '\nLease file is NOT okay' - rc_failed + exit 1 fi - else - rc_status -u fi - rc_status -v ;; *) SCRIPT="${SCRIPT:-${0##*/} $DHCPv_OPT}" echo "Usage: $SCRIPT {start|stop|status|try-restart|restart|force-reload|reload|probe|check-syntax} [-v]" exit 1 esac -rc_exit ++++++ dhcrelay.script ++++++ --- /var/tmp/diff_new_pack.6QS9cC/_old 2020-09-23 18:38:46.629231849 +0200 +++ /var/tmp/diff_new_pack.6QS9cC/_new 2020-09-23 18:38:46.629231849 +0200 @@ -18,7 +18,7 @@ DAEMON="ISC DHCPv4 relay agent" DAEMON_BIN=/usr/sbin/dhcrelay DAEMON_CONF=/etc/sysconfig/dhcrelay - DAEMON_PIDFILE=/var/run/dhcrelay.pid + DAEMON_PIDFILE=/run/dhcrelay.pid STARTPROC_LOGFILE=/var/log/rc.dhcrelay.log SUPPORTS_HUP="no" ;; @@ -26,7 +26,7 @@ DAEMON="ISC DHCPv6 relay agent" DAEMON_BIN=/usr/sbin/dhcrelay6 DAEMON_CONF=/etc/sysconfig/dhcrelay - DAEMON_PIDFILE=/var/run/dhcrelay6.pid + DAEMON_PIDFILE=/run/dhcrelay6.pid STARTPROC_LOGFILE=/var/log/rc.dhcrelay6.log ;; *) @@ -41,29 +41,14 @@ stop) ;; *) echo -n >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting." case $1 in - status) rc_failed 4 ;; - *) rc_failed 5 ;; + status) exit 4 ;; + *) exit 5 ;; esac - rc_status -v ;; esac - rc_exit + exit 0 fi -# Shell functions sourced from /etc/rc.status: -# rc_check check and set local and overall rc status -# rc_status check and set local and overall rc status -# rc_status -v ditto but be verbose in local rc status -# rc_status -v -r ditto and clear the local rc status -# rc_failed set local and overall rc status to failed -# rc_failed <num> set local and overall rc status to <num><num> -# rc_reset clear local rc status (overall remains) -# rc_exit exit appropriate to overall rc status -. /etc/rc.status - -# First reset status of this service -rc_reset - # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error @@ -81,9 +66,10 @@ case "$1" in start) + # FIXME: this check is pointless since systemd already do it. echo -n "Starting $DAEMON" checkproc -p $DAEMON_PIDFILE $DAEMON_BIN && { - echo -n "... already running"; rc_status -v; exit 0; + echo -n "... already running"; exit 0; } case $DHCPv_OPT in @@ -91,8 +77,6 @@ ## If interfaces or servers are not set, skip starting of dhcrelay ## and return with "program not configured" if [ -z "$DHCRELAY_INTERFACES" -o -z "$DHCRELAY_SERVERS" ]; then - # Tell the user this has skipped - rc_status -s # service is not configured exit 6; fi @@ -117,8 +101,6 @@ done if [ "x$DHCRELAY6_LOWER_INTERFACES_ARGS" = x -o \ "x$DHCRELAY6_UPPER_INTERFACES_ARGS" = x ]; then - # Tell the user this has skipped - rc_status -s # service is not configured exit 6; fi @@ -141,11 +123,8 @@ echo "" echo -n " please see $STARTPROC_LOGFILE for details " ## set status to failed - rc_failed + exit 1 fi - - # Remember status and be verbose - rc_status -v ;; stop) echo -n "Shutting down $DAEMON" @@ -153,9 +132,6 @@ ## set echo the echo return value. killproc -p $DAEMON_PIDFILE $DAEMON_BIN - - # Remember status and be verbose - rc_status -v ;; try-restart) ## Do a restart only if the service was active before. @@ -164,11 +140,7 @@ $0 status if test $? = 0; then $0 restart - else - rc_reset # Not running is not a failure. fi - # Remember status and be quiet - rc_status ;; restart) ## Stop the service and regardless of whether it was @@ -176,27 +148,21 @@ $0 stop sleep 1 $0 start - - # Remember status and be quiet - rc_status ;; force-reload) ## Signal the daemon to reload its config. Most daemons ## do this on signal 1 (SIGHUP). ## If it does not support it, restart. - $0 stop && sleep 1 && $0 start - rc_status + $0 stop && sleep 1 && $0 start || exit echo -n "Reload service $DAEMON" if [ "$SUPPORTS_HUP" = "yes" ] ; then killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN #touch $DAEMON_PIDFILE - rc_status -v else $0 stop && $0 start - rc_status fi ;; reload) @@ -208,11 +174,9 @@ echo -n "Reload service $DAEMON" killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN #touch $DAEMON_PIDFILE - rc_status -v else ## Otherwise if it does not support reload: - rc_failed 3 - rc_status -v + exit 3 fi ;; status) @@ -222,13 +186,12 @@ # Status has a slightly different for the status command: # 0 - service running - # 1 - service dead, but /var/run/ pid file exists + # 1 - service dead, but /run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running # NOTE: checkproc returns LSB compliant status values. checkproc -p $DAEMON_PIDFILE $DAEMON_BIN - rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, @@ -248,4 +211,3 @@ exit 1 ;; esac -rc_exit ++++++ dhcrelay.service ++++++ --- /var/tmp/diff_new_pack.6QS9cC/_old 2020-09-23 18:38:46.657231874 +0200 +++ /var/tmp/diff_new_pack.6QS9cC/_new 2020-09-23 18:38:46.657231874 +0200 @@ -8,7 +8,7 @@ Restart=on-abort ExecStart=@LIBEXECDIR@/dhcp/dhcrelay -4 start ExecStop=@LIBEXECDIR@/dhcp/dhcrelay -4 stop -PIDFile=/var/run/dhcrelay.pid +PIDFile=/run/dhcrelay.pid [Install] WantedBy=multi-user.target