public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2018-02-23 22:54 Steve Arnold
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Arnold @ 2018-02-23 22:54 UTC (permalink / raw
  To: gentoo-commits

commit:     99c380a654731d45bbffe372e5c1aa59613c74f9
Author:     Stephen L Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 23 22:53:43 2018 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Fri Feb 23 22:54:27 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99c380a6

net-misc/ntpsec: new ebuild for secure ntp daemon

* refactored version of NTP reference implementation
* integration with gpsd and vendor clock sources

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 net-misc/ntpsec/Manifest            |   1 +
 net-misc/ntpsec/files/ntpd.confd    |   7 +++
 net-misc/ntpsec/files/ntpd.rc-r1    |  23 ++++++++
 net-misc/ntpsec/files/ntpd.service  |  15 +++++
 net-misc/ntpsec/metadata.xml        |  34 ++++++++++++
 net-misc/ntpsec/ntpsec-1.0.0.ebuild | 106 ++++++++++++++++++++++++++++++++++++
 6 files changed, 186 insertions(+)

diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
new file mode 100644
index 00000000000..29e5507e1ee
--- /dev/null
+++ b/net-misc/ntpsec/Manifest
@@ -0,0 +1 @@
+DIST ntpsec-1.0.0.tar.gz 2405862 BLAKE2B b1631491500cafa5d41761fe6cb2db523450ed7801d06678048d6b8878d93dbd1e9d7cb2081a8400421213cf78a6724220236149a7f719896d1e8e48f5337d85 SHA512 9fb06310508b30d2ae2d66212d7d87b00e8eea294cebc27eb70435d764bd639fcec234b66e78deafb700476c88e47afe2d1b463563008c32efbb0644dd611f43

diff --git a/net-misc/ntpsec/files/ntpd.confd b/net-misc/ntpsec/files/ntpd.confd
new file mode 100644
index 00000000000..92c553a6261
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpd.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/ntpd
+
+# Options to pass to the ntpd process
+# Most people should leave this line alone ...
+# however, if you know what you're doing, feel free to tweak
+#NTPD_OPTS="-g -n -u ntp:ntp"
+NTPD_OPTS="-g -u ntp:ntp"

diff --git a/net-misc/ntpsec/files/ntpd.rc-r1 b/net-misc/ntpsec/files/ntpd.rc-r1
new file mode 100644
index 00000000000..dbe76c85e53
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpd.rc-r1
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="ntpd - the network time protocol daemon"
+pidfile="/var/run/ntpd.pid"
+command="/usr/sbin/ntpd"
+command_args="-p ${pidfile} ${NTPD_OPTS}"
+start_stop_daemon_args="--pidfile ${pidfile}"
+
+depend() {
+	use net dns logger
+	after ntp-client
+}
+
+start_pre() {
+	if [ ! -f /etc/ntp.conf ] ; then
+	eerror "Please create /etc/ntp.conf"
+		return 1
+	fi
+	return 0
+}

diff --git a/net-misc/ntpsec/files/ntpd.service b/net-misc/ntpsec/files/ntpd.service
new file mode 100644
index 00000000000..a551bb7b130
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Network Time Service
+After=network.target nss-lookup.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=forking
+PrivateTmp=true
+EnvironmentFile=-/etc/conf.d/ntp
+ExecStart=/usr/sbin/ntpd ${NTPD_OPTS}
+Restart=always
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-misc/ntpsec/metadata.xml b/net-misc/ntpsec/metadata.xml
new file mode 100644
index 00000000000..cc6f94e3b23
--- /dev/null
+++ b/net-misc/ntpsec/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>anthony.g.base@gmail.com</email>
+<name>Anthony G. Basile</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+<use>
+    <flag name="early">Drop root privileges early</flag>
+    <flag name="gdb">Enable debugging with gdb</flag>
+    <flag name="nist">Enable lockclock</flag>
+    <flag name="ntpviz">Make visualizations of offsets, jiffies, etc.</flag>
+    <flag name="rclock_oncore">Oncore driver</flag>
+    <flag name="rclock_trimble">Trimble driver</flag>
+    <flag name="rclock_truetime">Trutime driver (deprecated)</flag>
+    <flag name="rclock_gpsd">Enable gpsd daemon support</flag>
+    <flag name="rclock_jjy">JJY driver</flag>
+    <flag name="rclock_generic">Enable support for generic time radios and GPSDOs</flag>
+    <flag name="rclock_spectracom">Spectracom driver</flag>
+    <flag name="rclock_shm">Obtain refclock info from shared memory-segment</flag>
+    <flag name="rclock_pps">PPS cesium clock driver</flag>
+    <flag name="rclock_hpgps">Hewlett Packard GPS driver</flag>
+    <flag name="rclock_zyfer">Zyfer driver</flag>
+    <flag name="rclock_arbiter">Arbiter 1088A/B GPS driver</flag>
+    <flag name="rclock_nmea">NMEA GPS driver</flag>
+    <flag name="rclock_neoclock">NeoClock4X DCF77/TDF 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="smear">Specify the interval over which a leap second is applied (experimental)</flag>
+    <flag name="tests">Enable tests</flag>
+</use>
+</pkgmetadata>

diff --git a/net-misc/ntpsec/ntpsec-1.0.0.ebuild b/net-misc/ntpsec/ntpsec-1.0.0.ebuild
new file mode 100644
index 00000000000..d4cca435dbb
--- /dev/null
+++ b/net-misc/ntpsec/ntpsec-1.0.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+PYTHON_REQ_USE='threads(+)'
+
+inherit flag-o-matic python-any-r1 waf-utils systemd user
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
+	BDEPEND=""
+	KEYWORDS=""
+else
+	SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
+	RESTRICT="mirror"
+	BDEPEND=""
+	KEYWORDS="~amd64 ~arm ~arm64 ~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 neoclock 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 nist ntpviz samba seccomp smear tests" #ionice
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# net-misc/pps-tools oncore,pps
+CDEPEND="${PYTHON_DEPS}
+	${BDEPEND}
+	sys-libs/libcap
+	dev-python/psutil
+	dev-libs/openssl:*
+	seccomp? ( sys-libs/libseccomp )
+"
+RDEPEND="${CDEPEND}
+	ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
+"
+DEPEND="${CDEPEND}
+	app-text/asciidoc
+	app-text/docbook-xsl-stylesheets
+	sys-devel/bison
+	rclock_oncore? ( net-misc/pps-tools )
+	rclock_pps? ( net-misc/pps-tools )
+	!net-misc/ntp
+	!net-misc/openntpd
+"
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+	enewgroup ntp 123
+	enewuser ntp 123 -1 /dev/null ntp
+}
+
+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|,$||'`"
+	waf-utils_src_configure --nopyc --nopyo --refclock="${CLOCKSTRING}" \
+		$(use	doc		&& echo "--enable-doc") \
+		$(use	early		&& echo "--enable-early-droproot") \
+		$(use	gdb		&& echo "--enable-debug-gdb") \
+		$(use	nist		&& echo "--enable-lockclock") \
+		$(use	samba		&& echo "--enable-mssntp") \
+		$(use	seccomp		&& echo "--enable-seccomp") \
+		$(use	smear		&& echo "--enable-leap-smear") \
+		$(use	tests		&& echo "--alltests") \
+		$(use_enable debug debug)
+}
+
+src_install() {
+	waf-utils_src_install
+	mv -v "${ED}/usr/"{,share/}man
+	dosbin	"${S}/contrib/ntpheat"{,usb}
+	dodoc	"${S}/contrib/logrotate-ntpd"
+	systemd_newunit "${FILESDIR}/ntpd.service" ntpd.service
+	newinitd "${FILESDIR}/ntpd.rc-r1" "ntp"
+	newconfd "${FILESDIR}/ntpd.confd" "ntp"
+	mkdir "${ED}/etc/systemd/system/"
+	cp -v "${FILESDIR}/ntpd.service" "${ED}/etc/systemd/system/"
+	# ntpd.confd  ntpd.rc-r1  ntpd.service
+
+	mkdir -pv "${ED}/etc/"{logrotate,ntp-conf}.d
+	cp -v "${S}/etc/logrotate-config.ntpd" "${ED}/etc/logrotate.d/ntpd"
+	cp -Rv "${S}/etc/ntp.d/" "${ED}/etc/"
+	mv -v "${ED}/etc/ntp.d/example.conf" "${ED}/etc/ntp.conf"
+	sed "s|includefile |includefile ntp-conf.d/|" -i "${ED}/etc/ntp.conf"
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2018-02-25 17:19 Anthony G. Basile
  0 siblings, 0 replies; 13+ messages in thread
From: Anthony G. Basile @ 2018-02-25 17:19 UTC (permalink / raw
  To: gentoo-commits

commit:     839ee317aeb7166949a75c17997ada40fca2d74c
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 25 17:18:40 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Feb 25 17:19:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=839ee317

net-misc/ntpsec: improve out-of-box configuration

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-misc/ntpsec/files/ntp.conf                     | 21 +++++++++++++++++++
 net-misc/ntpsec/files/ntpd.confd                   |  5 +----
 net-misc/ntpsec/files/{ntpd.rc-r1 => ntpd.rc-r2}   |  2 +-
 ...psec-1.0.0-r2.ebuild => ntpsec-1.0.0-r3.ebuild} | 24 +++++++++++++---------
 net-misc/ntpsec/ntpsec-9999.ebuild                 | 24 +++++++++++++---------
 5 files changed, 51 insertions(+), 25 deletions(-)

diff --git a/net-misc/ntpsec/files/ntp.conf b/net-misc/ntpsec/files/ntp.conf
new file mode 100644
index 00000000000..e8d68d2ba9b
--- /dev/null
+++ b/net-misc/ntpsec/files/ntp.conf
@@ -0,0 +1,21 @@
+# This is a Gentoo specific configuration file so ntpsec
+# works out of the box as a client.  Upstream configuration
+# can be found in /etc/ntp.d/, but these are not used by
+# this file.  They are provided as a guide to more complex
+# configurations.  For more information on how to configure
+# ntpsec see https://docs.ntpsec.org/latest/
+
+# Pools for Gentoo users
+pool 0.gentoo.pool.ntp.org
+pool 1.gentoo.pool.ntp.org
+pool 2.gentoo.pool.ntp.org
+pool 3.gentoo.pool.ntp.org
+
+# These are the restrictions most people want
+restrict default kod limited nomodify nopeer noquery
+restrict -6 default kod limited nomodify nopeer noquery
+restrict 127.0.0.1
+restrict -6 ::1
+
+# Don't change this location.
+driftfile /var/lib/ntp/ntp.drift

diff --git a/net-misc/ntpsec/files/ntpd.confd b/net-misc/ntpsec/files/ntpd.confd
index 92c553a6261..50c1aac6066 100644
--- a/net-misc/ntpsec/files/ntpd.confd
+++ b/net-misc/ntpsec/files/ntpd.confd
@@ -1,7 +1,4 @@
 # /etc/conf.d/ntpd
 
-# Options to pass to the ntpd process
-# Most people should leave this line alone ...
-# however, if you know what you're doing, feel free to tweak
-#NTPD_OPTS="-g -n -u ntp:ntp"
+# Most people should leave this line alone.
 NTPD_OPTS="-g -u ntp:ntp"

diff --git a/net-misc/ntpsec/files/ntpd.rc-r1 b/net-misc/ntpsec/files/ntpd.rc-r2
similarity index 94%
rename from net-misc/ntpsec/files/ntpd.rc-r1
rename to net-misc/ntpsec/files/ntpd.rc-r2
index dbe76c85e53..13fcbdd092d 100644
--- a/net-misc/ntpsec/files/ntpd.rc-r1
+++ b/net-misc/ntpsec/files/ntpd.rc-r2
@@ -4,7 +4,7 @@
 # $Id$
 
 description="ntpd - the network time protocol daemon"
-pidfile="/var/run/ntpd.pid"
+pidfile="/run/ntpd.pid"
 command="/usr/sbin/ntpd"
 command_args="-p ${pidfile} ${NTPD_OPTS}"
 start_stop_daemon_args="--pidfile ${pidfile}"

diff --git a/net-misc/ntpsec/ntpsec-1.0.0-r2.ebuild b/net-misc/ntpsec/ntpsec-1.0.0-r3.ebuild
similarity index 83%
rename from net-misc/ntpsec/ntpsec-1.0.0-r2.ebuild
rename to net-misc/ntpsec/ntpsec-1.0.0-r3.ebuild
index 46136f2fa0e..ab3302255ec 100644
--- a/net-misc/ntpsec/ntpsec-1.0.0-r2.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.0.0-r3.ebuild
@@ -118,21 +118,25 @@ src_install() {
 	python_foreach_impl run_in_build_dir python_install
 
 	# Install heat generating scripts
-	use heat && dosbin "${S}/contrib/ntpheat"{,usb}
+	use heat && dosbin "${S}"/contrib/ntpheat{,usb}
 
 	# Install the openrc files
-	newinitd "${FILESDIR}/ntpd.rc-r1" "ntp"
-	newconfd "${FILESDIR}/ntpd.confd" "ntp"
+	newinitd "${FILESDIR}"/ntpd.rc-r2 ntp
+	newconfd "${FILESDIR}"/ntpd.confd ntp
 
 	# Install the systemd unit file
-	systemd_newunit "${FILESDIR}/ntpd.service" ntpd.service
+	systemd_newunit "${FILESDIR}"/ntpd.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
 
 	# Install a log rotate script
-	mkdir -pv "${ED}/etc/"logrotate.d
-	cp -v "${S}/etc/logrotate-config.ntpd" "${ED}/etc/logrotate.d/ntpd"
+	mkdir -pv "${ED}"/etc/logrotate.d
+	cp -v "${S}"/etc/logrotate-config.ntpd "${ED}"/etc/logrotate.d/ntpd
 
-	# Install the configuration files
-	cp -Rv "${S}/etc/ntp.d/" "${ED}/etc/"
-	mv -v "${ED}/etc/ntp.d/default.conf" "${ED}/etc/ntp.conf"
-	sed "s|includefile |includefile ntp.d/|" -i "${ED}/etc/ntp.conf"
+	# Install the configuration file and sample configuration
+	cp -v "${FILESDIR}"/ntp.conf "${ED}"/etc/ntp.conf
+	cp -Rv "${S}"/etc/ntp.d/ "${ED}"/etc/
 }

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-9999.ebuild
index 8263e59187f..a565abf1c84 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -117,21 +117,25 @@ src_install() {
 	python_foreach_impl run_in_build_dir python_install
 
 	# Install heat generating scripts
-	use heat && dosbin "${S}/contrib/ntpheat"{,usb}
+	use heat && dosbin "${S}"/contrib/ntpheat{,usb}
 
 	# Install the openrc files
-	newinitd "${FILESDIR}/ntpd.rc-r1" "ntp"
-	newconfd "${FILESDIR}/ntpd.confd" "ntp"
+	newinitd "${FILESDIR}"/ntpd.rc-r2 ntp
+	newconfd "${FILESDIR}"/ntpd.confd ntp
 
 	# Install the systemd unit file
-	systemd_newunit "${FILESDIR}/ntpd.service" ntpd.service
+	systemd_newunit "${FILESDIR}"/ntpd.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
 
 	# Install a log rotate script
-	mkdir -pv "${ED}/etc/"logrotate.d
-	cp -v "${S}/etc/logrotate-config.ntpd" "${ED}/etc/logrotate.d/ntpd"
+	mkdir -pv "${ED}"/etc/logrotate.d
+	cp -v "${S}"/etc/logrotate-config.ntpd "${ED}"/etc/logrotate.d/ntpd
 
-	# Install the configuration files
-	cp -Rv "${S}/etc/ntp.d/" "${ED}/etc/"
-	mv -v "${ED}/etc/ntp.d/default.conf" "${ED}/etc/ntp.conf"
-	sed "s|includefile |includefile ntp.d/|" -i "${ED}/etc/ntp.conf"
+	# Install the configuration file and sample configuration
+	cp -v "${FILESDIR}"/ntp.conf "${ED}"/etc/ntp.conf
+	cp -Rv "${S}"/etc/ntp.d/ "${ED}"/etc/
 }


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2019-05-23 17:56 Anthony G. Basile
  0 siblings, 0 replies; 13+ messages in thread
From: Anthony G. Basile @ 2019-05-23 17:56 UTC (permalink / raw
  To: gentoo-commits

commit:     9f5cd20ac0b4e11393390d30490ea9a5d6532bc8
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu May 23 17:56:08 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu May 23 17:56:08 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f5cd20a

net-misc/ntpsec: remove older versions, security bug #675538

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

 net-misc/ntpsec/Manifest                           |   3 -
 .../ntpsec/files/ntpsec-1.0.0-fix-seccomp.patch    |  16 ---
 net-misc/ntpsec/ntpsec-1.0.0-r6.ebuild             | 157 ---------------------
 net-misc/ntpsec/ntpsec-1.1.1.ebuild                | 154 --------------------
 net-misc/ntpsec/ntpsec-1.1.2.ebuild                | 154 --------------------
 5 files changed, 484 deletions(-)

diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
index ce982bf2cdb..15b045177f4 100644
--- a/net-misc/ntpsec/Manifest
+++ b/net-misc/ntpsec/Manifest
@@ -1,4 +1 @@
-DIST ntpsec-1.0.0.tar.gz 2405862 BLAKE2B b1631491500cafa5d41761fe6cb2db523450ed7801d06678048d6b8878d93dbd1e9d7cb2081a8400421213cf78a6724220236149a7f719896d1e8e48f5337d85 SHA512 9fb06310508b30d2ae2d66212d7d87b00e8eea294cebc27eb70435d764bd639fcec234b66e78deafb700476c88e47afe2d1b463563008c32efbb0644dd611f43
-DIST ntpsec-1.1.1.tar.gz 2451415 BLAKE2B 516c87f0710ecacfde27f801a5fc4a492e7871eb35cc3afb8a107e0c381cd9787a4af2d0b01e2cf5d4f43043afe042321e5bbd2299578723e870b2fa502646d2 SHA512 838ed81c94e14a3d8588670ce63a1c4f6216d2f79be5149ad6a845cec00bdf6d7fe77310ce9c33c4675d3db54e59c3d9d02ae4351913ffbd9a3883716c443f83
-DIST ntpsec-1.1.2.tar.gz 2458805 BLAKE2B e9ab493f60179ce94a5995287423c3a0038298b622b0dcffd5a299261a7b42fc8d0d04256726e049c625c0789882f601615eaa7169047e984a274f62e0cf40d2 SHA512 83d2d3bc59202f1e5f3e76eeb6810e575e24c6f392f20c25732a6881a0a0a9f72453b76b294399351ec4baf88bc64da089dc1340aee38576021659f81bcd0e19
 DIST ntpsec-1.1.3.tar.gz 2462330 BLAKE2B 903e569ad72939def9df31d7b51b2623b140754de67362213f39e39ad770d903d70c45a10a18e98ae35927792666ae27de40b41a5c0bfe6fd8cfa6a37102d4e8 SHA512 df60c5fa63d4c94529ba1e8b21c7d6b5d0c9fb810ed7546a621b072725a6ff03edbd2dcbc3baf19ac3b3a9b82d7aff3ddee4ab8c93559b7065ed06a211b538c4

diff --git a/net-misc/ntpsec/files/ntpsec-1.0.0-fix-seccomp.patch b/net-misc/ntpsec/files/ntpsec-1.0.0-fix-seccomp.patch
deleted file mode 100644
index b9716569f63..00000000000
--- a/net-misc/ntpsec/files/ntpsec-1.0.0-fix-seccomp.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-This is a backport of https://gitlab.com/NTPsec/ntpsec/commit/eef92d6217da03ad2ae41e298d110bdb05031381
-
-diff -Naur ntpsec-1.0.0.orig/ntpd/ntp_sandbox.c ntpsec-1.0.0/ntpd/ntp_sandbox.c
---- ntpsec-1.0.0.orig/ntpd/ntp_sandbox.c	2017-10-09 23:54:39.000000000 -0400
-+++ ntpsec-1.0.0/ntpd/ntp_sandbox.c	2018-02-28 07:31:28.381406881 -0500
-@@ -354,6 +354,10 @@
- 	SCMP_SYS(write),
-         SCMP_SYS(unlink),
- 
-+#ifdef ENABLE_EARLY_DROPROOT
-+	SCMP_SYS(getdents),
-+#endif
-+
- #ifdef ENABLE_DNS_LOOKUP
- /* Don't comment out this block for testing.
-  * pthread_create blocks signals so it will crash

diff --git a/net-misc/ntpsec/ntpsec-1.0.0-r6.ebuild b/net-misc/ntpsec/ntpsec-1.0.0-r6.ebuild
deleted file mode 100644
index 8a60622902e..00000000000
--- a/net-misc/ntpsec/ntpsec-1.0.0-r6.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-PYTHON_REQ_USE='threads(+)'
-
-inherit flag-o-matic python-r1 waf-utils systemd user
-
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
-	BDEPEND=""
-	KEYWORDS=""
-else
-	SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
-	RESTRICT="mirror"
-	BDEPEND=""
-	KEYWORDS="~amd64 ~arm ~arm64 ~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 neoclock 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 libressl nist ntpviz samba seccomp smear tests" #ionice
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-# net-misc/pps-tools oncore,pps
-CDEPEND="${PYTHON_DEPS}
-	${BDEPEND}
-	sys-libs/libcap
-	dev-python/psutil[${PYTHON_USEDEP}]
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( dev-libs/openssl:0= )
-	seccomp? ( sys-libs/libseccomp )
-"
-RDEPEND="${CDEPEND}
-	ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
-	!net-misc/ntp
-	!net-misc/openntpd
-"
-DEPEND="${CDEPEND}
-	app-text/asciidoc
-	app-text/docbook-xsl-stylesheets
-	sys-devel/bison
-	rclock_oncore? ( net-misc/pps-tools )
-	rclock_pps? ( net-misc/pps-tools )
-"
-
-WAF_BINARY="${S}/waf"
-
-pkg_setup() {
-	enewgroup ntp 123
-	enewuser ntp 123 -1 /dev/null ntp
-}
-
-src_prepare() {
-	default
-
-	# See https://gitlab.com/NTPsec/ntpsec/issues/460
-	eapply "${FILESDIR}"/${P}-fix-seccomp.patch
-
-	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|,$||'`"
-
-	# Remove autostripping of binaries
-	sed -i -e '/Strip binaries/d' wscript
-
-	local myconf=(
-		--nopyc
-		--nopyo
-		--refclock="${CLOCKSTRING}"
-		$(use doc	&& echo "--enable-doc")
-		$(use early	&& echo "--enable-early-droproot")
-		$(use gdb	&& echo "--enable-debug-gdb")
-		$(use nist	&& echo "--enable-lockclock")
-		$(use samba	&& echo "--enable-mssntp")
-		$(use seccomp	&& echo "--enable-seccomp")
-		$(use smear	&& echo "--enable-leap-smear")
-		$(use tests	&& echo "--alltests")
-		$(use_enable debug 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
-	}
-	python_foreach_impl run_in_build_dir python_compile
-}
-
-src_install() {
-	python_install() {
-		waf-utils_src_install
-	}
-	python_foreach_impl run_in_build_dir python_install
-
-	# 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.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
-
-	# 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/
-}
-
-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.1.1.ebuild b/net-misc/ntpsec/ntpsec-1.1.1.ebuild
deleted file mode 100644
index 44675355356..00000000000
--- a/net-misc/ntpsec/ntpsec-1.1.1.ebuild
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-PYTHON_REQ_USE='threads(+)'
-
-inherit flag-o-matic python-r1 waf-utils systemd user
-
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
-	BDEPEND=""
-	KEYWORDS=""
-else
-	SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
-	RESTRICT="mirror"
-	BDEPEND=""
-	KEYWORDS="~amd64 ~arm ~arm64 ~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 neoclock 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 libressl nist ntpviz samba seccomp smear tests" #ionice
-REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
-
-# net-misc/pps-tools oncore,pps
-CDEPEND="${PYTHON_DEPS}
-	${BDEPEND}
-	sys-libs/libcap
-	dev-python/psutil[${PYTHON_USEDEP}]
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( dev-libs/openssl:0= )
-	seccomp? ( sys-libs/libseccomp )
-"
-RDEPEND="${CDEPEND}
-	ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
-	!net-misc/ntp
-	!net-misc/openntpd
-"
-DEPEND="${CDEPEND}
-	app-text/asciidoc
-	app-text/docbook-xsl-stylesheets
-	sys-devel/bison
-	rclock_oncore? ( net-misc/pps-tools )
-	rclock_pps? ( net-misc/pps-tools )
-"
-
-WAF_BINARY="${S}/waf"
-
-pkg_setup() {
-	enewgroup ntp 123
-	enewuser ntp 123 -1 /dev/null ntp
-}
-
-src_prepare() {
-	default
-	# Remove autostripping of binaries
-	sed -i -e '/Strip binaries/d' wscript
-	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=(
-		--nopyc
-		--nopyo
-		--refclock="${CLOCKSTRING}"
-		$(use doc	&& echo "--enable-doc")
-		$(use early	&& echo "--enable-early-droproot")
-		$(use gdb	&& echo "--enable-debug-gdb")
-		$(use nist	&& echo "--enable-lockclock")
-		$(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")
-	)
-
-	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
-	}
-	python_foreach_impl run_in_build_dir python_compile
-}
-
-src_install() {
-	python_install() {
-		waf-utils_src_install
-	}
-	python_foreach_impl run_in_build_dir python_install
-
-	# 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.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/
-}
-
-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.1.2.ebuild b/net-misc/ntpsec/ntpsec-1.1.2.ebuild
deleted file mode 100644
index 44675355356..00000000000
--- a/net-misc/ntpsec/ntpsec-1.1.2.ebuild
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-PYTHON_REQ_USE='threads(+)'
-
-inherit flag-o-matic python-r1 waf-utils systemd user
-
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-	EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
-	BDEPEND=""
-	KEYWORDS=""
-else
-	SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
-	RESTRICT="mirror"
-	BDEPEND=""
-	KEYWORDS="~amd64 ~arm ~arm64 ~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 neoclock 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 libressl nist ntpviz samba seccomp smear tests" #ionice
-REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
-
-# net-misc/pps-tools oncore,pps
-CDEPEND="${PYTHON_DEPS}
-	${BDEPEND}
-	sys-libs/libcap
-	dev-python/psutil[${PYTHON_USEDEP}]
-	libressl? ( dev-libs/libressl:0= )
-	!libressl? ( dev-libs/openssl:0= )
-	seccomp? ( sys-libs/libseccomp )
-"
-RDEPEND="${CDEPEND}
-	ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
-	!net-misc/ntp
-	!net-misc/openntpd
-"
-DEPEND="${CDEPEND}
-	app-text/asciidoc
-	app-text/docbook-xsl-stylesheets
-	sys-devel/bison
-	rclock_oncore? ( net-misc/pps-tools )
-	rclock_pps? ( net-misc/pps-tools )
-"
-
-WAF_BINARY="${S}/waf"
-
-pkg_setup() {
-	enewgroup ntp 123
-	enewuser ntp 123 -1 /dev/null ntp
-}
-
-src_prepare() {
-	default
-	# Remove autostripping of binaries
-	sed -i -e '/Strip binaries/d' wscript
-	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=(
-		--nopyc
-		--nopyo
-		--refclock="${CLOCKSTRING}"
-		$(use doc	&& echo "--enable-doc")
-		$(use early	&& echo "--enable-early-droproot")
-		$(use gdb	&& echo "--enable-debug-gdb")
-		$(use nist	&& echo "--enable-lockclock")
-		$(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")
-	)
-
-	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
-	}
-	python_foreach_impl run_in_build_dir python_compile
-}
-
-src_install() {
-	python_install() {
-		waf-utils_src_install
-	}
-	python_foreach_impl run_in_build_dir python_install
-
-	# 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.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/
-}
-
-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."
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2019-08-05  4:59 Steve Arnold
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Arnold @ 2019-08-05  4:59 UTC (permalink / raw
  To: gentoo-commits

commit:     a9623dcbb24918843d9454ae04b6b277d25fa2ab
Author:     Stephen Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  5 04:58:15 2019 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Mon Aug  5 04:59:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9623dcb

net-misc/ntpsec: update ebuilds and use flags, fix for bug #685456

* (modified) patch supplied by James Browning <jamesb.fe80 <AT> gmail.com>
  only applies to 1.1.4 and up
* remove obsolete configure option from 1.1.6 and up

Package-Manager: Portage-2.3.67, Repoman-2.3.12
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>

 net-misc/ntpsec/Manifest                           |  2 +-
 net-misc/ntpsec/files/ntpsec-no-bsd.patch          | 35 ++++++++++++++++++++++
 net-misc/ntpsec/metadata.xml                       |  3 +-
 .../{ntpsec-1.1.3.ebuild => ntpsec-1.1.4.ebuild}   | 11 +++++--
 net-misc/ntpsec/ntpsec-1.1.6.ebuild                | 11 +++++--
 net-misc/ntpsec/ntpsec-9999.ebuild                 | 11 +++++--
 6 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
index 3df5149733d..4b1db6e9657 100644
--- a/net-misc/ntpsec/Manifest
+++ b/net-misc/ntpsec/Manifest
@@ -1,2 +1,2 @@
-DIST ntpsec-1.1.3.tar.gz 2462330 BLAKE2B 903e569ad72939def9df31d7b51b2623b140754de67362213f39e39ad770d903d70c45a10a18e98ae35927792666ae27de40b41a5c0bfe6fd8cfa6a37102d4e8 SHA512 df60c5fa63d4c94529ba1e8b21c7d6b5d0c9fb810ed7546a621b072725a6ff03edbd2dcbc3baf19ac3b3a9b82d7aff3ddee4ab8c93559b7065ed06a211b538c4
+DIST ntpsec-1.1.4.tar.gz 2536268 BLAKE2B 320e7afee1b776e0327f8bf34bc0b8cd3a2c67fd9fd16564323ce825cb9e36d7d5fb48a38b734600286cbd039f41f296d9e488e25d2680f08412aa983101987b SHA512 1b74e7cb87e189137e1b66b52ce89498e0061a10abf017c36bfdecb4aefe9c3fb6e8fd7819a9f822fb946dca6ae20ee724b2aed35e03d73f8e3015d8818d02db
 DIST ntpsec-1.1.6.tar.gz 2600632 BLAKE2B 1ee3e266f9a0ff45fc8f001a2b5a1722c6acf75a2151ee3724812acef3409eccbb865b321a3a346c7ced1770aa24190281a94593b881b4bbb0a2b2e6df5629cc SHA512 f57fde6f329a858313968798d64df5e93d7eba43edf4752cd0eb45ff1a2237ce2731b4603ec997c493dea85edb42976f96eb1508beae087a8c2ae8a76c0a6941

diff --git a/net-misc/ntpsec/files/ntpsec-no-bsd.patch b/net-misc/ntpsec/files/ntpsec-no-bsd.patch
new file mode 100644
index 00000000000..66dc9d34d2e
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-no-bsd.patch
@@ -0,0 +1,35 @@
+--- a/wscript   2019-05-25 07:41:24.783651700 -0700
++++ b/wscript   2019-06-22 12:47:02.288170100 -0700
+@@ -305,12 +305,6 @@
+     ctx.check_cc(lib="m", comment="Math library")
+     ctx.check_cc(lib="rt", mandatory=False, comment="realtime library")
+     ctx.check_cc(lib="pthread", mandatory=False, comment="threads library")
+-    ctx.check_cc(lib="execinfo", mandatory=False,
+-                 comment="BSD backtrace library")
+-    ret = ctx.check_cc(lib="bsd", mandatory=False,
+-                       comment="BSD compatibility library")
+-    if ret:
+-        ctx.env.LDFLAGS += ["-lbsd"]
+
+     # -lssp and -lssp_nonshared may be needed by older gcc to
+     # support "-fstack-protector-all"
+@@ -682,19 +676,6 @@
+                        prerequisites=ft[1], use=ft[2],
+                        mandatory=ft[3])
+
+-    # check for BSD versions outside of libc
+-    if not ctx.get_define("HAVE_STRLCAT"):
+-        ret = probe_function(ctx, function='strlcat',
+-                             prerequisites=['bsd/string.h'])
+-        if ret:
+-            ctx.define("HAVE_STRLCAT", 1, comment="Using bsd/strlcat")
+-
+-    if not ctx.get_define("HAVE_STRLCPY"):
+-        ret = probe_function(ctx, function='strlcpy',
+-                             prerequisites=['bsd/string.h'])
+-        if ret:
+-            ctx.define("HAVE_STRLCPY", 1, comment="Using bsd/strlcpy")
+-
+     # Nobody uses the symbol, but this seems like a good sanity check.
+     ctx.check_cc(header_name="stdbool.h", mandatory=True,
+                  comment="Sanity check.")

diff --git a/net-misc/ntpsec/metadata.xml b/net-misc/ntpsec/metadata.xml
index 018f5f40f71..cba4511bd70 100644
--- a/net-misc/ntpsec/metadata.xml
+++ b/net-misc/ntpsec/metadata.xml
@@ -16,7 +16,8 @@ NTPsec project - a secure, hardened, and improved implementation of Network Time
 		<flag name="early">Drop root privileges early</flag>
 		<flag name="gdb">Enable debugging with gdb</flag>
 		<flag name="heat">Install contrib heat generating scripts</flag>
-		<flag name="nist">Enable lockclock</flag>
+		<flag name="libbsd">Use libbsd instead of internal funcs</flag>
+		<flag name="nist">Set local clock deps</flag>
 		<flag name="ntpviz">Make visualizations of offsets, jiffies, etc.</flag>
 		<flag name="rclock_oncore">Oncore driver</flag>
 		<flag name="rclock_trimble">Trimble driver</flag>

diff --git a/net-misc/ntpsec/ntpsec-1.1.3.ebuild b/net-misc/ntpsec/ntpsec-1.1.4.ebuild
similarity index 93%
rename from net-misc/ntpsec/ntpsec-1.1.3.ebuild
rename to net-misc/ntpsec/ntpsec-1.1.4.ebuild
index 320a55e35a4..eb5900a5e1e 100644
--- a/net-misc/ntpsec/ntpsec-1.1.3.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.1.4.ebuild
@@ -12,12 +12,12 @@ if [[ ${PV} == *9999* ]]; then
 	inherit git-r3
 	EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
 	BDEPEND=""
-	KEYWORDS="amd64"
+	KEYWORDS=""
 else
 	SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
 	RESTRICT="mirror"
 	BDEPEND=""
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 fi
 
 DESCRIPTION="The NTP reference implementation, refactored"
@@ -32,7 +32,7 @@ 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 libressl nist ntpviz samba seccomp smear tests" #ionice
+IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd libressl nist ntpviz samba seccomp smear tests" #ionice
 REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
 
 # net-misc/pps-tools oncore,pps
@@ -40,6 +40,7 @@ CDEPEND="${PYTHON_DEPS}
 	${BDEPEND}
 	sys-libs/libcap
 	dev-python/psutil[${PYTHON_USEDEP}]
+	libbsd? ( dev-libs/libbsd:0= )
 	libressl? ( dev-libs/libressl:0= )
 	!libressl? ( dev-libs/openssl:0= )
 	seccomp? ( sys-libs/libseccomp )
@@ -51,6 +52,7 @@ RDEPEND="${CDEPEND}
 "
 DEPEND="${CDEPEND}
 	app-text/asciidoc
+	dev-libs/libxslt
 	app-text/docbook-xsl-stylesheets
 	sys-devel/bison
 	rclock_oncore? ( net-misc/pps-tools )
@@ -68,6 +70,9 @@ src_prepare() {
 	default
 	# Remove autostripping of binaries
 	sed -i -e '/Strip binaries/d' wscript
+	if ! use libbsd ; then
+		epatch "${FILESDIR}/${PN}-no-bsd.patch"
+	fi
 	python_copy_sources
 }
 

diff --git a/net-misc/ntpsec/ntpsec-1.1.6.ebuild b/net-misc/ntpsec/ntpsec-1.1.6.ebuild
index d8f848a621d..cbf16e45b9f 100644
--- a/net-misc/ntpsec/ntpsec-1.1.6.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.1.6.ebuild
@@ -32,15 +32,17 @@ 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 nist ntpviz samba seccomp smear tests" #ionice
+IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd libressl nist ntpviz samba seccomp smear tests" #ionice
 REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
 
 # net-misc/pps-tools oncore,pps
 CDEPEND="${PYTHON_DEPS}
 	${BDEPEND}
 	sys-libs/libcap
-	dev-libs/openssl:0=
 	dev-python/psutil[${PYTHON_USEDEP}]
+	libbsd? ( dev-libs/libbsd:0= )
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( dev-libs/openssl:0= )
 	seccomp? ( sys-libs/libseccomp )
 "
 RDEPEND="${CDEPEND}
@@ -50,6 +52,7 @@ RDEPEND="${CDEPEND}
 "
 DEPEND="${CDEPEND}
 	app-text/asciidoc
+	dev-libs/libxslt
 	app-text/docbook-xsl-stylesheets
 	sys-devel/bison
 	rclock_oncore? ( net-misc/pps-tools )
@@ -67,6 +70,9 @@ src_prepare() {
 	default
 	# Remove autostripping of binaries
 	sed -i -e '/Strip binaries/d' wscript
+	if ! use libbsd ; then
+		epatch "${FILESDIR}/${PN}-no-bsd.patch"
+	fi
 	python_copy_sources
 }
 
@@ -91,7 +97,6 @@ src_configure() {
 		$(use doc	&& echo "--enable-doc")
 		$(use early	&& echo "--enable-early-droproot")
 		$(use gdb	&& echo "--enable-debug-gdb")
-		$(use nist	&& echo "--enable-lockclock")
 		$(use samba	&& echo "--enable-mssntp")
 		$(use seccomp	&& echo "--enable-seccomp")
 		$(use smear	&& echo "--enable-leap-smear")

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-9999.ebuild
index d8f848a621d..cbf16e45b9f 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -32,15 +32,17 @@ 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 nist ntpviz samba seccomp smear tests" #ionice
+IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd libressl nist ntpviz samba seccomp smear tests" #ionice
 REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
 
 # net-misc/pps-tools oncore,pps
 CDEPEND="${PYTHON_DEPS}
 	${BDEPEND}
 	sys-libs/libcap
-	dev-libs/openssl:0=
 	dev-python/psutil[${PYTHON_USEDEP}]
+	libbsd? ( dev-libs/libbsd:0= )
+	libressl? ( dev-libs/libressl:0= )
+	!libressl? ( dev-libs/openssl:0= )
 	seccomp? ( sys-libs/libseccomp )
 "
 RDEPEND="${CDEPEND}
@@ -50,6 +52,7 @@ RDEPEND="${CDEPEND}
 "
 DEPEND="${CDEPEND}
 	app-text/asciidoc
+	dev-libs/libxslt
 	app-text/docbook-xsl-stylesheets
 	sys-devel/bison
 	rclock_oncore? ( net-misc/pps-tools )
@@ -67,6 +70,9 @@ src_prepare() {
 	default
 	# Remove autostripping of binaries
 	sed -i -e '/Strip binaries/d' wscript
+	if ! use libbsd ; then
+		epatch "${FILESDIR}/${PN}-no-bsd.patch"
+	fi
 	python_copy_sources
 }
 
@@ -91,7 +97,6 @@ src_configure() {
 		$(use doc	&& echo "--enable-doc")
 		$(use early	&& echo "--enable-early-droproot")
 		$(use gdb	&& echo "--enable-debug-gdb")
-		$(use nist	&& echo "--enable-lockclock")
 		$(use samba	&& echo "--enable-mssntp")
 		$(use seccomp	&& echo "--enable-seccomp")
 		$(use smear	&& echo "--enable-leap-smear")


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2020-03-14  3:24 Steve Arnold
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Arnold @ 2020-03-14  3:24 UTC (permalink / raw
  To: gentoo-commits

commit:     ff1d3efe61ef0acd2803c72d4c84722a627c0166
Author:     Stephen Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 14 03:24:07 2020 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Sat Mar 14 03:24:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff1d3efe

net-misc/ntpsec: add missing asciidoc patch, force docs to behave

Bug: https://bugs.gentoo.org/710414
Package-Manager: Portage-2.3.67, Repoman-2.3.17
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>

 .../ntpsec-1.1.8-fix-asciidoc-version-detect.patch | 372 +++++++++++++++++++++
 net-misc/ntpsec/ntpsec-1.1.8.ebuild                |  10 +-
 2 files changed, 380 insertions(+), 2 deletions(-)

diff --git a/net-misc/ntpsec/files/ntpsec-1.1.8-fix-asciidoc-version-detect.patch b/net-misc/ntpsec/files/ntpsec-1.1.8-fix-asciidoc-version-detect.patch
new file mode 100644
index 00000000000..aabd8365433
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.1.8-fix-asciidoc-version-detect.patch
@@ -0,0 +1,372 @@
+diff --git a/wafhelpers/asciidoc.py b/wafhelpers/asciidoc.py
+index b6aa1f116..a2218bb69 100644
+--- a/wafhelpers/asciidoc.py
++++ b/wafhelpers/asciidoc.py
+@@ -1,73 +1,173 @@
+-import re
+-
+-from waflib import Task
+-from waflib.TaskGen import extension
+-
+-# asciidoc -b html5 -a linkcss -a stylesdir=/mnt/devel/ntp/commit/docs \
+-#   -o asd driver32.adoc
+-
+-# Borrowed from waf/docs/book/wscript in the Waf Project.
+-re_xi = re.compile('''^(include|image)::(.*?.(adoc|\\{PIC\\}))\[''', re.M)
+-
+-
+-def ascii_doc_scan(self):
+-    p = self.inputs[0].parent
+-    node_lst = [self.inputs[0]]
+-    seen = []
+-    depnodes = []
+-
+-    while node_lst:
+-        nd = node_lst.pop(0)
+-        if nd in seen:
+-            continue
+-        seen.append(nd)
+-
+-        code = nd.read()
+-        for m in re_xi.finditer(code):
+-            name = m.group(2)
+-            if m.group(3) == '{PIC}':
+-
+-                ext = '.eps'
+-                if self.generator.rule.rfind('A2X') > 0:
+-                    ext = '.png'
+-
+-                k = p.find_resource(name.replace('{PIC}', ext))
+-                if k:
+-                    depnodes.append(k)
+-            else:
+-                k = self.inputs[0].find_resource(name)
+-                if k:
+-                    depnodes.append(k)
+-                    node_lst.append(k)
+-    return [depnodes, ()]
++'''Most of the functionality for building HTML and man pages from AsciiDoc.'''
+ 
++import re
+ 
+-# ASCIIDOC_FLAGS are almost always needed and need to be set by the user.
+-class asciidoc(Task.Task):
+-    color = "BLUE"
+-    run_str = '${BIN_ASCIIDOC} -b html5 -a linkcss ${ASCIIDOC_FLAGS} ' \
+-              '-o ${TGT[0].name} ${SRC[0].abspath()}'
+-    ext_out = ".html"
++from waflib import Task  # pylint: disable=import-error
++from waflib.TaskGen import extension  # pylint: disable=import-error
++
++
++def options(opt):
++    'Add command line options for AsciiDoc processing.'
++    grp = opt.add_option_group('NTP documentation configure options')
++    grp.add_option('--disable-doc', action='store_true',
++                   default=False, help='Disable HTML document building.')
++    grp.add_option('--enable-doc', action='store_true',
++                   default=False, help='Enable HTML document building.')
++    grp.add_option('--disable-manpage', action='store_true',
++                   default=False, help='Disable manpage building.')
++    grp.add_option('--enable-manpage', action='store_true',
++                   default=False, help='Enable manpage building.')
++
++
++def configure(ctx):
++    'Set options from the extended environment and command line arguments.'
++
++    if ctx.options.disable_doc and ctx.options.enable_doc:
++        ctx.fatal('--disable-doc and --enable-doc conflict.')
++    if ctx.options.disable_manpage and ctx.options.enable_manpage:
++        ctx.fatal('--disable-manpage and --enable-manpage conflict.')
++
++    ctx.env.BUILD_DOC = False
++    ctx.env.BUILD_MAN = False
++    if ctx.options.disable_doc and ctx.options.disable_manpage:
++        ctx.msg('AsciiDoc processor', 'unnecessary')
++        return
++
++    # asciidoctor versions < 1.5.8 throw warnings for manpages and driver_shm.
++    # asciidoc versions 8.6.5-8.6.7 throw warnings for warp.adoc and versions
++    # < 8.6.4 have no HTML5 backend.
++    # asciidoc3 versions < 3.0.2 throw errors.
++    adoc_list = [['asciidoctor', (1, 5, 8)],
++                 ['asciidoc', (8, 6, 8)],
++                 ['asciidoc3', (3, 0, 2)],
++                 ]
++    for progname, asciidocminver in adoc_list:
++        if 'BIN_ASCIIDOC' not in ctx.env or ctx.env.BIN_ASCIIDOC == []:
++            # used to make man and HTML pages
++            ctx.find_program(progname, var='BIN_ASCIIDOC', mandatory=False)
++            # make sure asciidoc is new enough.
++            # based on check_python_version() from waf
++
++            if ctx.env.BIN_ASCIIDOC:
++                # https://lists.ntpsec.org/pipermail/devel/2016-July/001778.html
++                # Get asciidoc version string
++                cmd = ctx.env.BIN_ASCIIDOC + ['--version']
++                # example output: asciidoc 8.6.9
++                version_string = ctx.cmd_and_log(cmd).split()[1]
++                match = re.match(r'^(\d+)\.(\d+)\.(\d+)', version_string)
++                if match:
++                    version_tuple = tuple(map(int, match.groups()))
++                    if version_tuple >= asciidocminver:
++                        if progname == 'asciidoc':
++                            ctx.find_program('a2x', var='BIN_A2X', mandatory=False)
++                            ctx.find_program('xsltproc', var='BIN_XSLTPROC',
++                                             mandatory=False)
++                        elif progname == 'asciidoc3':
++                            ctx.find_program('a2x3', var='BIN_A2X', mandatory=False)
++                            ctx.find_program('xsltproc', var='BIN_XSLTPROC',
++                                             mandatory=False)
++
++                if version_tuple >= asciidocminver:
++                    color = 'GREEN'
++                else:
++                    color = 'YELLOW'
++                    ctx.env.BIN_ASCIIDOC = []
++                ctx.msg('Checking for %s version >= %s' %
++                        (progname, '%d.%d.%d' % asciidocminver),
++                        version_string, color=color)
++
++    if not ctx.env.BIN_ASCIIDOC:
++        if not (ctx.options.enable_doc or ctx.options.enable_manpage):
++            # The user did not require either, so this is fine.
++            return
++
++        error = 'no AsciiDoc processor qualified'
++        if ctx.options.enable_doc:
++            error += ', remove --enable-doc'
++        if ctx.options.enable_manpage:
++            error += ', remove --enable-manpage'
++        ctx.fatal(error)
++
++    ctx.env.BUILD_DOC = not ctx.options.disable_doc
++    ctx.env.BUILD_MAN = not ctx.options.disable_manpage
++
++    if 'asciidoctor' in ctx.env.BIN_ASCIIDOC[0]:
++        ctx.env.ARGS_DOC = [
++            ctx.env.BIN_ASCIIDOC[0],
++            '-a', 'attribute-missing=warn',
++            # To eliminate compat-mode:
++            #   'italics' needs to be changed to _italics_
++            #   +monospace+ needs to be changed to `monospace`
++            # https://asciidoctor.org/docs/migration/#migration-cheatsheet
++            '-a', 'compat-mode',
++            ]
++        ctx.env.ARGS_MAN = ctx.env.ARGS_DOC + [
++            '-b', 'manpage',
++            ]
++        ctx.env.ARGS_DOC += [
++            '-b', 'xhtml5', '-a', 'linkcss',
++            '-a', 'stylesheet=asciidoc.css',
++            ]
++    elif 'asciidoc' in ctx.env.BIN_ASCIIDOC[0]:
++        ctx.env.ARGS_DOC = [
++            ctx.env.BIN_ASCIIDOC[0],
++            '-a', 'attribute-missing=warn',
++            '-b', 'html5', '-a', 'linkcss',
++            '-a', 'stylesheet=asciidoc.css',
++            ]
++        if ctx.env.BIN_A2X and ctx.env.BIN_XSLTPROC:
++            ctx.env.ARGS_MAN = [
++                ctx.env.BIN_A2X[0],
++                '-a', 'attribute-missing=warn',
++                '-f', 'manpage', '--no-xmllint',
++                ]
++        else:
++            if ctx.options.enable_manpage:
++                ctx.fatal('a2x/xsltproc not found, remove --enable-manpage')
++            ctx.env.BUILD_MAN = False
++
++
++def build(ctx):
++    'Set processor noise level and set HTML pages to build.'
++    from waflib.Logs import verbose  # pylint: disable=import-error
++    if verbose > 1:  # Pass verbosity to AsciiDoc toolchain
++        if ctx.env.ARGS_DOC:
++            ctx.env.ARGS_DOC += ['-v']
++        if ctx.env.ARGS_MAN:
++            ctx.env.ARGS_MAN += ['-v']
++    if ctx.env.BUILD_DOC and ctx.variant == 'main':
++        ctx.recurse('docs')
++
++
++class html(Task.Task):
++    'Define HTML build process.'
++    # Optional weight to tune the priority for task instances.
++    # The higher, the earlier. The weight only applies to single task objects.
++    weight = 3  # set arbitrarily high to be first as to not slow down later tasks
++    run_str = '${ARGS_DOC} -o ${TGT[0].name} ${SRC[0].abspath()}'
++    ext_out = '.html'
++
++
++class man(Task.Task):
++    'Define manpage build process.'
++    weight = 2  # set arbitrarily high to be second as to not slow down later tasks (Failed)
++    run_str = '${ARGS_MAN} ${SRC[0].abspath()}'
+ 
+ 
+ @extension('.adoc')
+-def run_asciidoc(self, node):
+-    out = node.change_ext(".html")
+-    tsk = self.create_task("asciidoc", node, [out])
++def run_html(self, node):
++    'Add HTML build caller function.'
++    out = node.change_ext('.html')
++    tsk = self.create_task('html', node, [out])
+     tsk.cwd = node.parent.get_bld().abspath()
+ 
+ 
+-class a2x(Task.Task):
+-    color = "YELLOW"
+-    shell = True
+-    run_str = '${BIN_A2X} ${A2X_FLAGS} ${SRC[0].abspath()}'
+-    scan = ascii_doc_scan
+-
+-
+ @extension('.man-tmp')
+-def run_a2x(self, node):
++def run_manpage(self, node):
++    'Add manpage build caller function.'
+     n_file = node.path_from(self.bld.bldnode)
+-    out = "%s.%s" % (n_file.replace("-man.adoc.man-tmp", ""), self.section)
++    out = '%s.%s' % (n_file.replace('-man.adoc.man-tmp', ''), self.section)
+     out_n = self.bld.path.find_or_declare(out)
+-    self.create_task('a2x', node, out_n)
+-    self.bld.install_files("${MANDIR}/man%s/" % self.section, out_n)
++    self.create_task('man', node, out_n)
++    self.bld.install_files('${MANDIR}/man%s/' % self.section, out_n)
++    weight = 3
+diff --git a/wafhelpers/waf.py b/wafhelpers/waf.py
+index 96f753ecb..4f2d562a4 100644
+--- a/wafhelpers/waf.py
++++ b/wafhelpers/waf.py
+@@ -41,10 +41,7 @@ def manpage_subst_fun(self, code):
+ @conf
+ def manpage(ctx, section, source):
+ 
+-    # ctx.install_files('${MANDIR}' + "/man%s/" % section,
+-    #                   source.replace("-man.adoc", ".%s" % section))
+-
+-    if not ctx.env.ENABLE_DOC or ctx.env.DISABLE_MANPAGE:
++    if not ctx.env.BUILD_MAN:
+         return
+ 
+     ctx(features="subst",
+diff --git a/wscript b/wscript
+index c7c5468b1..601edaacd 100644
+--- a/wscript
++++ b/wscript
+@@ -55,10 +55,12 @@ Usage: waf <command>
+ 
+ def options(ctx):
+     options_cmd(ctx, config)
++    ctx.load('asciidoc', tooldir='wafhelpers/')
+     ctx.recurse("pylib")
+ 
+ 
+ def configure(ctx):
++    ctx.load('asciidoc', tooldir='wafhelpers/')
+     class oc(Build.BuildContext):
+         cmd = 'oc'
+ 
+@@ -93,7 +95,6 @@ def configure(ctx):
+     ctx.run_build_cls = 'check'
+     ctx.load('waf', tooldir='wafhelpers/')
+     ctx.load('waf_unit_test')
+-    ctx.load('pytest')
+     ctx.load('gnu_dirs')
+ 
+     with open("VERSION", "r") as f:
+@@ -148,55 +149,6 @@ def configure(ctx):
+     ctx.find_program("awk", var="BIN_AWK", mandatory=False)
+     ctx.find_program("sh", var="BIN_SH", mandatory=False)
+ 
+-    # used to make man and html pages
+-    ctx.find_program("asciidoc", var="BIN_ASCIIDOC", mandatory=False)
+-    # make sure asciidoc is new enough.
+-    # based on check_python_version() from waf
+-    if ctx.env.BIN_ASCIIDOC:
+-        # https://lists.ntpsec.org/pipermail/devel/2016-July/001778.html
+-        asciidocminver = (8, 6, 0)
+-        # Get asciidoc version string
+-        cmd = ctx.env.BIN_ASCIIDOC + ['--version']
+-        # example output: asciidoc 8.6.9
+-        lines = ctx.cmd_and_log(cmd).split()[1].split(".")
+-        assert len(lines) == 3, "found %r lines, expected 3: %r" \
+-            % (len(lines), lines)
+-        asciidocver_tuple = (int(lines[0]), int(lines[1]), int(lines[2]))
+-
+-        # Compare asciidoc version with the minimum required
+-        result = (asciidocver_tuple >= asciidocminver)
+-
+-        asciidocver_full = '.'.join(map(str, asciidocver_tuple[:3]))
+-        asciidocminver_str = '.'.join(map(str, asciidocminver))
+-        ctx.msg('Checking for asciidoc version >= %s' % (asciidocminver_str,),
+-                asciidocver_full, color=result and 'GREEN' or 'YELLOW')
+-
+-        if not result:
+-            del ctx.env.BIN_ASCIIDOC
+-    ctx.find_program("a2x", var="BIN_A2X", mandatory=False)
+-    ctx.find_program("xsltproc", var="BIN_XSLTPROC", mandatory=False)
+-
+-    ctx.env.ENABLE_DOC = False
+-    if ctx.env.BIN_ASCIIDOC and ctx.env.BIN_XSLTPROC and ctx.env.BIN_A2X:
+-        ctx.env.ENABLE_DOC = True
+-
+-    if ctx.options.enable_doc and not ctx.env.ENABLE_DOC:
+-        ctx.fatal("asciidoc and xsltproc are required in order "
+-                  "to build documentation")
+-    elif ctx.options.enable_doc:
+-        ctx.env.ASCIIDOC_FLAGS = []
+-        ctx.env.ENABLE_DOC_USER = ctx.options.enable_doc
+-
+-    # XXX: conditionally build this with --disable-man?
+-    # Should it build without docs enabled?
+-    ctx.env.A2X_FLAGS = ["--format", "manpage"]
+-    if not ctx.options.enable_a2x_xmllint:
+-        ctx.env.A2X_FLAGS += ["--no-xmllint"]
+-
+-    # Disable manpages within build()
+-    if ctx.options.disable_manpage:
+-        ctx.env.DISABLE_MANPAGE = True
+-
+     ctx.check_cfg(
+         package='systemd', variables=['systemdsystemunitdir'],
+         uselib_store='SYSTEMD', mandatory=False,
+@@ -662,7 +614,7 @@ int main(int argc, char **argv) {
+         ('strlcat', ["string.h"])
+     )
+     for ft in optional_functions:
+-            probe_function(ctx, function=ft[0], prerequisites=ft[1])
++        probe_function(ctx, function=ft[0], prerequisites=ft[1])
+ 
+     # This area is still work in progress
+     # Need to disable making symbols
+@@ -897,8 +848,8 @@ int main(int argc, char **argv) {
+     msg_setting("Droproot Support", droproot_type)
+     msg_setting("Debug Support", yesno(ctx.options.enable_debug))
+     msg_setting("Refclocks", ", ".join(sorted(ctx.env.REFCLOCK_LIST)))
+-    msg_setting("Build Manpages",
+-                yesno(ctx.env.ENABLE_DOC and not ctx.env.DISABLE_MANPAGE))
++    msg_setting("Build Docs", yesno(ctx.env.BUILD_DOC))
++    msg_setting("Build Manpages", yesno(ctx.env.BUILD_MAN))
+ 
+     ctx.recurse("pylib")
+     # Convert the Python directories to absolute paths.
+@@ -1035,14 +986,6 @@ def build(ctx):
+         # the build directory never happens.  This is how we foil that.
+         ctx.add_pre_fun(lambda ctx: ctx.exec_command("rm -f pylib/*.py[co]"))
+ 
+-    if verbose > 0:  # Pass Verbosity to asciidoc and a2x
+-        ctx.env.A2X_FLAGS += ["-v"]
+-        ctx.env.ASCIIDOC_FLAGS += ["-v"]
+-
+-    if ctx.env.ENABLE_DOC_USER:
+-        if ctx.variant != "main":
+-            ctx.recurse("docs")
+-
+     if ctx.variant == "host":
+         ctx.recurse("ntpd")
+         return

diff --git a/net-misc/ntpsec/ntpsec-1.1.8.ebuild b/net-misc/ntpsec/ntpsec-1.1.8.ebuild
index d0003067a4f..22989ca4d48 100644
--- a/net-misc/ntpsec/ntpsec-1.1.8.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.1.8.ebuild
@@ -63,7 +63,8 @@ DEPEND="${CDEPEND}
 WAF_BINARY="${S}/waf"
 
 PATCHES=( "${FILESDIR}/${P}-externalize-sys_maxclock-fix-for-bug-708522.patch"
-	"${FILESDIR}/${P}-fix-missing-scmp_sys-on-aarch64.patch" )
+	"${FILESDIR}/${P}-fix-missing-scmp_sys-on-aarch64.patch"
+	"${FILESDIR}/${P}-fix-asciidoc-version-detect.patch")
 
 src_prepare() {
 	default
@@ -150,7 +151,12 @@ src_install() {
 	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
+	if use doc; then
+		mv -v "${ED}"/usr/share/doc/"${PN}" \
+			"${ED}"/usr/share/doc/"${PF}"/html
+	else
+		rm -rf "${ED}"/usr/share/doc/"${PN}"
+	fi
 }
 
 pkg_postinst() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2021-04-11  1:34 Steve Arnold
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Arnold @ 2021-04-11  1:34 UTC (permalink / raw
  To: gentoo-commits

commit:     78639e367e43fc80fb6bcf8bdf8c78f7723b7f11
Author:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 11 01:33:41 2021 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Sun Apr 11 01:33:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78639e36

net-misc/ntpsec: add missing seccomp patch for newfstatat

Closes: https://bugs.gentoo.org/779880
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>

 .../ntpsec/files/ntpsec-1.2.0-move-newfstatat.patch  | 20 ++++++++++++++++++++
 net-misc/ntpsec/ntpsec-1.2.0-r1.ebuild               |  1 +
 2 files changed, 21 insertions(+)

diff --git a/net-misc/ntpsec/files/ntpsec-1.2.0-move-newfstatat.patch b/net-misc/ntpsec/files/ntpsec-1.2.0-move-newfstatat.patch
new file mode 100644
index 00000000000..75453c6cb5f
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.2.0-move-newfstatat.patch
@@ -0,0 +1,20 @@
+diff --git a/ntpd/ntp_sandbox.c b/ntpd/ntp_sandbox.c
+index e66faaa8c..b2af654e5 100644
+--- a/ntpd/ntp_sandbox.c
++++ b/ntpd/ntp_sandbox.c
+@@ -349,6 +349,7 @@ int scmp_sc[] = {
+ 	SCMP_SYS(lseek),
+ 	SCMP_SYS(membarrier),	/* Needed on Alpine 3.11.3 */
+ 	SCMP_SYS(munmap),
++	SCMP_SYS(newfstatat),
+ 	SCMP_SYS(open),
+ #ifdef __NR_openat
+ 	SCMP_SYS(openat),	/* SUSE */
+@@ -451,7 +452,6 @@ int scmp_sc[] = {
+ #endif
+ #if defined(__aarch64__)
+ 	SCMP_SYS(faccessat),
+-	SCMP_SYS(newfstatat),
+ 	SCMP_SYS(renameat),
+ 	SCMP_SYS(linkat),
+ 	SCMP_SYS(unlinkat),

diff --git a/net-misc/ntpsec/ntpsec-1.2.0-r1.ebuild b/net-misc/ntpsec/ntpsec-1.2.0-r1.ebuild
index 640727916e0..28c6723abb7 100644
--- a/net-misc/ntpsec/ntpsec-1.2.0-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.0-r1.ebuild
@@ -60,6 +60,7 @@ DEPEND="${CDEPEND}
 PATCHES=(
 	"${FILESDIR}/${PN}-1.1.8-fix-missing-scmp_sys-on-aarch64.patch"
 	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
+	"${FILESDIR}/${PN}-1.2.0-move-newfstatat.patch"
 )
 
 WAF_BINARY="${S}/waf"


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2021-11-14  8:49 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2021-11-14  8:49 UTC (permalink / raw
  To: gentoo-commits

commit:     96b3c7a5f76e2d6f66f307816f06cda43fad1a7b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 08:47:06 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 08:48:52 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96b3c7a5

net-misc/ntpsec: allow clone3 for glibc-2.34 (seccomp filter fix)

Closes: https://bugs.gentoo.org/823692
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/ntpsec-1.2.1-seccomp-glibc-2-3-4.patch      | 19 +++++++++++++++++++
 .../{ntpsec-1.2.1.ebuild => ntpsec-1.2.1-r1.ebuild}   |  1 +
 2 files changed, 20 insertions(+)

diff --git a/net-misc/ntpsec/files/ntpsec-1.2.1-seccomp-glibc-2-3-4.patch b/net-misc/ntpsec/files/ntpsec-1.2.1-seccomp-glibc-2-3-4.patch
new file mode 100644
index 000000000000..65b718285a8d
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.2.1-seccomp-glibc-2-3-4.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/823692
+
+From 170d60b7e269154fb108bb4b010ee5ee0110bf2d Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 14 Nov 2021 08:44:28 +0000
+Subject: [PATCH] ntpd/ntp_sandbox.c: allow clone3 in seccomp filter for
+ glibc-2.34
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/ntpd/ntp_sandbox.c
++++ b/ntpd/ntp_sandbox.c
+@@ -403,6 +403,7 @@ int scmp_sc[] = {
+  * rather than generate a trap.
+  */
+ 	SCMP_SYS(clone),	/* threads */
++	SCMP_SYS(clone3),
+ 	SCMP_SYS(kill),		/* generate signal */
+ 	SCMP_SYS(madvise),
+ 	SCMP_SYS(mprotect),

diff --git a/net-misc/ntpsec/ntpsec-1.2.1.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild
similarity index 98%
rename from net-misc/ntpsec/ntpsec-1.2.1.ebuild
rename to net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild
index 60874b5802b2..c206360674b5 100644
--- a/net-misc/ntpsec/ntpsec-1.2.1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild
@@ -62,6 +62,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
 	"${FILESDIR}/${PN}-1.2.0-move-newfstatat.patch"
 	"${FILESDIR}/${PN}-1.2.0-seccomp.patch"
+	"${FILESDIR}/${PN}-1.2.1-seccomp-glibc-2-3-4.patch"
 )
 
 WAF_BINARY="${S}/waf"


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2021-12-02 21:56 Steve Arnold
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Arnold @ 2021-12-02 21:56 UTC (permalink / raw
  To: gentoo-commits

commit:     c0d995916785a555972d9675e57e50bec4c1012b
Author:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  2 21:55:37 2021 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Thu Dec  2 21:55:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0d99591

net-misc/ntpsec: keyword ~riscv and update seccomp patch for riscv64

* fixes seccomp on riscv64 (beaglev beta)

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>

 net-misc/ntpsec/files/ntpsec-1.2.0-seccomp.patch | 4 ++--
 net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net-misc/ntpsec/files/ntpsec-1.2.0-seccomp.patch b/net-misc/ntpsec/files/ntpsec-1.2.0-seccomp.patch
index 6e61a06e12d1..27dd321e2a29 100644
--- a/net-misc/ntpsec/files/ntpsec-1.2.0-seccomp.patch
+++ b/net-misc/ntpsec/files/ntpsec-1.2.0-seccomp.patch
@@ -9,10 +9,10 @@ https://bugs.gentoo.org/786228
 +#if defined(__arm__)
 +       SCMP_SYS(statx),
 +#endif
-+#if defined(__riscv32__)
++#if defined(__riscv32__) || defined(__riscv64__)
 +       SCMP_SYS(faccessat),
 +#endif
-+#if defined(__aarch64__)
++#if defined(__aarch64__) || defined(__riscv64__)
 +       SCMP_SYS(syscall),
 +#endif
  };

diff --git a/net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild
index c206360674b5..7e9d34caf33b 100644
--- a/net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.1-r1.ebuild
@@ -15,7 +15,7 @@ if [[ ${PV} == *9999* ]]; then
 else
 	SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
 	RESTRICT="mirror"
-	KEYWORDS="amd64 arm arm64 ~x86"
+	KEYWORDS="amd64 arm arm64 ~riscv ~x86"
 fi
 
 DESCRIPTION="The NTP reference implementation, refactored"


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2022-06-03  5:32 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2022-06-03  5:32 UTC (permalink / raw
  To: gentoo-commits

commit:     729d3c0a57feff2c9edb4e87136535c133877e4b
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  3 05:20:50 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  3 05:29:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=729d3c0a

net-misc/ntpsec: Improve OpenRC script for ntpd

The attached script updates a couple things which effectively is
the same as the current model however it follows the modular nature of the
declarative syntax.

Changes:
* Removes the duplicating start_stop_daemon_args since --pidfile is automatic
  with pidfile=
* Only have ntpd create the pidfile when forking via command_args_background
* Add command_args_foreground for the option not to fork

Closes: https://bugs.gentoo.org/828078
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ntpsec/files/ntpd.rc-r3       |  23 +++++
 net-misc/ntpsec/ntpsec-1.2.1-r4.ebuild | 177 +++++++++++++++++++++++++++++++++
 2 files changed, 200 insertions(+)

diff --git a/net-misc/ntpsec/files/ntpd.rc-r3 b/net-misc/ntpsec/files/ntpd.rc-r3
new file mode 100644
index 000000000000..68d07237455c
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpd.rc-r3
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="ntpd - the network time protocol daemon"
+pidfile="/run/ntpd.pid"
+command="/usr/sbin/ntpd"
+command_args="${NTPD_OPTS}"
+command_args_background="-p ${pidfile}"
+command_args_foreground="-n"
+
+depend() {
+	use net dns logger
+	after ntp-client
+}
+
+start_pre() {
+	if [ ! -f /etc/ntp.conf ] ; then
+		eerror "Please create /etc/ntp.conf"
+		return 1
+	fi
+	return 0
+}

diff --git a/net-misc/ntpsec/ntpsec-1.2.1-r4.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r4.ebuild
new file mode 100644
index 000000000000..c6da1c0300fc
--- /dev/null
+++ b/net-misc/ntpsec/ntpsec-1.2.1-r4.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-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 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."
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2022-06-12 11:59 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2022-06-12 11:59 UTC (permalink / raw
  To: gentoo-commits

commit:     11ceb07fe0233dc7dd3c9596a6b256aa6c81acb9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 11:59:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 11:59:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11ceb07f

net-misc/ntpsec: backport glibc[nsd] seccomp patch

Closes: https://bugs.gentoo.org/851531
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../ntpsec/files/ntpsec-1.2.1-seccomp-nsd.patch    |  34 ++++
 net-misc/ntpsec/ntpsec-1.2.1-r5.ebuild             | 178 +++++++++++++++++++++
 2 files changed, 212 insertions(+)

diff --git a/net-misc/ntpsec/files/ntpsec-1.2.1-seccomp-nsd.patch b/net-misc/ntpsec/files/ntpsec-1.2.1-seccomp-nsd.patch
new file mode 100644
index 000000000000..5b7a4e51374c
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.2.1-seccomp-nsd.patch
@@ -0,0 +1,34 @@
+https://gitlab.com/NTPsec/ntpsec/-/commit/a49d53b7fe1d
+https://bugs.gentoo.org/851531
+
+From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
+Date: Sat, 11 Jun 2022 15:16:15 +0200
+Subject: [PATCH] ntpd/ntp_sandbox.c: allow readv() for glibc nscd
+ getaddrinfo() provider
+
+Otherwise, ntpd crashes from time to time with the following stack trace:
+#0  0x00007f5763bfac4d in readv () from /lib64/libc.so.6
+#1  0x00007f5763c48b4c in __readvall () from /lib64/libc.so.6
+#2  0x00007f5763c467ed in nscd_gethst_r () from /lib64/libc.so.6
+#3  0x00007f5763c46c0d in __nscd_gethostbyname2_r () from /lib64/libc.so.6
+#4  0x00007f5763c15a2a in gethostbyname2_r () from /lib64/libc.so.6
+#5  0x00007f5763bed3ca in gaih_inet.constprop () from /lib64/libc.so.6
+#6  0x00007f5763bee225 in getaddrinfo () from /lib64/libc.so.6
+#7  0x000055fcf0ad6544 in open_TCP_socket ()
+#8  0x000055fcf0ad79b4 in nts_probe ()
+#9  0x000055fcf0ac37c4 in dns_lookup ()
+#10 0x00007f5763b8205a in start_thread () from /lib64/libc.so.6
+#11 0x00007f5763c05d1c in clone3 () from /lib64/libc.so.6
+
+Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
+--- a/ntpd/ntp_sandbox.c
++++ b/ntpd/ntp_sandbox.c
+@@ -357,6 +357,7 @@ int scmp_sc[] = {
+ 	SCMP_SYS(poll),
+ 	SCMP_SYS(pselect6),
+ 	SCMP_SYS(read),
++	SCMP_SYS(readv),	/* nscd getaddrinfo() provider */
+ 	SCMP_SYS(recvfrom),    /* Comment this out for testing.
+ 				* It will die on the first reply.
+ 				* (Or maybe sooner if a request arrives.)
+GitLab

diff --git a/net-misc/ntpsec/ntpsec-1.2.1-r5.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r5.ebuild
new file mode 100644
index 000000000000..faba59c221e6
--- /dev/null
+++ b/net-misc/ntpsec/ntpsec-1.2.1-r5.ebuild
@@ -0,0 +1,178 @@
+# 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"
+	"${FILESDIR}/${PN}-1.2.1-seccomp-nsd.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-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 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."
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2022-11-02  0:47 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2022-11-02  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     457fcc8079b30e1be8fe0d4cead4218e3884072c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  2 00:11:28 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov  2 00:47:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=457fcc80

net-misc/ntpsec: drop 1.2.1-r2, 1.2.1-r3, 1.2.1-r4, 1.2.1-r5

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ntpsec/files/ntpd.rc-r2       |  22 ----
 net-misc/ntpsec/metadata.xml           |   3 +-
 net-misc/ntpsec/ntpsec-1.2.1-r2.ebuild | 168 -------------------------------
 net-misc/ntpsec/ntpsec-1.2.1-r3.ebuild | 177 --------------------------------
 net-misc/ntpsec/ntpsec-1.2.1-r4.ebuild | 177 --------------------------------
 net-misc/ntpsec/ntpsec-1.2.1-r5.ebuild | 178 ---------------------------------
 6 files changed, 1 insertion(+), 724 deletions(-)

diff --git a/net-misc/ntpsec/files/ntpd.rc-r2 b/net-misc/ntpsec/files/ntpd.rc-r2
deleted file mode 100644
index 82a950ef5dac..000000000000
--- a/net-misc/ntpsec/files/ntpd.rc-r2
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="ntpd - the network time protocol daemon"
-pidfile="/run/ntpd.pid"
-command="/usr/sbin/ntpd"
-command_args="-p ${pidfile} ${NTPD_OPTS}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
-	use net dns logger
-	after ntp-client
-}
-
-start_pre() {
-	if [ ! -f /etc/ntp.conf ] ; then
-	eerror "Please create /etc/ntp.conf"
-		return 1
-	fi
-	return 0
-}

diff --git a/net-misc/ntpsec/metadata.xml b/net-misc/ntpsec/metadata.xml
index 69f78f92c02d..7e10e7cbb842 100644
--- a/net-misc/ntpsec/metadata.xml
+++ b/net-misc/ntpsec/metadata.xml
@@ -6,7 +6,7 @@
 		<name>Anthony G. Basile</name>
 	</maintainer>
 	<longdescription lang="en">
-NTPsec project - a secure, hardened, and improved implementation of Network Time Protocol derived from NTP Classic, Dave Mills’s original.
+	NTPsec project - a secure, hardened, and improved implementation of Network Time Protocol derived from NTP Classic, Dave Mills’s original.
 	</longdescription>
 	<use>
 		<flag name="early">Drop root privileges early</flag>
@@ -31,6 +31,5 @@ NTPsec project - a secure, hardened, and improved implementation of Network Time
 		<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="smear">Specify the interval over which a leap second is applied (experimental)</flag>
-		<flag name="tests">Enable tests</flag>
 	</use>
 </pkgmetadata>

diff --git a/net-misc/ntpsec/ntpsec-1.2.1-r2.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r2.ebuild
deleted file mode 100644
index 80e17ecb6cb5..000000000000
--- a/net-misc/ntpsec/ntpsec-1.2.1-r2.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-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/${PN}-${PV}.tar.gz"
-	RESTRICT="mirror"
-	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 tests" #ionice
-REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
-
-# net-misc/pps-tools oncore,pps
-CDEPEND="${PYTHON_DEPS}
-	sys-libs/libcap
-	dev-python/psutil[${PYTHON_USEDEP}]
-	libbsd? ( dev-libs/libbsd:0= )
-	dev-libs/openssl:0=
-	seccomp? ( sys-libs/libseccomp )
-"
-RDEPEND="${CDEPEND}
-	ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
-	!net-misc/ntp
-	!net-misc/openntpd
-	acct-group/ntp
-	acct-user/ntp
-"
-DEPEND="${CDEPEND}
-	>=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 )
-"
-
-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"
-)
-
-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=(
-		--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 tests	&& echo "--alltests")
-		$(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
-	}
-	python_foreach_impl run_in_build_dir python_compile
-}
-
-src_install() {
-	python_install() {
-		waf-utils_src_install
-		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-1.2.1-r3.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r3.ebuild
deleted file mode 100644
index 93bcb0332fab..000000000000
--- a/net-misc/ntpsec/ntpsec-1.2.1-r3.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# 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-1.2.1-r4.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r4.ebuild
deleted file mode 100644
index c6da1c0300fc..000000000000
--- a/net-misc/ntpsec/ntpsec-1.2.1-r4.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# 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-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 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-1.2.1-r5.ebuild b/net-misc/ntpsec/ntpsec-1.2.1-r5.ebuild
deleted file mode 100644
index faba59c221e6..000000000000
--- a/net-misc/ntpsec/ntpsec-1.2.1-r5.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# 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"
-	"${FILESDIR}/${PN}-1.2.1-seccomp-nsd.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-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 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."
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2023-04-16 22:39 Sebastian Pipping
  0 siblings, 0 replies; 13+ messages in thread
From: Sebastian Pipping @ 2023-04-16 22:39 UTC (permalink / raw
  To: gentoo-commits

commit:     32df79e74beff72d36dae363e53f2d16808c356a
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 16 22:35:38 2023 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sun Apr 16 22:35:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32df79e7

net-misc/ntpsec: Fix logrotate config

Closes: https://bugs.gentoo.org/873514
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>

 net-misc/ntpsec/files/ntpsec-1.2.2-logrotate.patch | 26 ++++++++++++++++++++++
 .../{ntpsec-9999.ebuild => ntpsec-1.2.2-r1.ebuild} |  1 +
 net-misc/ntpsec/ntpsec-9999.ebuild                 |  1 +
 3 files changed, 28 insertions(+)

diff --git a/net-misc/ntpsec/files/ntpsec-1.2.2-logrotate.patch b/net-misc/ntpsec/files/ntpsec-1.2.2-logrotate.patch
new file mode 100644
index 000000000000..60152bc846c4
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.2.2-logrotate.patch
@@ -0,0 +1,26 @@
+From 4ba53b95a6a45f08f5d3436a4a3ba4f9a97146e2 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Mon, 17 Apr 2023 00:24:32 +0200
+Subject: [PATCH] Give ntpd a chance at re-opening the logfile as ntp:ntp after
+ rotation
+
+https://bugs.gentoo.org/873514
+---
+ etc/logrotate-config.ntpd | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/etc/logrotate-config.ntpd b/etc/logrotate-config.ntpd
+index b64998e..9144e57 100644
+--- a/etc/logrotate-config.ntpd
++++ b/etc/logrotate-config.ntpd
+@@ -5,6 +5,7 @@
+ 
+ /var/log/ntpd.log {
+     monthly
++    create 640 ntp root
+     missingok
+     postrotate
+       /usr/bin/killall -HUP ntpd
+-- 
+2.40.0
+

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-1.2.2-r1.ebuild
similarity index 98%
copy from net-misc/ntpsec/ntpsec-9999.ebuild
copy to net-misc/ntpsec/ntpsec-1.2.2-r1.ebuild
index 2fec1857639a..cee0430804e4 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.2-r1.ebuild
@@ -54,6 +54,7 @@ BDEPEND=">=app-text/asciidoc-8.6.8
 
 PATCHES=(
 	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
+	"${FILESDIR}/${PN}-1.2.2-logrotate.patch"
 )
 
 WAF_BINARY="${S}/waf"

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-9999.ebuild
index 2fec1857639a..cee0430804e4 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -54,6 +54,7 @@ BDEPEND=">=app-text/asciidoc-8.6.8
 
 PATCHES=(
 	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
+	"${FILESDIR}/${PN}-1.2.2-logrotate.patch"
 )
 
 WAF_BINARY="${S}/waf"


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/
@ 2024-06-14  8:03 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2024-06-14  8:03 UTC (permalink / raw
  To: gentoo-commits

commit:     a0359d5441b73a07358be07a8bcb20d4a90373d1
Author:     James Browning <JamesB.fe80 <AT> gmail <DOT> com>
AuthorDate: Tue Jun  4 18:31:51 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 08:01:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0359d54

net-misc/ntpsec: Replace egg-info with a Flit pyproject.toml file

Bug: https://bugs.gentoo.org/910009
Bug: https://bugs.gentoo.org/922819
Signed-off-by: James Browning <JamesB.fe80 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ntpsec/files/flit.toml                    | 34 +++++++++++++++++++
 .../ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch  | 38 ++++++++++++++++++++++
 net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild            |  2 ++
 net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild             |  2 ++
 net-misc/ntpsec/ntpsec-9999.ebuild                 |  2 ++
 5 files changed, 78 insertions(+)

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/ntpsec-1.2.2a-r1.ebuild b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
index 95735be7c7bf..9db716210dab 100644
--- a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
@@ -71,6 +71,7 @@ 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"
@@ -123,6 +124,7 @@ src_configure() {
 }
 
 python_configure() {
+	cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml"
 	waf-utils_src_configure "${myconf[@]}"
 }
 

diff --git a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
index a2c87b866336..760ab7ded80c 100644
--- a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
@@ -71,6 +71,7 @@ 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"
@@ -122,6 +123,7 @@ src_configure() {
 }
 
 python_configure() {
+	cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml"
 	waf-utils_src_configure "${myconf[@]}"
 }
 

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild b/net-misc/ntpsec/ntpsec-9999.ebuild
index 68b047560c2a..79ca14fe71f2 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -71,6 +71,7 @@ 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"
@@ -122,6 +123,7 @@ src_configure() {
 }
 
 python_configure() {
+	cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml"
 	waf-utils_src_configure "${myconf[@]}"
 }
 


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-06-14  8:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-23 22:54 [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/files/, net-misc/ntpsec/ Steve Arnold
  -- strict thread matches above, loose matches on Subject: below --
2018-02-25 17:19 Anthony G. Basile
2019-05-23 17:56 Anthony G. Basile
2019-08-05  4:59 Steve Arnold
2020-03-14  3:24 Steve Arnold
2021-04-11  1:34 Steve Arnold
2021-11-14  8:49 Sam James
2021-12-02 21:56 Steve Arnold
2022-06-03  5:32 Sam James
2022-06-12 11:59 Sam James
2022-11-02  0:47 Sam James
2023-04-16 22:39 Sebastian Pipping
2024-06-14  8:03 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox