Skip to content

%exclude (as used in the %files section of spec files) is not documented #3693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fweimer-rh opened this issue Mar 28, 2025 · 1 comment
Open

Comments

@fweimer-rh
Copy link

In glibc.spec, we have considerable scripting logic to distribute files among subpackages, see split_sysroot_file_list. It's way less involved than it used to be, but with the right %exclude semantics, we could make this much clearer.

I see that #994 criticizes the current behavior. And indeed it would be more general if some sequence of directives could add files matching a few patterns to one subpackage file list, then remove some files matching different patterns, and then add back a few exceptions that were removed before. With the current unordered %exclude, that is not possible. And without documentation, we don't really know if the current behavior is deemed permanent.

@dmnks
Copy link
Contributor

dmnks commented Apr 1, 2025

The present %exclude semantics isn't ideal, indeed, and there are plans to change that in the future (#994) so documenting the status quo probably wouldn't make much sense and would make changes to it more complicated and/or risky.

Either way, could you please give a concrete (simplified) example of what semantics you'd like it to have? A random trivial example that comes to mind is (based on your description):

[...]

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
touch $RPM_BUILD_ROOT/usr/bin/foo{1,2,3}

%files
/usr/bin
%exclude /usr/bin/foo{2,3}

%files foobar
/usr/bin/foo2

But that already works as expected (i.e. main package owning foo1 and foobar subpackage owning foo2).

@dmnks dmnks added this to RPM Apr 15, 2025
@github-project-automation github-project-automation bot moved this to Backlog in RPM Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants