Enable Unix, ACL, SELinux and systemd-logind features

- Declare licenses for the uutils-coreutils binary package

Signed-off-by: Michel Lind <salimma@fedoraproject.org>
This commit is contained in:
salimma 2026-03-30 10:15:27 +01:00
commit 07ea7d1860
No known key found for this signature in database
GPG key ID: 8B229D2F7CCC04F2
3 changed files with 62 additions and 10 deletions

View file

@ -1,5 +1,5 @@
--- coreutils-0.7.0/Cargo.toml 2006-07-24T01:21:28+00:00
+++ coreutils-0.7.0/Cargo.toml 2026-03-19T00:37:33.825177+00:00
+++ coreutils-0.7.0/Cargo.toml 2026-03-29T20:06:38.194812+00:00
@@ -39,6 +39,7 @@
[package.metadata.docs.rs]
all-features = true

View file

@ -26,6 +26,7 @@ Patch: coreutils-fix-metadata.diff
ExcludeArch: %{ix86}
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: systemd-devel
%global _description %{expand:
coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust.}
@ -34,8 +35,45 @@ coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) u
%package -n uutils-coreutils
Summary: %{summary}
# FIXME: paste output of %%cargo_license_summary here
License: # FIXME
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# (MIT OR Apache-2.0) AND Zlib
# 0BSD OR MIT OR Apache-2.0
# Apache-2.0
# Apache-2.0 OR Apache-2.0 WITH LLVM-exception
# Apache-2.0 OR GPL-2.0-only
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-2-Clause
# BSD-2-Clause OR Apache-2.0 OR MIT
# BSD-3-Clause
# CC0-1.0
# ISC
# MIT
# MIT OR Apache-2.0
# MIT OR Zlib OR Apache-2.0
# MIT-0 OR Apache-2.0
# Unicode-3.0
# Unlicense OR MIT
# Zlib
License: %{shrink:
(MIT OR Apache-2.0) AND Unicode-DFS-2016 AND
Zlib AND
(0BSD OR MIT OR Apache-2.0) AND
Apache-2.0 AND
(Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND
(Apache-2.0 OR GPL-2.0-only) AND
(Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND
BSD-2-Clause AND
(BSD-2-Clause OR Apache-2.0 OR MIT) AND
BSD-3-Clause AND
CC0-1.0 AND
ISC AND
MIT AND
(MIT OR Zlib OR Apache-2.0) AND
(MIT-0 OR Apache-2.0) AND
Unicode-3.0 AND
(Unlicense OR MIT)
}
# LICENSE.dependencies contains a full license breakdown
%description -n uutils-coreutils %{_description}
@ -1760,12 +1798,12 @@ use the "yes" feature of the "%{crate}" crate.
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires -f uudoc
%cargo_generate_buildrequires -f feat_acl,feat_os_unix,feat_selinux,feat_systemd_logind,uudoc
%build
%cargo_build -f uudoc
%{cargo_license_summary -f uudoc}
%{cargo_license -f uudoc} > LICENSE.dependencies
%cargo_build -f feat_acl,feat_os_unix,feat_selinux,feat_systemd_logind,uudoc
%{cargo_license_summary -f feat_acl,feat_os_unix,feat_selinux,feat_systemd_logind,uudoc}
%{cargo_license -f feat_acl,feat_os_unix,feat_selinux,feat_systemd_logind,uudoc} > LICENSE.dependencies
mkdir -p data/man/man1
mkdir -p data/completions/{bash,fish,zsh}
@ -1784,7 +1822,7 @@ target/release/uudoc completion coreutils fish > data/completions/fish/uutils-co
%install
%cargo_install -f uudoc
%cargo_install -f feat_acl,feat_os_unix,feat_selinux,feat_systemd_logind,uudoc
mv %{buildroot}/%{_bindir}/coreutils %{buildroot}/%{_bindir}/uutils-coreutils
for utility in $(target/rpm/coreutils --list); do
ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_bindir}/uu_$utility
@ -1815,12 +1853,13 @@ rm %{buildroot}%{_bindir}/uudoc
# * test_df: needs an actual filesystem to test
# * test_du: expected sublink/symlink in output
# * test_ls: need block/char device
# * test_od: s390x failures, see https://github.com/uutils/coreutils/issues/9017#issuecomment-4148721220
# * test_od: s390x failures, see
# https://github.com/uutils/coreutils/issues/9017#issuecomment-4148721220
# * test_seq: tolerances too tight
# * test_sort: formatting differences with recent unicode-width versions
# * uudoc: missing test fixture
# * various color and localization tests
%{cargo_test -f uudoc -- -- %{shrink:
%{cargo_test -f feat_acl,feat_os_unix,feat_selinux,feat_systemd_logind,uudoc -- -- %{shrink:
--skip common::util::tests::test_compare_xattrs
--skip test_chcon::
--skip test_runcon::

View file

@ -24,6 +24,19 @@ extra-files = [
[package.bin-renames]
coreutils = "uutils-coreutils"
[features]
enable = [
"feat_os_unix",
"feat_acl",
"feat_selinux",
"feat_systemd_logind",
]
[requires]
build = [
"systemd-devel",
]
[scripts]
build.post = ["""\
mkdir -p data/man/man1