[cpp-sp COMMIT] in /branches/REL_2: configs/Makefile.am configs/shibd-systemd.in configure.ac shibboleth.spec.in shib...

noreply at shibboleth.net noreply at shibboleth.net
Thu Jul 2 15:29:18 EDT 2015


Author: scantor
Date: Thu Jul  2 15:29:17 2015
New Revision: 3922

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3922&view=rev
Log:
SSPCPP-412 - systemd integration changes

Added:
    branches/REL_2/configs/shibd-systemd.in
Modified:
    branches/REL_2/configs/Makefile.am
    branches/REL_2/configure.ac
    branches/REL_2/shibboleth.spec.in
    branches/REL_2/shibd/Makefile.am
    branches/REL_2/shibd/shibd.cpp

Modified: branches/REL_2/configs/Makefile.am
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/configs/Makefile.am?rev=3922&r1=3921&r2=3922&view=diff
==============================================================================
--- branches/REL_2/configs/Makefile.am	(original)
+++ branches/REL_2/configs/Makefile.am	Thu Jul  2 15:29:17 2015
@@ -11,6 +11,7 @@
 pkgcachedir = $(localstatedir)/cache/@PACKAGE_NAME@
 pkgsysconfdir = $(sysconfdir)/@PACKAGE_NAME@
 pkgsysconf_DATA = \
+	shibd-systemd \
 	shibd-redhat \
 	shibd-amazon \
 	shibd-suse \
@@ -86,6 +87,9 @@
 apache24.config: ${srcdir}/apache24.config.in Makefile ${top_builddir}/config.status
 	$(MAKE) do-build-file FILE=$@
 
+shibd-systemd: ${srcdir}/shibd-systemd.in Makefile ${top_builddir}/config.status
+	$(MAKE) do-build-file FILE=$@
+
 shibd-redhat: ${srcdir}/shibd-redhat.in Makefile ${top_builddir}/config.status
 	$(MAKE) do-build-file FILE=$@
 
@@ -142,6 +146,7 @@
 	apache2.config \
 	apache22.config \
 	apache24.config \
+	shibd-systemd \
 	shibd-redhat \
 	shibd-amazon \
 	shibd-suse \
@@ -157,6 +162,7 @@
 	apache2.config.in \
 	apache22.config.in \
 	apache24.config.in \
+	shibd-systemd.in \
 	shibd-redhat.in \
 	shibd-amazon.in \
 	shibd-suse.in \

Modified: branches/REL_2/configure.ac
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/configure.ac?rev=3922&r1=3921&r2=3922&view=diff
==============================================================================
--- branches/REL_2/configure.ac	(original)
+++ branches/REL_2/configure.ac	Thu Jul  2 15:29:17 2015
@@ -430,6 +430,31 @@
     WANT_SUBDIRS="$WANT_SUBDIRS adfs"
 fi
 
+## systemd
+dnl Systemd will be disabled by default and requires you to run configure with
+dnl --enable-systemd to look for and enable systemd.
+AC_ARG_ENABLE(systemd,
+    AS_HELP_STRING([--enable-systemd],[Build with systemd (Default = no)]),
+	[if test "x$enableval" = "x" ; then
+         WANT_SYSTEMD=no
+	 else
+	     WANT_SYSTEMD="$enableval"
+	 fi
+	],[ WANT_SYSTEMD=no ])
+AC_MSG_CHECKING(whether to build with systemd)
+
+AC_MSG_RESULT($WANT_SYSTEMD)
+if test "$WANT_SYSTEMD" = "yes" ; then
+	AC_CHECK_HEADER([systemd/sd-daemon.h], [
+	    AC_CHECK_LIB([systemd-daemon], [sd_notify], [hassdnotify="y"])])
+	AS_IF([test "x$hassdnotify=" = x], [
+	   AC_MSG_ERROR([Unable to find a suitable libsystemd-daemon library])
+	])
+	AC_DEFINE([HAVE_SD_NOTIFY],[1],[Define to 1 if you have the sd_notify function.])
+	PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon])
+	AC_SUBST([SYSTEMD_CFLAGS])
+	AC_SUBST([SYSTEMD_LIBS])
+fi
 
 #
 # Build NSAPI module?

Modified: branches/REL_2/shibboleth.spec.in
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibboleth.spec.in?rev=3922&r1=3921&r2=3922&view=diff
==============================================================================
--- branches/REL_2/shibboleth.spec.in	(original)
+++ branches/REL_2/shibboleth.spec.in	Thu Jul  2 15:29:17 2015
@@ -20,6 +20,7 @@
 BuildRequires:	libxerces-c-devel >= 3.1
 %else
 %if 0%{?rhel} >= 7 || 0%{?centos_version} >= 700
+BuildRequires:	systemd
 BuildRequires:	xerces-c-devel >= 3.1
 %else
 BuildRequires:	libxerces-c-devel >= 3.1
@@ -60,6 +61,10 @@
 %if "%{_vendor}" == "suse"
 Requires(pre): pwdutils
 %{!?_without_builtinapache:BuildRequires: apache2-devel}
+%if 0%{?suse_version} >= 1210
+Requires: %{?systemd_requires}
+BuildRequires: systemd-rpm-macros
+%endif
 %endif
 
 %define runuser shibd
@@ -104,10 +109,18 @@
 %setup -n %{name}-sp-%{version}
 
 %build
+%if 0%{?suse_version} >= 1210
+	%configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?_with_fastcgi} %{!?_without_gssapi:--with-gssapi} %{!?_without_systemd:--enable-systemd} %{?shib_options}
+%else
+%if 0%{?rhel} >= 7 || 0%{?centos_version} >= 700
+	%configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?_with_fastcgi} %{!?_without_gssapi:--with-gssapi} %{!?_without_memcached:--with-memcached} %{!?_without_systemd:--enable-systemd} %{?shib_options}
+%else
 %if 0%{?centos_version} >= 600
 	%configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?_with_fastcgi} %{!?_without_gssapi:--with-gssapi} %{!?_without_memcached:--with-memcached} %{?shib_options}
 %else
 	%configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?_with_fastcgi} %{!?_without_gssapi:--with-gssapi} %{?_with_memcached} %{?shib_options}
+%endif
+%endif
 %endif
 %{__make} pkgdocdir=%{pkgdocdir}
 
@@ -150,8 +163,17 @@
 	fi
 fi
 
-# Establish location of sysconfig file, if any.
+# Establish location of systemd file, if any.
+SYSTEMD_SHIBD="no"
+%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7 || 0%{?centos_version} >= 700

[... 321 lines stripped ...]


More information about the commits mailing list