From e811fcfcc51b8767be8d010fb1ee87fab3b5b4103303db74c26e0799c8a9140e Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 14 Apr 2016 07:06:33 +0000 Subject: [PATCH] Accepting request 389663 from home:markkp:branches:network:time Added a fix from Marcus Meissner so that nss could be enabled and still pass the "make check" processing. OBS-URL: https://build.opensuse.org/request/show/389663 OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=18 --- chrony-fix-open.patch | 22 ++++++++++++++++++++++ chrony.changes | 8 ++++++++ chrony.spec | 4 ++-- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 chrony-fix-open.patch diff --git a/chrony-fix-open.patch b/chrony-fix-open.patch new file mode 100644 index 0000000..519cfc3 --- /dev/null +++ b/chrony-fix-open.patch @@ -0,0 +1,22 @@ +Index: chrony-2.3/clknetsim-96416d5d0bb6f8c2356fa067f707f34fc650688c/client.c +=================================================================== +--- chrony-2.3.orig/clknetsim-96416d5d0bb6f8c2356fa067f707f34fc650688c/client.c ++++ chrony-2.3/clknetsim-96416d5d0bb6f8c2356fa067f707f34fc650688c/client.c +@@ -945,6 +945,8 @@ int open(const char *pathname, int flags + else if (!strcmp(pathname, "/dev/ptp1")) + return SYSCLK_FD; + ++ if (!_open) ++ _open = (int (*)(const char *pathname, int flags))dlsym(RTLD_NEXT, "open"); + r = _open(pathname, flags); + assert(r < 0 || (r < BASE_SOCKET_FD && r < BASE_TIMER_FD)); + +@@ -963,6 +965,8 @@ int close(int fd) { + return 0; + } + ++ if (!_close) ++ _close = (int (*)(int fd))dlsym(RTLD_NEXT, "close"); + return _close(fd); + } + diff --git a/chrony.changes b/chrony.changes index 2a8b5bf..17a2e9c 100644 --- a/chrony.changes +++ b/chrony.changes @@ -3,6 +3,14 @@ Wed Apr 13 14:23:38 UTC 2016 - mpluskal@suse.com - Provide ntp-daemon (bsc#973981) +------------------------------------------------------------------- +Mon Apr 11 15:26:59 UTC 2016 - meissner@suse.com + +- chrony-fix-open.patch: make sure _open and _close are initialized + in open()/close() override, as libfreebl3 also calls from the + the ELF constructor. FATE#319508 +- enable mozilla-nss + ------------------------------------------------------------------- Fri Apr 8 15:54:08 UTC 2016 - mpluskal@suse.com diff --git a/chrony.spec b/chrony.spec index 080105c..fe3e71a 100644 --- a/chrony.spec +++ b/chrony.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - %define vendorzone opensuse. %if 0%{?suse_version} > 1230 %bcond_without systemd @@ -50,6 +49,7 @@ Patch1: chrony-service-helper.patch Patch2: chrony-logrotate.patch Patch3: chrony-include-termios.patch Patch4: make-105-ntpauth-more-reliable.patch +Patch5: chrony-fix-open.patch # BuildRequires: NetworkManager-devel BuildRequires: bison @@ -113,6 +113,7 @@ or a different computer. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # use our vendor zone (2.*pool.ntp.org names include IPv6 addresses) sed -e 's|^\(pool \)\(pool.ntp.org\)|\12.%{vendorzone}\2|' \ @@ -135,7 +136,6 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now" --enable-scfilter \ %endif --with-user=chrony \ - --without-nss \ --with-hwclockfile=%{_sysconfdir}/adjtime \ --with-sendmail=%{_sbindir}/sendmail