summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-10-08 22:29:35 +0000
committerSam James <sam@gentoo.org>2020-10-08 22:40:28 +0000
commita5dd34d1d01a2a3e1fba5e99a9f9154326d33c62 (patch)
tree2b98d5d15152b5791c59a6f2bea7488b4a3ed291
parentacct-user/sks: add new user (370) (diff)
downloadgentoo-a5dd34d1d01a2a3e1fba5e99a9f9154326d33c62.tar.gz
gentoo-a5dd34d1d01a2a3e1fba5e99a9f9154326d33c62.tar.bz2
gentoo-a5dd34d1d01a2a3e1fba5e99a9f9154326d33c62.zip
net-misc/sks: take 20200624 snapshot
Closes: https://bugs.gentoo.org/704246 Closes: https://bugs.gentoo.org/625546 Closes: https://bugs.gentoo.org/725174 Closes: https://bugs.gentoo.org/710946 Closes: https://bugs.gentoo.org/713160 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-misc/sks/Manifest1
-rw-r--r--net-misc/sks/files/sks-1.1.6_p20200624-QA-fixups.patch71
-rw-r--r--net-misc/sks/files/sks-1.1.6_p20200624-respect-CFLAGS-CXXFLAGS.patch81
-rw-r--r--net-misc/sks/sks-1.1.6_p20200624.ebuild132
4 files changed, 285 insertions, 0 deletions
diff --git a/net-misc/sks/Manifest b/net-misc/sks/Manifest
index 389f58d91ae..1533b8e4a5c 100644
--- a/net-misc/sks/Manifest
+++ b/net-misc/sks/Manifest
@@ -1 +1,2 @@
DIST sks-1.1.6.tgz 359499 BLAKE2B 6fb92aab93db8e19536db7df6a05bccc4c13a4859b8df8dba29da1bbfe854d65d5ed1b99d042f9f1509f07187810f25500513f2730a2c8fb579fdd4cd00c820c SHA512 f7c54194274834840b9701bf827b81add0f807dd4c6019968a6b0c755c9117519433ebb1161da38d23c465b163dd31a766700023afa13174e4dc82542fa98099
+DIST sks-1.1.6_p20200624.tar.gz 213871 BLAKE2B d44dc73aa49bf1b1375acbb141dd7f62732866f87e48d25d0ed3fdae4e00f7ced42bef2fe73ea0a065772b8b33b7e9da14508b5d8591313566269c24bd9c1d6a SHA512 b0de7803afd61b45051daad67b2b63f9b4685c7820485326c63e053ce09f545ff0b9b8a91fb6543712c16e508ab20176d259c2fba3a47e0e75a862932954183a
diff --git a/net-misc/sks/files/sks-1.1.6_p20200624-QA-fixups.patch b/net-misc/sks/files/sks-1.1.6_p20200624-QA-fixups.patch
new file mode 100644
index 00000000000..3657a8bd5f0
--- /dev/null
+++ b/net-misc/sks/files/sks-1.1.6_p20200624-QA-fixups.patch
@@ -0,0 +1,71 @@
+diff --git a/Makefile b/Makefile
+index f182225..c84368e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,8 +15,8 @@
+ # USA
+ #
+ CINCLUDES=-I$(shell ocamlc -where)
+-CFLAGS+=-O3 -Werror-implicit-function-declaration $(CINCLUDES) -I .
+-CXXFLAGS+=-O3 $(CINCLUDES) -I .
++CFLAGS+=$(CINCLUDES) -I .
++CXXFLAGS+=$(CINCLUDES) -I .
+
+ ifndef OCAMLC
+ OCAMLC=ocamlfind ocamlc
+@@ -60,8 +60,8 @@ OCAMLFLAGS=$(COMMONCAMLFLAGS) -linkpkg -g $(CAMLLIBS)
+ OCAMLOPTFLAGS=$(COMMONCAMLFLAGS) -linkpkg -inline 40 $(CAMLLIBS:.cma=.cmxa)
+
+ EXE=sks sks_add_mail
+-ALL=$(EXE) sks.8.gz
+-ALL.bc=$(EXE:=.bc) sks.8.gz
++ALL=$(EXE) sks.8
++ALL.bc=$(EXE:=.bc) sks.8
+
+ all: $(ALL)
+ all.bc: $(ALL.bc)
+@@ -132,13 +132,13 @@ install:
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ install sks_build.sh sks sks_add_mail $(DESTDIR)$(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(MANDIR)/man8
+- install sks.8.gz $(DESTDIR)$(MANDIR)/man8
++ install sks.8 $(DESTDIR)$(MANDIR)/man8
+
+ install.bc:
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ install sks_build.bc.sh sks.bc sks_add_mail.bc $(DESTDIR)$(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(MANDIR)/man8
+- install sks.8.gz $(DESTDIR)$(MANDIR)/man8
++ install sks.8 $(DESTDIR)$(MANDIR)/man8
+
+
+ Makefile.local:
+@@ -151,9 +151,6 @@ src:
+
+ # Ordinary targets
+
+-sks.8.gz: sks.8
+- gzip -9nf sks.8
+-
+ sks.8: sks.pod
+ pod2man -c "SKS OpenPGP Key server" --section 8 -r 0.1 -name sks sks.pod sks.8
+
+diff --git a/bdb/Makefile b/bdb/Makefile
+index 0913014..4a68399 100644
+--- a/bdb/Makefile
++++ b/bdb/Makefile
+@@ -15,11 +15,11 @@
+ -include ../Makefile.local
+
+ CINCLUDES=-I$(shell ocamlc -where) $(BDBINCLUDE)
+-CFLAGS+=-O3 -Werror-implicit-function-declaration $(CINCLUDES) $(BDBLIB) -I .
+-CXXFLAGS+=-O3 $(CINCLUDES) $(BDBLIB) -I .
++CFLAGS+=$(CINCLUDES) $(BDBLIB) -I .
++CXXFLAGS+=$(CINCLUDES) $(BDBLIB) -I .
+
+ MKLIB=ocamlmklib
+-RANLIB=ranlib
++RANLIB?=ranlib
+ OCAMLDEP=ocamldep $(PP)
+ CAMLINCLUDE=
+ COMMONCAMLFLAGS= $(CAMLINCLUDE) $(PP) #-thread
diff --git a/net-misc/sks/files/sks-1.1.6_p20200624-respect-CFLAGS-CXXFLAGS.patch b/net-misc/sks/files/sks-1.1.6_p20200624-respect-CFLAGS-CXXFLAGS.patch
new file mode 100644
index 00000000000..02da8d2d2e7
--- /dev/null
+++ b/net-misc/sks/files/sks-1.1.6_p20200624-respect-CFLAGS-CXXFLAGS.patch
@@ -0,0 +1,81 @@
+https://sources.debian.org/src/sks/1.1.6+git20200620.9e9d504-1/debian/patches/0008-accept-and-use-CFLAGS-and-CPPFLAGS-from-environment.patch/
+----
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+Date: Mon, 8 Aug 2016 13:20:38 -0400
+Subject: accept and use CFLAGS and CPPFLAGS from environment
+
+---
+ Makefile | 9 +++++----
+ bdb/Makefile | 14 ++++++++------
+ 2 files changed, 13 insertions(+), 10 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,7 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ # USA
+ #
+-CINCLUDES=-I`ocamlc -where`
++CINCLUDES=-I$(shell ocamlc -where)
+ CFLAGS+=-O3 -Werror-implicit-function-declaration $(CINCLUDES) -I .
+ CXXFLAGS+=-O3 $(CINCLUDES) -I .
+
+@@ -43,6 +43,7 @@ else
+ endif
+
+ CAMLLDFLAGS=$(foreach x, $(LDFLAGS), -ccopt $(x))
++CAMLCFLAGS=$(foreach x, $(CFLAGS), -ccopt $(x)) $(foreach x, $(CPPFLAGS), -ccopt $(x))
+
+ SKSVS=$(shell grep 'version_suffix = "+"' common.ml)
+ ifeq ($(strip $(SKSVS)),)
+@@ -52,7 +53,7 @@ WARNERR=-warn-error A
+ endif
+
+ CAMLINCLUDE= -package cryptokit,unix,str,bigarray,num -I bdb
+-COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) $(CAMLLDFLAGS) -ccopt -Lbdb -annot -bin-annot $(WARNERR)
++COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) $(CAMLCFLAGS) $(CAMLLDFLAGS) -ccopt -Lbdb -annot -bin-annot $(WARNERR)
+ OCAMLDEP=ocamldep
+ CAMLLIBS=bdb.cma
+ OCAMLFLAGS=$(COMMONCAMLFLAGS) -linkpkg -g $(CAMLLIBS)
+--- a/bdb/Makefile
++++ b/bdb/Makefile
+@@ -14,7 +14,7 @@
+ # $Id: Makefile,v 1.6 2003/07/05 15:16:29 yminsky Exp $
+ -include ../Makefile.local
+
+-CINCLUDES=-I`ocamlc -where` $(BDBINCLUDE)
++CINCLUDES=-I$(shell ocamlc -where) $(BDBINCLUDE)
+ CFLAGS+=-O3 -Werror-implicit-function-declaration $(CINCLUDES) $(BDBLIB) -I .
+ CXXFLAGS+=-O3 $(CINCLUDES) $(BDBLIB) -I .
+
+@@ -27,6 +27,8 @@ CAMLLIBS=unix.cma str.cma mylibs.cma
+ OCAMLFLAGS=$(COMMONCAMLFLAGS) -g
+ OCAMLOPTFLAGS=$(COMMONCAMLFLAGS) -inline 40
+
++CAMLCFLAGS=$(foreach x, $(CFLAGS), -ccopt $(x)) $(foreach x, $(CPPFLAGS), -ccopt $(x))
++
+ ifndef LIBDB
+ LIBDB=-ldb-4.6
+ endif
+@@ -37,7 +39,7 @@ ocextr: ocextr.ml
+ $(OCAMLC) -o ocextr ocextr.ml
+
+ libbdb.a: $(COBJS)
+- $(MKLIB) -custom -o bdb $(COBJS)
++ $(MKLIB) $(CAMLCFLAGS) -custom -o bdb $(COBJS)
+
+ bdb_stubs.o: bdb_stubs.h bdb_stubs.c
+
+@@ -45,10 +47,10 @@ bdb.ml: ocextr bdb_stubs.c
+ ./ocextr bdb_stubs.c > bdb.ml
+
+ bdb.cma: bdb.cmo libbdb.a
+- $(MKLIB) -custom -o bdb bdb.cmo -lbdb $(LIBDB)
++ $(MKLIB) $(CAMLCFLAGS) -custom -o bdb bdb.cmo -lbdb $(LIBDB)
+
+ bdb.cmxa: bdb.cmx libbdb.a
+- $(MKLIB) -custom -o bdb bdb.cmx -lbdb $(LIBDB)
++ $(MKLIB) $(CAMLCFLAGS) -custom -o bdb bdb.cmx -lbdb $(LIBDB)
+
+ bdbcaml: bdb.cma
+ ocamlmktop -o bdbcaml -custom unix.cma bdb.cma $^
diff --git a/net-misc/sks/sks-1.1.6_p20200624.ebuild b/net-misc/sks/sks-1.1.6_p20200624.ebuild
new file mode 100644
index 00000000000..7c9d13994f7
--- /dev/null
+++ b/net-misc/sks/sks-1.1.6_p20200624.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit readme.gentoo-r1 systemd toolchain-funcs
+
+COMMIT="591a7834dc9f1dff3d336d769a6561138a5befe7"
+DESCRIPTION="An OpenPGP keyserver which is decentralized with highly reliable synchronization"
+HOMEPAGE="https://github.com/SKS-Keyserver/sks-keyserver"
+SRC_URI="https://github.com/SKS-Keyserver/sks-keyserver/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-keyserver-${COMMIT}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="optimize test"
+RESTRICT="!test? ( test )"
+
+DOC_CONTENTS="To get sks running, first build the database,
+start the database, 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"
+
+RDEPEND="
+ acct-user/sks
+ acct-group/sks
+ >=dev-lang/ocaml-4.0:=
+ dev-ml/camlp4:=
+ dev-ml/cryptokit:=
+ dev-ml/num:=
+ sys-libs/db:5.3
+"
+DEPEND="${RDEPEND}
+ dev-ml/findlib"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.6_p20200624-respect-CFLAGS-CXXFLAGS.patch"
+ "${FILESDIR}/${PN}-1.1.6_p20200624-QA-fixups.patch"
+)
+
+QA_FLAGS_IGNORED=(
+ /usr/bin/sks_add_mail
+)
+
+src_prepare() {
+ 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/db5.3/:g" \
+ -e "s:^LIBDB=.*$:LIBDB=-ldb-5.3:g" \
+ -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \
+ -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \
+ Makefile.local || die
+ sed -i \
+ -e 's:/usr/sbin/sks:/usr/bin/sks:g' \
+ sks_build.sh || die
+
+ dosym sks_build.sh /usr/bin/sks_build.bc.sh
+ default
+}
+
+src_compile() {
+ tc-export CC CXX RANLIB
+
+ emake dep
+ # sks build fails with parallel 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 sks.bc usr/bin/sks
+ dosym 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
+ fowners sks:sks /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
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -n "${REPLACING_VERSIONS}" ]]; then
+ einfo "Note when upgrading from versions of SKS earlier than 1.1.4"
+ 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;
+}