Skip to content
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

Add generator for rpm Requires/Recommends #39

Merged
merged 3 commits into from
Jul 24, 2024
Merged

Conversation

keszybz
Copy link
Member

@keszybz keszybz commented Jul 24, 2024

No description provided.

In preparation for future changes where additional state will
be necessary.
This can be used to insert the appropriate deps into the spec file:
$ ./dlopen-notes.py .../libsystemd-shared-256.so --rpm-requires zstd,qrencode --rpm-recommends tpm
Requires: libqrencode.so.4()(64bit)
Requires: libzstd.so.1()(64bit)
Recommends: libtss2-esys.so.0()(64bit)
Recommends: libtss2-rc.so.0()(64bit)
Recommends: libtss2-mu.so.0()(64bit)

Most likely, it needs to be used manually. Rpm doesn't really have a
notion of dynamically generated deps at the package level :(

(There is the fileattr mechanism,
https://rpm-software-management.github.io/rpm/manual/dependency_generators.html,
but that is per-file. It has the shortcoming that it assumes that the
generated deps depend only on the file itself, and not the subpackage that the
file lands in, and there is no notion of package configuration. We _could_ use
that, but it seems a poor fit.

Also, before rpm 4.20, fileattr generators could not be provided by the
package being built, they needed to be installed in the filesystem. I don't
think we're at the point where it makes sense to make this "global".

4.15 added %generate_buildrequires. Obviously that only works for
BuildRequires. Also, the mechanism with generating src.rpms in a loop is
rather convoluted and heavyweight.)

I'll open an RFE in rpm. For now, the generator can be used manually in
systemd. That is still nicer than the previous method of looking at the
sources.
@bluca bluca merged commit dc5d12d into systemd:main Jul 24, 2024
1 check passed
@keszybz keszybz deleted the rpm-requires branch July 24, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants