[Rpm-maint] [rpm-software-management/rpm] RPM 4.20.0 --root /PATH/TO/FAKEROOT Reports "Unable to change root directory: Operation not permitted" (Issue #3441)

2024-11-12 Thread Tomas
**Describe the bug** I need to use command `rpm --root /path/to/image/fakeroot -ivh xxx.rpm xxx.rpm` as normal user to install RPM packages into my fakeroot for my embedded system. When running with RPM 4.19.1.1, the above command runs perfectly. However, after I upgrade my Fedora 40 to Fedora 41,

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
@dmnks commented on this pull request. > +} + +rpmRC keystore_openpgp_cert_d::load_keys(rpmtxn txn, rpmKeyring keyring) +{ +return load_keys_from_glob(txn, keyring, "%{_keyringpath}/*/*"); +} + +rpmRC keystore_openpgp_cert_d::delete_key(rpmtxn txn, rpmPubkey key) +{ +rpmRC rc = RPMRC_NOT

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
@dmnks commented on this pull request. > -if (!rc && replace) { - /* find and delete the old pubkey entry */ - if (delete_key(txn, fp, keyfmt) == RPMRC_NOTFOUND) { - /* make sure an old, short keyid version gets removed */ - delete_key(txn, fp+32, keyfmt); -

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
@dmnks commented on this pull request. > -if (!rc && replace) { - /* find and delete the old pubkey entry */ - if (delete_key(txn, fp, keyfmt) == RPMRC_NOTFOUND) { - /* make sure an old, short keyid version gets removed */ - delete_key(txn, fp+32, keyfmt); -

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

2024-11-12 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -4,6 +4,8 @@ #include "system.h" +#include Oh, this shouldn't be here, no vectors are used in the patch. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3439#pullrequestreview-242987

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai pushed 0 commits. -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442/files/36903e9b7cca205a0efa84138290082a1a8ae467..2aed2f5e3c08e0f083041957f53353fd8abc469b You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Move installed gpg keys to the currently configured storage (Issue #3347)

2024-11-12 Thread Panu Matilainen
That AC proposal neglets to mention just how exactly this behavior is triggered, which is rather critical piece of information. Are new APIs and cli switches being added - which ones? Stuff like "move new instance to proper place" is an uninteresting implementation detail, what we're really int

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
Replying to the first question myself: `rpmtxnImportPubkey()` is where `replace` is decided, based on whether the key can be found. That kinda alleviates the need for an atomic rename since only *new* keys would be inserted with it disabled. That still doesn't ensure true atomicity but this is

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
Oh and FWIW, these are intentionally not returning filesystem::path items as those have some peculiar charasteristics that don't play well with our codebase. Like appending an absolute path to an existing path resetting the whole path to the part that was supposed to be appended, ie `"aa" / "/bb

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
No, other than "use it where it makes sense". Quite apparently it doesn't in all sorts of scenarios. Beyond that something like having entire rpm use filesystem::path for all paths is sooo far in the future it's not worth speculating at this point :sweat_smile: -- Reply to this email

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
The one debug leftover dropped and more elaborate commit message on the main commit (about why filesystem::path is not used etc) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#issuecomment-2470502384 You are receiving this because y

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
The pun was pretty funny though :smile: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#issuecomment-2470291751 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread ニール・ゴンパ
@Conan-Kudo commented on this pull request. > @@ -306,79 +307,34 @@ char *rpmCleanPath(char * path) return path; } -/* Merge 3 args into path, any or all of which may be a url. */ +/* Merge 3 args into path */ Did we drop support for URLs? -- Reply to this email directly or view it on

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
@dmnks commented on this pull request. > -if (!rc && replace) { - /* find and delete the old pubkey entry */ - if (delete_key(txn, fp, keyfmt) == RPMRC_NOTFOUND) { - /* make sure an old, short keyid version gets removed */ - delete_key(txn, fp+32, keyfmt); -

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
@dmnks commented on this pull request. > +rpmRC keystore_openpgp_cert_d::load_keys(rpmtxn txn, rpmKeyring keyring) +{ +return load_keys_from_glob(txn, keyring, "%{_keyringpath}/*/*"); +} + +rpmRC keystore_openpgp_cert_d::delete_key(rpmtxn txn, rpmPubkey key) +{ +rpmRC rc = RPMRC_NOTFOUND

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
The latest version you've pushed looks fine. The only remaining questions are: * Do we care that `replace` can be set to `0` and thus not use `rename(2)` for insertion? The latter is mandated by the spec, although it seems redundant, with the writelock in place * [How](https://github.com/rpm-sof

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Florian Festi
@ffesti commented on this pull request. > @@ -6,6 +6,7 @@ #include #include #include +#include Why do we needs this here. With all the new functions going into rpmmacro_internal.hh ? Or should this be in some later patch? -- Reply to this email directly or view it on GitHub: https://g

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
Ack, let's merge this then. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#issuecomment-2470234777 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-mai

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a new openpgp.cert.d based keystore (Issue #3341)

2024-11-12 Thread Michal Domonkos
Closed #3341 as completed via 6e19c1602c1118938d556453ee33357ea0006d3d. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3341#event-15262766543 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a new openpgp.cert.d based keystore (Issue #3341)

2024-11-12 Thread Michal Domonkos
Closed #3341 as completed via #3437. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3341#event-15262766568 You are receiving this because you are subscribed to this thread. Message ID: ___ R

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

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

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai pushed 6 commits. 515406906e9cca7a1b79015b9f6b02f325269134 Don't try to redefine isblank() c4e29e0d06e6af14255261d2f3c7b277de71ffef Add internal C++ counterparts for path manipulation functions 1af476167a26b0ad9ecd0c29203bf5c3baf8b8dc Eliminate uses of rpmCleanPath() in librpmbuild

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 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/3442#pullrequestreview-2429419631 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [Rpm-maint] [rpm-software-management/rpm] Test reading openpgpg backend with sq (PR #3444)

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

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread ニール・ゴンパ
Is there a path (pardon the pun) to us being able to adopt `std::filesystem::path` for file paths? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#issuecomment-2470268424 You are receiving this because you are subscribed to this thre

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Florian Festi
Well, it kinda does. By not replacing you make sure you fail if a key was added in the mean time instead of just overwriting it without merging. Also as far as rpm is concerned we do have the transaction log (which is represented by the txn parameter passed down) whihc protects parallel access

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Florian Festi
I would suggest to not get hung up on the names especially as long as they are only internal. We might even still change the name in the configuration as soon as we know what back ends we'll end up with and what exactly they do. -- Reply to this email directly or view it on GitHub: https://gith

[Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
The interesting part of this PR are new rpm::join_path(), rpm::expand_path() and rpm::normalize_path() functions which are more powerful C++ native counterparts of rpmGenPath(), rpmGetPath() and rpmCleanPath(), and hopefully with more meaningful names too. rpmGenPath() and rpmGetPath() use the

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread ニール・ゴンパ
@Conan-Kudo commented on this pull request. > @@ -306,79 +307,34 @@ char *rpmCleanPath(char * path) return path; } -/* Merge 3 args into path, any or all of which may be a url. */ +/* Merge 3 args into path */ So I guess stuff like `rpm -ivh https://kojipkgs.fedoraproject.org//packages

[Rpm-maint] [rpm-software-management/rpm] Test reading openpgpg backend with sq (PR #3444)

2024-11-12 Thread Florian Festi
Related: #3341 You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3444 -- Commit Summary -- * Test reading openpgpg backend with sq -- File Changes -- M tests/rpmsigdig.at (8) -- Patch Links -- https://github.com/rpm-so

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -306,79 +307,34 @@ char *rpmCleanPath(char * path) return path; } -/* Merge 3 args into path, any or all of which may be a url. */ +/* Merge 3 args into path */ Yes. -- Reply to this email directly or view it on GitHub: https://github.com

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -6,6 +6,7 @@ #include #include #include +#include Oh, that's just a debugging leftover. Thanks for spotting, I'll drop. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#discussi

Re: [Rpm-maint] [rpm-software-management/rpm] RPM 4.20.0 --root /PATH/TO/FAKEROOT Reports "Unable to change root directory: Operation not permitted" (Issue #3441)

2024-11-12 Thread Tomas
After digging into rpm's git log, I found following commit: ``` commit 9c96c5d4ca376b998be9919e70f74d0995c4df2e Author: Panu Matilainen Date: Fri Sep 15 14:38:35 2023 +0300 Axe the experimental non-privileged chroot support from b4c832ca While the chroot call itself works nicely fo

Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)

2024-11-12 Thread Michal Domonkos
@dmnks commented on this pull request. > -if (!rc && replace) { - /* find and delete the old pubkey entry */ - if (delete_key(txn, fp, keyfmt) == RPMRC_NOTFOUND) { - /* make sure an old, short keyid version gets removed */ - delete_key(txn, fp+32, keyfmt); -

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -306,79 +307,34 @@ char *rpmCleanPath(char * path) return path; } -/* Merge 3 args into path, any or all of which may be a url. */ +/* Merge 3 args into path */ Not really, the URL support never worked at all (as is explained in the commit

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -306,79 +307,34 @@ char *rpmCleanPath(char * path) return path; } -/* Merge 3 args into path, any or all of which may be a url. */ +/* Merge 3 args into path */ So it was a lucky case of being SO broken nobody could have possibly used it f

[Rpm-maint] [rpm-software-management/rpm] Add note about square brackets to tests README (PR #3443)

2024-11-12 Thread Michal Domonkos
This is part of M4, not specific to our test-suite, but it's a question that comes up often, and everyone (myself included) tends to forget how it's done. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3443 -- Commit Summary

Re: [Rpm-maint] [rpm-software-management/rpm] Add note about square brackets to tests README (PR #3443)

2024-11-12 Thread Michal Domonkos
@dmnks pushed 1 commit. ba96f1a73ec1b4a306b9b2daef6094898f6ad30d Add note about square brackets to tests README -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3443/files/a26c6a332711f5ebaf75c2c4faaecb7aeb084bf7..ba96f1a73ec1b4a306b9b2daef6094898f6ad30d You are receiv

Re: [Rpm-maint] [rpm-software-management/rpm] Add note about square brackets to tests README (PR #3443)

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

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai pushed 1 commit. 36903e9b7cca205a0efa84138290082a1a8ae467 Deprecate rpmCleanPath() in the public API -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442/files/8b831e4e58fcdc64958e367d7214cee4e5089fdc..36903e9b7cca205a0efa84138290082a1a8ae467 You are receivi

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -6,6 +6,7 @@ #include #include #include +#include Dropped. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#discussion_r1838081294 You are receiving this because you are subscri

Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)

2024-11-12 Thread Panu Matilainen
Also FWIW I'm totally okay with splitting the latter commits to another PR if this seems a bit much at a time. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#issuecomment-2470557022 You are receiving this because you are subscribed