Re: migration: ntpdate to rdate
la 25. toukok. 2024 klo 13.49 Samuel Thibault (sthiba...@debian.org) kirjoitti: > Martin-Éric Racine, le sam. 25 mai 2024 12:39:20 +0300, a ecrit: > > la 25. toukok. 2024 klo 10.17 Martin-Éric Racine > > (martin-eric.rac...@iki.fi) kirjoitti: > > > I cannot help but notice that the Hurd port still depends on 'ntpdate' > > > to sync its clock upon bootup. The key problem is that Debian has > > > migrated to 'src:ntpsec' which made 'bin:ntpdate' a transitional > > > package. However, 'rdate' seemingly has been ported to Hurd. Assuming > > > that it is verified to work, it could be usefull to migrate the Hurd > > > port to it. > > > > As far as I can tell, on Hurd i386, using 'rdate' without any option > > does nothing. The command just sits there and wait. > > > > $ sudo rdate -v pool.ntp.org > > > > However, if I use the -n option for SNTP, it returns something: > > > > $ sudo rdate -n -v pool.ntp.org > > Sat May 25 12:35:42 EEST 2024 > > rdate: adjust local clock by -0.005979 seconds > > According to the package description, > > “By default, rdate uses the RFC 868 TCP protocol.” > > so it apparently indeed needs to be told to use ntp, when targetting an > ntp server. > > > Unless I'm mistaken, this means that Hurd should be able to use a > > wrapper script similar to 'ntpdate-debian' to achieve the same result > > as the old reference 'ntpdate' Hurd has forked. > > Indeed. > > > It should be fairly trivial to implement and submit to the 'rdate' > > maintainer for inclusion, at which point Hurd's old NTP fork could be > > put to rest. > > Help welcome ;) I've looked into this, and I have found a simple fix: An /etc/network/if-up.d/ script is installed by ntpdate. It doesn't ship any init script. Therefore all we need is a similar if-up.d script that calls 'rdate -n pool.ntp.org' and we're good to go. If we really want to be fancy, we could add a /etc/dhcp/dhclient-exit-hooks.d/ script to append the ISP's preferred NTP server instead of the above default. Martin-Éric
Re: migration: ntpdate to rdate
Hello, Martin-Éric Racine, le sam. 25 mai 2024 12:39:20 +0300, a ecrit: > la 25. toukok. 2024 klo 10.17 Martin-Éric Racine > (martin-eric.rac...@iki.fi) kirjoitti: > > I cannot help but notice that the Hurd port still depends on 'ntpdate' > > to sync its clock upon bootup. The key problem is that Debian has > > migrated to 'src:ntpsec' which made 'bin:ntpdate' a transitional > > package. However, 'rdate' seemingly has been ported to Hurd. Assuming > > that it is verified to work, it could be usefull to migrate the Hurd > > port to it. > > As far as I can tell, on Hurd i386, using 'rdate' without any option > does nothing. The command just sits there and wait. > > $ sudo rdate -v pool.ntp.org > > However, if I use the -n option for SNTP, it returns something: > > $ sudo rdate -n -v pool.ntp.org > Sat May 25 12:35:42 EEST 2024 > rdate: adjust local clock by -0.005979 seconds According to the package description, “By default, rdate uses the RFC 868 TCP protocol.” so it apparently indeed needs to be told to use ntp, when targetting an ntp server. > Unless I'm mistaken, this means that Hurd should be able to use a > wrapper script similar to 'ntpdate-debian' to achieve the same result > as the old reference 'ntpdate' Hurd has forked. Indeed. > It should be fairly trivial to implement and submit to the 'rdate' > maintainer for inclusion, at which point Hurd's old NTP fork could be > put to rest. Help welcome ;) Samuel
Re: migration: ntpdate to rdate
la 25. toukok. 2024 klo 10.17 Martin-Éric Racine (martin-eric.rac...@iki.fi) kirjoitti: > I cannot help but notice that the Hurd port still depends on 'ntpdate' > to sync its clock upon bootup. The key problem is that Debian has > migrated to 'src:ntpsec' which made 'bin:ntpdate' a transitional > package. However, 'rdate' seemingly has been ported to Hurd. Assuming > that it is verified to work, it could be usefull to migrate the Hurd > port to it. As far as I can tell, on Hurd i386, using 'rdate' without any option does nothing. The command just sits there and wait. $ sudo rdate -v pool.ntp.org However, if I use the -n option for SNTP, it returns something: $ sudo rdate -n -v pool.ntp.org Sat May 25 12:35:42 EEST 2024 rdate: adjust local clock by -0.005979 seconds Unless I'm mistaken, this means that Hurd should be able to use a wrapper script similar to 'ntpdate-debian' to achieve the same result as the old reference 'ntpdate' Hurd has forked. It should be fairly trivial to implement and submit to the 'rdate' maintainer for inclusion, at which point Hurd's old NTP fork could be put to rest. Martin-Éric