summaryrefslogtreecommitdiff
path: root/net-misc/ntpsec
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-19 17:09:22 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-19 17:09:22 +0100
commit590c04803f88a968b4a750c0f420eb314e1fe968 (patch)
treea6d2f2550cb2a6ad9254aa1467aef77488ad32ad /net-misc/ntpsec
parent66d92fc8569d87a09ac014780528dcad2a12b6c6 (diff)
gentoo auto-resync : 19:09:2023 - 17:09:22
Diffstat (limited to 'net-misc/ntpsec')
-rw-r--r--net-misc/ntpsec/Manifest5
-rw-r--r--net-misc/ntpsec/ntpsec-1.2.2a.ebuild182
-rw-r--r--net-misc/ntpsec/ntpsec-9999.ebuild41
3 files changed, 215 insertions, 13 deletions
diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
index ca21775292c6..60cea098c471 100644
--- a/net-misc/ntpsec/Manifest
+++ b/net-misc/ntpsec/Manifest
@@ -6,7 +6,10 @@ AUX ntpsec-1.1.9-remove-asciidoctor-from-config.patch 680 BLAKE2B 7204a831b3dc0d
AUX ntpsec-1.2.2-logrotate.patch 663 BLAKE2B c5e8eca739909695b6fd6cf7e507acb8e49a8eb2eebbf2afe83733159b8240f563a22a7389ac58373c10df104ee5dd34c7aec40787200bd3d704e5f0273cfc42 SHA512 ccba1116fac3fcb8dc075c81f2d8ed24399b41b6718ae65ed042b0da8bf19c0a5259650323a9b1d6f0e5c44ae167874ccaca7cbdd50b38955b17a4a49840c863
AUX ntpsec-no-bsd.patch 1538 BLAKE2B 6abb7acf23149a5a47f8e479bff090966e7e6161fc0d5bca1f9e5b9396d90898a783e7d309d6cdbdf689ea12314c804aa7a39f05b3f11d75a95eb337cea95b55 SHA512 7ddb346c7f0c9b30ea08ac28eaa39cf86e3d6cee7eaeba3bc7fe0883acd5087966e4e7beb298cee02607dfa3198a8c1dfcd9ce43ead820de3bb7014cefe75302
DIST ntpsec-1.2.2.tar.gz 2710329 BLAKE2B 031412d0fc7ecb5aba73501e63f8d0c416b23fe69114dd32422b03b4827e1ac9c92a4dfeb2e7d074cf6fd410d00cf86632f241dffd22987e4c03b21d21d8693a SHA512 864afb72c4bd8bc439ee06d343893cf92b3893c26c972a7bd1ff2713f0ad1f50704b6d0c6f155e6373c9747efff3ea36097a590be0d53e1a7ea7f429ba409cd1
+DIST ntpsec-1.2.2a.tar.gz 2710790 BLAKE2B b069433598697ab1e8110dbd005316a295d14c1e180fe0af2d19494bdff941d01234f0b4e9f38a150e27e450e1bd1f4dcf4535f9ff51c253670d11c5cb67382d SHA512 7a2cc04bde49800a745c74933e565a4764a22be484faffc5ea933231b74507af737a691cd0bb3aa024e81c083be0718c8d7b30dd152b0b0d386ae72fda426db9
+DIST ntpsec-1.2.2a.tar.gz.asc 833 BLAKE2B ce21b020d2a8590b731fdd4c171041fadbd699d60b9e10b2dc548675eed2efc04b9d5ae75fa8f77cc9c8e55db0f609d1eee5c5f2f7c7d804e1b087eb9ea95e1d SHA512 c1b0c1c6b534b11ef172d5ab68ada47bbd9e3f0298400c684e8745447221db16e4f4de436f06b0f6ab374e437b0506853a3a3da2bbe17c148cdf7de62c769f28
EBUILD ntpsec-1.2.2-r1.ebuild 4200 BLAKE2B f25db8aec77555d859bd08933209e92012123684318ddd3b5c6103aaba01393a8ef646ac1b4f0171e20c35a460652d32280aea0fba82f4571f82b67b6b56cd72 SHA512 2cc6c90cb7c425a92a79c9f229798661d8dfbf1d6da31be5a8101fdaed9a73deffe380cffee9c780468f9c1424ef08d08c894f27f2fb61da93e7f48675dabfc8
EBUILD ntpsec-1.2.2.ebuild 4154 BLAKE2B 3186a4d177797a8604bb16d43d17e08cdec277dffe16969834c5388b7c104c46c1ba49b990fca652843462c3af8646b9dd5dbdf13c312f762425526639047d69 SHA512 90a7eab1ec891da5290747a23dce0fda8787cdf509eb547f209fec40def2d61b93fa783df0caacb3d7a72fe5956f098f6ac9a67e92617b5db6d8afbacf044be4
-EBUILD ntpsec-9999.ebuild 4200 BLAKE2B f25db8aec77555d859bd08933209e92012123684318ddd3b5c6103aaba01393a8ef646ac1b4f0171e20c35a460652d32280aea0fba82f4571f82b67b6b56cd72 SHA512 2cc6c90cb7c425a92a79c9f229798661d8dfbf1d6da31be5a8101fdaed9a73deffe380cffee9c780468f9c1424ef08d08c894f27f2fb61da93e7f48675dabfc8
+EBUILD ntpsec-1.2.2a.ebuild 4407 BLAKE2B a1a2599fc700424d2a0abbe15616724480c6b0976011cb1c4d5ac51553493300bb2fd4004ffe6fbaa4c49c815aea38fc44548cd0d3ff93abbe53bbcf98e97eac SHA512 b938dcfaa511e5ebdadb7a493bb48e2c2b1f1f19492d61618bd8761814f3d033bf912e3c98c20400d394e43588e506935f719d6212e02ca9a279eadddf0a36fe
+EBUILD ntpsec-9999.ebuild 4407 BLAKE2B a1a2599fc700424d2a0abbe15616724480c6b0976011cb1c4d5ac51553493300bb2fd4004ffe6fbaa4c49c815aea38fc44548cd0d3ff93abbe53bbcf98e97eac SHA512 b938dcfaa511e5ebdadb7a493bb48e2c2b1f1f19492d61618bd8761814f3d033bf912e3c98c20400d394e43588e506935f719d6212e02ca9a279eadddf0a36fe
MISC metadata.xml 1777 BLAKE2B e324b32f904e5f076331594aefa32e5174e917a78fb0e1ca0361a2a0cae8f7813637e044d6c351e3f1d07d01733062def59666b89f73d134a507332585f29ae9 SHA512 db03c0268e00fea3701979e30b3bb3b1677de9f2c6692c99eb78cf5a929ca39cb8f379add7ba6786f1ddbb80e1b9263ec46bf459706996c12f3fd38bbc9452ea
diff --git a/net-misc/ntpsec/ntpsec-1.2.2a.ebuild b/net-misc/ntpsec/ntpsec-1.2.2a.ebuild
new file mode 100644
index 000000000000..38002f1e3d1d
--- /dev/null
+++ b/net-misc/ntpsec/ntpsec-1.2.2a.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE='threads(+)'
+DISTUTILS_USE_SETUPTOOLS=no
+
+inherit distutils-r1 flag-o-matic waf-utils systemd
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/ntpsec.asc
+ inherit verify-sig
+ SRC_URI="
+ https://ftp.ntpsec.org/pub/releases/${P}.tar.gz
+ verify-sig? ( https://ftp.ntpsec.org/pub/releases/${P}.tar.gz.asc )
+ "
+ KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-ntpsec )"
+fi
+
+DESCRIPTION="The NTP reference implementation, refactored"
+HOMEPAGE="https://www.ntpsec.org/"
+
+LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
+SLOT="0"
+
+NTPSEC_REFCLOCK=(
+ oncore trimble truetime gpsd jjy generic spectracom
+ shm pps hpgps zyfer arbiter nmea modem local
+)
+
+IUSE_NTPSEC_REFCLOCK=${NTPSEC_REFCLOCK[@]/#/rclock_}
+
+IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear" #ionice
+REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
+
+# net-misc/pps-tools oncore,pps
+DEPEND="
+ ${PYTHON_DEPS}
+ dev-libs/openssl:=
+ dev-python/psutil[${PYTHON_USEDEP}]
+ sys-libs/libcap
+ libbsd? ( dev-libs/libbsd:0= )
+ seccomp? ( sys-libs/libseccomp )
+ rclock_oncore? ( net-misc/pps-tools )
+ rclock_pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${DEPEND}
+ !net-misc/ntp
+ !net-misc/openntpd
+ acct-group/ntp
+ acct-user/ntp
+ ntpviz? (
+ media-fonts/liberation-fonts
+ sci-visualization/gnuplot
+ )
+"
+BDEPEND+="
+ >=app-text/asciidoc-8.6.8
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ sys-devel/bison
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
+ "${FILESDIR}/${PN}-1.2.2-logrotate.patch"
+)
+
+WAF_BINARY="${S}/waf"
+
+src_prepare() {
+ default
+
+ # Remove autostripping of binaries
+ sed -i -e '/Strip binaries/d' wscript || die
+ if ! use libbsd ; then
+ eapply "${FILESDIR}/${PN}-no-bsd.patch"
+ fi
+ # remove extra default pool servers
+ sed -i '/use-pool/s/^/#/' "${S}"/etc/ntp.d/default.conf || die
+
+ python_copy_sources
+}
+
+src_configure() {
+ filter-lto
+
+ local string_127=""
+ local rclocks="";
+ local CLOCKSTRING=""
+
+ for refclock in ${NTPSEC_REFCLOCK[@]} ; do
+ if use rclock_${refclock} ; then
+ string_127+="$refclock,"
+ fi
+ done
+ CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
+
+ myconf=(
+ --notests
+ --nopyc
+ --nopyo
+ --enable-pylib ext
+ --refclock="${CLOCKSTRING}"
+ #--build-epoch="$(date +%s)"
+ $(use doc || echo "--disable-doc")
+ $(use early && echo "--enable-early-droproot")
+ $(use gdb && echo "--enable-debug-gdb")
+ $(use samba && echo "--enable-mssntp")
+ $(use seccomp && echo "--enable-seccomp")
+ $(use smear && echo "--enable-leap-smear")
+ $(use debug && echo "--enable-debug")
+ )
+
+ distutils-r1_src_configure
+}
+
+python_configure() {
+ waf-utils_src_configure "${myconf[@]}"
+}
+
+python_compile() {
+ waf-utils_src_compile --notests
+}
+
+python_test() {
+ waf-utils_src_compile check
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # Install heat generating scripts
+ use heat && dosbin "${S}"/contrib/ntpheat{,usb}
+
+ # Install the openrc files
+ newinitd "${FILESDIR}"/ntpd.rc-r3 ntp
+ newconfd "${FILESDIR}"/ntpd.confd ntp
+
+ # Install the systemd unit file
+ systemd_newunit "${FILESDIR}"/ntpd-r1.service ntpd.service
+
+ # Prepare a directory for the ntp.drift file
+ mkdir -pv "${ED}"/var/lib/ntp
+ chown ntp:ntp "${ED}"/var/lib/ntp
+ chmod 770 "${ED}"/var/lib/ntp
+ keepdir /var/lib/ntp
+
+ # Install a logrotate script
+ mkdir -pv "${ED}"/etc/logrotate.d
+ cp -v "${S}"/etc/logrotate-config.ntpd "${ED}"/etc/logrotate.d/ntpd
+
+ # Install the configuration file and sample configuration
+ cp -v "${FILESDIR}"/ntp.conf "${ED}"/etc/ntp.conf
+ cp -Rv "${S}"/etc/ntp.d/ "${ED}"/etc/
+
+ # move doc files to /usr/share/doc/"${P}"
+ use doc && mv -v "${ED}"/usr/share/doc/"${PN}" "${ED}"/usr/share/doc/"${P}"/html
+}
+
+python_install() {
+ waf-utils_src_install --notests
+ python_fix_shebang "${ED}"
+ python_optimize
+}
+
+pkg_postinst() {
+ einfo "If you want to serve time on your local network, then"
+ einfo "you should disable all the ref_clocks unless you have"
+ einfo "one and can get stable time from it. Feel free to try"
+ einfo "it but PPS probably won't work unless you have a UART"
+ einfo "GPS that actually provides PPS messages."
+}
diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-9999.ebuild
index f377b0352861..38002f1e3d1d 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -3,7 +3,8 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_EXT=1
+PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE='threads(+)'
DISTUTILS_USE_SETUPTOOLS=no
@@ -13,13 +14,23 @@ if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
else
- SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${P}.tar.gz"
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/ntpsec.asc
+ inherit verify-sig
+ SRC_URI="
+ https://ftp.ntpsec.org/pub/releases/${P}.tar.gz
+ verify-sig? ( https://ftp.ntpsec.org/pub/releases/${P}.tar.gz.asc )
+ "
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+
+ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-ntpsec )"
fi
DESCRIPTION="The NTP reference implementation, refactored"
HOMEPAGE="https://www.ntpsec.org/"
+LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
+SLOT="0"
+
NTPSEC_REFCLOCK=(
oncore trimble truetime gpsd jjy generic spectracom
shm pps hpgps zyfer arbiter nmea modem local
@@ -27,30 +38,37 @@ NTPSEC_REFCLOCK=(
IUSE_NTPSEC_REFCLOCK=${NTPSEC_REFCLOCK[@]/#/rclock_}
-LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
-SLOT="0"
IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear" #ionice
REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
# net-misc/pps-tools oncore,pps
-DEPEND="${PYTHON_DEPS}
+DEPEND="
+ ${PYTHON_DEPS}
dev-libs/openssl:=
dev-python/psutil[${PYTHON_USEDEP}]
sys-libs/libcap
libbsd? ( dev-libs/libbsd:0= )
seccomp? ( sys-libs/libseccomp )
rclock_oncore? ( net-misc/pps-tools )
- rclock_pps? ( net-misc/pps-tools )"
-RDEPEND="${DEPEND}
+ rclock_pps? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${DEPEND}
!net-misc/ntp
!net-misc/openntpd
acct-group/ntp
acct-user/ntp
- ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )"
-BDEPEND=">=app-text/asciidoc-8.6.8
+ ntpviz? (
+ media-fonts/liberation-fonts
+ sci-visualization/gnuplot
+ )
+"
+BDEPEND+="
+ >=app-text/asciidoc-8.6.8
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
- sys-devel/bison"
+ sys-devel/bison
+"
PATCHES=(
"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
@@ -74,7 +92,6 @@ src_prepare() {
}
src_configure() {
- is-flagq -flto* && filter-flags -fuse-linker-plugin
filter-lto
local string_127=""
@@ -138,7 +155,7 @@ src_install() {
chmod 770 "${ED}"/var/lib/ntp
keepdir /var/lib/ntp
- # Install a log rotate script
+ # Install a logrotate script
mkdir -pv "${ED}"/etc/logrotate.d
cp -v "${S}"/etc/logrotate-config.ntpd "${ED}"/etc/logrotate.d/ntpd