From 10e3fa8b58a6d0224cba3d2b2e2df958891879f0 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sun, 24 Mar 2024 22:52:58 -0700 Subject: net-misc/sks: match init.d behavior - support args to systemd service - ensure paths are correctly owned (/var/lib/sks/{PTree,KDB} must exist) - sks-recon must start after sks-db Signed-off-by: Robin H. Johnson --- net-misc/sks/files/sks-db.service | 7 +- net-misc/sks/files/sks-recon.service | 7 +- net-misc/sks/sks-1.1.6_p20200624-r1.ebuild | 136 ----------------------------- net-misc/sks/sks-1.1.6_p20200624-r2.ebuild | 136 +++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 139 deletions(-) delete mode 100644 net-misc/sks/sks-1.1.6_p20200624-r1.ebuild create mode 100644 net-misc/sks/sks-1.1.6_p20200624-r2.ebuild (limited to 'net-misc') diff --git a/net-misc/sks/files/sks-db.service b/net-misc/sks/files/sks-db.service index bbc3ba7e2b2d..b48db1add6ff 100644 --- a/net-misc/sks/files/sks-db.service +++ b/net-misc/sks/files/sks-db.service @@ -3,8 +3,13 @@ Description=SKS database thread After=network.target [Service] -ExecStart=/usr/bin/sks db +Environment=SKS_DIR=/var/lib/sks +EnvironmentFile=-/etc/sysconfig/sks +ExecStartPre=/usr/lib/rc/bin/checkpath --owner sks:sks --directory ${SKS_DIR} ${SKS_DIR}/SKS ${SKS_DIR}/PTree +ExecStartPre=/usr/lib/rc/bin/checkpath --owner sks:sks --file ${SKS_DIR}/*.log ${SKS_DIR}/KDB/* ${SKS_DIR}/PTree/* +ExecStart=/usr/bin/sks db ${SKS_OPTIONS} ${SKS_DB_OPTIONS} User=sks +# WorkingDirectory cannot use a variable WorkingDirectory=/var/lib/sks [Install] diff --git a/net-misc/sks/files/sks-recon.service b/net-misc/sks/files/sks-recon.service index 97ee52ffc0ed..d56731d1c961 100644 --- a/net-misc/sks/files/sks-recon.service +++ b/net-misc/sks/files/sks-recon.service @@ -1,10 +1,13 @@ [Unit] Description=SKS key reconnaissance thread -After=network.target +After=network.target sks-db.service [Service] -ExecStart=/usr/bin/sks recon +Environment=SKS_DIR=/var/lib/sks +EnvironmentFile=-/etc/sysconfig/sks +ExecStart=/usr/bin/sks recon ${SKS_OPTIONS} ${SKS_RECON_OPTIONS} User=sks +# WorkingDirectory cannot use a variable WorkingDirectory=/var/lib/sks [Install] diff --git a/net-misc/sks/sks-1.1.6_p20200624-r1.ebuild b/net-misc/sks/sks-1.1.6_p20200624-r1.ebuild deleted file mode 100644 index 133ea06cb8e7..000000000000 --- a/net-misc/sks/sks-1.1.6_p20200624-r1.ebuild +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright 1999-2022 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 -