From b4832b8944d28cb77e5dff2f8c8fb829a659ddc92fa7adf45f5f85f75e43a760 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Sun, 10 Jul 2016 07:45:37 +0000 Subject: [PATCH 1/2] - Disable snmp support untill gh#25 is resolved OBS-URL: https://build.opensuse.org/package/show/network:time/ptpd?expand=0&rev=10 --- ptpd.changes | 5 +++++ ptpd.spec | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ptpd.changes b/ptpd.changes index 01b90bc..65350a7 100644 --- a/ptpd.changes +++ b/ptpd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jul 10 07:45:01 UTC 2016 - mpluskal@suse.com + +- Disable snmp support untill gh#25 is resolved + ------------------------------------------------------------------- Thu May 12 19:33:35 UTC 2016 - mpluskal@suse.com diff --git a/ptpd.spec b/ptpd.spec index 8bc9124..311a34f 100644 --- a/ptpd.spec +++ b/ptpd.spec @@ -31,7 +31,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: libpcap-devel BuildRequires: libtool -BuildRequires: net-snmp-devel +#BuildRequires: net-snmp-devel BuildRequires: openssl-devel BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel @@ -66,11 +66,11 @@ autoreconf -fiv --enable-statistics %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install -install -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}2.service +%make_install +install -D -p -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}2.service ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}2 -install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}2.conf -install -D -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.ptpd2 +install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}2.conf +install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.ptpd2 # have to create the below, else ptpd will not log drift install -d %{buildroot}%{_localstatedir}/log touch %{buildroot}%{_localstatedir}/log/ptpd2_kernelclock.drift @@ -92,9 +92,10 @@ touch %{buildroot}%{_localstatedir}/log/ptpd2_kernelclock.drift %defattr(-, root, root) %doc COPYRIGHT ChangeLog README %config %{_sysconfdir}/%{name}2.conf -%{_sbindir}/* -%{_mandir}/man8/* -%{_mandir}/man5/* +%{_sbindir}/ptpd2 +%{_sbindir}/rcptpd2 +%{_mandir}/man5/ptpd2.conf.5%{ext_man} +%{_mandir}/man8/ptpd2.8%{ext_man} %{_datadir}/ptpd %{_libexecdir}/systemd/system/ptpd2.service %{_localstatedir}/adm/fillup-templates/* From c973845a58bfed505235c879218949e991760772873416dbc8a5298a477cc079 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 13 Jul 2016 10:42:57 +0000 Subject: [PATCH 2/2] - Fix building with latest net-snmp * ptpd2-net-snmp_U64.patch OBS-URL: https://build.opensuse.org/package/show/network:time/ptpd?expand=0&rev=11 --- ptpd.changes | 5 +++-- ptpd.spec | 5 ++++- ptpd2-net-snmp_U64.patch | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 ptpd2-net-snmp_U64.patch diff --git a/ptpd.changes b/ptpd.changes index 65350a7..1a43106 100644 --- a/ptpd.changes +++ b/ptpd.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- -Sun Jul 10 07:45:01 UTC 2016 - mpluskal@suse.com +Wed Jul 13 10:40:49 UTC 2016 - mpluskal@suse.com -- Disable snmp support untill gh#25 is resolved +- Fix building with latest net-snmp + * ptpd2-net-snmp_U64.patch ------------------------------------------------------------------- Thu May 12 19:33:35 UTC 2016 - mpluskal@suse.com diff --git a/ptpd.spec b/ptpd.spec index 311a34f..e6dc14a 100644 --- a/ptpd.spec +++ b/ptpd.spec @@ -27,11 +27,13 @@ Source0: https://github.com/ptpd/ptpd/archive/ptpd-%{version}.tar.gz Source1: ptpd2.service Source2: ptpd2.conf Source3: conf.sysconfig.ptpd +# PATCH-FIX-UPSTREAM ptpd2-net-snmp_U64.patch gh#ptpd/ptpd#25 +Patch0: ptpd2-net-snmp_U64.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libpcap-devel BuildRequires: libtool -#BuildRequires: net-snmp-devel +BuildRequires: net-snmp-devel BuildRequires: openssl-devel BuildRequires: systemd-rpm-macros BuildRequires: zlib-devel @@ -59,6 +61,7 @@ PTPd is free. Everyone is invited to use and contribute to PTPd. %prep %setup -q -n %{name}-%{name}-%{version} +%patch0 %build autoreconf -fiv diff --git a/ptpd2-net-snmp_U64.patch b/ptpd2-net-snmp_U64.patch new file mode 100644 index 0000000..2d04d85 --- /dev/null +++ b/ptpd2-net-snmp_U64.patch @@ -0,0 +1,23 @@ +From 1886522b50fe44e5c0dedd01d13ac456b941f744 Mon Sep 17 00:00:00 2001 +From: Jan Breuer +Date: Tue, 12 Jul 2016 18:07:08 +0200 +Subject: [PATCH] Solve issue #25 - Removing type U64 from net-snmp related + code + +--- + src/dep/snmp.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: src/dep/snmp.c +=================================================================== +--- src/dep/snmp.c.orig ++++ src/dep/snmp.c +@@ -221,7 +221,7 @@ snmpHeaderIndexBest(struct snmpHeaderInd + + #define SNMP_LOCAL_VARIABLES \ + static unsigned long long_ret; \ +- static U64 counter64_ret; \ ++ static struct counter64 counter64_ret; \ + static uint32_t ipaddr; \ + Integer64 bigint; \ + struct snmpHeaderIndex idx; \