Accepting request 309606 from home:pluskalm:branches:network:time
- Update to 2.3.0 * see attached Changelog for full list of changes - Add systemd unit file and config file * ptpd2.conf * ptpd2.service - Drop init file * conf.ptpd.init - Cleanup spec file with spec-clener OBS-URL: https://build.opensuse.org/request/show/309606 OBS-URL: https://build.opensuse.org/package/show/network:time/ptpd?expand=0&rev=6
This commit is contained in:
parent
6cc458bed9
commit
973e6b0d1d
@ -1,22 +1,8 @@
|
||||
## Path: Network/PTPD
|
||||
## Description: Precision Time Protocol (PTP) daemon options
|
||||
## Type: string
|
||||
## Default: AUTO-2
|
||||
## ServiceRestart: ptpd
|
||||
#
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# Additional arguments when starting ptpd. The most important ones would be
|
||||
# -x do not reset the clock if off by more than one second
|
||||
# -t do not adjust the system clock
|
||||
#
|
||||
# -g run as slave only
|
||||
# -p make this a preferred clock
|
||||
#
|
||||
# -b NAME bind PTP to network interface NAME
|
||||
#
|
||||
# -n NAME specify PTP subdomain name (not related to IP or DNS)
|
||||
# -a NUMBER,NUMBER specify clock servo P and I attenuations
|
||||
# -w NUMBER specify one way delay filter stiffness
|
||||
PTPD_OPTIONS=""
|
||||
# Config file location
|
||||
PTPD_CONFIG_FILE="/etc/ptpd2.conf"
|
||||
# Lock / PID file location
|
||||
#PTPD_PID_FILE="/var/run/ptpd2.lock"
|
||||
# Status file location
|
||||
#PTPD_STATUS_FILE="/var/run/ptpd2.status"
|
||||
# Any extra command-line options
|
||||
PTPD_EXTRA_OPTIONS=""
|
||||
|
3
ptpd-2.3.0.tar.gz
Normal file
3
ptpd-2.3.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1a4e90496f004bfd91657ccc49209101dc25b787e540648c07c0973469f1d8f7
|
||||
size 785362
|
12
ptpd.changes
12
ptpd.changes
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 1 08:41:34 UTC 2015 - mpluskal@suse.com
|
||||
|
||||
- Update to 2.3.0
|
||||
* see attached Changelog for full list of changes
|
||||
- Add systemd unit file and config file
|
||||
* ptpd2.conf
|
||||
* ptpd2.service
|
||||
- Drop init file
|
||||
* conf.ptpd.init
|
||||
- Cleanup spec file with spec-clener
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 27 18:12:26 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
82
ptpd.spec
82
ptpd.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ptpd
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -15,20 +15,28 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: ptpd
|
||||
Summary: Implements the Precision Time protocol as defined by IEEE 1588 standard
|
||||
Version: 1.1.0
|
||||
Version: 2.3.0
|
||||
Release: 0
|
||||
Summary: Implements the Precision Time protocol as defined by IEEE 1588 standard
|
||||
License: BSD-3-Clause
|
||||
Group: System/Daemons
|
||||
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: conf.ptpd.init
|
||||
Source2: conf.sysconfig.ptpd
|
||||
Url: http://ptpd.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: ptpd2.service
|
||||
Source2: ptpd2.conf
|
||||
Source3: conf.sysconfig.ptpd
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libpcap-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: net-snmp-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: zlib-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as
|
||||
@ -51,50 +59,46 @@ PTPd is free. Everyone is invited to use and contribute to PTPd.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
autoreconf -fiv
|
||||
|
||||
%build
|
||||
cd src
|
||||
CFLAGS="$RPM_OPT_FLAGS" make
|
||||
%configure \
|
||||
--enable-statistics \
|
||||
--enable-ntpdc \
|
||||
--enable-sigusr2=counters
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
||||
mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}
|
||||
install -m 755 src/ptpd $RPM_BUILD_ROOT%{_sbindir}/ptpd
|
||||
#
|
||||
# boot scripts
|
||||
#
|
||||
install -m 755 %{S:1} $RPM_BUILD_ROOT%{_initrddir}/ptpd
|
||||
ln -s ../..%{_initrddir}/ptpd $RPM_BUILD_ROOT%{_sbindir}/rcptpd
|
||||
#
|
||||
# configuration
|
||||
#
|
||||
install -m 644 %{S:2} ${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.ptpd
|
||||
#
|
||||
# documentation
|
||||
#
|
||||
cp -r README COPYRIGHT doc RELEASE_NOTES tools ${RPM_BUILD_ROOT}/%{_docdir}
|
||||
find ${RPM_BUILD_ROOT}/%{_docdir} -type f -print0 | xargs -0 chmod 644
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
install -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}2.service
|
||||
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}2
|
||||
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}2.conf
|
||||
install -D -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.ptpd2
|
||||
# have to create the below, else ptpd will not log drift
|
||||
install -d %{buildroot}%{_localstatedir}/log
|
||||
touch %{buildroot}%{_localstatedir}/log/ptpd2_kernelclock.drift
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc COPYRIGHT ChangeLog README
|
||||
%config %{_sysconfdir}/%{name}2.conf
|
||||
%{_sbindir}/*
|
||||
%{_initrddir}/*
|
||||
/var/adm/fillup-templates/*
|
||||
%{_docdir}
|
||||
%{_mandir}/man8/*
|
||||
%{_mandir}/man5/*
|
||||
%{_libexecdir}/systemd/system/ptpd2.service
|
||||
%{_localstatedir}/adm/fillup-templates/*
|
||||
%config %ghost %{_localstatedir}/log/ptpd2_kernelclock.drift
|
||||
|
||||
%pre
|
||||
%service_add_pre %{name}2.service
|
||||
|
||||
%preun
|
||||
%{stop_on_removal} ptpd
|
||||
%service_del_preun %{name}2.service
|
||||
|
||||
%post
|
||||
%{fillup_only -n ptpd}
|
||||
%service_add_post %{name}2.service
|
||||
%{fillup_only -n ptpd2}
|
||||
|
||||
%postun
|
||||
%restart_on_update ptpd
|
||||
%{insserv_cleanup}
|
||||
%service_del_postun %{name}2.service
|
||||
|
||||
%changelog
|
||||
|
68
ptpd2.conf
Normal file
68
ptpd2.conf
Normal file
@ -0,0 +1,68 @@
|
||||
;
|
||||
==============================================================================
|
||||
; This is a recommended configuration for a PTPv2 slave
|
||||
; For a full list of options run ptpd2 -H or see the documentation and man
|
||||
pages
|
||||
;
|
||||
==============================================================================
|
||||
|
||||
; interface has to be specified
|
||||
ptpengine:interface=
|
||||
|
||||
; PTP domain
|
||||
ptpengine:domain=0
|
||||
|
||||
; available presets are slaveonly, masteronly and masterslave (full IEEE
|
||||
1588 implementation)
|
||||
ptpengine:preset=slaveonly
|
||||
|
||||
; multicast for both sync and delay requests - use hybrid for unicast delay
|
||||
requests
|
||||
ptpengine:ip_mode=multicast
|
||||
|
||||
; when enabled, sniffing is used instead of sockets to send and receive
|
||||
packets
|
||||
ptpengine:use_libpcap=n
|
||||
|
||||
; go into panic mode for 10 minutes instead of resetting the clock
|
||||
ptpengine:panic_mode=y
|
||||
ptpengine:panic_mode_duration=10
|
||||
|
||||
; uncomment this to enable outlier filters
|
||||
ptpengine:sync_outlier_filter_enable=y
|
||||
ptpengine:delay_outlier_filter_enable=y
|
||||
|
||||
; store observed drift in a file
|
||||
clock:drift_handling=file
|
||||
clock:drift_file=/var/log/ptpd2_kernelclock.drift
|
||||
|
||||
; update online statistics every 5 seconds
|
||||
global:statistics_update_interval=5
|
||||
|
||||
; wait 5 statistics intervals for one-way delay to stabilise
|
||||
ptpengine:calibration_delay=5
|
||||
|
||||
; log file, event log only. if timing statistics are needed, see
|
||||
statistics_file
|
||||
global:log_file=/var/log/ptpd2.log
|
||||
; log file up to 5M
|
||||
global:log_file_max_size=5000
|
||||
; rotate logs up to 5 files
|
||||
global:log_file_max_files=5
|
||||
|
||||
; status file providing an overview of ptpd's operation and statistics
|
||||
global:log_status=y
|
||||
|
||||
; required if ip_mode is set to hybrid
|
||||
;ptpengine:log_delayreq_interval=0
|
||||
|
||||
; uncomment this to log a timing log like in previous ptpd versions
|
||||
;global:statistics_file=/var/log/ptpd2.stats
|
||||
|
||||
; on multi-core systems it is recommended to bind ptpd to a single core
|
||||
;global:cpuaffinity_cpucore=0
|
||||
|
||||
; use DSCP 46 for expedited forwarding over ipv4 networks
|
||||
ptpengine:ip_dscp=46
|
||||
|
||||
; always keep a new line in the end
|
10
ptpd2.service
Normal file
10
ptpd2.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=ptpd time precision daemon
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-/etc/sysconfig/ptpd2
|
||||
ExecStart=/usr/bin/ptpd2 -c $PTPD_CONFIG_FILE $PTPD_EXTRA_OPTIONS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user