summaryrefslogtreecommitdiff
path: root/net-misc/ntpsec
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-15 00:09:17 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-15 00:09:17 +0100
commit6a7029e0f7370d4d5dfe9e31cc2719a870482392 (patch)
tree28c6c747114eaedfd2db81f86ac2ff3d7d13111e /net-misc/ntpsec
parent5e41a38157bb40e8513e8e34426e85faba672fe7 (diff)
gentoo auto-resync : 15:06:2024 - 00:09:17
Diffstat (limited to 'net-misc/ntpsec')
-rw-r--r--net-misc/ntpsec/Manifest11
-rw-r--r--net-misc/ntpsec/files/flit.toml34
-rw-r--r--net-misc/ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch38
-rw-r--r--net-misc/ntpsec/metadata.xml15
-rw-r--r--net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild197
-rw-r--r--net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild193
-rw-r--r--net-misc/ntpsec/ntpsec-1.2.3.ebuild2
-rw-r--r--net-misc/ntpsec/ntpsec-9999.ebuild62
8 files changed, 523 insertions, 29 deletions
diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
index f7c423961e96..e92ca8b376a9 100644
--- a/net-misc/ntpsec/Manifest
+++ b/net-misc/ntpsec/Manifest
@@ -1,15 +1,20 @@
+AUX flit.toml 971 BLAKE2B bbdb410025abd4c7be4e9aee4aa551f33ab924ee536bd23269ed52f3491de6f3cfc8efb2c76a11f751b90a9dab2d81fa3c073534edf86099e0b0e3fb1b414371 SHA512 6a729332a0431c09e083245c311e82677b8f81d6a9b7c37d3399f5d028dbfb565c37b5b59a75a36b2a99370e5c8043f0318b2b027851bd76f2761ded7e54f87c
AUX ntp.conf 727 BLAKE2B 1b37cee807c41593ffc44994e390c98406c49154477bc2a603ba4037308ac1e3c83fc49700c1c0d6ee2e3f274dcb76bc13bfaeefdc9cd533a56cef9454ee27eb SHA512 5b55618b870e436b2160e46ede5e1b8031dab368d72bf376a6a9664f1cb528ae37e10eedeb7d438fee8155e3c50139ac240af95a14215aebbfef3133f3b68694
AUX ntpd-r1.service 613 BLAKE2B 9e0d0fdefa670c2ac25142bfb37880ce4ba0662f70f7cf9acb02f9016bfeabd94a043e92d1b1be11e74b838e9cc91d7d7c1144539917c927537e67f92b45003e SHA512 cdfbc735e157306597ff3c37b5aea34d64c66a69bbb9dbfba6c7eb57d6b201c9d2e86969e5be9b8331e75e1de8eaa17ee4d8f72bed9bc058a6198bf5a2d717c6
AUX ntpd.confd 90 BLAKE2B 980ea88c97b1deff65f53c13410fe46bc1e19a80140776002ae2fdc0a3ad18c9855b74a70f1a89eb31854bbdad6729753c3a199cddb25b58178a79a0ea0a7050 SHA512 a2fdf88f6f55bcf0a6545db77817e3a740dba50bf56b4fdd80d335e8c909d0880fbd962041754d7f5fb3946ed131d9a739ec72008bacab9f1f47ff82dc74c542
AUX ntpd.rc-r3 491 BLAKE2B e91eb8921b60142d9f827abf7c2a4e4e48be423b3227cbe736433d2423db8f9927d4af34e82e1577ae294e1819ba4313279911288c29248d202fd57675da6fec SHA512 d9d30654842932b5e5d276b2b59c6cf5a95aadbe68f32e818103f576877b4a5e204498cc53a2f9491db2a37378ba176fc3fc1d6ed4b7b4b529b75cc7fec2ae92
AUX ntpsec-1.1.9-remove-asciidoctor-from-config.patch 680 BLAKE2B 7204a831b3dc0dba7f268febd10fa7599ef6b9bee30199ce10529d2d326719f5b376d301aabfef3beacecd4af813bcef1d6a65d61ab00996d72f1240f83ef8e3 SHA512 3e012ad70507f440ed3a4aca4886a96e40d49a0dd7c14572f664633a56139cb7767e07ee1bb5e8295fc32052914364660c928d11369b6f80193ae7e190e5a48e
AUX ntpsec-1.2.2-logrotate.patch 663 BLAKE2B c5e8eca739909695b6fd6cf7e507acb8e49a8eb2eebbf2afe83733159b8240f563a22a7389ac58373c10df104ee5dd34c7aec40787200bd3d704e5f0273cfc42 SHA512 ccba1116fac3fcb8dc075c81f2d8ed24399b41b6718ae65ed042b0da8bf19c0a5259650323a9b1d6f0e5c44ae167874ccaca7cbdd50b38955b17a4a49840c863
+AUX ntpsec-1.2.3-pep517-no-egg.patch 1147 BLAKE2B 653e9cce60feece6d906b06263e9b44e93f07ca41430e6d2021f105bdfbcf2e7405c02974419d124c7ea6b64110b5ad2aec48c5d044f5011aaad339647a13405 SHA512 bbdfa0441d5a353872fd6fdaed8acea3133440766a2dc96178d3367cc24360b94d5473c9d0ad97bffa9e1c9044ba9af78fc1732ea52a98d218452fe91cbca98f
AUX ntpsec-no-bsd.patch 1538 BLAKE2B 6abb7acf23149a5a47f8e479bff090966e7e6161fc0d5bca1f9e5b9396d90898a783e7d309d6cdbdf689ea12314c804aa7a39f05b3f11d75a95eb337cea95b55 SHA512 7ddb346c7f0c9b30ea08ac28eaa39cf86e3d6cee7eaeba3bc7fe0883acd5087966e4e7beb298cee02607dfa3198a8c1dfcd9ce43ead820de3bb7014cefe75302
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
DIST ntpsec-1.2.3.tar.gz 2725081 BLAKE2B d39a4d08790949afb28b843739a410624a8d862bfc25afd4e6c7dc55be43e41f3c89823406c60fb911496e7a3db51d6fa83c8bcda9b9686708c36154c2fe9686 SHA512 6baecf32f499fc12c2ef0b44360072b61ab9e8b52ec7ead64ff43a27b5a57431db939d4ce1fad92d38def981f6256a1d8ede0c0cdc5abb50d861be729255eee2
DIST ntpsec-1.2.3.tar.gz.asc 833 BLAKE2B f0d6a0b163a7f9214da6d6eb1982f87387a7087efb740ec146f55362381aa101a5a8e40c27f121ca6607c0a5c429b1e06ecaf9a9ab5392d836535430cf6575fa SHA512 17280e3092e7e9de0ddae0723637a261d3a740d916ce0f016c44c6010672cfe2fc39b45f86257cfa5bd29f1f11895f8bd583c76765c6484489027cbc82dbe6b2
+DIST waf-2.0.27 105950 BLAKE2B b01cc3539f6d9c8aadd9ef95b4821f9b5314e92b4bc7b930ff193e0382de1b23f0b92da88bfe0273df146437c24779f5f5443895dc0743e8acae58e03c7cb406 SHA512 22c21dfcbf5ed25c25040ab04f62326f271b2b18ff96ca7598dadf68230d21d70cef1c9d7ef56721edbd9c737a56576fd4a9ffac1b00cb93d5c013b8f3a9d97e
+EBUILD ntpsec-1.2.2a-r1.ebuild 4928 BLAKE2B f5e8aa1a841100449d8c675dbd2f74c9bfca092b7b8c579a4c5bef2ee8ec37807405def4eac67c0ce2e7f90f8489683c4aee02dad24db5bd694af71e2cc5ffa7 SHA512 34cf40bfeb55bbc710ba380b84261f7dbe4ed7382c955c63c93a245bb9bbf0f2cb730165bf6d6669478d0bff70ad9aca0dccb01a5480fbdb6029c2f37a097e96
EBUILD ntpsec-1.2.2a.ebuild 4400 BLAKE2B a8329fecac0ecaa5643dbcccbb77c6c3c3b944677f1c5bfb350e21a2d734b8f20862cc3b0fdc1c3135e8de4f75d11bcad523cb27b4f062af1839ba592738b387 SHA512 46b98f059d76924fda38340b6803935ec97ad9aa3dcd68d95f4913d7f733581e1253e322ee8357735ef6d9942482eeecbc3cc259e3511c94ff0ecbfbb87c2a93
-EBUILD ntpsec-1.2.3.ebuild 4354 BLAKE2B f2562e3eb9fc87b2691790107e8fd59cf69dfb8be91aff1b789dcf685558ac36e9bd0a8dbcb9622d561bb143602a0f4377076b10514b71ca747f4c056b3bece0 SHA512 c8f455d19537c7e4f3d13d449702052a27fdd407756b3b8c2174b197251ac5f345028905bd247cb2662d3da2e36e6680a93a6a7b7cb9773c0847836a743bb18b
-EBUILD ntpsec-9999.ebuild 4357 BLAKE2B 9ec09cbdebd9fb42cc1cb29f6bc83b5508fe672c851c96442147df5428b630f04ac6f745216cba80f7ed840304938f30815070f26aa52f51610e62b8ce972334 SHA512 793da62d08d511c1bc9c769de7d8eaa8ed7bfca9aea4cc1d285ab5c41b405627b54cbffe6c02e1dabaf7a25de6232e96dc12fff9b5ce0d8c91f41c3f2a84b9e6
-MISC metadata.xml 1777 BLAKE2B e324b32f904e5f076331594aefa32e5174e917a78fb0e1ca0361a2a0cae8f7813637e044d6c351e3f1d07d01733062def59666b89f73d134a507332585f29ae9 SHA512 db03c0268e00fea3701979e30b3bb3b1677de9f2c6692c99eb78cf5a929ca39cb8f379add7ba6786f1ddbb80e1b9263ec46bf459706996c12f3fd38bbc9452ea
+EBUILD ntpsec-1.2.3-r1.ebuild 4761 BLAKE2B b85b41993e44b2f5ca562db0c2b87ee637ec1fcac99f5d8f1311b660612a4486e6a66f374451750890e0bd3ffa85d4104a94b423d4c61f2b9c428b5b4678f8c9 SHA512 b9def6c11cc8a55138a269e3764fd15251e2a25086012bae1457d1e3ea6e48b4f7e7bb9a3c325bb9ad95e589d07f08af259a7051d0375934dee9c53ac1fe27c4
+EBUILD ntpsec-1.2.3.ebuild 4352 BLAKE2B ca2448d2a39601ec53efe061435581f896f844d3e87f76e29c29875e413b46e9d56469cc3e52d55982fef9d61f2faf43618887e525c421266b89dac5a6164202 SHA512 9584fad1dbd5a1755f52ece791ed0590c974427c6de3552fbc67d1bb515f25b5df9792ef4ebfba3a95f7dc61d44f1611337163abf80fffbd909e87c0d9817f4f
+EBUILD ntpsec-9999.ebuild 4761 BLAKE2B b85b41993e44b2f5ca562db0c2b87ee637ec1fcac99f5d8f1311b660612a4486e6a66f374451750890e0bd3ffa85d4104a94b423d4c61f2b9c428b5b4678f8c9 SHA512 b9def6c11cc8a55138a269e3764fd15251e2a25086012bae1457d1e3ea6e48b4f7e7bb9a3c325bb9ad95e589d07f08af259a7051d0375934dee9c53ac1fe27c4
+MISC metadata.xml 2612 BLAKE2B 4333e99791da57969b1745266fc6a24056da02f6bdfe11cb0d279a7eb259f82f0812e87bd828cd912cb643cd3e67ada44727e6f0237183d293f01532f250c2ae SHA512 cdb45516847d9afcc1e18511c1820d2426d2678cc8b9dd0e5574d10085205f197d5f38cba8f6050979241274fbb9de5a49d3348e096a76c9271f133a6da48cb8
diff --git a/net-misc/ntpsec/files/flit.toml b/net-misc/ntpsec/files/flit.toml
new file mode 100644
index 000000000000..b3c782f9bc30
--- /dev/null
+++ b/net-misc/ntpsec/files/flit.toml
@@ -0,0 +1,34 @@
+[project]
+name = "ntp"
+version = "@NTPSEC_VERSION_EXTENDED@"
+dependencies = ["argparse"]
+requires-python = ">=2.6"
+authors = [
+ {name = "the NTPsec project", email = "devel@ntpsec.org"},
+]
+maintainers = [
+ {name = "the NTPsec project", email = "devel@ntpsec.org"}
+]
+description = "The NTP reference implementation, refactored"
+license = {text = "BSD 2 License"}
+keywords = ["ntp"]
+classifiers = [
+ 'Development Status :: 5 - Production/Stable',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: POSIX',
+ 'Programming Language :: Python',
+]
+
+[project.urls]
+Homepage = "https://www.ntpsec.org/"
+Documentation = "https://www.ntpsec.org/latest/"
+Repository = "https://gitlab.com/NTPsec/ntpsec/"
+"Bug Tracker" = "https://gitlab.com/NTPsec/ntpsec/-/issues"
+Changelog = "https://gitlab.com/NTPsec/ntpsec/-/blob/master/NEWS.adoc"
+
+[build-system]
+requires = ["flit_core >=3.2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.module]
+name = "ntp"
diff --git a/net-misc/ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch b/net-misc/ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch
new file mode 100644
index 000000000000..549a69792af4
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch
@@ -0,0 +1,38 @@
+diff --git a/pylib/ntp-in.egg-info b/pylib/ntp-in.egg-info
+deleted file mode 100644
+index b672a8431..000000000
+--- a/pylib/ntp-in.egg-info
++++ /dev/null
+@@ -1,12 +0,0 @@
+-Metadata-Version: 1.0
+-Name: ntpsec
+-Version: @NTPSEC_VERSION_EXTENDED@
+-Platform: POSIX
+-Summary: The NTP reference implementation, refactored
+-Home-page: https://ntpsec.org/
+-License: Beerware, BSD-2-Clause, BSD-3-Clause, BSD-4-Clause, CC-BY-4.0, ISC, MIT, NTP
+-Description:
+- The Network Time Protocol suite, refactored
+-Author: the NTPsec project
+-Author-email: devel@ntpsec.org
+-Keywords:
+\ No newline at end of file
+diff --git a/pylib/wscript b/pylib/wscript
+index e285b768b..1137fb814 100644
+--- a/pylib/wscript
++++ b/pylib/wscript
+@@ -96,11 +96,9 @@ def build(ctx):
+ install_path='${PYTHONARCHDIR}/ntp'
+ )
+
+- # pep241 lay an egg
+- egg = ['ntp-%s.egg-info' % ctx.env.NTPSEC_VERSION]
++ # pep517 pyproject.toml
+ ctx(
+ features="subst",
+- source=['ntp-in.egg-info'],
+- target=egg
++ source=['pyproject.toml'],
++ target=['../pyproject.toml']
+ )
+- ctx.install_files(ctx.env.PYTHONARCHDIR, egg)
diff --git a/net-misc/ntpsec/metadata.xml b/net-misc/ntpsec/metadata.xml
index 864309f6a22b..a2ce6c3f8cbc 100644
--- a/net-misc/ntpsec/metadata.xml
+++ b/net-misc/ntpsec/metadata.xml
@@ -27,6 +27,21 @@
<flag name="rclock_nmea">NMEA GPS driver</flag>
<flag name="rclock_modem">NIST/USNO/PTB Modem Time Services</flag>
<flag name="rclock_local">Support for undisciplined local clock (not recommended)</flag>
+ <flag name="oncore">Oncore driver</flag>
+ <flag name="trimble">Trimble driver</flag>
+ <flag name="truetime">Trutime driver (deprecated)</flag>
+ <flag name="gpsd">Enable gpsd daemon support</flag>
+ <flag name="jjy">JJY driver</flag>
+ <flag name="generic">Enable support for generic time radios and GPSDOs</flag>
+ <flag name="spectracom">Spectracom driver</flag>
+ <flag name="shm">Obtain refclock info from shared memory-segment</flag>
+ <flag name="pps">PPS cesium clock driver</flag>
+ <flag name="hpgps">Hewlett Packard GPS driver</flag>
+ <flag name="zyfer">Zyfer driver</flag>
+ <flag name="arbiter">Arbiter 1088A/B GPS driver</flag>
+ <flag name="nmea">NMEA GPS driver</flag>
+ <flag name="modem">NIST/USNO/PTB Modem Time Services</flag>
+ <flag name="local">Support for undisciplined local clock (not recommended)</flag>
<flag name="smear">Specify the interval over which a leap second is applied (experimental)</flag>
</use>
</pkgmetadata>
diff --git a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
new file mode 100644
index 000000000000..00428f679c48
--- /dev/null
+++ b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517="flit"
+PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit distutils-r1 flag-o-matic multiprocessing 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=/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 )
+ https://waf.io/waf-2.0.27
+ "
+ 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[@]} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear test" #ionice
+REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( local )"
+RESTRICT="!test? ( test )"
+
+# 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 )
+ oncore? ( net-misc/pps-tools )
+ 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
+ app-alternatives/yacc
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
+ "${FILESDIR}/${PN}-1.2.2-logrotate.patch"
+ "${FILESDIR}/${PN}-1.2.3-pep517-no-egg.patch"
+)
+
+WAF_BINARY="${S}/waf"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ elif use verify-sig ; then
+ # Needed for downloaded waf which is unsigned
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+ fi
+
+ default
+}
+
+src_prepare() {
+ cp -v "${DISTDIR}/waf-2.0.27" "${WAF_BINARY}" || die
+ chmod -v ugo+x "${WAF_BINARY}" || die
+ 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
+}
+
+src_configure() {
+ filter-lto
+
+ local string_127=""
+ local rclocks="";
+ local CLOCKSTRING=""
+
+ for refclock in ${NTPSEC_REFCLOCK[@]} ; do
+ if use ${refclock} ; then
+ string_127+="$refclock,"
+ fi
+ done
+ CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
+
+ myconf=(
+ --notests
+ --nopyc
+ --nopyo
+ --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_setup
+ cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml" || die
+ waf-utils_src_configure "${myconf[@]}"
+}
+
+src_compile() {
+ waf-utils_src_compile --notests
+
+ ln -svf pylib build/main/ntp || die
+ cd build/main || die
+ distutils-r1_src_compile
+}
+
+src_test() {
+ cd build/main || die
+ distutils-r1_src_test
+}
+
+python_test() {
+ "${EPYTHON}" "${WAF_BINARY}" check -v -j $(makeopts_jobs) || die
+}
+
+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
+
+ ln -svf pylib build/main/ntp || die
+ distutils-r1_src_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-1.2.3-r1.ebuild b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
new file mode 100644
index 000000000000..2268d6f6574a
--- /dev/null
+++ b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517="flit"
+PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit distutils-r1 flag-o-matic multiprocessing 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=/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[@]} debug doc early heat libbsd nist ntpviz samba seccomp smear test" #ionice
+REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( local )"
+RESTRICT="!test? ( test )"
+
+# 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 )
+ oncore? ( net-misc/pps-tools )
+ 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
+ app-alternatives/yacc
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
+ "${FILESDIR}/${PN}-1.2.2-logrotate.patch"
+ "${FILESDIR}/${PN}-1.2.3-pep517-no-egg.patch"
+)
+
+WAF_BINARY="${S}/waf"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ elif use verify-sig ; then
+ # Needed for downloaded waf which is unsigned
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+ fi
+
+ default
+}
+
+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
+}
+
+src_configure() {
+ filter-lto
+
+ local string_127=""
+ local rclocks="";
+ local CLOCKSTRING=""
+
+ for refclock in ${NTPSEC_REFCLOCK[@]} ; do
+ if use ${refclock} ; then
+ string_127+="$refclock,"
+ fi
+ done
+ CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
+
+ myconf=(
+ --notests
+ --nopyc
+ --nopyo
+ --refclock="${CLOCKSTRING}"
+ #--build-epoch="$(date +%s)"
+ $(use doc || echo "--disable-doc")
+ $(use early && echo "--enable-early-droproot")
+ $(use samba && echo "--enable-mssntp")
+ $(use seccomp && echo "--enable-seccomp")
+ $(use smear && echo "--enable-leap-smear")
+ $(use debug && echo "--enable-debug")
+ )
+ python_setup
+ cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml" || die
+ waf-utils_src_configure "${myconf[@]}"
+}
+
+src_compile() {
+ waf-utils_src_compile --notests
+
+ ln -svf pylib build/main/ntp || die
+ cd build/main || die
+ distutils-r1_src_compile
+}
+
+src_test() {
+ cd build/main || die
+ distutils-r1_src_test
+}
+
+python_test() {
+ "${EPYTHON}" "${WAF_BINARY}" check -v -j $(makeopts_jobs) || die
+}
+
+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
+
+ ln -svf pylib build/main/ntp || die
+ distutils-r1_src_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-1.2.3.ebuild b/net-misc/ntpsec/ntpsec-1.2.3.ebuild
index 29d8829e72d7..2fd6e5cad45b 100644
--- a/net-misc/ntpsec/ntpsec-1.2.3.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.3.ebuild
@@ -10,7 +10,7 @@ DISTUTILS_USE_SETUPTOOLS=no
inherit distutils-r1 flag-o-matic waf-utils systemd
-if [[ ${PV} == *9999* ]]; then
+if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
else
diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-9999.ebuild
index ca1b744563fb..2268d6f6574a 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -4,13 +4,13 @@
EAPI=8
DISTUTILS_EXT=1
-PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_USE_PEP517="flit"
+PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE='threads(+)'
-DISTUTILS_USE_SETUPTOOLS=no
-inherit distutils-r1 flag-o-matic waf-utils systemd
+inherit distutils-r1 flag-o-matic multiprocessing waf-utils systemd
-if [[ ${PV} == *9999* ]]; then
+if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
else
@@ -36,10 +36,9 @@ NTPSEC_REFCLOCK=(
shm pps hpgps zyfer arbiter nmea modem local
)
-IUSE_NTPSEC_REFCLOCK=${NTPSEC_REFCLOCK[@]/#/rclock_}
-
-IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early heat libbsd nist ntpviz samba seccomp smear" #ionice
-REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
+IUSE="${NTPSEC_REFCLOCK[@]} debug doc early heat libbsd nist ntpviz samba seccomp smear test" #ionice
+REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( local )"
+RESTRICT="!test? ( test )"
# net-misc/pps-tools oncore,pps
DEPEND="
@@ -49,8 +48,8 @@ DEPEND="
sys-libs/libcap
libbsd? ( dev-libs/libbsd:0= )
seccomp? ( sys-libs/libseccomp )
- rclock_oncore? ( net-misc/pps-tools )
- rclock_pps? ( net-misc/pps-tools )
+ oncore? ( net-misc/pps-tools )
+ pps? ( net-misc/pps-tools )
"
RDEPEND="
${DEPEND}
@@ -73,10 +72,22 @@ BDEPEND+="
PATCHES=(
"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
"${FILESDIR}/${PN}-1.2.2-logrotate.patch"
+ "${FILESDIR}/${PN}-1.2.3-pep517-no-egg.patch"
)
WAF_BINARY="${S}/waf"
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ elif use verify-sig ; then
+ # Needed for downloaded waf which is unsigned
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
+ fi
+
+ default
+}
+
src_prepare() {
default
@@ -87,8 +98,6 @@ src_prepare() {
fi
# remove extra default pool servers
sed -i '/use-pool/s/^/#/' "${S}"/etc/ntp.d/default.conf || die
-
- python_copy_sources
}
src_configure() {
@@ -99,7 +108,7 @@ src_configure() {
local CLOCKSTRING=""
for refclock in ${NTPSEC_REFCLOCK[@]} ; do
- if use rclock_${refclock} ; then
+ if use ${refclock} ; then
string_127+="$refclock,"
fi
done
@@ -109,7 +118,6 @@ src_configure() {
--notests
--nopyc
--nopyo
- --enable-pylib ext
--refclock="${CLOCKSTRING}"
#--build-epoch="$(date +%s)"
$(use doc || echo "--disable-doc")
@@ -119,25 +127,29 @@ src_configure() {
$(use smear && echo "--enable-leap-smear")
$(use debug && echo "--enable-debug")
)
-
- distutils-r1_src_configure
-}
-
-python_configure() {
+ python_setup
+ cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml" || die
waf-utils_src_configure "${myconf[@]}"
}
-python_compile() {
+src_compile() {
waf-utils_src_compile --notests
+
+ ln -svf pylib build/main/ntp || die
+ cd build/main || die
+ distutils-r1_src_compile
+}
+
+src_test() {
+ cd build/main || die
+ distutils-r1_src_test
}
python_test() {
- waf-utils_src_compile check
+ "${EPYTHON}" "${WAF_BINARY}" check -v -j $(makeopts_jobs) || die
}
src_install() {
- distutils-r1_src_install
-
# Install heat generating scripts
use heat && dosbin "${S}"/contrib/ntpheat{,usb}
@@ -164,9 +176,9 @@ src_install() {
# 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() {
+ ln -svf pylib build/main/ntp || die
+ distutils-r1_src_install
waf-utils_src_install --notests
python_fix_shebang "${ED}"
python_optimize