summaryrefslogtreecommitdiff
path: root/net-misc/ntpsec
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /net-misc/ntpsec
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'net-misc/ntpsec')
-rw-r--r--net-misc/ntpsec/Manifest5
-rw-r--r--net-misc/ntpsec/files/ntpsec-1.2.1-build-notests.patch48
-rw-r--r--net-misc/ntpsec/files/ntpsec-py3-test-clarify.patch34
-rw-r--r--net-misc/ntpsec/ntpsec-1.2.1-r3.ebuild177
-rw-r--r--net-misc/ntpsec/ntpsec-9999.ebuild54
5 files changed, 294 insertions, 24 deletions
diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
index 16b2e1b1feaa..e76768f8ff65 100644
--- a/net-misc/ntpsec/Manifest
+++ b/net-misc/ntpsec/Manifest
@@ -3,10 +3,13 @@ AUX ntpd-r1.service 613 BLAKE2B 9e0d0fdefa670c2ac25142bfb37880ce4ba0662f70f7cf9a
AUX ntpd.confd 90 BLAKE2B 980ea88c97b1deff65f53c13410fe46bc1e19a80140776002ae2fdc0a3ad18c9855b74a70f1a89eb31854bbdad6729753c3a199cddb25b58178a79a0ea0a7050 SHA512 a2fdf88f6f55bcf0a6545db77817e3a740dba50bf56b4fdd80d335e8c909d0880fbd962041754d7f5fb3946ed131d9a739ec72008bacab9f1f47ff82dc74c542
AUX ntpd.rc-r2 484 BLAKE2B 826a3ee09486d912525fe6d44b967e25d8b31485d89a80987afcf459ea335058ff8a7835f3931017505aad6c5ba60e546b608ce26a51ad38f5972675d0a47559 SHA512 dc89a58edf6f83878d42522a015f2c3e12db9505ea3d6bc4b04e6e82947a7be6e8d143e8808bb58644641dd754744fd4be20c8b944a4261b460c30b95436fc31
AUX ntpsec-1.1.9-remove-asciidoctor-from-config.patch 680 BLAKE2B 7204a831b3dc0dba7f268febd10fa7599ef6b9bee30199ce10529d2d326719f5b376d301aabfef3beacecd4af813bcef1d6a65d61ab00996d72f1240f83ef8e3 SHA512 3e012ad70507f440ed3a4aca4886a96e40d49a0dd7c14572f664633a56139cb7767e07ee1bb5e8295fc32052914364660c928d11369b6f80193ae7e190e5a48e
+AUX ntpsec-1.2.1-build-notests.patch 1512 BLAKE2B 16f1b49802c2883866d5ddc862c49ddca994fc530938b53d6059a0f044aa67692180efd528727b91940357562eb4db4a1abaa0a04404b13b912eb11a6a94b9fc SHA512 5b9cf22809a727c687d4a6796a334fd515d1de3883f2e72b5a44e787dd5e1189cc86e5a50c7f693d45e58ac1c5ee0503571fe4aa15cc31f7fc7d3f409128d21e
AUX ntpsec-1.2.1-seccomp-rollup.patch 2987 BLAKE2B 82bd355cdd169133f232f6514f363e87b6876472d49d69d034dd33aefe7179dc3db5e661909774471635dd947761f5e8ab47ecc0dcf8d6c2e62ffdad06044a3f SHA512 34c1941dfd7d7968fa954fb36411aad5e711767f1c0b6aca52cd8f8c839163110af2d4774a7a41b1f3d0daa49af5823b74e9c8a2a9ec12b9a344c72ce505d279
AUX ntpsec-1.2.1-seccomp-rseq-glibc-2.35.patch 785 BLAKE2B df61801e9748e20ce7fa8577c472ea2ed4e31a8d2cb1aef39a245bfe145e482b61b6b30398fc5c2da69685ed872b70ac8399481ec71ea35fc4469df1b83bd195 SHA512 a35ba539aa6a0b8f28079e1dd7a729e7ea21ab045233d7b5e1938a11c03a72aa87907068505e0330c644ebb9b509663a21a24ad9a4cc954a0f03ec7198309c0e
AUX ntpsec-no-bsd.patch 1538 BLAKE2B 6abb7acf23149a5a47f8e479bff090966e7e6161fc0d5bca1f9e5b9396d90898a783e7d309d6cdbdf689ea12314c804aa7a39f05b3f11d75a95eb337cea95b55 SHA512 7ddb346c7f0c9b30ea08ac28eaa39cf86e3d6cee7eaeba3bc7fe0883acd5087966e4e7beb298cee02607dfa3198a8c1dfcd9ce43ead820de3bb7014cefe75302
+AUX ntpsec-py3-test-clarify.patch 993 BLAKE2B 85df81d6301e3f057601bbb2e01590a11cefe338b8a309d37818524896cb694d9a479ab80613763bd2c779680ccecc06526dfca87370409372788ba9254b9003 SHA512 3ac296a2329b2a9dede51499a75f82eeae1870ad5dbd769b7ea1f3d4634ff2512fda8383f7d3adc6fa1a4fd03e035cf0b52157639ca21f458af161fffbf6a0e4
DIST ntpsec-1.2.1.tar.gz 2681237 BLAKE2B bfb2674131718dcf9f393e93d1148cfb6631591dbcce1ade91746586f261123b80b238393ac2a763fab119cd627f8eae4b006b023ad2b319e752db9eb4b04cc0 SHA512 0b8b0bda52d3025f6e9a06c00b1e0c25c595ada72b87ed0e5d3d6f77a034f557745156bc6d9a263c9876c041efffa38d42fa93ba8bfda31f67efbd842a726277
EBUILD ntpsec-1.2.1-r2.ebuild 4434 BLAKE2B fc33f87243be18fe8ccf1faccc5aa261a162656e8c675fedaa333631ae85c95ca59bf8a06b24c4a3b3e46ab669bc026ae164afdb2a507f3e19b2cef3c7139602 SHA512 d564a533817ad9a54c81db43b8ab1e09dea2f8aa749c930662e2912bb0e058d9fdc835ab22599d403fe34dc85c6a1a25fe0635667ea8a6cf12cd9d5718baa507
-EBUILD ntpsec-9999.ebuild 4329 BLAKE2B f6706f89cbd8191608ca4092ee2de304db5ac676cd6fcf3fc0d2c107acb5a66da0d546d8b060ff80db60a00a9029b0746e104b71546b0109ffddef259144d778 SHA512 26a81887ef0537376df3f458772cf000fb7f40171e7d481a1f72393f0226ee7c3c810715bcae144dab63b06e942767d6e073112e7626e2a12db5ecc80c8fc6e5
+EBUILD ntpsec-1.2.1-r3.ebuild 4686 BLAKE2B 648e6194976a9a9e237f49c5fc05e7fab7bb777ffc318887d137f0222ddeaf14aee9785d03d574bf45cd2503c0e80605eb9badc4ff158c360a83444db41ebaa6 SHA512 270c6e2496e250f9871a16f74438aa709105c2da06f0df0459cdafc8692543ddcb2e2e7b44af85c66d7c33badeeae6647f9592165fd8dd9ee2f066014d22d49b
+EBUILD ntpsec-9999.ebuild 4534 BLAKE2B baffc367ed04fe5042e4acad1c7172e280f49e9f391f409f14bc4511ae02d3a1927c3c4f2198e7bedd64243c81ff8e75b797faf8b04f8c1b92cda922468f9843 SHA512 979c140c15e1c7f6b99c21fad33d825961e22306031d6ada7775d0af35f35391af33007049359a8b66b983cf0dc178683c8f5db62cd42600fb10f15826f31f12
MISC metadata.xml 1902 BLAKE2B d807dc3dae199835bfa1624e76b43e39a1392f07d736ab5936c48bd4cfd69fdc1bae71a02c3cd9f405aa0992e7ebe27f5ffb639eafed027deba96eaa99ace391 SHA512 a29e4dfebcda69c393487ccfccdefd2b9e4e5c63591d2ed7c008b54b7c04afea071938fd2e0ce6c67f26ccecf427053b1a2b8e946dfcc3e092f64d00bc28aadf
diff --git a/net-misc/ntpsec/files/ntpsec-1.2.1-build-notests.patch b/net-misc/ntpsec/files/ntpsec-1.2.1-build-notests.patch
new file mode 100644
index 000000000000..dab51a97fc0a
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.2.1-build-notests.patch
@@ -0,0 +1,48 @@
+From 1a7bb2e3a2749bd709ea4cf10b66b6f6d05aaf9d Mon Sep 17 00:00:00 2001
+From: James Browning <jamesb.fe80@gmail.com>
+Date: Sun, 10 Apr 2022 07:53:37 -0700
+Subject: [PATCH] I: NTPsec build does not repect --notests
+
+STR: (run the following)
+- git clone https://gitlab.com/NTPsec/ntpsec
+- cd ntpsec
+- ./waf configure build --notests -p
+
+AR: NTPsec runs tests despite having a parameter telling it not to
+ER: NTPsec should not run tests when it has been told not to
+---
+ wscript | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index c1d765046..d8a20b82e 100644
+--- a/wscript
++++ b/wscript
+@@ -1131,6 +1131,7 @@ def build(ctx):
+ ctx.manpage(8, "ntpclients/ntpsnmpd-man.adoc")
+
+ # Skip running unit tests on a cross compile build
++ from waflib import Options
+ if not ctx.env.ENABLE_CROSS:
+ # Force re-running of tests. Same as 'waf --alltests'
+ if ctx.cmd == "check":
+@@ -1139,6 +1140,8 @@ def build(ctx):
+ # Print log if -v is supplied
+ if verbose > 0:
+ ctx.add_post_fun(test_print_log)
++ elif Options.options.no_tests:
++ return
+
+ # Test binaries
+ ctx.add_post_fun(bin_test)
+@@ -1152,7 +1155,6 @@ def build(ctx):
+ ctx.add_post_fun(bin_test_summary)
+ else:
+ pprint("YELLOW", "Unit test runner skipped on a cross-compiled build.")
+- from waflib import Options
+ Options.options.no_tests = True
+
+ if ctx.cmd == "build":
+--
+2.32.0
+
diff --git a/net-misc/ntpsec/files/ntpsec-py3-test-clarify.patch b/net-misc/ntpsec/files/ntpsec-py3-test-clarify.patch
new file mode 100644
index 000000000000..027c3df18ad2
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-py3-test-clarify.patch
@@ -0,0 +1,34 @@
+From f360741dec76a9c9d831f0b547596891ea321599 Mon Sep 17 00:00:00 2001
+From: James Browning <jamesb.fe80@gmail.com>
+Date: Sun, 10 Apr 2022 16:23:34 -0700
+Subject: [PATCH] clean test output up in Python 3
+
+---
+ wafhelpers/test.py | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/wafhelpers/test.py b/wafhelpers/test.py
+index 9351a5675..6bba34881 100644
+--- a/wafhelpers/test.py
++++ b/wafhelpers/test.py
+@@ -31,12 +31,13 @@ def test_print_log(ctx):
+ pprint("YELLOW", "RETURN VALUE:", retval)
+ print("")
+
+- if retval or error:
++ if retval:
+ pprint("RED", "****** ERROR ******\n")
+
+- print(error or lines)
++ print(polystr(error) or polystr(lines))
+
+- if (not retval) and (not error):
+- pprint("GREEN", "****** LOG ******\n", lines)
++ else:
++ pprint("GREEN", "****** LOG ******\n",
++ polystr(lines), polystr(error))
+
+ print("")
+--
+2.32.0
+
diff --git a/net-misc/ntpsec/ntpsec-1.2.1-r3.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r3.ebuild
new file mode 100644
index 000000000000..69d38d6263b9
--- /dev/null
+++ b/net-misc/ntpsec/ntpsec-1.2.1-r3.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+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
+ SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+fi
+
+DESCRIPTION="The NTP reference implementation, refactored"
+HOMEPAGE="https://www.ntpsec.org/"
+
+NTPSEC_REFCLOCK=(
+ oncore trimble truetime gpsd jjy generic spectracom
+ shm pps hpgps zyfer arbiter nmea modem local
+)
+
+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}
+ 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? ( sci-visualization/gnuplot media-fonts/liberation-fonts )"
+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.1-seccomp-rollup.patch"
+ "${FILESDIR}/${PN}-1.2.1-seccomp-rseq-glibc-2.35.patch"
+ "${FILESDIR}/${PN}-1.2.1-build-notests.patch"
+ "${FILESDIR}/${PN}-py3-test-clarify.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() {
+ is-flagq -flto* && filter-flags -flto* -fuse-linker-plugin
+
+ 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|,$||'`"
+
+ local 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")
+ )
+
+ python_configure() {
+ waf-utils_src_configure "${myconf[@]}"
+ }
+ python_foreach_impl run_in_build_dir python_configure
+}
+
+src_compile() {
+ unset MAKEOPTS
+ python_compile() {
+ waf-utils_src_compile --notests
+ }
+ python_foreach_impl run_in_build_dir python_compile
+}
+
+src_test() {
+ python_compile() {
+ waf-utils_src_compile check
+ }
+ python_foreach_impl run_in_build_dir python_compile
+}
+
+python_test() {
+ # Silence QA warning as we're running tests via src_test anyway.
+ :;
+}
+
+src_install() {
+ python_install() {
+ waf-utils_src_install --notests
+ python_fix_shebang "${ED}"
+ }
+ python_foreach_impl run_in_build_dir python_install
+ python_foreach_impl python_optimize
+
+ # Install heat generating scripts
+ use heat && dosbin "${S}"/contrib/ntpheat{,usb}
+
+ # Install the openrc files
+ newinitd "${FILESDIR}"/ntpd.rc-r2 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 log rotate 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
+}
+
+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 2065ee52d6a6..4d49e9065f2e 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE='threads(+)'
DISTUTILS_USE_SETUPTOOLS=no
@@ -13,9 +13,8 @@ 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/${PN}-${PV}.tar.gz"
- RESTRICT="mirror"
- KEYWORDS="amd64 arm arm64 ~riscv ~x86"
+ SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
fi
DESCRIPTION="The NTP reference implementation, refactored"
@@ -24,41 +23,38 @@ HOMEPAGE="https://www.ntpsec.org/"
NTPSEC_REFCLOCK=(
oncore trimble truetime gpsd jjy generic spectracom
shm pps hpgps zyfer arbiter nmea modem local
- )
+)
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 tests" #ionice
+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
-CDEPEND="${PYTHON_DEPS}
- sys-libs/libcap
+DEPEND="${PYTHON_DEPS}
+ dev-libs/openssl:=
dev-python/psutil[${PYTHON_USEDEP}]
+ sys-libs/libcap
libbsd? ( dev-libs/libbsd:0= )
- dev-libs/openssl:0=
seccomp? ( sys-libs/libseccomp )
-"
-RDEPEND="${CDEPEND}
- ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
+ 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
-"
-DEPEND="${CDEPEND}
- >=app-text/asciidoc-8.6.8
+ ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )"
+BDEPEND=">=app-text/asciidoc-8.6.8
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
- sys-devel/bison
- rclock_oncore? ( net-misc/pps-tools )
- rclock_pps? ( net-misc/pps-tools )
-"
+ sys-devel/bison"
PATCHES=(
"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
+ "${FILESDIR}/${PN}-py3-test-clarify.patch"
)
WAF_BINARY="${S}/waf"
@@ -92,6 +88,7 @@ src_configure() {
CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
local myconf=(
+ --notests
--nopyc
--nopyo
--enable-pylib ext
@@ -103,7 +100,6 @@ src_configure() {
$(use samba && echo "--enable-mssntp")
$(use seccomp && echo "--enable-seccomp")
$(use smear && echo "--enable-leap-smear")
- $(use tests && echo "--alltests")
$(use debug && echo "--enable-debug")
)
@@ -116,14 +112,26 @@ src_configure() {
src_compile() {
unset MAKEOPTS
python_compile() {
- waf-utils_src_compile
+ waf-utils_src_compile --notests
}
python_foreach_impl run_in_build_dir python_compile
}
+src_test() {
+ python_compile() {
+ waf-utils_src_compile check
+ }
+ python_foreach_impl run_in_build_dir python_compile
+}
+
+python_test() {
+ # Silence QA warning as we're running tests via src_test anyway.
+ :;
+}
+
src_install() {
python_install() {
- waf-utils_src_install
+ waf-utils_src_install --notests
python_fix_shebang "${ED}"
}
python_foreach_impl run_in_build_dir python_install