dcavalca / rpms / linuxptp

Forked from rpms/linuxptp 2 years ago
Clone
ae5d40
%global _hardened_build 1
ae5d40
%global testsuite_ver c66922
ae5d40
%global clknetsim_ver ce3c4a
ae5d40
ae5d40
Name:		linuxptp
ae5d40
Version:	3.1.1
ae5d40
Release:	2%{?dist}
ae5d40
Summary:	PTP implementation for Linux
ae5d40
ae5d40
License:	GPLv2+
ae5d40
URL:		http://linuxptp.sourceforge.net/
ae5d40
ae5d40
Source0:	https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
ae5d40
Source1:	phc2sys.service
ae5d40
Source2:	ptp4l.service
ae5d40
Source3:	timemaster.service
ae5d40
Source4:	timemaster.conf
ae5d40
Source5:	ptp4l.conf
ae5d40
# external test suite
ae5d40
Source10:	https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
ae5d40
# simulator for test suite
ae5d40
Source11:	https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
ae5d40
ae5d40
# don't repeat some log messages in multi-port configuration
ae5d40
Patch1:		linuxptp-logmsgs.patch
ae5d40
# add option to set clockClass threshold
ae5d40
Patch2:		linuxptp-classthreshold.patch
ae5d40
# increase default TX timestamp timeout to 10 ms
ae5d40
Patch3:		linuxptp-deftxtout.patch
ae5d40
# limit unicast message rate per address and grant duration
ae5d40
Patch4:		linuxptp-ucastrate.patch
ae5d40
# add read-only UDS port
ae5d40
Patch5:		linuxptp-udsro.patch
ae5d40
# fix quoting in ptp4l man page
ae5d40
Patch7:		linuxptp-manfix.patch
ae5d40
# close lstab file after use
ae5d40
Patch8:		linuxptp-fclose.patch
ae5d40
# fix handling of zero-length messages
ae5d40
Patch9:		linuxptp-zerolength.patch
ae5d40
# avoid unaligned pointers to packed members
ae5d40
Patch10:	linuxptp-packalign.patch
ae5d40
ae5d40
BuildRequires:	gcc gcc-c++ make systemd
ae5d40
ae5d40
%{?systemd_requires}
ae5d40
ae5d40
%description
ae5d40
This software is an implementation of the Precision Time Protocol (PTP)
ae5d40
according to IEEE standard 1588 for Linux. The dual design goals are to provide
ae5d40
a robust implementation of the standard and to use the most relevant and modern
ae5d40
Application Programming Interfaces (API) offered by the Linux kernel.
ae5d40
Supporting legacy APIs and other platforms is not a goal.
ae5d40
ae5d40
%prep
ae5d40
%setup -q -a 10 -a 11 -n %{name}-%{!?gitfullver:%{version}}%{?gitfullver}
ae5d40
%patch1 -p1 -b .logmsgs
ae5d40
%patch2 -p1 -b .classthreshold
ae5d40
%patch3 -p1 -b .deftxtout
ae5d40
%patch4 -p1 -b .ucastrate
ae5d40
%patch5 -p1 -b .udsro
ae5d40
%patch7 -p1 -b .manfix
ae5d40
%patch8 -p1 -b .fclose
ae5d40
%patch9 -p1 -b .zerolength
ae5d40
%patch10 -p1 -b .packalign
ae5d40
mv linuxptp-testsuite-%{testsuite_ver}* testsuite
ae5d40
mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
ae5d40
ae5d40
%build
ae5d40
%{make_build} \
ae5d40
	EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
ae5d40
	EXTRA_LDFLAGS="$RPM_LD_FLAGS"
ae5d40
ae5d40
%install
ae5d40
%makeinstall
ae5d40
ae5d40
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5}
ae5d40
install -m 644 -p %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}
ae5d40
install -m 644 -p %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
ae5d40
ae5d40
echo 'OPTIONS="-f /etc/ptp4l.conf"' > \
ae5d40
	$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
ae5d40
echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
ae5d40
ae5d40
echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5
ae5d40
echo '.so man8/timemaster.8' > $RPM_BUILD_ROOT%{_mandir}/man5/timemaster.conf.5
ae5d40
ae5d40
# Remove patch backup files and non-linuxptp configuration
ae5d40
find configs -type f ! -name '*.cfg' -delete
ae5d40
ae5d40
%check
ae5d40
cd testsuite
ae5d40
# set random seed to get deterministic results
ae5d40
export CLKNETSIM_RANDOM_SEED=26743
ae5d40
%{make_build} -C clknetsim
ae5d40
PATH=..:$PATH ./run
ae5d40
ae5d40
%post
ae5d40
%systemd_post phc2sys.service ptp4l.service timemaster.service
ae5d40
ae5d40
%preun
ae5d40
%systemd_preun phc2sys.service ptp4l.service timemaster.service
ae5d40
ae5d40
%postun
ae5d40
%systemd_postun_with_restart phc2sys.service ptp4l.service timemaster.service
ae5d40
ae5d40
%files
ae5d40
%doc COPYING README.org configs
ae5d40
%config(noreplace) %{_sysconfdir}/ptp4l.conf
ae5d40
%config(noreplace) %{_sysconfdir}/sysconfig/phc2sys
ae5d40
%config(noreplace) %{_sysconfdir}/sysconfig/ptp4l
ae5d40
%config(noreplace) %{_sysconfdir}/timemaster.conf
ae5d40
%{_unitdir}/phc2sys.service
ae5d40
%{_unitdir}/ptp4l.service
ae5d40
%{_unitdir}/timemaster.service
ae5d40
%{_sbindir}/hwstamp_ctl
ae5d40
%{_sbindir}/nsm
ae5d40
%{_sbindir}/phc2sys
ae5d40
%{_sbindir}/phc_ctl
ae5d40
%{_sbindir}/pmc
ae5d40
%{_sbindir}/ptp4l
ae5d40
%{_sbindir}/timemaster
ae5d40
%{_sbindir}/ts2phc
ae5d40
%{_mandir}/man5/*.5*
ae5d40
%{_mandir}/man8/*.8*
ae5d40
ae5d40
%changelog
ae5d40
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.1-2
ae5d40
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
ae5d40
  Related: rhbz#1991688
ae5d40
ae5d40
* Mon Aug 02 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-1
ae5d40
- update to 3.1.1 (#1979954 CVE-2021-3570 CVE-2021-3571)
ae5d40
- add read-only UDS port
ae5d40
- add option to set clockClass threshold
ae5d40
- don't repeat some log messages in multi-port configuration
ae5d40
- increase default TX timestamp timeout to 10 ms
ae5d40
- limit unicast message rate per address and grant duration
ae5d40
ae5d40
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-5
ae5d40
- Rebuilt for RHEL 9 BETA for openssl 3.0
ae5d40
  Related: rhbz#1971065
ae5d40
ae5d40
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-4
ae5d40
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
ae5d40
ae5d40
* Thu Feb 25 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1-3
ae5d40
- fix handling of zero-length messages
ae5d40
- minimize default configuration
ae5d40
- remove obsolete build requirement
ae5d40
ae5d40
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-2
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ae5d40
ae5d40
* Tue Sep 29 2020 Miroslav Lichvar <mlichvar@redhat.com> 3.1-1
ae5d40
- update to 3.1
ae5d40
ae5d40
* Mon Jul 27 2020 Miroslav Lichvar <mlichvar@redhat.com> 3.0-1
ae5d40
- update to 3.0
ae5d40
ae5d40
* Mon Feb 03 2020 Miroslav Lichvar <mlichvar@redhat.com> 2.0-7.20191225gite05809
ae5d40
- update to 20191225gite05809
ae5d40
- fix testing with new glibc
ae5d40
ae5d40
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-6.20190912git48e605
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ae5d40
ae5d40
* Wed Sep 25 2019 Miroslav Lichvar <mlichvar@redhat.com> 2.0-5.20190912git48e605
ae5d40
- update to 20190912git48e605
ae5d40
ae5d40
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-4
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ae5d40
ae5d40
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ae5d40
ae5d40
* Tue Nov 13 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-2
ae5d40
- start ptp4l, timemaster and phc2sys after network-online target
ae5d40
- fix building with new kernel headers
ae5d40
ae5d40
* Mon Aug 13 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-1
ae5d40
- update to 2.0
ae5d40
ae5d40
* Thu Aug 09 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-0.1.20180805gita27407
ae5d40
- update to 20180805gita27407
ae5d40
ae5d40
* Mon Jul 16 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.9.2-3
ae5d40
- add gcc and gcc-c++ to build requirements
ae5d40
ae5d40
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.2-2
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ae5d40
ae5d40
* Mon Apr 09 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.9.2-1
ae5d40
- update to 1.9.2
ae5d40
ae5d40
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-7.20180101git303b08
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ae5d40
ae5d40
* Tue Jan 30 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.8-6.20180101git303b08
ae5d40
- use macro for systemd scriptlet dependencies
ae5d40
ae5d40
* Thu Jan 11 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.8-5.20180101git303b08
ae5d40
- update to 20180101git303b08
ae5d40
ae5d40
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-4
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ae5d40
ae5d40
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ae5d40
ae5d40
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-2
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ae5d40
ae5d40
* Mon Nov 07 2016 Miroslav Lichvar <mlichvar@redhat.com> 1.8-1
ae5d40
- update to 1.8
ae5d40
ae5d40
* Fri Jul 22 2016 Miroslav Lichvar <mlichvar@redhat.com> 1.7-1
ae5d40
- update to 1.7
ae5d40
- add delay option to default timemaster.conf
ae5d40
ae5d40
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ae5d40
ae5d40
* Tue Sep 22 2015 Miroslav Lichvar <mlichvar@redhat.com> 1.6-1
ae5d40
- update to 1.6
ae5d40
- set random seed in testing to get deterministic results
ae5d40
- remove trailing whitespace in default timemaster.conf
ae5d40
ae5d40
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-2
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ae5d40
ae5d40
* Mon Jan 05 2015 Miroslav Lichvar <mlichvar@redhat.com> 1.5-1
ae5d40
- update to 1.5
ae5d40
ae5d40
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-3
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ae5d40
ae5d40
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ae5d40
ae5d40
* Fri Feb 21 2014 Miroslav Lichvar <mlichvar@redhat.com> 1.4-1
ae5d40
- update to 1.4
ae5d40
- replace hardening build flags with _hardened_build
ae5d40
- include test suite
ae5d40
ae5d40
* Fri Aug 02 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.3-1
ae5d40
- update to 1.3
ae5d40
ae5d40
* Tue Jul 30 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-3.20130730git7789f0
ae5d40
- update to 20130730git7789f0
ae5d40
ae5d40
* Fri Jul 19 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-2.20130719git46db40
ae5d40
- update to 20130719git46db40
ae5d40
- drop old systemd scriptlets
ae5d40
- add man page link for ptp4l.conf
ae5d40
ae5d40
* Mon Apr 22 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-1
ae5d40
- update to 1.2
ae5d40
ae5d40
* Mon Feb 18 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.1-1
ae5d40
- update to 1.1
ae5d40
- log phc2sys output
ae5d40
ae5d40
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
ae5d40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ae5d40
ae5d40
* Thu Dec 13 2012 Miroslav Lichvar <mlichvar@redhat.com> 1.0-1
ae5d40
- update to 1.0
ae5d40
ae5d40
* Fri Nov 09 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.3.20121109git4e8107
ae5d40
- update to 20121109git4e8107
ae5d40
- install unchanged default.cfg as ptp4l.conf
ae5d40
- drop conflicts from phc2sys service
ae5d40
ae5d40
* Fri Sep 21 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.2.20120920git6ce135
ae5d40
- fix issues found in package review (#859193)
ae5d40
ae5d40
* Thu Sep 20 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.1.20120920git6ce135
ae5d40
- initial release