summaryrefslogtreecommitdiff
path: root/net-misc/ntp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-04 08:06:08 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-04 08:06:08 +0100
commit2a8d2f71d1d9963368e0ef3d641d75979a689d12 (patch)
tree83e283f960ab2ebbc1a042b8ed6c37b78d47b37b /net-misc/ntp
parent8435c842b9e8fbb2bcc80397ab3aa655000459e2 (diff)
gentoo auto-resync : 04:07:2024 - 08:06:07
Diffstat (limited to 'net-misc/ntp')
-rw-r--r--net-misc/ntp/Manifest3
-rw-r--r--net-misc/ntp/files/ntp-4.2.8_p18-ipc-caps.patch19
-rw-r--r--net-misc/ntp/ntp-4.2.8_p18.ebuild166
3 files changed, 188 insertions, 0 deletions
diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest
index 54c78de819e9..149df4fddd52 100644
--- a/net-misc/ntp/Manifest
+++ b/net-misc/ntp/Manifest
@@ -7,6 +7,7 @@ AUX ntp-4.2.8_p14-add_cap_ipc_lock.patch 474 BLAKE2B 5045ea1d6b07de0bd3ea46e0dc6
AUX ntp-4.2.8_p15-configure-clang16.patch 18493 BLAKE2B bb0a0b4bc77b8e7ad3a56e208629be039bc91e8c7767ef025cb8678ee3a8ccb503071c571c858721e3a7f108cbd75760f8a6800eee29e8f3482ead96f87f5974 SHA512 48490ff44515586179b606be3ce4f9d5085641e6f96edd0234a00b48a4ceb7399a305dbd9ea8df496d92cd624bfea8e5d448f2d52b4207a05fa700e67aa05ef7
AUX ntp-4.2.8_p15-gcc10.patch 2019 BLAKE2B df64e28c70d7aa1cf2513b594dc5f79f0be862c6dd0ba3e3e75e6bce394eeaff2bd994e65ad4435d212bd1b2c406e49e587c72a6c8f9fc1f63fa166dac717844 SHA512 15f2756c1ac370f4896ffc1d8bd340bb7c09869c47a78edc66da855855c9dca0adeef0e03d262ace9c7ae408c2bcb080d6e01e4fc32783518fb8db28b08200b7
AUX ntp-4.2.8_p15-glibc-2.34.patch 928 BLAKE2B 993f2c6ab2b4e6242811d553e0021911bbae37ba5febbbf9914bef5481c3b1472c273fc04a6d6f1e420bed2b4eb3193bc4a9532faa6b23e9f2a2802b1664e187 SHA512 474f50f92b105cbd3e9b3700418114ea65c3998e28ddb7a11d45602a7865bdcad07ee251176bf2e4012e3a15792a4334ee85aca198cbb98c757fc12cdd09747d
+AUX ntp-4.2.8_p18-ipc-caps.patch 476 BLAKE2B 2b79dca1152e83be776ae152f384d0aaa3451ffbeb96f5216324cf0adf0fe2ad05a01627406ccff09e5d70e3db549fe0ddceb6d543fc65cbe6b49093360e73c6 SHA512 197dc6b825932c195cd52ef7306efcbe50023f3bc4b9ff21e4e0c9e93b0090daf2f56e990ca17f9b128ea8f22dbc3f7bc48d952d3b6858748ed854a301f5b3b9
AUX ntp-client.confd 776 BLAKE2B 7c65232560d4443f21bea7e5e0e8183f8397e092b6c489faa18188b9df9f8678244cd816e6d8d6e12b8d89a2b33873b9d0a2173957217879320db20744b3876c SHA512 2d6b9d96c55787cf4556332054a61399368dcf37cf76a14aaba3f8e2e4fdd47ce25808f9babda2ca1f2a6e7387c043e023251ba2b99786426c875bd7cb6592a6
AUX ntp-client.rc 720 BLAKE2B 5662d2f6635b8d5bb07fbc82c259a8af7871b8312ebff0184005d3ea24f239a1d3e2b63a5a7e9eef8f385a72fcd9370a2e68031a7c54bf3ef28e8c26c97c0298 SHA512 557cb44fc911dcf34d21227c5d92c2ab56ca3fd855a5d2715c5f7343ae45a91c4b5492a84ac01a712bc251ea2a83810f4eb33e467b456b42c79052454a68dc81
AUX ntp.conf 1614 BLAKE2B 88158ad4270a7b3f42de7d3dcaa5a2dc5f7900171c0259834ff781372bdb0e6b06d46c009890a0a2ab4b60b6759bc650324994a2b81ef9b9d0bc922047add9bc SHA512 b21afb9d2b9302edf702fce536218fa916e810e916c207dd6f2f09a9a793a465bc929b9a36108d49ddb3552e221b57cbb2e9f916eba78662b19c4b9c2b3e806c
@@ -23,7 +24,9 @@ AUX sntp.service.conf 119 BLAKE2B ee94067e5aef213a15d211e36362f2b4e8e66dfc739be6
DIST ntp-4.2.8p15-manpages.tar.xz 25700 BLAKE2B 6a225bc19dcebee31cb8e0d621963863d567a882655b57be8b65a16f9d3dd138787c7c6b9ff08853306f2e9b11d65cb76e3215cc5b2262a91c411d437974fc18 SHA512 21721550864b4e7e91bf20ca894109253439b737799dfc803e1496b3454199f34646f40e0156c08a39d5914e5a92f35908cec0245e1e2627c75c0e64939ba028
DIST ntp-4.2.8p15.tar.gz 7015970 BLAKE2B 5697d6623d79686f9ca9ad907172bf942383067d1e9817117d20db042e9f7410644f236f1a0d77ab6bf6ec468476e12ea65b494a28f0dd8674bf08fc8875cfef SHA512 f5ad765e45fc302263dd40e94c287698fd235b94f3684e49f1d5d09d7d8bdd6b8c0fb96ecdabffea3d233e1e79b3c9687b76dc204ba76bad3f554682f4a97794
DIST ntp-4.2.8p17.tar.gz 7120469 BLAKE2B 5c0e90a234cdeab76e7443b42dfd5a0c3c78693a11bdb0fa21c8def91adbdf9b9871498df9d211509632812a9107501da3470104122e9621577541ffd6cd1ab6 SHA512 e003bfe6f46065890663bc6791b02277f64318b692e49d8d678b76c23b245f357834eb483b0a44f1f47783166e5504686b36494af77f6eebe6f844cd3f2b6a8c
+DIST ntp-4.2.8p18.tar.gz 7210799 BLAKE2B 9a7bb767d2d8ae3a7224542df7978f8289cbdf28488c5e4dce4c549cdd1063259f69548898a352c0463ce83c4725bfd7c7dbf673ee3b74e490d7b1275760497c SHA512 c314f645d7d85e1028327657f30557cdfd86d417565b6c9fcbb40fca8a4c22a97b70908e8b73c6b31e14915b5b910ae0055fd42e819dd3cb48583b2a826c3fc4
EBUILD ntp-4.2.8_p15-r6.ebuild 4629 BLAKE2B 1aa9260d9af3c3ebcd90dd6e2a31aa451d2da246169c18adee9b224aef366c0f9b8e545a6265aebc8f93632d19f2048f491bf40923a362815ed28d912d226070 SHA512 8885b65c869f6fbb325a07f2b4a2e752f3875042329c9e7420b8e24468873ebd58b66fe3c4f20079e4291154ef20bbe3df18e0f1c6ad43de7955c78de9b43be4
EBUILD ntp-4.2.8_p17-r1.ebuild 4657 BLAKE2B 8adca9f03e9522e9ee01bd2ae2d814ed144acfcaeee37776443c18713b105958f26c11b0299fee64a0cb4165ce46a6c87304b74ffe7ddfbb1e9980e2a2ab422d SHA512 a7e86267cafd30e7908a468deebee23d6772f565e26ec0d17886073c4a2b51645aadf727d2bd27574e385aae9abde5b5081250f5e6273e7359c3ee3a66f5253a
EBUILD ntp-4.2.8_p17-r2.ebuild 4561 BLAKE2B 5b525dab8dd214f997ff31d5218e3503c0bc44356caca93d224199a960224cda7302efb2f7612af87127e800042cf013657e81e8b8a628264ae223c7beec0b6d SHA512 00b72ff03483ca2ab4663c693c3e68fddcfdb7b581888520d278e6c183a2bd13465dabdc5a7596cafc8e1bf37ac19dba5f297f3a5a0faf6d8ca9a14bfa955d7c
+EBUILD ntp-4.2.8_p18.ebuild 4690 BLAKE2B 6603d83664e16841815279ee27377f0348b3a27aabda172b3b1bd930d7394a590ecf15689157e5830721e3699cfa5cbf5da8ac48f5b07df839e0e4a2b294a56f SHA512 ed7166c8fcb98630af8131e6c52369a374df66e1c178485db28c773a840d582e59d05db2ff5a96f4617209cc1daa14029cca459d1c0acd9580e89de868a0bee7
MISC metadata.xml 1023 BLAKE2B 58da2b7578162aa1650d5a0bba7f3384a36dcfcdb4c52003b2aa3fd2ee89a1d01239a4e462b874dfa96b0913597cf0384f78d4da79148ca1e52e8aca29b583c3 SHA512 510fbd0761a097d214225640c0a60da8c77b06af41cb77748cd73c7c04add5e4651dd07f0eef9f083343570a6fe5f0bdcf84b38b5b65df815abd8bbaea048791
diff --git a/net-misc/ntp/files/ntp-4.2.8_p18-ipc-caps.patch b/net-misc/ntp/files/ntp-4.2.8_p18-ipc-caps.patch
new file mode 100644
index 000000000000..8676603a6cee
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8_p18-ipc-caps.patch
@@ -0,0 +1,19 @@
+https://bugs.ntp.org/show_bug.cgi?id=2646
+https://bugs.gentoo.org/533966
+
+--- a/ntpd/ntpd.c
++++ b/ntpd/ntpd.c
+@@ -1299,10 +1299,10 @@
+ */
+ cap_t caps;
+ char *captext;
+-
++
+ captext = (scan_addrs_once)
+- ? "cap_sys_time=pe"
+- : "cap_sys_time,cap_net_bind_service=pe";
++ ? "cap_ipc_lock,cap_sys_time=pe"
++ : "cap_ipc_lock,cap_sys_time,cap_net_bind_service=pe";
+ caps = cap_from_text(captext);
+ if (!caps) {
+ msyslog(LOG_ERR,
diff --git a/net-misc/ntp/ntp-4.2.8_p18.ebuild b/net-misc/ntp/ntp-4.2.8_p18.ebuild
new file mode 100644
index 000000000000..04b70f2428cc
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p18.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic systemd tmpfiles
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="https://www.ntp.org/"
+SRC_URI="https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="caps debug openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+DEPEND="
+ >=dev-libs/libevent-2.0.9:=[threads(+)?]
+ readline? ( >=sys-libs/readline-4.1:= )
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl:= )
+ parse-clocks? ( net-misc/pps-tools )
+"
+RDEPEND="
+ ${DEPEND}
+ acct-group/ntp
+ acct-user/ntp
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )
+ !net-misc/ntpsec
+ !openntpd? ( !net-misc/openntpd )
+"
+BDEPEND="
+ acct-group/ntp
+ acct-user/ntp
+ virtual/pkgconfig
+"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.2.8_p18-ipc-caps.patch # bug #533966
+ "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch # bug #563922
+ "${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch # bug #711530
+ "${FILESDIR}"/${PN}-4.2.8_p15-configure-clang16.patch
+)
+
+src_prepare() {
+ default
+
+ # Make sure every build uses the same install layout, bug #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+
+ # bug #622754
+ eautoreconf
+
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck || die
+}
+
+src_configure() {
+ # Ancient codebase, lto-type-mismatch in testsuite in packetProcesisng.c
+ # where patching it then needs Ruby.
+ filter-lto
+
+ # bug #264109
+ append-cppflags -D_GNU_SOURCE
+
+ # https://bugs.gentoo.org/922508
+ append-lfs-flags
+
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ # Unity builds, we don't really need support for it, bug #804109
+ export PATH_RUBY=/bin/false
+
+ local myeconfargs=(
+ --cache-file="${S}"/config.cache
+
+ --with-lineeditlibs=readline,edit,editline
+ --with-yielding-select
+ --disable-local-libevent
+
+ # Increase the default memlimit from 32MiB to 128MiB, bug #533232
+ --with-memlock=256
+
+ # Avoid overriding the user's toolchain settings, bug #895802
+ --with-hardenfile=/dev/null
+
+ $(use_enable caps linuxcaps)
+ $(use_enable parse-clocks)
+ $(use_enable debug debugging)
+ $(use_with readline lineeditlibs readline)
+ $(use_enable samba ntp-signd)
+ $(use_with snmp ntpsnmpd)
+ $(use_with ssl crypto)
+ $(use_enable threads thread-support)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ # Move ntpd/ntpdate to sbin, bug #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+
+ newinitd "${FILESDIR}"/ntpd.rc-r2 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ if use openntpd ; then
+ cd "${ED}" || die
+ rm usr/sbin/ntpd || die
+ rm etc/{conf,init}.d/ntpd || die
+ rm usr/share/man/man1/ntpd.1 || die
+ else
+ newtmpfiles "${FILESDIR}"/ntp.tmpfiles ntp.conf
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ if use caps ; then
+ sed -i '/ExecStart/ s|$| -u ntp:ntp|' \
+ "${D}$(systemd_get_systemunitdir)"/ntpd.service \
+ || die
+ fi
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r2 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r3 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ if ! use openntpd; then
+ tmpfiles_process ntp.conf
+ fi
+
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "https://bugs.gentoo.org/41827"
+ fi
+}