Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > if (arg == NULL) return 0; auto [ ign, val ] = macros().expand_numeric(arg); -return val; +if (val > INT_MAX) { + rpmlog(RPMLOG_WARNING, _("Macro value too big for int: %" PRIu64 " Using %i instead.\n"), val, INT_MAX);

Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)

2024-11-18 Thread Panu Matilainen
> If you are interested, here is my first draft implementation of this: > https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/455 This is of course several months late, missed originally due to vacation, but most certainly have been looking forward to real-world uses, lab testin

Re: [Rpm-maint] [rpm-software-management/rpm] Add short CLI commands to rpmkeys (PR #3448)

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

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
@dmnks commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" This is indeed strange that `runroot` doesn't work with `/tmp` as `_tmppath`, I've looked at it c

Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

2024-11-18 Thread Florian Festi
@ffesti commented on this pull request. > sqlexec(sdb, "PRAGMA optimize"); sqlexec(sdb, "PRAGMA wal_checkpoint = TRUNCATE"); + + int max_size = rpmExpandNumeric("%{?_sqlite_vacuum}"); + if (max_size <= 0) + max_size = 20

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
@dmnks commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" ... but since Ubuntu was now failing, for a change... let's leave it for later, indeed :smile:

Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild -ta option no longer works (Issue #3449)

2024-11-18 Thread Panu Matilainen
Can't reproduce that here, this is almost certainly some local/distro issue. My guess is that bzip2 either missing on the system or the macro for it is pointing to a wrong thing, and in both cases that's something that should be reported on Mariner, we can't help that (and 4.17-4.18 are out of u

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for multiple signatures per package, aka v6 signatures (PR #3439)

2024-11-18 Thread Panu Matilainen
The main commit split into two due to popular demand :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3439#issuecomment-2483278884 You are receiving this because you are subscribed to this thread. Message ID: _

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for multiple signatures per package, aka v6 signatures (PR #3439)

2024-11-18 Thread Panu Matilainen
@pmatilai pushed 6 commits. fd3a7cec0b9278ffd513bb7af966509f5c26ed94 Drop unused header arguments, update comments in signing internals 05b3bd0beee83e24eeb2854cd4852f8e2941b31b Refactor signature insertion to a helper function 5cc1cfdaa61fb306bba8832bc0f9471cf2ee28c9 Simplify the v3 signature

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
@dmnks commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" Yep, it's tmpfs, but there's only one instance of a podman container for the whole test-suite. `m

Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)

2024-11-18 Thread Miro Hrončok
The documentation is at [pyproject-rpm-macros README](https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/README.md) -- see the *Provisional: Declarative Buildsystem (RPM 4.20+)* section (sorry, no anchor). I generally don't put provisional stuff into the Python guidelines. P

Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)

2024-11-18 Thread Miro Hrončok
Alas, for your use case, you wanted documentation for Declarative Buildsystems generally, which is available in https://rpm-software-management.github.io/rpm/manual/buildsystem.html -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai pushed 1 commit. 5834541869bf1c42949113e9d371b0ef46521826 Drop redundant --dbpath from --exportdb/--importdb test -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447/files/9f6c97bc65f8d88cf7ef75c4678a2897ecff90ca..5834541869bf1c42949113e9d371b0ef46521826 Yo

Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)

2024-11-18 Thread David Auer
I just stumbled over this as [five](https://discussion.fedoraproject.org/t/should-we-check-for-the-presence-of-install-in-spec-files/137316) package already use this new "BuildSystem: pyproject" approach but I can't find any official documentation. If this is already in use and accepted for Fed

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" It's tmpfs though, I'd think it gets cleared between test-groups. At least it does between "ma

Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)

2024-11-18 Thread David Auer
Thanks, I was searching for the meaning of "BuildSystem: pyproject" and didn't see anything from the Fedora domains so this discussion here looked the most interesting on the search results. Your first link is what I was looking for at the moment, saying that it is new, provisional and able to r

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" Eh, or that's what I thought, but apparently not. -- Reply to this email directly or view it

Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -683,3 +683,20 @@ runroot rpm -q 'versiontest-1.0~2-1' []) RPMTEST_CLEANUP + +# -- +AT_SETUP([rpmdb vacuum]) +AT_KEYWORDS([install rpmdb sqlite]) +cp -r /usr/lib/sysimage/rpm "${RPMTEST}"/tmp +RPMTEST_CHECK([ +runroot

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" The problem is that /var is read-only by default, and rpm needs temporary files for all sorts

Re: [Rpm-maint] [rpm-software-management/rpm] %autopatch -m/-M fall through silently if no patches are in range (Issue #3093)

2024-11-18 Thread Adam Williamson
Note, there is a pattern here that seems valid to me, which triggers this warning. See [Fedora's evolution-data-server package](https://src.fedoraproject.org/rpms/evolution-data-server/blob/rawhide/f/evolution-data-server.spec). An edited extract: ``` # 0-99: General patches # 100-199: Flatpak

Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)

2024-11-18 Thread Panu Matilainen
The question is what to do with rpmExpandNumeric() that uses this interface. It needs to have defined behavior in case of overflow, but there's no way to return an error from rpmExpandNumeric(). -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
There are about a thousand further cases were runroot() can be eliminated but lets leave something for another rainy day :sweat_smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#issuecomment-2482254875 You are receiving this be

Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)

