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/
Date: Sat, 08 Jul 2017 15:48:55
Message-Id: 1499528922.59d13589498eab0111ea397d3d09b3e1f3410cb5.k_f@gentoo
1 commit: 59d13589498eab0111ea397d3d09b3e1f3410cb5
2 Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 8 15:47:46 2017 +0000
4 Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 8 15:48:42 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59d13589
7
8 net-misc/sks: Add slot operator on ocaml
9
10 Since resulting binary is static linked with ocaml we need a subslot dep in order to ensure rebuild to pick up security upgrades etc
11
12 straight to stable bump
13
14 Package-Manager: Portage-2.3.6, Repoman-2.3.1
15 RepoMan-Options: --force
16
17 net-misc/sks/sks-1.1.6-r2.ebuild | 117 +++++++++++++++++++++++++++++++++++++++
18 1 file changed, 117 insertions(+)
19
20 diff --git a/net-misc/sks/sks-1.1.6-r2.ebuild b/net-misc/sks/sks-1.1.6-r2.ebuild
21 new file mode 100644
22 index 00000000000..b51abaff413
23 --- /dev/null
24 +++ b/net-misc/sks/sks-1.1.6-r2.ebuild
25 @@ -0,0 +1,117 @@
26 +# Copyright 1999-2017 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=6
30 +
31 +inherit multilib user readme.gentoo-r1 systemd
32 +
33 +DESCRIPTION="An OpenPGP keyserver which is decentralized with highly reliable synchronization"
34 +HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver"
35 +SRC_URI="https://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz"
36 +LICENSE="GPL-2"
37 +SLOT="0"
38 +KEYWORDS="amd64 ~x86"
39 +IUSE="optimize test"
40 +DOC_CONTENTS="To get sks running, first build the database,
41 +start the database, import atleast one key, then
42 +run a cleandb. See the sks man page for more information
43 +Typical DB_CONFIG file and sksconf has been installed
44 +in /var/lib/sks and can be used as templates by renaming
45 +to remove the .typical extension. The DB_CONFIG file has
46 +to be in place before doing the database build, or the BDB
47 +environment has to be manually cleared from both KDB and PTree.
48 +The same applies if you are upgrading to this version with an existing KDB/Ptree,
49 +using another version of BDB than 4.8; you need to clear the environment
50 +using e.g. db4.6_recover -h . and db4.6_checkpoint -1h . in both KDB and PTree
51 +Additionally a sample web interface has been installed as
52 +web.typical in /var/lib/sks that can be used by renaming it to web
53 +Important: It is strongly recommended to set up SKS behind a
54 +reverse proxy. Instructions on properly configuring SKS can be
55 +found at https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Peering"
56 +
57 +DEPEND=">=dev-lang/ocaml-4.0:=
58 + dev-ml/findlib
59 + dev-ml/camlp4
60 + dev-ml/cryptokit:0/1.10
61 + sys-libs/db:5.3"
62 +RDEPEND="${DEPEND}"
63 +
64 +pkg_setup() {
65 + ebegin "Creating named group and user"
66 + enewgroup sks
67 + enewuser sks -1 -1 /var/lib/sks sks
68 +}
69 +
70 +src_prepare() {
71 + eapply "${FILESDIR}/${P}-unbundle-cryptokit.patch"
72 + cp Makefile.local.unused Makefile.local || die
73 + sed -i \
74 + -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \
75 + -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db5.3/:g" \
76 + -e "s:^LIBDB=.*$:LIBDB=-ldb-5.3:g" \
77 + -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \
78 + -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \
79 + Makefile.local || die
80 + sed -i \
81 + -e 's:^CAMLINCLUDE= -I lib -I bdb$:CAMLINCLUDE= -I lib -I bdb -I +cryptokit:g' \
82 + -e 's:-Werror-implicit-function-declaration::g' \
83 + Makefile bdb/Makefile || die
84 + sed -i \
85 + -e 's:/usr/sbin/sks:/usr/bin/sks:g' \
86 + sks_build.sh || die
87 + eapply_user
88 +}
89 +
90 +src_compile() {
91 + emake dep
92 + # sks build fails with paralell build in module Bdb
93 + emake -j1 all
94 + if use optimize; then
95 + emake all.bc
96 + fi
97 +}
98 +
99 +src_test() {
100 + ./sks unit_test || die
101 +}
102 +
103 +src_install() {
104 + if use optimize; then
105 + emake install.bc
106 + dosym /usr/bin/sks.bc usr/bin/sks
107 + dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail
108 + else
109 + emake install
110 + fi
111 +
112 + dodoc README.md
113 +
114 + newinitd "${FILESDIR}/sks-db.initd" sks-db
115 + newinitd "${FILESDIR}/sks-recon.initd" sks-recon
116 + newconfd "${FILESDIR}/sks.confd" sks
117 + systemd_dounit "${FILESDIR}"/sks-db.service
118 + systemd_dounit "${FILESDIR}"/sks-recon.service
119 +
120 + dodir "/var/lib/sks/web.typical"
121 + insinto /var/lib/sks
122 + newins sampleConfig/DB_CONFIG DB_CONFIG.typical
123 + newins sampleConfig/sksconf.typical sksconf.typical
124 + insinto /var/lib/sks/web.typical
125 + doins sampleWeb/HTML5/*
126 +
127 + keepdir /var/lib/sks
128 + readme.gentoo_create_doc
129 +}
130 +
131 +pkg_postinst() {
132 + readme.gentoo_print_elog
133 +
134 + if [[ -n ${REPLACING_VERSIONS} ]]; then
135 + einfo "Note when upgrading from versions of SKS earlier than 1.1.4"
136 + einfo "The default values for pagesize settings have changed. To continue"
137 + einfo "using an existing DB without rebuilding, explicit settings have to be"
138 + einfo "added to the sksconf file."
139 + einfo "pagesize: 4"
140 + einfo "ptree_pagesize: 1"
141 + fi;
142 +}