commit:     bccc7ae446ae4f100cdd87227a636541769ecde6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 18 22:51:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 18 22:51:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bccc7ae4

net-misc/chrony: install chronyd.conf symlink

It's easier to just install a symlink from /etc/chronyd.conf -> 
/etc/chrony/chronyd.conf
than move the directory out and cause disruption for users.

Needed for alignment with other distros but also because dhcpcd looks there
for its ntp hook.

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

 net-misc/chrony/{chrony-9999.ebuild => chrony-4.3-r3.ebuild} | 8 +++++++-
 net-misc/chrony/chrony-9999.ebuild                           | 6 +++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/net-misc/chrony/chrony-9999.ebuild 
b/net-misc/chrony/chrony-4.3-r3.ebuild
similarity index 95%
copy from net-misc/chrony/chrony-9999.ebuild
copy to net-misc/chrony/chrony-4.3-r3.ebuild
index e89af76426c6..f66b2735ecbf 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-4.3-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -55,7 +55,9 @@ RDEPEND="
        ${DEPEND}
        selinux? ( sec-policy/selinux-chronyd )
 "
+# bison dep only for 4.3-r1 for ${P}-strict-prototypes-clang16.patch
 BDEPEND="
+       sys-devel/bison
        html? ( dev-ruby/asciidoctor )
        nts? ( virtual/pkgconfig )
        sechash? (
@@ -78,6 +80,7 @@ fi
 PATCHES=(
        "${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
        "${FILESDIR}"/${PN}-4.2-systemd-gentoo.patch
+       "${FILESDIR}"/${P}-strict-prototypes-clang16.patch
 )
 
 src_prepare() {
@@ -163,6 +166,9 @@ src_compile() {
 src_install() {
        default
 
+       # Compatibility with other distributions who install to 
/etc/chrony.conf (bug #835461)
+       dosym /etc/chrony/chrony.conf /etc/chronyd.conf
+
        newinitd "${FILESDIR}"/chronyd.init-r2 chronyd
        newconfd "${T}"/chronyd.conf chronyd
 

diff --git a/net-misc/chrony/chrony-9999.ebuild 
b/net-misc/chrony/chrony-9999.ebuild
index e89af76426c6..76ce6a722adb 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -78,6 +78,7 @@ fi
 PATCHES=(
        "${FILESDIR}"/${PN}-3.5-pool-vendor-gentoo.patch
        "${FILESDIR}"/${PN}-4.2-systemd-gentoo.patch
+       "${FILESDIR}"/${P}-strict-prototypes-clang16.patch
 )
 
 src_prepare() {
@@ -163,6 +164,9 @@ src_compile() {
 src_install() {
        default
 
+       # Compatibility with other distributions who install to 
/etc/chrony.conf (bug #835461)
+       dosym /etc/chrony/chrony.conf /etc/chronyd.conf
+
        newinitd "${FILESDIR}"/chronyd.init-r2 chronyd
        newconfd "${T}"/chronyd.conf chronyd
 

Reply via email to