[packages/ptpd] new, version 2.3.0

glen glen at pld-linux.org
Thu Feb 19 22:36:21 CET 2015


commit 308304eefa4bee9cd2a865fdf53638b46facc795
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Feb 19 23:35:24 2015 +0200

    new, version 2.3.0
    
    based on fedora package d801e73

 ptpd.spec     | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ptpd2         | 10 +++++++
 ptpd2.conf    | 62 ++++++++++++++++++++++++++++++++++++++++++
 ptpd2.service | 10 +++++++
 4 files changed, 168 insertions(+)
---
diff --git a/ptpd.spec b/ptpd.spec
new file mode 100644
index 0000000..22e1211
--- /dev/null
+++ b/ptpd.spec
@@ -0,0 +1,86 @@
+Summary:	PTPd implements the Precision Time protocol (PTP) as defined by the IEEE 1588
+Name:		ptpd
+Version:	2.3.0
+Release:	1
+License:	BSD
+Group:		Daemons
+Source0:	http://downloads.sourceforge.net/ptpd/%{name}-%{version}.tar.gz
+# Source0-md5:	f5e931b4a229705ff0dbdfe22490566b
+Source1:	%{name}2.service
+Source2:	%{name}2
+Source3:	%{name}2.conf
+URL:		http://ptpd.sourceforge.net/
+BuildRequires:	autoconf
+BuildRequires:	automake
+BuildRequires:	libpcap-devel
+BuildRequires:	libtool
+BuildRequires:	net-snmp-devel
+BuildRequires:	openssl-devel
+BuildRequires:	rpmbuild(macros) >= 1.647
+BuildRequires:	systemd-devel
+BuildRequires:	zlib-devel
+Requires(post,preun,postun):	systemd-units >= 38
+Requires:	systemd-units >= 0.38
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as
+defined by the relevant IEEE 1588 standard. PTP was developed to
+provide very precise time coordination of LAN connected computers.
+
+PTPd is a complete implementation of the IEEE 1588 specification for a
+standard (non-boundary) clock. PTPd has been tested with and is known
+to work properly with other IEEE 1588 implementations.
+
+%prep
+%setup -q
+
+%build
+%{__aclocal} -I m4
+%{__libtoolize}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	--enable-statistics \
+	--enable-ntpdc \
+	--enable-sigusr2=counters \
+	--disable-silent-rules
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man{5,8},%{systemdunitdir},%{_localstatedir}/log,/etc/sysconfig}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig
+install -p src/ptpd2 $RPM_BUILD_ROOT%{_bindir}
+cp -p src/ptpd2.8 $RPM_BUILD_ROOT%{_mandir}/man8
+cp -p src/ptpd2.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5
+# have to create the below, else ptpd will not log drift
+touch $RPM_BUILD_ROOT%{_localstatedir}/log/ptpd2_kernelclock.drift
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%systemd_post ptpd2.service
+
+%preun
+%systemd_preun ptpd2.service
+
+%postun
+%systemd_reload
+
+%files
+%defattr(644,root,root,755)
+%doc COPYRIGHT ChangeLog README
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ptpd2
+%config(noreplace) %{_sysconfdir}/ptpd2.conf
+%attr(755,root,root) %{_bindir}/ptpd2
+%{_mandir}/man5/ptpd2.conf.5*
+%{_mandir}/man8/ptpd2.8*
+%{systemdunitdir}/ptpd2.service
+%config %{_localstatedir}/log/ptpd2_kernelclock.drift
diff --git a/ptpd2 b/ptpd2
new file mode 100644
index 0000000..b792cbb
--- /dev/null
+++ b/ptpd2
@@ -0,0 +1,10 @@
+# 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=""
+
diff --git a/ptpd2.conf b/ptpd2.conf
new file mode 100644
index 0000000..67e6db3
--- /dev/null
+++ b/ptpd2.conf
@@ -0,0 +1,62 @@
+; ==============================================================================
+; 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
+
diff --git a/ptpd2.service b/ptpd2.service
new file mode 100644
index 0000000..29f14a8
--- /dev/null
+++ b/ptpd2.service
@@ -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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ptpd.git/commitdiff/308304eefa4bee9cd2a865fdf53638b46facc795



More information about the pld-cvs-commit mailing list