-
Notifications
You must be signed in to change notification settings - Fork 12
Add rpm fileattr generator for dlopen-notes #53
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # SPDX-License-Identifier: MIT-0 | ||
| # | ||
| # This file is part of the package-notes package. | ||
|
|
||
| Name: fakelib | ||
| Version: 0 | ||
| Release: %autorelease | ||
| Summary: %{name} | ||
|
|
||
| License: None | ||
|
|
||
| %define __dlopen_notes_requires_opts --rpm-features=fakelib:gcrypt,fakelib:lz4 | ||
| %define __dlopen_notes_recommends_opts --rpm-features=*:zstd | ||
| %define __dlopen_notes_suggests_opts --rpm-features=fakelib:lzm[abc] | ||
|
|
||
| #undefine _dlopen_notes_generator | ||
|
|
||
| %description | ||
| %{summary}. | ||
|
|
||
| %prep | ||
|
|
||
| %build | ||
|
|
||
| %install | ||
| install -Dt %{buildroot}/usr/lib64/ /usr/lib64/libsystemd.so.0 | ||
| ln -s libsystemd.so.0 %{buildroot}/usr/lib64/libsystemd.so | ||
| install -Dt %{buildroot}/usr/lib64/ /usr/lib64/libmvec.so.1 | ||
|
|
||
| %files | ||
| /usr/lib64/libsystemd.so.0 | ||
| /usr/lib64/libsystemd.so | ||
| /usr/lib64/libmvec.so.1 | ||
|
|
||
| %changelog | ||
| %autochangelog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # SPDX-License-Identifier: MIT-0 | ||
| # | ||
| # This file is part of the package-notes package. | ||
| # | ||
| # | ||
| # The spec file for a package can specify which features are listed | ||
| # and at which level, using | ||
| # '--rpm-features=SUBPACKAGE1:FEATURE1,SUBPACKAGE2:FEATURE2' option in | ||
| # the '__dlopen_notes_TYPE_opts' macro, where TYPE is one of | ||
| # 'requires', 'recommends', or 'suggests'. The macro should be declared | ||
| # in the spec file using: | ||
| # %define __dlopen_notes_TYPE_opts SUBPACKAGE:FEATURE… | ||
| # e.g. | ||
| # %define __dlopen_notes_recommends_opts *:zstd | ||
| # | ||
| # The option accepts multiple comma-separated pairs, and can also be | ||
| # specified multiple times. Both the subpackage name and feature name | ||
| # can be a glob. If configuration is omitted, the priority recommended | ||
| # in the notes is used. | ||
| # | ||
| # The '--subpackage=SUBPACKAGE' option (inserted below) tells the generator | ||
| # which subpackage is being processed. | ||
| # | ||
| # For example, for a package using compression libraries, we can say | ||
| # that the 'package-libs' subpackage shall carry 'Requires' on all the | ||
| # libraries needed for the 'zstd' feature, all subpackages shall carry | ||
| # 'Recommends' on all the libraries needed for the 'gzip' feature, and | ||
| # the 'package' subpackage shall carry 'Suggests' for any feature | ||
| # matching 'lzma' or 'bzip*'. | ||
| # | ||
| # %define __dlopen_notes_requires_opts --rpm-features=package-libs:zstd | ||
| # %define __dlopen_notes_recommends_opts --rpm-features=*:gzip | ||
| # %define __dlopen_notes_suggests_opts --rpm-features=package:lzma,package:bzip* | ||
| # | ||
| # To opt out, undefine the %_dlopen_notes_generator macro: | ||
| # %undefine _dlopen_notes_generator | ||
|
|
||
| %_dlopen_notes_generator %{_bindir}/dlopen-notes | ||
|
|
||
| %__dlopen_notes_requires %{!?_dlopen_notes_generator:true }%{_dlopen_notes_generator} --subpackage='%{name}' --rpm-fileattr=Requires | ||
| %__dlopen_notes_recommends %{!?_dlopen_notes_generator:true }%{_dlopen_notes_generator} --subpackage='%{name}' --rpm-fileattr=Recommends | ||
| %__dlopen_notes_suggests %{!?_dlopen_notes_generator:true }%{_dlopen_notes_generator} --subpackage='%{name}' --rpm-fileattr=Suggests | ||
| %__dlopen_notes_protocol multifile | ||
| %__dlopen_notes_magic ^.*ELF (32|64)-bit.*$ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that the opts macros are not needed by default? It's a little unclear to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Rewording are welcome, but the last sentence way trying to convey that.
If the package has a file with dlopen notes and does nothing more, then it ends up with deps generated from the notes. The "priority" field, or the "recommends" fallback is used to pick Requires/Recommends/Suggests.