Re: [Rpm-maint] [rpm-software-management/rpm] The debuginfo machinery breaks if %install follows directly after %prep or preamble (Issue #1870)

2022-09-26 Thread Florian Festi
Well, `%install` following the preamble is technically a different issue. `%prep` is setting `%buildsubdir` via `%setup` and everything that makes use of that needs to be after `%prep`. This is not limited to the debuginfo magic - although it is especially non-obvious there. -- Reply to this e

Re: [Rpm-maint] [rpm-software-management/rpm] Turn %prep into a normal build script (Issue #2205)

2022-09-26 Thread Panu Matilainen
There are some "interesting" gotchas in this direction. I have draft patches to turn %patch and %setup into actual macros so they get processed with the normal spec readLine() machinery but as long as the macro engine cannot handle multiple options of the same type, this is a no-go. The other, a

Re: [Rpm-maint] [rpm-software-management/rpm] The debuginfo machinery breaks if %install follows directly after %prep or preamble (Issue #1870)

2022-09-26 Thread Panu Matilainen
Adding %end works for terminating %prep, but it doesn't help %install following the preamble. The proper fix for this is to eliminate the %install override macro hack. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1870#issuecomment-12

Re: [Rpm-maint] [rpm-software-management/rpm] Trailing whitespace in ASCII armor causes key import to fail (Issue #2184)

2022-09-26 Thread yangchenguang
Hi, I debugged the code of gunpg2 found that it seemed to have special treatment on ```\n \r \t ``` and whitespace -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2184#issuecomment-1258842527 You are receiving this because you are

Re: [Rpm-maint] [rpm-software-management/rpm] The debuginfo machinery breaks if %install follows directly after %prep (Issue #1870)

2022-09-26 Thread Florian Festi
It closes a section. So it would end the `%prep` section. Idea is that the debuginfo magic wold then be evaluated after the `prep` section. Basically the same as if there was another section inbetween. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-managem

Re: [Rpm-maint] [rpm-software-management/rpm] The debuginfo machinery breaks if %install follows directly after %prep (Issue #1870)

2022-09-26 Thread Maxwell G
What does `%end` do? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1870#issuecomment-1258534865 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint ma

Re: [Rpm-maint] [rpm-software-management/rpm] The debuginfo machinery breaks if %install follows directly after %prep (Issue #1870)

2022-09-26 Thread Florian Festi
I wonder if adding `%end` to the `%install` macro fixes the issue. The `%end` would be useful for once... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1870#issuecomment-1258384207 You are receiving this because you are subscribed to

[Rpm-maint] [rpm-software-management/rpm] Turn %prep into a normal build script (Issue #2205)

2022-09-26 Thread Florian Festi
%prep is very special. It is first parsed completely and only then are `%setup` and `%patch` replaced. While these two need to do special things they should still be internal macros that are processed right when they are encountered. One side effect of this is #1870 -- Reply to this email dire

Re: [Rpm-maint] [rpm-software-management/rpm] %generate_buildrequires should not trigger the debuginfo machinery (Issue #1870)

2022-09-26 Thread Maxwell G
Golang library packages often don't ship any go binaries and thus no arched (sub)packages, but they're built on all arches to ensure that the tests pass everywhere and that the noarch `-devel` subpackage does not contain different contents when built on different architectures. Rust libraries wo

Re: [Rpm-maint] [rpm-software-management/rpm] %generate_buildrequires should not trigger the debuginfo machinery (Issue #1870)

2022-09-26 Thread Florian Festi
OK, I think I have an idea what's wrong here: If `%install` is encountered after/as part of `%prep` debuginfo does not work. The reason is that `%prep` is first parsed and `%setup` - which is setting `%buildsubdir` - is only executed after the whole `%prep` section is processed and all macros a

Re: [Rpm-maint] [rpm-software-management/rpm] %generate_buildrequires should not trigger the debuginfo machinery (Issue #1870)

2022-09-26 Thread Panu Matilainen
Yup. The reason I remembered debuginfo depending on %build section is easily demonstrated with the golang example too (after removing the line to disable debuginfo): 1. move %generate_buildrequires before %prep, debuginfo disappears 2. add (an empty) %build section between %prep and %install, a

Re: [Rpm-maint] [rpm-software-management/rpm] %generate_buildrequires should not trigger the debuginfo machinery (Issue #1870)

2022-09-26 Thread Panu Matilainen
Ehm, scratch the above, the debuginfo stuff is hooked on %install, not %build. Sorry for the misleading comment. This seems one of those "spec specials", really. It's probably some interplay between how the spec parser works and expands macros and sections - if you move the %generate_buildrequi

[Rpm-maint] [rpm-software-management/rpm] Properly upstream debuginfo enablement (Issue #2204)

2022-09-26 Thread Panu Matilainen
While looking at something else, I discovered that the debuginfo machinery is still hooked on to this ugly hack of overloading `%install` with a macro: ``` %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ %%install\ %{nil} ``` I'm sure this was initially intended as just a q

Re: [Rpm-maint] [rpm-software-management/rpm] Revere Change %undefine macro to "func" style now that we can (PR #2203)

2022-09-26 Thread xujing
> Some obscure corner-cases changing behavior is kinda expected in this kind of > cleanup. Is there some real-world usage which breaks because of this, > something that can't be trivially fixed? Through test cases, I found that the https://github.com/rpm-software-management/rpm/commit/aec8bdb53

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Panu Matilainen
For giggles... I've looked at this a few times over the years, here's the earliest reference I can find: ``` [pmatilai🎩︎localhost hacks]$ ls -l *postun* -rw-rw-r--. 1 pmatilai pmatilai 12438 Mar 2 2010 rpm-postuntrans-hackery-0.patch ``` This has been a long time coming :smile: -- Reply to

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Florian Festi
Merged #2177 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2177#event-7457689352 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint maili

Re: [Rpm-maint] [rpm-software-management/rpm] Add pretransun and posttransun scriptlets (Issue #2119)

2022-09-26 Thread Florian Festi
Closed #2119 as completed via #2177. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2119#event-7457689454 You are receiving this because you are subscribed to this thread. Message ID: ___ Rp

Re: [Rpm-maint] [rpm-software-management/rpm] Revere Change %undefine macro to "func" style now that we can (PR #2203)

2022-09-26 Thread Panu Matilainen
Some obscure corner-cases changing behavior is kinda expected in this kind of cleanup. Is there some real-world usage which breaks because of this, something that can't be trivially fixed? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Michal Domonkos
@dmnks approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2177#pullrequestreview-1119969758 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Panu Matilainen
Squashed. It's quite a monster of a commit, really: 29 files changed, 234 insertions(+), 29 deletions(-) For adding two tiny scriptlets :roll_eyes: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2177#issuecomment-1257798951 You are re

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Michal Domonkos
@dmnks requested changes on this pull request. Just marking the PR as "changes requested" so that the fixups are squashed -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2177#pullrequestreview-1119879982 You are receiving this because y

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Michal Domonkos
Oh, I think @pmatilai actually has to squash those fixups himself, not sure if GH is smart enough to do that. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2177#issuecomment-1257739453 You are receiving this because you are subscribed t

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Michal Domonkos
Makes sense. Feel free to merge then, it otherwise looks good to me. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2177#issuecomment-1257737622 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Florian Festi
Well, those switches are basically for disabling a single, problematic scriptlet. Yes, it is not likely that you want to disable preuntrans and not a postuntrans - simply because they will still be very rare. But the semantics here is that you can at least target a specific type and mixing thing

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Michal Domonkos
Then there's the argument for consistency, of course, which we discussed above... It's a tough decision, for sure :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2177#issuecomment-1257715390 You are receiving this because you are

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

2022-09-26 Thread Michal Domonkos
I'm not a fan of the last fixup commit (adding the CLI switches), to be completely honest :smile: Is there a realistic scenario in which you'd want to keep a pre/posttrans scriptlet enabled but a preun/postuntrans one disabled, or vice-versa? -- Reply to this email directly or view it on GitHu

Re: [Rpm-maint] [rpm-software-management/rpm] Trailing whitespace in ASCII armor causes key import to fail (Issue #2184)

2022-09-26 Thread Neal H. Walfield
Indeed, I think there are worse bugs in the internal parser (e.g., [not being able to deal with some subpackets](https://github.com/rpm-software-management/rpm/pull/1813)). Nevertheless, if we want RPM to deal with such malformed certificates, perhaps it makes sense to add a unit test, which I

Re: [Rpm-maint] [rpm-software-management/rpm] Trailing whitespace in ASCII armor causes key import to fail (Issue #2184)

2022-09-26 Thread Panu Matilainen
...and so it begs the question whether it's worth bothering to fix at all: it's not a common thing, it's not a hard to work around and the internal PGP code is supposedly frozed for anything but critical fixes. This isn't one. -- Reply to this email directly or view it on GitHub: https://github

Re: [Rpm-maint] [rpm-software-management/rpm] Trailing whitespace in ASCII armor causes key import to fail (Issue #2184)

2022-09-26 Thread Panu Matilainen
That's because the reproducer was buggy, ie missing the problematic whitespace :facepalm: But indeed, this only affects the internal OpenPGP parser. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2184#issuecomment-1257574907 You are re