CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
openrdate: use correct leap datafile
authorVictor Martinez <pitillo@ono.com>
Mon, 28 Aug 2017 23:56:55 +0000 (01:56 +0200)
committerVictor Martinez <pitillo@ono.com>
Mon, 28 Aug 2017 23:56:55 +0000 (01:56 +0200)
openrdate/.md5sum
openrdate/Pkgfile
openrdate/ntpleaps.patch [new file with mode: 0644]

index bbf2a7e144b92723e533aed95a2788001f92270d..fa5d01820ddf3061dc201d44311b77252eb871e3 100644 (file)
@@ -1,3 +1,4 @@
 5a84634e148e20b426d4d0ef0cddaf7d  ntp.patch
+30591f4d63ae9ff02ef97775e6d85a82  ntpleaps.patch
 ad9bd58e1fb7babc74d0a0a16a1248a2  openrdate-1.2.tar.gz
 c212d60bdabec86c27d82b1a19223aa0  rdate
index 9b422a588237b498c1fcbdcc2e16c746145204d2..3debbf9713ff826252bed71caad764ad67eb4c2f 100644 (file)
@@ -1,18 +1,20 @@
 # Description: Time setting software implementing RFC 868 (inetd time) and RFC 2030 (SNTP/NTP) protocols
-# URL:         http://sourceforge.net/projects/openrdate/
-# Maintainer:  CRUX System Team, core-ports at crux dot nu
+# URL: http://sourceforge.net/projects/openrdate/
+# Maintainer: CRUX System Team, core-ports at crux dot nu
 
 name=openrdate
 version=1.2
 release=2
 source=(http://downloads.sourceforge.net/project/$name/$name/$name-$version.tar.gz/$name-$version.tar.gz 
-        rdate ntp.patch)
+        rdate ntp.patch ntpleaps.patch)
 
 build() {
-    cd $name-$version
+  cd $name-$version
   patch -p1 -i $SRC/ntp.patch
-    ./configure --prefix=/usr
-    make
-    make DESTDIR=$PKG install
-    install -D -m 755 $SRC/rdate $PKG/etc/cron/daily/rdate
+  # FS1462
+  patch -p1 -i $SRC/ntpleaps.patch
+  ./configure --prefix=/usr
+  make
+  make DESTDIR=$PKG install
+  install -D -m 755 $SRC/rdate $PKG/etc/cron/daily/rdate
 }
diff --git a/openrdate/ntpleaps.patch b/openrdate/ntpleaps.patch
new file mode 100644 (file)
index 0000000..f94e563
--- /dev/null
@@ -0,0 +1,12 @@
+diff -rupN openrdate-1.2-orig/src/ntpleaps.c openrdate-1.2/src/ntpleaps.c
+--- openrdate-1.2-orig/src/ntpleaps.c  2008-03-19 19:21:29.000000000 +0100
++++ openrdate-1.2/src/ntpleaps.c       2017-08-27 14:41:55.618929195 +0200
+@@ -125,7 +125,7 @@ ntpleaps_read(void)
+       u_int64_t s;
+       u_int64_t *l;
+-      fd = open("/usr/share/zoneinfo/right/UTC", O_RDONLY | O_NDELAY);
++      fd = open("/usr/share/zoneinfo-leaps/UTC", O_RDONLY | O_NDELAY);
+       if (fd == -1)
+               return (-1);