Gentoo Archives: gentoo-commits

From: Kristian Fiskerstrand <k_f@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/sks/files/, net-misc/sks/
Date: Sat, 31 Oct 2015 13:25:57
Message-Id: 1446297916.06c7a2c09636cad16fe69eb8e1779d0c7269a0d9.k_f@gentoo
1 commit: 06c7a2c09636cad16fe69eb8e1779d0c7269a0d9
2 Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 31 13:24:56 2015 +0000
4 Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 31 13:25:16 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06c7a2c0
7
8 net-misc/sks: Revision bump, adding curve25519 encryption support
9
10 Upstream patch in issue
11 https://bitbucket.org/skskeyserver/sks-keyserver/issues/36/curve25519-oid-for-encryption
12 has been reviewed and is going for inclusion
13
14 Package-Manager: portage-2.2.20.1
15
16 net-misc/sks/files/sks-1.1.5-curve25519.patch | 11 +++
17 net-misc/sks/sks-1.1.5-r2.ebuild | 118 ++++++++++++++++++++++++++
18 2 files changed, 129 insertions(+)
19
20 diff --git a/net-misc/sks/files/sks-1.1.5-curve25519.patch b/net-misc/sks/files/sks-1.1.5-curve25519.patch
21 new file mode 100644
22 index 0000000..ccf484f
23 --- /dev/null
24 +++ b/net-misc/sks/files/sks-1.1.5-curve25519.patch
25 @@ -0,0 +1,11 @@
26 +diff -r 1a1b0b48e642 parsePGP.ml
27 +--- a/parsePGP.ml Tue May 26 12:21:29 2015 -0400
28 ++++ b/parsePGP.ml Tue Oct 13 14:46:03 2015 +0900
29 +@@ -151,6 +151,7 @@
30 + | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0d" -> 512 (* brainpoolP512r1 *)
31 + | "\x2b\x81\x04\x00\x0a" -> 256 (* secp256k1 *)
32 + | "\x2b\x06\x01\x04\x01\xda\x47\x0f\x01" -> 256 (* Ed25519 *)
33 ++ | "\x2b\x06\x01\x04\x01\x97\x55\x01\x05\x01" -> 256 (* cv25519 *)
34 + | _ -> failwith "Unknown OID"
35 + in
36 + psize
37
38 diff --git a/net-misc/sks/sks-1.1.5-r2.ebuild b/net-misc/sks/sks-1.1.5-r2.ebuild
39 new file mode 100644
40 index 0000000..4aa095c
41 --- /dev/null
42 +++ b/net-misc/sks/sks-1.1.5-r2.ebuild
43 @@ -0,0 +1,118 @@
44 +# Copyright 1999-2015 Gentoo Foundation
45 +# Distributed under the terms of the GNU General Public License v2
46 +# $Id$
47 +
48 +EAPI=5
49 +
50 +inherit multilib user readme.gentoo systemd
51 +
52 +DESCRIPTION="An OpenPGP keyserver which is decentralized and provides highly reliable synchronization"
53 +HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver"
54 +SRC_URI="https://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz"
55 +LICENSE="GPL-2"
56 +SLOT="0"
57 +KEYWORDS="~amd64 ~x86"
58 +IUSE="optimize test"
59 +DOC_CONTENTS="To get sks running, first build the database,
60 +start the databse, import atleast one key, then
61 +run a cleandb. See the sks man page for more information
62 +Typical DB_CONFIG file and sksconf has been installed
63 +in /var/lib/sks and can be used as templates by renaming
64 +to remove the .typical extension. The DB_CONFIG file has
65 +to be in place before doing the database build, or the BDB
66 +environment has to be manually cleared from both KDB and PTree.
67 +The same applies if you are upgrading to this version with an existing KDB/Ptree,
68 +using another version of BDB than 4.8; you need to clear the environment
69 +using e.g. db4.6_recover -h . and db4.6_checkpoint -1h . in both KDB and PTree
70 +Additionally a sample web interface has been installed as
71 +web.typical in /var/lib/sks that can be used by renaming it to web
72 +Important: It is strongly recommended to set up SKS behind a
73 +reverse proxy. Instructions on properly configuring SKS can be
74 +found at https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Peering"
75 +
76 +DEPEND="dev-lang/ocaml
77 + dev-ml/cryptokit
78 + sys-libs/db:4.8"
79 +RDEPEND="${DEPEND}"
80 +
81 +pkg_setup() {
82 + ebegin "Creating named group and user"
83 + enewgroup sks
84 + enewuser sks -1 -1 /var/lib/sks sks
85 +}
86 +
87 +src_prepare() {
88 + cp Makefile.local.unused Makefile.local || die
89 + sed -i \
90 + -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \
91 + -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db4.8/:g" \
92 + -e "s:^LIBDB=.*$:LIBDB=-ldb-4.8:g" \
93 + -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \
94 + -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \
95 + Makefile.local || die
96 + sed -i \
97 + -e 's:^CAMLINCLUDE= -I lib -I bdb$:CAMLINCLUDE= -I lib -I bdb -I +cryptokit:g' \
98 + -e 's:-Werror-implicit-function-declaration::g' \
99 + Makefile bdb/Makefile || die
100 + sed -i \
101 + -e 's:/usr/sbin/sks:/usr/bin/sks:g' \
102 + sks_build.sh || die
103 +
104 + epatch "${FILESDIR}/${P}-eddsa.patch"
105 + epatch "${FILESDIR}/${P}-disable-warn-error-a.patch"
106 + epatch "${FILESDIR}/${P}-curve25519.patch"
107 +}
108 +
109 +src_compile() {
110 + emake dep
111 + # sks build fails with paralell build in module Bdb
112 + emake -j1 all
113 + if use optimize; then
114 + emake all.bc
115 + fi
116 +}
117 +
118 +src_test() {
119 + ./sks unit_test || die
120 +}
121 +
122 +src_install() {
123 + if use optimize; then
124 + emake install.bc
125 + dosym /usr/bin/sks.bc usr/bin/sks
126 + dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail
127 + else
128 + emake install
129 + fi
130 +
131 + dodoc README.md
132 +
133 + newinitd "${FILESDIR}/sks-db.initd" sks-db
134 + newinitd "${FILESDIR}/sks-recon.initd" sks-recon
135 + newconfd "${FILESDIR}/sks.confd" sks
136 + systemd_dounit "${FILESDIR}"/sks-db.service
137 + systemd_dounit "${FILESDIR}"/sks-recon.service
138 +
139 + dodir "/var/lib/sks/web.typical"
140 + insinto /var/lib/sks
141 + newins sampleConfig/DB_CONFIG DB_CONFIG.typical
142 + newins sampleConfig/sksconf.typical sksconf.typical
143 + insinto /var/lib/sks/web.typical
144 + doins sampleWeb/HTML5/*
145 +
146 + keepdir /var/lib/sks
147 + readme.gentoo_create_doc
148 +}
149 +
150 +pkg_postinst() {
151 + readme.gentoo_print_elog
152 +
153 + if [[ -n ${REPLACING_VERSIONS} ]]; then
154 + einfo "Note when upgrading from versions of SKS earlier than 1.1.4"
155 + einfo "The default values for pagesize settings have changed. To continue"
156 + einfo "using an existing DB without rebuilding, explicit settings have to be"
157 + einfo "added to the sksconf file."
158 + einfo "pagesize: 4"
159 + einfo "ptree_pagesize: 1"
160 + fi;
161 +}