1 |
commit: 5572206ce66a7efca524f9ac45221ddbda28e185 |
2 |
Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 9 19:10:49 2017 +0000 |
4 |
Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 9 19:11:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5572206c |
7 |
|
8 |
net-misc/sks: backport a few additional fixes from upstream |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
11 |
|
12 |
net-misc/sks/files/sks-1.1.6-use-ocamlfind2.patch | 19 ++++ |
13 |
net-misc/sks/files/sks-1.1.6-use-ocamlfind3.patch | 21 ++++ |
14 |
net-misc/sks/sks-1.1.6-r5.ebuild | 118 ++++++++++++++++++++++ |
15 |
3 files changed, 158 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/sks/files/sks-1.1.6-use-ocamlfind2.patch b/net-misc/sks/files/sks-1.1.6-use-ocamlfind2.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..1fba250fd4b |
20 |
--- /dev/null |
21 |
+++ b/net-misc/sks/files/sks-1.1.6-use-ocamlfind2.patch |
22 |
@@ -0,0 +1,19 @@ |
23 |
+# HG changeset patch |
24 |
+# User Kristian Fiskerstrand <kf@××××××××××××××××.com> |
25 |
+# Date 1499610580 -7200 |
26 |
+# Node ID 719ffdf628a81a2f052f3b6dc746a3e1d37afe30 |
27 |
+# Parent 6352f0dbcadf35aac29c2fbf10fb218ae50d9c77 |
28 |
+Fix nums specification |
29 |
+ |
30 |
+diff --git a/Makefile b/Makefile |
31 |
+--- a/Makefile |
32 |
++++ b/Makefile |
33 |
+@@ -56,7 +56,7 @@ |
34 |
+ CAMLINCLUDE= -package cryptokit,unix,str,bigarray -I lib -I bdb |
35 |
+ COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) $(CAMLLDFLAGS) -ccopt -Lbdb -dtypes $(WARNERR) |
36 |
+ OCAMLDEP=ocamldep $(CAMLP4) |
37 |
+-CAMLLIBS=bdb.cma nums.cma |
38 |
++CAMLLIBS=bdb.cma |
39 |
+ OCAMLFLAGS=$(COMMONCAMLFLAGS) -linkpkg -g $(CAMLLIBS) |
40 |
+ OCAMLOPTFLAGS=$(COMMONCAMLFLAGS) -linkpkg -inline 40 $(CAMLLIBS:.cma=.cmxa) |
41 |
+ |
42 |
|
43 |
diff --git a/net-misc/sks/files/sks-1.1.6-use-ocamlfind3.patch b/net-misc/sks/files/sks-1.1.6-use-ocamlfind3.patch |
44 |
new file mode 100644 |
45 |
index 00000000000..ea5a82db653 |
46 |
--- /dev/null |
47 |
+++ b/net-misc/sks/files/sks-1.1.6-use-ocamlfind3.patch |
48 |
@@ -0,0 +1,21 @@ |
49 |
+# HG changeset patch |
50 |
+# User Kristian Fiskerstrand <kf@××××××××××××××××.com> |
51 |
+# Date 1499612080 -7200 |
52 |
+# Node ID 0106ba2f6abc8ee2f685026d3f218730114a60fa |
53 |
+# Parent 719ffdf628a81a2f052f3b6dc746a3e1d37afe30 |
54 |
+Add num to findlib packages |
55 |
+ |
56 |
+Although nums is detected, making this explicit |
57 |
+ |
58 |
+diff --git a/Makefile b/Makefile |
59 |
+--- a/Makefile |
60 |
++++ b/Makefile |
61 |
+@@ -53,7 +53,7 @@ |
62 |
+ endif |
63 |
+ |
64 |
+ CAMLP4=-pp $(CAMLP4O) |
65 |
+-CAMLINCLUDE= -package cryptokit,unix,str,bigarray -I lib -I bdb |
66 |
++CAMLINCLUDE= -package cryptokit,unix,str,bigarray,num -I lib -I bdb |
67 |
+ COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) $(CAMLLDFLAGS) -ccopt -Lbdb -dtypes $(WARNERR) |
68 |
+ OCAMLDEP=ocamldep $(CAMLP4) |
69 |
+ CAMLLIBS=bdb.cma |
70 |
|
71 |
diff --git a/net-misc/sks/sks-1.1.6-r5.ebuild b/net-misc/sks/sks-1.1.6-r5.ebuild |
72 |
new file mode 100644 |
73 |
index 00000000000..3ca116dbae9 |
74 |
--- /dev/null |
75 |
+++ b/net-misc/sks/sks-1.1.6-r5.ebuild |
76 |
@@ -0,0 +1,118 @@ |
77 |
+# Copyright 1999-2017 Gentoo Foundation |
78 |
+# Distributed under the terms of the GNU General Public License v2 |
79 |
+ |
80 |
+EAPI=6 |
81 |
+ |
82 |
+inherit multilib user readme.gentoo-r1 systemd |
83 |
+ |
84 |
+DESCRIPTION="An OpenPGP keyserver which is decentralized with highly reliable synchronization" |
85 |
+HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver" |
86 |
+SRC_URI="https://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz" |
87 |
+LICENSE="GPL-2" |
88 |
+SLOT="0" |
89 |
+KEYWORDS="~amd64 ~x86" |
90 |
+IUSE="optimize test" |
91 |
+DOC_CONTENTS="To get sks running, first build the database, |
92 |
+start the database, import atleast one key, then |
93 |
+run a cleandb. See the sks man page for more information |
94 |
+Typical DB_CONFIG file and sksconf has been installed |
95 |
+in /var/lib/sks and can be used as templates by renaming |
96 |
+to remove the .typical extension. The DB_CONFIG file has |
97 |
+to be in place before doing the database build, or the BDB |
98 |
+environment has to be manually cleared from both KDB and PTree. |
99 |
+The same applies if you are upgrading to this version with an existing KDB/Ptree, |
100 |
+using another version of BDB than 4.8; you need to clear the environment |
101 |
+using e.g. db4.6_recover -h . and db4.6_checkpoint -1h . in both KDB and PTree |
102 |
+Additionally a sample web interface has been installed as |
103 |
+web.typical in /var/lib/sks that can be used by renaming it to web |
104 |
+Important: It is strongly recommended to set up SKS behind a |
105 |
+reverse proxy. Instructions on properly configuring SKS can be |
106 |
+found at https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Peering" |
107 |
+ |
108 |
+RDEPEND=">=dev-lang/ocaml-4.0:= |
109 |
+ dev-ml/camlp4:= |
110 |
+ dev-ml/cryptokit:= |
111 |
+ sys-libs/db:5.3" |
112 |
+DEPEND="${RDEPEND} |
113 |
+ dev-ml/findlib" |
114 |
+ |
115 |
+pkg_setup() { |
116 |
+ ebegin "Creating named group and user" |
117 |
+ enewgroup sks |
118 |
+ enewuser sks -1 -1 /var/lib/sks sks |
119 |
+} |
120 |
+ |
121 |
+src_prepare() { |
122 |
+ eapply "${FILESDIR}/${P}-unbundle-cryptokit.patch" \ |
123 |
+ "${FILESDIR}/${P}-use-ocamlfind.patch" \ |
124 |
+ "${FILESDIR}/${P}-use-ocamlfind2.patch" \ |
125 |
+ "${FILESDIR}/${P}-use-ocamlfind3.patch" |
126 |
+ |
127 |
+ |
128 |
+ cp Makefile.local.unused Makefile.local || die |
129 |
+ sed -i \ |
130 |
+ -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \ |
131 |
+ -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db5.3/:g" \ |
132 |
+ -e "s:^LIBDB=.*$:LIBDB=-ldb-5.3:g" \ |
133 |
+ -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \ |
134 |
+ -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \ |
135 |
+ Makefile.local || die |
136 |
+ sed -i \ |
137 |
+ -e 's:/usr/sbin/sks:/usr/bin/sks:g' \ |
138 |
+ sks_build.sh || die |
139 |
+ eapply_user |
140 |
+} |
141 |
+ |
142 |
+src_compile() { |
143 |
+ emake dep |
144 |
+ # sks build fails with paralell build in module Bdb |
145 |
+ emake -j1 all |
146 |
+ if use optimize; then |
147 |
+ emake all.bc |
148 |
+ fi |
149 |
+} |
150 |
+ |
151 |
+src_test() { |
152 |
+ ./sks unit_test || die |
153 |
+} |
154 |
+ |
155 |
+src_install() { |
156 |
+ if use optimize; then |
157 |
+ emake install.bc |
158 |
+ dosym /usr/bin/sks.bc usr/bin/sks |
159 |
+ dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail |
160 |
+ else |
161 |
+ emake install |
162 |
+ fi |
163 |
+ |
164 |
+ dodoc README.md |
165 |
+ |
166 |
+ newinitd "${FILESDIR}/sks-db.initd" sks-db |
167 |
+ newinitd "${FILESDIR}/sks-recon.initd" sks-recon |
168 |
+ newconfd "${FILESDIR}/sks.confd" sks |
169 |
+ systemd_dounit "${FILESDIR}"/sks-db.service |
170 |
+ systemd_dounit "${FILESDIR}"/sks-recon.service |
171 |
+ |
172 |
+ dodir "/var/lib/sks/web.typical" |
173 |
+ insinto /var/lib/sks |
174 |
+ newins sampleConfig/DB_CONFIG DB_CONFIG.typical |
175 |
+ newins sampleConfig/sksconf.typical sksconf.typical |
176 |
+ insinto /var/lib/sks/web.typical |
177 |
+ doins sampleWeb/HTML5/* |
178 |
+ |
179 |
+ keepdir /var/lib/sks |
180 |
+ readme.gentoo_create_doc |
181 |
+} |
182 |
+ |
183 |
+pkg_postinst() { |
184 |
+ readme.gentoo_print_elog |
185 |
+ |
186 |
+ if [[ -n ${REPLACING_VERSIONS} ]]; then |
187 |
+ einfo "Note when upgrading from versions of SKS earlier than 1.1.4" |
188 |
+ einfo "The default values for pagesize settings have changed. To continue" |
189 |
+ einfo "using an existing DB without rebuilding, explicit settings have to be" |
190 |
+ einfo "added to the sksconf file." |
191 |
+ einfo "pagesize: 4" |
192 |
+ einfo "ptree_pagesize: 1" |
193 |
+ fi; |
194 |
+} |