commit openslp for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package openslp for openSUSE:Factory checked in at 2014-09-10 07:28:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openslp (Old) and /work/SRC/openSUSE:Factory/.openslp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "openslp" Changes: -------- --- /work/SRC/openSUSE:Factory/openslp/openslp.changes 2014-04-23 20:35:38.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.openslp.new/openslp.changes 2014-09-10 07:28:31.000000000 +0200 @@ -1,0 +2,17 @@ +Mon Sep 1 15:58:06 CEST 2014 - mls@suse.de + +- fix last commit + +------------------------------------------------------------------- +Mon Jul 28 02:36:48 UTC 2014 - crrodriguez@opensuse.org + +- Do not apply previous patch to distros without systemd. +- Limit init script usage only to legacy products. + +------------------------------------------------------------------- +Sun Jul 27 21:18:25 UTC 2014 - crrodriguez@opensuse.org + +- openslp.sd_notify.diff make slpd systemd service of type + notify instead of simple, to avoid startup races. + +------------------------------------------------------------------- New: ---- openslp.sd_notify.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openslp.spec ++++++ --- /var/tmp/diff_new_pack.rfXu4V/_old 2014-09-10 07:28:32.000000000 +0200 +++ /var/tmp/diff_new_pack.rfXu4V/_new 2014-09-10 07:28:32.000000000 +0200 @@ -22,6 +22,8 @@ BuildRequires: libtool BuildRequires: openssl-devel %if 0%{?suse_version} > 1140 +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libsystemd-daemon) BuildRequires: pkgconfig(systemd) %define has_systemd 1 %endif @@ -58,6 +60,7 @@ Patch9: openslp.hardmtu.diff Patch10: openslp.tcplocal.diff Patch11: openslp.localtime.diff +Patch12: openslp.sd_notify.diff %description Service Location Protocol is an IETF standards track protocol that @@ -122,7 +125,9 @@ %patch9 %patch10 %patch11 - +%if 0%{?has_systemd} +%patch12 +%endif %build autoreconf -fiv %configure --disable-static --with-pic --enable-slpv1 \ @@ -148,10 +153,15 @@ find . -name CVS -o -name .cvsignore -o -name .xvpics | xargs rm -rf cp -a AUTHORS COPYING README FAQ doc/doc/rfc doc/doc/html %SOURCE2 \ ${RPM_BUILD_ROOT}%_defaultdocdir/%name +%if 0%{?has_systemd} +ln -s %{_sbindir}/service ${RPM_BUILD_ROOT}/usr/sbin/rcslpd +ln -s %{_sbindir}/service ${RPM_BUILD_ROOT}/usr/sbin/rcopenslp +%else mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/ install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}/etc/init.d/slpd ln -sf ../../etc/init.d/slpd ${RPM_BUILD_ROOT}/usr/sbin/rcslpd ln -sf ../../etc/init.d/slpd ${RPM_BUILD_ROOT}/usr/sbin/rcopenslp +%endif install -D -m 0644 %{SOURCE5} ${RPM_BUILD_ROOT}/etc/logrotate.d/openslp-server # install susehelp file mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/Administration/ @@ -192,13 +202,10 @@ %endif %post server -%if 0%{?sles_version} == 9 || 0%{?sles_version} == 10 -%{fillup_and_insserv -y slpd} -%else -%{fillup_and_insserv slpd} -%endif %if 0%{?has_systemd} %service_add_post slpd.service +%else +%{fillup_and_insserv slpd} %endif %postun server @@ -206,12 +213,16 @@ %insserv_cleanup %if 0%{?has_systemd} %service_del_postun slpd.service +%else +%restart_on_update slpd +%insserv_cleanup %endif %preun server -%stop_on_removal slpd %if 0%{?has_systemd} %service_del_preun slpd.service +%else +%stop_on_removal slpd %endif %files @@ -243,7 +254,6 @@ /usr/sbin/rcopenslp /usr/sbin/rcslpd /usr/sbin/slpd -%config /etc/init.d/slpd %config(noreplace) /etc/slp.reg %config(noreplace) /etc/logrotate.d/openslp-server /usr/share/omc/svcinfo.d/slpd.xml @@ -252,6 +262,8 @@ %endif %if 0%{?has_systemd} %{_unitdir}/slpd.service +%else +%config /etc/init.d/slpd %endif %files devel ++++++ openslp.sd_notify.diff ++++++ --- slpd/slpd_main.c.orig +++ slpd/slpd_main.c @@ -59,6 +59,8 @@ #include "slp_net.h" #include "slp_network.h" +#include <systemd/sd-daemon.h> + int G_SIGALRM; int G_SIGTERM; int G_SIGHUP; @@ -748,6 +750,7 @@ int main(int argc, char * argv[]) alarm(2); /* Main loop */ + sd_notify(0, "READY=1"); SLPDLog("Startup complete entering main run loop ...\n\n"); G_SIGALRM = 0; G_SIGTERM = 0; --- configure.ac.orig +++ configure.ac @@ -35,6 +35,10 @@ AC_CHECK_LIB([nsl], [gethostbyname]) AC_CHECK_LIB([m], [log10]) AC_CHECK_LIB([pthread], [pthread_create]) +PKG_PROG_PKG_CONFIG + +PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon]) + # # Checks for header files # --- slpd/Makefile.am.orig +++ slpd/Makefile.am @@ -95,5 +95,5 @@ noinst_HEADERS = \ slpd_initda.h #if you're building on Irix, replace .la with .a below -slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la +slpd_LDADD = $(SYSTEMD_LIBS) ../common/libcommonslpd.la ../libslpattr/libslpattr.la ++++++ slpd.service ++++++ --- /var/tmp/diff_new_pack.rfXu4V/_old 2014-09-10 07:28:32.000000000 +0200 +++ /var/tmp/diff_new_pack.rfXu4V/_new 2014-09-10 07:28:32.000000000 +0200 @@ -3,6 +3,7 @@ After=network.target nss-lookup.target [Service] +Type=notify ExecStart=/usr/sbin/slpd -d ExecReload=/bin/kill -HUP $MAINPID [Install] -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de