|
|
@@ -0,0 +1,149 @@
|
|
|
+##
|
|
|
+## sks.spec -- OpenPKG RPM Package Specification
|
|
|
+## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
|
|
|
+## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
|
|
|
+##
|
|
|
+## Permission to use, copy, modify, and distribute this software for
|
|
|
+## any purpose with or without fee is hereby granted, provided that
|
|
|
+## the above copyright notice and this permission notice appear in all
|
|
|
+## copies.
|
|
|
+##
|
|
|
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
+## CONTRIBUTORS 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.
|
|
|
+##
|
|
|
+
|
|
|
+# package information
|
|
|
+Name: sks
|
|
|
+Summary: OpenPGP Key Server
|
|
|
+URL: http://www.nongnu.org/sks/
|
|
|
+Vendor: Yaron Minsky
|
|
|
+Packager: OpenPKG Foundation e.V.
|
|
|
+Distribution: OpenPKG Community
|
|
|
+Class: EVAL
|
|
|
+Group: Cryptography
|
|
|
+License: GPL
|
|
|
+Version: 1.0.10
|
|
|
+Release: 20061101
|
|
|
+
|
|
|
+# list of sources
|
|
|
+Source0: http://download.savannah.gnu.org/releases/sks/sks-%{version}.tgz
|
|
|
+Source1: rc.sks
|
|
|
+Source2: sks-setup
|
|
|
+Source3: sks-load
|
|
|
+Source4: sks.html
|
|
|
+Patch0: sks.patch
|
|
|
+
|
|
|
+# build information
|
|
|
+Prefix: %{l_prefix}
|
|
|
+BuildRoot: %{l_buildroot}
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20040130, ocaml, gcc, make, perl
|
|
|
+PreReq: OpenPKG, openpkg >= 20040130
|
|
|
+BuildPreReq: db
|
|
|
+PreReq: db
|
|
|
+AutoReq: no
|
|
|
+AutoReqProv: no
|
|
|
+
|
|
|
+%description
|
|
|
+ SKS is a new 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.
|
|
|
+
|
|
|
+ SKS uses a highly efficient and reliable reconciliation algorithm;
|
|
|
+ follows RFC2440 and RFC2440bis carefully, supports (unlike PKS)
|
|
|
+ new and old style packets, photoID packets, multiple subkeys, and
|
|
|
+ pretty much everything allowed by the RFCs; is fully compatible with
|
|
|
+ the PKS system (can both send and receive syncs from PKS servers,
|
|
|
+ ensuring seamless connectivity), provides a simple configuration:
|
|
|
+ each host just needs a (partial) list of the other participating key
|
|
|
+ servers; and supports HKP/web-based querying.
|
|
|
+
|
|
|
+%track
|
|
|
+ prog sks = {
|
|
|
+ version = %{version}
|
|
|
+ url = http://download.savannah.gnu.org/releases/sks/
|
|
|
+ regex = sks-(__VER__)\.tgz
|
|
|
+ }
|
|
|
+
|
|
|
+%prep
|
|
|
+ %setup -q
|
|
|
+ %patch -p0
|
|
|
+
|
|
|
+%build
|
|
|
+ %{l_make} %{l_mflags} \
|
|
|
+ BDBINCLUDE="%{l_cppflags}" \
|
|
|
+ BDBLIB="%{l_ldflags}" \
|
|
|
+ LIBDB="-ldb" \
|
|
|
+ MANDIR="%{l_prefix}/man"
|
|
|
+
|
|
|
+%install
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/sks \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/var/sks
|
|
|
+ %{l_shtool} install -c -s -m 755 \
|
|
|
+ sks sks_add_mail $RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
+ %{SOURCE sks-setup} %{SOURCE sks-load} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;/bin/bash;%{l_bash};g' \
|
|
|
+ -e 's; sks ; %{l_prefix}/sbin/sks ;g' \
|
|
|
+ sks_build.sh $RPM_BUILD_ROOT%{l_prefix}/sbin/sks_build
|
|
|
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
+ %{SOURCE rc.sks} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
+ %{SOURCE sks.html} $RPM_BUILD_ROOT%{l_prefix}/share/sks/
|
|
|
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
+ %{l_files_std} \
|
|
|
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sks'
|
|
|
+
|
|
|
+%files -f files
|
|
|
+
|
|
|
+%clean
|
|
|
+ rm -rf $RPM_BUILD_ROOT
|
|
|
+
|
|
|
+%post
|
|
|
+ # on initial install, create database
|
|
|
+ if [ $1 -eq 1 ]; then
|
|
|
+ su %{l_rusr} -c "$RPM_INSTALL_PREFIX/sbin/sks-setup"
|
|
|
+ ( echo "SKS database initialized. Now you can startup SKS with"
|
|
|
+ echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc sks start"
|
|
|
+ echo "and for instance lookup the OpenPKG OpenPGP keys under"
|
|
|
+ echo " http://localhost:11371/pks/lookup?op=index&search=openpkg"
|
|
|
+ echo "or access the SKS internal statistic page under"
|
|
|
+ echo " http://localhost:11371/pks/lookup?op=stats"
|
|
|
+ echo "If you want to load a full dump of all keys in the existing"
|
|
|
+ echo "SKS key servers, run the following command to download and"
|
|
|
+ echo "merge all their latest dumps into your local database:"
|
|
|
+ echo " su %{l_rusr} -c $RPM_INSTALL_PREFIX/sbin/sks-load"
|
|
|
+ ) | %{l_rpmtool} msg -b -t notice
|
|
|
+ fi
|
|
|
+
|
|
|
+ # after upgrade, restart service
|
|
|
+ [ $1 -eq 2 ] || exit 0
|
|
|
+ eval `%{l_rc} sks status 2>/dev/null`
|
|
|
+ [ ".$sks_active" = .yes ] && %{l_rc} sks restart
|
|
|
+ exit 0
|
|
|
+
|
|
|
+%preun
|
|
|
+ # before erase, stop service and remove log files
|
|
|
+ [ $1 -eq 0 ] || exit 0
|
|
|
+ %{l_rc} sks stop 2>/dev/null
|
|
|
+ rm -rf $RPM_INSTALL_PREFIX/var/sks/* >/dev/null 2>&1 || true
|
|
|
+ exit 0
|
|
|
+
|