summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2013-11-22 02:35:45 +0000
committerManuel Rüger <mrueg@gentoo.org>2013-11-22 02:35:45 +0000
commitc7de71d007704c12bcfac58b7d696db47e17933d (patch)
tree4405e0ee2ebaeaf20d0372b36307d1f94be69f4c /net-misc
parentInitial ebuild. (diff)
downloadgentoo-2-c7de71d007704c12bcfac58b7d696db47e17933d.tar.gz
gentoo-2-c7de71d007704c12bcfac58b7d696db47e17933d.tar.bz2
gentoo-2-c7de71d007704c12bcfac58b7d696db47e17933d.zip
Version bump. Add initd scripts and systemd unit files by Emery Hemingway. Fixes bug #427030. Add Kristian Fiskerstrand as maintainer and proxy-maintainers as herd.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key )
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/sks/ChangeLog14
-rw-r--r--net-misc/sks/files/sks-1.1.4-ECC_OID_fix_x86.patch34
-rw-r--r--net-misc/sks/files/sks-db.initd25
-rw-r--r--net-misc/sks/files/sks-db.service11
-rw-r--r--net-misc/sks/files/sks-recon.initd26
-rw-r--r--net-misc/sks/files/sks-recon.service11
-rw-r--r--net-misc/sks/files/sks.confd4
-rw-r--r--net-misc/sks/metadata.xml12
-rw-r--r--net-misc/sks/sks-1.1.4.ebuild115
9 files changed, 248 insertions, 4 deletions
diff --git a/net-misc/sks/ChangeLog b/net-misc/sks/ChangeLog
index 9b9ca66e85f5..42ff1e7f47a6 100644
--- a/net-misc/sks/ChangeLog
+++ b/net-misc/sks/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-misc/sks
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/sks/ChangeLog,v 1.6 2012/12/20 21:28:08 pacho Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/sks/ChangeLog,v 1.7 2013/11/22 02:35:45 mrueg Exp $
+
+*sks-1.1.4 (22 Nov 2013)
+
+ 22 Nov 2013; Manuel Rüger <mrueg@gentoo.org>
+ +files/sks-1.1.4-ECC_OID_fix_x86.patch, +files/sks-db.initd,
+ +files/sks-db.service, +files/sks-recon.initd, +files/sks-recon.service,
+ +files/sks.confd, +sks-1.1.4.ebuild, metadata.xml:
+ Version bump. Add initd scripts and systemd unit files by Emery Hemingway.
+ Fixes bug #427030. Add Kristian Fiskerstrand as maintainer and proxy-
+ maintainers as herd.
20 Dec 2012; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Drop maintainer as talked with him
diff --git a/net-misc/sks/files/sks-1.1.4-ECC_OID_fix_x86.patch b/net-misc/sks/files/sks-1.1.4-ECC_OID_fix_x86.patch
new file mode 100644
index 000000000000..30315cef69c7
--- /dev/null
+++ b/net-misc/sks/files/sks-1.1.4-ECC_OID_fix_x86.patch
@@ -0,0 +1,34 @@
+diff -r a4fab18949f0 -r 0374b3dbc4ae dbserver.ml
+--- a/dbserver.ml Fri Jan 25 18:16:13 2013 -0600
++++ b/dbserver.ml Tue Apr 16 15:36:36 2013 -0500
+@@ -293,8 +293,8 @@
+ let keys = lookup_keys request.search in
+ let count = List.length keys in
+ let keys = truncate request.limit keys in
++ let keys = clean_keys request keys in
+ let hashes = List.map ~f:KeyHash.hash keys in
+- let keys = clean_keys request keys in
+ if request.machine_readable then
+ ("text/plain",
+ count,
+diff -r a4fab18949f0 -r 0374b3dbc4ae parsePGP.ml
+--- a/parsePGP.ml Fri Jan 25 18:16:13 2013 -0600
++++ b/parsePGP.ml Tue Apr 16 15:36:36 2013 -0500
+@@ -153,7 +153,7 @@
+
+ let parse_ecdh_pubkey cin =
+ let length = cin#read_int_size 1 in
+- let oid = sprintf "%x" (cin#read_int_size length) in
++ let oid = sprintf "%Lx" (cin#read_int64_size length) in
+ let mpi = read_mpi cin in
+ let kdf_length = cin#read_int_size 1 in
+ let kdf_res = cin#read_int_size 1 in
+@@ -166,7 +166,7 @@
+
+ let parse_ecdsa_pubkey cin =
+ let length = cin#read_int_size 1 in
+- let oid = sprintf "%x" (cin#read_int_size length) in
++ let oid = sprintf "%Lx" (cin#read_int64_size length) in
+ let psize = oid_to_psize oid
+ in
+ psize
diff --git a/net-misc/sks/files/sks-db.initd b/net-misc/sks/files/sks-db.initd
new file mode 100644
index 000000000000..93f1561d7eb1
--- /dev/null
+++ b/net-misc/sks/files/sks-db.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+source /etc/conf.d/sks
+
+command=/usr/bin/sks
+command_args="db ${SKS_ARGS}"
+command_background=1
+description="SKS database thread"
+name="SKS db"
+pidfile="/var/run/sks-db.pid"
+required_files="${SKS_DIR}/sksconf"
+start_stop_daemon_args="--chdir ${SKS_DIR} --user sks"
+
+
+depend()
+{
+ use net
+}
+
+start_pre()
+{
+ checkpath --owner sks:sks --directory \
+ ${SKS_DIR} ${SKS_DIR}/KDB ${SKS_DIR}/PTree
+ checkpath --owner sks:sks --file \
+ ${SKS_DIR}/*.log ${SKS_DIR}/KDB/* ${SKS_DIR}/PTree/*
+}
diff --git a/net-misc/sks/files/sks-db.service b/net-misc/sks/files/sks-db.service
new file mode 100644
index 000000000000..bbc3ba7e2b2d
--- /dev/null
+++ b/net-misc/sks/files/sks-db.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SKS database thread
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/sks db
+User=sks
+WorkingDirectory=/var/lib/sks
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/sks/files/sks-recon.initd b/net-misc/sks/files/sks-recon.initd
new file mode 100644
index 000000000000..be44cb7e3cf7
--- /dev/null
+++ b/net-misc/sks/files/sks-recon.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+source /etc/conf.d/sks
+
+command=/usr/bin/sks
+command_args="recon ${SKS_ARGS}"
+command_background=1
+description="Reconnoiters SKS peers for keys"
+name="SKS recon"
+pidfile="/var/run/sks-recon.pid"
+required_files="${SKS_DIR}/sksconf ${SKS_DIR}/membership"
+start_stop_daemon_args="--chdir ${SKS_DIR} --user sks"
+
+
+depend()
+{
+ after sks-db
+ use net
+}
+
+start_pre()
+{
+ checkpath --owner sks:sks --directory \
+ ${SKS_DIR} ${SKS_DIR}/KDB ${SKS_DIR}/PTree
+ checkpath --owner sks:sks --file \
+ ${SKS_DIR}/*.log ${SKS_DIR}/KDB/* ${SKS_DIR}/PTree/*
+}
diff --git a/net-misc/sks/files/sks-recon.service b/net-misc/sks/files/sks-recon.service
new file mode 100644
index 000000000000..97ee52ffc0ed
--- /dev/null
+++ b/net-misc/sks/files/sks-recon.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SKS key reconnaissance thread
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/sks recon
+User=sks
+WorkingDirectory=/var/lib/sks
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/sks/files/sks.confd b/net-misc/sks/files/sks.confd
new file mode 100644
index 000000000000..64eef24ecc52
--- /dev/null
+++ b/net-misc/sks/files/sks.confd
@@ -0,0 +1,4 @@
+SKS_DIR="/var/lib/sks"
+
+# Set common options for sks db and sks recon here.
+SKS_ARGS="" \ No newline at end of file
diff --git a/net-misc/sks/metadata.xml b/net-misc/sks/metadata.xml
index b8b9d5233b6e..abe2e746f4f6 100644
--- a/net-misc/sks/metadata.xml
+++ b/net-misc/sks/metadata.xml
@@ -1,13 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+ <herd>proxy-maintainers</herd>
<maintainer>
- <email>maintainer-needed@gentoo.org</email>
+ <email>kf@sumptuouscapital.com</email>
+ <name>Kristian Fiskerstrand</name>
+ <description>Maintainer, assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ <description>Proxy-Maintainer, CC him on bugs</description>
</maintainer>
<use>
<flag name="optimize">Enables bytecode optimization</flag>
</use>
<upstream>
- <remote-id type="google-code">sks-keyserver</remote-id>
+ <remote-id type="bitbucket">skskeyserver/sks-keyserver</remote-id>
</upstream>
</pkgmetadata>
diff --git a/net-misc/sks/sks-1.1.4.ebuild b/net-misc/sks/sks-1.1.4.ebuild
new file mode 100644
index 000000000000..ea74c2b9a661
--- /dev/null
+++ b/net-misc/sks/sks-1.1.4.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/sks/sks-1.1.4.ebuild,v 1.1 2013/11/22 02:35:45 mrueg Exp $
+
+EAPI=5
+
+inherit eutils multilib user readme.gentoo systemd
+
+DESCRIPTION="An OpenPGP keyserver which is decentralized and provides highly reliable synchronization"
+HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver"
+SRC_URI="http://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="optimize test"
+DOC_CONTENTS="To get sks running, first build the database,
+start the databse, import atleast one key, then
+run a cleandb. See the sks man page for more information
+Typical DB_CONFIG file and sksconf has been installed
+in /var/lib/sks and can be used as templates by renaming
+to remove the .typical extension. The DB_CONFIG file has
+to be in place before doing the database build, or the BDB
+environment has to be manually cleared from both KDB and PTree.
+The same applies if you are upgrading to this version with an existing KDB/Ptree,
+using another version of BDB than 4.8; you need to clear the environment
+using e.g. db4.6_recover -h . and db4.6_checkpoint -1h . in both KDB and PTree
+Additionally a sample web interface has been installed as
+web.typical in /var/lib/sks that can be used by renaming it to web
+Important: It is strongly recommended to set up SKS behind a
+reverse proxy. Instructions on properly configuring SKS can be
+found at https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Peering"
+
+DEPEND="dev-lang/ocaml
+ dev-ml/cryptokit
+ sys-libs/db:4.8"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup sks
+ enewuser sks -1 -1 /var/lib/sks sks
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-ECC_OID_fix_x86.patch"
+
+ cp Makefile.local.unused Makefile.local || die
+ sed -i \
+ -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \
+ -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db4.8/:g" \
+ -e "s:^LIBDB=.*$:LIBDB=-ldb-4.8:g" \
+ -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \
+ -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \
+ Makefile.local || die
+ sed -i \
+ -e 's:^CAMLINCLUDE= -I lib -I bdb$:CAMLINCLUDE= -I lib -I bdb -I +cryptokit:g' \
+ -e 's:-Werror-implicit-function-declaration::g' \
+ Makefile bdb/Makefile || die
+ sed -i \
+ -e 's:/usr/sbin/sks:/usr/bin/sks:g' \
+ sks_build.sh || die
+}
+
+src_compile() {
+ emake dep
+ # sks build fails with paralell build in module Bdb
+ emake -j1 all
+ if use optimize; then
+ emake all.bc
+ fi
+}
+
+src_test() {
+ ./sks unit_test || die
+}
+
+src_install() {
+ if use optimize; then
+ emake install.bc
+ dosym /usr/bin/sks.bc usr/bin/sks
+ dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail
+ else
+ emake install
+ fi
+
+ dodoc README.md
+
+ newinitd "${FILESDIR}/sks-db.initd" sks-db
+ newinitd "${FILESDIR}/sks-recon.initd" sks-recon
+ newconfd "${FILESDIR}/sks.confd" sks
+ systemd_dounit "${FILESDIR}/sks-db.service"
+ systemd_dounit "${FILESDIR}/sks-recon.service"
+
+ dodir "/var/lib/sks/web.typical"
+ insinto /var/lib/sks
+ newins sampleConfig/DB_CONFIG DB_CONFIG.typical
+ newins sampleConfig/sksconf.typical sksconf.typical
+ insinto /var/lib/sks/web.typical
+ doins sampleWeb/HTML5/*
+
+ keepdir /var/lib/sks
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ einfo "Note when upgrading from earlier versions of SKS"
+ einfo "The default values for pagesize settings have changed. To continue"
+ einfo "using an existing DB without rebuilding, explicit settings have to be"
+ einfo "added to the sksconf file."
+ einfo "pagesize: 4"
+ einfo "ptree_pagesize: 1"
+ fi;
+}