[package] cargo-toml-patch-comments = [ "Add cdylib compilation target", "Update open-enum dependency to version available in Fedora", ] description = """\ libpathrs implements a set of C-friendly APIs (written in Rust) to make path resolution within a potentially-untrusted directory safe on GNU/Linux. There are countless examples of security vulnerabilities caused by bad handling of paths (symlinks make the issue significantly worse).""" suppress-cdylib-install-fixme = true cargo-install-lib = false bin-package-name = "libpathrs" license-files.exclude = [ "contrib/**/COPYING", "go-pathrs/COPYING", ] extra-files = [ "%{_libdir}/libpathrs.so.0{,.*}", ] package-extra = """\ %package -n libpathrs-devel Summary: %{summary} Requires: libpathrs%{?_isa} = %{version}-%{release} %description -n libpathrs-devel %{_description} This subpackage provides the development headers for libpathrs. %files -n libpathrs-devel %dir %{_includedir}/pathrs %{_includedir}/pathrs/pathrs.h %{_libdir}/libpathrs.so %{_libdir}/pkgconfig/pathrs.pc """ [features] enable-all = true [requires] build = ["cargo-c"] [scripts] build.post = [ "%cargo_cbuild -a", ] install.post = [ "%cargo_cinstall -a", "# remove static library", "# https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries", "rm '%{buildroot}%{_libdir}/libpathrs.a'", ] [tests] skip = [ "tests::test_procfs::procfs_overmounts", "tests::test_resolve::root_resolve_complete_file_link_opath", "tests::test_resolve::root_resolve_complete_root_link", "tests::test_resolve::root_resolve_dangling1_inroot_partial_dotdot_opath", ] comments = ["TODO: document why these tests are skipped"]