On 08.08.2017 22:19, Adam D. Barratt wrote:

Hi Adam,

> Control: tags -1 + moreinfo
> 
> On Tue, 2017-07-18 at 12:07 +0200, Bernhard Schmidt wrote:
>> I'm looking for an indication whether something like this would be acceptable
>> for a stable release. If it might be acceptable I would come back with a 
>> proper debdiff for approval. A fellow DD has recently asked on the pkg-ntp
>> mailinglist about this.
>>
>> sntp is the proper NTP client tool bundled with ntp sources, replacing
>> ntpdate. It was accidentally included in jessie due to an upstream 
>> build-system
>> screwup, fixed shortly after, not reenabled in time for Stretch but now built
>> in Buster. This makes Stretch having a regression over Jessie by not shipping
>> sntp.
>>
>> I have added it in a seperate binary package in Buster. I think this will not
>> be possible for Stretch, so I would like to add it to the ntp binary package 
>> as
>> it has been the case with Jessie. The proper breaks/replaces for going to
>> Buster should be already in place, but I'll test the upgrade paths before
>> submission.
> 
> That sounds plausible, yes. As with any p-u request we'd need to see a
> tested debdiff before a final ack, hence tagging moreinfo for now.

debdiff attached, I tested all the upgrade paths I could think of.

The debdiff of the resulting binary is

Files in second .deb but not in first
-------------------------------------
-rwxr-xr-x  root/root   /usr/bin/sntp

Control files: lines which differ (wdiff format)
------------------------------------------------
Installed-Size: [-1650-] {+1804+}
Version: [-1:4.2.8p10+dfsg-3-] {+1:4.2.8p10+dfsg-3+deb9u1+}

Best Regards,
Bernhard
diff -Nru ntp-4.2.8p10+dfsg/debian/changelog ntp-4.2.8p10+dfsg/debian/changelog
--- ntp-4.2.8p10+dfsg/debian/changelog	2017-05-07 23:04:52.000000000 +0200
+++ ntp-4.2.8p10+dfsg/debian/changelog	2017-08-08 22:44:37.000000000 +0200
@@ -1,3 +1,13 @@
+ntp (1:4.2.8p10+dfsg-3+deb9u1) stretch; urgency=medium
+
+  * Build and install /usr/bin/sntp (Closes: #793837)
+    sntp (the successor of ntpdate as general purpose NTP client) has
+    been accidentally included in Jessie, dropped after Jessie,
+    reintroduced too late for Stretch and is now included in Buster.
+    Fix regression by building sntp and shipping it in ntp:any
+
+ -- Bernhard Schmidt <be...@debian.org>  Tue, 08 Aug 2017 22:44:37 +0200
+
 ntp (1:4.2.8p10+dfsg-3) unstable; urgency=medium
 
   * No-change upload to supersede accidental upload of experimental
diff -Nru ntp-4.2.8p10+dfsg/debian/ntp.install ntp-4.2.8p10+dfsg/debian/ntp.install
--- ntp-4.2.8p10+dfsg/debian/ntp.install	2017-05-07 23:04:52.000000000 +0200
+++ ntp-4.2.8p10+dfsg/debian/ntp.install	2017-08-08 22:44:37.000000000 +0200
@@ -2,6 +2,7 @@
 debian/tmp/usr/bin/ntpdc
 debian/tmp/usr/bin/ntpq
 debian/tmp/usr/bin/ntptrace
+debian/tmp/usr/bin/sntp
 debian/tmp/usr/bin/update-leap
 debian/tmp/usr/sbin/ntp-keygen
 debian/tmp/usr/sbin/ntp-wait
diff -Nru ntp-4.2.8p10+dfsg/debian/patches/series ntp-4.2.8p10+dfsg/debian/patches/series
--- ntp-4.2.8p10+dfsg/debian/patches/series	2017-05-07 23:04:52.000000000 +0200
+++ ntp-4.2.8p10+dfsg/debian/patches/series	2017-08-08 22:44:37.000000000 +0200
@@ -5,3 +5,4 @@
 ntpd-linux-caps-runtime.patch
 openssl-disable-check.patch
 libedit.patch
+sntp-sysexits.patch
diff -Nru ntp-4.2.8p10+dfsg/debian/patches/sntp-sysexits.patch ntp-4.2.8p10+dfsg/debian/patches/sntp-sysexits.patch
--- ntp-4.2.8p10+dfsg/debian/patches/sntp-sysexits.patch	1970-01-01 01:00:00.000000000 +0100
+++ ntp-4.2.8p10+dfsg/debian/patches/sntp-sysexits.patch	2017-08-08 22:44:37.000000000 +0200
@@ -0,0 +1,34 @@
+From: Miroslav Lichvar
+Subject: Building 4.2.8p8 with disabled local libopts fails
+Bug: http://bugs.ntp.org/show_bug.cgi?id=3132
+
+When trying to build 4.2.8p8 with the --disable-local-libopts option on Fedora,
+it fails with the following error:
+
+main.c: In function ‘sntp_main’:
+main.c:143:8: error: ‘EX_SOFTWARE’ undeclared (first use in this function)
+   exit(EX_SOFTWARE);      
+        ^~~~~~~~~~~        
+...
+
+
+It seems the problem is that sntp/main.c is missing "#include <sysexits.h>".
+The configure script detects that the system has sysexits.h, but then the sntp
+code doesn't use it, expecting the local definitions of the EX_* macros.
+
+The following patch fixes the problem for me:
+
+--- ntp-4.2.8p8/sntp/main.c.orig        2016-10-19 10:18:41.690800420 +0200
++++ ntp-4.2.8p8/sntp/main.c     2016-10-19 10:19:31.900966925 +0200
+@@ -8,6 +8,10 @@
+ # include <event2/thread.h>
+ #endif
+
++#ifdef HAVE_SYSEXITS_H
++#include <sysexits.h>
++#endif
++
+ #include "main.h"
+ #include "ntp_libopts.h"
+ #include "kod_management.h"
+
diff -Nru ntp-4.2.8p10+dfsg/debian/rules ntp-4.2.8p10+dfsg/debian/rules
--- ntp-4.2.8p10+dfsg/debian/rules	2017-05-07 23:04:52.000000000 +0200
+++ ntp-4.2.8p10+dfsg/debian/rules	2017-08-08 22:44:37.000000000 +0200
@@ -21,7 +21,6 @@
 		--prefix=/usr \
 		--enable-all-clocks --enable-parse-clocks --enable-SHM \
 		--disable-debugging --sysconfdir=/var/lib/ntp \
-		--with-sntp=no \
 		--with-lineeditlibs=edit \
 		--without-ntpsnmpd \
 		--disable-local-libopts \

Reply via email to