aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorpyllyukko <pyllyukko@maimed.org>2014-10-26 15:51:34 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-10-30 20:27:25 +0700
commitb94336ff0c01fa5f7932bee19efb8c28cfe44ece (patch)
tree444ce8f7b0527075950c2c061bdf90469fa76b19 /network
parentd3e1cdea70e28c9e09031c89d6d1880e61c1391a (diff)
network/sks-keyserver: Added (OpenPGP keyserver).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/sks-keyserver/README14
-rw-r--r--network/sks-keyserver/doinst.sh25
-rw-r--r--network/sks-keyserver/rc.sks60
-rw-r--r--network/sks-keyserver/sks-keyserver.SlackBuild132
-rw-r--r--network/sks-keyserver/sks-keyserver.info12
-rw-r--r--network/sks-keyserver/slack-desc19
6 files changed, 262 insertions, 0 deletions
diff --git a/network/sks-keyserver/README b/network/sks-keyserver/README
new file mode 100644
index 0000000000000..f64ed9cf9ee10
--- /dev/null
+++ b/network/sks-keyserver/README
@@ -0,0 +1,14 @@
+SKS is an OpenPGP keyserver whose goal is to provide easy to deploy,
+decentralized, and highly reliable synchronization. That means that a key
+submitted to one SKS server will quickly be distributed to all key servers, and
+even wildly out-of-date servers, or servers that experience spotty
+connectivity, can fully synchronize with rest of the system.
+
+This SlackBuild will also verify the PGP signature of the package if the
+following conditions are met:
+
+- You have GnuPG installed
+- You have the appropriate public PGP key (0x41259773973A612A)
+ in your trustedkeys.gpg keyring
+- You have downloaded the sig file from
+ https://bitbucket.org/skskeyserver/sks-keyserver/downloads/sks-${VERSION}.tgz.asc
diff --git a/network/sks-keyserver/doinst.sh b/network/sks-keyserver/doinst.sh
new file mode 100644
index 0000000000000..63a9093e1ce91
--- /dev/null
+++ b/network/sks-keyserver/doinst.sh
@@ -0,0 +1,25 @@
+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.sks.new
diff --git a/network/sks-keyserver/rc.sks b/network/sks-keyserver/rc.sks
new file mode 100644
index 0000000000000..9869de049e58f
--- /dev/null
+++ b/network/sks-keyserver/rc.sks
@@ -0,0 +1,60 @@
+#************************************************************************#
+#* rc.sks - sample script to start and stop the SKS processes *#
+#* *#
+#* Copyright (C) 2011, 2012, 2013 John Clizbe *#
+#* *#
+#* This file is part of SKS. SKS is free software; you can *#
+#* redistribute it and/or modify it under the terms of the GNU General *#
+#* Public License as published by the Free Software Foundation; either *#
+#* version 2 of the License, or (at your option) any later version. *#
+#* *#
+#* This program is distributed in the hope that it will be useful, but *#
+#* WITHOUT ANY WARRANTY; without even the implied warranty of *#
+#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *#
+#* General Public License for more details. *#
+#* *#
+#* You should have received a copy of the GNU General Public License *#
+#* along with this program; if not, write to the Free Software *#
+#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *#
+#* USA or see <http://www.gnu.org/licenses/>. *#
+#************************************************************************#
+#
+#! /bin/sh
+#
+CLIENT=/usr/bin/sks
+DIR=/var/lib/sks
+STARTOPTS=
+#STARTOPTS will need to be in quotes if it has white space in it
+
+test -e $CLIENT || exit 0
+
+test -d $DIR || exit 0
+
+case "$1" in
+ start)
+ cd $DIR
+ echo -n "Starting SKS:"
+ echo -n \ sks_db
+ /bin/su -c "$CLIENT db" -s /bin/bash sks &
+ echo -n \ sks_recon
+ /bin/su -c "$CLIENT recon" -s /bin/bash sks &
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping SKS:"
+ killall sks
+ while [ "`pidof sks`" ]; do sleep 1; done # wait until SKS processes have exited
+ echo "."
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|reload|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/network/sks-keyserver/sks-keyserver.SlackBuild b/network/sks-keyserver/sks-keyserver.SlackBuild
new file mode 100644
index 0000000000000..d40a536eeae9c
--- /dev/null
+++ b/network/sks-keyserver/sks-keyserver.SlackBuild
@@ -0,0 +1,132 @@
+#!/bin/sh
+
+# Slackware build script for sks-keyserver
+
+# Copyright 2014 pyllyukko
+# 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=sks-keyserver
+VERSION=${VERSION:-1.1.5}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SKS_USER="sks"
+SKS_GROUP="sks"
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+bailout() {
+ echo " You must have a ${SKS_USER} user and ${SKS_GROUP} group to run this script."
+ echo " Something like this should suffice for most systems:"
+ echo " # groupadd -r ${SKS_GROUP} -g 295"
+ echo " # useradd -u 295 -g 295 -c \"SKS keyserver\" -d /var/lib/sks -r -M -e 1970-01-02 -s /sbin/nologin ${SKS_USER}"
+ exit 1
+}
+
+# Bail if user or group isn't valid on your system
+if ! getent passwd $SKS_USER 1>/dev/null 2>/dev/null; then
+ bailout;
+elif ! getent group $SKS_GROUP 1>/dev/null 2>/dev/null; then
+ bailout;
+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
+
+# The package can be verified with SKS Keyserver Signing Key (0x41259773973A612A)
+# If we have GPG installed, we try to verify the signature.
+if [ -x "/usr/bin/gpg" -a -x "/usr/bin/gpgv" ]
+then
+ set +e
+ # This will check if we have the correct key in our keyring.
+ # For the trustedkeys.gpg, see "man 1 gpgv".
+ /usr/bin/gpg --keyring trustedkeys.gpg --no-default-keyring --list-keys 0x41259773973A612A &>/dev/null
+ GPG_RET=${?}
+ # 2 means we don't have his key, 0 means we do.
+ set -e
+ # If we have the key and the signature file, we verify the package with GPG
+ if [ ${GPG_RET} -eq 0 -a \
+ -f "${CWD}/sks-${VERSION}.tgz.asc" ]
+ then
+ /usr/bin/gpgv "${CWD}/sks-${VERSION}.tgz.asc"
+ fi
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf sks-$VERSION
+tar xvf $CWD/sks-$VERSION.tgz
+cd sks-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+cp -v Makefile.local.unused Makefile.local
+
+make dep
+make all
+make install PREFIX=$PKG/usr MANDIR=$PKG/usr/man
+install -D -m 0644 ${CWD}/rc.sks $PKG/etc/rc.d/rc.sks.new
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ANNOUNCEMENT BUGS CHANGELOG FILES LICENSE README.md TODO UPGRADING VERSION \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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/sks-keyserver/sks-keyserver.info b/network/sks-keyserver/sks-keyserver.info
new file mode 100644
index 0000000000000..1a79de88619f7
--- /dev/null
+++ b/network/sks-keyserver/sks-keyserver.info
@@ -0,0 +1,12 @@
+PRGNAM="sks-keyserver"
+VERSION="1.1.5"
+HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver"
+DOWNLOAD="https://bitbucket.org/skskeyserver/sks-keyserver/downloads/sks-1.1.5.tgz \
+ https://bitbucket.org/skskeyserver/sks-keyserver/downloads/sks-1.1.5.tgz.asc"
+MD5SUM="60bb0ce429e5d223fd4662c286f46e7b \
+ 0975cabda0fd36034db8bfc143b23afe"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="ocaml db46"
+MAINTAINER="pyllyukko"
+EMAIL="pyllyukko AT maimed dot org"
diff --git a/network/sks-keyserver/slack-desc b/network/sks-keyserver/slack-desc
new file mode 100644
index 0000000000000..a5bc8922ee3e3
--- /dev/null
+++ b/network/sks-keyserver/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------------------------------------------------------|
+sks-keyserver: SKS keyserver (OpenPGP keyserver)
+sks-keyserver:
+sks-keyserver: SKS is an OpenPGP keyserver whose goal is to provide easy to deploy,
+sks-keyserver: decentralized, and highly reliable synchronization.
+sks-keyserver:
+sks-keyserver:
+sks-keyserver:
+sks-keyserver:
+sks-keyserver:
+sks-keyserver: Homepage: https://bitbucket.org/skskeyserver/sks-keyserver
+sks-keyserver: