[pkg-ntp-maintainers] [pkg-ntp] 01/02: Build and install /usr/bin/sntp

Bernhard Schmidt berni at moszumanska.debian.org
Tue Aug 8 21:02:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

berni pushed a commit to branch stretch
in repository pkg-ntp.

commit 697371825910f071d20bfc000877f7ece36f7a51
Author: Bernhard Schmidt <berni at debian.org>
Date:   Tue Aug 8 22:41:32 2017 +0200

    Build and install /usr/bin/sntp
    
    sntp was errorneously included in Jessie, dropped shortly after the
    Jessie release and reintroduced in Buster.
    
    This patch for stretch-pu builds sntp and installs it in the ntp
    binary package as it has been done in Jessie. It is split into a
    seperate binary package in Buster.
    
    Closes: #793837
---
 debian/ntp.install                 |  1 +
 debian/patches/series              |  1 +
 debian/patches/sntp-sysexits.patch | 34 ++++++++++++++++++++++++++++++++++
 debian/rules                       |  1 -
 4 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/debian/ntp.install b/debian/ntp.install
index a362541..84fc5e0 100644
--- a/debian/ntp.install
+++ b/debian/ntp.install
@@ -2,6 +2,7 @@ debian/tmp/usr/bin/calc_tickadj
 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 --git a/debian/patches/series b/debian/patches/series
index 7c22fd7..1db49c3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ ntpdate-ipv6.patch
 ntpd-linux-caps-runtime.patch
 openssl-disable-check.patch
 libedit.patch
+sntp-sysexits.patch
diff --git a/debian/patches/sntp-sysexits.patch b/debian/patches/sntp-sysexits.patch
new file mode 100644
index 0000000..2282613
--- /dev/null
+++ b/debian/patches/sntp-sysexits.patch
@@ -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 --git a/debian/rules b/debian/rules
index 039de91..c61c96f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,7 +21,6 @@ endif
 		--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 \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ntp/pkg-ntp.git



More information about the pkg-ntp-maintainers mailing list