## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.6.0 %bcond_without check # https://github.com/facebook/time %global goipath github.com/facebook/time %global date 20240423 %global commit b998b76a58ff90ac65016d7b2f2f01dd51fd534e %global shortcommit %(c=%{commit}; echo ${c:0:7}) Version: 0^%{date}git%{shortcommit} %gometa # un-fsck the release tag %undefine distprefix %global common_description %{expand: Meta's Time libraries.} %global golicenses LICENSE %global godocs CODE_OF_CONDUCT.md CONTRIBUTING.md README.md Name: %{goname} Release: %autorelease Summary: Meta's Time libraries License: Apache-2.0 URL: %{gourl} Source0: %{gosource} # ensure we are building with the fix for CVE-2023-39325 included BuildRequires: golang-x-net-devel >= 0.17.0 %description %{common_description} %package -n calnex Summary: CLI for a Calnex Sentinel device %description -n calnex - calnex CLI supports several basic commands such as: - Firmware upgrade - Configuration of the device - Measurement data export - Device reboot - Device clear - Device problem report export %package -n ntpcheck Summary: CLI to perform various NTP-related tasks %description -n ntpcheck ntpcheck is a CLI to perform various NTP-related tasks: - replacement for ntptime and ntpdate commands - human-readable diagnostics for typical problems with NTP based on data from chrony/ntpd - server stats and peer stats taken from chrony/ntpd with output in JSON %package -n ntpresponder Summary: Simple NTP server implementation with kernel timestamps support Provides: responder = %{version}-%{release} Obsoletes: responder < 0-0.6 %description -n ntpresponder ntpresponder is a simple NTP server implementation with kernel timestamps support, designed for scale and security. %package -n pshark Summary: Simple tool to print PTP packets from pcap/pcapng captures %description -n pshark pshark is a simple tool to read pcap/pcapng captures and parse and print PTP packets from there. Allows to test our protocol parser implementation against arbitrary tcpdump capture. Also the code shows integration with GoPacket library. %package -n ptpcheck Summary: CLI to perform various PTP-related tasks %description -n ptpcheck CLI and library to perform various PTP-related tasks, including: - reporting stats taken from local PTP instance in JSON format - running basic unicast client to showcase or debug PTP protocol internals - running human-readable diagnostics for basic problems with PTP based on data from local PTP client (ptp4l) - comparing system time with PHC time - mapping PHC devices to network cards and vice versa - sync 2 PHCs %package -n ptp4u Summary: Scalable unicast PTP server supporting PTP and SPTP %description -n ptp4u ptp4u is a scalable unicast PTP server supporting PTP and SPTP. %package -n sptp Summary: Scalable unicast SPTP client. %description -n sptp sptp is a scalable unicast SPTP client. %package -n ziffy Summary: CLI tool to triangulate switches that are not operating correctly as PTP Transparent Clocks. %description -n ziffy CLI tool to triangulate datacenter switches that are not operating correctly as PTP Transparent Clocks. Ziffy sends PTP SYNC/DELAY_REQ packets between two hosts to get data about the topology. It supports sending packets from a range of source ports to encourage hashing of traffic over multiple paths. In case the hashing is done using only destination IP and source IP, Ziffy can target multiple IPs in the same /64 prefix as the destination. %gopkg %prep %goprep %generate_buildrequires %go_generate_buildrequires %build for cmd in calnex c4u ntpcheck ntpresponder pshark ptpcheck ptp4u sptp ziffy; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/cmd/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check # Disable test that requires network access rm calnex/verify/checks/checks_test.go rm ntp/responder/server/server_test.go # https://github.com/facebook/time/issues/100 %ifarch s390x rm timestamp/timestamp_linux_test.go %endif %gocheck %endif %files -n calnex %license LICENSE %doc calnex/README.md %{_bindir}/calnex %files -n ntpcheck %license LICENSE %doc README.md %{_bindir}/ntpcheck %files -n ntpresponder %license LICENSE %doc README.md %{_bindir}/ntpresponder %files -n pshark %license LICENSE %doc README.md %{_bindir}/pshark %files -n ptpcheck %license LICENSE %doc README.md %{_bindir}/ptpcheck %files -n ptp4u %license LICENSE %doc ptp/ptp4u/README.md %{_bindir}/ptp4u %{_bindir}/c4u %files -n sptp %license LICENSE %doc ptp/sptp/README.md %{_bindir}/sptp %files -n ziffy %license LICENSE %doc cmd/ziffy/README.md %{_bindir}/ziffy %gopkgfiles %changelog ## START: Generated by rpmautospec * Tue Apr 23 2024 Oleg Obleukhov - 0^20240423gitb998b76-2 - Update README.md * Tue Apr 23 2024 Oleg Obleukhov - 0^20240423gitb998b76-1 - Hardware timestamps support in ntp responder * Mon Apr 22 2024 Oleg Obleukhov - 0^20240422gite4f24e1-3 - Update README.md * Mon Apr 22 2024 Oleg Obleukhov - 0^20240422gite4f24e1-2 - Update README.md * Mon Apr 22 2024 Oleg Obleukhov - 0^20240422gite4f24e1-1 - Rebuild latest * Sun Feb 11 2024 Maxwell G - 0^20240118git2f194ba-3 - Rebuild for golang 1.22.0 * Wed Jan 24 2024 Fedora Release Engineering - 0^20240118git2f194ba-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Michel Lind - 0^20240118git2f194ba-1 - Update to snapshot from 20240118 - Disable new test that requires network access (from PR#319) * Wed Jan 10 2024 Michel Lind - 0^20240110git1649917-1 - Allow setting custom API timeouts (PR#318) - Enforce we are building against golang.org/x/net >= 0.17.0 for CVE-2023-39325 - Use SPDX license identifier - Backfill correct release tags in the changelog * Wed Jan 10 2024 Oleg Obleukhov - 0-0.16.20240110gitd1456d1 - Rebuild latest to include Calnex changes such as sptp and --save * Fri Oct 6 2023 Oleg Obleukhov - 0-0.15.20231006git599359b - Rebuild latest * Wed Oct 4 2023 Oleg Obleukhov - 0-0.14.20231004gite5c45cf - Add sptp package build and rebase on new commit * Thu Jul 20 2023 Fedora Release Engineering - 0-0.13.20220615git8413c32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jan 19 2023 Fedora Release Engineering - 0-0.12.20220615git8413c32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Aug 10 2022 Maxwell G - 0-0.11.20220615git8413c32 - Rebuild to fix FTBFS * Thu Jul 21 2022 Fedora Release Engineering - 0-0.10.20220615git8413c32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 19 2022 Maxwell G - 0-0.9.20220615git8413c32 - Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in golang * Wed Jun 15 2022 Alexander Bulimov - 0-0.8.20220615git8413c32 - Update shanpshot to 8413c32 - Added c4u binary to ptp4u package * Fri Mar 04 2022 Davide Cavalca - 0-0.7.20220304git3c26ea4 - Ensure version is set before gometa * Fri Mar 04 2022 Davide Cavalca - 0-0.6.20220304git3c26ea4 - Update snapshot to 3c26ea4 - Re-run go2rpm - Disable broken tests * Fri Jan 14 2022 Alexander Bulimov - 0-0.5.20220113git83c4193 - Initial package ## END: Generated by rpmautospec