Re: [Rpm-maint] [rpm-software-management/rpm] Query database from my Go source code (Discussion #3308)

2024-11-04 Thread Jérôme Lanteri
Hi @pmatilai, from a golang code, i can use a C code. But i'm trying to 
understand how to query the database from the rpmlib C API.
For example, i read this documentation: [ftp.rpm looks like official but too 
old and i failed to read for whish version it is 
valuable](http://ftp.rpm.org/max-rpm/s1-rpm-rpmlib-example-code.html)
But the code is no more good for rpm-4.19.1.1
Do you know and want to share an official and maitained documentation that can 
be used to learn librpm C code to use ? Or do you know someone that know where 
i can read something and learn about this ? It is now very loing time and 
difficult to just learn to use C API librpm to me.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/3308#discussioncomment-11141929
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] Fix rpmsign --key-id with Sequoia (PR #3423)

2024-11-04 Thread Panu Matilainen
Commit d99186f2ef6fc0dfaaefe599a98492a84fd18940 failed to update the popt alias 
to the new macro. So --key-id with gpg continued to work but not with sq - just 
goes to so what you don't test is broken by definition.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3423

-- Commit Summary --

  * Fix rpmsign --key-id with Sequoia

-- File Changes --

M rpmpopt.in (2)
M tests/rpmsigdig.at (16)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3423.patch
https://github.com/rpm-software-management/rpm/pull/3423.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3423
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 native C++ macro API + use it to replace manual macro locking (PR #3408)

2024-11-04 Thread Michal Domonkos
@dmnks approved this pull request.

Other than the note above, looks good to me.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#pullrequestreview-2413023639
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 native C++ macro API + use it to replace manual macro locking (PR #3408)

2024-11-04 Thread Panu Matilainen

Oh, thanks for spotting, I'll fix it up.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#issuecomment-2454681833
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] Fix rpmsign --key-id with Sequoia (PR #3423)

2024-11-04 Thread Panu Matilainen

(gah, sure is Monday when you need so many fixups to messages etc for a patch 
this small)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3423#issuecomment-2454361476
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] Fix rpmsign --key-id with Sequoia (PR #3423)

2024-11-04 Thread Panu Matilainen
@pmatilai pushed 1 commit.

004c9201bdaf7b92cea52c4a9291292c887938a8  Fix rpmsign --key-id with Sequoia

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3423/files/3fff6d45e7c085c93666b50b475acce75e410615..004c9201bdaf7b92cea52c4a9291292c887938a8
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] fake or updated manual should be removed (Discussion #3425)

2024-11-04 Thread Jérôme Lanteri
I'm trying to learn something but it is a lot of time consumed for nothing as 
long as official manual online are wrong or missing crucial information (as 
whish version the manual is usable with).
I'm asking for RedHat company to provide an updated manual about how to use 
there C API and remove eronous/outdated posts/manual or at minimu, to document 
the version usable by the old manual.
It is an option maybe to use an exemple code on the API about how to use 
functions together.
Even to just subscribe in mailing list to ask somnething doesn't works as 
expected from your own indication online: [no, it doesn't works as expected: 
you will be rejected from this email at subscribe 
time](http://ftp.rpm.org/max-rpm/s1-rpm-resources-where-to-talk.html)
To know something is good, but to share the knowledge is not a bad idea and it 
seems to be difficult. There is something to improve there.
Is there any will at RedHat company to update the documentation, the manuals 
and in general, to provide information on how to use the API in C (or at least 
to provide information on which version the documentation refers to) ?
Thank you for all your good intention.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/3425
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 db does not upgrades when upgrading from `4.11.3` to `4.18.2` (Issue #3420)

2024-11-04 Thread Manuel Cano

Hi @mlschroe! Thanks for your answer. 

So how could I migrate the old db data to the new rpm version but still be able 
to modify the migrated data by updating/installing/deleting packages with the 
the new rpm version?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3420#issuecomment-2454514154
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] Sanitize signing operation output (PR #3424)

2024-11-04 Thread Panu Matilainen
Only output filenames on addsign/delsign success on verbose mode, no news is 
good news. Previusly we emitted non-sensical messages like this:

   /some/path/my-1.rpm:
   /some/path/my-2.rpm:

...presumably in anticipation of error messages, but it's saner to have 
error messages carry the path where relevant.

Loosely related to the multiple signatures stuff - this was driving me crazy 
when writing tests.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3424

-- Commit Summary --

  * Run all signing tests with runroot since we now can
  * Sanitize rpmsign --addsign/--delsign output

-- File Changes --

M sign/rpmgensig.cc (14)
M tests/atlocal.in (1)
M tests/rpmsigdig.at (66)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3424.patch
https://github.com/rpm-software-management/rpm/pull/3424.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3424
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 native C++ macro API + use it to replace manual macro locking (PR #3408)

2024-11-04 Thread Michal Domonkos

The first commit seems to have forgotten to update the `doExpandMacros()` call 
in `rpmExpandMacros()` where it still passes a C string (despite the function 
expecting a C++ string reference instead). The call is later refactored in a 
followup commit in this PR but maybe it should still be fixed for bisectability.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#issuecomment-2454386973
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 db does not upgrades when upgrading from `4.11.3` to `4.18.2` (Issue #3420)

2024-11-04 Thread Michael Schroeder

We removed support for BerkeleyDB in rpm 4.17.0, so your new rpm does not see 
the old database.

There's still a way to read old databases if you add the `--enable-bdb-ro` 
option to the `autogen.sh` call. But the new rpm cannot modify the database. 
The idea is that you use `rpm --rebuilddb` to convert to a supported database 
format (i.e. sqlite).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3420#issuecomment-2454389864
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 rpmlogOnce() and rpmlogReset() (PR #3417)

2024-11-04 Thread Florian Festi
@ffesti commented on this pull request.



> @@ -22,6 +23,7 @@ struct rpmlogCtx_s {
 unsigned mask;
 int nrecsPri[RPMLOG_NPRIS];
 std::vector recs;
+std::map, int>> seen;

Yeah, I thought about using an unordered map in the beginning and then opted to 
go for the normal map just in case.

Good I did because I might not have been able to make the unordered_map work 
right away. The missing hash function for pairs gives a pretty long compiler 
message. But I got it working now.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#discussion_r1827335472
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 rpmlogOnce() and rpmlogReset() (PR #3417)

2024-11-04 Thread Florian Festi
@ffesti pushed 2 commits.

d0b48668e20fd1e60a70f770bd804a88d1a7fafd  Add rpmlogOnce() and rpmlogReset()
6be14bd24eb29087c5d82b370a12988af4c057a2  Use rpmlogOnce() in handleHdrVS

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417/files/7b3377bb0c2bff99a06c5dd4d3aa7ef560549ccf..6be14bd24eb29087c5d82b370a12988af4c057a2
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 rpmlogOnce() and rpmlogReset() (PR #3417)

2024-11-04 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -22,6 +23,7 @@ struct rpmlogCtx_s {
 unsigned mask;
 int nrecsPri[RPMLOG_NPRIS];
 std::vector recs;
+std::map, int>> seen;

Oh, interesting. It didn't really even occur to me that you'd need to define a 
hash for it when map didn't require any custom comparison stuff for this 
structure. That's something to keep in mind.

Water gets deep very suddenly in C++ - on one line you're operating on 
ridiculously high level and on the next one you run into an absurdly long 
compiler error because you failed to define some low-level detail you'd kinda 
expect the compiler to do for you because this is all standard datatypes. 
Python it is not :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#discussion_r1827359674
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 rpmlogOnce() and rpmlogReset() (PR #3417)

2024-11-04 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -22,6 +23,7 @@ struct rpmlogCtx_s {
 unsigned mask;
 int nrecsPri[RPMLOG_NPRIS];
 std::vector recs;
+std::map, int>> seen;

Another note is that it's good to document such things in the commit message: 
map worked out of the box, unordered_map didn't - had it been there, I wouldn't 
have even brought this up.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#discussion_r1827363944
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 rpmlogOnce() and rpmlogReset() (PR #3417)

2024-11-04 Thread Panu Matilainen
Merged #3417 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#event-15100079278
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 rpmLogOnce to filter log message (Issue #3395)

2024-11-04 Thread Panu Matilainen
Closed #3395 as completed via 547ba089313be46861fe1f5b21fbe887205697c2.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3395#event-15100079526
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 rpmLogOnce to filter log message (Issue #3395)

2024-11-04 Thread Panu Matilainen
Closed #3395 as completed via #3417.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3395#event-15100079624
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] Unknown keyid warning is tied to process lifetime (Issue #3336)

2024-11-04 Thread Panu Matilainen
Closed #3336 as completed via #3417.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3336#event-15100079529
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] Use consistent case in signature and key messages (PR #3426)

2024-11-04 Thread Panu Matilainen

Oh and FWIW, there will be other changes to the messages coming through #3385. 
Those changes are best discussed in that ticket, I just think this is obvious 
enough not to require prior discussion.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3426#issuecomment-2456460376
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] RFE: add support for multiple OpenPGP signatures per package (Issue #3385)

2024-11-04 Thread Panu Matilainen

Folks wanting to discuss pros and cons of detached signatures are welcome to do 
so in the [relevant 
topic](https://github.com/rpm-software-management/rpm/discussions/2789) but is 
off-topic here, and has now been flagged such. This ticket is about a new form 
of embedded signatures in rpm 6.0. Thank you.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3385#issuecomment-2456474815
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] Use consistent case in signature and key messages (PR #3426)

2024-11-04 Thread Florian Festi

What about "Header"?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3426#issuecomment-2456444289
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] Use consistent case in signature and key messages (PR #3426)

2024-11-04 Thread Panu Matilainen

Header (and Payload) only appear as the first word on the line where upper case 
seems appropriate.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3426#issuecomment-2456446131
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] Use consistent case in signature and key messages (PR #3426)

2024-11-04 Thread Panu Matilainen
The signature and key related messages are a historical mess of inconsistency, 
we have at least the following in closely related messages that happen under 
slightly different circumstances:
- Header V4 RSA/SHA256 Signature
- RSA signature: NOTFOUND
- signatures OK
- key ID
- Key Fingerprint

Just use lower case consistently for everything but acronyms, so the above 
becomes
- Header V4 RSA/SHA256 signature
- RSA signature: NOTFOUND
- signatures OK
- key ID
- key fingerprint

This will no doubt break somebody's fine-tuned script but we're 
breaking them in 6.0 anyhow so this is the right time for this kind of cleanup.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3426

-- Commit Summary --

  * Use consistent case in signature and key messages

-- File Changes --

M lib/rpmvs.cc (2)
M rpmio/rpmpgp.cc (2)
M tests/rpmi.at (16)
M tests/rpmpython.at (4)
M tests/rpmquery.at (2)
M tests/rpmsigdig.at (132)
M tests/rpmvfylevel.at (6)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3426.patch
https://github.com/rpm-software-management/rpm/pull/3426.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3426
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] Use consistent case in signature and key messages (PR #3426)

2024-11-04 Thread Panu Matilainen

Loosely related to the multiple signatures stuff - this was driving me crazy 
when writing tests.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3426#issuecomment-2456399807
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] Use consistent case in signature and key messages (PR #3426)

2024-11-04 Thread Panu Matilainen

(also, all the Signature/signature case differences while "digest" 
was consistently "digest")

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3426#issuecomment-2456403611
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] Evolution of the RPM package format (Discussion #3349)

2024-11-04 Thread Jérôme Lanteri
@pmatilai It's interesting to know all this history. Thank you for this time 
dedicated to the RedHat culture that explains things.
Would it be humanly conceivable to dare to ask that the old online manual can 
indicate to which version of librpm it refers, but also to use the same time 
possibly to write an updated version of the manual for the existing versions? 
So that, in addition, it becomes possible without tearing one's hair out, to 
learn how to use the API in C.
Thank you for all this humility and all these good intentions.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/3349#discussioncomment-11142235
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 native C++ macro API + use it to replace manual macro locking (PR #3408)

2024-11-04 Thread Michal Domonkos

> The call is later refactored in a followup commit

Ehm, I take that back, it's not fixed in the latest commit either, it still 
passes on a C string :sweat_smile: 



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#issuecomment-2454699861
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 native C++ macro API + use it to replace manual macro locking (PR #3408)

2024-11-04 Thread Panu Matilainen

Right, I initially thought it was something else.

This isn't a problem at all, C++ will merrily construct temporary string 
objects in a case like this. The other direction wont work though :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#issuecomment-2454703999
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 native C++ macro API + use it to replace manual macro locking (PR #3408)

2024-11-04 Thread Michal Domonkos

Ack, I wondered if that was the case, thanks :smile:

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#issuecomment-2454705932
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 native C++ macro API + use it to replace manual macro locking (PR #3408)

2024-11-04 Thread Michal Domonkos
Merged #3408 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#event-15103936793
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