Re: [Rpm-maint] [rpm-software-management/rpm] RPM 4.18.2 bugfix update (PR #2744)

2023-11-10 Thread Michal Domonkos
@dmnks pushed 12 commits.

05aea6131018578d61655ac98e74903e8670fb27  Allow piping from rpm2archive
10f6c7316c44959bbaee5bdf15f101beb4b9e8cf  rpm2archive: Properly parse popt 
options
0091cc4e5b467d7d380b286f4483cf5b1b2ea364  rpm2archive: Don't print usage on no 
arguments
3189973328282e393939fae4ea51ba613cc5f166  Fix silent wait when missing input 
RPM package
369c07ebbc9b059b94027a650294b0d4712cf22e  Properly document our different macro 
types and their scopes
162e38b98f452bc703fce3bc36738599b06cbbd8  Document rpmdb --exportdb and 
--importdb switches + minor other tweaks
6cfb2e389b9809834be7299fb72461786fc381d6  Expose and document rpmdb --verifydb 
operation
6e14d41a064bef092ea33f2cf0c712de2ec4cec9  Allow SOURCE_DATE_EPOCH=0 again
896cea8066aa50e9c7edac04a8e22a4cb06268e8  Switch brp-compress to bash
defcfe1d61e1f8a76caf89274124b56c1f76f826  Split the dependency generation test 
into individual checks
23e170bf6c8f1cb35094b14a49998264615af012  Fix sbit removal if fchmodat() 
doesn't support AT_SYMLINK_NOFOLLOW
5215e08c7de2975e48b26b146625e3af697f3b4e  Document rpm2cpio as obsolete, add 
pointer to rpm2archive.

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2744/files/1e36692e1b2bff51d72eb8e18206fb687deb2d56..5215e08c7de2975e48b26b146625e3af697f3b4e
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.18.2 bugfix update (PR #2744)

2023-11-10 Thread Michal Domonkos
Added the following commits:

* 37b963fa5 Allow piping from rpm2archive
* 5e22e0c58 rpm2archive: Properly parse popt options
* 7feccb696 rpm2archive: Don't print usage on no arguments
* 37ec18d86 Fix silent wait when missing input RPM package
* f8b4c99bd Properly document our different macro types and their scopes
* e85a8a636 Document rpmdb --exportdb and --importdb switches + minor other 
tweaks
* 173b737f4 Expose and document rpmdb --verifydb operation
* bb1eeb491 Allow SOURCE_DATE_EPOCH=0 again
* 4d219ed46 Switch brp-compress to bash
* e3ab8a987 Split the dependency generation test into individual checks
* 7d3d9041a Fix sbit removal if fchmodat() doesn't support AT_SYMLINK_NOFOLLOW
* f6b47609a Document rpm2cpio as obsolete, add pointer to rpm2archive.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2744#issuecomment-1806040898
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Panu Matilainen
Merged #2758 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#event-10925576772
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Panu Matilainen
Okay, I guess we'll just merge then. Thanks for the eyeballs :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#issuecomment-1805795055
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Michal Domonkos
@dmnks approved this pull request.

Looks good!

> @@ -237,6 +273,12 @@ int main(int argc, const char *argv[])
 
 optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
 poptSetOtherOptionHelp(optCon, "[OPTIONS]* ");
+
+if (rstreq(basename(argv[0]), "rpm2cpio")) {

Clever! :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#pullrequestreview-1724705703
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -141,10 +163,20 @@ static int process_package(rpmts ts, const char * 
> filename)
exit(EXIT_FAILURE);
}
 }
-if (archive_write_set_format_pax_restricted(a) != ARCHIVE_OK) {
-   fprintf(stderr, "Error: Format pax restricted is not supported\n");
+
+if (rstreq(format, "pax")) {
+   format_code = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+} else if (rstreq(format, "cpio")) {
+   format_code = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
+} else {
+   rc = ARCHIVE_FAILED;
+}
+
+if (archive_write_set_format(a, format_code) != ARCHIVE_OK) {
+   fprintf(stderr, "Error: Format %s is not supported\n", format);

Handling of this format conversion sure feels clumsy like this, but didn't want 
to get too hung up over the silly detail.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#discussion_r1389363288
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Michal Domonkos
@dmnks commented on this pull request.



> @@ -141,10 +163,20 @@ static int process_package(rpmts ts, const char * 
> filename)
exit(EXIT_FAILURE);
}
 }
-if (archive_write_set_format_pax_restricted(a) != ARCHIVE_OK) {
-   fprintf(stderr, "Error: Format pax restricted is not supported\n");
+
+if (rstreq(format, "pax")) {
+   format_code = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+} else if (rstreq(format, "cpio")) {
+   format_code = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
+} else {
+   rc = ARCHIVE_FAILED;
+}
+
+if (archive_write_set_format(a, format_code) != ARCHIVE_OK) {
+   fprintf(stderr, "Error: Format %s is not supported\n", format);

Ugh... sorry, there *is* a `format`  var of course, from the popt setting 
:facepalm: Nevermind.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#discussion_r1389339987
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Michal Domonkos
@dmnks commented on this pull request.



> @@ -141,10 +163,20 @@ static int process_package(rpmts ts, const char * 
> filename)
exit(EXIT_FAILURE);
}
 }
-if (archive_write_set_format_pax_restricted(a) != ARCHIVE_OK) {
-   fprintf(stderr, "Error: Format pax restricted is not supported\n");
+
+if (rstreq(format, "pax")) {
+   format_code = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+} else if (rstreq(format, "cpio")) {
+   format_code = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
+} else {
+   rc = ARCHIVE_FAILED;
+}
+
+if (archive_write_set_format(a, format_code) != ARCHIVE_OK) {
+   fprintf(stderr, "Error: Format %s is not supported\n", format);

... as I suppose using `format_code` wouldn't be optimal either as it's just an 
integer code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#discussion_r1389339140
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Michal Domonkos
@dmnks commented on this pull request.



> @@ -141,10 +163,20 @@ static int process_package(rpmts ts, const char * 
> filename)
exit(EXIT_FAILURE);
}
 }
-if (archive_write_set_format_pax_restricted(a) != ARCHIVE_OK) {
-   fprintf(stderr, "Error: Format pax restricted is not supported\n");
+
+if (rstreq(format, "pax")) {
+   format_code = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+} else if (rstreq(format, "cpio")) {
+   format_code = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
+} else {
+   rc = ARCHIVE_FAILED;
+}
+
+if (archive_write_set_format(a, format_code) != ARCHIVE_OK) {
+   fprintf(stderr, "Error: Format %s is not supported\n", format);

There seems to be no `format` variable, isn't this a forgotten "need to get the 
format name from `format_code`"?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#pullrequestreview-1724683315
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] RFE: rename LONGFOO size tags to FOO (Issue #2760)

2023-11-10 Thread Panu Matilainen
All the 64bit size tags in rpm 4.x were added as secondary "long" variants to 
avoid breaking existing software and to keep within v4 specifications as much 
as we can, but for v6 where all sizes are to be 64bit, typing LONGSIZE when you 
just want SIZE wont be cutting it. 

I think we need to rename the existing "short" tags out of the way, eg 
RPMTAG_SIZE -> RPMTAG_SHORTSIZE (or OLDSIZE, there's actually some precedent 
for that) while obviously preserving the tag numbers, and make the unqualified 
SIZE tags aliases to the 64bit variants. This will break somebodys program for 
sure, but it's the lesser evil compared to having to type LONGSIZE forevermore. 
Most people still dont know such a tag even exists.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2760
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] Make rpmfiSetFX() return code meaningful (318efba)

2023-11-10 Thread Remi Collet
Make sense

Was affected, trying to build test code developed on 4.18 on EL-8 and EL-9
Finally have to ignore the return value for now

=> 
https://git.remirepo.net/cgit/tools/php-rpminfo.git/commit/?id=9f7298ac633f610af96b0b915e49596bb5520aeb

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/commit/318efbaec80a90f1d9ac76d0cd433f6ea3c103fa#commitcomment-132215177
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] Replace rpm2cpio with rpm2archive (PR #2758)

2023-11-10 Thread Panu Matilainen
@pmatilai pushed 9 commits.

7ebb3c2021f36c590a7fec2cae0762c72e57cd12  Split the two rpm2archive tests to 
separate test-cases
436d25180607100fc0d50466914656949718afc2  Use the expected rpm2cpio-like syntax 
for rpm2archive tests
1b045a8f77961ab5abe7b9bd39175f76be219aac  Fix some invalid rpm2cpio invocations 
in the test-suite
198821eeb7c426724b5d15a71fb67dcb3e872206  At least try to handle write errors 
in rpm2archive
680fb62e8de30cd6a1e9f7614d1ce3187c083a2e  Fix uid, gid and nlinks not getting 
populated by rpm2archive
d3f6a4bdd9baf324f87e6d2e3790867add747234  Add cpio format support to rpm2archive
89be9916974b757a4c2832d48ca9d30119ca9d92  Document rpm2cpio as obsolete, add 
pointer to rpm2archive.
e97fed153a77ec9b207cc42f01122da869780eed  Refactor / cleanup rpm2archive entry 
fillup a bit
b64e64004f3bbf0763d5339721ee530a2e0fa0cb  Replace rpm2cpio by rpm2archive 
entirely

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758/files/41ae1fcdcacccdc0ca2414af72ac58b5fc87db13..b64e64004f3bbf0763d5339721ee530a2e0fa0cb
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 sbit removal if fchmodat() doesn't support AT_SYMLINK_NOFOLLOW (PR #2759)

2023-11-10 Thread Panu Matilainen
Merged #2759 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2759#event-10922865994
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.18.2 bugfix update (PR #2744)

2023-11-10 Thread Michal Domonkos
Friday is the perfect release day :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2744#issuecomment-1805366104
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.18.2 bugfix update (PR #2744)

2023-11-10 Thread Panu Matilainen
Seems we have some more last-minute candidates :innocent: 
https://github.com/rpm-software-management/rpm/pull/2759 and 
https://github.com/rpm-software-management/rpm/pull/2758/commits/6773676e2e62e35d347c54f2f15e8f0354e4893b

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2744#issuecomment-1805338559
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 sbit removal if fchmodat() doesn't support AT_SYMLINK_NOFOLLOW (PR #2759)

2023-11-10 Thread Panu Matilainen
glibc versions prior to 2020 know about AT_SYMLINK_NOFOLLOW but dont 
actually implement it for fchmodat() and returns ENOSYS when used. We dont 
check the return code in removeSBITS() so this silently fails on those older 
versions.

We already verify the thing is not a link in the fstatat() condition because 
cap_set_fileat() doesnt have any dont follow mode at all, so 
we can just as well drop it from the fchmodat() and make this work on more libc 
versions.

Add a test for the suid bit removal while at it.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix sbit removal if fchmodat() doesnt support AT_SYMLINK_NOFOLLOW

-- File Changes --

M lib/fsm.c (3)
M tests/rpme.at (22)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2759
You are receiving this because you are subscribed to this thread.

Message ID: rpm-software-management/rpm/pull/2...@github.com
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint