public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/
Date: Wed,  5 Sep 2018 14:00:46 +0000 (UTC)	[thread overview]
Message-ID: <1536156041.3258d7f48cd61a5a116b857de94fa02547a3f06d.floppym@gentoo> (raw)

commit:     3258d7f48cd61a5a116b857de94fa02547a3f06d
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  4 17:53:47 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Sep  5 14:00:41 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3258d7f4

net-misc/chrony: systemd changes/fixes

Use upstream unit file with a couple tweaks.
Stop installing obsolete[1] ntp-units.d file.

[1] https://github.com/systemd/systemd/commit/b72ddf0f4f552dd53d6404b6ddbc9f17d02b8e12

 ....4_pre1-r1.ebuild => chrony-3.4_pre1-r2.ebuild} | 10 ++++----
 net-misc/chrony/chrony-9999.ebuild                 | 12 ++++++----
 net-misc/chrony/files/chronyd-systemd-gentoo.patch | 28 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 9 deletions(-)

diff --git a/net-misc/chrony/chrony-3.4_pre1-r1.ebuild b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild
similarity index 96%
rename from net-misc/chrony/chrony-3.4_pre1-r1.ebuild
rename to net-misc/chrony/chrony-3.4_pre1-r2.ebuild
index a39dc7b24dc..2b17b91c999 100644
--- a/net-misc/chrony/chrony-3.4_pre1-r1.ebuild
+++ b/net-misc/chrony/chrony-3.4_pre1-r2.ebuild
@@ -36,12 +36,15 @@ RESTRICT=test
 
 S="${WORKDIR}/${P/_/-}"
 
+PATCHES=(
+	"${FILESDIR}"/chronyd-systemd-gentoo.patch
+)
+
 src_prepare() {
+	default
 	sed -i \
 		-e 's:/etc/chrony\.conf:/etc/chrony/chrony.conf:g' \
 		doc/* examples/* || die
-
-	default
 }
 
 src_configure() {
@@ -116,6 +119,5 @@ src_install() {
 	insinto /etc/logrotate.d
 	newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
 
-	systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
-	systemd_enable_ntpunit 50-chrony chronyd.service
+	systemd_dounit examples/chronyd.service
 }

diff --git a/net-misc/chrony/chrony-9999.ebuild b/net-misc/chrony/chrony-9999.ebuild
index 1878efaf91d..ac4e878733e 100644
--- a/net-misc/chrony/chrony-9999.ebuild
+++ b/net-misc/chrony/chrony-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -33,13 +33,16 @@ RDEPEND="
 RESTRICT=test
 S="${WORKDIR}/${P/_/-}"
 
+PATCHES=(
+	"${FILESDIR}"/chronyd-systemd-gentoo.patch
+)
+
 src_prepare() {
+	default
 	sed -i \
 		-e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \
 		-e 's:/var/run:/run:g' \
 		conf.c doc/*.adoc examples/* || die
-
-	default
 }
 
 src_configure() {
@@ -111,6 +114,5 @@ src_install() {
 	insinto /etc/logrotate.d
 	newins "${FILESDIR}"/chrony-2.4-r1.logrotate chrony
 
-	systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
-	systemd_enable_ntpunit 50-chrony chronyd.service
+	systemd_dounit examples/chronyd.service
 }

diff --git a/net-misc/chrony/files/chronyd-systemd-gentoo.patch b/net-misc/chrony/files/chronyd-systemd-gentoo.patch
new file mode 100644
index 00000000000..63d6b7ed339
--- /dev/null
+++ b/net-misc/chrony/files/chronyd-systemd-gentoo.patch
@@ -0,0 +1,28 @@
+From ba3ddefc90f58d30a365104cf6e930333e3a2704 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Tue, 4 Sep 2018 13:01:06 -0400
+Subject: [PATCH] Tweak chronyd.service for Gentoo
+
+---
+ examples/chronyd.service | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/examples/chronyd.service b/examples/chronyd.service
+index 1777413..ceed830 100644
+--- a/examples/chronyd.service
++++ b/examples/chronyd.service
+@@ -7,9 +7,8 @@ ConditionCapability=CAP_SYS_TIME
+ 
+ [Service]
+ Type=forking
+-PIDFile=/var/run/chrony/chronyd.pid
+-EnvironmentFile=-/etc/sysconfig/chronyd
+-ExecStart=/usr/sbin/chronyd $OPTIONS
++PIDFile=/run/chrony/chronyd.pid
++ExecStart=/usr/sbin/chronyd
+ PrivateTmp=yes
+ ProtectHome=yes
+ ProtectSystem=full
+-- 
+2.18.0
+


             reply	other threads:[~2018-09-05 14:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 14:00 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-11 14:14 [gentoo-commits] repo/gentoo:master commit in: net-misc/chrony/, net-misc/chrony/files/ Sam James
2022-11-10  7:13 Sam James
2021-12-17  2:52 Sam James
2020-09-05  9:29 Jeroen Roovers
2020-03-30 18:36 Thomas Deutschmann
2019-09-26  8:21 Jeroen Roovers
2016-05-22 15:38 Tobias Klausmann
2015-12-04  6:04 Jeroen Roovers
2015-10-12 12:30 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536156041.3258d7f48cd61a5a116b857de94fa02547a3f06d.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox