Compare commits
No commits in common. "c8" and "c9" have entirely different histories.
3
.linuxptp.metadata
Normal file
3
.linuxptp.metadata
Normal file
@ -0,0 +1,3 @@
|
||||
3ae72eb0ddafd8d8aeea7eac382d6e4a958717ef SOURCES/clknetsim-5d1dc0.tar.gz
|
||||
309e6ab1fa3f61b3deb1735c3082dc2070870be1 SOURCES/linuxptp-4.2.tgz
|
||||
7594d0705a1a648d5f7380d476bb3afebff21f6c SOURCES/linuxptp-testsuite-bf8ead.tar.gz
|
57
SOURCES/linuxptp-vclock.patch
Normal file
57
SOURCES/linuxptp-vclock.patch
Normal file
@ -0,0 +1,57 @@
|
||||
commit b2ceafdd8e4cde6c0cef67373006049b12f45c4a
|
||||
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Thu Apr 28 14:23:57 2022 +0200
|
||||
|
||||
timemaster: Check for RH-specific kernel with vclock support.
|
||||
|
||||
diff --git a/timemaster.8 b/timemaster.8
|
||||
index bc0b5b6..50699d6 100644
|
||||
--- a/timemaster.8
|
||||
+++ b/timemaster.8
|
||||
@@ -104,7 +104,7 @@ Enable or disable synchronization with virtual clocks. If enabled,
|
||||
needed by configured PTP domains. This enables hardware time stamping for
|
||||
multiple \fBptp4l\fR instances using the same network interface. The default
|
||||
value is -1, which enables the virtual clocks if running on Linux 5.18 or
|
||||
-later.
|
||||
+later, or the EL9-specific kernel-5.14.0-106 or later release.
|
||||
|
||||
.SS [ntp_server address]
|
||||
|
||||
diff --git a/timemaster.c b/timemaster.c
|
||||
index fab71fc..05f0af4 100644
|
||||
--- a/timemaster.c
|
||||
+++ b/timemaster.c
|
||||
@@ -546,6 +546,23 @@ static int check_kernel_version(int version, int patch)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int check_rh_kernel_version(const char *el, int version, int patch,
|
||||
+ int sub, int release)
|
||||
+{
|
||||
+ struct utsname uts;
|
||||
+ int v, p, sp, r;
|
||||
+
|
||||
+ if (uname(&uts) < 0)
|
||||
+ return 1;
|
||||
+ if (!strstr(uts.release, el))
|
||||
+ return 1;
|
||||
+ if (sscanf(uts.release, "%d.%d.%d-%d", &v, &p, &sp, &r) < 4)
|
||||
+ return 1;
|
||||
+ if (version != v || patch != p || sub != sp || release > r)
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static struct timemaster_config *config_parse(char *path)
|
||||
{
|
||||
struct timemaster_config *config = xcalloc(1, sizeof(*config));
|
||||
@@ -621,7 +638,8 @@ static struct timemaster_config *config_parse(char *path)
|
||||
fclose(f);
|
||||
|
||||
if (config->use_vclocks < 0)
|
||||
- config->use_vclocks = !check_kernel_version(5, 18);
|
||||
+ config->use_vclocks = !check_kernel_version(5, 18) ||
|
||||
+ !check_rh_kernel_version(".el9.", 5, 14, 0, 106);
|
||||
|
||||
if (section_name)
|
||||
free(section_name);
|
14
SOURCES/ptp4l.conf
Normal file
14
SOURCES/ptp4l.conf
Normal file
@ -0,0 +1,14 @@
|
||||
# For more information about this file, see the ptp4l(8) man page.
|
||||
# Examples are available in /usr/share/doc/linuxptp/configs.
|
||||
|
||||
[global]
|
||||
domainNumber 0
|
||||
slaveOnly 1
|
||||
time_stamping hardware
|
||||
tx_timestamp_timeout 1
|
||||
logging_level 6
|
||||
summary_interval 0
|
||||
|
||||
[eth0]
|
||||
network_transport UDPv4
|
||||
hybrid_e2e 0
|
@ -14,18 +14,11 @@ ntp_program chronyd
|
||||
[chrony.conf]
|
||||
include /etc/chrony.conf
|
||||
|
||||
[ntp.conf]
|
||||
includefile /etc/ntp.conf
|
||||
|
||||
[ptp4l.conf]
|
||||
|
||||
[chronyd]
|
||||
path /usr/sbin/chronyd
|
||||
|
||||
[ntpd]
|
||||
path /usr/sbin/ntpd
|
||||
options -u ntp:ntp -g
|
||||
|
||||
[phc2sys]
|
||||
path /usr/sbin/phc2sys
|
||||
|
||||
|
@ -4,10 +4,9 @@
|
||||
|
||||
Name: linuxptp
|
||||
Version: 4.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: PTP implementation for Linux
|
||||
|
||||
Group: System Environment/Base
|
||||
License: GPLv2+
|
||||
URL: http://linuxptp.sourceforge.net/
|
||||
|
||||
@ -16,6 +15,7 @@ Source1: phc2sys.service
|
||||
Source2: ptp4l.service
|
||||
Source3: timemaster.service
|
||||
Source4: timemaster.conf
|
||||
Source5: ptp4l.conf
|
||||
# external test suite
|
||||
Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
|
||||
# simulator for test suite
|
||||
@ -33,9 +33,10 @@ Patch4: linuxptp-ucastrate.patch
|
||||
Patch5: linuxptp-nmeadelay.patch
|
||||
# fix loading and reloading of leapfile
|
||||
Patch6: linuxptp-lstab.patch
|
||||
# check for EL-specific kernels with vclock support
|
||||
Patch12: linuxptp-vclock.patch
|
||||
|
||||
BuildRequires: kernel-headers > 4.18.0-87
|
||||
BuildRequires: systemd
|
||||
BuildRequires: gcc gcc-c++ make systemd
|
||||
|
||||
%{?systemd_requires}
|
||||
|
||||
@ -53,7 +54,7 @@ mv linuxptp-testsuite-%{testsuite_ver}* testsuite
|
||||
mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} \
|
||||
%{make_build} \
|
||||
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
|
||||
EXTRA_LDFLAGS="$RPM_LD_FLAGS"
|
||||
|
||||
@ -61,11 +62,10 @@ make %{?_smp_mflags} \
|
||||
%makeinstall
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5}
|
||||
install -m 644 -p configs/default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf
|
||||
install -m 644 -p %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -m 644 -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
install -m 644 -p %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
|
||||
echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \
|
||||
echo 'OPTIONS="-f /etc/ptp4l.conf"' > \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
|
||||
echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
|
||||
|
||||
@ -79,7 +79,7 @@ find configs -type f ! -name '*.cfg' -delete
|
||||
cd testsuite
|
||||
# set random seed to get deterministic results
|
||||
export CLKNETSIM_RANDOM_SEED=26743
|
||||
make %{?_smp_mflags} -C clknetsim
|
||||
%{make_build} -C clknetsim
|
||||
PATH=..:$PATH ./run
|
||||
|
||||
%post
|
||||
@ -113,58 +113,101 @@ PATH=..:$PATH ./run
|
||||
%{_mandir}/man8/*.8*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 22 2024 Miroslav Lichvar <mlichvar@redhat.com> 4.2-1
|
||||
- update to 4.2 (RHEL-21326 RHEL-21328 RHEL-21329)
|
||||
- fix ts2phc to handle large NMEA delay (RHEL-23278)
|
||||
* Thu Feb 22 2024 Miroslav Lichvar <mlichvar@redhat.com> 4.2-2
|
||||
- fix loading and reloading of leapfile
|
||||
|
||||
* Wed May 03 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-6
|
||||
- clear pending errors on sockets (#2192560)
|
||||
* Tue Jan 30 2024 Miroslav Lichvar <mlichvar@redhat.com> 4.2-1
|
||||
- update to 4.2 (RHEL-2026 RHEL-2342 RHEL-12182 RHEL-15929)
|
||||
- fix ts2phc to handle large NMEA delay (RHEL-23208)
|
||||
|
||||
* Wed Apr 12 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-5
|
||||
- handle EINTR when waiting for transmit timestamp (#2123224)
|
||||
* Wed May 03 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-9
|
||||
- clear pending errors on sockets (#2192559)
|
||||
|
||||
* Mon Mar 20 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-4
|
||||
- don't re-arm fault clearing timer on unrelated netlink events (#2174900)
|
||||
* Mon Mar 20 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-8
|
||||
- don't switch from system clock to PHC with SW timestamping (#2179041)
|
||||
|
||||
* Wed Jun 29 2022 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-3
|
||||
- handle PHC read failing with EBUSY in phc2sys (#2079129)
|
||||
* Thu Mar 09 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-7
|
||||
- don't re-arm fault clearing timer on unrelated netlink events (#2172650)
|
||||
|
||||
* Mon Nov 01 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-2
|
||||
- make sanity clock check more reliable (#2007281)
|
||||
* Thu Jan 05 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-6
|
||||
- add support for VLAN over bond (#2120521)
|
||||
- handle EINTR when waiting for transmit timestamp (#2128786)
|
||||
- check for unexpected changes in frequency offset (#2150815)
|
||||
|
||||
* Mon Jul 26 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-1
|
||||
- update to 3.1.1 (#1895005 CVE-2021-3571)
|
||||
- add read-only UDS port (#1929797)
|
||||
- add option to set clockClass threshold (#1980386)
|
||||
- don't repeat some log messages in multi-port configuration (#1980377)
|
||||
- increase default TX timestamp timeout to 10 ms (#1977136)
|
||||
* Thu Jul 28 2022 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-5
|
||||
- disable PHC switch with vclocks (#2066452)
|
||||
|
||||
* Thu Jun 24 2021 Miroslav Lichvar <mlichvar@redhat.com> 2.0-5.el8_4.1
|
||||
- validate length of forwarded messages (CVE-2021-3570)
|
||||
* Thu Jun 30 2022 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-4
|
||||
- handle PHC read failing with EBUSY in phc2sys (#2102568)
|
||||
|
||||
* Mon Apr 27 2020 Miroslav Lichvar <mlichvar@redhat.com> 2.0-5
|
||||
- fix sample timestamps when synchronizing PHC to system clock (#1787376)
|
||||
- fix handling of zero-length messages (#1827275)
|
||||
* Thu Jun 09 2022 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-3
|
||||
- add support for virtual clocks (#2067310)
|
||||
- make sanity clock check more reliable (#2079893)
|
||||
|
||||
* Thu May 16 2019 Miroslav Lichvar <mlichvar@redhat.com> 2.0-4
|
||||
- rebuild with enabled gating (#1680888)
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.1-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Wed May 15 2019 Miroslav Lichvar <mlichvar@redhat.com> 2.0-3
|
||||
- add support for active-backup team interface (#1685467)
|
||||
- add support for more accurate synchronization to phc2sys (#1677217)
|
||||
- add hwts_filter option to ptp4l (#1708554)
|
||||
- limit unicast message rate per address and grant duration (#1707395)
|
||||
- fix comparing of unicast addresses (#1707395)
|
||||
- fix building with new kernel headers (#1707395)
|
||||
- update testsuite (#1707395)
|
||||
- don't leak memory when allocation fails (#1707395)
|
||||
* Mon Aug 02 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1.1-1
|
||||
- update to 3.1.1 (#1979954 CVE-2021-3570 CVE-2021-3571)
|
||||
- add read-only UDS port
|
||||
- add option to set clockClass threshold
|
||||
- don't repeat some log messages in multi-port configuration
|
||||
- increase default TX timestamp timeout to 10 ms
|
||||
- limit unicast message rate per address and grant duration
|
||||
|
||||
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-5
|
||||
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||
Related: rhbz#1971065
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-4
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Thu Feb 25 2021 Miroslav Lichvar <mlichvar@redhat.com> 3.1-3
|
||||
- fix handling of zero-length messages
|
||||
- minimize default configuration
|
||||
- remove obsolete build requirement
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Sep 29 2020 Miroslav Lichvar <mlichvar@redhat.com> 3.1-1
|
||||
- update to 3.1
|
||||
|
||||
* Mon Jul 27 2020 Miroslav Lichvar <mlichvar@redhat.com> 3.0-1
|
||||
- update to 3.0
|
||||
|
||||
* Mon Feb 03 2020 Miroslav Lichvar <mlichvar@redhat.com> 2.0-7.20191225gite05809
|
||||
- update to 20191225gite05809
|
||||
- fix testing with new glibc
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-6.20190912git48e605
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Sep 25 2019 Miroslav Lichvar <mlichvar@redhat.com> 2.0-5.20190912git48e605
|
||||
- update to 20190912git48e605
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Tue Nov 13 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-2
|
||||
- start ptp4l, timemaster and phc2sys after network-online target (#1632282)
|
||||
- start ptp4l, timemaster and phc2sys after network-online target
|
||||
- fix building with new kernel headers
|
||||
|
||||
* Mon Aug 13 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-1
|
||||
- update to 2.0 (#1614300)
|
||||
- update to 2.0
|
||||
|
||||
* Thu Aug 09 2018 Miroslav Lichvar <mlichvar@redhat.com> 2.0-0.1.20180805gita27407
|
||||
- update to 20180805gita27407
|
||||
|
||||
* Mon Jul 16 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.9.2-3
|
||||
- add gcc and gcc-c++ to build requirements
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Mon Apr 09 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.9.2-1
|
||||
- update to 1.9.2
|
||||
|
Loading…
Reference in New Issue
Block a user