Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-09 Thread Florian Festi
Merged #2405 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#event-11756200361
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-09 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -2413,6 +2414,7 @@ runroot rpm -q --provides -p 
> /build/RPMS/noarch/bcondtest-1.0-1.noarch.rpm |
 ],
 [])
 
+

Couple of unrelated empty lines getting added here and above, and also just 
before and between the new tests. It's a good idea to eyeball 'git diff' and/or 
'git show' output for irregularities like this before pushing.

Other than that, looks fine to me now.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#pullrequestreview-1871853838
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-08 Thread Florian Festi
@ffesti pushed 1 commit.

4d06f5559d55db81176a336b1f2b4259ecfa89e2  Allow to specify a default for bcond 
features in a macro file

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405/files/fd34246f90bd101274c18adae485c1b430dcf5d6..4d06f5559d55db81176a336b1f2b4259ecfa89e2
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-08 Thread Michal Domonkos
@dmnks commented on this pull request.



> @@ -2451,6 +2453,105 @@ has_bcond(normally_on)
 [])
 RPMTEST_CLEANUP
 
+
+
+AT_SETUP([bcond_override_default macros])
+AT_KEYWORDS([bcond build])
+RPMDB_INIT
+
+# check bcond_override_default by defining
+AT_CHECK([

AT_CHECK is deprecated in favor of RPMTEST_CHECK. It's currently just an alias 
so it works the same but for consistency, we should use the latter.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#pullrequestreview-1870271639
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-08 Thread Florian Festi
And here we go. From 2 lines to 120 in just 11 months...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1934145866
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-08 Thread Florian Festi
@ffesti pushed 1 commit.

fd34246f90bd101274c18adae485c1b430dcf5d6  Allow to specify a default for bcond 
features in a macro file

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405/files/7bd59e2a6146da8765a091dad197a7bcd1df4013..fd34246f90bd101274c18adae485c1b430dcf5d6
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Florian Festi
@ffesti pushed 1 commit.

7bd59e2a6146da8765a091dad197a7bcd1df4013  Update 
docs/manual/conditionalbuilds.md

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405/files/5eee9f7e9194288a7fde10f095861fa0364ebdad..7bd59e2a6146da8765a091dad197a7bcd1df4013
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Florian Festi
@ffesti 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

Yeah, that looked funny but then I compared it to the ones above... 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#discussion_r1479716658
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Panu Matilainen
I'll still want to see the "real-world" test cases added to this. The gotchas 
and bugs are always in the part that you didn't think needs testing :laughing: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1929442665
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Panu Matilainen
@pmatilai 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

%bcond_, not %bcon_. Multiple cases of that in the above section.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#pullrequestreview-1865038372
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Miro Hrončok
@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-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Florian Festi
Yes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1929403698
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Miro Hrončok
Could you please add an example to the docs?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1929392923
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Florian Festi
OK, renamed to `bcond_override_default`. This is hopefully used sparingly 
enough that the additional typing won't kill anyone.

I added some documentation to the Conditional Build page. This should answer 
the questions above. But someone please prove read them. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1929389639
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-06 Thread Florian Festi
@ffesti pushed 1 commit.

dbb795984108e325841e8ca5c5c053c3dcd67731  Allow to specify a default for bcond 
features in a macro file

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405/files/20f501d1ad08a4182326a9ef682b525c709b5a03..dbb795984108e325841e8ca5c5c053c3dcd67731
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-02 Thread Panu Matilainen
I'd like to see tests with real-world bconds in packages. We already have tests 
for bcond so this can build on top of those. 

I'd like to see documentation and tests on how this is supposed to be used in 
real life, answering some practical matters like
- Where would the overrides/defaults be stored, a macro file somewhere in the 
path? 
- Would it be shipped to users so that when you rebuild an src.rpm you get the 
same selections as the distro build? 
- If I have a bcond set in a spec, overridden to something else by the distro, 
can I override the distro setting by by a "--with/without foo" on the command 
line? This seems crucial if the defaults are shipped to users.

Everything is of course simpler if these overrides are only selectively passed 
by a command line in a central buildsys somewhere, reading up from its own 
config in whatever format. It makes for an inconsistent rebuild behavior though.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1923586931
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-01 Thread Florian Festi
Meditating a bit more over the name: May be "bcond_default" wasn't as bad as I 
first thought as the macro does not override the users cli choice but only the 
packagers default in the spec file. May be this is used seldomly enough to 
afford "bcond_override_default"?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1920809657
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-02-01 Thread Florian Festi
@ffesti pushed 4 commits.

1df57c45c5cceee5c8b11170c2247dba529ad945  Allow to specify a default for bcond 
features in a macro file
60a44efd320ded6880bc2d30bb925fe3edf4be12  Rename to bcond_override()
4c5d1f850ef0900df5ea6ecfe1d129c6a64f6284  Add test case
20f501d1ad08a4182326a9ef682b525c709b5a03  Rename helper macro and add 
convenience macro

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405/files/d2998011324153c015574f5b891ba09636fb1e1e..20f501d1ad08a4182326a9ef682b525c709b5a03
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-01-31 Thread Florian Festi
Guess we want `%__bcond_default` and `%bcond_default` for declaring the 
`%bcond_default_foo` macro even if that is slightly silly.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1919596356
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-01-31 Thread Florian Festi
Well turns out this actually works. But may be not the way you expected... and 
that's why we need docs.

As far as I understand this `%bcond_default` is just a helper macro (and should 
be prepended with `__`) and the user/distro is supposed to declare 
%bcond_default_foo manually. With that things work here in my cobbled together 
test case.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1919502070
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-01-31 Thread Tomasz Kłoczko
This PR is wrong and is not solving th issue.
It is the problem that macros used with `%bcond_with foo`/`%bcond_without foo` 
like `%{?with_foo}` and `%{?without_foo}` are using presence or not that macro.
If you will look closer on macros file
```spec
# Internally, the `--with foo` option defines the macro `_with_foo` and the
# `--without foo` option defines the macro `_without_foo`.
# Based on those and a default (used when neither is given), bcond macros
# define the macro `with_foo`, which should later be checked:

%bcond()%[ (%2)\
? "%{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}"\
: "%{expand:%%{?_with_%{1}:%%global with_%{1} 1}}"\
]
%bcond_with()   %bcond %{1} 0
%bcond_without()%bcond %{1} 1

# Shorthands for %{defined with_...}:
%with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%without()  %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
```
you can find that it is used only presence of `%{with_foo}` or not.
This is why I have issue with disable globally %check using %bcond 
https://github.com/rpm-software-management/rpm/discussions/2870
Please test you PR with test spec and test units which I've added in this 
discussion and you will find that you PR is not working as expected/

IMO better would be leave %bcond as it is ad define possibility to use 
something new.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1919030097
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2024-01-31 Thread Florian Festi
I think I like "override" better. Probably because it emphasizes the out of 
order operation.

We also need to add this to `manual/conditionalbuilds.md` as soon as we decided 
on a name.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1918787873
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2023-03-13 Thread Panu Matilainen
This is indeed tricky because the desired flow of overrides is different from 
the usual upstream < distro < host < user override order in rpm. What we have 
here is something like packager < distro < user - there has to be a way to 
locally build and override whatever the packager or distro defaults are. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1465931497
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2023-03-10 Thread Miro Hrončok
%bcond_set_libmpeg does not carry enough meaning. The other two proposals do 
and I don't have a preference.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1464010710
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2023-03-10 Thread Michael Schroeder
Sorry for not commenting earlier, this was a busy week.

It's true that this can be done in the specfile, but that can lead to  each 
individual package maintainer using a different way. I think it's worthwhile 
that the mechanism is the same for all distributions. The goal is exactly that 
it works without needing to modify all packages.
(Plus, the proposed pull request also makes it work for bcond_with and 
bcond_without.)

Regarding nomenclature: I do agree that "default" is not good. I'm open for new 
suggestions. Here are a couple:
`%bcond_override_libmpeg 1`
`%bcond_force_libmpeg 1`
`%bcond_set_libmpeg 1`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1463871756
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2023-03-06 Thread Fabian Vogt
> Is putting something like `%bcond foo 0%{?default_foo}` in the spec file not 
> an option?

Technically yes, but like bconds itself which are just syntactic sugar, it 
would be nice to get something like this out of the box and working universally.

Currently the design of bconds makes them effectively worse than just plain 
macros in my experience. When just using macros like this, it's possible to 
provide a value in macros, allow overriding that with an `rpmbuild` parameter, 
specify a default in the .spec file and it can even take arbitrary values 
instead of just boolean ones!

```
%dnl Provide a default
%{!?enable_foo:%global enable_foo 1}
%dnl Or error out if unset
%{!?enable_foo:%error enable_foo not set}

%if %{enable_foo}
BuildRequires: foo
%else
BuildRequires: bar
%endif
```

The only benefit of bconds is that `rpmbuild` has nicer syntax for `--with(out) 
foo` and it's easier to translate bconds into commandline switches using the 
`%{?_with_foo:--foo}` syntax. I'd like something that combines the strengths of 
simple macros with the special benefits of bconds.

I'm not sure what's easier: Add something to make handling of macros like this 
easier or extend bconds to allow for more flexibility?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1456387757
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2023-03-03 Thread Miro Hrončok
I am confused by the nomenclature here. As a spec author, when I write:

```
%bcond tests 1
```

I expect the tests will run.

Now the distro maintainer (or anybody who can define macros, really) can define 
a macro:

```
%bcond_default_tests 0
```

What happens to my package? Does it no longer run tests? In my head, this isn't 
called a *default*, this is an *override*.

-

A default would be this:

Distribution puts this to their macros:

```
%bcond_default_tests 1
```

A packager can now use:

```
%bcond tests
```

(Notice there is no second argument.) This means "I want this package to run 
the tests when my distro desires that, but not run them if the distro does not 
desire that. I explicitly let the distro decision drive my spec behavior. When 
I care, I use the `--with(out)` command line option explicitly."

That I call a *default*.

(And of course, I realize this would only work for defined defaults, so when 
the distro does not define a default for tests, it should fail. And if I want 
to write a spec that anitcipates that possibility, I'd need to write:

```
%bcond tests 0%{?bcond_default_tests}
```

...which I can already do now anyway, as @encukou pointed out.)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1453230568
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2023-03-03 Thread Petr Viktorin
Is putting something like `%bcond foo 0%{?default_foo}` in the spec file not an 
option?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1453186692
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow to specify a default for bcond features in a macro file (PR #2405)

2023-03-03 Thread Panu Matilainen
Nice. This is certainly a common need, I've seen activity around this topic on 
Fedora/RHEL side as well but I've lost track as to where those efforts are now. 
Tagging @hroncok and @encukou for past interest in this area.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2405#issuecomment-1453135552
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint