commit:     20ee025a8c833ae54a167026e4930c6c2a2ef75c
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 14:13:26 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 14:16:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20ee025a

net-misc/ntp: fix install with USE=openntpd

Closes: https://bugs.gentoo.org/894368
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-misc/ntp/ntp-4.2.8_p15-r6.ebuild | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net-misc/ntp/ntp-4.2.8_p15-r6.ebuild 
b/net-misc/ntp/ntp-4.2.8_p15-r6.ebuild
index 64ff48c345f8..47cdd643d619 100644
--- a/net-misc/ntp/ntp-4.2.8_p15-r6.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p15-r6.ebuild
@@ -112,15 +112,13 @@ src_install() {
        fi
        sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
 
-       newtmpfiles "${FILESDIR}"/ntp.tmpfiles ntp.conf
-
        if use openntpd ; then
                cd "${ED}" || die
                rm usr/sbin/ntpd || die
-               rm -r var/lib || die
                rm etc/{conf,init}.d/ntpd || die
                rm usr/share/man/*/ntpd.8 || die
        else
+               newtmpfiles "${FILESDIR}"/ntp.tmpfiles ntp.conf
                systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
                if use caps ; then
                        sed -i '/ExecStart/ s|$| -u ntp:ntp|' \
@@ -137,7 +135,9 @@ src_install() {
 }
 
 pkg_postinst() {
-       tmpfiles_process ntp.conf
+       if ! use openntpd; then
+               tmpfiles_process ntp.conf
+       fi
        if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
                eerror "The notrust option was found in your /etc/ntp.conf!"
                ewarn "If your ntpd starts sending out weird responses,"

Reply via email to