Facilitate RPM (and other distro) generation#9
Facilitate RPM (and other distro) generation#9konrad-schwarz wants to merge 2 commits intosiemens:mainfrom
Conversation
| link_with : [libsso_mib], | ||
| dependencies: [glibdep, giodep, jsondep, uuiddep] | ||
| dependencies: [glibdep, giodep, jsondep, uuiddep], | ||
| install_tag : 'tool' |
There was a problem hiding this comment.
What is the reason to add it?
There was a problem hiding this comment.
See above, but: Meson has the concept of install tags to enable a subset of installation targets to be installed. By default, it provides a "devel" tag comprising files typically found in a -devel sub-package and a "runtime" tag comprising everything else.
The Debian packaging puts sso-mib-tool into a separate, optional sub-package; this change does the same for Meson (i.e., meson install --tags runtime would not install sso-mib-tool) and provides this information to downstream consumers, i.e. other packaging systems.
fmoessbauer
left a comment
There was a problem hiding this comment.
Please see my inline comments. And please add the signed-off line. For details, see the CONTRIBUTING.md guide.
Signed-off-by: Konrad Schwarz <[email protected]>
Signed-off-by: Konrad Schwarz <[email protected]>
0bdffb7 to
285dc83
Compare
|
git-archive related commit has been removed and can be merged separately. |
|
@konrad-schwarz : please check the CI results, e.g.
|
Debian Bookworm Meson's version is too old:
I will probably run into the same problem on RHEL 8. My suggestion: create a patch in the Bookworm release that removes the offending line in Meson does not seem to have a preprocessing stage or a way of including/excluding code depending on its own version, so a patch would be the the only technical option. The alternative would be to reject this commit outright -- but this strategy precludes benefiting from improvements to Meson or other subsystems/libraries for the sake of maximum backwards compatibility. |
|
@konrad-schwarz we now can use meson 1.7. Please rebase this MR and check if the pipeline passes. |


Meson can model a substantial amount of information useful for an RPM
.specfile or for other distribution packaging schemes.The
meson introspectcommand exports this information as JSON that can be transformed, e.g., into a.specfile.This pull request adds some information to sso-mib's
meson.buildto facilitate this.The commits have the following purpose:
Added project's license information to meson.build fills in the project's
licenseandlicense_filesslots.Added a meson install_tag to sso_mib_tool marks the executable
sso-mib-toolwith a separateinstall_tag.In Meson, install tags can be used to install only a subset of the targets with the
--tagsoption..specfile generation can use install tags to derive sub-packaging information.3) Have git-archive set the project version from the latest v%d.%d.%d ta… usesgit-archive's substitution feature to automatically update the project's version from the latest release tag. Note that this requiresgit-archiveto actually produce an archive; themeson.buildfile in the repo remains unchanged. To avoid problems, a fallback version of 0.0.1 is used in this case.Unfortunately, limitations of meson andgit-archiveforce a convoluted code structure:- The very first statement inmeson.buildmust beproject(). This makes it impossible to move the version fallback code ahead of theproject()statement. Also, Meson's string manipulation is limited, e.g., regular expressions are not supported, which makes it impossible to remove dirty suffixes from the version string. On the other hand, this enforces proper release tagging.-git-archiveexpands only a single instance of thedescribekeyword (which works similarly togit-describe). This is to avoid denial-of-service attacks -- although why they couldn't calculate this once and cache the result is beyond me.This third commit is not necessary for RPM generation and could be dropped.