From 4d87051a84971b5a7b9258ce7a905e39e2377bc6 Mon Sep 17 00:00:00 2001 From: alarig Date: Mon, 24 Feb 2020 20:32:46 +0100 Subject: [PATCH] net-misc/FORT-validator: Upgrading to 1.2.0, adapting the ebuild and the init script --- ...1.3.ebuild => FORT-validator-1.2.0.ebuild} | 23 +++++++++++++++++-- net-misc/FORT-validator/Manifest | 2 +- .../FORT-validator/files/fort-config.json | 2 +- net-misc/FORT-validator/files/fort-initd | 10 +++----- 4 files changed, 26 insertions(+), 11 deletions(-) rename net-misc/FORT-validator/{FORT-validator-1.1.3.ebuild => FORT-validator-1.2.0.ebuild} (55%) diff --git a/net-misc/FORT-validator/FORT-validator-1.1.3.ebuild b/net-misc/FORT-validator/FORT-validator-1.2.0.ebuild similarity index 55% rename from net-misc/FORT-validator/FORT-validator-1.1.3.ebuild rename to net-misc/FORT-validator/FORT-validator-1.2.0.ebuild index 5f53f5f..80942ee 100644 --- a/net-misc/FORT-validator/FORT-validator-1.1.3.ebuild +++ b/net-misc/FORT-validator/FORT-validator-1.2.0.ebuild @@ -42,13 +42,32 @@ src_install() { newconfd "${FILESDIR}/${MY_PN}-confd" ${MY_PN} emake DESTDIR="${D}" install - insinto /usr/share/${MY_PN}/tal - doins tal/* + insinto /usr/share/${MY_PN}/ + insopts -m0644 -o "${MY_PN}" + diropts -m0755 -o "${MY_PN}" + doins -r examples/tal/ + + dodoc -r examples/ insinto /etc/fort newins "${FILESDIR}/fort-config.json" config.json + + exeinto /usr/libexec/${MY_PN} + doexe fort_setup.sh } pkg_postinst() { fcaps cap_net_bind_service usr/bin/fort + + einfo "" + einfo "ARIN TAL is disabled by default because the ARIN Relying Party" + einfo "Agreement must be accepted beforehead. Start fort, run" + einfo "" + einfo " su -s /bin/sh -c '${EROOT}/usr/libexec/${MY_PN}/fort_setup.sh /usr/share/${MY_PN}/tal/' fort" + einfo "" + einfo "as root and restart fort to enable it." + einfo "The configuration file generation will fail because the script tries" + einfo "to write in your current directory. Plus, there is a configuration" + einfo "file with this ebuild, so you don’t have to use the generated one if" + einfo "you don’t want to." } diff --git a/net-misc/FORT-validator/Manifest b/net-misc/FORT-validator/Manifest index 72f7304..abe9cf9 100644 --- a/net-misc/FORT-validator/Manifest +++ b/net-misc/FORT-validator/Manifest @@ -1 +1 @@ -DIST FORT-validator-1.1.3.tar.gz 383459 BLAKE2B 80523058fb7e7b7f8d8a1d3737321f33a1795ed7f659bd8f0f0f107df3abfd36508bff1bf03ee3964ba4ad61faa9df29ea19c81f4533666b5a01e2dabf904172 SHA512 6d34e96c1f1d710914593620e848281d427cfcbefddfe355be8b36fb3b3451bc48113c968ddc25c18ea6df23fb182e7bb4951743de2ab0aa8d84d764040ca617 +DIST FORT-validator-1.2.0.tar.gz 427483 BLAKE2B 05fbec44fb17fa188b6196a2b166f2e112224dcf4071cc875ed1f3a147b28acff94c89b0c0a658aaee197e1820d9f53803e73add81e355f7df07713fcdb0df00 SHA512 e89b1aa7c0cd4036d04a017898e1a6017450f5dab96e57c35b0aa532b212b23f7fab17ca117a9461c9bdacca511ea70341e692a4d5e8f277ae8e277c1d48706e diff --git a/net-misc/FORT-validator/files/fort-config.json b/net-misc/FORT-validator/files/fort-config.json index 6fae02f..b3d5fec 100644 --- a/net-misc/FORT-validator/files/fort-config.json +++ b/net-misc/FORT-validator/files/fort-config.json @@ -1,6 +1,6 @@ { "tal": "/usr/share/fort/tal/", - "local-repository": "/var/lib/fort/", + "local-repository": "/var/cache/fort/repository/", "server": { "address": "::" }, diff --git a/net-misc/FORT-validator/files/fort-initd b/net-misc/FORT-validator/files/fort-initd index 9390a29..25e6b30 100644 --- a/net-misc/FORT-validator/files/fort-initd +++ b/net-misc/FORT-validator/files/fort-initd @@ -9,7 +9,6 @@ command_args="${FORT_OPTS}" command_user="fort" pidfile="/run/${RC_SVCNAME}.pid" command_background=true -retry=25 depend() { need net @@ -19,12 +18,9 @@ start_pre() { if [ -z "${FORT_BASEDIR}" ]; then FORT_BASEDIR=$(awk -F '"' '/local-repository/ { print $4 }' \ /etc/fort/config.json) - FORT_BASEDIR="${FORT_BASEDIR:-/var/lib/fort/}" + FORT_BASEDIR="${FORT_BASEDIR:-/var/cache/fort/repository/}" fi - checkpath -d -m 0750 -o fort:fort ${FORT_BASEDIR} - - if [ "${RC_CMD}" = "restart" ] ; then - sleep 20 - fi + checkpath -d -m 0755 -o fort:fort "$(dirname "${FORT_BASEDIR}")" + checkpath -d -m 0755 -o fort:fort "${FORT_BASEDIR}" }