[cpp-sp] 16/17: Add missing flags/libs to makefiles, fix GSS decl test, set pkgconfig path in spec.

Scott Cantor cantor.2 at osu.edu
Wed Jun 27 20:35:57 EDT 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=030de503c626078351d6d780fdadd43e0909b7a7

commit 030de503c626078351d6d780fdadd43e0909b7a7
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Jun 27 20:35:15 2018 -0400

    Add missing flags/libs to makefiles, fix GSS decl test, set pkgconfig path in spec.
---
 .gitignore                 |  1 +
 adfs/Makefile.am           | 14 ++++++---
 configure.ac               |  6 +++-
 fastcgi/Makefile.am        |  2 ++
 m4/ax_restore_flags.m4     | 52 +++++++++++++++++++++++++++++++++
 m4/ax_save_flags.m4        | 71 ++++++++++++++++++++++++++++++++++++++++++++++
 memcache-store/Makefile.am |  1 +
 plugins/Makefile.am        |  1 +
 shibboleth.spec.in         | 15 +++++-----
 9 files changed, 151 insertions(+), 12 deletions(-)

diff --git a/.gitignore b/.gitignore
index a4f217f..0cf6cdf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@
 *.opensdf
 *.suo
 *.aps
+*.pc
 *~
 *.#*
 .*.swp
diff --git a/adfs/Makefile.am b/adfs/Makefile.am
index c6b9007..bd75bd5 100644
--- a/adfs/Makefile.am
+++ b/adfs/Makefile.am
@@ -5,11 +5,14 @@ plugin_LTLIBRARIES = adfs.la adfs-lite.la
 
 adfs_la_CXXFLAGS = \
 	$(opensaml_CFLAGS) \
-	$(xmltooling_CFLAGS)
+	$(xmltooling_CFLAGS) \
+        $(xerces_CFLAGS) \
+        $(BOOST_CPPFLAGS)
 adfs_la_LIBADD = \
 	$(top_builddir)/shibsp/libshibsp.la \
 	$(opensaml_LIBS) \
-	$(xmltooling_LIBS)
+	$(xmltooling_LIBS) \
+        $(xerces_LIBS)
 
 adfs_la_SOURCES = \
 	adfs.cpp
@@ -20,8 +23,11 @@ adfs_lite_la_SOURCES = \
 adfs_la_LDFLAGS = -module -avoid-version
 adfs_lite_la_LDFLAGS = -module -avoid-version
 adfs_lite_la_CXXFLAGS = -DSHIBSP_LITE \
-	$(xmltooling_lite_CFLAGS)
+	$(xmltooling_lite_CFLAGS) \
+        $(xerces_CFLAGS) \
+        $(BOOST_CPPFLAGS)
 adfs_lite_la_LIBADD = $(top_builddir)/shibsp/libshibsp-lite.la \
-	$(xmltooling_lite_LIBS)
+	$(xmltooling_lite_LIBS) \
+        $(xerces_LIBS)
 
 EXTRA_DIST = resource.h adfs.rc
diff --git a/configure.ac b/configure.ac
index 0533020..7f00ca6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,7 +157,7 @@ PKG_CHECK_VAR([xmltooling_includedir],[xmltooling],[includedir])
 PKG_CHECK_VAR([XMLTOOLINGXMLDIR],[xmltooling],[pkgxmldir])
 DX_INCLUDE="$DX_INCLUDE $xmltooling_includedir"
 
-AX_PKG_CHECK_MODULES([xmltooling_lite],,[xmltooling-lite],,,
+AX_PKG_CHECK_MODULES([xmltooling_lite],,[xmltooling-lite >= 3],,,
     [SHIBSP_LITE_REQUIRES],[SHIBSP_LITE_REQUIRES_PRIVATE])
 
 AX_PKG_CHECK_MODULES([opensaml],,[opensaml >= 3],,,
@@ -927,6 +927,9 @@ AS_IF([test "x$with_gssapi" != xno],
      [SHIBSP_LITE_REQUIRES],[SHIBSP_LITE_REQUIRES_PRIVATE])
    AS_IF([test "x$with_gssapi" != xno],
      [AC_DEFINE([SHIBSP_HAVE_GSSAPI],[1],[if you have the gssapi libraries])
+      AX_SAVE_FLAGS
+        CXXFLAGS="$gss_CFLAGS $gnu_gss_CFLAGS $CXXFLAGS"
+        LIBS="$gss_LIBS $gnu_gss_LIBS $LIBS"
       AC_CHECK_DECLS([gss_get_name_attribute,GSS_C_NT_EXPORT_NAME_COMPOSITE],,,[[
 #ifdef SHIBSP_HAVE_GSSGNU
 # include <gss.h>
@@ -937,6 +940,7 @@ AS_IF([test "x$with_gssapi" != xno],
 # include <gssapi.h>
 #endif
 ]])
+      AX_RESTORE_FLAGS
      ])
   ])
 AM_CONDITIONAL([GSSAPI_NAMINGEXTS],[test "x$ac_cv_have_decl_gss_get_name_attribute" = xyes])
diff --git a/fastcgi/Makefile.am b/fastcgi/Makefile.am
index 33a9856..0c96c66 100644
--- a/fastcgi/Makefile.am
+++ b/fastcgi/Makefile.am
@@ -8,6 +8,7 @@ fastcgi_PROGRAMS = shibauthorizer shibresponder
 
 shibauthorizer_SOURCES = shibauthorizer.cpp
 shibauthorizer_CXXFLAGS = $(FASTCGI_INCLUDE) \
+  $(BOOST_CPPFLAGS) \
   $(xerces_CFLAGS) \
   $(xmltooling_lite_CFLAGS)
 shibauthorizer_LDFLAGS = $(FASTCGI_LDFLAGS)
@@ -18,6 +19,7 @@ shibauthorizer_LDADD = $(FASTCGI_LIBS) \
 
 shibresponder_SOURCES = shibresponder.cpp
 shibresponder_CXXFLAGS = $(FASTCGI_INCLUDE) \
+  $(BOOST_CPPFLAGS) \
   $(xerces_CFLAGS) \
   $(xmltooling_lite_CFLAGS)
 shibresponder_LDFLAGS = $(FASTCGI_LDFLAGS)
diff --git a/m4/ax_restore_flags.m4 b/m4/ax_restore_flags.m4
new file mode 100644
index 0000000..aafd363
--- /dev/null
+++ b/m4/ax_restore_flags.m4
@@ -0,0 +1,52 @@
+# ===========================================================================
+#     http://www.gnu.org/software/autoconf-archive/ax_restore_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_RESTORE_FLAGS([namespace])
+#
+# DESCRIPTION
+#
+#   Restore common compilation flags from temporary variables.
+#
+#   Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
+#   OBJCFLAGS.
+#
+#   By default these flags are restored to a global (empty) namespace, but
+#   user could restore from specific NAMESPACE by using
+#   AX_RESTORE_FLAGS(NAMESPACE) macro.
+#
+#   Typical usage is like:
+#
+#     AX_SAVE_FLAGS(mypackage)
+#     CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
+#     dnl ... do some detection ...
+#     AX_RESTORE_FLAGS(mypackage)
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Filippo Giunchedi <filippo at esaurito.net>
+#   Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
+#   Copyright (c) 2011 Russ Allbery <rra at stanford.edu>
+#   Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf at gmail.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 6
+
+# save one flag in name space
+AC_DEFUN([_AX_RESTORE_ONE_FLAG],[dnl
+  AS_VAR_PUSHDEF([_ax_restore_flag_var], [$2[]_$1[]_ax_save_flags])
+  AS_VAR_COPY($2[],_ax_restore_flag_var)
+  AS_VAR_POPDEF([_ax_restore_flag_var])
+])
+
+AC_DEFUN([AX_RESTORE_FLAGS], [dnl
+   m4_foreach([FLAG], dnl
+	      [_AX_SAVE_FLAGS_LIST()], dnl
+	      [_AX_RESTORE_ONE_FLAG([$1],FLAG)])
+])
diff --git a/m4/ax_save_flags.m4 b/m4/ax_save_flags.m4
new file mode 100644
index 0000000..39f45be
--- /dev/null
+++ b/m4/ax_save_flags.m4
@@ -0,0 +1,71 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_save_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_SAVE_FLAGS([NAMESPACE])
+#
+# DESCRIPTION
+#
+#   Save common compilation flags into temporary variables.
+#
+#   Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
+#   OBJCFLAGS.
+#
+#   By default these flags are saved to a global (empty) namespace, but user
+#   could specify a specific NAMESPACE to AX_SAVE_FLAGS macro and latter
+#   restore it by using AX_RESTORE_FLAGS(NAMESPACE).
+#
+#     AX_SAVE_FLAGS(mypackage)
+#     CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
+#     dnl .. do some detection ...
+#     AX_RESTORE_FLAGS(mypackage)
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Filippo Giunchedi <filippo at esaurito.net>
+#   Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
+#   Copyright (c) 2011 Russ Allbery <rra at stanford.edu>
+#   Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf at gmail.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 7
+
+# list of flag to save
+AC_DEFUN([_AX_SAVE_FLAGS_LIST],[dnl
+[CCASFLAGS],dnl
+[CFLAGS],dnl
+[CPPFLAGS],dnl
+[CXXFLAGS],dnl
+[ERLCFLAGS],dnl
+[FCFLAGS],dnl
+[FCLIBS],dnl
+[FFLAGS],dnl
+[FLIBS],dnl
+[GCJFLAGS],dnl
+[JAVACFLAGS],dnl
+[LDFLAGS],dnl
+[LIBS],dnl
+[OBJCFLAGS],dnl
+[OBJCXXFLAGS],dnl
+[UPCFLAGS],dnl
+[VALAFLAGS]dnl
+])
+
+# save one flag in name space
+AC_DEFUN([_AX_SAVE_ONE_FLAG],[
+  AS_VAR_PUSHDEF([_ax_save_flag_var], [$2[]_$1[]_ax_save_flags])
+  AS_VAR_COPY(_ax_save_flag_var, $2[])
+  AS_VAR_POPDEF([_ax_save_flag_var])
+])
+
+AC_DEFUN([AX_SAVE_FLAGS],[dnl
+   m4_foreach([FLAG], dnl
+	      [_AX_SAVE_FLAGS_LIST()], dnl
+	      [_AX_SAVE_ONE_FLAG([$1],FLAG)])
+])
diff --git a/memcache-store/Makefile.am b/memcache-store/Makefile.am
index ca801ca..98e77bf 100644
--- a/memcache-store/Makefile.am
+++ b/memcache-store/Makefile.am
@@ -9,6 +9,7 @@ AM_CXXFLAGS = $(MEMCACHED_INCLUDE)
 memcache_store_la_LDFLAGS = $(MEMCACHED_LDFLAGS) -module -avoid-version
 memcache_store_la_CXXFLAGS = \
 	$(PTHREAD_CFLAGS) \
+        $(BOOST_CPPFLAGS) \
 	$(opensaml_CFLAGS) \
 	$(xerces_CFLAGS) \
 	$(xmltooling_CFLAGS)
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index be0d7c3..9da82b6 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -21,6 +21,7 @@ plugins_lite_la_SOURCES = \
 	${common_sources}
 
 plugins_la_CXXFLAGS = \
+        $(BOOST_CPPFLAGS) \
 	$(PTHREAD_CFLAGS) \
 	$(opensaml_CFLAGS) \
 	$(xerces_CFLAGS) \
diff --git a/shibboleth.spec.in b/shibboleth.spec.in
index 0256b99..3f382f5 100644
--- a/shibboleth.spec.in
+++ b/shibboleth.spec.in
@@ -26,7 +26,7 @@ BuildRequires:	libxml-security-c-devel >= 2.0.0
 BuildRequires:	libxmltooling-devel >= 3.0.0
 BuildRequires:	libsaml-devel >= 3.0.0
 %{?_with_log4cpp:BuildRequires: liblog4cpp-devel >= 1.0}
-%{!?_with_log4cpp:BuildRequires: liblog4shib-devel >= 1.0.10}
+%{!?_with_log4cpp:BuildRequires: liblog4shib-devel >= 2}
 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 || 0%{?amzn} >= 1
 Requires:	libcurl-openssl%{?_isa} >= 7.21.7
 BuildRequires:	chrpath
@@ -90,7 +90,7 @@ Requires: 	libxml-security-c-devel >= 2.0.0
 Requires: 	libxmltooling-devel >= 3.0.0
 Requires: 	libsaml-devel >= 3.0.0
 %{?_with_log4cpp:Requires: liblog4cpp-devel >= 1.0}
-%{!?_with_log4cpp:Requires: liblog4shib-devel >= 1.0.10}
+%{!?_with_log4cpp:Requires: liblog4shib-devel >= 2}
 
 %description devel
 Shibboleth is a Web Single Sign-On implementations based on OpenSAML
@@ -107,10 +107,10 @@ This package includes files needed for development with Shibboleth.
 	%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}
+	%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} PKG_CONFIG_PATH=/opt/shibboleth/%{_lib}/pkgconfig
 %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}
+%if 0%{?rhel} >= 6 || 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} PKG_CONFIG_PATH=/opt/shibboleth/%{_lib}/pkgconfig
 %else
 	%configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?_with_fastcgi} %{!?_without_gssapi:--with-gssapi} %{?_with_memcached} %{?shib_options}
 %endif
@@ -192,6 +192,7 @@ if [ "$SYSTEMD_SHIBD" != "no" ] ; then
 	cat > $SYSTEMD_SHIBD <<EOF
 [Unit]
 Description=Shibboleth Service Provider Daemon
+Documentation=https://wiki.shibboleth.net/confluence/display/SP3/Home
 After=network.target
 Before=httpd.service
 
@@ -206,8 +207,8 @@ ExecStart=%{_sbindir}/shibd -f -F
 StandardInput=null
 StandardOutput=null
 StandardError=journal
-TimeoutStopSec=5s
-TimeoutStartSec=150s
+TimeoutStopSec=1m
+TimeoutStartSec=5m
 Restart=on-failure
 RestartSec=30s
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list