Re: [Rpm-maint] [rpm-software-management/rpm] Switch most of rpm over to C++ (PR #3028)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 1 commit. 4e5b6d0c8886376d6e1ccc90e80db80f0953d3a5 Remove the WITH_CXX option, this is a one-way street -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3028/files/70505942562da081e207ea908e090bc7e1c095ff..4e5b6d0c8886376d6e1ccc90e80db80f0953d3a5 You a

Re: [Rpm-maint] [rpm-software-management/rpm] Switch most of rpm over to C++ (PR #3028)

2024-04-08 Thread Panu Matilainen
This is (very) obviously a case of "things will get worse before they get better", these casts are just unsightly but most will go away once converted to actual native C++. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3028#issuecommen

[Rpm-maint] [rpm-software-management/rpm] Switch most of rpm over to C++ (PR #3028)

2024-04-08 Thread Panu Matilainen
As per https://github.com/rpm-software-management/rpm/discussions/2983, here goes. More details in commits, but to summarize: add necessary casts to most of the codebase to make it buildable with a c++ compiler, and then switch over to c++. Exempt from this conversion are - Python bindings: th

Re: [Rpm-maint] [rpm-software-management/rpm] Add + use rpmdsIsSysuser() API for testing and decoding sysuser provides (PR #3025)

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

Re: [Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

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

Re: [Rpm-maint] [rpm-software-management/rpm] Add + use rpmdsIsSysuser() API for testing and decoding sysuser provides (PR #3025)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 2 commits. 203263be11a696cf68fe6036b8ab66eed7e2eee1 Add rpmdsIsSysuser() function for testing and decoding sysusers provides a5dcb847073bb09141d81c509a5320f22dbc60c1 Take advantage of rpmdsIsSysuser() for the tag extension + psm code -- View it on GitHub: https://github.com/

Re: [Rpm-maint] [rpm-software-management/rpm] Add the "issuer fingerprint" subpacket type (PR #3026)

2024-04-08 Thread Panu Matilainen
Yeah it'd be good to get rid of this stuff. There will be a soname bump for 6.0 so there's the next chance, it's not like anything besides rpm itself is likely to use this silly API. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3026#i

Re: [Rpm-maint] [rpm-software-management/rpm] Add the "issuer fingerprint" subpacket type (PR #3026)

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

Re: [Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 3 commits. 43f3f524ce49cb2033899bcbac96a6d2554d0743 Make rpmTagType an integer type to avoid complications 3f3d29c13514c069ef18c587b6bd8d9161bb89fa Fixup enum/int mismatches in header format extensions b64f6829bd4fbbcf2b251199ff802d17496bfce7 Drop unnecessary initialization f

Re: [Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 1 commit. c9eb1168ee87c51a19e8f9c690d5b03ae440d09a Fixup missed constification in Lua readline callback -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3027/files/fce005ff536484795f411e4bf088320ebe178ed6..c9eb1168ee87c51a19e8f9c690d5b03ae440d09a You a

Re: [Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 3 commits. bcf0419d184d5e153c68eecd7985e04739bc4e5c Handle Lua header C++ guards centrally in rpmlua.h 94be1b2f5270fbfce8fce23791ba65c9f442d513 Make rpmmacro_internal.h self-standing, ie include what you use fce005ff536484795f411e4bf088320ebe178ed6 Fix pointer bogosity in rpm

Re: [Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 1 commit. 39ff81eb2ce8de5fc5a3fdb801220a7264518f18 Fix pointer bogosity in rpmlog callback -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3027/files/7cabc280e58bc3cacfa30c94a3cd163a351db13f..39ff81eb2ce8de5fc5a3fdb801220a7264518f18 You are receiving

Re: [Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 5 commits. ec42ecc12aa7d887684071d23be96f99440fa703 Avoid jumping over variable declarations 90b1cc863e8e00feb941b0cb754cba52cb021100 Add c++ guard to ndb internal headers 249c5b1fa972a6aa7342810fc2ec14f06868f516 Use the actual rpmRC enum in ndb where relevant for internal AP

Re: [Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

2024-04-08 Thread Panu Matilainen
@pmatilai pushed 1 commit. 6c78a520cf7b763ed2d8421c81d82bc5080ba176 Make rpmmacro_internal.h self-standing, ie include what you use -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3027/files/66ddacb151fab80e09cb869bd3e292057ece2dbf..6c78a520cf7b763ed2d8421c81d82bc5080

[Rpm-maint] [rpm-software-management/rpm] Another batch of c++ preparation trivia (PR #3027)

2024-04-08 Thread Panu Matilainen
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3027 -- Commit Summary -- * Avoid jumping over variable declarations * Add c++ guard to ndb internal headers * Use the actual rpmRC enum in ndb where relevant for internal

Re: [Rpm-maint] [rpm-software-management/rpm] Add c++ guards to internal headers and sources as needed (401d845)

2024-04-08 Thread Michael Schroeder
This breaks the build if IMA support is not configured and there is no imaevm.h header file. You need to put a `#ifdef WITH_IMAEVM` around the `#include "rpmsignfiles.h"` in sign/rpmgensig.c -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/comm

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a decent API for verifying package signatures (Issue #2041)

2024-04-08 Thread Neal H. Walfield
As @mlschroe points out [here](https://github.com/rpm-software-management/rpm/issues/2004#issuecomment-2042078749), there should be a mechanism to update a certificate. That is, rather than importing or replacing a certificate, it should merge in certificate updates. Perhaps we should have a

Re: [Rpm-maint] [rpm-software-management/rpm] PGP key identifiers use binding signature's creation time, not certificate creation time (Issue #2004)

2024-04-08 Thread Neal H. Walfield
> You can't trust keys.openpgp.org to only return key material for the query, > so you need to check the returned data to make sure it doesn't contain an > extra pubkey. Yes. Your trust root is the fingerprint (which is what is normally authenticated--if anything is authenticated at all), and

[Rpm-maint] [rpm-software-management/rpm] Add the "issuer fingerprint" subpacket type (PR #3026)

2024-04-08 Thread Michael Schroeder
This subpacket is an alternative to the "issuer keyid" subpacket. It contains the pubkey version plus the complete fingerprint. I would prefer to drop all the subpacket definitions from the rpm code, as rpm has no business dealing with subpackets. Unfortunately `pgpValString(PGPVAL_SUBTYPE, val

Re: [Rpm-maint] [rpm-software-management/rpm] PGP key identifiers use binding signature's creation time, not certificate creation time (Issue #2004)

2024-04-08 Thread Michael Schroeder
You can't trust keys.openpgp.org to only return key material for the query, so you need to check the returned data to make sure it doesn't contain an extra pubkey. It would be safe if rpmkeys had a `--freshen` option that makes sure no new pubkeys are imported. -- Reply to this email directly

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for setting the build time and clamping to the build time (PR #2944)

2024-04-08 Thread Michael Schroeder
Oh wait, I can do this myself. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2944#issuecomment-2042071468 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for setting the build time and clamping to the build time (PR #2944)

2024-04-08 Thread Michael Schroeder
In the light of the xz attack, could you please remove me from the list of people that have direct push rights to the rpm code? I don't see why I would need it because everything is done with pull requests, and it's just increasing the attack surface. -- Reply to this email directly or view it