[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)
**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, RPM is also upgraded to versoin 4.20.0, the above command reports `error: Unable to change root directory: Operation not permitted` **To Reproduce** Steps to reproduce the behavior: run `rpm --root $(mktemp -d) -ivh your_rpm_name.rpm` as normal user **Expected behavior** rpm install the RPM package into the path specified by --root **Output** rpm reports: `error: Unable to change root directory: Operation not permitted` **Environment** - OS / Distribution: [Fedora 41] - Version [rpm-4.20.0] -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3441 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
@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; + +if (acquire_write_lock(txn) != RPMRC_OK) + return RPMRC_FAIL; + +string fp = rpmPubkeyFingerprintAsHex(key); +string dir = fp.substr(0, 2); Works for me. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#discussion_r1837658832 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
@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); - } -} +static void free_write_lock(int fd) +{ +flock(fd, LOCK_UN); I wonder if we shouldn't also remove the `writelock` file here. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#pullrequestreview-2428961766 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
@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); - } -} +static void free_write_lock(int fd) +{ +flock(fd, LOCK_UN); Hmm, perhaps not really. The spec only says the store should be assumed unlocked if the file doesn't exist, but its presence doesn't really matter (as long as we use `flock()` of course). -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#discussion_r1837728117 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://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 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-2429872181 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Move installed gpg keys to the currently configured storage (Issue #3347)
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 interested is the semantics that are also testable. For example, "add all keys" sounds like all keys get moved no matter what, but that's not what should happen, we should weed out any no longer legit keys in the process - in other words, those that fail to import. So it's more like "attempt to reimport all previously imported keys" than just "add all". And as a part of that reimport, any short keyids get converted to fingerprints - which is what we want. And on the semantic level I dont' think we should or need to differentiate between rpmdb and other backends, from rpmkeys perspective they should all behave the same. So I think the requirements are more like - a way to invoke keystore rebuild from the command line and API (and describe how it'll look like) - supports moving keys between all keystores, including itself (eg rpmdb -> rpmdb) - old invalid (expired, weak crypto, whatnot) keys are discarded in the process with a warning message - old short keyid based keys are converted to fingerprint based ones -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3347#issuecomment-2472590239 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
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 the best we can do without refactoring `rpmtxnImportPubkey()` or other parts. So I guess it's fine. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#issuecomment-2470078912 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
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"` equals `/bb` :flushed: (and this really belongs to the commit message adding these functions, I'll fixup along with other review feedback when it comes) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#issuecomment-2470259480 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
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 directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#issuecomment-2470285173 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
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 you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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 GitHub: https://github.com/rpm-software-management/rpm/pull/3442#pullrequestreview-2429340646 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
@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); - } -} +static void free_write_lock(int fd) +{ +flock(fd, LOCK_UN); OK, you even asked the same question above (just noticed)... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#discussion_r1837776284 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
@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; + +if (acquire_write_lock(txn) != RPMRC_OK) + return RPMRC_FAIL; + +string fp = rpmPubkeyFingerprintAsHex(key); +string dir = fp.substr(0, 2); +string filename = fp.substr(2); +char * filepath = rpmGetPath(rpmtxnRootDir(txn), "%{_keyringpath}/", dir.c_str(), "/", filename.c_str(), NULL); Ack, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#discussion_r1837658629 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
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-software-management/rpm/issues/3341#issuecomment-2467869752) do we externally name the store -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#issuecomment-2470064550 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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://github.com/rpm-software-management/rpm/pull/3442#pullrequestreview-2429483888 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
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-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement a new openpgp.cert.d based keystore (Issue #3341)
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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement a new openpgp.cert.d based keystore (Issue #3341)
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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
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 mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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 ed3e1efe470955debfef3f66ef620edbfa655256 Eliminate use of rpmCleanPath() in relocation code c2fdf4387278ca6b40cf14adc6359eaed09ff8f6 Eliminate uses of realpath() and rpmCleanPath() in fingerprint canonDir() e3d440de9f5079debe0a7fce7358fcffa2c0b1e1 Eliminate realpath(), rpmGetPath() and rpmCleanPath() uses in query code -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442/files/0af4782451f4a8d256b33e80cabf30b8f900427b..e3d440de9f5079debe0a7fce7358fcffa2c0b1e1 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Test reading openpgpg backend with sq (PR #3444)
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 mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
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 thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
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 from other rpm instances. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#issuecomment-2470143162 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
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://github.com/rpm-software-management/rpm/pull/3437#issuecomment-2470147779 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
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 C++ versions internally now, which "proves" they work as promised. rpmCleanPath() can't do so because it expects to manipulate the C string buffer passed to it. We'll deprecate it as soon as we get rid of it. The latter commits replace a few uses of rpmCleanPath() and related C-side functions with C++ native versions to further prove these work as intended, but technically they wouldn't need to be in this PR. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3442 -- Commit Summary -- * Don't try to redefine isblank() * Add internal C++ counterparts for path manipulation functions * Eliminate uses of rpmCleanPath() in librpmbuild * Eliminate use of rpmCleanPath() in relocation code * Eliminate uses of realpath() and rpmCleanPath() in fingerprint canonDir() * Eliminate realpath(), rpmGetPath() and rpmCleanPath() uses in query code -- File Changes -- M build/files.cc (20) M include/rpm/rpmfileutil.h (7) M lib/fprint.cc (38) M lib/query.cc (39) M lib/relocation.cc (19) M rpmio/macro.cc (16) M rpmio/rpmfileutil.cc (98) M rpmio/rpmmacro_internal.hh (10) M tools/rpm.cc (1) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/3442.patch https://github.com/rpm-software-management/rpm/pull/3442.diff -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442 You are receiving this because you are subscribed to this thread. Message ID:___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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/4.20.0/1.fc42/src/rpm-4.20.0-1.fc42.src.rpm` are handled elsewhere? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#discussion_r1837982396 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Test reading openpgpg backend with sq (PR #3444)
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-software-management/rpm/pull/3444.patch https://github.com/rpm-software-management/rpm/pull/3444.diff -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3444 You are receiving this because you are subscribed to this thread. Message ID:___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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/rpm-software-management/rpm/pull/3442#discussion_r1837988232 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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#discussion_r1838054963 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
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)
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 for a regular user with this, user/group mapping does not and cannot be made to work, because that requires a fork and we cannot very well fork the process from deep down here. Better to put the irrepairable thing out of its misery, users are far better of wrapping rpm with the unshare command instead. ``` The log shows that I can achieve the same goal by wrapping rpm command with `unshare` After experimenting, I found solution: Use following command: `unshare --mount --user --map-root-user rpm --root $(mktemp -d) -ivh your_rpm_name.rpm` You may also want to add `--noplugins` when running `rpm` in `unshare` environment. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/3441#issuecomment-2470620344 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
@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); - } -} +static void free_write_lock(int fd) +{ +flock(fd, LOCK_UN); I'd say it's fine to keep the file around, whoever wants to access the keystore is expected to use the file locking syscall anyway. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3437#discussion_r1837778285 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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 message and the API docs update). Any URL's in there and the output is utterly useless garbage. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#discussion_r1837954418 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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 for URL's, so we can just prune that cruft. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3442#discussion_r1837955262 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Add note about square brackets to tests README (PR #3443)
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 -- * Add note about square brackets to tests README -- File Changes -- M tests/README.md (10) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/3443.patch https://github.com/rpm-software-management/rpm/pull/3443.diff -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3443 You are receiving this because you are subscribed to this thread. Message ID:___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add note about square brackets to tests README (PR #3443)
@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 receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add note about square brackets to tests README (PR #3443)
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 mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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 receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
@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 subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add internal C++ native path manipulation functions (PR #3442)
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 to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint