From 666866319b8ebae79b79872ae742a5f4378acfbc Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 26 May 2022 16:17:54 -0400 Subject: [PATCH] Auto sync2gitlab import of xdp-tools-1.2.1-1.el8.src.rpm --- .gitignore | 1 + EMPTY | 1 - sources | 1 + xdp-tools.spec | 163 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 EMPTY create mode 100644 sources create mode 100644 xdp-tools.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6606053 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/xdp-tools-1.2.1.tar.gz diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/sources b/sources new file mode 100644 index 0000000..4affbc3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (xdp-tools-1.2.1.tar.gz) = 8f29bfc7e07b6f417840f6735a6058a080b9f175856eb8f4541464797812bb065566b12752b75502e9abd838690895a68340eec51808183c7e2a13963fed9e5a diff --git a/xdp-tools.spec b/xdp-tools.spec new file mode 100644 index 0000000..5150514 --- /dev/null +++ b/xdp-tools.spec @@ -0,0 +1,163 @@ +Name: xdp-tools +Version: 1.2.1 +Release: 1%{?dist} +Summary: Utilities and example programs for use with XDP +%global _soversion 1.2.0 + +License: GPLv2 +URL: https://github.com/xdp-project/%{name} +Source0: https://github.com/xdp-project/%{name}/releases/download/v%{version}/xdp-tools-%{version}.tar.gz + +BuildRequires: libbpf-devel +BuildRequires: elfutils-libelf-devel +BuildRequires: zlib-devel +BuildRequires: libpcap-devel +BuildRequires: clang >= 10.0.0 +BuildRequires: llvm >= 10.0.0 +BuildRequires: make +BuildRequires: gcc +BuildRequires: pkgconfig +BuildRequires: m4 +BuildRequires: emacs-nox +BuildRequires: wireshark-cli + +# Always keep xdp-tools and libxdp packages in sync +Requires: libxdp = %{version}-%{release} + +# find-debuginfo produces empty debugsourcefiles.list +# disable the debug package to avoid rpmbuild error'ing out because of this +%global debug_package %{nil} +%global _hardened_build 1 +# strip barfs on BPF files, override it as a workaround +%global __brp_strip_lto %{_bindir}/true +%global __brp_strip %{_bindir}/true + +%description +Utilities and example programs for use with XDP + +%package -n libxdp +Summary: XDP helper library +Requires: kernel-headers +Requires: libbpf >= 0.2.0-1 + +%package -n libxdp-devel +Summary: Development files for libxdp +Requires: kernel-headers +Requires: libxdp = %{version}-%{release} + +%package -n libxdp-static +Summary: Static library files for libxdp +Requires: kernel-headers +Requires: libxdp-devel = %{version}-%{release} + +%description -n libxdp +The libxdp package contains the libxdp library for managing XDP programs, +used by the %{name} package + +%description -n libxdp-devel +The libxdp-devel package contains headers used for building XDP programs using +libxdp. + +%description -n libxdp-static +The libxdp-static package contains the static library version of libxdp. + +%prep +%autosetup -p1 -n %{name}-%{version} + + +%build +export CFLAGS='%{build_cflags}' +export LDFLAGS='%{build_ldflags}' +export LIBDIR='%{_libdir}' +export CLANG=%{_bindir}/clang +export LLC=%{_bindir}/llc +export PRODUCTION=1 +export DYNAMIC_LIBXDP=1 +export FORCE_SYSTEM_LIBBPF=1 +export FORCE_EMACS=1 +./configure +make %{?_smp_mflags} V=1 + +%install +export DESTDIR='%{buildroot}' +export SBINDIR='%{_sbindir}' +export LIBDIR='%{_libdir}' +export MANDIR='%{_mandir}' +export DATADIR='%{_datadir}' +export HDRDIR='%{_includedir}/xdp' +make install V=1 +cd $DESTDIR/$LIBDIR && ln -vs libxdp.so.%{_soversion} libxdp.so.1.0.0 +cd $DESTDIR/$LIBDIR && ln -vs libxdp.so.%{_soversion} libxdp.so.1.1.0 + +%files +%{_sbindir}/xdp-filter +%{_sbindir}/xdp-loader +%{_sbindir}/xdpdump +%{_mandir}/man8/* +%{_libdir}/bpf/xdpfilt_*.o +%{_libdir}/bpf/xdpdump_*.o +%{_libdir}/bpf/xsk_def_xdp_prog*.o +%{_datadir}/xdp-tools/ +%license LICENSES/* + +%files -n libxdp +%{_libdir}/libxdp.so.1 +%{_libdir}/libxdp.so.%{_soversion} +%{_libdir}/libxdp.so.1.0.0 +%{_libdir}/libxdp.so.1.1.0 +%{_libdir}/bpf/xdp-dispatcher.o +%{_mandir}/man3/* + +%files -n libxdp-static +%{_libdir}/libxdp.a + +%files -n libxdp-devel +%{_includedir}/xdp/*.h +%{_libdir}/libxdp.so +%{_libdir}/pkgconfig/libxdp.pc + +%changelog +* Thu Jan 13 2022 Toke Høiland-Jørgensen 1.2.1-1 +- Upstream version bump + +* Wed Jul 7 2021 Toke Høiland-Jørgensen 1.2.0-1 +- Upstream version bump + +* Wed Feb 10 2021 Toke Høiland-Jørgensen 1.1.1-2 +- Fix depedency and patch two issues fixed upstream + +* Wed Feb 3 2021 Toke Høiland-Jørgensen 1.1.1-1 +- Upstream version bump + +* Mon Jan 4 2021 Toke Høiland-Jørgensen 1.1.0-1 +- Upstream version bump + +* Thu Aug 20 2020 Toke Høiland-Jørgensen 1.0.1-1 +- Upstream version bump + +* Tue Aug 18 2020 Toke Høiland-Jørgensen 1.0.0-1 +- Upstream version bump + +* Wed Jul 15 2020 Eelco Chaudron 1.0.0~beta3-0.1 +- Upstream version bump + +* Fri Jul 10 2020 Toke Høiland-Jørgensen 1.0.0~beta2-0.1 +- Upstream version bump + +* Mon Jun 15 2020 Toke Høiland-Jørgensen 1.0.0~beta1-0.1 +- Upstream version bump + +* Tue May 12 2020 Toke Høiland-Jørgensen 0.0.3-3 +- Add CI gating config file + +* Mon May 11 2020 Toke Høiland-Jørgensen 0.0.3-2 +- Fix build error due to missing _GNU_SOURCE define + +* Mon Apr 6 2020 Toke Høiland-Jørgensen 0.0.3-1 +- Upstream update, add libxdp sub-packages + +* Thu Nov 21 2019 Toke Høiland-Jørgensen 0.0.2-1 +- Upstream update + +* Fri Nov 8 2019 Toke Høiland-Jørgensen 0.0.1-1 +- Initial release