Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)
@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); + res = INT_MAX; +} else if (val < INT_MIN) { + rpmlog(RPMLOG_WARNING, _("Macro value too small for int: %" PRIu64 " Using %i instead.\n"), val, INT_MIN); + res = INT_MIN; +} else { Turns out there's an STL solution for this: https://en.cppreference.com/w/cpp/algorithm/clamp No point having separate messages for too small and too big, just state that it's outside range. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3454#pullrequestreview-225362 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)
> 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 testing only gets you so far. >From a quick look, my takeaways are: - Spec backwards compatibility is a bit of a pain point, there might be some value in teaching rpm 4.19 to parse (but not build) specs utilitizing buildsystem constructs, considering 4.19 will live for a long long time in RHEL 10 - having a generic way to declare mandatory options could be handy Anything else that's not so immediately obvious? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2997#discussioncomment-11301812 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add short CLI commands to rpmkeys (PR #3448)
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 mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 closer but couldn't find the culprit, it's probably related to some `tmpfs` foo, as you've noted in the commit message. Nevertheless, we might as well just set `_tmppath` to `/var/tmp` in `macros.testenv` too which would eliminate the need for this override here. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#pullrequestreview-2442182183 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
@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*1024*1024; + long free_space = sqlite_free_space(sdb); Yeah, I have been pondering about int vs long vs int64_t here. rpmExpandNumeric also only returns an `int`. I wonder if we should at least move the C++ variant to 64 bits. Not that we need it here urgently but adding a 32 bit API seems kinda wrong. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3452#discussion_r1846349129 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846384036 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild -ta option no longer works (Issue #3449)
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 upstream support by now anyway, so converting this to a discussion). `rpm --eval "%{uncompress:slurm-24.05.4.tar.bz2}"` should output something like `/usr/bin/bzip2 -dc slurm-24.05.4.tar.bz2` and executing the output'ed command should work. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3449#issuecomment-2482415517 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add support for multiple signatures per package, aka v6 signatures (PR #3439)
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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add support for multiple signatures per package, aka v6 signatures (PR #3439)
@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 logic a bit 2ff3b1f50a6cdc279edcf4eb8c66b9df976ad028 Avoid trailing whitespace when outputing relocations in --info query ebd388477c419a38c05079295bf15bd68bcecdf3 Add support for multiple OpenPGP signatures per package, part 1/2 b8bc68c2c36cf7e3086ef86756e7e1a0f647804b Add support for multiple OpenPGP signatures per package, part 2/2 -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3439/files/edec2828b477729573ab5738fbae2a88bd8753a1..b8bc68c2c36cf7e3086ef86756e7e1a0f647804b You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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. `make atshell` is equivalent to running `make check` with only one test-case :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846370860 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)
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. PAckagers are free to use it, but we don't encourage them to do so unless they know what they are doing. To lift the provisional status, I was waiting for this to happen: - copr updates builds to Fedora 41+ https://github.com/fedora-copr/copr/issues/3270 - Zuul to use Fedora 41+ (no ticket yet) - early adopters actually usethis (already happens, as you mention) and report issues - Fedora 40 to go end of life (optional: if this is the last option, it can be omitted) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2997#discussioncomment-11295598 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)
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/2997#discussioncomment-11295665 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)
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 Fedora packaging it should be mentioned in the packaging guidelines imho. (Maybe I just need to be more patient? :thinking: ) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2997#discussioncomment-11295517 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 "make atshell" invocations. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846363025 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Understanding of the Declarative builds, Python edition (Discussion #2997)
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 replace the install section (among others). That helped a lot :+1: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2997#discussioncomment-11297269 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846329042 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
@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 rpm -D "_sqlite_vacuum 1024" -D "%_dbpath /tmp/rpm" -vv -U /data/RPMS/foo-1.0-1.noarch.rpm 2>&1 | grep VACUUM +runroot rpm -D "_sqlite_vacuum 1024" -D "%_dbpath /tmp/rpm" -vv -e foo-1.0-1 2>&1 | grep VACUUM +], +[0], +[D: VACUUM: 0 +D: Rpmdb Sqlite backend VACUUM maxfree: 1024, free: 397312 -> 0 /usr/lib/sysimage/rpm is a "live" rpmdb, so these values can and will change, breaking the test. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3452#pullrequestreview-2441862557 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 of things that don't otherwise require writing to the root image. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846327842 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] %autopatch -m/-M fall through silently if no patches are in range (Issue #3093)
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-specific patches # https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/144 Patch100: Make-DBUS_SERVICES_PREFIX-runtime-configurable.patch ... %prep %autosetup -p1 -S gendiff -N # General patches %autopatch -p1 -m 0 -M 99 # Flatpak-specific patches %if 0%{?flatpak} %autopatch -p1 -m 100 -M 199 %endif ``` that is, it wants to carry "general" patches **IF ANY** in the range 0-99, and "flatpak-specific" patches **IF ANY** in the range 100-199. The problem comes if we don't have at least one general patch and one flatpak-specific patch, because now that triggers this warning. But you can see the logic of what the package wants to do, and it makes sense, and I don't see how it could avoid this warning... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3093#issuecomment-2483643008 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)
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/pull/3454#issuecomment-2482872829 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
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 because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)
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 thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: add shorthand options for rpmkeys operations (Issue #3435)
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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)
@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 this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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/pull/3447/files/eb10687a5200c8431be6960c166db3b952541477..3989f576e232e968ab457e7f9d19fb0a6b057fae You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
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 threshold should prevent the vacuuming to happend too often while still triggering after large transactions. As we install new headers first and then remove the old ones transactions leave behind large amounts of free pages. We do not use PRAGMA auto_vacuum here as it does not defrag the database and only frees empty pages. So it still requires running VACUUM from time to time. Freeing the empty pages would get rid of the condition we use here for running VACUUM. Using pure C for the macro expansion on purpopse in case we want to back port this. Resolves: #3309 You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3452 -- Commit Summary -- * Vacuum the sqlite rpmdb if necessary -- File Changes -- M lib/backend/sqlite.cc (25) M tests/rpmdb.at (17) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/3452.patch https://github.com/rpm-software-management/rpm/pull/3452.diff -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3452 You are receiving this because you are subscribed to this thread. Message ID:___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
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 which of the two paths gets used is wholly irrelevant, so I'm not going to die on that hill today. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#issuecomment-2482263731 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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_smile: And indeed, it *is* writable for some reason, lol... Mystery deepens... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846335102 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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-only` :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846343018 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 violate the rule that no test can influence other tests (since now they would all share a common `/var/tmp`). I guess let's leave it as is for now, then. It could be managed somehow, pretty sure, just not something to block this PR on. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846352083 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
@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 because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 push that change to the end to see if it also works on Ubuntu, but I wouldn't make this a blocker here - there's always the next rainy day to clean up further. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846351096 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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, lets forget that part for now. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846365030 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 `_tmppath` to `/tmp` for which there's also just one instance during the whole test-suite execution. So for tests that don't create a custom "snapshot" with `RPMTEST_SETUP`, we already were running them with a shared `/tmp` anyway. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846378113 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
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 mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
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 you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild -ta option no longer works (Issue #3449)
@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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
@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 because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Make macros::expand_numeric return int64_t (PR #3454)
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_numeric return int64_t -- File Changes -- M rpmio/macro.cc (8) M rpmio/rpmmacro_internal.hh (4) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/3454.patch https://github.com/rpm-software-management/rpm/pull/3454.diff -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3454 You are receiving this because you are subscribed to this thread. Message ID:___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
@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 rpm -D "_sqlite_vacuum 1024" -D "%_dbpath /tmp/rpm" -vv -U /data/RPMS/foo-1.0-1.noarch.rpm 2>&1 | grep VACUUM +runroot rpm -D "_sqlite_vacuum 1024" -D "%_dbpath /tmp/rpm" -vv -e foo-1.0-1 2>&1 | grep VACUUM +], +[0], +[D: VACUUM: 0 +D: Rpmdb Sqlite backend VACUUM maxfree: 1024, free: 397312 -> 0 Yeah, that's kinda on purpose. I wanted a real database for testing. But may be the test suite can do without. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3452#discussion_r1846099887 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add short CLI commands to rpmkeys (PR #3448)
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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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 directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846388047 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate the need for run() wrapper in the test-suite (PR #3447)
@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, but seems crude :sweat_smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3447#discussion_r1846375726 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)
@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 = 20*1024*1024; + long free_space = sqlite_free_space(sdb); On 32bit architectures, long is a mere 32bit integer. Better be safe and use explicit int64_t for the size since that's you're getting it from sqlite to begin with. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3452#pullrequestreview-2442197923 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint