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
This commit is contained in:
Kristyna Streitova 2015-02-18 10:45:26 +00:00 committed by Git OBS Bridge
parent f4f49e5231
commit 1bd179994f
3 changed files with 24 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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"