Re: [Rpm-maint] [rpm-software-management/rpm] Add macro '%-x**' containing all occurrences of the flag '-x' (PR #2449)

2023-03-24 Thread Ralf Habacker
This pull request required several push forces because the master branch of rpm on openSUSE 15.4 could not be built due to the missing package rpm-sequoia. The patch was therefore developed on rpm-4.14.x and ported to the master branch. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Don't let macro '%-x' add extra space between flag and argument (PR #2455)

2023-03-24 Thread Ralf Habacker
This pull request required several push forces because the master branch of rpm on openSUSE 15.4 could not be built due to the missing package `rpm-sequoia`. The patch was therefore developed on rpm-4.14.x and ported to the master branch. -- Reply to this email directly or view it on

Re: [Rpm-maint] [rpm-software-management/rpm] Add macro '%-x**' containing all occurrences of the flag '-x' (PR #2449)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 5 commits. c58523210de4b634b88234f62356afacc5f545d9 Add test case for macro '%-x' 9e68081107b48927844cdf41d842b07451296893 Don't let macro '%-x' add extra space between flag and argument 13ee56a4a4c3260f6c4742729d6b178361d83338 Fix documentation of macro '%-x'

Re: [Rpm-maint] [rpm-software-management/rpm] Don't let macro '%-x' add extra space between flag and argument (PR #2455)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 2 commits. 9e68081107b48927844cdf41d842b07451296893 Don't let macro '%-x' add extra space between flag and argument 13ee56a4a4c3260f6c4742729d6b178361d83338 Fix documentation of macro '%-x' -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Don't let macro '%-x' add extra space between flag and argument (PR #2455)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 1 commit. 86a6bac1a673baa386990487584a2f5c7e0aae72 Fix documentation of macro '%-x' -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2455/files/3555d4ba148abda108704d4e494841fba4f8f24f..86a6bac1a673baa386990487584a2f5c7e0aae72 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Don't let macro '%-x' add extra space between flag and argument (PR #2455)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 2 commits. c58523210de4b634b88234f62356afacc5f545d9 Add test case for macro '%-x' 3555d4ba148abda108704d4e494841fba4f8f24f Don't let macro '%-x' add extra space between flag and argument -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Don't let macro '%-x' add extra space between flag and argument (PR #2455)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 1 commit. 490824b1890e35873a651de714db85ef7947222c Don't let macro '%-x' add extra space between flag and argument -- View it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Don't let macro '%-x' add extra space between flag and argument (PR #2455)

2023-03-24 Thread Ralf Habacker
Fixes #2454 You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2455 -- Commit Summary -- * Add test case for macro %-x * Dont let macro %-x add extra space between flag and argument -- File Changes -- M rpmio/macro.c

Re: [Rpm-maint] [rpm-software-management/rpm] Resolve --what arguments to package provides (PR #2451)

2023-03-24 Thread Michael Schroeder
Wouldn't you also want to do a `rpmdsCompare` like in `checkInstDeps`? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2451#issuecomment-1482859306 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Add pgpVerifySignature2 (PR #2453)

2023-03-24 Thread Neal H. Walfield
@nwalfield commented on this pull request. > @@ -276,7 +276,18 @@ rpmRC rpmKeyringVerifySig(rpmKeyring keyring, > pgpDigParams sig, DIGEST_CTX ctx) pgpkey = key->pgpkey; /* We call verify even if key not found for a signature sanity check */ - rc =

Re: [Rpm-maint] [rpm-software-management/rpm] Add pgpVerifySignature2 (PR #2453)

2023-03-24 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -276,7 +276,18 @@ rpmRC rpmKeyringVerifySig(rpmKeyring keyring, > pgpDigParams sig, DIGEST_CTX ctx) pgpkey = key->pgpkey; /* We call verify even if key not found for a signature sanity check */ - rc =

[Rpm-maint] [rpm-software-management/rpm] Macro %-x modifies original flag if argument follows without intervening space (Issue #2454)

2023-03-24 Thread Ralf Habacker
See the following example: ``` $rpm --version RPM version 4.14.3 $ rpm --define '%foo(b:) %{-b}' --eval '%foo -b2' -b 2 ``` The macro adds a space between flag and argument, which may affect passing to applications as shown by the following example: ``` $ python3 -bb Python 3.6.15 (default, Sep

[Rpm-maint] [rpm-software-management/rpm] Add pgpVerifySignature2 (PR #2453)

2023-03-24 Thread Neal H. Walfield
Add a new function, pgpVerifySignature2. pgpVerifySignature2 is like pgpVerifySignature, but optionally returns a descriptive error message (in the case of failure) or a lint (in the case of success). This requires rpm-sequoia 1.4 or later. See

Re: [Rpm-maint] [rpm-software-management/rpm] Return better error codes from the crypto backends (Issue #2127)

2023-03-24 Thread Neal H. Walfield
That sounds good. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2127#issuecomment-1482648489 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Return better error codes from the crypto backends (Issue #2127)

2023-03-24 Thread Panu Matilainen
Based on the number of new crypto related issues folks are running into on Fedora, maybe we should consider some emergency bandaid for better error messages. Such as simply a new pgpVerifySignature() variant which has an additional `char **emsg` argument to return a message from the lower

Re: [Rpm-maint] [rpm-software-management/rpm] Add macro '%-x**' containing all occurrences of the flag '-x' (PR #2449)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 4 commits. 588fe4e589e93df6c55f2561a4239469a894bb1e Add macro '%-x**' containing all occurrences of the flag '-x' or '-x '. 9ce95f236aa9b93a2a7f57e0748d7fcaa793dc46 Add test case for macro '%-x**' c720f1c535f3e9fd3839dbd96a5c2a8a6c0e33ca Fix documentation of macro '%-x'

Re: [Rpm-maint] [rpm-software-management/rpm] Could not build rpm from master branch with cmake - No package 'libmagic' found (Issue #2452)

2023-03-24 Thread Panu Matilainen
Yup, this is a dupe of #2246 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2452#issuecomment-1482626529 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Could not build rpm from master branch with cmake - No package 'libmagic' found (Issue #2452)

2023-03-24 Thread Panu Matilainen
Closed #2452 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2452#event-8837433190 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

[Rpm-maint] [rpm-software-management/rpm] Could not build rpm from master branch with cmake - No package 'libmagic' found (Issue #2452)

2023-03-24 Thread Ralf Habacker
I'm trying to build rpm from master branch on openSUSE 15.4 and got a build failure: cd ~ git clone https://github.com/rpm-software-management/rpm.git $ cmake -S rpm -B rpm-build -- The C compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info

Re: [Rpm-maint] [rpm-software-management/rpm] Documentation does not mention %** to get all macro parameter (Issue #2444)

2023-03-24 Thread Ralf Habacker
Closed #2444 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2444#event-8837071118 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Add macro '-x**' containing all occurrences of the flag '-x' (PR #2449)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 4 commits. 55e823552a77d32e091029a3de3b1de7b11583ca Add macro '%-x**' containing all occurrences of the flag '-x' or '-x '. e367ec02c4b9225c256539016f46dc3f3fdfb856 Add test case for macro '%-x**' 9c675a153c73e7fd9d168c63a6b0cdd2a1a04856 Fix documentation of macro '%-x'

Re: [Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)

2023-03-24 Thread Panu Matilainen
@pmatilai commented on this pull request. > +long int pagesize = sysconf(_SC_PAGESIZE); +long int pages = sysconf(_SC_PHYS_PAGES); + +if (pagesize < 0) + pagesize = 4096; +if (pages > 0) + mem = pages * pagesize; + +return mem; +} + +static unsigned long

Re: [Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)

2023-03-24 Thread Panu Matilainen
@pmatilai commented on this pull request. > + * Conservative estimates for thread use on 32bit systems where address + * space is an issue: 2GB for bare metal, 3GB for a 32bit process + * on a 64bit system. + */ +if (thread) { + unsigned long vmem = mem; +#if

Re: [Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)

2023-03-24 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -1174,6 +1177,89 @@ static void doShescape(MacroBuf mb, rpmMacroEntry me, > ARGV_t argv, size_t *parse mbAppend(mb, '\''); } +static unsigned long getmem_total(void) +{ +unsigned long mem = 0; +long int pagesize =

Re: [Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)

2023-03-24 Thread Panu Matilainen
@pmatilai pushed 3 commits. c013e36fa47006ef8598a74450e709911a2a0b9d Add optional total/proc/thread arguments to %{getncpus} macro 758e92b4b4d94792387c8999d2a258cd18225020 Make rpmio parallelism memory aware 73dad5c636524d1dec6f22df7de2a6a669ebbc70 Make build parallelism memory and

Re: [Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)

2023-03-24 Thread Panu Matilainen
@pmatilai commented on this pull request. > + * Conservative estimates for thread use on 32bit systems where address + * space is an issue: 2GB for bare metal, 3GB for a 32bit process + * on a 64bit system. + */ +if (thread) { + unsigned long vmem = mem; +#if

Re: [Rpm-maint] [rpm-software-management/rpm] Add macro '-x**' containing all occurrences of the flag '-x' (PR #2449)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 2 commits. b5d78ba8a14541f3a6c5d92139f26dbf6ffc1eb5 Add macro '-x**' containing all occurrences of the flag '-x' or '-x '. 7bdc64e64f41df099ee2d3920e68e7c90f92a59b Add test case for macro '%-x**' -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Resolve --what arguments to package provides (PR #2451)

2023-03-24 Thread Panu Matilainen
Oh, and this will need tests before merging, but I'd rather gather some feedback first on the default behavior etc. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2451#issuecomment-1482425084 You are receiving this because you are

Re: [Rpm-maint] [rpm-software-management/rpm] Add documentation and test case for shell like macro '%**' (PR #2445)

2023-03-24 Thread Panu Matilainen
Thanks for the patch! -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2445#issuecomment-1482422113 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Add documentation and test case for shell like macro '%**' (PR #2445)

2023-03-24 Thread Panu Matilainen
Merged #2445 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2445#event-8835943095 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Resolve --what arguments to package provides (PR #2451)

2023-03-24 Thread Panu Matilainen
As the commit message speculates, changing the default behavior is going to break something somewhere, but if we keep the default behavior then we'll get bugs like #2439 until the end of times. Thoughts welcome on the default behavior and naming (always the tough part). I don't really want to

[Rpm-maint] [rpm-software-management/rpm] Resolve --what arguments to package provides (PR #2451)

2023-03-24 Thread Panu Matilainen
One of the recurring bugs reported on rpm is that --whatrequires returns unexpected results because it only queries for the literal capability string passed as argument whereas people usually *mean* all dependencies of that package. Change --whatrequires and friends to resolve the argument to

Re: [Rpm-maint] [rpm-software-management/rpm] Add documentation for shell like macro '%**' (PR #2445)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 1 commit. 014b6435cf80c6b28bdc95601cf5f14ae681353a Add test case for macro '%**' -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2445/files/4147a8490465398db6c3361be7e4d4a9616ceba6..014b6435cf80c6b28bdc95601cf5f14ae681353a You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Add macro '-x**' containing all occurrences of the flag '-x' (PR #2449)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 2 commits. e5bddc4664cb7aab65089caa6d9da6499326bb78 Add macro '-x**' containing all occurrences of the flag '-x' or '-x '. ab8341d28b4b6a896bfddc7a38a45f1af60171d6 Add test case for macro '%-x**' -- View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add macro '-x**' containing all occurrences of the flag '-x' (PR #2449)

2023-03-24 Thread Ralf Habacker
@rhabacker pushed 2 commits. 51c001aea91e99ee860e46fdcd4a96b9ac50304f Add macro '-x**' containing all occurrences of the flag '-x' or '-x '. b38f87edc9aa7d76afa83cb6b1b0f0aa2ae51e5d Add test case for macro '%-x**' -- View it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] RFE: resolve --what argument to package provides (Issue #2450)

2023-03-24 Thread Panu Matilainen
A common gotcha with --whatrequires and friends is that people pass a package name and expect in return anything that depends on the package one way or another (as per common sense, and like most versions of repoquery behave), but rpm only returns matches for the passed capability. To return