## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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.18.0 %bcond check 1 # https://github.com/facebook/time %global goipath github.com/facebook/time %global date 20251021 %global commit e9709449e79640824d668ec278f89e490df48bf5 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %gometa -L -f # un-fsck the release tag # gometa is opinionated about where to put the snapshot info # it put them in release, while the versioning guidelines actually # prefers putting it in version %undefine distprefix %global common_description %{expand: Meta's Time libraries.} Name: golang-github-facebook-time Version: 0^%{date}git%{shortcommit} Release: %autorelease Summary: Meta's Time libraries # Generated by go-vendor-tools License: Apache-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools BuildRequires: libpcap-devel %description %{common_description} %package vendor-licenses Summary: License files for Meta Time tools' dependencies BuildArch: noarch %description vendor-licenses %{common_description} This package contains the license files that ship with the third-party Go modules used to build Meta's Time utilities. %package -n calnex Summary: CLI for a Calnex Sentinel device Requires: %{name}-vendor-licenses = %{version}-%{release} %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 Requires: %{name}-vendor-licenses = %{version}-%{release} %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 Requires: %{name}-vendor-licenses = %{version}-%{release} 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 Requires: %{name}-vendor-licenses = %{version}-%{release} %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 Requires: %{name}-vendor-licenses = %{version}-%{release} %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 Requires: %{name}-vendor-licenses = %{version}-%{release} %description -n ptp4u ptp4u is a scalable unicast PTP server supporting PTP and SPTP. %package -n sptp Summary: Scalable unicast SPTP client. Requires: %{name}-vendor-licenses = %{version}-%{release} %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. Requires: %{name}-vendor-licenses = %{version}-%{release} %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. %package -n fbclock Summary: Fbclock daemon to calculate and publish WOU values Requires: %{name}-vendor-licenses = %{version}-%{release} %description -n fbclock Fbclock is used to calculate and publish Window of Uncertainty values in shared memory accessible via fbclock-bin or C API %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build # fbclock-bin / C projects cd cmd/fbclock-bin %make_build mv fbclock-bin %{gobuilddir}/bin/fbclock-bin cd - %global gomodulesmode GO111MODULE=on for cmd in calnex c4u ntpcheck ntpresponder pshark ptpcheck ptp4u sptp ziffy fbclock-daemon; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/cmd/$cmd done %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} %ifarch s390x # --- FAIL: TestScmDataToSeqID (0.00s) # timestamp_linux_test.go:385: # Error Trace: /builddir/build/BUILD/golang-github-facebook-time-0_20251021gite970944-build/time-e9709449e79640824d668ec278f89e490df48bf5/timestamp/timestamp_linux_test.go:385 # Error: Received unexpected error: # Expected ENOMSG but got errno 704643072 # Test: TestScmDataToSeqID # --- FAIL: TestScmDataToSeqIDErrornoNotENOMSG (0.00s) # timestamp_linux_test.go:397: # Error Trace: /builddir/build/BUILD/golang-github-facebook-time-0_20251021gite970944-build/time-e9709449e79640824d668ec278f89e490df48bf5/timestamp/timestamp_linux_test.go:397 # Error: Error "Expected ENOMSG but got errno 637534208" does not contain "Expected ENOMSG but got function not implemented" # Test: TestScmDataToSeqIDErrornoNotENOMSG # FAIL # FAIL github.com/facebook/time/timestamp 0.170s rm -f timestamp/timestamp_linux_test.go %endif %gotest ./... %endif %files -f %{go_vendor_license_filelist} vendor-licenses %license vendor/modules.txt %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 %files -n fbclock %license LICENSE %doc fbclock/README.md %{_bindir}/fbclock-daemon %{_bindir}/fbclock-bin %changelog ## START: Generated by rpmautospec * Fri Oct 24 2025 Michel Lind - 0^20251021gite970944-1 - Update to latest snapshot - Switch to vendored dependencies to simplify building on EPEL * Mon Oct 20 2025 Oleg Obleukhov - 0^20251020git7e12848-1 - Build latest * Fri Oct 17 2025 Oleg Obleukhov - 0^20251017git54b50e6-1 - Build latest * Fri Oct 10 2025 Maxwell G - 0^20250321gita7c4fe1-4 - Rebuild for golang 1.25.2 * Fri Aug 15 2025 Maxwell G - 0^20250321gita7c4fe1-3 - Rebuild for golang-1.25.0 * Wed Jul 23 2025 Fedora Release Engineering - 0^20250321gita7c4fe1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Fri Mar 21 2025 Oleg Obleukhov - 0^20250321gita7c4fe1-1 - Use make_build * Fri Mar 21 2025 Oleg Obleukhov - 0^20250321git78a4cc8-1 - [fbclock] build fbclock-bin * Fri Mar 14 2025 Oleg Obleukhov - 0^20250314git532afb3-1 - Fix spec version * Fri Mar 14 2025 Oleg Obleukhov - 0^20250311git532afb3-3 - Rename fbclock-daemon to fbclock * Wed Mar 12 2025 Oleg Obleukhov - 0^20250311git532afb3-2 - RPMAUTOSPEC: unresolvable merge ## END: Generated by rpmautospec