From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 732FB139694 for ; Sun, 25 Jun 2017 22:34:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6FBF425400E; Sun, 25 Jun 2017 22:34:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3508225400E for ; Sun, 25 Jun 2017 22:34:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 360E0341716 for ; Sun, 25 Jun 2017 22:34:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2966B7476 for ; Sun, 25 Jun 2017 22:34:48 +0000 (UTC) From: "Kristian Fiskerstrand" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kristian Fiskerstrand" Message-ID: <1498430081.c5d3a33403d2ff4f05b29ec925e06adf600e6a98.k_f@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/sks/files/, net-misc/sks/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/sks/files/sks-1.1.6-unbundle-cryptokit.patch net-misc/sks/sks-1.1.6-r1.ebuild X-VCS-Directories: net-misc/sks/ net-misc/sks/files/ X-VCS-Committer: k_f X-VCS-Committer-Name: Kristian Fiskerstrand X-VCS-Revision: c5d3a33403d2ff4f05b29ec925e06adf600e6a98 X-VCS-Branch: master Date: Sun, 25 Jun 2017 22:34:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 86eb8037-5997-4268-b3cb-985eaea57166 X-Archives-Hash: 2d1b5c0cbfebb9d4b6d11ab1afa7c361 commit: c5d3a33403d2ff4f05b29ec925e06adf600e6a98 Author: Kristian Fiskerstrand gentoo org> AuthorDate: Sun Jun 25 22:34:09 2017 +0000 Commit: Kristian Fiskerstrand gentoo org> CommitDate: Sun Jun 25 22:34:41 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5d3a334 net-misc/sks: Unbundle cryptokit Gentoo-Bug: 591326 Package-Manager: Portage-2.3.6, Repoman-2.3.1 .../sks/files/sks-1.1.6-unbundle-cryptokit.patch | 79 ++++++++++++++ net-misc/sks/sks-1.1.6-r1.ebuild | 117 +++++++++++++++++++++ 2 files changed, 196 insertions(+) diff --git a/net-misc/sks/files/sks-1.1.6-unbundle-cryptokit.patch b/net-misc/sks/files/sks-1.1.6-unbundle-cryptokit.patch new file mode 100644 index 00000000000..da11839fa12 --- /dev/null +++ b/net-misc/sks/files/sks-1.1.6-unbundle-cryptokit.patch @@ -0,0 +1,79 @@ +diff -r 4af75b3526d9 Makefile +--- a/Makefile Sun Jun 25 20:39:45 2017 +0000 ++++ b/Makefile Mon Jun 26 00:27:10 2017 +0200 +@@ -53,10 +53,11 @@ + endif + + CAMLP4=-pp $(CAMLP4O) +-CAMLINCLUDE= -I lib -I bdb ++CRYPTOKIT=$(shell ocamlfind query cryptokit) ++CAMLINCLUDE= -I lib -I bdb -I $(CRYPTOKIT) + COMMONCAMLFLAGS=$(CAMLINCLUDE) $(OCAMLLIB) $(CAMLLDFLAGS) -ccopt -Lbdb -dtypes $(WARNERR) + OCAMLDEP=ocamldep $(CAMLP4) +-CAMLLIBS=unix.cma str.cma bdb.cma nums.cma bigarray.cma cryptokit.cma ++CAMLLIBS=unix.cma str.cma bdb.cma nums.cma bigarray.cma $(CRYPTOKIT)/cryptokit.cma + OCAMLFLAGS=$(COMMONCAMLFLAGS) -g $(CAMLLIBS) + OCAMLOPTFLAGS=$(COMMONCAMLFLAGS) -inline 40 $(CAMLLIBS:.cma=.cmxa) + +@@ -107,7 +108,7 @@ + + EXEOBJS.bc=$(RSERVOBJS.bc) build.cmo fastbuild.cmo dbserver.cmo pdiskTest.cmo + +-LIBS.bc= lib/cryptokit.cma bdb/bdb.cma ++LIBS.bc= bdb/bdb.cma + LIBS=$(LIBS.bc:.cma=.cmxa) + + VERSION := $(shell cat VERSION) +@@ -278,32 +279,11 @@ + touch prepared + + +-CKVER=cryptokit-1.7 +-CKDIR=$(CKVER)/src +- + $(CKVER)/README.txt: + tar xmvfz $(CKVER).tar.gz + patch -p 0 < $(CKVER)-sks.patch + patch -p 0 < $(CKVER)-sks-custom_compare.patch + +-$(CKDIR)/cryptokit.cma: $(CKVER)/README.txt +- cd $(CKDIR) && $(MAKE) all +- +-$(CKDIR)/cryptokit.cmxa: $(CKVER)/README.txt +- cd $(CKDIR) && $(MAKE) allopt +- +-lib/cryptokit.cma: $(CKDIR)/cryptokit.cma $(CKDIR)/cryptokit.cmxa prepared +- cp $(CKDIR)/cryptokit.cmi $(CKDIR)/cryptokit.cma \ +- $(CKDIR)/cryptokit.mli lib +- cp $(CKDIR)/libcryptokit.a lib +- if test -f $(CKDIR)/dllcryptokit.so; then \ +- cp $(CKDIR)/dllcryptokit.so lib; fi +- if test -f $(CKDIR)/cryptokit.cmxa; then \ +- cp $(CKDIR)/cryptokit.cmxa $(CKDIR)/cryptokit.cmx \ +- $(CKDIR)/cryptokit.a lib; fi +- +-lib/cryptokit.cmxa: lib/cryptokit.cma +- + ################################ + # old stuff + ################################ +@@ -340,16 +320,16 @@ + dumbloop: $(LIBS) $(ALLOBJS) dumbloop.cmo + $(OCAMLC) -o dumbloop $(OCAMLFLAGS) $(ALLOBJS) dumbloop.cmo + +-scan: $(OBJS) cryptokit dblib scan.ml ++scan: $(OBJS) dblib scan.ml + $(OCAMLC) -o scan $(OCAMLFLAGS) $(OBJS) scan.ml + + query: $(LIBS) $(ALLOBJS) query.cmo + $(OCAMLC) -o query $(OCAMLFLAGS) $(ALLOBJS) query.cmo + +-printids: $(OBJS:.cmo=.cmx) cryptokit printids.ml ++printids: $(OBJS:.cmo=.cmx) printids.ml + $(OCAMLOPT) -o printids $(OCAMLOPTFLAGS) $(OBJS:.cmo=.cmx) printids.ml + +-printids.bc: $(OBJS) cryptokit printids.ml ++printids.bc: $(OBJS) printids.ml + $(OCAMLC) -o printids $(OCAMLFLAGS) $(OBJS) printids.ml + + krecode: $(ALLOBJS.opt) $(LIBS) recode.ml diff --git a/net-misc/sks/sks-1.1.6-r1.ebuild b/net-misc/sks/sks-1.1.6-r1.ebuild new file mode 100644 index 00000000000..1368af1fdc2 --- /dev/null +++ b/net-misc/sks/sks-1.1.6-r1.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit multilib user readme.gentoo-r1 systemd + +DESCRIPTION="An OpenPGP keyserver which is decentralized with highly reliable synchronization" +HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver" +SRC_URI="https://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 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" + +DEPEND=">=dev-lang/ocaml-4.0 + dev-ml/findlib + dev-ml/camlp4 + dev-ml/cryptokit:0/1.10 + sys-libs/db:5.3" +RDEPEND="${DEPEND}" + +pkg_setup() { + ebegin "Creating named group and user" + enewgroup sks + enewuser sks -1 -1 /var/lib/sks sks +} + +src_prepare() { + eapply "${FILESDIR}/${P}-unbundle-cryptokit.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/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:^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 + eapply_user +} + +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 + 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; +}