* [PATCH 0/1][meta-networking] ntp: fix path to driftfile
@ 2014-10-10 3:22 wenzong.fan
2014-10-10 3:22 ` [PATCH 1/1][meta-networking] " wenzong.fan
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: wenzong.fan @ 2014-10-10 3:22 UTC (permalink / raw)
To: openembedded-devel
From: Wenzong Fan <wenzong.fan@windriver.com>
Default path to driftfile is "/etc/ntp.drift", that doesn't work since
ntp daemon is always started with "ntp" user. It should be created at
the home directory of "ntp" which is "/var/lib/ntp/".
The following changes since commit 17ff23b4a4a0e5ed7efde107fb00296f1ebd5fdd:
xf86-video-geode: fix build with new glibc-2.20 (2014-10-06 01:07:53 +0200)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib wenzong/ntp
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/ntp
Wenzong Fan (1):
ntp: fix path to driftfile
meta-networking/recipes-support/ntp/ntp.inc | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1][meta-networking] ntp: fix path to driftfile
2014-10-10 3:22 [PATCH 0/1][meta-networking] ntp: fix path to driftfile wenzong.fan
@ 2014-10-10 3:22 ` wenzong.fan
2014-10-10 11:12 ` [PATCH 0/1][meta-networking] " Peter A. Bigot
2014-10-10 11:21 ` Peter A. Bigot
2 siblings, 0 replies; 6+ messages in thread
From: wenzong.fan @ 2014-10-10 3:22 UTC (permalink / raw)
To: openembedded-devel
From: Wenzong Fan <wenzong.fan@windriver.com>
Default path to driftfile is "/etc/ntp.drift", that doesn't work since
ntp daemon is always started with "ntp" user. It should be created at
the home directory of "ntp" which is "/var/lib/ntp/".
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
meta-networking/recipes-support/ntp/ntp.inc | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index f55a39a..f685274 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -53,6 +53,7 @@ PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
+ sed -i 's!/etc/ntp.drift!/var/lib/ntp/drift!g' ${D}${sysconfdir}/ntp.conf
install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
install -d ${D}${bindir}
install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
@@ -72,6 +73,18 @@ do_install_append() {
install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/
+ # Create tmpfiles
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}/${sysconfdir}/default/volatiles
+ echo "d ntp ntp 0755 /var/lib/ntp none" \
+ > ${D}/${sysconfdir}/default/volatiles/99_ntpd
+ fi
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /var/lib/ntp 0755 ntp ntp -" \
+ > ${D}${sysconfdir}/tmpfiles.d/99-ntpd.conf
+ fi
+
install -d ${D}/${sysconfdir}/network/if-up.d
ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
@@ -112,6 +125,8 @@ RSUGGESTS_${PN} = "iana-etc"
FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \
${systemd_unitdir}/ntp-units.d/60-ntpd.list \
+ ${sysconfdir}/default/volatiles \
+ ${sysconfdir}/tmpfiles.d \
"
FILES_${PN}-tickadj = "${sbindir}/tickadj"
FILES_${PN}-utils = "${sbindir}"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/1][meta-networking] ntp: fix path to driftfile
2014-10-10 3:22 [PATCH 0/1][meta-networking] ntp: fix path to driftfile wenzong.fan
2014-10-10 3:22 ` [PATCH 1/1][meta-networking] " wenzong.fan
@ 2014-10-10 11:12 ` Peter A. Bigot
2014-10-11 9:19 ` wenzong fan
2014-10-10 11:21 ` Peter A. Bigot
2 siblings, 1 reply; 6+ messages in thread
From: Peter A. Bigot @ 2014-10-10 11:12 UTC (permalink / raw)
To: openembedded-devel, Fan, Wenzong (Wind River)
On 10/09/2014 10:22 PM, wenzong.fan@windriver.com wrote:
> From: Wenzong Fan <wenzong.fan@windriver.com>
>
> Default path to driftfile is "/etc/ntp.drift", that doesn't work since
> ntp daemon is always started with "ntp" user. It should be created at
> the home directory of "ntp" which is "/var/lib/ntp/".
Could you provide a bit more detail on why this "doesn't work"? Does it
violate the FHS, or complicate securing an image, or...?
I see that Debian apparently puts the file in /var/lib/ntp.
I certainly don't object to the change, but "doesn't work" suggests this
patch fixes a functional bug, not an inconsistency with policy. More
detail in the commit message will help us occasional contributors
understand how things are supposed to be done and why.
Thanks.
Peter
>
> The following changes since commit 17ff23b4a4a0e5ed7efde107fb00296f1ebd5fdd:
>
> xf86-video-geode: fix build with new glibc-2.20 (2014-10-06 01:07:53 +0200)
>
> are available in the git repository at:
>
> git://git.pokylinux.org/poky-contrib wenzong/ntp
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/ntp
>
> Wenzong Fan (1):
> ntp: fix path to driftfile
>
> meta-networking/recipes-support/ntp/ntp.inc | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/1][meta-networking] ntp: fix path to driftfile
2014-10-10 3:22 [PATCH 0/1][meta-networking] ntp: fix path to driftfile wenzong.fan
2014-10-10 3:22 ` [PATCH 1/1][meta-networking] " wenzong.fan
2014-10-10 11:12 ` [PATCH 0/1][meta-networking] " Peter A. Bigot
@ 2014-10-10 11:21 ` Peter A. Bigot
2014-10-11 9:55 ` wenzong fan
2 siblings, 1 reply; 6+ messages in thread
From: Peter A. Bigot @ 2014-10-10 11:21 UTC (permalink / raw)
To: openembedded-devel
On 10/09/2014 10:22 PM, wenzong.fan@windriver.com wrote:
> From: Wenzong Fan <wenzong.fan@windriver.com>
>
> Default path to driftfile is "/etc/ntp.drift", that doesn't work since
> ntp daemon is always started with "ntp" user. It should be created at
> the home directory of "ntp" which is "/var/lib/ntp/".
The patch in the git repository also adds tmpfile support, which I
believe should at least be described in the commit message, and
preferably done in a separate commit since it's not related to the
location of ntp.drift AFAICT.
Peter
> The following changes since commit 17ff23b4a4a0e5ed7efde107fb00296f1ebd5fdd:
>
> xf86-video-geode: fix build with new glibc-2.20 (2014-10-06 01:07:53 +0200)
>
> are available in the git repository at:
>
> git://git.pokylinux.org/poky-contrib wenzong/ntp
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/ntp
>
> Wenzong Fan (1):
> ntp: fix path to driftfile
>
> meta-networking/recipes-support/ntp/ntp.inc | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/1][meta-networking] ntp: fix path to driftfile
2014-10-10 11:12 ` [PATCH 0/1][meta-networking] " Peter A. Bigot
@ 2014-10-11 9:19 ` wenzong fan
0 siblings, 0 replies; 6+ messages in thread
From: wenzong fan @ 2014-10-11 9:19 UTC (permalink / raw)
To: Peter A. Bigot, openembedded-devel
On 10/10/2014 07:12 PM, Peter A. Bigot wrote:
> On 10/09/2014 10:22 PM, wenzong.fan@windriver.com wrote:
>> From: Wenzong Fan <wenzong.fan@windriver.com>
>>
>> Default path to driftfile is "/etc/ntp.drift", that doesn't work since
>> ntp daemon is always started with "ntp" user. It should be created at
>> the home directory of "ntp" which is "/var/lib/ntp/".
>
> Could you provide a bit more detail on why this "doesn't work"? Does it
> violate the FHS, or complicate securing an image, or...?
>
> I see that Debian apparently puts the file in /var/lib/ntp.
>
> I certainly don't object to the change, but "doesn't work" suggests this
> patch fixes a functional bug, not an inconsistency with policy. More
> detail in the commit message will help us occasional contributors
> understand how things are supposed to be done and why.
Sorry for the confusions, the "doesn't work" means ntp user can't create
driftfile under "/etc".
The fix refer to other distributions, just move driftfile to "/var/lib/ntp".
Thanks
Wenzong
>
> Thanks.
>
> Peter
>
>>
>> The following changes since commit
>> 17ff23b4a4a0e5ed7efde107fb00296f1ebd5fdd:
>>
>> xf86-video-geode: fix build with new glibc-2.20 (2014-10-06
>> 01:07:53 +0200)
>>
>> are available in the git repository at:
>>
>> git://git.pokylinux.org/poky-contrib wenzong/ntp
>> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/ntp
>>
>> Wenzong Fan (1):
>> ntp: fix path to driftfile
>>
>> meta-networking/recipes-support/ntp/ntp.inc | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/1][meta-networking] ntp: fix path to driftfile
2014-10-10 11:21 ` Peter A. Bigot
@ 2014-10-11 9:55 ` wenzong fan
0 siblings, 0 replies; 6+ messages in thread
From: wenzong fan @ 2014-10-11 9:55 UTC (permalink / raw)
To: openembedded-devel
On 10/10/2014 07:21 PM, Peter A. Bigot wrote:
> On 10/09/2014 10:22 PM, wenzong.fan@windriver.com wrote:
>> From: Wenzong Fan <wenzong.fan@windriver.com>
>>
>> Default path to driftfile is "/etc/ntp.drift", that doesn't work since
>> ntp daemon is always started with "ntp" user. It should be created at
>> the home directory of "ntp" which is "/var/lib/ntp/".
>
> The patch in the git repository also adds tmpfile support, which I
> believe should at least be described in the commit message, and
> preferably done in a separate commit since it's not related to the
> location of ntp.drift AFAICT.
>
Creating tmpfile is for the location changes, so I put them to the same
commit.
Thanks for your suggestions, I'll update the commit log and send out V2
patch.
Thanks
Wenzong
> Peter
>
>> The following changes since commit
>> 17ff23b4a4a0e5ed7efde107fb00296f1ebd5fdd:
>>
>> xf86-video-geode: fix build with new glibc-2.20 (2014-10-06
>> 01:07:53 +0200)
>>
>> are available in the git repository at:
>>
>> git://git.pokylinux.org/poky-contrib wenzong/ntp
>> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/ntp
>>
>> Wenzong Fan (1):
>> ntp: fix path to driftfile
>>
>> meta-networking/recipes-support/ntp/ntp.inc | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-11 9:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 3:22 [PATCH 0/1][meta-networking] ntp: fix path to driftfile wenzong.fan
2014-10-10 3:22 ` [PATCH 1/1][meta-networking] " wenzong.fan
2014-10-10 11:12 ` [PATCH 0/1][meta-networking] " Peter A. Bigot
2014-10-11 9:19 ` wenzong fan
2014-10-10 11:21 ` Peter A. Bigot
2014-10-11 9:55 ` wenzong fan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.