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
This commit is contained in:
Martin Pluskal 2016-04-14 07:06:33 +00:00 committed by Git OBS Bridge
parent 83a814dde1
commit e811fcfcc5
3 changed files with 32 additions and 2 deletions

22
chrony-fix-open.patch Normal file
View File

@ -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);
}

View File

@ -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

View File

@ -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