From ce73e08714d01f0d4913142e55f973acd809d81670517e1988129e18f5bfb5fe Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 9 Nov 2018 07:54:50 +0000 Subject: [PATCH 1/2] - Enable experimental features OBS-URL: https://build.opensuse.org/package/show/network:time/ptpd?expand=0&rev=19 --- ptpd.changes | 5 +++++ ptpd.spec | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ptpd.changes b/ptpd.changes index 133d0cc..800a6bf 100644 --- a/ptpd.changes +++ b/ptpd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 9 07:50:17 UTC 2018 - Martin Pluskal + +- Enable experimental features + ------------------------------------------------------------------- Thu Mar 8 13:30:11 UTC 2018 - mpluskal@suse.com diff --git a/ptpd.spec b/ptpd.spec index b6d40e9..1efbf12 100644 --- a/ptpd.spec +++ b/ptpd.spec @@ -12,14 +12,10 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -#Compat macro for new _fillupdir macro introduced in Nov 2017 -%if ! %{defined _fillupdir} - %define _fillupdir %{_localstatedir}/adm/fillup-templates -%endif Name: ptpd Version: 2.3.1 Release: 0 @@ -68,7 +64,9 @@ PTPd is free. Everyone is invited to use and contribute to PTPd. %build autoreconf -fiv %configure \ - --enable-statistics + --enable-statistics \ + --enable-experimental-options +make %{?_smp_mflags} %install %make_install @@ -103,8 +101,8 @@ touch %{buildroot}%{_localstatedir}/log/ptpd2_kernelclock.drift %config(noreplace) %{_sysconfdir}/%{name}2.conf %{_sbindir}/ptpd2 %{_sbindir}/rcptpd2 -%{_mandir}/man5/ptpd2.conf.5%{ext_man} -%{_mandir}/man8/ptpd2.8%{ext_man} +%{_mandir}/man5/ptpd2.conf.5%{?ext_man} +%{_mandir}/man8/ptpd2.8%{?ext_man} %{_datadir}/ptpd %{_libexecdir}/systemd/system/ptpd2.service %{_fillupdir}/* From 6e1d2c298ef9fc69e73bf4a744b0d22cd9d30fd146af71f1932939e1e9633a1a Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 21 Nov 2018 14:43:36 +0000 Subject: [PATCH 2/2] Accepting request 650722 from home:iulhaq:branches:network:time - Fix name conflict with openssl variable * ptpd-evp-md-ctx.patch OBS-URL: https://build.opensuse.org/request/show/650722 OBS-URL: https://build.opensuse.org/package/show/network:time/ptpd?expand=0&rev=20 --- ptpd-evp-md-ctx.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ ptpd.changes | 6 ++++++ ptpd.spec | 7 +++++-- 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 ptpd-evp-md-ctx.patch diff --git a/ptpd-evp-md-ctx.patch b/ptpd-evp-md-ctx.patch new file mode 100644 index 0000000..a1025c1 --- /dev/null +++ b/ptpd-evp-md-ctx.patch @@ -0,0 +1,43 @@ +From 838b985510c360e651d18134e64f258f2f4c6e7c Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Fri, 31 Aug 2018 18:46:56 +0200 +Subject: [PATCH] ntp_isc_md5: rename EVP_MD_CTX into PTPD_EVP_MD_CTX + +EVP_MD_CTX can conflict with openssl that defines a completely different +typedef with same name. + +Since this typedef is used only twice in the entire ptpd, +substitute EVP_MD_CTX with PTPD_EVP_MD_CTX. + +Signed-off-by: Giulio Benetti +--- + src/dep/ntpengine/ntp_isc_md5.c | 2 +- + src/dep/ntpengine/ntp_isc_md5.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.c +=================================================================== +--- ptpd-ptpd-2.3.1.orig/src/dep/ntpengine/ntp_isc_md5.c ++++ ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.c +@@ -262,7 +262,7 @@ MD5authencrypt( + { + u_char digest[64]; + u_int len; +- EVP_MD_CTX ctx; ++ PTPD_EVP_MD_CTX ctx; + pkt[length / 4] = htonl(keyid); + EVP_DigestInit(&ctx); + EVP_DigestUpdate(&ctx, (u_char *)key, (u_int)strlen(key)); +Index: ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.h +=================================================================== +--- ptpd-ptpd-2.3.1.orig/src/dep/ntpengine/ntp_isc_md5.h ++++ ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.h +@@ -80,7 +80,7 @@ isc_md5_final(isc_md5_t *ctx, unsigned c + # define MD5Init(c) isc_md5_init(c) + # define MD5Update(c, p, s) isc_md5_update(c, p, s) + # define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */ +- typedef MD5_CTX EVP_MD_CTX; ++ typedef MD5_CTX PTPD_EVP_MD_CTX; + # define EVP_DigestInit(c) MD5Init(c) + # define EVP_DigestUpdate(c, p, s) MD5Update(c, p, s) + # define EVP_DigestFinal(c, d, pdl) \ diff --git a/ptpd.changes b/ptpd.changes index 800a6bf..bdf5551 100644 --- a/ptpd.changes +++ b/ptpd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 21 14:31:06 UTC 2018 - iulhaq@suse.com + +- Fix name conflict with openssl variable + * ptpd-evp-md-ctx.patch + ------------------------------------------------------------------- Fri Nov 9 07:50:17 UTC 2018 - Martin Pluskal diff --git a/ptpd.spec b/ptpd.spec index 1efbf12..557dc18 100644 --- a/ptpd.spec +++ b/ptpd.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -22,12 +22,14 @@ Release: 0 Summary: Implements the Precision Time protocol as defined by IEEE 1588 standard License: BSD-3-Clause Group: System/Daemons -URL: https://github.com/ptpd/ptpd +Url: https://github.com/ptpd/ptpd Source0: https://github.com/ptpd/ptpd/archive/ptpd-%{version}.tar.gz Source1: ptpd2.service Source3: conf.sysconfig.ptpd # PATCH-FIX-UPSTREAM ptpd2-net-snmp_U64.patch gh#ptpd/ptpd#25 Patch0: ptpd2-net-snmp_U64.patch +# PATCH-FIX-UPSTREAM resolve EVP_MD_CTX name conflict +Patch1: ptpd-evp-md-ctx.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libpcap-devel @@ -60,6 +62,7 @@ PTPd is free. Everyone is invited to use and contribute to PTPd. %prep %setup -q -n %{name}-%{name}-%{version} %patch0 +%patch1 -p1 %build autoreconf -fiv