Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Florian Festi
OK, I looked into this and there are road blocks everywhere. Let's just stick to the PR as is. I generally agree that this is not the way to do this but the build code is an entangled mess and moving stuff round at this point is something we just should not do. Looking at all the hidden

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Here's a simple and straightforward way source headers are always indentified as such right after parse: https://github.com/rpm-software-management/rpm/pull/3012 -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Ensure source headers are identified as such after a spec parse (PR #3012)

2024-04-02 Thread Panu Matilainen
@pmatilai pushed 1 commit. 11599c994b870444ac3cbffb61a8256152f9f27a fixup! Ensure source headers are identified as such after a spec parse -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm segfaults when importing keys downloaded from keys.openpgp.org (Issue #3001)

2024-04-02 Thread Michael Schroeder
Fixed with https://github.com/rpm-software-management/rpmpgp_legacy/commit/31c2f3d017372ee11b6c7403f13889736757c046 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3001#issuecomment-2031713736 You are receiving this because you are

Re: [Rpm-maint] [rpm-software-management/rpm] Make it possible to evaluate arbitrary macros in the context of a given spec file (Discussion #3008)

2024-04-02 Thread Panu Matilainen
BTW it's worth noting that both the patches and sources appear in a reverse order to how they're introduced in the spec. This is basically an internal implementation detail (linked list operation) leaking into the packages, but because it's always been that way, "fixing" would silently break

Re: [Rpm-maint] [rpm-software-management/rpm] Add --patches and --sources aliases to rpmspec (PR #3011)

2024-04-02 Thread ニール・ゴンパ
@Conan-Kudo requested changes on this pull request. Actually, since these emit the sources and patches in reverse order, could we make the aliases also reverse that so they are in the correct order? -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Return to Tralla La or: RPM in C++ (Discussion #2983)

2024-04-02 Thread Panu Matilainen
Nice to see somebody besides ourselves being excited about this :smile: And yeah that is really a big part of the point: rpm's data structures aren't really that exotic, but to someone new it's all lost in the details of this specific implementation, and then we have like three different

Re: [Rpm-maint] [rpm-software-management/rpm] Macro documentation does not mention `{body}` syntax for macro definitions (Issue #2976)

2024-04-02 Thread Michael Schroeder
The code in doDefine() supports multiline macros, it's that nasty rdcl() function that is to blame here. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2976#issuecomment-2031383183 You are receiving this because you are subscribed to

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for sysusers group membership lines (PR #2990)

2024-04-02 Thread Florian Festi
Yeah, I already noticed and fixed psm.c and tagexts.c. There is still something wrong with the test case or the code or both. I update the patch ass soon as this works. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -180,6 +180,34 @@ runroot rpmspec \ []) RPMTEST_CLEANUP +AT_SETUP([rpmspec -q --rpms]) +AT_KEYWORDS([query]) +RPMTEST_CHECK([ +RPMDB_INIT +runroot rpmspec --rpms \ + -q /data/SPECS/hello.spec | grep src +runroot rpmspec --rpms \ + -q

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
The build code is a mess for sure, but adding hacks on top of hacks only makes it worse. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2031613554 You are receiving this because you are subscribed to this thread.

Re: [Rpm-maint] [rpm-software-management/rpm] rpm segfaults when importing keys downloaded from keys.openpgp.org (Issue #3001)

2024-04-02 Thread Panu Matilainen
Right, this is specific to the internal pgp parser. With rpm-sequoia I get: > $ tools/rpmkeys --dbpath /tmp/kdb --import > /tmp/2596A99EAAB33821893C0A79458CA832957F5868 error: Certificate 458CA832957F5868: Policy rejects 458CA832957F5868: No binding signature at time 2024-04-02T10:42:20Z

Re: [Rpm-maint] [rpm-software-management/rpm] Make it possible to evaluate arbitrary macros in the context of a given spec file (Discussion #3008)

2024-04-02 Thread ニール・ゴンパ
Could you fix it for your rpmspec aliases though? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/3008#discussioncomment-8982821 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: ensure unwritable buildroot during %check (Issue #3010)

2024-04-02 Thread Panu Matilainen
I opened this ticket from the discussion specifically because it's such a no-brainer when you see it: "tests should not be able to affect built binaries". How feasible it is in practise is another story, but it's worth at least investigating. -- Reply to this email directly or view it on

[Rpm-maint] [rpm-software-management/rpm] Ensure source headers are identified as such after a spec parse (PR #3012)

2024-04-02 Thread Panu Matilainen
headerIsSource() uses RPMTAG_SOURCERPM presence to identify binary packages, but that tag gets inserted late in an actual package build, whereas wed like to source headers to be identifiable right after spec parse already. Non-presence of a tag is not a very strong indicator anyhow, and even

Re: [Rpm-maint] [rpm-software-management/rpm] Make it possible to evaluate arbitrary macros in the context of a given spec file (Discussion #3008)

2024-04-02 Thread Panu Matilainen
The query is not exactly obvious though, so: https://github.com/rpm-software-management/rpm/pull/3011 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/3008#discussioncomment-8980798 You are receiving this because you are subscribed

Re: [Rpm-maint] [rpm-software-management/rpm] Add --patches and --sources aliases to rpmspec (PR #3011)

2024-04-02 Thread ニール・ゴンパ
@Conan-Kudo approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3011#pullrequestreview-1973096004 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a way to ensure build artifacts integrity after the `%build`, and during post-build phases like `%check` (Discussion #3009)

2024-04-02 Thread Panu Matilainen
We've been entertaining ideas to this direction before the xz incident, eg #2985 (for read-only source) and #2989. Read-only buildroot would be a logical extension of this. Some of these things are stepping into "mock territory", but then people still *do* run rpmbuild through other means as

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a way to ensure build artifacts integrity after the `%build`, and during post-build phases like `%check` (Discussion #3009)

2024-04-02 Thread Panu Matilainen
Opened https://github.com/rpm-software-management/rpm/issues/3010 as well. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/3009#discussioncomment-8980509 You are receiving this because you are subscribed to this thread. Message

[Rpm-maint] [rpm-software-management/rpm] RFE: ensure unwritable buildroot during %check (Issue #3010)

2024-04-02 Thread Panu Matilainen
On the heels of the xz incident, one of the ideas (from @keszybz it seems) to harden against malicious tests is to make buildroot readonly during %check. Picked from https://github.com/rpm-software-management/rpm/discussions/3009 as a clear actionable item. -- Reply to this email directly or

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: ensure unwritable buildroot during %check (Issue #3010)

2024-04-02 Thread Michael Schroeder
There's not much you can do against a malicious upstream. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3010#issuecomment-2031325567 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Took a quick look at my own suggestion in the earlier comment and it brings out some truly WTF failures :laughing: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2031615530 You are receiving this because you are

[Rpm-maint] [rpm-software-management/rpm] Add --patches and --sources aliases to rpmspec (PR #3011)

2024-04-02 Thread Panu Matilainen
These are common needs and the query is not exactly obvious, so why not. Hijack the otherwise unused poltest.spec for the sources test, its the only multi-source spec we have. Only, it hasnt been parseable in about ten years because of the Collections: tag, so remove that... You can view,

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
@pmatilai commented on this pull request. > +[0], +[hello-1.0-1 +], +[]) +RPMTEST_CLEANUP + +AT_SETUP([rpmspec -q --srpm]) +AT_KEYWORDS([query]) +RPMTEST_CHECK([ +RPMDB_INIT +runroot rpmspec --srpm \ + -q /data/SPECS/hello.spec +], +[0], +[hello-1.0-1.src +], I'd put this in the same

Re: [Rpm-maint] [rpm-software-management/rpm] rpm segfaults when importing keys downloaded from keys.openpgp.org (Issue #3001)

2024-04-02 Thread Panu Matilainen
Oh and, thanks @signed-log for reporting! -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3001#issuecomment-2031692954 You are receiving this because you are subscribed to this thread. Message ID:

[Rpm-maint] [rpm-software-management/rpm] Get rid of pgpGrab() (PR #3013)

2024-04-02 Thread Michael Schroeder
rpmvs.c is the only one using it in the rpm source and it can be trivially rewritten. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3013 -- Commit Summary -- * Get rid of pgpGrab() -- File Changes -- M

Re: [Rpm-maint] [rpm-software-management/rpm] Ensure source headers are identified as such after a spec parse (PR #3012)

2024-04-02 Thread Panu Matilainen
@pmatilai pushed 1 commit. cb47d1e144cb0e83c715086423785c03f0ec51c4 Populate RPMTAG_SOURCERPM early to allow binaries to be identified -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Ensure binary and source headers are identified as such after parse (PR #3012)

2024-04-02 Thread Panu Matilainen
@pmatilai pushed 1 commit. f824484589b8260a59dab0265fe41901c399a4c6 Ensure binary pkg headers are identified as such after a spec parse -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a way to ensure build artifacts integrity after the `%build`, and during post-build phases like `%check` (Discussion #3009)

2024-04-02 Thread Miroslav Suchý
When you run rpmbuild directly I would argue that you do not care about security already :) I guess it will be hard for rpmbuild to handle remounts for you. While it is no brainer for Mock. What mock will need to have in rpm implemented is: 1) rpmbuild -ba --nocheck foo.spec # this already

Re: [Rpm-maint] [rpm-software-management/rpm] Return to Tralla La or: RPM in C++ (Discussion #2983)

2024-04-02 Thread ニール・ゴンパ
Yeah, I've always been afraid of broaching the idea seriously. I had joked about this with @ffesti a few times at the openSUSE Conference, but I'm really glad to see us doing this. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Aaargh, except that the issue here was not positively identifying source headers but binaries :facepalm: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2031869298 You are receiving this because you are subscribed to

Re: [Rpm-maint] [rpm-software-management/rpm] Get rid of pgpGrab() (PR #3013)

2024-04-02 Thread Michael Schroeder
Note that pgpGrab() is in the public API. I could not find any usage outside of rpm, though. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3013#issuecomment-2031922210 You are receiving this because you are subscribed to this thread.

Re: [Rpm-maint] [rpm-software-management/rpm] Make it possible to evaluate arbitrary macros in the context of a given spec file (Discussion #3008)

2024-04-02 Thread Panu Matilainen
> I'd like to be able to query a spec file for the list of its patches. `rpmspec --srpm -q --qf "[%{PATCH}\n]" ` -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/3008#discussioncomment-8980564 You are receiving this because you

Re: [Rpm-maint] [rpm-software-management/rpm] Macro documentation does not mention `{body}` syntax for macro definitions (Issue #2976)

2024-04-02 Thread Michael Schroeder
I think the original intend was to make the macro definitions look like bash function definitions. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2976#issuecomment-2031386866 You are receiving this because you are subscribed to this

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: ensure unwritable buildroot during %check (Issue #3010)

2024-04-02 Thread Zbigniew Jędrzejewski-Szmek
An idea was floated on fedora-devel to remove tests from packages altogether. I empathetically disagree with that, but maybe it'd be useful to "sandbox" the tests a bit. The test code is often of lesser quality and less reviewed. The basic idea is to make sure that the `%check` section

Re: [Rpm-maint] [rpm-software-management/rpm] rpm segfaults when importing keys downloaded from keys.openpgp.org (Issue #3001)

2024-04-02 Thread Michael Schroeder
Yeah, that's also what I was going to implement. The userid seems to be optional. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3001#issuecomment-2031710562 You are receiving this because you are subscribed to this thread. Message

Re: [Rpm-maint] [rpm-software-management/rpm] rpm segfaults when importing keys downloaded from keys.openpgp.org (Issue #3001)

2024-04-02 Thread Panu Matilainen
Heh, so a more careful reading of the report... the userid is *intentionally* removed here. So assuming that's a reasonable thing to do (considering where these keys are coming from), the minimal fix would probably be this instead: ``` - digps[count]->userid =

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Added a second commit there to deal with RPMTAG_SOURCERPM too: https://github.com/rpm-software-management/rpm/pull/3012/commits/cb47d1e144cb0e83c715086423785c03f0ec51c4 -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Get rid of pgpGrab() (PR #3013)

2024-04-02 Thread Panu Matilainen
Right, I remember coming across this and thinking about removing and then postponing for whatever reason, and here we are. The positive thing is that while it's in the API, it's not in the ABI, so we can remove without soname bumps. Indeed nobody should be using it, and by the looks of things

Re: [Rpm-maint] [rpm-software-management/rpm] Get rid of pgpGrab() (PR #3013)

2024-04-02 Thread Panu Matilainen
Merged #3013 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3013#event-12326180710 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Ensure source headers are identified as such after a spec parse (PR #3012)

2024-04-02 Thread Panu Matilainen
@pmatilai pushed 2 commits. 2831368e2b7858047e9668ef126034faf6215dce Ensure source headers are identified as such after a spec parse e5184ba0ad9149e72c2f076f618053157927c4b9 Ensure binary pkg headers are identified as such after a spec parse -- View it on GitHub: