[Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)
Miro Hrončok
notifications at github.com
Tue Feb 6 12:29:13 UTC 2024
@hroncok commented on this pull request.
> @@ -91,5 +91,16 @@ macros which is nicer in other situations, e.g.:
Always test for the `with`-condition, not the `without`-counterpart!
+## Overrinding Defaults
+
+For distributions it can be useful to overwrite the build conditionals on a global scale. To not interfere with the users ability to overwrite the conditionals on the command line there is an option to overwrite the default value indenpendent on the one chosen in the spec file.
+
+To do this one can define a `%bcon_override_default_NAME` macro as one or zero or use the `%{bcon_override_default NAME VALUE}` macro. Distributions can put the former into a global macro file that is installed during local builds to propagate these changed defaults outside their build system. Using different versions of the macro file allows building the same set of packages in different ways - e.g. against different libraries - without altering all the spec files.
+
+E.g. add this in the macros file to disable support for zstd assuming this is a common conditional in the distribution:
+```
+%bcon_override_default_zstd 0
+```
+
```suggestion
All packages with a `zstd` bcond will now build as if the bcond was defined as `%bcond zstd 0`.
I.e. unless `--with zstd` is used, the bcond will be disabled.
```
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#pullrequestreview-1865033227
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2405/review/1865033227 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240206/e67d4485/attachment.html>
More information about the Rpm-maint
mailing list