From 84ac358cb939bf3074a3ba2f5f7cd148946ae03c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 28 2023 13:17:00 +0000 Subject: import synce4l-0-4.20221122git9564b5.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b18641 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/synce4l-9564b5.tar.gz diff --git a/.synce4l.metadata b/.synce4l.metadata new file mode 100644 index 0000000..6ecd379 --- /dev/null +++ b/.synce4l.metadata @@ -0,0 +1 @@ +0ac4868f7b3121b7f8cb58ef5560c4b807a36edd SOURCES/synce4l-9564b5.tar.gz diff --git a/SOURCES/synce4l.conf b/SOURCES/synce4l.conf new file mode 100644 index 0000000..1d20f62 --- /dev/null +++ b/SOURCES/synce4l.conf @@ -0,0 +1,27 @@ +[global] +logging_level 6 +use_syslog 1 +verbose 0 +message_tag [synce4l] + +[] +input_mode line +network_option 1 +external_input_QL 11 +external_input_ext_QL 33 +extended_tlv 1 +recover_time 20 +eec_get_state_cmd cat /sys/class/net/eth0/device/cgu_state +eec_holdover_value 4 +eec_locked_ho_value 3 +eec_locked_value 2 +eec_freerun_value 1 +eec_invalid_value 0 + +[eth0] +tx_heartbeat_msec 1000 +rx_heartbeat_msec 500 +recover_clock_enable_cmd echo 1 0 > /sys/class/net/eth0/device/phy/synce +recover_clock_disable_cmd echo 0 0 > /sys/class/net/eth0/device/phy/synce +allowed_qls 3,4,7 +allowed_ext_qls 20,21 diff --git a/SOURCES/synce4l.service b/SOURCES/synce4l.service new file mode 100644 index 0000000..9093e9b --- /dev/null +++ b/SOURCES/synce4l.service @@ -0,0 +1,9 @@ +[Unit] +Description=Synchronous Ethernet (SyncE) service + +[Service] +Type=simple +ExecStart=/usr/sbin/synce4l -f /etc/synce4l.conf + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/synce4l.spec b/SPECS/synce4l.spec new file mode 100644 index 0000000..5d13e7d --- /dev/null +++ b/SPECS/synce4l.spec @@ -0,0 +1,78 @@ +%global gitver 9564b5589d72ed3571a1f2130204aea60683bd78 +%global gitrel %(c=%{gitver}; echo ${c:0:6}) +%global gitdate 20221122 + +Name: synce4l +Version: 0 +Release: 4.%{gitdate}git%{gitrel}%{?dist} +Summary: SyncE implementation for Linux + +License: GPL-2.0-or-later +URL: https://github.com/intel/synce4l +Source0: https://github.com/intel/synce4l/archive/%{gitrel}/synce4l-%{gitrel}.tar.gz +Source1: synce4l.service +Source2: synce4l.conf + +BuildRequires: gcc make systemd + +%{?systemd_requires} + +%description +synce4l is a software implementation of Synchronous Ethernet (SyncE) according +to ITU-T Recommendation G.8264. The design goal is to provide logic to +supported hardware by processing Ethernet Synchronization Messaging Channel +(ESMC) and control Ethernet Equipment Clock (EEC) on Network Card Interface +(NIC). + +%prep +%setup -q -n synce4l-%{gitver} + +%build +%{make_build} \ + EXTRA_CFLAGS="$RPM_OPT_FLAGS" \ + EXTRA_LDFLAGS="$RPM_LD_FLAGS" + +%install +# make_install doesn't work here +%makeinstall + +mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir},%{_unitdir},%{_mandir}/man5} +install -m 644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir} +install -m 644 -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir} + +echo '.so man8/synce4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/synce4l.conf.5 + +%check +./synce4l -h 2>&1 | grep 'usage:.*synce4l' + +%post +%systemd_post synce4l.service + +%preun +%systemd_preun synce4l.service + +%postun +%systemd_postun_with_restart synce4l.service + +%files +%license COPYING +%doc README.md +%config(noreplace) %{_sysconfdir}/synce4l.conf +%{_unitdir}/synce4l.service +%{_sbindir}/synce4l +%{_mandir}/man5/*.5* +%{_mandir}/man8/*.8* + +%changelog +* Tue Jan 03 2023 Miroslav Lichvar 0-4.20221122git9564b5 +- update to 20221122git9564b5 (#2019751) + +* Wed Nov 16 2022 Miroslav Lichvar 0-3.20221114gitca51d5 +- update to 20221114gitca51d5 (#2141038) + +* Thu Nov 10 2022 Miroslav Lichvar 0-2.20221108git079577 +- fix compiler warning (#2141038) +- add simple test (#2141038) + +* Tue Nov 08 2022 Miroslav Lichvar 0-1.20221108git079577 +- make initial release