## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autochangelog ## END: Set by rpmautospec # Generated by rust2rpm 27 %bcond check 1 # prevent library files from being installed %global cargo_install_lib 0 %global crate podman-sequoia %bcond pqc 1 %if 0%{?rhel} || %{with pqc} # RHEL: Use bundled deps as it doesn't ship Rust libraries %global bundled_rust_deps 1 %global __brp_mangle_shebangs_exclude_from ^/usr/src/debug/.*$ %else # Fedora: Use only system Rust libraries %global bundled_rust_deps 0 %endif %if 0%{?rhel} %bcond bundled_capnproto 1 %else %bcond bundled_capnproto 0 %endif Name: rust-podman-sequoia Version: 0.2.0 Release: %autorelease.pqc Summary: Polyfill to use Sequoia as a signing backend for containers License: Apache-2.0 URL: https://crates.io/crates/podman-sequoia Source0: %{crates_source} # Generated using cargo-vendor-filterer: # cargo download %%{crate}==%%{version} > %%{crate}-%%{version}.crate # tar xf %%{crate}-%%{version}.crate # pushd %%{crate}-%%{version} # cargo vendor-filterer --platform x86_64-unknown-linux-gnu \ # --platform powerpc64le-unknown-linux-gnu \ # --platform aarch64-unknown-linux-gnu \ # --platform i686-unknown-linux-gnu \ # --platform s390x-unknown-linux-gnu \ # --all-features=true Source1: %{name}-%{version}-vendor.tar.xz Source2: %{name}-%{version}-patches.tar.xz Source3: capnproto-c++-1.0.1.tar.gz # Manually created patch for downstream crate metadata changes # * default to the OpenSSL crypto backend of sequoia-openpgp Patch: podman-sequoia-fix-metadata.diff BuildRequires: git-core %if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: cargo-rpm-macros >= 26 %endif %if 0%{?bundled_rust_deps} # vendored openssl-sys BuildRequires: openssl-devel BuildRequires: sqlite-devel %endif BuildRequires: clang-devel >= 3.5 %if %{with bundled_capnproto} BuildRequires: gcc-c++ BuildRequires: cmake >= 3.1 %else BuildRequires: capnproto %endif %global _description %{expand: A polyfill to use Sequoia as a signing backend for containers.} %description %{_description} %package -n %{crate} Summary: %{summary} # Upstream license specification: Apache-2.0 # # The build dependencies have the following licenses: # # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # BSL-1.0 # LGPL-2.0-or-later # MIT # MIT OR Apache-2.0 # MIT OR Zlib OR Apache-2.0 # MPL-2.0 # Unicode-3.0 # Unlicense OR MIT # Zlib License: ((MIT OR Apache-2.0) AND Unicode-DFS-2016) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND BSL-1.0 AND LGPL-2.0-or-later AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND Zlib # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc README.md %{_libdir}/libpodman_sequoia.so.* %{_libdir}/libpodman_sequoia.so %{_datadir}/containers/podman-sequoia/sequoia.h %{_datadir}/containers/podman-sequoia/gosequoia.h %{_datadir}/containers/podman-sequoia/gosequoia.c %{_datadir}/containers/podman-sequoia/gosequoiafuncs.h %prep %autosetup -n %{crate}-%{version} -N %{?bundled_rust_deps:-a1} -S git %autopatch -M 99 -p1 %if 0%{?bundled_rust_deps} %cargo_prep -v vendor tar -xf %{SOURCE2} %else %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %endif %if %{with bundled_capnproto} mkdir -p bundled_capnproto pushd bundled_capnproto tar --strip-components=1 -xf %{SOURCE3} popd %endif %build %if %{with bundled_capnproto} pushd bundled_capnproto %cmake -DBUILD_TESTING=OFF %cmake_build export PATH="$PWD/%{__cmake_builddir}/src/capnp:$PATH" popd %endif # build script uses environment variables to populate the pkgconfig file export PREFIX="%{_prefix}" export LIBDIR="%{_libdir}" %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install # install shared library mkdir -p %{buildroot}/%{_libdir} cp -pav target/release/libpodman_sequoia.so %{buildroot}/%{_libdir}/libpodman_sequoia.so.0 # create unversioned symlink ln -s libpodman_sequoia.so.0 %{buildroot}/%{_libdir}/libpodman_sequoia.so # install bindings mkdir -p %{buildroot}/%{_datadir}/containers/podman-sequoia cp -pav target/release/bindings/*.[ch] %{buildroot}/%{_datadir}/containers/podman-sequoia/ %if %{with check} %check # * signature::tests::import_keys may fail on a machine with slow disk I/O %cargo_test -- -- --skip signature::tests::import_keys %endif %changelog ## START: Generated by rpmautospec * Mon Sep 01 2025 Daiki Ueno - 0.2.0-2 - Uncommitted changes * Mon Aug 25 2025 Daiki Ueno - 0.2.0-1 - Update to 0.2.0 * Tue Jul 29 2025 Daiki Ueno - 0.1.0-1 - Initial import ## END: Generated by rpmautospec