mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] systemd: install systemd-timesync.list in ntp-units.d
@ 2019-12-23 14:45 Clemens Gruber
  2020-01-02  9:46 ` Denis OSTERLAND
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Gruber @ 2019-12-23 14:45 UTC (permalink / raw)
  To: ptxdist; +Cc: Clemens Gruber

When systemd-timesyncd is used, there should be an entry in ntp-units.d.
Otherwise, timedatectl set-ntp sometimes fails with "NTP not supported".

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list | 1 +
 rules/systemd.make                                               | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list

diff --git a/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
new file mode 100644
index 000000000..d5959ade8
--- /dev/null
+++ b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
@@ -0,0 +1 @@
+systemd-timesyncd.service
diff --git a/rules/systemd.make b/rules/systemd.make
index 5564d893f..6b7ec83ab 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -432,6 +432,7 @@ ifdef PTXCONF_SYSTEMD_TIMEDATE
 		/var/lib/systemd/timesync)
 	@$(call install_link, systemd, ../systemd-timesyncd.service,  \
 		/usr/lib/systemd/system/sysinit.target.wants/systemd-timesyncd.service)
+	@$(call install_tree, systemd, 0, 0, -, /usr/lib/systemd/ntp-units.d/)
 endif
 
 ifdef PTXCONF_SYSTEMD_VCONSOLE
-- 
2.24.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] systemd: install systemd-timesync.list in ntp-units.d
  2019-12-23 14:45 [ptxdist] [PATCH] systemd: install systemd-timesync.list in ntp-units.d Clemens Gruber
@ 2020-01-02  9:46 ` Denis OSTERLAND
  2020-01-02 13:19   ` Clemens Gruber
  0 siblings, 1 reply; 3+ messages in thread
From: Denis OSTERLAND @ 2020-01-02  9:46 UTC (permalink / raw)
  To: ptxdist

Hi Clemens,

Am Montag, den 23.12.2019, 15:45 +0100 schrieb Clemens Gruber:
> When systemd-timesyncd is used, there should be an entry in ntp-units.d.
> Otherwise, timedatectl set-ntp sometimes fails with "NTP not supported".
> 
> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> ---
>  projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list | 1 +
>  rules/systemd.make                                               | 1 +
>  2 files changed, 2 insertions(+)
>  create mode 100644 projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
> 
> diff --git a/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
> new file mode 100644
> index 000000000..d5959ade8
> --- /dev/null
> +++ b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
> @@ -0,0 +1 @@
> +systemd-timesyncd.service
> diff --git a/rules/systemd.make b/rules/systemd.make
> index 5564d893f..6b7ec83ab 100644
> --- a/rules/systemd.make
> +++ b/rules/systemd.make
> @@ -432,6 +432,7 @@ ifdef PTXCONF_SYSTEMD_TIMEDATE
>  		/var/lib/systemd/timesync)
>  	@$(call install_link, systemd, ../systemd-timesyncd.service,  \
>  		/usr/lib/systemd/system/sysinit.target.wants/systemd-timesyncd.service)
> +	@$(call install_tree, systemd, 0, 0, -, /usr/lib/systemd/ntp-units.d/)
why install_tree and not install_alternative just this file?
Is there no other valid content of this file?
Is it unlikely that other packages will install to this directory?

Regards Denis
>  endif
>  
>  ifdef PTXCONF_SYSTEMD_VCONSOLE


Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___________________________________________________________________________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. 
- For general information on data protection and your respective rights please visit https://www.diehl.com/group/en/transparency-and-information-obligations/
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] systemd: install systemd-timesync.list in ntp-units.d
  2020-01-02  9:46 ` Denis OSTERLAND
@ 2020-01-02 13:19   ` Clemens Gruber
  0 siblings, 0 replies; 3+ messages in thread
From: Clemens Gruber @ 2020-01-02 13:19 UTC (permalink / raw)
  To: ptxdist

Hi Denis,

On Thu, Jan 02, 2020 at 09:46:21AM +0000, Denis OSTERLAND wrote:
> Hi Clemens,
> 
> Am Montag, den 23.12.2019, 15:45 +0100 schrieb Clemens Gruber:
> > When systemd-timesyncd is used, there should be an entry in ntp-units.d.
> > Otherwise, timedatectl set-ntp sometimes fails with "NTP not supported".
> > 
> > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > ---
> >  projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list | 1 +
> >  rules/systemd.make                                               | 1 +
> >  2 files changed, 2 insertions(+)
> >  create mode 100644 projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
> > 
> > diff --git a/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
> > new file mode 100644
> > index 000000000..d5959ade8
> > --- /dev/null
> > +++ b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
> > @@ -0,0 +1 @@
> > +systemd-timesyncd.service
> > diff --git a/rules/systemd.make b/rules/systemd.make
> > index 5564d893f..6b7ec83ab 100644
> > --- a/rules/systemd.make
> > +++ b/rules/systemd.make
> > @@ -432,6 +432,7 @@ ifdef PTXCONF_SYSTEMD_TIMEDATE
> >  		/var/lib/systemd/timesync)
> >  	@$(call install_link, systemd, ../systemd-timesyncd.service,  \
> >  		/usr/lib/systemd/system/sysinit.target.wants/systemd-timesyncd.service)
> > +	@$(call install_tree, systemd, 0, 0, -, /usr/lib/systemd/ntp-units.d/)
> why install_tree and not install_alternative just this file?
> Is there no other valid content of this file?
> Is it unlikely that other packages will install to this directory?

You are right, install_tree is not the right choice, because users
should be able to override it or symlink it to /dev/null.
And other packages like ntpd might supply their own ntp-units.d file,
correct.
I will send a v2 with install_alternative of the
80-systemd-timesync.list file shortly.

Thanks,
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-02 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-23 14:45 [ptxdist] [PATCH] systemd: install systemd-timesync.list in ntp-units.d Clemens Gruber
2020-01-02  9:46 ` Denis OSTERLAND
2020-01-02 13:19   ` Clemens Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox