Skip to contentSkip to conversation

meta-systemd: ntp: Change version to what is used in meta-networking.

PATCH Superseded Martin Ertsaas 4 participants 7 messages Oct 25, 2012 – Oct 30, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-systemd: ntp: Change version to what is used in meta-networking.

Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking.

---
 .../recipes-support/ntp/ntp_4.2.6p3.bbappend       |   20 --------------------
 .../recipes-support/ntp/ntp_4.2.6p5.bbappend       |   20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 20 deletions(-)
 delete mode 100644 meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend
 create mode 100644 meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p5.bbappend
meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend deleted +0 -20
deleted file mode 100644
index c6cd031..0000000
@@ -1,20 +0,0 @@
-inherit systemd
-
-PRINC := "${@int(PRINC) + 1}"
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SYSTEMD_PACKAGES = "${PN}-systemd ntpdate-systemd"
-SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service"
-SYSTEMD_SERVICE_ntpdate-systemd = "ntpdate.service"
-
-SRC_URI += " \
-	file://ntpdate.service \
-        file://ntpd.service \
-"
-
-do_install_append() {
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
-	install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
-}
meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p5.bbappend new file +20 -0
new file mode 100644
index 0000000..bc2b2dd
@@ -0,0 +1,20 @@
+inherit systemd
+
+PRINC := "${@int(PRINC) + 1}"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SYSTEMD_PACKAGES = "${PN}-systemd ${PN}-date-systemd"
+SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service"
+SYSTEMD_SERVICE_${PN}-date-systemd = "ntpdate.service"
+
+SRC_URI += " \
+	file://ntpdate.service \
+        file://ntpd.service \
+"
+
+do_install_append() {
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
+	install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
+}
Signature · 1 line
1.7.8.6
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 25-10-12 20:58, Martin Ertsaas schreef:

Quoted 2 lines

Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking.

While you are there, can you also disable the autoactivating for the unit? It's broken and I'm gettig tired of doing 'systemctl disable' on it for every system.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQijhjMkyGM64RGpERAkBaAJ97niM1IfjERLUg3dOlFXMKLx/TogCgqXv6 X63nMniUZKcmw41+u4BEFKE=
=J9a5
-----END PGP SIGNATURE-----

#2 lore raw
Quoted 8 lines · Koen Kooi

Op 25-10-12 20:58, Martin Ertsaas schreef:

Quoted 2 lines

Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking.

While you are there, can you also disable the autoactivating for the unit? It's broken and I'm gettig tired of doing 'systemctl disable' on it for every system.

To disable the autoactivating, were you thinking linking ntpd(ate).service to /dev/null, or something more sophisticated.

- Martin

Quoted 6 lines

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#3 lore raw
In reply to Koen Kooi
Quoted 10 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 25-10-12 20:58, Martin Ertsaas schreef:

Quoted 2 lines

Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking.

While you are there, can you also disable the autoactivating for the unit? It's broken and I'm gettig tired of doing 'systemctl disable' on it for every system.

Cannot we fix it? Last time I've noticed it was using wrong binary (not installed by ntpdate package) from .service file.

SHR root@qemux86-64 ~ $ opkg files ntpdate
Package ntpdate (4.2.6p3-r7) is installed on root and has the following files:
/etc/network/if-up.d/ntpdate
/usr/bin/ntpdate
SHR root@qemux86-64 ~ $ grep Exec /lib/systemd/system/ntpdate.service ExecStart=/usr/bin/ntpd -q -g -x

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw
Quoted 21 lines · Martin Jansa
Quoted 9 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 25-10-12 20:58, Martin Ertsaas schreef:

Quoted 2 lines

Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking.

While you are there, can you also disable the autoactivating for the unit? It's broken and I'm gettig tired of doing 'systemctl disable' on it for every system.

Cannot we fix it? Last time I've noticed it was using wrong binary (not installed by ntpdate package) from .service file.

SHR root@qemux86-64 ~ $ opkg files ntpdate
Package ntpdate (4.2.6p3-r7) is installed on root and has the following files:
/etc/network/if-up.d/ntpdate
/usr/bin/ntpdate
SHR root@qemux86-64 ~ $ grep Exec /lib/systemd/system/ntpdate.service ExecStart=/usr/bin/ntpd -q -g -x

Quoted 8 lines

Cheers,

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

So what is happening is that if you just install ntpdate, it still tries to use ntpd, which doesn't exist? Sorry for the questions now, but I don't have anywhere to test this right now.

#5 lore raw
Quoted 26 lines · Martin Ertsås
Quoted 25 lines · Martin Jansa
Quoted 9 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 25-10-12 20:58, Martin Ertsaas schreef:

Quoted 2 lines

Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking.

While you are there, can you also disable the autoactivating for the unit? It's broken and I'm gettig tired of doing 'systemctl disable' on it for every system.

Cannot we fix it? Last time I've noticed it was using wrong binary (not installed by ntpdate package) from .service file.

SHR root@qemux86-64 ~ $ opkg files ntpdate
Package ntpdate (4.2.6p3-r7) is installed on root and has the following files:
/etc/network/if-up.d/ntpdate
/usr/bin/ntpdate
SHR root@qemux86-64 ~ $ grep Exec /lib/systemd/system/ntpdate.service ExecStart=/usr/bin/ntpd -q -g -x

Cheers,

Quoted 8 lines
Quoted 4 lines

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

So what is happening is that if you just install ntpdate, it still tries to use ntpd, which doesn't exist? Sorry for the questions now, but I don't have anywhere to test this right now.

Yes, exactly.
ExecStart needs to be changed to use ntpdate in ntpdate.service.

-ExecStart=/usr/bin/ntpd -q -g -x
+ExecStart=/usr/bin/ntpdate pool.ntp.org

Maybe we should also add something like
Requires=network.target
because right now there is only
Before=ntpd.service
to prevent already used socket (ntpdate[545]: the NTP socket is in use, exiting)

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw
In reply to Martin Ertsaas
Quoted 2 lines · Martin Ertsaas

Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking.

Ping?

The versions is meta-networking and meta-systemd needs to be put in sync...

Cheers,
Anders

Signature · 2 lines
Anders Darander
ChargeStorm AB / eStorm AB