commit: 010d17c7b421a0fa06ecd2430913f04ea5f47562 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Feb 8 14:14:24 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Feb 8 14:54:02 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=010d17c7
net-misc/chrony: add notice when switching USE=caps -> USE=-caps Closes: https://bugs.gentoo.org/740550 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Sam James <sam <AT> gentoo.org> net-misc/chrony/chrony-4.0-r1.ebuild | 12 ++++++++---- net-misc/chrony/chrony-9999.ebuild | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/net-misc/chrony/chrony-4.0-r1.ebuild b/net-misc/chrony/chrony-4.0-r1.ebuild index d663e9cb680..4a9997a20a5 100644 --- a/net-misc/chrony/chrony-4.0-r1.ebuild +++ b/net-misc/chrony/chrony-4.0-r1.ebuild @@ -188,10 +188,14 @@ pkg_preinst() { pkg_postinst() { tmpfiles_process chronyd.conf - if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then - ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" - ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" - ewarn "This is necessary for chrony to drop privileges" + if [[ -n "${REPLACING_VERSIONS}" ]] ; then + if use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" + ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" + ewarn "This is necessary for chrony to drop privileges" + elif ! use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by root:root" + fi fi if [[ ! ${HAD_SECCOMP} ]] && use seccomp ; then diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild index d663e9cb680..4a9997a20a5 100644 --- a/net-misc/chrony/chrony-9999.ebuild +++ b/net-misc/chrony/chrony-9999.ebuild @@ -188,10 +188,14 @@ pkg_preinst() { pkg_postinst() { tmpfiles_process chronyd.conf - if [[ -n ${REPLACING_VERSIONS} ]] && use caps && ! ${HAD_CAPS}; then - ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" - ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" - ewarn "This is necessary for chrony to drop privileges" + if [[ -n "${REPLACING_VERSIONS}" ]] ; then + if use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by ntp:ntp" + ewarn "e.g. chown -R ntp:ntp ${EROOT}/var/{lib,log}/chrony" + ewarn "This is necessary for chrony to drop privileges" + elif ! use caps && ! ${HAD_CAPS} ; then + ewarn "Please adjust permissions on ${EROOT}/var/{lib,log}/chrony to be owned by root:root" + fi fi if [[ ! ${HAD_SECCOMP} ]] && use seccomp ; then
