From da5bf79bd4ab2eba2654227f687a558f212b7720 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Dec 15 2009 16:29:32 +0000 Subject: - update to 1.24-pre1 --- diff --git a/.cvsignore b/.cvsignore index f6c72e6..aedad52 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1 @@ -chrony-1.23.tar.gz -getdate.y -chrony-1.23-gitbe42b4.patch +chrony-1.24-pre1.tar.gz diff --git a/chrony-1.23-cap.patch b/chrony-1.23-cap.patch deleted file mode 100644 index 3749712..0000000 --- a/chrony-1.23-cap.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up chrony-1.23/sys_linux.c.cap chrony-1.23/sys_linux.c ---- chrony-1.23/sys_linux.c.cap 2009-03-09 14:56:29.000000000 +0100 -+++ chrony-1.23/sys_linux.c 2009-03-09 14:57:24.000000000 +0100 -@@ -39,14 +39,6 @@ - #include - #include - --#ifdef FEAT_LINUXCAPS --#include --#include --#include --#include --#include --#endif -- - #include "localp.h" - #include "sys_linux.h" - #include "sched.h" -@@ -55,6 +47,14 @@ - #include "logging.h" - #include "wrap_adjtimex.h" - -+#ifdef FEAT_LINUXCAPS -+#include -+#include -+#include -+#include -+#include -+#endif -+ - static long current_tick; - - /* This is the value of tick, in seconds, including the current vernier diff --git a/chrony-1.23-editline.patch b/chrony-1.23-editline.patch deleted file mode 100644 index 0bba92d..0000000 --- a/chrony-1.23-editline.patch +++ /dev/null @@ -1,74 +0,0 @@ -commit 84cbeeadd1d3cbdd35a85f9866d08f5507fcaf62 -Author: Miroslav Lichvar -Date: Fri Jul 17 12:38:37 2009 +0200 - - Add editline support - - GNU readline recently changed license to GPLv3+ which makes it - incompatible with chrony (GPLv2). This patch adds support for editline - library (BSD license). - -diff --git a/client.c b/client.c -index b4f65f0..d034982 100644 ---- a/client.c -+++ b/client.c -@@ -41,9 +41,13 @@ - #include "memory.h" - - #ifdef FEAT_READLINE -+#ifdef USE_EDITLINE -+#include -+#else - #include - #include - #endif -+#endif - - #ifdef HAS_STDINT_H - #include -diff --git a/configure b/configure -index 1ff2bbf..3762903 100755 ---- a/configure -+++ b/configure -@@ -129,6 +129,7 @@ for instance \`--prefix=$HOME'. - - For better control, use the options below. - --disable-readline Don't try to use GNU readline -+ --with-editline Use editline library instead of readline - --readline-dir=DIR Specify parent of readline include and lib directories - --readline-inc-dir=DIR Specify where readline include directory is - --readline-lib-dir=DIR Specify where readline lib directory is -@@ -174,6 +175,7 @@ SYSDEFS="" - - # Support for readline (on by default) - feat_readline=1 -+use_editline=0 - feat_rtc=1 - feat_linuxcaps=0 - readline_lib="" -@@ -195,6 +197,9 @@ do - --disable-readline ) - feat_readline=0 - ;; -+ --with-editline ) -+ use_editline=1 -+ ;; - --with-readline-library=* ) - readline_lib=-L`echo $option | sed -e 's/^.*=//;'` - ;; -@@ -341,8 +346,13 @@ else - fi - - if [ $feat_readline = "1" ]; then -- READLINE_COMPILE="-DFEAT_READLINE=1 $readline_inc" -- READLINE_LINK="$readline_lib $ncurses_lib -lreadline -lncurses" -+ if [ $use_editline = "1" ]; then -+ READLINE_COMPILE="-DFEAT_READLINE=1 -DUSE_EDITLINE=1 $readline_inc" -+ READLINE_LINK="$readline_lib -ledit" -+ else -+ READLINE_COMPILE="-DFEAT_READLINE=1 $readline_inc" -+ READLINE_LINK="$readline_lib $ncurses_lib -lreadline -lncurses" -+ fi - else - READLINE_COMPILE="" - READLINE_LINK="" diff --git a/chrony-1.23-gethost.patch b/chrony-1.23-gethost.patch deleted file mode 100644 index 0623b5e..0000000 --- a/chrony-1.23-gethost.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f1a74e41b3b89771243294097ebd3472deb019f4 Mon Sep 17 00:00:00 2001 -From: Miroslav Lichvar -Date: Thu, 6 Nov 2008 17:35:22 +0100 -Subject: [PATCH] Fix resolving IP addresses into names on 64-bit big endian machines - ---- - nameserv.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/nameserv.c b/nameserv.c -index f509dfb..dd610df 100644 ---- a/nameserv.c -+++ b/nameserv.c -@@ -65,7 +65,7 @@ DNS_IPAddress2Name(unsigned long ip_addr) - struct hostent *host; - static char buffer[16]; - unsigned int a, b, c, d; -- unsigned long addr; -+ uint32_t addr; - - addr = htonl(ip_addr); - if (addr == 0UL) { --- -1.5.6.5 - diff --git a/chrony-1.23-ppc.patch b/chrony-1.23-ppc.patch deleted file mode 100644 index 3b87910..0000000 --- a/chrony-1.23-ppc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up chrony-1.23/io_linux.h.ppc chrony-1.23/io_linux.h ---- chrony-1.23/io_linux.h.ppc 2007-12-02 15:53:09.000000000 +0100 -+++ chrony-1.23/io_linux.h 2008-11-05 19:23:53.000000000 +0100 -@@ -16,7 +16,7 @@ - #define CHRONY_IOC_WRITE 1U - #define CHRONY_IOC_READ 2U - --#elif defined(__alpha__) || defined(__sparc__) || defined(__ppc__) || defined(__ppc64__) || defined(__sparc64__) -+#elif defined(__alpha__) || defined(__sparc__) || defined(__ppc__) || defined(__ppc64__) || defined(__sparc64__) || defined(__PPC__) - #define CHRONY_IOC_NRBITS 8 - #define CHRONY_IOC_TYPEBITS 8 - #define CHRONY_IOC_SIZEBITS 13 diff --git a/chrony-1.23-res.patch b/chrony-1.23-res.patch deleted file mode 100644 index 8fab57f..0000000 --- a/chrony-1.23-res.patch +++ /dev/null @@ -1,115 +0,0 @@ -commit 0148ecaea08691537f51c0aea9c3387cd1d34745 -Author: Miroslav Lichvar -Date: Mon Nov 10 14:42:41 2008 +0100 - - Retry name resolving after temporary failure few times before giving up - - This is a temporary fix to allow starting when resolv.conf is not ready yet - (e.g. when using NetworkManager). It may delay start up to 1022 seconds. - -diff --git a/cmdparse.c b/cmdparse.c -index 7acc44c..e09db45 100644 ---- a/cmdparse.c -+++ b/cmdparse.c -@@ -61,7 +61,7 @@ CPS_ParseNTPSourceAdd(const char *line, CPS_NTP_Source *src) - - ok = 0; - if (sscanf(line, "%" SMAXLEN "s%n", hostname, &n) == 1) { -- src->ip_addr = DNS_Name2IPAddress(hostname); -+ src->ip_addr = DNS_Name2IPAddressRetry(hostname); - if (src->ip_addr != DNS_Failed_Address) { - ok = 1; - } -diff --git a/conf.c b/conf.c -index e34927e..8e6c1d9 100644 ---- a/conf.c -+++ b/conf.c -@@ -584,7 +584,7 @@ parse_initstepslew(const char *line) - } - while (*p) { - if (sscanf(p, "%" SHOSTNAME_LEN "s%n", hostname, &n) == 1) { -- ip_addr = DNS_Name2IPAddress(hostname); -+ ip_addr = DNS_Name2IPAddressRetry(hostname); - if (ip_addr != DNS_Failed_Address) { - init_srcs_ip[n_init_srcs] = ip_addr; - ++n_init_srcs; -@@ -746,7 +746,7 @@ parse_allow_deny(const char *line, AllowDeny *list, int allow) - } - - } else { -- ip_addr = DNS_Name2IPAddress(p); -+ ip_addr = DNS_Name2IPAddressRetry(p); - if (ip_addr != DNS_Failed_Address) { - new_node = MallocNew(AllowDeny); - new_node->allow = allow; -diff --git a/nameserv.c b/nameserv.c -index dd610df..9a25254 100644 ---- a/nameserv.c -+++ b/nameserv.c -@@ -32,18 +32,28 @@ - #include "sysincl.h" - - #include "nameserv.h" -+#include - - /* ================================================== */ - --unsigned long --DNS_Name2IPAddress(const char *name) -+static unsigned int retries = 0; -+ -+static unsigned long -+Name2IPAddress(const char *name, int retry) - { - struct hostent *host; - unsigned char *address0; - unsigned long result; - -+try_again: - host = gethostbyname(name); - if (host == NULL) { -+ if (retry && h_errno == TRY_AGAIN && retries < 10) { -+ sleep(2 << retries); -+ retries++; -+ res_init(); -+ goto try_again; -+ } - result = DNS_Failed_Address; - } else { - address0 = host->h_addr_list[0]; -@@ -54,7 +64,22 @@ DNS_Name2IPAddress(const char *name) - } - - return result; -+} -+ -+/* ================================================== */ -+ -+unsigned long -+DNS_Name2IPAddress(const char *name) -+{ -+ return Name2IPAddress(name, 0); -+} - -+/* ================================================== */ -+ -+unsigned long -+DNS_Name2IPAddressRetry(const char *name) -+{ -+ return Name2IPAddress(name, 1); - } - - /* ================================================== */ -diff --git a/nameserv.h b/nameserv.h -index e62f334..69ceef8 100644 ---- a/nameserv.h -+++ b/nameserv.h -@@ -36,6 +36,8 @@ static const unsigned long DNS_Failed_Address = 0x0UL; - - extern unsigned long DNS_Name2IPAddress(const char *name); - -+extern unsigned long DNS_Name2IPAddressRetry(const char *name); -+ - const char *DNS_IPAddress2Name(unsigned long ip_addr); - - #endif /* GOT_NAMESERV_H */ diff --git a/chrony-1.23-s390.patch b/chrony-1.23-s390.patch deleted file mode 100644 index 1fa4252..0000000 --- a/chrony-1.23-s390.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- chrony-1.23/io_linux.h.orig 2009-06-08 09:25:23.000000000 +0200 -+++ chrony-1.23/io_linux.h 2009-06-08 09:26:24.000000000 +0200 -@@ -6,7 +6,8 @@ - - /* Hmm. These constants vary a bit between systems. */ - /* (__sh__ includes both sh and sh64) */ --#if defined(__i386__) || defined(__sh__) || defined(__arm__)||defined(__x86_64__) -+/* (__s390__ includes both s390 and s390x) */ -+#if defined(__i386__) || defined(__sh__) || defined(__arm__)||defined(__x86_64__) || defined(__s390__) - #define CHRONY_IOC_NRBITS 8 - #define CHRONY_IOC_TYPEBITS 8 - #define CHRONY_IOC_SIZEBITS 14 diff --git a/chrony.spec b/chrony.spec index 7854e37..8559b33 100644 --- a/chrony.spec +++ b/chrony.spec @@ -1,26 +1,18 @@ +%define prerelease -pre1 Name: chrony -Version: 1.23 -Release: 7.20081106gitbe42b4%{?dist} +Version: 1.24 +Release: 0.1.pre1%{?dist} Summary: An NTP client/server Group: System Environment/Daemons License: GPLv2 -URL: http://chrony.sunsite.dk -Source0: http://chrony.sunsite.dk/download/chrony-%{version}.tar.gz +URL: http://chrony.tuxfamily.org +Source0: http://download.tuxfamily.org/chrony/chrony-%{version}%{?prerelease}.tar.gz Source1: chrony.conf Source2: chrony.keys Source3: chronyd.sysconfig Source4: chronyd.init Source5: chrony.logrotate -# taken from GNU tar-1.13 -Source6: getdate.y -Patch1: chrony-1.23-gitbe42b4.patch -Patch2: chrony-1.23-ppc.patch -Patch3: chrony-1.23-gethost.patch -Patch4: chrony-1.23-res.patch -Patch5: chrony-1.23-cap.patch -Patch6: chrony-1.23-s390.patch -Patch7: chrony-1.23-editline.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libcap-devel libedit-devel bison texinfo @@ -37,39 +29,23 @@ systems with dial-up Internet connections, and also supports computers in permanently connected environments. %prep -%setup -q -cp -p %{SOURCE6} . -%patch1 -p1 -%patch2 -p1 -b .ppc -%patch3 -p1 -b .gethost -%patch4 -p1 -b .res -%patch5 -p1 -b .cap -%patch6 -p1 -b .s390 -%patch7 -p1 -b .editline +%setup -q -n %{name}-%{version}%{?prerelease} %build -bison -o getdate.c getdate.y - export CFLAGS="$RPM_OPT_FLAGS -pie -fpie" -# configure doesn't support --bindir --sbindir options, install manually -./configure --enable-linuxcaps --with-editline -make %{?_smp_mflags} all docs +%configure --docdir=%{_docdir} +make %{?_smp_mflags} getdate all docs %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}} -mkdir -p $RPM_BUILD_ROOT{%{_infodir},%{_mandir}/man{1,5,8}} +make install install-docs DESTDIR=$RPM_BUILD_ROOT + +rm -rf $RPM_BUILD_ROOT%{_docdir} + mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/{sysconfig,logrotate.d},%{_initrddir}} mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{lib,log}/chrony -install -m 755 chronyc $RPM_BUILD_ROOT%{_bindir} -install -m 755 chronyd $RPM_BUILD_ROOT%{_sbindir} -install -m 644 -p -t $RPM_BUILD_ROOT%{_infodir} chrony.info* -install -m 644 -p -t $RPM_BUILD_ROOT%{_mandir}/man1 chrony*.1 -install -m 644 -p -t $RPM_BUILD_ROOT%{_mandir}/man5 chrony*.5 -install -m 644 -p -t $RPM_BUILD_ROOT%{_mandir}/man8 chrony*.8 - install -m 644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.conf install -m 640 -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.keys install -m 644 -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/chronyd @@ -124,6 +100,9 @@ fi %dir %attr(-,chrony,chrony) %{_localstatedir}/log/chrony %changelog +* Tue Dec 15 2009 Miroslav Lichvar 1.24-0.1.pre1 +- update to 1.24-pre1 + * Fri Jul 24 2009 Fedora Release Engineering - 1.23-7.20081106gitbe42b4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index a9af72d..f4d2dcf 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -ffce77695e55d8efda19ab0b78309c23 chrony-1.23.tar.gz -ad8091c4b507f7bde3804b8dc1150c56 getdate.y -c5f94f3fc4c78546b954e050b8027dc5 chrony-1.23-gitbe42b4.patch +e1f0d15bc0830f5f6bf80da2d72eb16a chrony-1.24-pre1.tar.gz