Rework XML directory substitutions to handle xmltooling/opensaml in alternate locations.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 14 Nov 2007 04:16:38 +0000 (04:16 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 14 Nov 2007 04:16:38 +0000 (04:16 +0000)
Solaris packaging changes.

git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2605 cb58f699-b61c-0410-a6fe-9272a202ed29

13 files changed:
Makefile.am
checkinstall [deleted file]
configs/Makefile.am
configs/apache.config.in
configs/apache2.config.in
configs/apache22.config.in
configure.ac
depend [new file with mode: 0644]
msi/scripts/shib_edit_config_files.vbs
pkginfo.in
postinstall [new file with mode: 0644]
shibsp/Makefile.am
shibsp/paths.h.in

index 3ce1ce1..790cb3f 100644 (file)
@@ -52,6 +52,7 @@ EXTRA_DIST = $(DX_CONFIG) \
     shibboleth.spec \
     pkginfo.in \
     pkginfo \
-    checkinstall
+    depend \
+    postinstall
 
 DISTCLEANFILES = shibboleth.spec pkginfo
diff --git a/checkinstall b/checkinstall
deleted file mode 100644 (file)
index 6c618f9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-expected_platform="sparc"
-platform=`uname -p`
-if [ ${platform} != ${expected_platform} ]; then
-       echo "This package must be installed on ${expected_platform}"
-       exit 1
-fi
-exit 0
index 6fb2487..fb64f30 100644 (file)
@@ -6,7 +6,6 @@ pkglibdir = ${libdir}/@PACKAGE@
 pkglogdir = ${localstatedir}/log/@PACKAGE@
 pkgdocdir = ${datadir}/doc/@PACKAGE@
 shirelogdir = ${localstatedir}/log/httpd
-xmldir = $(datadir)/xml
 pkgxmldir = $(datadir)/xml/@PACKAGE@
 pkgrundir = $(localstatedir)/run/@PACKAGE@
 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
@@ -54,9 +53,10 @@ do-build-file:
         -e 's:@-PREFIX-@:${prefix}:g' \
         -e 's:@-PKGLIBDIR-@:${pkglibdir}:g' \
         -e 's:@-PKGSYSCONFDIR-@:${pkgsysconfdir}:g' \
-        -e 's:@-PKGXMLDIR-@:${pkgxmldir}:g' \
         -e 's:@-PKGDOCDIR-@:${pkgdocdir}:g' \
-        -e 's:@-XMLDIR-@:${xmldir}:g' \
+        -e 's:@-PKGXMLDIR-@:${pkgxmldir}:g'
+        -e 's:@-XMLTOOLINGXMLDIR-@:${XMLTOOLINGXMLDIR}:g'
+        -e 's:@-OPENSAMLXMLDIR-@:${OPENSAMLXMLDIR}:g'
         -e 's:@-PKGLOGDIR-@:${pkglogdir}:g' \
         -e 's:@-SHIRELOGDIR-@:${shirelogdir}:g' \
         -e 's:@-PKGRUNDIR-@:${pkgrundir}:g'
index 12e058e..1b79c98 100644 (file)
@@ -14,7 +14,7 @@ LoadModule mod_shib @-PKGLIBDIR-@/mod_shib_13.so
 # This is the XML file that contains all the global, non-apache-specific
 # configuration.  Look at this file for most of your configuration parameters.
 #
-ShibSchemaDir @-XMLDIR-@/xmltooling/catalog.xml:@-XMLDIR-@/opensaml/saml20-catalog.xml:@-XMLDIR-@/opensaml/saml11-catalog.xml:@-XMLDIR-@/shibboleth/catalog.xml
+ShibSchemaDir @-XMLTOOLINGXMLDIR-@/catalog.xml:@-OPENSAMLXMLDIR-@/saml20-catalog.xml:@-OPENSAMLXMLDIR-@/saml11-catalog.xml:@-PKGXMLDIR-@/catalog.xml
 ShibConfig @-PKGSYSCONFDIR-@/shibboleth2.xml
 
 #
index 09dd45d..4b60f5e 100644 (file)
@@ -14,7 +14,7 @@ LoadModule mod_shib @-PKGLIBDIR-@/mod_shib_20.so
 # This is the XML file that contains all the global, non-apache-specific
 # configuration.  Look at this file for most of your configuration parameters.
 #
-ShibSchemaDir @-XMLDIR-@/xmltooling/catalog.xml:@-XMLDIR-@/opensaml/saml20-catalog.xml:@-XMLDIR-@/opensaml/saml11-catalog.xml:@-XMLDIR-@/shibboleth/catalog.xml
+ShibSchemaDir @-XMLTOOLINGXMLDIR-@/catalog.xml:@-OPENSAMLXMLDIR-@/saml20-catalog.xml:@-OPENSAMLXMLDIR-@/saml11-catalog.xml:@-PKGXMLDIR-@/catalog.xml
 ShibConfig @-PKGSYSCONFDIR-@/shibboleth2.xml
 
 #
index 134f8f2..a6de924 100644 (file)
@@ -14,7 +14,7 @@ LoadModule mod_shib @-PKGLIBDIR-@/mod_shib_22.so
 # This is the XML file that contains all the global, non-apache-specific
 # configuration.  Look at this file for most of your configuration parameters.
 #
-ShibSchemaDir @-XMLDIR-@/xmltooling/catalog.xml:@-XMLDIR-@/opensaml/saml20-catalog.xml:@-XMLDIR-@/opensaml/saml11-catalog.xml:@-XMLDIR-@/shibboleth/catalog.xml
+ShibSchemaDir @-XMLTOOLINGXMLDIR-@/catalog.xml:@-OPENSAMLXMLDIR-@/saml20-catalog.xml:@-OPENSAMLXMLDIR-@/saml11-catalog.xml:@-PKGXMLDIR-@/catalog.xml
 ShibConfig @-PKGSYSCONFDIR-@/shibboleth2.xml
 
 #
index 93387b0..9ed2d6a 100644 (file)
@@ -177,6 +177,27 @@ XMLSEC_LIBS="-lxmltooling"
 AC_CHECK_HEADER([xmltooling/base.h],,
                 AC_MSG_ERROR([unable to find xmltooling header files]))
 
+# Establish location of xmltooling catalog.
+XMLTOOLINGXMLDIR=""
+if test "x$with_xmltooling" = "x" ; then
+   with_xmltooling="/usr"
+fi
+if test -f $with_xmltooling/share/xml/xmltooling/catalog.xml ; then
+    XMLTOOLINGXMLDIR="$with_xmltooling"
+else
+    if test -f $with_xerces/share/xml/xmltooling/catalog.xml ; then
+        XMLTOOLINGXMLDIR="$with_xerces"
+    else
+        if test -f $with_log4shib/share/xml/xmltooling/catalog.xml ; then
+            XMLTOOLINGXMLDIR="$with_log4shib"
+        fi
+    fi
+fi
+if test "x$XMLTOOLINGXMLDIR" = "x" ; then
+    AC_MSG_ERROR([xmltooling XML catalog not found, may need to use --with-xmltooling option])
+fi
+XMLTOOLINGXMLDIR="$XMLTOOLINGXMLDIR/share/xml/xmltooling"
+AC_SUBST(XMLTOOLINGXMLDIR);
 
 # XML-Security settings
 AC_ARG_WITH(xmlsec,
@@ -241,6 +262,32 @@ opensaml::SAMLConfig::getConfig();
 # restore master libs
 LIBS="$save_LIBS"
 
+# Establish location of opensaml catalogs.
+OPENSAMLXMLDIR=""
+if test "x$with_saml" = "x" ; then
+    with_saml="/usr"
+fi
+if test -f $with_saml/share/xml/opensaml/saml20-catalog.xml ; then
+    OPENSAMLXMLDIR="$with_saml"
+else
+    if test -f $with_xmltooling/share/xml/opensaml/saml20-catalog.xml ; then
+        OPENSAMLXMLDIR="$with_xmltooling"
+    else
+        if test -f $with_xerces/share/xml/opensaml/saml20-catalog.xml ; then
+            OPENSAMLXMLDIR="$with_xerces"
+        else
+            if test -f $with_log4shib/share/xml/opensaml/saml20-catalog.xml ; then
+                OPENSAMLXMLDIR="$with_log4shib"
+            fi
+        fi
+    fi
+fi
+if test "x$OPENSAMLXMLDIR" = "x" ; then
+    AC_MSG_ERROR([opensaml XML catalogs not found, may need to use --with-saml option])
+fi
+OPENSAMLXMLDIR="$OPENSAMLXMLDIR/share/xml/opensaml"
+AC_SUBST(OPENSAMLXMLDIR);
+
 AC_SUBST(LITE_LIBS)
 AC_SUBST(XMLSEC_LIBS)
 
diff --git a/depend b/depend
new file mode 100644 (file)
index 0000000..1304fe7
--- /dev/null
+++ b/depend
@@ -0,0 +1,10 @@
+P SHIBossl OpenSSL\r
+       0.9.8g\r
+P SHIBxerces xerces-c\r
+       2.8.0\r
+P SHIBxmlsec xml-security-c\r
+       1.4.0\r
+P SHIBxmltool xmltooling-c\r
+    1.0\r
+P SHIBosaml opensaml-c\r
+       2.0\r
index 9e07d66..f8ffbbc 100644 (file)
@@ -127,7 +127,9 @@ if (Err = 0) then
   FileSystemObj.MoveFile ConfigFile, DistDir & "native.logger"
 
   ConfigFile = DistDir & "apache.config.in"
-  ReplaceInFile ConfigFile, "@-XMLDIR-@", ConvertedDir & "/share/xml"
+  ReplaceInFile ConfigFile, "@-XMLTOOLINGXMLDIR-@", ConvertedDir & "/share/xml/xmltooling"
+  ReplaceInFile ConfigFile, "@-OPENSAMLXMLDIR-@", ConvertedDir & "/share/xml/opensaml"
+  ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth"
   ReplaceInFile ConfigFile, "catalog.xml:", "catalog.xml;"
   ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth"
   ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth"
@@ -141,7 +143,9 @@ if (Err = 0) then
   FileSystemObj.MoveFile ConfigFile, DistDir & "apache.config"
 
   ConfigFile = DistDir & "apache2.config.in"
-  ReplaceInFile ConfigFile, "@-XMLDIR-@", ConvertedDir & "/share/xml"
+  ReplaceInFile ConfigFile, "@-XMLTOOLINGXMLDIR-@", ConvertedDir & "/share/xml/xmltooling"
+  ReplaceInFile ConfigFile, "@-OPENSAMLXMLDIR-@", ConvertedDir & "/share/xml/opensaml"
+  ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth"
   ReplaceInFile ConfigFile, "catalog.xml:", "catalog.xml;"
   ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth"
   ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth"
@@ -155,7 +159,9 @@ if (Err = 0) then
   FileSystemObj.MoveFile ConfigFile, DistDir & "apache2.config"
 
   ConfigFile = DistDir & "apache22.config.in"
-  ReplaceInFile ConfigFile, "@-XMLDIR-@", ConvertedDir & "/share/xml"
+  ReplaceInFile ConfigFile, "@-XMLTOOLINGXMLDIR-@", ConvertedDir & "/share/xml/xmltooling"
+  ReplaceInFile ConfigFile, "@-OPENSAMLXMLDIR-@", ConvertedDir & "/share/xml/opensaml"
+  ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth"
   ReplaceInFile ConfigFile, "catalog.xml:", "catalog.xml;"
   ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth"
   ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth"
index 533dbf8..8f42471 100644 (file)
@@ -1,11 +1,12 @@
-ARCH=sparc
 PKG=SHIBsp
-NAME=Shibboleth Service Provider
+ARCH=sparc
 VERSION=@-VERSION-@
-CATEGORY=system
-VENDOR=http://shibboleth.internet2.edu/ packaged for Shibboleth by Scott Cantor
-HOTLINE=http://bugzilla.internet2.edu/
-EMAIL=cantor.2@osu.edu
-PSTAMP=12Jun2005
+BASEDIR=/
+NAME=shibboleth-sp
+CATEGORY=application,security
+DESC=Shibboleth Service Provider
+VENDOR=Internet2
+HOTLINE=https://bugs.internet2.edu/
 CLASSES=none
-BASEDIR=/opt/shibboleth-sp
+PSTAMP=sunra.internet2.edu 2007-11-12
+EMAIL=cantor.2@osu.edu
diff --git a/postinstall b/postinstall
new file mode 100644 (file)
index 0000000..0dea084
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh\r
+\r
+cd /opt/shibboleth-sp/etc/shibboleth\r
+\r
+CONFIGFILES=" \\r
+    native.logger \\r
+    shibd.logger \\r
+    syslog.logger \\r
+    console.logger \\r
+    accessError.html \\r
+    sessionError.html \\r
+    metadataError.html \\r
+    sslError.html \\r
+    bindingTemplate.html \\r
+    localLogout.html \\r
+    globalLogout.html \\r
+    sp-example.key \\r
+    sp-example.crt \\r
+    attribute-map.xml \\r
+    attribute-policy.xml \\r
+    shibboleth2.xml \\r
+    example-metadata.xml"\r
+\r
+for f in $CONFIGFILES; do\r
+    if test ! -f $f; then\r
+        cp $f.dist $f\r
+    fi;\r
+    done\r
+\r
+exit 0\r
index cd2dd35..ba2f5cd 100644 (file)
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS = foreign
 
 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
-xmldir = $(datadir)/xml
+pkgxmldir = $(datadir)/xml/@PACKAGE@
 
 lib_LTLIBRARIES = libshibsp.la libshibsp-lite.la
 
@@ -194,7 +194,9 @@ paths.h: ${srcdir}/paths.h.in Makefile ${top_builddir}/config.status
        rm -f $@.tmp
        sed < ${srcdir}/$@.in > $@.tmp \
            -e 's:@-PKGSYSCONFDIR-@:${pkgsysconfdir}:g' \
-           -e 's:@-XMLDIR-@:${xmldir}:g'
+           -e 's:@-PKGXMLDIR-@:${pkgxmldir}:g'
+           -e 's:@-XMLTOOLINGXMLDIR-@:${XMLTOOLINGXMLDIR}:g'
+           -e 's:@-OPENSAMLXMLDIR-@:${OPENSAMLXMLDIR}:g'
        cmp -s $@ $@.tmp || mv $@.tmp $@
        rm -f $@.tmp
 
index 61712d8..0237517 100644 (file)
@@ -26,7 +26,7 @@
 /**\r
  * Default schema catalogs.\r
  */\r
-#define SHIBSP_SCHEMAS "@-XMLDIR-@/xmltooling/catalog.xml:@-XMLDIR-@/opensaml/saml20-catalog.xml:@-XMLDIR-@/opensaml/saml11-catalog.xml:@-XMLDIR-@/shibboleth/catalog.xml"\r
+#define SHIBSP_SCHEMAS "@-XMLTOOLINGXMLDIR-@/catalog.xml:@-OPENSAMLXMLDIR-@/saml20-catalog.xml:@-OPENSAMLXMLDIR-@/saml11-catalog.xml:@-PKGXMLDIR-@/catalog.xml"\r
 \r
 /**\r
  * Default location of SP configuration file.\r
@@ -34,7 +34,7 @@
 #define SHIBSP_CONFIG "@-PKGSYSCONFDIR-@/shibboleth2.xml"\r
 \r
 /**\r
- * Default location of SP configuration file.\r
+ * Default location of SP console tool logging file.\r
  */\r
 #define SHIBSP_LOGGING "@-PKGSYSCONFDIR-@/console.logger"\r
 \r