2024-11-18 Thread Panu Matilainen
I suppose the least dangerous option is to emit a warning and cap the return value to int min/max. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3454#issuecomment-2482891022 You are receiving this because you are subscribed to this thre

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: add shorthand options for rpmkeys operations (Issue #3435)

2024-11-18 Thread Panu Matilainen
Closed #3435 as completed via 35cfb7de9842dbec35adcb9ad9a632df49f35102. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3435#event-15330430599 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)

2024-11-18 Thread Florian Festi
@ffesti pushed 1 commit. 8fca2a2eea43e2667b01c541ac3eeae624f19e1c Make macros::expand_numeric return int64_t -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3454/files/c70c9406eef823eda258e6327fe72142a8fb46cf..8fca2a2eea43e2667b01c541ac3eeae624f19e1c You are receiving

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai pushed 2 commits. 883b132422ace3e5b04619a149091e9bf3c7772c Eliminate another bunch of now unnecessary runroot() uses 3989f576e232e968ab457e7f9d19fb0a6b057fae Eliminate bunch of now unnecessary runroot_other() uses -- View it on GitHub: https://github.com/rpm-software-management/rpm

[Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

2024-11-18 Thread Florian Festi
Check if there is 20MB in free pages and then execute a VACUUM command. The threshold can be controlled by the _sqlite_vacuum macro. Don't add this to the macros file on purpose as we don't want people to get involved with such details. Here it is mainly used for testing. Using a 20 MB threshol

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
As for the "Ubuntu mystery", see https://github.com/rpm-software-management/rpm/pull/3447/commits/06e4da15fc61e6366f21f992f4a2b6af428df3a8 - I still don't know why exactly its failing for that one path but not for something else that should be on the same image, but for the purpose of that test

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
@dmnks commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" Yep, I realized that `/var/tmp` shouldn't be writable after writing the above comment, too :sweat

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
@dmnks commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" Oh, right. So `/var/tmp` is r/w even in `podman --read-only` mode, see the man page for `--read-o

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
@dmnks commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" So using `/var/tmp` would work for the "native" (originally `run`) case, too, however it would vi

Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

2024-11-18 Thread Florian Festi
@ffesti pushed 1 commit. 5e674ede9f0bf42f0a6b8976969f40bf4d991405 Vacuum the sqlite rpmdb if necessary -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3452/files/190ef17e7427fae1ec08f4757299a2a832eb7cfc..5e674ede9f0bf42f0a6b8976969f40bf4d991405 You are receiving this b

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" That's handy, if it actually works for us. It seems to, locally, whereas /tmp didn't. I'll pus

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai pushed 1 commit. fe49d958024126dcde01e442e9745a44b4cc44a4 Always use /var/tmp for rpm's %_tmppath in test-suite -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447/files/3989f576e232e968ab457e7f9d19fb0a6b057fae..fe49d958024126dcde01e442e9745a44b4cc44a4 You

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai pushed 0 commits. -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447/files/fe49d958024126dcde01e442e9745a44b4cc44a4..3989f576e232e968ab457e7f9d19fb0a6b057fae You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" And, it may be writable on podman but apparently not docker. I'll just unpush the last commit,

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
@dmnks commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" That said, I've just realized we've been doing it previously the same way, `run` used to override

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
Merged #3447 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#event-15333249890 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mail

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Michal Domonkos
Looks good, well done :smile: The courage for diving into this bottomless pit is commendable (and very much appreciated) :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#issuecomment-2482831336 You are receiving this because

Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild -ta option no longer works (Issue #3449)

2024-11-18 Thread Panu Matilainen
@pmatilai converted this issue into discussion #3453. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3449#event-15331099004 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

2024-11-18 Thread Florian Festi
@ffesti pushed 1 commit. 190ef17e7427fae1ec08f4757299a2a832eb7cfc Vacuum the sqlite rpmdb if necessary -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3452/files/a41e2b262470a33bdbb7a514e840959edba65f5b..190ef17e7427fae1ec08f4757299a2a832eb7cfc You are receiving this b

[Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)

2024-11-18 Thread Florian Festi
While we can't change the C API there is really no reason to add a new 32 bit API. Changing now while it is still internal. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3454 -- Commit Summary -- * Make macros::expand_num

Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

2024-11-18 Thread Florian Festi
@ffesti commented on this pull request. > @@ -683,3 +683,20 @@ runroot rpm -q 'versiontest-1.0~2-1' []) RPMTEST_CLEANUP + +# -- +AT_SETUP([rpmdb vacuum]) +AT_KEYWORDS([install rpmdb sqlite]) +cp -r /usr/lib/sysimage/rpm "${RPMTEST}"/tmp +RPMTEST_CHECK([ +runroot r

Re: [Rpm-maint] [rpm-software-management/rpm] Add short CLI commands to rpmkeys (PR #3448)

2024-11-18 Thread Panu Matilainen
Ehm.. only saw the mention of squashing half a second too late. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3448#issuecomment-2482296309 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" Right. Anyway, lets leave that to a future exercise :laughing: -- Reply to this email direct

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > snapshot exec "$@" \ - --define "_buildhost testhost" \ - --define "_topdir /build" + --define "_tmppath /var/tmp" Right, in that case. We could of course just rm -rf the contents at RPMTEST_CLEANUP or such, b

Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

2024-11-18 Thread Panu Matilainen
@pmatilai commented on this pull request. > sqlexec(sdb, "PRAGMA optimize"); sqlexec(sdb, "PRAGMA wal_checkpoint = TRUNCATE"); + + int max_size = rpmExpandNumeric("%{?_sqlite_vacuum}"); + if (max_size <= 0) + max_size =