# Generated by rust2rpm 25 %bcond_without check %global gitdate 20240515 %global commit 8b253cf5442b173d9a789b8ee25eb2ba0efcb93a %global shortcommit 8b253cf5 Name: bpfman Version: 0.4.1 Release: %autorelease -p -s %{gitdate}git%{shortcommit} Summary: EBPF Program Manager SourceLicense: Apache-2.0 License: Apache-2.0 # LICENSE.dependencies contains a full license breakdown URL: https://bpfman.io Source: https://github.com/bpfman/bpfman/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # To create the vendor tarball, extract Source0 and run rust2rpm wiht correct params: # rust2rpm -V bpfman/bpfman/ 0.4.1 && mv bpfman/bpfman-0.4.1-vendor.tar.xz bpfman/bpfman-0.4.1-vendor-8b253cf5.tar.xz #Source: bpfman-0.4.1-vendor-%%{shortcommit}.tar.xz # Uploading vendor tarball to public server for review process, the tarball should be uploaded using fedpkg new-sources Source: https://dmellado.fedorapeople.org/bpfman/bpfman-0.4.1-vendor-%{shortcommit}.tar.xz BuildRequires: cargo-rpm-macros >= 25 BuildRequires: systemd-rpm-macros BuildRequires: openssl-devel BuildRequires: pkgconfig(zlib) BuildRequires: gcc %global _description %{expand: bpfman operates as an eBPF manager, focusing on simplifying the deployment and administration of eBPF programs.} %description %{_description} %prep %autosetup -n bpfman-%{commit} -p1 -a1 %cargo_prep -v vendor %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install install -Dpm 0755 \ -t %{buildroot}%{_sbindir} \ ./target/release/bpfman install -Dpm 0755 \ -t %{buildroot}%{_sbindir} \ ./target/release/bpfman-ns install -Dpm 0755 \ -t %{buildroot}%{_sbindir} \ ./target/release/bpfman-rpc install -Dpm 644 \ -t %{buildroot}%{_unitdir} \ ./scripts/bpfman.socket install -Dpm 644 \ -t %{buildroot}%{_unitdir} \ ./scripts/bpfman.service %post %systemd_post bpfman.service %preun %systemd_preun bpfman.service %postun %systemd_postun_with_restart bpfman.service %files %license LICENSE-APACHE %license LICENSE.dependencies %license cargo-vendor.txt %doc README.md %{_sbindir}/bpfman %{_sbindir}/bpfman-ns %{_sbindir}/bpfman-rpc %{_unitdir}/bpfman.socket %{_unitdir}/bpfman.service %if %{with check} %check # Skip image_pull_* tests as require Internet to pull images from a registry %cargo_test -- -- --skip oci_utils::image_manager::tests::image_pull_failure --skip oci_utils::image_manager::tests::image_pull_and_bytecode_verify --skip oci_utils::image_manager::tests::private_image_pull_and_bytecode_verify --skip oci_utils::image_manager::tests::image_pull_policy_never_failure %endif %changelog %autochangelog