|
|
4693f0 |
%global _hardened_build 1
|
|
|
4693f0 |
%global testsuite_ver 502e82
|
|
|
4693f0 |
%global clknetsim_ver ce89a1
|
|
|
4693f0 |
Name: linuxptp
|
|
|
4693f0 |
Version: 1.8
|
|
|
c1aeb8 |
Release: 6%{?dist}
|
|
|
4693f0 |
Summary: PTP implementation for Linux
|
|
|
4693f0 |
|
|
|
4693f0 |
Group: System Environment/Base
|
|
|
4693f0 |
License: GPLv2+
|
|
|
4693f0 |
URL: http://linuxptp.sourceforge.net/
|
|
|
4693f0 |
|
|
|
4693f0 |
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
|
|
|
4693f0 |
Source1: phc2sys.service
|
|
|
4693f0 |
Source2: ptp4l.service
|
|
|
4693f0 |
Source3: timemaster.service
|
|
|
4693f0 |
Source4: timemaster.conf
|
|
|
4693f0 |
# external test suite
|
|
|
4693f0 |
Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
|
|
|
4693f0 |
# simulator for test suite
|
|
|
4693f0 |
Source11: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
|
|
|
4693f0 |
|
|
|
4693f0 |
# update default TAI-UTC offset and make it configurable
|
|
|
4693f0 |
Patch1: linuxptp-utcoffset.patch
|
|
|
4693f0 |
# add options to tag ptp4l/phc2sys log messages and use them in timemaster
|
|
|
4693f0 |
Patch2: linuxptp-messagetag.patch
|
|
|
4693f0 |
# check support for SW timestamping in timemaster
|
|
|
4693f0 |
Patch3: linuxptp-swtscheck.patch
|
|
|
4693f0 |
# fix leaks of sockets in error handling
|
|
|
4693f0 |
Patch4: linuxptp-closesocket.patch
|
|
|
4693f0 |
# update port dispatch code (needed by other patches)
|
|
|
4693f0 |
Patch5: linuxptp-portdispatch.patch
|
|
|
4693f0 |
# Fix phc2sys to check both the state and new_state variables of the clock
|
|
|
4693f0 |
Patch6: linuxptp-statechange.patch
|
|
|
4693f0 |
# fix handling of unknown/invalid management TLVs in pmc
|
|
|
4693f0 |
Patch7: linuxptp-mgttlv.patch
|
|
|
4693f0 |
# add support for IP over InfiniBand
|
|
|
4693f0 |
Patch8: linuxptp-ipoib.patch
|
|
|
4693f0 |
# force BMC election when link goes down
|
|
|
4693f0 |
Patch9: linuxptp-linkdown.patch
|
|
|
4693f0 |
# fix phc2sys to not synchronize clock to itself
|
|
|
4693f0 |
Patch10: linuxptp-multiport.patch
|
|
|
4693f0 |
# add support for active-backup bonding
|
|
|
4693f0 |
Patch11: linuxptp-bonding.patch
|
|
|
c1aeb8 |
# don't forward management requests to UDS port
|
|
|
c1aeb8 |
Patch12: linuxptp-udsmgt.patch
|
|
|
c1aeb8 |
# improve timemaster to restart terminated processes
|
|
|
c1aeb8 |
Patch13: linuxptp-tmasterrestart.patch
|
|
|
4693f0 |
|
|
|
4693f0 |
BuildRequires: systemd-units
|
|
|
4693f0 |
|
|
|
4693f0 |
Requires(post): systemd-units
|
|
|
4693f0 |
Requires(preun): systemd-units
|
|
|
4693f0 |
Requires(postun): systemd-units
|
|
|
4693f0 |
|
|
|
4693f0 |
%description
|
|
|
4693f0 |
This software is an implementation of the Precision Time Protocol (PTP)
|
|
|
4693f0 |
according to IEEE standard 1588 for Linux. The dual design goals are to provide
|
|
|
4693f0 |
a robust implementation of the standard and to use the most relevant and modern
|
|
|
4693f0 |
Application Programming Interfaces (API) offered by the Linux kernel.
|
|
|
4693f0 |
Supporting legacy APIs and other platforms is not a goal.
|
|
|
4693f0 |
|
|
|
4693f0 |
%prep
|
|
|
4693f0 |
%setup -q -a 10 -a 11
|
|
|
4693f0 |
%patch1 -p1 -b .utcoffset
|
|
|
4693f0 |
%patch2 -p1 -b .messagetag
|
|
|
4693f0 |
%patch3 -p1 -b .swtscheck
|
|
|
4693f0 |
%patch4 -p1 -b .closesocket
|
|
|
4693f0 |
%patch5 -p1 -b .portdispatch
|
|
|
4693f0 |
%patch6 -p1 -b .statechange
|
|
|
4693f0 |
%patch7 -p1 -b .mgttlv
|
|
|
4693f0 |
%patch8 -p1 -b .ipoib
|
|
|
4693f0 |
%patch9 -p1 -b .linkdown
|
|
|
4693f0 |
%patch10 -p1 -b .multiport
|
|
|
4693f0 |
%patch11 -p1 -b .bonding
|
|
|
c1aeb8 |
%patch12 -p1 -b .udsmgt
|
|
|
c1aeb8 |
%patch13 -p1 -b .tmasterrestart
|
|
|
4693f0 |
mv linuxptp-testsuite-%{testsuite_ver}* testsuite
|
|
|
4693f0 |
mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
|
|
|
4693f0 |
|
|
|
4693f0 |
%build
|
|
|
4693f0 |
make %{?_smp_mflags} \
|
|
|
4693f0 |
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
4693f0 |
EXTRA_LDFLAGS="$RPM_LD_FLAGS"
|
|
|
4693f0 |
|
|
|
4693f0 |
%install
|
|
|
4693f0 |
%makeinstall
|
|
|
4693f0 |
|
|
|
4693f0 |
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5}
|
|
|
4693f0 |
install -m 644 -p default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf
|
|
|
4693f0 |
install -m 644 -p %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}
|
|
|
4693f0 |
install -m 644 -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
|
|
|
4693f0 |
|
|
|
4693f0 |
echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \
|
|
|
4693f0 |
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
|
|
|
4693f0 |
echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
|
|
|
4693f0 |
|
|
|
4693f0 |
echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5
|
|
|
4693f0 |
echo '.so man8/timemaster.8' > $RPM_BUILD_ROOT%{_mandir}/man5/timemaster.conf.5
|
|
|
4693f0 |
|
|
|
4693f0 |
%check
|
|
|
4693f0 |
cd testsuite
|
|
|
4693f0 |
# set random seed to get deterministic results
|
|
|
4693f0 |
export CLKNETSIM_RANDOM_SEED=26743
|
|
|
4693f0 |
make %{?_smp_mflags} -C clknetsim
|
|
|
4693f0 |
PATH=..:$PATH ./run
|
|
|
4693f0 |
|
|
|
4693f0 |
%post
|
|
|
4693f0 |
%systemd_post phc2sys.service ptp4l.service timemaster.service
|
|
|
4693f0 |
|
|
|
4693f0 |
%preun
|
|
|
4693f0 |
%systemd_preun phc2sys.service ptp4l.service timemaster.service
|
|
|
4693f0 |
|
|
|
4693f0 |
%postun
|
|
|
4693f0 |
%systemd_postun_with_restart phc2sys.service ptp4l.service timemaster.service
|
|
|
4693f0 |
|
|
|
4693f0 |
%files
|
|
|
4693f0 |
%doc COPYING README.org default.cfg gPTP.cfg
|
|
|
4693f0 |
%config(noreplace) %{_sysconfdir}/ptp4l.conf
|
|
|
4693f0 |
%config(noreplace) %{_sysconfdir}/sysconfig/phc2sys
|
|
|
4693f0 |
%config(noreplace) %{_sysconfdir}/sysconfig/ptp4l
|
|
|
4693f0 |
%config(noreplace) %{_sysconfdir}/timemaster.conf
|
|
|
4693f0 |
%{_unitdir}/phc2sys.service
|
|
|
4693f0 |
%{_unitdir}/ptp4l.service
|
|
|
4693f0 |
%{_unitdir}/timemaster.service
|
|
|
4693f0 |
%{_sbindir}/hwstamp_ctl
|
|
|
4693f0 |
%{_sbindir}/phc2sys
|
|
|
4693f0 |
%{_sbindir}/phc_ctl
|
|
|
4693f0 |
%{_sbindir}/pmc
|
|
|
4693f0 |
%{_sbindir}/ptp4l
|
|
|
4693f0 |
%{_sbindir}/timemaster
|
|
|
4693f0 |
%{_mandir}/man5/*.5*
|
|
|
4693f0 |
%{_mandir}/man8/*.8*
|
|
|
4693f0 |
|
|
|
4693f0 |
%changelog
|
|
|
c1aeb8 |
* Wed May 30 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.8-6
|
|
|
c1aeb8 |
- add support for bonding to timemaster (#1549015)
|
|
|
c1aeb8 |
- improve timemaster to restart terminated processes (#1527170)
|
|
|
c1aeb8 |
- start ptp4l, timemaster and phc2sys after network-online target (#1541991)
|
|
|
c1aeb8 |
- don't forward management requests to UDS port (#1520366)
|
|
|
c1aeb8 |
|
|
|
4693f0 |
* Tue Oct 24 2017 Miroslav Lichvar <mlichvar@redhat.com> 1.8-5
|
|
|
4693f0 |
- add support for active-backup bonding (#1002657)
|
|
|
4693f0 |
- add support for IP over InfiniBand (#1472880)
|
|
|
4693f0 |
- fix handling of unknown/invalid management TLVs in pmc (#1459446 #1459449)
|
|
|
4693f0 |
|
|
|
4693f0 |
* Thu Sep 07 2017 Michal Ruprich <mruprich@redhat.com> - 1.8-4
|
|
|
4693f0 |
- Resolves: #1487522 - Race condition in phc2sys
|
|
|
4693f0 |
|
|
|
4693f0 |
* Wed Mar 15 2017 Miroslav Lichvar <mlichvar@redhat.com> 1.8-3
|
|
|
4693f0 |
- fix backport of linkdown patch
|
|
|
4693f0 |
|
|
|
4693f0 |
* Tue Mar 14 2017 Miroslav Lichvar <mlichvar@redhat.com> 1.8-2
|
|
|
4693f0 |
- force BMC election when link goes down
|
|
|
4693f0 |
|
|
|
4693f0 |
* Tue Feb 07 2017 Miroslav Lichvar <mlichvar@redhat.com> 1.8-1
|
|
|
4693f0 |
- update to 1.8 (#1359311 #1353336)
|
|
|
4693f0 |
|
|
|
4693f0 |
* Tue Nov 25 2014 Miroslav Lichvar <mlichvar@redhat.com> 1.4-3.20140718gitbdb6a3
|
|
|
4693f0 |
- fix resetting of linreg servo (#1165045)
|
|
|
4693f0 |
- fix phc2sys automatic mode with multiple interfaces (#1108795)
|
|
|
4693f0 |
|
|
|
4693f0 |
* Tue Oct 14 2014 Miroslav Lichvar <mlichvar@redhat.com> 1.4-2.20140718gitbdb6a3
|
|
|
4693f0 |
- add timemaster (#1085580)
|
|
|
4693f0 |
- send peer messages to correct address
|
|
|
4693f0 |
- make NTP SHM segment number configurable
|
|
|
4693f0 |
- update UDS handling to allow running multiple ptp4l/phc2sys instances
|
|
|
4693f0 |
- fix warnings from static analysis
|
|
|
4693f0 |
|
|
|
4693f0 |
* Wed Sep 03 2014 Miroslav Lichvar <mlichvar@redhat.com> 1.4-1.20140718gitbdb6a3
|
|
|
4693f0 |
- update to 20140718gitbdb6a3 (#1108795, #1059039)
|
|
|
4693f0 |
- fix PIE linking (#1092537)
|
|
|
4693f0 |
- replace hardening build flags with _hardened_build
|
|
|
4693f0 |
- include simulation test suite
|
|
|
4693f0 |
|
|
|
4693f0 |
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.3-3
|
|
|
4693f0 |
- Mass rebuild 2014-01-24
|
|
|
4693f0 |
|
|
|
4693f0 |
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.3-2
|
|
|
4693f0 |
- Mass rebuild 2013-12-27
|
|
|
4693f0 |
|
|
|
4693f0 |
* Fri Aug 02 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.3-1
|
|
|
4693f0 |
- update to 1.3
|
|
|
4693f0 |
|
|
|
4693f0 |
* Tue Jul 30 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-3.20130730git7789f0
|
|
|
4693f0 |
- update to 20130730git7789f0
|
|
|
4693f0 |
|
|
|
4693f0 |
* Fri Jul 19 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-2.20130719git46db40
|
|
|
4693f0 |
- update to 20130719git46db40
|
|
|
4693f0 |
- drop old systemd scriptlets
|
|
|
4693f0 |
- add man page link for ptp4l.conf
|
|
|
4693f0 |
|
|
|
4693f0 |
* Mon Apr 22 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-1
|
|
|
4693f0 |
- update to 1.2
|
|
|
4693f0 |
|
|
|
4693f0 |
* Mon Feb 18 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.1-1
|
|
|
4693f0 |
- update to 1.1
|
|
|
4693f0 |
- log phc2sys output
|
|
|
4693f0 |
|
|
|
4693f0 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
|
|
|
4693f0 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
4693f0 |
|
|
|
4693f0 |
* Thu Dec 13 2012 Miroslav Lichvar <mlichvar@redhat.com> 1.0-1
|
|
|
4693f0 |
- update to 1.0
|
|
|
4693f0 |
|
|
|
4693f0 |
* Fri Nov 09 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.3.20121109git4e8107
|
|
|
4693f0 |
- update to 20121109git4e8107
|
|
|
4693f0 |
- install unchanged default.cfg as ptp4l.conf
|
|
|
4693f0 |
- drop conflicts from phc2sys service
|
|
|
4693f0 |
|
|
|
4693f0 |
* Fri Sep 21 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.2.20120920git6ce135
|
|
|
4693f0 |
- fix issues found in package review (#859193)
|
|
|
4693f0 |
|
|
|
4693f0 |
* Thu Sep 20 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.1.20120920git6ce135
|
|
|
4693f0 |
- initial release
|