|
|
996123 |
%global _hardened_build 1
|
|
|
fed1e1 |
%global testsuite_ver c66922
|
|
|
fed1e1 |
%global clknetsim_ver ce3c4a
|
|
|
996123 |
|
|
|
996123 |
Name: linuxptp
|
|
|
fed1e1 |
Version: 3.1.1
|
|
|
e61bb5 |
Release: 3%{?dist}
|
|
|
996123 |
Summary: PTP implementation for Linux
|
|
|
996123 |
|
|
|
996123 |
Group: System Environment/Base
|
|
|
996123 |
License: GPLv2+
|
|
|
996123 |
URL: http://linuxptp.sourceforge.net/
|
|
|
996123 |
|
|
|
996123 |
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
|
|
|
996123 |
Source1: phc2sys.service
|
|
|
996123 |
Source2: ptp4l.service
|
|
|
996123 |
Source3: timemaster.service
|
|
|
996123 |
Source4: timemaster.conf
|
|
|
996123 |
# external test suite
|
|
|
996123 |
Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
|
|
|
996123 |
# simulator for test suite
|
|
|
996123 |
Source11: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
|
|
|
996123 |
|
|
|
fed1e1 |
# don't repeat some log messages in multi-port configuration
|
|
|
fed1e1 |
Patch1: linuxptp-logmsgs.patch
|
|
|
fed1e1 |
# add option to set clockClass threshold
|
|
|
fed1e1 |
Patch2: linuxptp-classthreshold.patch
|
|
|
fed1e1 |
# increase default TX timestamp timeout to 10 ms
|
|
|
fed1e1 |
Patch3: linuxptp-deftxtout.patch
|
|
|
4b595f |
# limit unicast message rate per address and grant duration
|
|
|
4b595f |
Patch4: linuxptp-ucastrate.patch
|
|
|
fed1e1 |
# add read-only UDS port
|
|
|
fed1e1 |
Patch5: linuxptp-udsro.patch
|
|
|
fed1e1 |
# fix quoting in ptp4l man page
|
|
|
fed1e1 |
Patch7: linuxptp-manfix.patch
|
|
|
fed1e1 |
# close lstab file after use
|
|
|
fed1e1 |
Patch8: linuxptp-fclose.patch
|
|
|
7934a2 |
# fix handling of zero-length messages
|
|
|
7934a2 |
Patch9: linuxptp-zerolength.patch
|
|
|
b8a273 |
# make sanity clock check more reliable
|
|
|
b8a273 |
Patch10: linuxptp-clockcheck.patch
|
|
|
47dba5 |
# handle PHC read failing with EBUSY in phc2sys
|
|
|
47dba5 |
Patch11: linuxptp-phcerr.patch
|
|
|
4b595f |
|
|
|
4b595f |
BuildRequires: kernel-headers > 4.18.0-87
|
|
|
996123 |
BuildRequires: systemd
|
|
|
996123 |
|
|
|
996123 |
%{?systemd_requires}
|
|
|
996123 |
|
|
|
996123 |
%description
|
|
|
996123 |
This software is an implementation of the Precision Time Protocol (PTP)
|
|
|
996123 |
according to IEEE standard 1588 for Linux. The dual design goals are to provide
|
|
|
996123 |
a robust implementation of the standard and to use the most relevant and modern
|
|
|
996123 |
Application Programming Interfaces (API) offered by the Linux kernel.
|
|
|
996123 |
Supporting legacy APIs and other platforms is not a goal.
|
|
|
996123 |
|
|
|
996123 |
%prep
|
|
|
996123 |
%setup -q -a 10 -a 11 -n %{name}-%{!?gitfullver:%{version}}%{?gitfullver}
|
|
|
fed1e1 |
%patch1 -p1 -b .logmsgs
|
|
|
fed1e1 |
%patch2 -p1 -b .classthreshold
|
|
|
fed1e1 |
%patch3 -p1 -b .deftxtout
|
|
|
4b595f |
%patch4 -p1 -b .ucastrate
|
|
|
fed1e1 |
%patch5 -p1 -b .udsro
|
|
|
fed1e1 |
%patch7 -p1 -b .manfix
|
|
|
fed1e1 |
%patch8 -p1 -b .fclose
|
|
|
7934a2 |
%patch9 -p1 -b .zerolength
|
|
|
b8a273 |
%patch10 -p1 -b .clockcheck
|
|
|
47dba5 |
%patch11 -p1 -b .phcerr
|
|
|
996123 |
mv linuxptp-testsuite-%{testsuite_ver}* testsuite
|
|
|
996123 |
mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
|
|
|
996123 |
|
|
|
996123 |
%build
|
|
|
996123 |
make %{?_smp_mflags} \
|
|
|
996123 |
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
996123 |
EXTRA_LDFLAGS="$RPM_LD_FLAGS"
|
|
|
996123 |
|
|
|
996123 |
%install
|
|
|
996123 |
%makeinstall
|
|
|
996123 |
|
|
|
996123 |
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5}
|
|
|
996123 |
install -m 644 -p configs/default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf
|
|
|
996123 |
install -m 644 -p %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}
|
|
|
996123 |
install -m 644 -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
|
|
|
996123 |
|
|
|
996123 |
echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \
|
|
|
996123 |
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
|
|
|
996123 |
echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
|
|
|
996123 |
|
|
|
996123 |
echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5
|
|
|
996123 |
echo '.so man8/timemaster.8' > $RPM_BUILD_ROOT%{_mandir}/man5/timemaster.conf.5
|
|
|
996123 |
|
|
|
fed1e1 |
# Remove patch backup files and non-linuxptp configuration
|
|
|
fed1e1 |
find configs -type f ! -name '*.cfg' -delete
|
|
|
fed1e1 |
|
|
|
996123 |
%check
|
|
|
996123 |
cd testsuite
|
|
|
996123 |
# set random seed to get deterministic results
|
|
|
996123 |
export CLKNETSIM_RANDOM_SEED=26743
|
|
|
996123 |
make %{?_smp_mflags} -C clknetsim
|
|
|
996123 |
PATH=..:$PATH ./run
|
|
|
996123 |
|
|
|
996123 |
%post
|
|
|
996123 |
%systemd_post phc2sys.service ptp4l.service timemaster.service
|
|
|
996123 |
|
|
|
996123 |
%preun
|
|
|
996123 |
%systemd_preun phc2sys.service ptp4l.service timemaster.service
|
|
|
996123 |
|
|
|
996123 |
%postun
|
|
|
996123 |
%systemd_postun_with_restart phc2sys.service ptp4l.service timemaster.service
|
|
|
996123 |
|
|
|
996123 |
%files
|
|
|
996123 |
%doc COPYING README.org configs
|
|
|
996123 |
%config(noreplace) %{_sysconfdir}/ptp4l.conf
|
|
|
996123 |
%config(noreplace) %{_sysconfdir}/sysconfig/phc2sys
|
|
|
996123 |
%config(noreplace) %{_sysconfdir}/sysconfig/ptp4l
|
|
|
996123 |
%config(noreplace) %{_sysconfdir}/timemaster.conf
|
|
|
996123 |
%{_unitdir}/phc2sys.service
|
|
|
996123 |
%{_unitdir}/ptp4l.service
|
|
|
996123 |
%{_unitdir}/timemaster.service
|
|
|
996123 |
%{_sbindir}/hwstamp_ctl
|
|
|
996123 |
%{_sbindir}/nsm
|
|
|
996123 |
%{_sbindir}/phc2sys
|
|
|
996123 |
%{_sbindir}/phc_ctl
|
|
|
996123 |
%{_sbindir}/pmc
|
|
|
996123 |
%{_sbindir}/ptp4l
|
|
|
996123 |
%{_sbindir}/timemaster
|
|
|
fed1e1 |
%{_sbindir}/ts2phc
|
|
|
996123 |
%{_mandir}/man5/*.5*
|
|
|
996123 |
%{_mandir}/man8/*.8*
|
|
|
996123 |
|
|
|
996123 |
%changelog
|
|
|
e61bb5 |
* Wed Jun 29 2022 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-3
|
|
|
e61bb5 |
- handle PHC read failing with EBUSY in phc2sys (#2079129)
|
|
|
47dba5 |
|
|
|
b8a273 |
* Mon Nov 01 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-2
|
|
|
b8a273 |
- make sanity clock check more reliable (#2007281)
|
|
|
b8a273 |
|
|
|
fed1e1 |
* Mon Jul 26 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-1
|
|
|
fed1e1 |
- update to 3.1.1 (#1895005 CVE-2021-3571)
|
|
|
fed1e1 |
- add read-only UDS port (#1929797)
|
|
|
fed1e1 |
- add option to set clockClass threshold (#1980386)
|
|
|
fed1e1 |
- don't repeat some log messages in multi-port configuration (#1980377)
|
|
|
fed1e1 |
- increase default TX timestamp timeout to 10 ms (#1977136)
|
|
|
fed1e1 |
|
|
|
b27996 |
* Thu Jun 24 2021 Miroslav Lichvar <mlichvar@redhat.com> 2.0-5.el8_4.1
|
|
|
b27996 |
- validate length of forwarded messages (CVE-2021-3570)
|
|
|
b27996 |
|
|
|
7934a2 |
* Mon Apr 27 2020 Miroslav Lichvar <mlichvar@redhat.com> 2.0-5
|
|
|
7934a2 |
- fix sample timestamps when synchronizing PHC to system clock (#1787376)
|
|
|
7934a2 |
- fix handling of zero-length messages (#1827275)
|
|
|
7934a2 |
|
|
|
4b595f |
* Thu May 16 2019 Miroslav Lichvar <mlichvar@redhat.com> 2.0-4
|
|
|
4b595f |
- rebuild with enabled gating (#1680888)
|
|
|
4b595f |
|
|
|
4b595f |
* Wed May 15 2019 Miroslav Lichvar <mlichvar@redhat.com> 2.0-3
|
|
|
4b595f |
- add support for active-backup team interface (#1685467)
|
|
|
4b595f |
- add support for more accurate synchronization to phc2sys (#1677217)
|
|
|
4b595f |
- add hwts_filter option to ptp4l (#1708554)
|
|
|
4b595f |
- limit unicast message rate per address and grant duration (#1707395)
|
|
|
4b595f |
- fix comparing of unicast addresses (#1707395)
|
|
|
4b595f |
- fix building with new kernel headers (#1707395)
|
|
|
4b595f |
- update testsuite (#1707395)
|
|
|
4b595f |
- don't leak memory when allocation fails (#1707395)
|
|
|
4b595f |
|
|
|
996123 |
* Tue Nov 13 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-2
|
|
|
996123 |
- start ptp4l, timemaster and phc2sys after network-online target (#1632282)
|
|
|
996123 |
|
|
|
996123 |
* Mon Aug 13 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-1
|
|
|
996123 |
- update to 2.0 (#1614300)
|
|
|
996123 |
|
|
|
996123 |
* Mon Apr 09 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.9.2-1
|
|
|
996123 |
- update to 1.9.2
|
|
|
996123 |
|
|
|
996123 |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-7.20180101git303b08
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Tue Jan 30 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.8-6.20180101git303b08
|
|
|
996123 |
- use macro for systemd scriptlet dependencies
|
|
|
996123 |
|
|
|
996123 |
* Thu Jan 11 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.8-5.20180101git303b08
|
|
|
996123 |
- update to 20180101git303b08
|
|
|
996123 |
|
|
|
996123 |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-4
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-2
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Mon Nov 07 2016 Miroslav Lichvar <mlichvar@redhat.com> 1.8-1
|
|
|
996123 |
- update to 1.8
|
|
|
996123 |
|
|
|
996123 |
* Fri Jul 22 2016 Miroslav Lichvar <mlichvar@redhat.com> 1.7-1
|
|
|
996123 |
- update to 1.7
|
|
|
996123 |
- add delay option to default timemaster.conf
|
|
|
996123 |
|
|
|
996123 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Tue Sep 22 2015 Miroslav Lichvar <mlichvar@redhat.com> 1.6-1
|
|
|
996123 |
- update to 1.6
|
|
|
996123 |
- set random seed in testing to get deterministic results
|
|
|
996123 |
- remove trailing whitespace in default timemaster.conf
|
|
|
996123 |
|
|
|
996123 |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-2
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Mon Jan 05 2015 Miroslav Lichvar <mlichvar@redhat.com> 1.5-1
|
|
|
996123 |
- update to 1.5
|
|
|
996123 |
|
|
|
996123 |
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-3
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Fri Feb 21 2014 Miroslav Lichvar <mlichvar@redhat.com> 1.4-1
|
|
|
996123 |
- update to 1.4
|
|
|
996123 |
- replace hardening build flags with _hardened_build
|
|
|
996123 |
- include test suite
|
|
|
996123 |
|
|
|
996123 |
* Fri Aug 02 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.3-1
|
|
|
996123 |
- update to 1.3
|
|
|
996123 |
|
|
|
996123 |
* Tue Jul 30 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-3.20130730git7789f0
|
|
|
996123 |
- update to 20130730git7789f0
|
|
|
996123 |
|
|
|
996123 |
* Fri Jul 19 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-2.20130719git46db40
|
|
|
996123 |
- update to 20130719git46db40
|
|
|
996123 |
- drop old systemd scriptlets
|
|
|
996123 |
- add man page link for ptp4l.conf
|
|
|
996123 |
|
|
|
996123 |
* Mon Apr 22 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-1
|
|
|
996123 |
- update to 1.2
|
|
|
996123 |
|
|
|
996123 |
* Mon Feb 18 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.1-1
|
|
|
996123 |
- update to 1.1
|
|
|
996123 |
- log phc2sys output
|
|
|
996123 |
|
|
|
996123 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
|
|
|
996123 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
996123 |
|
|
|
996123 |
* Thu Dec 13 2012 Miroslav Lichvar <mlichvar@redhat.com> 1.0-1
|
|
|
996123 |
- update to 1.0
|
|
|
996123 |
|
|
|
996123 |
* Fri Nov 09 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.3.20121109git4e8107
|
|
|
996123 |
- update to 20121109git4e8107
|
|
|
996123 |
- install unchanged default.cfg as ptp4l.conf
|
|
|
996123 |
- drop conflicts from phc2sys service
|
|
|
996123 |
|
|
|
996123 |
* Fri Sep 21 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.2.20120920git6ce135
|
|
|
996123 |
- fix issues found in package review (#859193)
|
|
|
996123 |
|
|
|
996123 |
* Thu Sep 20 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.1.20120920git6ce135
|
|
|
996123 |
- initial release
|