summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
author Thibaut Notteboom2013-03-03 19:45:36 +0100
committer Robby Workman2013-03-03 19:45:36 +0100
commite82df38da0f608d618b623fe024ab3fa8950bb17 (patch)
tree08a3cc3130a2ce436ab422a176a758c12defa61c /network
parentba84a34c191db5a047da568d5c670f18ea37861b (diff)
downloadslackbuilds-e82df38da0f608d618b623fe024ab3fa8950bb17.tar.gz
network/shibboleth-sp: Added (Shibboleth Service Provider)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/shibboleth-sp/README10
-rw-r--r--network/shibboleth-sp/README.SLACKWARE24
-rw-r--r--network/shibboleth-sp/doinst.sh31
-rw-r--r--network/shibboleth-sp/mod_shib.conf30
-rw-r--r--network/shibboleth-sp/rc.shibboleth39
-rw-r--r--network/shibboleth-sp/shibboleth-sp.SlackBuild123
-rw-r--r--network/shibboleth-sp/shibboleth-sp.info10
-rw-r--r--network/shibboleth-sp/slack-desc19
8 files changed, 286 insertions, 0 deletions
diff --git a/network/shibboleth-sp/README b/network/shibboleth-sp/README
new file mode 100644
index 0000000000..3eae149df7
--- /dev/null
+++ b/network/shibboleth-sp/README
@@ -0,0 +1,10 @@
+Shibboleth is a Web Single Sign-On implementations based on OpenSAML
+that supports multiple protocols, federated identity, and the extensible
+exchange of rich attributes subject to privacy controls.
+
+This package contains the Shibboleth Service Provider runtime libraries,
+daemon, default plugins, and Apache module.
+
+For some basic setup instructions, check the included 'README.SLACKWARE'
+file. Lots of information is available on the shibboleth wiki:
+https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPConfiguration
diff --git a/network/shibboleth-sp/README.SLACKWARE b/network/shibboleth-sp/README.SLACKWARE
new file mode 100644
index 0000000000..68f032d04b
--- /dev/null
+++ b/network/shibboleth-sp/README.SLACKWARE
@@ -0,0 +1,24 @@
+README.SLACKWARE
+================
+
+1) Apache configuration
+
+You will need to add the following line to /etc/httpd/httpd.conf:
+
+ Include /etc/httpd/extra/mod_shib.conf
+
+2) Start & Stop scripts
+
+To start shibboleth automatically at system startup, add the following to
+your /etc/rc.d/rc.local:
+
+ if [ -x /etc/rc.d/rc.shibboleth ]; then
+ /etc/rc.d/rc.shibboleth start
+ fi
+
+To stop shibboleth automatically at system shutdown, add the following to
+your /etc/rc.d/rc.local_shutdown:
+
+ if [ -x /etc/rc.d/rc.shibboleth ]; then
+ /etc/rc.d/rc.shibboleth stop
+ fi
diff --git a/network/shibboleth-sp/doinst.sh b/network/shibboleth-sp/doinst.sh
new file mode 100644
index 0000000000..62214b7f2a
--- /dev/null
+++ b/network/shibboleth-sp/doinst.sh
@@ -0,0 +1,31 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.shibboleth.new
+config etc/httpd/extra/mod_shib.conf.new
+find etc/shibboleth/ -name *.html.new | while read cfg ; do config $cfg ; done
+find etc/shibboleth/ -name *.logger.new | while read cfg ; do config $cfg ; done
+find etc/shibboleth/ -name *.pem.new | while read cfg ; do config $cfg ; done
+find etc/shibboleth/ -name *.xml.new | while read cfg ; do config $cfg ; done
+
diff --git a/network/shibboleth-sp/mod_shib.conf b/network/shibboleth-sp/mod_shib.conf
new file mode 100644
index 0000000000..815b2be7ac
--- /dev/null
+++ b/network/shibboleth-sp/mod_shib.conf
@@ -0,0 +1,30 @@
+#
+# Load the Shibboleth module.
+#
+LoadModule mod_shib /usr/@baselibdir@/shibboleth/mod_shib_24.so
+
+#
+# Used for example style sheet in error templates.
+#
+<IfModule mod_alias.c>
+ <Location /shibboleth-sp>
+ Require all granted
+ </Location>
+ Alias /shibboleth-sp/main.css /usr/share/shibboleth/main.css
+</IfModule>
+
+#
+# Configure the module for content.
+#
+# You MUST enable AuthType shibboleth for the module to process
+# any requests, and there MUST be a require command as well. To
+# enable Shibboleth but not specify any session/access requirements
+# use "require shibboleth".
+#
+
+#<Location /secure>
+# AuthType shibboleth
+# ShibRequestSetting requireSession 1
+# require valid-user
+#</Location>
+
diff --git a/network/shibboleth-sp/rc.shibboleth b/network/shibboleth-sp/rc.shibboleth
new file mode 100644
index 0000000000..8854433a97
--- /dev/null
+++ b/network/shibboleth-sp/rc.shibboleth
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+shibd_start() {
+ echo "Starting the shibd service: /usr/sbin/shibd"
+ /usr/sbin/shibd -f -u shibd -g shibd
+}
+
+shibd_stop() {
+ echo "Stoping the shibd service: /usr/sbin/shibd"
+ killall shibd
+}
+
+shibd_restart() {
+ shibd_stop
+ sleep 1
+ shibd_start
+}
+
+shibd_configtest() {
+ /usr/sbin/shibd -t
+}
+
+case "$1" in
+ 'start')
+ shibd_start
+ ;;
+ 'stop')
+ shibd_stop
+ ;;
+ 'restart')
+ shibd_restart
+ ;;
+ 'configtest')
+ shibd_configtest
+ ;;
+ *)
+ echo "Usage: $0 start|stop|restart|configtest"
+ ;;
+esac
diff --git a/network/shibboleth-sp/shibboleth-sp.SlackBuild b/network/shibboleth-sp/shibboleth-sp.SlackBuild
new file mode 100644
index 0000000000..ecd08cc25c
--- /dev/null
+++ b/network/shibboleth-sp/shibboleth-sp.SlackBuild
@@ -0,0 +1,123 @@
+#!/bin/sh
+
+# Slackware build script for Shibboleth Service Provider.
+
+# Copyright 2013 Thibaut Notteboom, Paris, FRANCE
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=shibboleth-sp
+VERSION=${VERSION:-2.5.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+if [ "$(grep ^shibd /etc/passwd)" = "" -o "$(grep ^shibd /etc/group)" = "" ] ; then
+ printf "\nYou must have a shibd user and group.\n\nExample:\n"
+ printf "\t# groupadd -g 267 shibd\n"
+ printf "\t# useradd -d /var/run/shibboleth -s /bin/false -u 267 -g shibd shibd\n\n"
+ exit 1
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/etc/httpd/extra
+sed "s%@baselibdir@%lib${LIBDIRSUFFIX}%" $CWD/mod_shib.conf > \
+ $PKG/etc/httpd/extra/mod_shib.conf.new
+
+chown shibd:shibd $PKG/var/cache/shibboleth $PKG/var/log/shibboleth/ $PKG/var/run/shibboleth
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.shibboleth > $PKG/etc/rc.d/rc.shibboleth.new
+
+# Remove useless stuffs
+rm -f $PKG/etc/shibboleth/shibd-* $PKG/etc/shibboleth/*.dist
+
+# Change configuration files to .new
+find $PKG/etc/shibboleth/ -name *.html | while read cfg ; do mv $cfg $cfg.new ; done
+find $PKG/etc/shibboleth/ -name *.logger | while read cfg ; do mv $cfg $cfg.new ; done
+find $PKG/etc/shibboleth/ -name *.xml | while read cfg ; do mv $cfg $cfg.new ; done
+
+# Key generation
+$PKG/etc/shibboleth/keygen.sh -f -u shibd -g shibd -o $PKG/etc/shibboleth
+mv $PKG/etc/shibboleth/sp-key.pem $PKG/etc/shibboleth/sp-key.pem.new
+mv $PKG/etc/shibboleth/sp-cert.pem $PKG/etc/shibboleth/sp-cert.pem.new
+
+mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/usr/doc/shibboleth-$VERSION $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/shibboleth-sp/shibboleth-sp.info b/network/shibboleth-sp/shibboleth-sp.info
new file mode 100644
index 0000000000..6ccd01af91
--- /dev/null
+++ b/network/shibboleth-sp/shibboleth-sp.info
@@ -0,0 +1,10 @@
+PRGNAM="shibboleth-sp"
+VERSION="2.5.1"
+HOMEPAGE="http://shibboleth.net/"
+DOWNLOAD="http://shibboleth.net/downloads/service-provider/2.5.1/shibboleth-sp-2.5.1.tar.gz"
+MD5SUM="5f57f14a9c9384c613572e4ba0f78f55"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="opensaml"
+MAINTAINER="Thibaut Notteboom"
+EMAIL="tib@tibux.org"
diff --git a/network/shibboleth-sp/slack-desc b/network/shibboleth-sp/slack-desc
new file mode 100644
index 0000000000..9657a4a986
--- /dev/null
+++ b/network/shibboleth-sp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+shibboleth-sp: shibboleth-sp (Shibboleth Service Provider)
+shibboleth-sp:
+shibboleth-sp: Shibboleth is a Web Single Sign-On implementations based on OpenSAML
+shibboleth-sp: that supports multiple protocols, federated identity, and the extensible
+shibboleth-sp: exchange of rich attributes subject to privacy controls.
+shibboleth-sp:
+shibboleth-sp: This package contains the Shibboleth Service Provider runtime libraries,
+shibboleth-sp: daemon, default plugins, and Apache module.
+shibboleth-sp:
+shibboleth-sp:
+shibboleth-sp: