From 1bd179994faf8099b3b1c65bffd372ce7c962528c4401f3829773df6f5de0607 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Wed, 18 Feb 2015 10:45:26 +0000 Subject: [PATCH] Accepting request 281990 from home:elvigia:branches:Apache - httpd-2.4.3-mod_systemd.patch find libsystemd-daemon with pkg-config, this is the only correct way, in current versions sd_notify is in libsystemd and in old products in libsystemd-daemon. OBS-URL: https://build.opensuse.org/request/show/281990 OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=431 --- apache2.changes | 8 ++++++++ apache2.spec | 1 + httpd-2.4.3-mod_systemd.patch | 26 +++++++++++++++----------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/apache2.changes b/apache2.changes index 256698f..89d261d 100644 --- a/apache2.changes +++ b/apache2.changes @@ -3,6 +3,14 @@ Tue Feb 3 15:12:04 UTC 2015 - pgajdos@suse.com - httpd2.pid in rc.apache2 was wrong [bnc#898193] +------------------------------------------------------------------- +Mon Jan 19 19:18:28 UTC 2015 - crrodriguez@opensuse.org + +- httpd-2.4.3-mod_systemd.patch find libsystemd-daemon + with pkg-config, this is the only correct way, in current + versions sd_notify is in libsystemd and in old products + in libsystemd-daemon. + ------------------------------------------------------------------- Fri Jan 16 04:24:04 UTC 2015 - crrodriguez@opensuse.org diff --git a/apache2.spec b/apache2.spec index 5a4bf73..9038ea4 100644 --- a/apache2.spec +++ b/apache2.spec @@ -38,6 +38,7 @@ BuildRequires: libcap BuildRequires: libcap-devel %endif %if 0%{?suse_version} >= 1210 +BuildRequires: pkgconfig BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(libsystemd-daemon) %endif diff --git a/httpd-2.4.3-mod_systemd.patch b/httpd-2.4.3-mod_systemd.patch index 673eb09..db02def 100644 --- a/httpd-2.4.3-mod_systemd.patch +++ b/httpd-2.4.3-mod_systemd.patch @@ -1,26 +1,20 @@ ---- httpd-2.4.6.orig/modules/arch/unix/config5.m4 -+++ httpd-2.4.6/modules/arch/unix/config5.m4 -@@ -18,6 +18,18 @@ APACHE_MODULE(privileges, Per-virtualhos +--- httpd-2.4.11.orig/modules/arch/unix/config5.m4 ++++ httpd-2.4.11/modules/arch/unix/config5.m4 +@@ -18,6 +18,12 @@ APACHE_MODULE(privileges, Per-virtualhos fi ]) + +APACHE_MODULE(systemd, Systemd support, , , $unixd_mods_enabled, [ -+ AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon") -+ AC_CHECK_HEADERS(systemd/sd-daemon.h, [ap_HAVE_SD_DAEMON_H="yes"], [ap_HAVE_SD_DAEMON_H="no"]) -+ if test $ap_HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then -+ AC_MSG_WARN([Your system does not support systemd.]) -+ enable_systemd="no" -+ else ++ PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon]) + APR_ADDTO(MOD_SYSTEMD_LDADD, [$SYSTEMD_LIBS]) -+ fi +]) + APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current]) APACHE_MODPATH_FINISH --- /dev/null -+++ httpd-2.4.6/modules/arch/unix/mod_systemd.c ++++ httpd-2.4.11/modules/arch/unix/mod_systemd.c @@ -0,0 +1,138 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with @@ -160,3 +154,13 @@ + NULL, + systemd_register_hooks, +}; +--- httpd-2.4.11.orig/configure.in ++++ httpd-2.4.11/configure.in +@@ -77,6 +77,7 @@ dnl shared library support for these pac + dnl work on some platforms + + AC_CANONICAL_SYSTEM ++PKG_PROG_PKG_CONFIG + + orig_prefix="$prefix" +