[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Quick fix to make ntpdate build, complete patch later.



Hi,

The attached enables a build of ntp (4.2.6.p5+dfsg-2), especially
ntpdate. The configure option ISC_PLATFORM_HAVEIPV6 is enabled by the
configure script. That creates a problem to run ntpdate without the -4
option: 
.../ntpdate -q pool.ntp.org (or some other time server)
17 Dec 18:52:20 ntpdate_4.2.6.p5[10647]: setsockopt() IPV6_V6ONLY
failed: Protocol not available
To be fixed later :)

.../ntpdate -q4d pool.ntp.org works and can be used to test it.
-d is the debug option.

Thanks!

--- a/debian_rules	2012-05-11 22:54:56.000000000 +0200
+++ b/debian_rules	2012-12-17 18:40:51.000000000 +0100
@@ -14,10 +14,6 @@ LDFLAGS  = $(shell dpkg-buildflags --get
 
 config.status:
 	dh_testdir
-ifeq (hurd, $(DEB_HOST_ARCH_OS))
-	# hurd does not provided the system calls needed for ntpd to work.
-	exit 1
-endif
 	cp /usr/share/misc/config.guess /usr/share/misc/config.sub .
 	./configure CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' \
 		--prefix=/usr \
@@ -56,9 +52,15 @@ install: build-stamp
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/ntp
 
 	# move the administrator programs from /usr/bin to /usr/sbin
+ifeq (hurd, $(DEB_HOST_ARCH_OS))
+	for file in ntpdate ntp-wait ntpd ntp-keygen; do \
+		mv debian/ntp/usr/bin/$$file debian/ntp/usr/sbin/$$file || exit; \
+	done
+else
 	for file in ntpdate ntp-wait ntpd ntptime ntp-keygen; do \
 		mv debian/ntp/usr/bin/$$file debian/ntp/usr/sbin/$$file || exit; \
 	done
+endif
 
 	# don't install tickadj
 	rm debian/ntp/usr/bin/tickadj

Reply to: