[Rpm-maint] [rpm-software-management/rpm] rpmbuild: make it possible to not include SPEC tag (rpm-4.17 compat behavior) (Issue #2727)

2023-10-17 Thread Denys Vlasenko
For some packages, expanded specfile is so big, it causes srpm headers to 
exceed 16 mb, which then can't be extracted by old rpms (pre 4.13) - they throw 
an error, "headerRead failed: hdr data: BAD, no. of bytes(20966277) out of 
range".

The code in question is in build/pack.c:

/* Include spec in parsed and expanded form */
headerPutString(sourcePkg->header, RPMTAG_SPEC, getStringBuf(spec->parsed));

For my purposes, a magic envvar would work best, a-la

   char *NO_SPEC_TAG = getenv("RPMBUILD_NO_SPEC_TAG");

   if (!NO_SPEC_TAG || atoi(NO_SPEC_TAG) != 1) {
  /* Include spec in parsed and expanded form */
  headerPutString(sourcePkg->header, RPMTAG_SPEC, 
getStringBuf(spec->parsed));
   }




-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2727
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 OpenSSL code to newer API (PR #2723)

2023-10-17 Thread Panu Matilainen
Doesn't this bump the required OpenSSL version to something newer than 1.0.2 
which is the oldest currently supported version?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2723#issuecomment-1766431891
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 regression of mktree not always rebuilding (PR #2726)

2023-10-17 Thread Michal Domonkos
Nah, no worries. It got buried in the other refactorings in that PR anyway. I 
also didn't realize this at first even though it's kinda obvious.

The timing of you finding this is actually just perfect as it makes the other 
PR for OCI images that I'm finishing up (for a while now, lol) a little bit 
simpler.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2726#issuecomment-1766313764
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 OpenSSL code to newer API (PR #2723)

2023-10-17 Thread Panu Matilainen
I'm getting this on a local build (this code isn't getting built at all in the 
CI):

```
/home/pmatilai/repos/rpm/rpmio/rpmpgp_legacy/digest_openssl.c: In function 
‘constructRSASigningKey’:
/home/pmatilai/repos/rpm/rpmio/rpmpgp_legacy/digest_openssl.c:223:5: error: 
‘param_bld’ may be used uninitialized [-Werror=maybe-uninitialized]
  223 | OSSL_PARAM_BLD_free(param_bld);
  | ^~
/home/pmatilai/repos/rpm/rpmio/rpmpgp_legacy/digest_openssl.c:201:21: note: 
‘param_bld’ was declared here
  201 | OSSL_PARAM_BLD *param_bld = OSSL_PARAM_BLD_new();
  | ^
/home/pmatilai/repos/rpm/rpmio/rpmpgp_legacy/digest_openssl.c:224:5: error: 
‘params’ may be used uninitialized [-Werror=maybe-uninitialized]
  224 | OSSL_PARAM_free(params);
  | ^~~
/home/pmatilai/repos/rpm/rpmio/rpmpgp_legacy/digest_openssl.c:208:17: note: 
‘params’ was declared here
  208 | OSSL_PARAM *params = OSSL_PARAM_BLD_to_param(param_bld);
  | ^~
cc1: all warnings being treated as errors
```



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2723#issuecomment-1766311797
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-data not updated in test-suite (Issue #2725)

2023-10-17 Thread Panu Matilainen
Closed #2725 as completed via #2726.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2725#event-10677741902
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 regression of mktree not always rebuilding (PR #2726)

2023-10-17 Thread Panu Matilainen
Merged #2726 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2726#event-10677741626
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 regression of mktree not always rebuilding (PR #2726)

2023-10-17 Thread Panu Matilainen
Oh. Yep, I even kinda remember seeing that commit. Didn't ring a bell today 
though :laughing: 

/me feels silly for not investigating at least that much...

I indeed had a feeling that this was a pretty recent thing, but then something 
like this *can* go unnoticed for some time.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2726#issuecomment-1766302294
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] Requires in package won't upgrade required package (Discussion #2724)

2023-10-17 Thread Matej Zerovnik
Sorry about that, I should mention to you that dcgm was not built by me. Will 
ping Nvidia, but for the time being, I solved it on configuration management 
side.

As far as file goes, it might not work for every case, because dcgm_exporter 
and dcgm packages versions have to match for best compatibility and I don't 
think I can rely on the files inside pkg only. Thanks again for clarifying the 
issue.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2724#discussioncomment-7303285
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 regression of mktree not always rebuilding (PR #2726)

2023-10-17 Thread Michal Domonkos
This turned out to be a pretty recent regression (commit 
d4e808ebda3ec1d85fcdb176eae31901b74c6e91) :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2726#issuecomment-1766257916
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 regression of mktree not always rebuilding (PR #2726)

2023-10-17 Thread Michal Domonkos
Commit d4e808ebda3ec1d85fcdb176eae31901b74c6e91 added cmake caching for mktree 
so that we dont rebuild the tree on each make check 
invocation.  However, this means we can now easily miss some test dependencies 
being updated since we dont depend on everything, e.g. the data/ dir.

To fix this, instead of adding each and every file and directory as a 
dependency of the mktree.output command, just rebuild the tree every time.  The 
base image (made with DNF) is already cached anyway, and the added overhead is 
tiny and outweighs the (potential) engineering hours lost due to this.

The funny thing is, this was already fixed once in 2019: 
fc05045008d84429bf51154642e18fda70d3f256

Sometimes youve just gotta fix stuff twice before it sticks!

Fixes: 2725
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix regression of mktree not always rebuilding

-- File Changes --

M tests/CMakeLists.txt (13)
M tests/mktree.fedora (3)

-- Patch Links --

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

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


Re: [Rpm-maint] [rpm-software-management/rpm] Requires in package won't upgrade required package (Discussion #2724)

2023-10-17 Thread Panu Matilainen
Oh, I was somehow under the impression that these were all packages built by 
you, but I see the problematic one comes from some nVidia repo. First of all, 
complain to them about this. Second, see if there's a *file* in the newer 
package that the older one doesn't have, and depend on that. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2724#discussioncomment-7303084
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] Requires in package won't upgrade required package (Discussion #2724)

2023-10-17 Thread Matej Zerovnik
OK, thank you. Will have to solve that outside RPM then I guess.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2724#discussioncomment-7303054
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] Requires in package won't upgrade required package (Discussion #2724)

2023-10-17 Thread Panu Matilainen
Yes, like I said an unversioned provides will match any version at all, and 
there's nothing the requiring side can do about it.

The only way around that is to require something else that only the newer 
package provides. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2724#discussioncomment-7303041
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 OpenSSL code to newer API (PR #2723)

2023-10-17 Thread Florian Festi
@ffesti commented on this pull request.



>  if (!constructDSASigningKey(key))
 goto done;
 
 if (!constructDSASignature(sig))
 goto done;
 
-if (DSA_do_verify(hash, hashlen, sig->dsa_sig, key->dsa_key) == 1)
+pkey_ctx = EVP_PKEY_CTX_new(key->evp_pkey, NULL);
+if (!pkey_ctx)
+goto done;
+
+if (EVP_PKEY_verify_init(pkey_ctx) != 1)
+goto done;
+
+//if (EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PADDING) <= 0)
+//goto done;

Yup, It's gone now. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2723#discussion_r1361953902
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 OpenSSL code to newer API (PR #2723)

2023-10-17 Thread Florian Festi
@ffesti pushed 1 commit.

009daa3ab584b0e271f08d717c19daaa18de3eed  Move OpenSSL code to newer API

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2723/files/f23f894620350dbe35384eb22c88fbca51d0502e..009daa3ab584b0e271f08d717c19daaa18de3eed
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] Provide a decent API for verifying package signatures (Issue #2041)

2023-10-17 Thread Neal H. Walfield
Make it easy to implement `rpmkeys --list-keys` and `rpmkeys --delete-keys`.

https://github.com/rpm-software-management/rpm/issues/2404#issuecomment-1766034780

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2041#issuecomment-1766161717
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: allow overriding buildtime and hostname via environment variable (Issue #2603)

2023-10-17 Thread Florian Festi
OK, given that the `BUILDHOST` can already be set via `%_buildhost` what is 
still missing here? Or can we just close this ticket?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2603#issuecomment-1766142951
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] Requires in package won't upgrade required package (Discussion #2724)

2023-10-17 Thread Matej Zerovnik
```
# rpm -qp datacenter-gpu-manager-2.4.7-1-x86_64.rpm --provides
datacenter-gpu-manager
datacenter-gpu-manager = 1:2.4.7-1
datacenter-gpu-manager(x86-64) = 1:2.4.7-1
...
```

Is this unversioned provides the problem here? And if it is, is there something 
I can do to ignore it so I can have my package install the correct version?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2724#discussioncomment-7302103
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] Requires in package won't upgrade required package (Discussion #2724)

2023-10-17 Thread Matej Zerovnik
I have to admit this is a bit too much for me:)

Let me post the output of rpm upgrade and if you can help pointing out the 
problem, I'll be very happy:)

Environment:
```
[root@abc ~]# rpm -qa | grep dcgm_exporter
dcgm_exporter-3.1.7-6.el8.x86_64
[root@ abc ~]# rpm -qa | grep datacenter
datacenter-gpu-manager-2.4.7-1.x86_64
[root@abc ~]# rpm -qp dcgm_exporter-3.1.7-9.el8.x86_64.rpm --requires | grep 
datacenter
datacenter-gpu-manager = 1:3.2.5-1
``` 

Upgrading the package:
```
[root@abc ~]# rpm -Uvv dcgm_exporter-3.1.7-9.el8.x86_64.rpm
ufdio:   1 reads,17154 total bytes in 0.09 secs
D: == dcgm_exporter-3.1.7-9.el8.x86_64.rpm
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening  db environment /var/lib/rpm cdb:0x401
D: opening  db index   /var/lib/rpm/Packages 0x400 mode=0x0
D: locked   db index   /var/lib/rpm/Packages
D: opening  db index   /var/lib/rpm/Name 0x400 mode=0x0
D:  read h# 400
Header SHA1 digest: OK
D: added key gpg-pubkey-3abb34f8-5ffd890e to keyring
D: added subkey 0 of main key gpg-pubkey-3abb34f8-5ffd890e to keyring
D:  read h# 401
Header SHA1 digest: OK
D: added key gpg-pubkey-ef8d349f-57b6233e to keyring
D:  read h# 402
Header SHA1 digest: OK
D: added key gpg-pubkey-9e61ef26-5cabbf8a to keyring
D: added subkey 0 of main key gpg-pubkey-9e61ef26-5cabbf8a to keyring
D:  read h# 594
Header SHA1 digest: OK
D: added key gpg-pubkey-dfef9127-5db710ae to keyring
D:  read h# 603
Header SHA1 digest: OK
D: added key gpg-pubkey-2f86d6a1-5cf7cefb to keyring
D:  read h# 604
Header SHA1 digest: OK
D: added key gpg-pubkey-d42d0685-62589a51 to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D: dcgm_exporter-3.1.7-9.el8.x86_64.rpm: Header SHA256 digest: OK
D: dcgm_exporter-3.1.7-9.el8.x86_64.rpm: Header SHA1 digest: OK
ufdio:   6 reads, 8384 total bytes in 0.06 secs
D: Plugin: calling hook init in systemd_inhibit plugin
D:  read h#1293
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  added binary package [0]
D: found 0 source and 1 binary packages
D: opening  db index   /var/lib/rpm/Conflictname 0x400 mode=0x0
D: opening  db index   /var/lib/rpm/Requirename 0x400 mode=0x0
D: == +++ dcgm_exporter-3.1.7-9.el8 x86_64/linux 0x2
D: opening  db index   /var/lib/rpm/Basenames 0x400 mode=0x0
D:  read h#  28
Header V4 RSA/SHA256 Signature, key ID c21ad6ea: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: /bin/sh   YES (db files)
D:  Requires: /bin/sh   YES (cached)
D:  Requires: /bin/sh   YES (cached)
D: opening  db index   /var/lib/rpm/Providename 0x400 mode=0x0
D:  read h#1278
Header V4 RSA/SHA512 Signature, key ID d42d0685: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: datacenter-gpu-manager = 1:3.2.5-1YES (db provides)
D:  read h# 408
Header V4 RSA/SHA256 Signature, key ID c21ad6ea: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
D:  Requires: libc.so.6()(64bit)YES (db provides)
D:  Requires: libc.so.6(GLIBC_2.2.5)(64bit) YES (db provides)
D:  Requires: libdl.so.2()(64bit)   YES (db provides)
D:  Requires: libdl.so.2(GLIBC_2.2.5)(64bit)YES (db provides)
D:  Requires: libpthread.so.0()(64bit)  YES (db provides)
D:  Requires: libpthread.so.0(GLIBC_2.2.5)(64bit)   YES (db provides)
D:  Requires: libpthread.so.0(GLIBC_2.3.2)(64bit)   YES (db provides)
D:  Requires: libresolv.so.2()(64bit)   YES (db provides)
D:  Requires: libresolv.so.2(GLIBC_2.2.5)(64bit)YES (db provides)
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1YES (rpmlib 
provides)
D:  Requires: rpmlib(FileDigests) <= 4.6.0-1YES (rpmlib 
provides)
D:  Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1   YES (rpmlib 
provides)
D:  Requires: rpmlib(PayloadIsXz) <= 5.2-1  YES (rpmlib 
provides)
D:  Requires: rtld(GNU_HASH)YES (db provides)
D: opening  db index   /var/lib/rpm/Obsoletename 0x400 mode=0x0
D: == --- dcgm_exporter-3.1.7-6.el8 x86_64/linux 0x2
D: == recording tsort relations
D: == tsorting packages (order, #predecessors, #succesors, depth)
D: 0001   +dcgm_exporter-3.1.7-9.el8.x86_64
D: 1001   -dcgm_exporter-3.1.7-6.el8.x86_64
D: installing binary packages
D: closed   db index   /var/lib/rpm/Packages
D: closed   db index   /var/lib/rpm/Obsoletename
D: closed   db index   /var/lib/rpm/Conflictname
D: closed   db index   /var/lib/rpm/Providename
D: closed   db index   /var/lib/rpm/Requirename
D: closed   db index   /var/lib/rpm/Basenames
D: closed   db index

Re: [Rpm-maint] [rpm-software-management/rpm] Provide dedicated option to query fake installed RPM packages with GPG keys associated with them (Issue #2404)

2023-10-17 Thread Florian Festi
Also `gpg-pubkey` is not the prefix of the name but the actual name. Otherwise 
`rpm -q gpg-pubkey` wouldn't work. The other gibberish is the hash of the key 
stuffed in version and release to make it unique.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2404#issuecomment-1766040212
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] Provide dedicated option to query fake installed RPM packages with GPG keys associated with them (Issue #2404)

2023-10-17 Thread Florian Festi
Right place for this would be the `rpmkeys` tool. There actually already is a - 
commented out - stub for `--list-keys` and `--delete-key` waiting for someone 
to come along and implement them.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2404#issuecomment-1766034780
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-data not updated in test-suite (Issue #2725)

2023-10-17 Thread Michal Domonkos
Ack, this must be a bug then, will fix, thanks!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2725#issuecomment-1765956591
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-data not updated in test-suite (Issue #2725)

2023-10-17 Thread Panu Matilainen
When you change something in tests/data, it doesn't get automatically refreshed 
into the actual test-root (mktree.output I guess). Makes it painful to work on 
(new) tests when you change something and then nothing seems to happen.

Technically we're missing dependencies on all the data/ stuff on the check 
target, but we never had those, instead we just unconditionally copied the data 
over every time. That seems to have gotten lost in the fakechroot -> inception 
swapover.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2725
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