Merge ~paelzer/ubuntu/+source/chrony:merge-4.1-3-impish into ubuntu/+source/chrony:debian/sid

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 7f7bde221228fdaf3f7767cbe15b18b5dbbb45d8
Merge reported by: Bryce Harrington
Merged at revision: 7f7bde221228fdaf3f7767cbe15b18b5dbbb45d8
Proposed branch: ~paelzer/ubuntu/+source/chrony:merge-4.1-3-impish
Merge into: ubuntu/+source/chrony:debian/sid
Diff against target: 1091 lines (+886/-5)
11 files modified
debian/README.container (+60/-0)
debian/changelog (+674/-0)
debian/chrony.conf (+17/-2)
debian/chrony.default (+4/-0)
debian/chrony.service (+1/-2)
debian/chronyd-starter.sh (+68/-0)
debian/control (+3/-1)
debian/docs (+1/-0)
debian/install (+1/-0)
debian/patches/lp-1940252-rtc-avoid-printing-and-scanning-time_t.patch (+56/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Utkarsh Gupta (community) Approve
Canonical Server packageset reviewers Pending
Canonical Server Pending
Review via email: mp+407248@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4650/+packages

This late merge was made necessary by glibc 2.34 which brought some incompatibilities.

Builds started, tests will follow.
But the review could already be started and check the general correctness.

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

K, taking this one for 1-for-1-review deal, heh.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (15.7 KiB)

Tests are good now (be aware there are expected errors)

The former fail was
099-scfilter Testing system call filter in non-destructive tests:
  level -1:
    001-minimal OK
    002-extended OK
    003-memlock OK
    004-priority OK
    006-privdrop OK
    007-cmdmon BAD
FAIL

New successful build is:

autopkgtest [14:14:22]: test run_system_tests: debian/tests/upstream-system-tests
autopkgtest [14:14:22]: test run_system_tests: [-----------------------
001-minimal Testing minimal configuration:
  non-default settings:
    minimal_config=1
  starting chronyd OK
  stopping chronyd OK
  checking chronyd messages OK
PASS

002-extended Testing extended configuration:
  non-default settings:
  starting chronyd OK
  waiting for synchronization OK
  stopping chronyd OK
  checking chronyd messages OK
  checking chronyd files OK
PASS

003-memlock Testing memory locking:
  non-default settings:
    extra_chronyd_options=-m
  starting chronyd OK
  waiting for synchronization OK
  stopping chronyd OK
  checking chronyd messages OK
  checking chronyd files OK
PASS

004-priority Testing process priority:
  non-default settings:
    extra_chronyd_options=-P 1
  starting chronyd OK
  waiting for synchronization OK
  stopping chronyd OK
  checking chronyd messages OK
  checking chronyd files OK
PASS

006-privdrop Testing dropping of root privileges:
  non-default settings:
    minimal_config=1
    user=nobody
  starting chronyd OK
  stopping chronyd OK
  checking chronyd messages OK
PASS

007-cmdmon Testing chronyc commands:
  non-default settings:
  starting chronyd OK
  waiting for synchronization OK
  running chronyc allow 1.2.3.4 OK
  checking chronyc output OK
  running chronyc deny 1.2.3.4 OK
  checking chronyc output OK
  running chronyc cmddeny OK
  checking chronyc output OK
  running chronyc cmdallow OK
  checking chronyc output OK
  running chronyc cmddeny 1.2.3.4 OK
  checking chronyc ou...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Full autopkgtest passed (all teste, before I only ran the formerly broken one).

Also if it helps here the usual merge-tags, but it is a simple one anyway.

 * [new tag] lp1940252/logical/4.1-1ubuntu1 -> lp1940252/logical/4.1-1ubuntu1
 * [new tag] lp1940252/new/debian -> lp1940252/new/debian
 * [new tag] lp1940252/old/debian -> lp1940252/old/debian
 * [new tag] lp1940252/old/ubuntu -> lp1940252/old/ubuntu
 * [new tag] lp1940252/reconstruct/4.1-1ubuntu1 -> lp1940252/reconstruct/4.1-1ubuntu1
 * [new tag] lp1940252/split/4.1-1ubuntu1 -> lp1940252/split/4.1-1ubuntu1

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

autopkgtest [15:38:27]: @@@@@@@@@@@@@@@@@@@@ summary
upstream-simulation-test-suite PASS
time-sources-from-dhcp-servers PASS
run_system_tests PASS
run_destructive_system_tests PASS
fragmented-configuration PASS
dynamically-add-source PASS
ntp-server-and-nts-auth PASS

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

* Changelog:
  - [✔] old content and logical tag match as expected
  - [✔] changelog entry correct version and targeted codename
  - [-] changelog entries correct

Trivial nitpick added as an inline comment.

  - [✔] update-maintainer has been run

* Actual changes:
  - [✔] no further upstream version to consider
  - [✔] debian changes look safe

* Old Delta:
  - [✔] dropped changes are ok to be dropped

Verified that they are indeed included in 4.1-2. Perfect!

  - [✔] nothing else to drop

* New Delta:
  - [✔] patches match what was proposed upstream
  - [✔] patches correctly included in debian/patches/series
  - [✔] patches have correct DEP3 metadata

* Build/Test:
  - [✔] build is ok
  - [✔] verified PPA package installs/uninstalls
  - [✔] autopkgtest against the PPA package passes

Thanks for build and autopkgtest logs above.

TL;DR: +1, thanks. Maybe take care of adding the nitpicky suggest whilst uploading. Thanks!

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

 * [new tag] upload/4.1-3ubuntu1 -> upload/4.1-3ubuntu1

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading chrony_4.1-3ubuntu1.dsc: done.
  Uploading chrony_4.1-3ubuntu1.debian.tar.xz: done.
  Uploading chrony_4.1-3ubuntu1_source.buildinfo: done.
  Uploading chrony_4.1-3ubuntu1_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Bryce Harrington (bryce) wrote :

This has migrated successfully

  - Source Package: chrony
  - Current Version: 4.1-3ubuntu1
  - New Version: 4.1-3ubuntu1
  - Migrated: True
  - Requester: Christian Ehrhardt 

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/README.container b/debian/README.container
2new file mode 100644
3index 0000000..dcacf49
4--- /dev/null
5+++ b/debian/README.container
6@@ -0,0 +1,60 @@
7+Chrony in Containers
8+--------------------
9+
10+Currently in 99.9+% of the cases syncing the local clock in a container
11+is wrong. Most of the time it will be unable to do so, because it is lacking
12+CAP_SYS_TIME. Or worse, if the CAP_SYS_TIME privilege is granted, multiple
13+containers could fight over the system's time, because the Linux kernel does
14+not provide time namespaces (yet).
15+
16+There are two things a user installing chrony usually wants:
17+1. synchronize my time (NTP client)
18+2. serve NTP (NTP server)
19+
20+In a container the first makes (usually) no sense, so by default we enable -x
21+there (as it would only crash otherwise).
22+This will disable the control of the system clock.
23+See `man chronyd` for more details on the -x option.
24+
25+Formerly, the check for Condition=CAP_SYS_TIME in the systemd service avoided
26+the crash of the NTP client portion, but that means the server use case will
27+not work by default in containers. It is still not recommended to use a
28+container as an NTP server, but if the host clock is synchronised via NTP,
29+adding the -x option to chronyd instances running in containers will allow
30+them to function as NTP servers which do not adjust the system clock.
31+The Condition=CAP_SYS_TIME check was a silent, no-log-entry stealing away
32+leaving users often unclear what happened - especially if they were more after
33+the NTP server than the NTP client.
34+
35+One could argue that someone who installs chrony expects the system time to be
36+synchronised, so it should fail if it is not able to do so. On the other hand
37+it could be argued that someone who installs chrony expects time to be served
38+over the network via NTP.
39+We can't know which expectation is applicable, so we assume that time should
40+be synchronised unless chronyd is running in a container (or is without
41+CAP_SYS_TIME in any other environment).
42+
43+To make things worse recent container implementations will offer CAP_SYS_TIME
44+to the container. Since from the container's point of view, this capability is
45+available for the container's user namespace. Just later on adjtimex and similar
46+are actually evaluated against the host kernel where they will fail. Due to
47+that without further precaution running chrony in Ubuntu in the future will
48+likely have the service start (as Condition=CAP_SYS_TIME will be true) but
49+then immediately fail.
50+This will depend on the environment e.g. versions and types of containers and
51+thereby feel just 'unreliable' from users point of view.
52+Furthermore it will affect upgrades as the service has to be restarted for a
53+package upgrade to be considered complete.
54+
55+Due to all of that Ubuntu decided (LP: #1589780) to default to -x (do not
56+set the system clock) in containers.
57+
58+If one really wants to (try to) sync time in a container or CAP_SYS_TIME-less
59+environment set SYNC_IN_CONTAINER="yes" in /etc/default/chrony to disable
60+this special handling.
61+
62+It is important to mention that as soon as upstream provides a way to provide
63+a default config working in those cases Ubuntu intends to use that and drop
64+the current workaround.
65+
66+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 16 Mar 2018 12:25:44 +0100
67diff --git a/debian/changelog b/debian/changelog
68index 9309508..cb25d12 100644
69--- a/debian/changelog
70+++ b/debian/changelog
71@@ -1,3 +1,38 @@
72+chrony (4.1-3ubuntu1) impish; urgency=medium
73+
74+ * Merge with Debian unstable (LP: #1940252). Remaining changes:
75+ Remaining changes:
76+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
77+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
78+ Chrony is a single service which acts as both NTP client (i.e. syncing the
79+ local clock) and NTP server (i.e. providing NTP services to the network),
80+ and that is both desired and expected in the vast majority of cases.
81+ But in containers syncing the local clock is usually impossible, but this
82+ shall not break the providing of NTP services to the network.
83+ To some extent this makes chrony's default config more similar to 'ntpd',
84+ which complained in syslog but still provided NTP server service in those
85+ cases.
86+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
87+ + debian/control: add new dependency libcap2-bin for capsh (usually
88+ installed anyway, but make them explicit to be sure).
89+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
90+ (Default off) [fixed a minor typo in the comment in this update]
91+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
92+ and if CAP_SYS_TIME is missing. Effectively allows on to run NTP server
93+ in containers on a default installation and avoid failing to sync time
94+ (or if allowed to sync, avoid multiple containers to fight over it by
95+ accident).
96+ + debian/install: make chrony-starter.sh available on install.
97+ + debian/docs, debian/README.container: provide documentation about the
98+ handling of this case.
99+ * Dropped changes:
100+ - d/t/helper-functions: restart explicitly to fix test issues
101+ * Added changes:
102+ - d/p/lp-1940252-rtc-avoid-printing-and-scanning-time_t.patch: glibc 2.34
103+ compatibility
104+
105+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 17 Aug 2021 12:22:32 +0200
106+
107 chrony (4.1-3) unstable; urgency=medium
108
109 * Upload to unstable.
110@@ -28,6 +63,51 @@ chrony (4.1-2) experimental; urgency=medium
111
112 -- Vincent Blut <vincent.debian@free.fr> Sat, 26 Jun 2021 17:16:45 +0200
113
114+chrony (4.1-1ubuntu1) impish; urgency=medium
115+
116+ * Merge new upstream 4.1 and yet unrelased changes from Debian salsa.
117+ Remaining changes:
118+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
119+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
120+ Chrony is a single service which acts as both NTP client (i.e. syncing the
121+ local clock) and NTP server (i.e. providing NTP services to the network),
122+ and that is both desired and expected in the vast majority of cases.
123+ But in containers syncing the local clock is usually impossible, but this
124+ shall not break the providing of NTP services to the network.
125+ To some extent this makes chrony's default config more similar to 'ntpd',
126+ which complained in syslog but still provided NTP server service in those
127+ cases.
128+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
129+ + debian/control: add new dependency libcap2-bin for capsh (usually
130+ installed anyway, but make them explicit to be sure).
131+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
132+ (Default off) [fixed a minor typo in the comment in this update]
133+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
134+ and if CAP_SYS_TIME is missing. Effectively allows on to run NTP server
135+ in containers on a default installation and avoid failing to sync time
136+ (or if allowed to sync, avoid multiple containers to fight over it by
137+ accident).
138+ + debian/install: make chrony-starter.sh available on install.
139+ + debian/docs, debian/README.container: provide documentation about the
140+ handling of this case.
141+ * Dropped changes:
142+ - d/t/helper-functions: reduce default ubuntu config, to make space for
143+ testcase config
144+ [ in Debian 4.0-6 ]
145+ - d/t/{dynamically-add-source,ntp-server-and-nts-auth,helper-functions}:
146+ unify tests to use reload and restart
147+ [ in Debian 4.0-6 ]
148+ - d/t/upstream-simulation-test-suite: Update clknetsim version to fix
149+ a test failure on s390x when LTO is enabled at build time (LP #1921377)
150+ [ in Debian 4.1~pre1-1 ]
151+ - d/p/lp-1915006-sys_linux-allow-statx-and-fstatat64-in-seccomp-filte.patch:
152+ add compatibility for glibc 2.33 (LP: 1915006)
153+ [ upstream in 4.1-pre1 ]
154+ * Added changes:
155+ - d/t/helper-functions: restart explicitly to fix test issues
156+
157+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 18 May 2021 08:12:59 +0200
158+
159 chrony (4.1-1) experimental; urgency=medium
160
161 * Import upstream version 4.1:
162@@ -118,6 +198,54 @@ chrony (4.0-6) unstable; urgency=medium
163
164 -- Vincent Blut <vincent.debian@free.fr> Sun, 21 Feb 2021 21:59:22 +0100
165
166+chrony (4.0-5ubuntu3) hirsute; urgency=medium
167+
168+ * d/t/upstream-simulation-test-suite: Update clknetsim version to fix
169+ a test failure on s390x when LTO is enabled at build time (LP: #1921377)
170+
171+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 25 Mar 2021 15:45:47 +0100
172+
173+chrony (4.0-5ubuntu2) hirsute; urgency=medium
174+
175+ * d/p/lp-1915006-sys_linux-allow-statx-and-fstatat64-in-seccomp-filte.patch:
176+ add compatibility for glibc 2.33 (LP: 1915006)
177+
178+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 15 Feb 2021 12:50:29 +0100
179+
180+chrony (4.0-5ubuntu1) hirsute; urgency=medium
181+
182+ * Merge with Debian unstable (LP: #1915006). Remaining changes:
183+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
184+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
185+ Chrony is a single service which acts as both NTP client (i.e. syncing the
186+ local clock) and NTP server (i.e. providing NTP services to the network),
187+ and that is both desired and expected in the vast majority of cases.
188+ But in containers syncing the local clock is usually impossible, but this
189+ shall not break the providing of NTP services to the network.
190+ To some extent this makes chrony's default config more similar to 'ntpd',
191+ which complained in syslog but still provided NTP server service in those
192+ cases.
193+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
194+ + debian/control: add new dependency libcap2-bin for capsh (usually
195+ installed anyway, but make them explicit to be sure).
196+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
197+ (Default off) [fixed a minor typo in the comment in this update]
198+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
199+ and if CAP_SYS_TIME is missing. Effectively allows on to run NTP server
200+ in containers on a default installation and avoid failing to sync time
201+ (or if allowed to sync, avoid multiple containers to fight over it by
202+ accident).
203+ + debian/install: make chrony-starter.sh available on install.
204+ + debian/docs, debian/README.container: provide documentation about the
205+ handling of this case.
206+ * Added changes:
207+ - d/t/helper-functions: reduce default ubuntu config, to make space for
208+ testcase config
209+ - d/t/{dynamically-add-source,ntp-server-and-nts-auth,helper-functions}:
210+ unify tests to use reload and restart
211+
212+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 08 Feb 2021 12:45:05 +0100
213+
214 chrony (4.0-5) unstable; urgency=medium
215
216 * Follow DEP-14 branch naming conventions:
217@@ -234,6 +362,35 @@ chrony (4.0-3) unstable; urgency=medium
218
219 -- Vincent Blut <vincent.debian@free.fr> Mon, 18 Jan 2021 21:58:52 +0100
220
221+chrony (4.0-2ubuntu1) hirsute; urgency=medium
222+
223+ * Merge with Debian unstable. Remaining changes:
224+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
225+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
226+ Chrony is a single service which acts as both NTP client (i.e. syncing the
227+ local clock) and NTP server (i.e. providing NTP services to the network),
228+ and that is both desired and expected in the vast majority of cases.
229+ But in containers syncing the local clock is usually impossible, but this
230+ shall not break the providing of NTP services to the network.
231+ To some extent this makes chrony's default config more similar to 'ntpd',
232+ which complained in syslog but still provided NTP server service in those
233+ cases.
234+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
235+ + debian/control: add new dependency libcap2-bin for capsh (usually
236+ installed anyway, but make them explicit to be sure).
237+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
238+ (Default off) [fixed a minor typo in the comment in this update]
239+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
240+ and if CAP_SYS_TIME is missing. Effectively allows on to run NTP server
241+ in containers on a default installation and avoid failing to sync time
242+ (or if allowed to sync, avoid multiple containers to fight over it by
243+ accident).
244+ + debian/install: make chrony-starter.sh available on install.
245+ + debian/docs, debian/README.container: provide documentation about the
246+ handling of this case.
247+
248+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 27 Oct 2020 10:55:19 +0100
249+
250 chrony (4.0-2) unstable; urgency=medium
251
252 * Merge branch 'experimental' into 'master'.
253@@ -369,6 +526,44 @@ chrony (4.0~pre4-1) experimental; urgency=medium
254
255 -- Vincent Blut <vincent.debian@free.fr> Fri, 02 Oct 2020 21:21:08 +0200
256
257+chrony (3.5.1-1ubuntu2) groovy; urgency=medium
258+
259+ * d/chronyd-starter.sh: fix commandline argument parsing (LP: #1898000)
260+
261+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 06 Oct 2020 12:20:40 +0200
262+
263+chrony (3.5.1-1ubuntu1) groovy; urgency=medium
264+
265+ * Merge with Debian unstable. Remaining changes:
266+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
267+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
268+ Chrony is a single service which acts as both NTP client (i.e. syncing the
269+ local clock) and NTP server (i.e. providing NTP services to the network),
270+ and that is both desired and expected in the vast majority of cases.
271+ But in containers syncing the local clock is usually impossible, but this
272+ shall not break the providing of NTP services to the network.
273+ To some extent this makes chrony's default config more similar to 'ntpd',
274+ which complained in syslog but still provided NTP server service in those
275+ cases.
276+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
277+ + debian/control: add new dependency libcap2-bin for capsh (usually
278+ installed anyway, but make them explicit to be sure).
279+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
280+ (Default off) [fixed a minor typo in the comment in this update]
281+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
282+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
283+ containers on a default installation and avoid failing to sync time (or
284+ if allowed to sync, avoid multiple containers to fight over it by
285+ accident).
286+ + debian/install: make chrony-starter.sh available on install.
287+ + debian/docs, debian/README.container: provide documentation about the
288+ handling of this case.
289+ * Dropped changes
290+ - d/t/control: harden time-sources-from-dhcp-servers test for systemd change
291+ (LP: 1873031) [no more needed with recent systemd that is in groovy]
292+
293+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 26 Aug 2020 15:30:48 +0200
294+
295 chrony (3.5.1-1) unstable; urgency=medium
296
297 * Import upstream version 3.5.1:
298@@ -384,6 +579,50 @@ chrony (3.5.1-1) unstable; urgency=medium
299
300 -- Vincent Blut <vincent.debian@free.fr> Thu, 20 Aug 2020 14:07:22 +0200
301
302+chrony (3.5-9ubuntu2) groovy; urgency=medium
303+
304+ * No change rebuild against new libnettle8 and libhogweed6 ABI.
305+
306+ -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 29 Jun 2020 22:22:19 +0100
307+
308+chrony (3.5-9ubuntu1) groovy; urgency=medium
309+
310+ * Merge with Debian unstable (LP: #1878005). Remaining changes:
311+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
312+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
313+ Chrony is a single service which acts as both NTP client (i.e. syncing the
314+ local clock) and NTP server (i.e. providing NTP services to the network),
315+ and that is both desired and expected in the vast majority of cases.
316+ But in containers syncing the local clock is usually impossible, but this
317+ shall not break the providing of NTP services to the network.
318+ To some extent this makes chrony's default config more similar to 'ntpd',
319+ which complained in syslog but still provided NTP server service in those
320+ cases.
321+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
322+ + debian/control: add new dependency libcap2-bin for capsh (usually
323+ installed anyway, but make them explicit to be sure).
324+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
325+ (Default off) [fixed a minor typo in the comment in this update]
326+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
327+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
328+ containers on a default installation and avoid failing to sync time (or
329+ if allowed to sync, avoid multiple containers to fight over it by
330+ accident).
331+ + debian/install: make chrony-starter.sh available on install.
332+ + debian/docs, debian/README.container: provide documentation about the
333+ handling of this case.
334+ - d/t/control: harden time-sources-from-dhcp-servers test for systemd change
335+ (LP: 1873031)
336+ * Dropped changes [in Debian now]
337+ - d/t/upstream-system-tests: stop chrony/systemd-timesynd before tests
338+ - d/t/upstream-system-tests: fix stderr in case services do not exist
339+ - Stop starting systemd-timesyncd in postrm. This is no longer relevant
340+ since systemd-timesyncd is a standalone package declaring
341+ Conflicts/Replaces/Provides: time-daemon. (Closes 955773, LP: 1872183)
342+ - d/postrm: Reinstate the remove target (LP: 1873810)
343+
344+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 20 May 2020 09:57:39 +0200
345+
346 chrony (3.5-9) unstable; urgency=medium
347
348 * debian/patches/:
349@@ -446,6 +685,76 @@ chrony (3.5-7) unstable; urgency=medium
350
351 -- Vincent Blut <vincent.debian@free.fr> Tue, 17 Mar 2020 15:21:53 +0100
352
353+chrony (3.5-6ubuntu6) focal; urgency=medium
354+
355+ * d/postrm: Reinstate the remove target (LP: #1873810)
356+
357+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 20 Apr 2020 15:58:52 +0200
358+
359+chrony (3.5-6ubuntu5) focal; urgency=medium
360+
361+ * d/t/control: harden time-sources-from-dhcp-servers test for systemd change
362+ (LP: #1873031)
363+
364+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 15 Apr 2020 18:23:10 +0200
365+
366+chrony (3.5-6ubuntu4) focal; urgency=medium
367+
368+ * debian/postrm:
369+ - Stop starting systemd-timesyncd in postrm. This is no longer relevant
370+ since systemd-timesyncd is a standalone package declaring
371+ Conflicts/Replaces/Provides: time-daemon. (Closes 955773, LP: #1872183)
372+
373+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 15 Apr 2020 09:01:30 +0200
374+
375+chrony (3.5-6ubuntu3) focal; urgency=medium
376+
377+ * avoid multiple time services running concurrently (LP: #1870144).
378+ This fixes the autopkgtests vs chrond itself, the issue of concurrent
379+ systemd-timesyncd will be fixed in systemd by (LP 1849156)
380+ - d/t/upstream-system-tests: stop chrony/systemd-timesynd before tests
381+ - d/t/upstream-system-tests: fix stderr in case services do not exist
382+
383+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 01 Apr 2020 09:25:45 +0200
384+
385+chrony (3.5-6ubuntu2) focal; urgency=medium
386+
387+ * fix capsh usage in focal avoiding to always fall back to -x (LP: #1867036)
388+ - d/control: add versioned dependency to libcap2-bin new enough to
389+ support --has-p
390+ - d/chronyd-starter.sh: update capsh usage to use --has-p
391+
392+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 31 Mar 2020 10:19:20 +0200
393+
394+chrony (3.5-6ubuntu1) focal; urgency=medium
395+
396+ * Merge with Debian unstable (LP: #1866753). Remaining changes:
397+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
398+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
399+ Chrony is a single service which acts as both NTP client (i.e. syncing the
400+ local clock) and NTP server (i.e. providing NTP services to the network),
401+ and that is both desired and expected in the vast majority of cases.
402+ But in containers syncing the local clock is usually impossible, but this
403+ shall not break the providing of NTP services to the network.
404+ To some extent this makes chrony's default config more similar to 'ntpd',
405+ which complained in syslog but still provided NTP server service in those
406+ cases.
407+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
408+ + debian/control: add new dependency libcap2-bin for capsh (usually
409+ installed anyway, but make them explicit to be sure).
410+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
411+ (Default off) [fixed a minor typo in the comment in this update]
412+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
413+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
414+ containers on a default installation and avoid failing to sync time (or
415+ if allowed to sync, avoid multiple containers to fight over it by
416+ accident).
417+ + debian/install: make chrony-starter.sh available on install.
418+ + debian/docs, debian/README.container: provide documentation about the
419+ handling of this case.
420+
421+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 12 Mar 2020 11:02:33 +0100
422+
423 chrony (3.5-6) unstable; urgency=medium
424
425 * debian/chrony.service:
426@@ -480,6 +789,41 @@ chrony (3.5-6) unstable; urgency=medium
427
428 -- Vincent Blut <vincent.debian@free.fr> Tue, 10 Mar 2020 19:17:16 +0100
429
430+chrony (3.5-5ubuntu1) focal; urgency=medium
431+
432+ * Merge with Debian unstable (LP: #1859969). Remaining changes:
433+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
434+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
435+ Chrony is a single service which acts as both NTP client (i.e. syncing the
436+ local clock) and NTP server (i.e. providing NTP services to the network),
437+ and that is both desired and expected in the vast majority of cases.
438+ But in containers syncing the local clock is usually impossible, but this
439+ shall not break the providing of NTP services to the network.
440+ To some extent this makes chrony's default config more similar to 'ntpd',
441+ which complained in syslog but still provided NTP server service in those
442+ cases.
443+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
444+ + debian/control: add new dependency libcap2-bin for capsh (usually
445+ installed anyway, but make them explicit to be sure).
446+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
447+ (Default off) [fixed a minor typo in the comment in this update]
448+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
449+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
450+ containers on a default installation and avoid failing to sync time (or
451+ if allowed to sync, avoid multiple containers to fight over it by
452+ accident).
453+ + debian/install: make chrony-starter.sh available on install.
454+ + debian/docs, debian/README.container: provide documentation about the
455+ handling of this case.
456+ * Dropped changes:
457+ - d/t/control: destructive_system_tests only work on amd64 and s390x right
458+ now [fixed by backporting fixes from upstream in 3.5-5 ]
459+ - d/t/upstream-simulation-test-suite: ignore warnings on stderr while
460+ running clksim make
461+ [ in Debian 3.5-5 ]
462+
463+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 16 Jan 2020 12:55:32 +0100
464+
465 chrony (3.5-5) unstable; urgency=medium
466
467 * debian/control:
468@@ -507,6 +851,47 @@ chrony (3.5-5) unstable; urgency=medium
469
470 -- Vincent Blut <vincent.debian@free.fr> Sun, 22 Dec 2019 17:30:40 +0100
471
472+chrony (3.5-4ubuntu2) focal; urgency=medium
473+
474+ * d/t/control: destructive_system_tests only work on amd64 and s390x right
475+ now
476+ * d/t/upstream-simulation-test-suite: ignore warnings on stderr while
477+ running clksim make
478+
479+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 03 Dec 2019 14:50:50 +0100
480+
481+chrony (3.5-4ubuntu1) focal; urgency=medium
482+
483+ * Merge with Debian unstable (LP: #1854328). Remaining changes:
484+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
485+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
486+ Chrony is a single service which acts as both NTP client (i.e. syncing the
487+ local clock) and NTP server (i.e. providing NTP services to the network),
488+ and that is both desired and expected in the vast majority of cases.
489+ But in containers syncing the local clock is usually impossible, but this
490+ shall not break the providing of NTP services to the network.
491+ To some extent this makes chrony's default config more similar to 'ntpd',
492+ which complained in syslog but still provided NTP server service in those
493+ cases.
494+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
495+ + debian/control: add new dependency libcap2-bin for capsh (usually
496+ installed anyway, but make them explicit to be sure).
497+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
498+ (Default off) [fixed a minor typo in the comment in this update]
499+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
500+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
501+ containers on a default installation and avoid failing to sync time (or
502+ if allowed to sync, avoid multiple containers to fight over it by
503+ accident).
504+ + debian/install: make chrony-starter.sh available on install.
505+ + debian/docs, debian/README.container: provide documentation about the
506+ handling of this case.
507+ * Dropped changes:
508+ - d/t/control: allow stderr for recent changes in resolved/iproute
509+ (LP 1836882) [no more needed]
510+
511+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 28 Nov 2019 10:31:36 +0100
512+
513 chrony (3.5-4) unstable; urgency=medium
514
515 * debian/tests/control:
516@@ -551,6 +936,52 @@ chrony (3.5-3) unstable; urgency=medium
517
518 -- Vincent Blut <vincent.debian@free.fr> Tue, 13 Aug 2019 17:57:47 +0200
519
520+chrony (3.5-2ubuntu3) focal; urgency=medium
521+
522+ * No-change rebuild against libnettle7
523+
524+ -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 31 Oct 2019 22:07:56 +0000
525+
526+chrony (3.5-2ubuntu2) eoan; urgency=medium
527+
528+ * d/t/control: allow stderr for recent changes in resolved/iproute
529+ (LP: #1836882)
530+
531+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 17 Jul 2019 12:41:58 +0200
532+
533+chrony (3.5-2ubuntu1) eoan; urgency=medium
534+
535+ * Merge with Debian experimental (LP: #1835046). Remaining changes:
536+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
537+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
538+ Chrony is a single service which acts as both NTP client (i.e. syncing the
539+ local clock) and NTP server (i.e. providing NTP services to the network),
540+ and that is both desired and expected in the vast majority of cases.
541+ But in containers syncing the local clock is usually impossible, but this
542+ shall not break the providing of NTP services to the network.
543+ To some extent this makes chrony's default config more similar to 'ntpd',
544+ which complained in syslog but still provided NTP server service in those
545+ cases.
546+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
547+ + debian/control: add new dependency libcap2-bin for capsh (usually
548+ installed anyway, but make them explicit to be sure).
549+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
550+ (Default off) [fixed a minor typo in the comment in this update]
551+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
552+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
553+ containers on a default installation and avoid failing to sync time (or
554+ if allowed to sync, avoid multiple containers to fight over it by
555+ accident).
556+ + debian/install: make chrony-starter.sh available on install.
557+ + debian/docs, debian/README.container: provide documentation about the
558+ handling of this case.
559+ * Dropped changes (accepted in Debian now):
560+ - d/postrm: re-establish systemd-timesyncd on removal (LP 1764357)
561+ - d/postrm: respect policy-rc.d when restoring systemd-timesyncd
562+ (LP 1771994)
563+
564+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 02 Jul 2019 13:37:23 +0200
565+
566 chrony (3.5-2) unstable; urgency=medium
567
568 * Merge branch “experimental” into “master”.
569@@ -637,6 +1068,56 @@ chrony (3.5~pre1-1) experimental; urgency=medium
570
571 -- Vincent Blut <vincent.debian@free.fr> Sun, 12 May 2019 22:16:14 +0200
572
573+chrony (3.4-4ubuntu2) eoan; urgency=medium
574+
575+ * Dropped sysV change added in 3.4-4ubuntu1 (LP: #1829700):
576+ - removed d/init to avoid weird interactions between sysV and systemd
577+ [With debhelper compat level 12 this isn't an issue anymore]
578+
579+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 22 May 2019 09:10:41 +0200
580+
581+chrony (3.4-4ubuntu1) eoan; urgency=medium
582+
583+ * Merge with Debian unstable (LP: #1828992). Remaining changes:
584+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664 1754358)
585+ - Set -x as default if unable to set time (e.g. in containers) (LP 1589780)
586+ Chrony is a single service which acts as both NTP client (i.e. syncing the
587+ local clock) and NTP server (i.e. providing NTP services to the network),
588+ and that is both desired and expected in the vast majority of cases.
589+ But in containers syncing the local clock is usually impossible, but this
590+ shall not break the providing of NTP services to the network.
591+ To some extent this makes chrony's default config more similar to 'ntpd',
592+ which complained in syslog but still provided NTP server service in those
593+ cases.
594+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
595+ + debian/control: add new dependency libcap2-bin for capsh (usually
596+ installed anyway, but make them explicit to be sure).
597+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
598+ (Default off) [fixed a minor typo in the comment in this update]
599+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
600+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
601+ containers on a default installation and avoid failing to sync time (or
602+ if allowed to sync, avoid multiple containers to fight over it by
603+ accident).
604+ + debian/install: make chrony-starter.sh available on install.
605+ + debian/docs, debian/README.container: provide documentation about the
606+ handling of this case.
607+ - d/postrm: re-establish systemd-timesyncd on removal (LP 1764357)
608+ - d/postrm: respect policy-rc.d when restoring systemd-timesyncd
609+ (LP 1771994)
610+ * Added Changes:
611+ - removed d/init to avoid weird interactions between sysV and systemd
612+ * Dropped Changes:
613+ - Notify chrony to update sources in response to systemd-networkd
614+ events (LP: 1718227)
615+ + d/links: link dispatcher script to networkd-dispatcher events routable
616+ and off
617+ + d/control: set Recommends to networkd-dispatcher
618+ [Those are in Debian, except that we agreed to have networkd-dispatcher
619+ to only be a Suggests]
620+
621+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 14 May 2019 12:49:30 +0200
622+
623 chrony (3.4-4) unstable; urgency=medium
624
625 * debian/patches/*:
626@@ -713,6 +1194,48 @@ chrony (3.4-2) unstable; urgency=medium
627
628 -- Vincent Blut <vincent.debian@free.fr> Wed, 13 Feb 2019 17:08:17 +0100
629
630+chrony (3.4-1ubuntu1) disco; urgency=medium
631+
632+ * Merge with Debian unstable (LP: #1802886). Remaining changes:
633+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664)
634+ - Set -x as default if unable to set time (e.g. in containers) (LP: 1589780)
635+ Chrony is a single service which acts as both NTP client (i.e. syncing the
636+ local clock) and NTP server (i.e. providing NTP services to the network),
637+ and that is both desired and expected in the vast majority of cases.
638+ But in containers syncing the local clock is usually impossible, but this
639+ shall not break the providing of NTP services to the network.
640+ To some extent this makes chrony's default config more similar to 'ntpd',
641+ which complained in syslog but still provided NTP server service in those
642+ cases.
643+ + debian/chrony.service: allow the service to run without CAP_SYS_TIME
644+ + debian/control: add new dependency libcap2-bin for capsh (usually
645+ installed anyway, but make them explicit to be sure).
646+ + debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
647+ (Default off).
648+ + debian/chronyd-starter.sh: wrapper to handle special cases in containers
649+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
650+ containers on a default installation and avoid failing to sync time (or
651+ if allowed to sync, avoid multiple containers to fight over it by
652+ accident).
653+ + debian/install: make chronyd-starter.sh available on install.
654+ + debian/docs, debian/README.container: provide documentation about the
655+ handling of this case.
656+ - d/postrm: re-establish systemd-timesyncd on removal (LP: 1764357)
657+ - Notify chrony to update sources in response to systemd-networkd
658+ events (LP: 1718227)
659+ + d/links: link dispatcher script to networkd-dispatcher events routable
660+ and off
661+ + d/control: set Recommends to networkd-dispatcher
662+ * Dropped Changes (upstream):
663+ - d/p/lp-1718227-nm-dispatcher-for-networkd.patch
664+ - d/p/lp-1787366-fall-back-to-urandom.patch: avoid hangs when starting
665+ the service on newer kernels by falling back to urandom. (LP: 1787366)
666+ * Added Changes:
667+ - d/postrm: respect policy-rc.d when restoring systemd-timesyncd
668+ (LP: #1771994)
669+
670+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 12 Nov 2018 11:39:08 +0100
671+
672 chrony (3.4-1) unstable; urgency=medium
673
674 * Import upstream version 3.4:
675@@ -789,6 +1312,66 @@ chrony (3.3-3) unstable; urgency=medium
676
677 -- Vincent Blut <vincent.debian@free.fr> Sat, 18 Aug 2018 16:23:19 +0200
678
679+chrony (3.3-2ubuntu2) cosmic; urgency=medium
680+
681+ * - d/p/lp-1787366-fall-back-to-urandom.patch: avoid hangs when starting
682+ the service on newer kernels by falling back to urandom.
683+ (LP: #1787366, Closes: #906276)
684+
685+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 16 Aug 2018 11:48:38 +0200
686+
687+chrony (3.3-2ubuntu1) cosmic; urgency=medium
688+
689+ * Merge with Debian unstable (LP: #1771061). Remaining changes:
690+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664)
691+ - Set -x as default if unable to set time (e.g. in containers) (LP: 1589780)
692+ Chrony is a single service which acts as both NTP client (i.e. syncing the
693+ local clock) and NTP server (i.e. providing NTP services to the network),
694+ and that is both desired and expected in the vast majority of cases.
695+ But in containers syncing the local clock is usually impossible, but this
696+ shall not break the providing of NTP services to the network.
697+ To some extent this makes chrony's default config more similar to 'ntpd',
698+ which complained in syslog but still provided NTP server service in those
699+ cases.
700+ - debian/chrony.service: allow the service to run without CAP_SYS_TIME
701+ - debian/control: add new dependency libcap2-bin for capsh (usually
702+ installed anyway, but make them explicit to be sure).
703+ - debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
704+ (Default off).
705+ - debian/chronyd-starter.sh: wrapper to handle special cases in containers
706+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
707+ containers on a default installation and avoid failing to sync time (or
708+ if allowed to sync, avoid multiple containers to fight over it by
709+ accident).
710+ - debian/install: make chronyd-starter.sh available on install.
711+ - debian/docs, debian/README.container: provide documentation about the
712+ handling of this case.
713+ - d/postrm: re-establish systemd-timesyncd on removal (LP: 1764357)
714+ - Notify chrony to update sources in response to systemd-networkd
715+ events (LP: 1718227)
716+ - d/links: link dispatcher script to networkd-dispatcher events routable
717+ and off
718+ - d/control: set Recommends to networkd-dispatcher
719+ - d/p/lp-1718227-nm-dispatcher-for-networkd.patch
720+ * Dropped changes
721+ - debian/usr.sbin.chronyd: ensure RTC/GPS usage isn't blocked by apparmor
722+ (LP: 1751241) (in Debian now)
723+ - debian/usr.sbin.chronyd: add cap net_admin for hwtimestamp (LP: 1761327)
724+ (in Debian now)
725+ - d/p/lp1589780-sys_linux-don-t-keep-CAP_SYS_TIME-with-x-option.patch:
726+ When dropping the root privileges, don't try to keep the CAP_SYS_TIME
727+ capability if the -x option was enabled. This allows chronyd to be
728+ started without the capability (e.g. in containers) and also drop the
729+ root privileges (This is upstream now).
730+ - d/p/lp-1718227-ignore-non-up-down-events-in-nm-dispatcher.patch (This is
731+ upstream now).
732+ - d/control: switch to nss instead of tomcrypt (Debian switched to nettle
733+ which is in main, so we can drop this)
734+ * Added changes
735+ - debian/README.container: fix typos
736+
737+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 14 May 2018 09:06:01 +0200
738+
739 chrony (3.3-2) unstable; urgency=medium
740
741 * debian/chrony.service:
742@@ -844,6 +1427,76 @@ chrony (3.2-5) unstable; urgency=medium
743
744 -- Vincent Blut <vincent.debian@free.fr> Wed, 28 Feb 2018 17:31:08 +0100
745
746+chrony (3.2-4ubuntu4) bionic; urgency=medium
747+
748+ * d/postrm: re-establish systemd-timesyncd on removal (LP: #1764357)
749+ * Notify chrony to update sources in response to systemd-networkd
750+ events (LP: #1718227)
751+ - d/links: link dispatcher script to networkd-dispatcher events routable
752+ and off
753+ - d/control: set Recommends to networkd-dispatcher
754+ - d/p/lp-1718227-ignore-non-up-down-events-in-nm-dispatcher.patch
755+ - d/p/lp-1718227-nm-dispatcher-for-networkd.patch
756+
757+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 16 Apr 2018 17:04:06 +0200
758+
759+chrony (3.2-4ubuntu3) bionic; urgency=medium
760+
761+ * debian/usr.sbin.chronyd: add cap net_admin for hwtimestamp (LP: #1761327)
762+
763+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 05 Apr 2018 09:38:10 +0200
764+
765+chrony (3.2-4ubuntu2) bionic; urgency=medium
766+
767+ * Set -x as default if unable to set time (e.g. in containers) (LP: #1589780)
768+ Chrony is a single service which acts as both NTP client (i.e. syncing the
769+ local clock) and NTP server (i.e. providing NTP services to the network),
770+ and that is both desired and expected in the vast majority of cases.
771+ But in containers syncing the local clock is usually impossible, but this
772+ shall not break the providing of NTP services to the network.
773+ To some extent this makes chrony's default config more similar to 'ntpd',
774+ which complained in syslog but still provided NTP server service in those
775+ cases.
776+ - d/p/lp1589780-sys_linux-don-t-keep-CAP_SYS_TIME-with-x-option.patch:
777+ When dropping the root privileges, don't try to keep the CAP_SYS_TIME
778+ capability if the -x option was enabled. This allows chronyd to be
779+ started without the capability (e.g. in containers) and also drop the
780+ root privileges.
781+ - debian/chrony.service: allow the service to run without CAP_SYS_TIME
782+ - debian/control: add new dependency libcap2-bin for capsh (usually
783+ installed anyway, but make them explicit to be sure).
784+ - debian/chrony.default: new option SYNC_IN_CONTAINER to not fall back
785+ (Default off).
786+ - debian/chronyd-starter.sh: wrapper to handle special cases in containers
787+ and if CAP_SYS_TIME is missing. Effectively allows to run NTP server in
788+ containers on a default installation and avoid failing to sync time (or
789+ if allowed to sync, avoid multiple containers to fight over it by
790+ accident).
791+ - debian/install: make chronyd-starter.sh available on install.
792+ - debian/docs, debian/README.container: provide documentation about the
793+ handling of this case.
794+ * debian/chrony.conf: update default chrony.conf to not violate the policy
795+ of pool.ntp.org (to use no more than four of their servers) and to provide
796+ more ipv6 capable sources by default (LP: #1754358)
797+
798+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 16 Mar 2018 12:25:44 +0100
799+
800+chrony (3.2-4ubuntu1) bionic; urgency=medium
801+
802+ * Merge with Debian unstable. Remaining changes:
803+ - d/control: switch to nss instead of tomcrypt (nss is in main)
804+ - d/chrony.conf: use ubuntu ntp pool and server (LP 1744664)
805+ * Dropped changes (in Debian)
806+ - d/chrony.default, d/chrony.service: support /etc/default/chrony
807+ DAEMON_OPTS in systemd environment (LP: 1746081)
808+ - d/chrony.service: properly start after networking (LP: 1746458)
809+ - d/usr.sbin.chronyd: allow to create /run/chrony on demand (LP: 1746444)
810+ * Added Changes:
811+ - debian/usr.sbin.chronyd: ensure RTC/GPS usage isn't blocked by apparmor
812+ (LP: #1751241, Closes: #891201)
813+
814+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 26 Feb 2018 14:44:54 +0100
815+
816 chrony (3.2-4) unstable; urgency=medium
817
818 * debian/changelog:
819@@ -910,6 +1563,27 @@ chrony (3.2-3) unstable; urgency=medium
820
821 -- Vincent Blut <vincent.debian@free.fr> Wed, 07 Feb 2018 21:27:09 +0100
822
823+chrony (3.2-2ubuntu3) bionic; urgency=medium
824+
825+ * Revert the changes of (LP 1746458) as in the follow on discussion
826+ it became clear that we want it to start early (for example for an
827+ early offset from drift file). iIf needed chrony will later on pick
828+ up that servers are online via retries (augmented by hooks on network
829+ events).
830+
831+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 08 Feb 2018 10:52:30 +0100
832+
833+chrony (3.2-2ubuntu2) bionic; urgency=medium
834+
835+ * d/control: use to nss instead of tomcrypt (in main) (LP: #1744072)
836+ * d/chrony.conf: use ubuntu ntp pool and server (LP: #1744664)
837+ * d/chrony.default, d/chrony.service: support /etc/default/chrony
838+ DAEMON_OPTS in systemd environment (LP: #1746081)
839+ * d/chrony.service: properly start after networking (LP: #1746458)
840+ * d/usr.sbin.chronyd: allow to create /run/chrony on demand (LP: #1746444)
841+
842+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 19 Jan 2018 09:45:38 +0100
843+
844 chrony (3.2-2) unstable; urgency=medium
845
846 * Initial AppArmor profile for chronyd. Thanks to Jamie
847diff --git a/debian/chrony.conf b/debian/chrony.conf
848index b3a9510..793227a 100644
849--- a/debian/chrony.conf
850+++ b/debian/chrony.conf
851@@ -4,8 +4,23 @@
852 # Include configuration files found in /etc/chrony/conf.d.
853 confdir /etc/chrony/conf.d
854
855-# Use Debian vendor zone.
856-pool 2.debian.pool.ntp.org iburst
857+# This will use (up to):
858+# - 4 sources from ntp.ubuntu.com which some are ipv6 enabled
859+# - 2 sources from 2.ubuntu.pool.ntp.org which is ipv6 enabled as well
860+# - 1 source from [01].ubuntu.pool.ntp.org each (ipv4 only atm)
861+# This means by default, up to 6 dual-stack and up to 2 additional IPv4-only
862+# sources will be used.
863+# At the same time it retains some protection against one of the entries being
864+# down (compare to just using one of the lines). See (LP: #1754358) for the
865+# discussion.
866+#
867+# About using servers from the NTP Pool Project in general see (LP: #104525).
868+# Approved by Ubuntu Technical Board on 2011-02-08.
869+# See http://www.pool.ntp.org/join.html for more information.
870+pool ntp.ubuntu.com iburst maxsources 4
871+pool 0.ubuntu.pool.ntp.org iburst maxsources 1
872+pool 1.ubuntu.pool.ntp.org iburst maxsources 1
873+pool 2.ubuntu.pool.ntp.org iburst maxsources 2
874
875 # Use time sources from DHCP.
876 sourcedir /run/chrony-dhcp
877diff --git a/debian/chrony.default b/debian/chrony.default
878index 028f63d..6e4e02a 100644
879--- a/debian/chrony.default
880+++ b/debian/chrony.default
881@@ -4,3 +4,7 @@
882
883 # Options to pass to chrony.
884 DAEMON_OPTS="-F 1"
885+
886+# Sync system clock in containers or without CAP_SYS_TIME (likely to fail)
887+# See /usr/share/doc/chrony/README.container for details.
888+SYNC_IN_CONTAINER="no"
889diff --git a/debian/chrony.service b/debian/chrony.service
890index 29e6382..d1d8cb9 100644
891--- a/debian/chrony.service
892+++ b/debian/chrony.service
893@@ -5,13 +5,12 @@ Conflicts=openntpd.service ntp.service ntpsec.service
894 Wants=time-sync.target
895 Before=time-sync.target
896 After=network.target
897-ConditionCapability=CAP_SYS_TIME
898
899 [Service]
900 Type=forking
901 PIDFile=/run/chrony/chronyd.pid
902 EnvironmentFile=-/etc/default/chrony
903-ExecStart=/usr/sbin/chronyd $DAEMON_OPTS
904+ExecStart=/usr/lib/systemd/scripts/chronyd-starter.sh $DAEMON_OPTS
905 PrivateTmp=yes
906 ProtectHome=yes
907 ProtectSystem=full
908diff --git a/debian/chronyd-starter.sh b/debian/chronyd-starter.sh
909new file mode 100755
910index 0000000..2539ffe
911--- /dev/null
912+++ b/debian/chronyd-starter.sh
913@@ -0,0 +1,68 @@
914+#!/bin/sh
915+set -ue
916+
917+CONF="/etc/default/chrony"
918+DOC="/usr/share/doc/chrony/README.container"
919+CAP="cap_sys_time"
920+CMD="/usr/sbin/chronyd"
921+# Take any args passed, use none if nothing was specified
922+EFFECTIVE_DAEMON_OPTS=${@:-""}
923+
924+if [ -f "${CONF}" ]; then
925+ . "${CONF}"
926+else
927+ echo "<4>Warning: ${CONF} is missing"
928+fi
929+# take from conffile if available, default to no otherwise
930+EFFECTIVE_SYNC_IN_CONTAINER=${SYNC_IN_CONTAINER:-"no"}
931+
932+if [ ! -x "${CMD}" ]; then
933+ echo "<3>Error: ${CMD} not executable"
934+ # ugly, but works around https://github.com/systemd/systemd/issues/2913
935+ sleep 0.1
936+ exit 1
937+fi
938+
939+# Check if -x is already set manually, don't process further if that is the case
940+X_SET=0
941+for arg in $@; do
942+ if echo "$arg" | grep -q -e '^-[a-zA-Z0-9]*x'; then
943+ X_SET=1
944+ fi
945+done
946+
947+if [ ${X_SET} -ne 1 ]; then
948+ # Assume it is not in a container
949+ IS_CONTAINER=0
950+ if [ -x /usr/bin/systemd-detect-virt ]; then
951+ if /usr/bin/systemd-detect-virt --quiet --container; then
952+ IS_CONTAINER=1
953+ fi
954+ fi
955+
956+
957+ # Assume it has the cap
958+ HAS_CAP=1
959+ CAPSH="/sbin/capsh"
960+ if [ -x "${CAPSH}" ]; then
961+ ${CAPSH} --has-p="${CAP}" || HAS_CAP=0
962+ fi
963+
964+ if [ ${HAS_CAP} -eq 0 ]; then
965+ echo "<4>Warning: Missing ${CAP}, syncing the system clock will fail"
966+ fi
967+ if [ ${IS_CONTAINER} -eq 1 ]; then
968+ echo "<4>Warning: Running in a container, likely impossible and unintended to sync system clock"
969+ fi
970+
971+ if [ ${HAS_CAP} -eq 0 -o ${IS_CONTAINER} -eq 1 ]; then
972+ if [ "${EFFECTIVE_SYNC_IN_CONTAINER}" != "yes" ]; then
973+ echo "<5>Adding -x as fallback disabling control of the system clock, see ${DOC} to override this behavior"
974+ EFFECTIVE_DAEMON_OPTS="${EFFECTIVE_DAEMON_OPTS} -x"
975+ else
976+ echo "<5>Not falling back to disable control of the system clock, see ${DOC} to change this behavior"
977+ fi
978+ fi
979+fi
980+
981+${CMD} ${EFFECTIVE_DAEMON_OPTS}
982diff --git a/debian/control b/debian/control
983index 19073e2..04e8b2b 100644
984--- a/debian/control
985+++ b/debian/control
986@@ -1,7 +1,8 @@
987 Source: chrony
988 Section: net
989 Priority: optional
990-Maintainer: Vincent Blut <vincent.debian@free.fr>
991+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
992+XSBC-Original-Maintainer: Vincent Blut <vincent.debian@free.fr>
993 Standards-Version: 4.5.1
994 Build-Depends: asciidoctor,
995 bison,
996@@ -27,6 +28,7 @@ Architecture: linux-any
997 Pre-Depends: ${misc:Pre-Depends}
998 Depends: adduser,
999 iproute2 [linux-any],
1000+ libcap2-bin (>= 1:2.32-1),
1001 tzdata,
1002 ucf,
1003 ${misc:Depends},
1004diff --git a/debian/docs b/debian/docs
1005index e12f653..3bfc9dc 100644
1006--- a/debian/docs
1007+++ b/debian/docs
1008@@ -1,3 +1,4 @@
1009 FAQ
1010 NEWS
1011 README
1012+debian/README.container
1013diff --git a/debian/install b/debian/install
1014index e7dc12a..2647461 100644
1015--- a/debian/install
1016+++ b/debian/install
1017@@ -5,3 +5,4 @@ debian/conf.d etc/chrony
1018 debian/ntp-units.d/50-chrony.list usr/lib/systemd/ntp-units.d
1019 debian/sources.d etc/chrony
1020 debian/usr.sbin.chronyd etc/apparmor.d
1021+debian/chronyd-starter.sh usr/lib/systemd/scripts/
1022diff --git a/debian/patches/lp-1940252-rtc-avoid-printing-and-scanning-time_t.patch b/debian/patches/lp-1940252-rtc-avoid-printing-and-scanning-time_t.patch
1023new file mode 100644
1024index 0000000..bbdf877
1025--- /dev/null
1026+++ b/debian/patches/lp-1940252-rtc-avoid-printing-and-scanning-time_t.patch
1027@@ -0,0 +1,56 @@
1028+From f27d719a4e2e983aea23058a29729a200b070dc6 Mon Sep 17 00:00:00 2001
1029+From: Miroslav Lichvar <mlichvar@redhat.com>
1030+Date: Thu, 5 Aug 2021 14:07:17 +0200
1031+Subject: [PATCH] rtc: avoid printing and scanning time_t
1032+
1033+With the latest glibc it's now possible to define _TIME_BITS=64 to get
1034+64-bit time_t on 32-bit Linux systems. This breaks the %ld printf/scanf
1035+modifier used with the RTC drift timestamp. Process it as a double.
1036+
1037+Origin: upstream, https://git.tuxfamily.org/chrony/chrony.git/commit/?id=f27d719a4e
1038+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1940252
1039+Last-Update: 2021-08-17
1040+
1041+---
1042+ rtc_linux.c | 8 +++++---
1043+ 1 file changed, 5 insertions(+), 3 deletions(-)
1044+
1045+diff --git a/rtc_linux.c b/rtc_linux.c
1046+index 08c2a19f..c95c06e3 100644
1047+--- a/rtc_linux.c
1048++++ b/rtc_linux.c
1049+@@ -434,6 +434,7 @@ setup_config(void)
1050+ static void
1051+ read_coefs_from_file(void)
1052+ {
1053++ double ref_time;
1054+ FILE *in;
1055+
1056+ if (!tried_to_load_coefs) {
1057+@@ -444,11 +445,12 @@ read_coefs_from_file(void)
1058+
1059+ if (coefs_file_name &&
1060+ (in = UTI_OpenFile(NULL, coefs_file_name, NULL, 'r', 0))) {
1061+- if (fscanf(in, "%d%ld%lf%lf",
1062++ if (fscanf(in, "%d%lf%lf%lf",
1063+ &valid_coefs_from_file,
1064+- &file_ref_time,
1065++ &ref_time,
1066+ &file_ref_offset,
1067+ &file_rate_ppm) == 4) {
1068++ file_ref_time = ref_time;
1069+ } else {
1070+ LOG(LOGS_WARN, "Could not read coefficients from %s", coefs_file_name);
1071+ }
1072+@@ -472,7 +474,7 @@ write_coefs_to_file(int valid,time_t ref_time,double offset,double rate)
1073+ return RTC_ST_BADFILE;
1074+
1075+ /* Gain rate is written out in ppm */
1076+- fprintf(out, "%1d %ld %.6f %.3f\n", valid, ref_time, offset, 1.0e6 * rate);
1077++ fprintf(out, "%1d %.0f %.6f %.3f\n", valid, (double)ref_time, offset, 1.0e6 * rate);
1078+ fclose(out);
1079+
1080+ /* Rename the temporary file to the correct location */
1081+--
1082+2.32.0
1083+
1084diff --git a/debian/patches/series b/debian/patches/series
1085index 8de067f..8531f7a 100644
1086--- a/debian/patches/series
1087+++ b/debian/patches/series
1088@@ -1,2 +1,3 @@
1089 nm-dispatcher-dhcp_Move-server_dir-to-run.patch
1090 allow-clone3-and-pread64-in-seccomp-filter.patch
1091+lp-1940252-rtc-avoid-printing-and-scanning-time_t.patch

Subscribers

People subscribed via source and target branches