update to 1.5
This commit is contained in:
parent
62951f7e5d
commit
f7cdb25cee
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
/linuxptp-1.4.tgz
|
/linuxptp-1.5.tgz
|
||||||
/clknetsim-19a8df.tar.gz
|
/linuxptp-testsuite-7c523f.tar.gz
|
||||||
/testsuite-a1040d.tar.gz
|
/clknetsim-592d17.tar.gz
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
%global testsuite_ver 7c523f
|
||||||
|
%global clknetsim_ver 592d17
|
||||||
|
|
||||||
Name: linuxptp
|
Name: linuxptp
|
||||||
Version: 1.4
|
Version: 1.5
|
||||||
Release: 3%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: PTP implementation for Linux
|
Summary: PTP implementation for Linux
|
||||||
|
|
||||||
@ -12,10 +14,12 @@ URL: http://linuxptp.sourceforge.net/
|
|||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
|
||||||
Source1: phc2sys.service
|
Source1: phc2sys.service
|
||||||
Source2: ptp4l.service
|
Source2: ptp4l.service
|
||||||
# test suite from https://github.com/mlichvar/linuxptp-testsuite.git
|
Source3: timemaster.service
|
||||||
Source3: testsuite-a1040d.tar.gz
|
Source4: timemaster.conf
|
||||||
# simulator for test suite from https://github.com/mlichvar/clknetsim.git
|
# external test suite
|
||||||
Source4: clknetsim-19a8df.tar.gz
|
Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
|
||||||
|
# simulator for test suite
|
||||||
|
Source11: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/clknetsim-%{clknetsim_ver}.tar.gz
|
||||||
|
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
|
|
||||||
@ -31,8 +35,9 @@ Application Programming Interfaces (API) offered by the Linux kernel.
|
|||||||
Supporting legacy APIs and other platforms is not a goal.
|
Supporting legacy APIs and other platforms is not a goal.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -a 3 -a 4
|
%setup -q -a 10 -a 11
|
||||||
mv clknetsim testsuite
|
mv linuxptp-testsuite-%{testsuite_ver}* testsuite
|
||||||
|
mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} \
|
make %{?_smp_mflags} \
|
||||||
@ -44,13 +49,15 @@ make %{?_smp_mflags} \
|
|||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5}
|
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5}
|
||||||
install -m 644 -p default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf
|
install -m 644 -p default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf
|
||||||
install -m 644 -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}
|
install -m 644 -p %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}
|
||||||
|
install -m 644 -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
|
||||||
|
|
||||||
echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \
|
echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \
|
||||||
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
|
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
|
||||||
echo 'OPTIONS="-w -s eth0"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
|
echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
|
||||||
|
|
||||||
echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5
|
echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5
|
||||||
|
echo '.so man8/timemaster.8' > $RPM_BUILD_ROOT%{_mandir}/man5/timemaster.conf.5
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd testsuite
|
cd testsuite
|
||||||
@ -58,25 +65,29 @@ make %{?_smp_mflags} -C clknetsim
|
|||||||
PATH=..:$PATH ./run
|
PATH=..:$PATH ./run
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post ptp4l.service phc2sys.service
|
%systemd_post phc2sys.service ptp4l.service timemaster.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun phc2sys.service ptp4l.service
|
%systemd_preun phc2sys.service ptp4l.service timemaster.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%systemd_postun_with_restart ptp4l.service phc2sys.service
|
%systemd_postun_with_restart phc2sys.service ptp4l.service timemaster.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING README.org default.cfg gPTP.cfg
|
%doc COPYING README.org default.cfg gPTP.cfg
|
||||||
%config(noreplace) %{_sysconfdir}/ptp4l.conf
|
%config(noreplace) %{_sysconfdir}/ptp4l.conf
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/phc2sys
|
%config(noreplace) %{_sysconfdir}/sysconfig/phc2sys
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/ptp4l
|
%config(noreplace) %{_sysconfdir}/sysconfig/ptp4l
|
||||||
|
%config(noreplace) %{_sysconfdir}/timemaster.conf
|
||||||
%{_unitdir}/phc2sys.service
|
%{_unitdir}/phc2sys.service
|
||||||
%{_unitdir}/ptp4l.service
|
%{_unitdir}/ptp4l.service
|
||||||
|
%{_unitdir}/timemaster.service
|
||||||
%{_sbindir}/hwstamp_ctl
|
%{_sbindir}/hwstamp_ctl
|
||||||
%{_sbindir}/phc2sys
|
%{_sbindir}/phc2sys
|
||||||
|
%{_sbindir}/phc_ctl
|
||||||
%{_sbindir}/pmc
|
%{_sbindir}/pmc
|
||||||
%{_sbindir}/ptp4l
|
%{_sbindir}/ptp4l
|
||||||
|
%{_sbindir}/timemaster
|
||||||
%{_mandir}/man5/*.5*
|
%{_mandir}/man5/*.5*
|
||||||
%{_mandir}/man8/*.8*
|
%{_mandir}/man8/*.8*
|
||||||
|
|
||||||
|
6
sources
6
sources
@ -1,3 +1,3 @@
|
|||||||
a37ad2b2ef7d1ebc4d64a66d3fe55cdf linuxptp-1.4.tgz
|
f7f24174b7ce52eccaed1748409057b0 linuxptp-1.5.tgz
|
||||||
8719dab29f5dfbcb123576d5ceb3a4c3 clknetsim-19a8df.tar.gz
|
b58eddcdd58c97299d7f64e476c84494 linuxptp-testsuite-7c523f.tar.gz
|
||||||
0e45824432e9289e07550ea47ccaac87 testsuite-a1040d.tar.gz
|
b55244357cd4d54f48e6db58c2bf75ae clknetsim-592d17.tar.gz
|
||||||
|
32
timemaster.conf
Normal file
32
timemaster.conf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Configuration file for timemaster
|
||||||
|
|
||||||
|
#[ntp_server ntp-server.local]
|
||||||
|
#minpoll 4
|
||||||
|
#maxpoll 4
|
||||||
|
|
||||||
|
#[ptp_domain 0]
|
||||||
|
#interfaces eth0
|
||||||
|
|
||||||
|
[timemaster]
|
||||||
|
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
|
||||||
|
|
||||||
|
[ptp4l]
|
||||||
|
path /usr/sbin/ptp4l
|
11
timemaster.service
Normal file
11
timemaster.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Synchronize system clock to NTP and PTP time sources
|
||||||
|
After=chronyd.service ntpd.service ntpdate.service sntp.service
|
||||||
|
Conflicts=chronyd.service ntpd.service phc2sys.service ptp4l.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/sbin/timemaster -f /etc/timemaster.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user