Control: tags -1 + patch

Hi Russ

On Wed, 04 Mar 2015 18:31:01 +0100 [email protected] wrote:
> Source: remctl
> Version: 3.9-1
> Severity: normal
> User: [email protected]
> Usertags: libsystemd
> 
> Hi!
> 
> In systemd v209, released over a year ago, the various libsystemd-* libraries
> (libsystemd-journal.so, libsystemd-login.so, libsystem-daemon.so,
> libsystemd-id128.so) were merged into a single libsystemd.so library to reduce
> code duplication and avoid cyclic dependencies [1].
> 
> Your package declares a build-dependency on either libsystemd-daemon-dev,
> libsystemd-login-dev or libsystemd-journal-dev.
> 
> Please update your package so it can be built against libsystemd.

Please find attached a patch which makes use of the new libsystemd
library. I looked at your lbcd package and shamelessly stole the updated
m4/systemd.macro and updated the build flags in Makefile.am accordingly.
The patch is build-tested against remctl_3.9-1.
Thanks for considering. Would be great if you can include the fix in
your next upload.


Cheers,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/debian/control b/debian/control
index d81ae11..c5137b0 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9),
  libkrb5-dev,
  libpcre3-dev,
  libperl-critic-perl,
- libsystemd-daemon-dev [linux-any],
+ libsystemd-dev [linux-any],
  libtest-pod-perl,
  libtest-minimumversion-perl,
  libtest-pod-coverage-perl,
diff --git a/debian/patches/libsystemd.patch b/debian/patches/libsystemd.patch
new file mode 100644
index 0000000..f888541
--- /dev/null
+++ b/debian/patches/libsystemd.patch
@@ -0,0 +1,60 @@
+diff --git a/Makefile.am b/Makefile.am
+index dac972f..b6df6f9 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -184,12 +184,12 @@ server_remctld_SOURCES = portable/event-extra.c server/commands.c	    \
+ 	server/server-v2.c
+ server_remctld_CPPFLAGS = -DCONFIG_FILE=\"$(sysconfdir)/remctl.conf\"	\
+ 	$(GSSAPI_CPPFLAGS) $(KRB5_CPPFLAGS) $(GPUT_CPPFLAGS)		\
+-	$(PCRE_CPPFLAGS) $(LIBEVENT_CPPFLAGS) $(SYSTEMD_DAEMON_CFLAGS)
++	$(PCRE_CPPFLAGS) $(LIBEVENT_CPPFLAGS) $(SYSTEMD_CFLAGS)
+ server_remctld_LDFLAGS = $(GSSAPI_LDFLAGS) $(KRB5_LDFLAGS) $(GPUT_LDFLAGS) \
+ 	$(PCRE_LDFLAGS) $(LIBEVENT_LDFLAGS)
+ server_remctld_LDADD = util/libutil.la portable/libportable.la	\
+ 	$(GSSAPI_LIBS) $(KRB5_LIBS) $(GPUT_LIBS) $(PCRE_LIBS)	\
+-	$(LIBEVENT_LIBS) $(SYSTEMD_DAEMON_LIBS)
++	$(LIBEVENT_LIBS) $(SYSTEMD_LIBS)
+ 
+ # Install the systemd unit file if systemd support was detected.
+ if HAVE_SYSTEMD
+diff --git a/m4/systemd.m4 b/m4/systemd.m4
+index 98e1cc7..902476d 100644
+--- a/m4/systemd.m4
++++ b/m4/systemd.m4
+@@ -16,6 +16,7 @@ dnl The canonical version of this file is maintained in the rra-c-util
+ dnl package, available at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+ dnl
+ dnl Written by Russ Allbery <[email protected]>
++dnl Copyright 2015 Russ Allbery <[email protected]>
+ dnl Copyright 2013, 2014
+ dnl     The Board of Trustees of the Leland Stanford Junior University
+ dnl
+@@ -33,15 +34,22 @@ AC_DEFUN([RRA_WITH_SYSTEMD_UNITDIR],
+     [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
+         [Directory for systemd service files])],
+     [],
+-    [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
++    [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`])
+  AS_IF([test x"$with_systemdsystemunitdir" != xno],
+     [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
+  AM_CONDITIONAL([HAVE_SYSTEMD],
+     [test -n "$with_systemdsystemunitdir" -a x"$with_systemdsystemunitdir" != xno])])
+ 
+-dnl Check for libsystemd-daemon and define SYSTEMD_DAEMON_{CFLAGS,LIBS} if it
+-dnl is available.
++dnl Check for libsystemd or libsystemd-daemon and define SYSTEMD_{CFLAGS,LIBS}
++dnl if it is available.  This is called RRA_LIB_SYSTEMD_DAEMON_OPTIONAL since
++dnl it was originally written when libsystemd-daemon was separate, and only
++dnl checks for that library.  It may eventually make sense to retire this in
++dnl favor of a simple RRA_LIB_SYSTEMD_OPTIONAL that isn't backward-compatible.
+ AC_DEFUN([RRA_LIB_SYSTEMD_DAEMON_OPTIONAL],
+-[PKG_CHECK_EXISTS([libsystemd-daemon],
+-    [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon])
+-     AC_DEFINE([HAVE_SD_NOTIFY], 1, [Define if sd_notify is available.])])])
++[PKG_CHECK_EXISTS([libsystemd],
++    [PKG_CHECK_MODULES([SYSTEMD], [libsystemd])
++     AC_DEFINE([HAVE_SD_NOTIFY], 1, [Define if sd_notify is available.])],
++    [PKG_CHECK_EXISTS([libsystemd-daemon],
++        [PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon])
++         AC_DEFINE([HAVE_SD_NOTIFY], 1,
++            [Define if sd_notify is available.])])])])
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..da70223
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+libsystemd.patch

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to