Re: [Rpm-maint] [rpm-software-management/rpm] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-05-06 Thread Panu Matilainen
Merged #3071 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3071#event-12711076023
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] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-05-06 Thread Panu Matilainen
Sub-package noarch's a special case hack that doesn't cause spec parse 
recursion. So the answer is: nothing.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3071#issuecomment-2095257485
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] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-04-30 Thread ニール・ゴンパ
So what does this do when we use it to declare only a subpackage as noarch?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3071#issuecomment-2085451141
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] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-04-30 Thread Panu Matilainen
@pmatilai pushed 1 commit.

a5ea8c6db14455399d5447601ab0b5ebe7896878  Automatically reload rpm 
configuration on mismatching BuildArch

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3071/files/d09c5e9543dedac603f95e7a3252b10fecea5d85..a5ea8c6db14455399d5447601ab0b5ebe7896878
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] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-04-30 Thread Panu Matilainen
Eh, including the test-spec in the commit improves the chances of success...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3071#issuecomment-2084986916
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] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-04-30 Thread Panu Matilainen
@pmatilai pushed 1 commit.

d09c5e9543dedac603f95e7a3252b10fecea5d85  Automatically reload rpm 
configuration on mismatching BuildArch

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3071/files/c0504d9e64896e0487d9b3e6401cfa257e671f8f..d09c5e9543dedac603f95e7a3252b10fecea5d85
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] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-04-30 Thread Panu Matilainen
The way buildForTarget() now serves two quite different purposes is a bit ugly 
of course but keeps the patch small. I'd rather live with this for now and 
address the whole thing at a more fundamental level later on.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3071#issuecomment-2084980688
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


[Rpm-maint] [rpm-software-management/rpm] Automatically reload rpm configuration on mismatching BuildArch (PR #3071)

2024-04-30 Thread Panu Matilainen
When BuildArch is encountered during spec parse, rpm recurses the parse, but 
this doesnt reset/reload the global configuration and macros to match. So 
eg a BuildArch: noarch package gets built with a dramatically 
different macros depending on whether --target noarch was used or 
not, whereas people expect it to be the same - after all we give zero 
indication that anything might be wrong when --target wasnt specified.

Automatically detect and handle this condition in the rpmbuild tool: if the 
spec parse architecture disagrees with our loaded configuration, request a 
reparse with reloaded configuration for the matching target. This ensures 
rpmbuild -bb noarch.spec and rpmbuild -bb --target noarch 
noarch.spec run with the same exact configuration. 
Doing this also fixes the situation where build-time macro expansion of build 
scriptlets (for template bits and dynamically generated spec parts) yields 
totally different (bogus) than in the initial spec parse. This also goes for 
RPM_ARCH environment and similar.

Avoid --undefine for dependency generation test, it doesnt work.  
--undefine with --target was always broken, now its just more visible 
since it automatically applies to BuildArch too. Fixing that is a  separate 
matter (#3070).

A more sophisticated fix could be having a stack of macro contexts that we 
copy, push and pop as necessary. That ought to solve the undefine too.

Fixes: #3049
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3071

-- Commit Summary --

  * Dont emit target build into on --quiet
  * Automatically reload rpm configuration on mismatching BuildArch

-- File Changes --

M tests/rpmbuild.at (46)
M tools/rpmbuild.c (39)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3071.patch
https://github.com/rpm-software-management/rpm/pull/3071.diff

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

Message ID: rpm-software-management/rpm/pull/3...@github.com
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint