net-misc/ntpsec: fix logrotate, inherit user, QA issues (really)
authorStephen Arnold <nerdboy@gentoo.org>
Sun, 10 Nov 2019 03:39:27 +0000 (19:39 -0800)
committerStephen Arnold <nerdboy@gentoo.org>
Sun, 10 Nov 2019 03:40:38 +0000 (19:40 -0800)
* fixes bug 697948 (use acct-group/acct-user)
* fixes bug 698042 (logrotate)
* fixes some QA issues from bug 695088 but leaves clock flags (for now)
* does not address in-progress bugs or pre-1.1.7

Package-Manager: Portage-2.3.67, Repoman-2.3.17
Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
net-misc/ntpsec/ntpsec-1.1.7-r1.ebuild
net-misc/ntpsec/ntpsec-9999.ebuild

index 1ef2fda749d330ad2d16d96c12939f5beb3afd90..984a26200b850ea8e9a30f6c86059a68033b31d5 100644 (file)
@@ -6,13 +6,13 @@ EAPI=6
 PYTHON_COMPAT=( python2_7 python3_{5,6} )
 PYTHON_REQ_USE='threads(+)'
 
-inherit flag-o-matic python-r1 waf-utils systemd user
+inherit flag-o-matic python-r1 waf-utils systemd
 
 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"
@@ -48,6 +48,8 @@ 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
@@ -60,15 +62,11 @@ DEPEND="${CDEPEND}
 
 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
+       eapply "${FILESDIR}/${P}"-make-sure-logrotate-config-has-missingok.patch
        if ! use libbsd ; then
                epatch "${FILESDIR}/${PN}-no-bsd.patch"
        fi
@@ -123,6 +121,7 @@ src_install() {
                waf-utils_src_install
        }
        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}
index 050f701b387dfb8b764bfb6de75145d8cdbdc6f8..0d9f22dc3aa89cd53faf165203eb9952d793c9a5 100644 (file)
@@ -6,7 +6,7 @@ EAPI=6
 PYTHON_COMPAT=( python2_7 python3_{5,6} )
 PYTHON_REQ_USE='threads(+)'
 
-inherit flag-o-matic python-r1 waf-utils systemd user
+inherit flag-o-matic python-r1 waf-utils systemd
 
 if [[ ${PV} == *9999* ]]; then
        inherit git-r3
@@ -48,6 +48,8 @@ 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
@@ -60,11 +62,6 @@ DEPEND="${CDEPEND}
 
 WAF_BINARY="${S}/waf"
 
-pkg_setup() {
-       enewgroup ntp 123
-       enewuser ntp 123 -1 /dev/null ntp
-}
-
 src_prepare() {
        default
        # Remove autostripping of binaries
@@ -93,6 +90,7 @@ src_configure() {
                --nopyc
                --nopyo
                --refclock="${CLOCKSTRING}"
+               --build-epoch="$(date +%s)"
                $(use doc       && echo "--enable-doc")
                $(use early     && echo "--enable-early-droproot")
                $(use gdb       && echo "--enable-debug-gdb")
@@ -122,6 +120,7 @@ src_install() {
                waf-utils_src_install
        }
        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}