summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-25 05:18:43 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-25 05:18:43 +0000
commited4aeb1fc2ed05554207f2ecac468b3e697cd999 (patch)
tree5f7e5a9849fd3d8dafe26a3c6e3826e140c48ab4
parent653624e0658893ac6af5562089d30abce27c757d (diff)
automatic import of xdp-toolsopeneuler22.03_LTS_SP2
-rw-r--r--.gitignore1
-rw-r--r--sources1
-rw-r--r--xdp-tools.spec129
3 files changed, 131 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..14f7e8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/v1.0.1.tar.gz
diff --git a/sources b/sources
new file mode 100644
index 0000000..d279068
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+aeb2fd6e9c49f3be7336b358841006b0 v1.0.1.tar.gz
diff --git a/xdp-tools.spec b/xdp-tools.spec
new file mode 100644
index 0000000..3619a90
--- /dev/null
+++ b/xdp-tools.spec
@@ -0,0 +1,129 @@
+# since strip in binutils fails to strip bpf objects in this package
+# use eu-strip of elfutils instead
+%global __strip /usr/bin/eu-strip
+# eu-strip cannot strip static libs
+# use strip for static libs
+%global __brp_strip_static_archive %{_rpmconfigdir}/brp-strip-static-archive /usr/bin/strip
+
+Name: xdp-tools
+Version: 1.0.1
+Release: 3
+Summary: Utilities and example programs for use with XDP
+%global _soversion 1.0.0
+
+License: GPLv2
+URL: https://github.com/xdp-project/%{name}
+Source0: https://github.com/xdp-project/%{name}/archive/v%{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
+BuildRequires: elfutils
+
+# 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
+
+%description
+Utilities and example programs for use with XDP
+
+%package -n libxdp
+Summary: XDP helper library
+Requires: kernel-headers
+
+%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
+
+%files
+%{_sbindir}/xdp-filter
+%{_sbindir}/xdp-loader
+%{_sbindir}/xdpdump
+%{_mandir}/man8/*
+%{_libdir}/bpf/xdpfilt_*.o
+%{_libdir}/bpf/xdpdump_*.o
+%{_datadir}/xdp-tools/
+%license LICENSE
+
+%files -n libxdp
+%{_libdir}/libxdp.so.1
+%{_libdir}/libxdp.so.%{_soversion}
+%{_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
+* Mon Oct 10 2022 LemmyHuang <huangliming5@huawei.com> 1.0.1-3
+- correct release number format
+
+* Wed Apr 20 2022 Di Wang <wangdi@kylinos.cn> 1.0.1-2
+- workaround for stripping failure of bpf objects by binutils
+
+* Fri Sep 10 2021 Pengju Jiang <jiangpengju2@huawei.com> 1.0.1-1
+- solve the strip problem of dark conversion compilation
+
+* Tue Oct 20 2020 Hubble Zhu <hubble_zhu@qq.com> 1.0.1-0
+- Initial package