Re: [Rpm-maint] [rpm-software-management/rpm] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
#781 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746702064 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
Seems dup of #797 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746700437 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
Seems I figured out. After installing deps from file generated by `-bs` some macroses appear. that's what is changed in environment. So the bug is: not generating `.buildreqs.nosrc.rpm`. If it was generated, bug would not happen. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746648425 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
@pmatilai there are no difference. Really. I have provided part of the shell script. Tell me how to debug, please. I strongly consider there is a bug in RPM, but con not knock it down. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746632944 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
Rpm doesn't use the dependencies recorded into an src.rpm in any circumstance, the spec is always reparsed. I don't know what the difference between rpmbuild -bs and -br is in your environment, but that's where the issue is. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746629087 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
Interesting... `-rr --nodeps` rewrites .src.rpm in a way that `dnf` INSTALLS `pkgconfig(systemd)` afterwards. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746625208 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
@pmatilai sorry for not explaining clearly. Seems it is another bug. When `-rr` says error about missing deps but does not generate `.buildreqs.nosrc.rpm` in some conditions. In generally – yes, it works as expected. Especially on pyproject srpms, where 3-5 iterations are possible. please reopen -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746597606 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
@pmatilai sorry for bash script, but I want just show what happens in our build script: ```bash unpriv rpmbuild "${defines[@]}" -bs "$spec_file" --rmspec srpm=("$RPMBUILD"/SRPMS/*.src.rpm) while :; do unpriv rpmbuild "${defines[@]}" -rr "$srpm" && exit_code=0 || exit_code=$? case "$exit_code" in 0) break ;; 11) reqsrpm=("$RPMBUILD"/SRPMS/*.buildreqs.nosrc.rpm) if [ -f "$reqsrpm" ]; then install_deps "$reqsrpm" rm -f "$reqsrpm" else install_deps "$srpm" fi ;; *) echo "rpmbuild -rr FAILED code $exit_code" >&2 exit 42 ;; esac done ``` And on this package it falls into endless loop. Note, environment is exactly the same on both rpmbuild runs. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746578126 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
@pmatilai I always run everything in a clear environment. i.e. in the container, yes. Does `rpmbuild -rr` re-parse .spec-file ? Thought it does not. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746570147 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
Oh, I see it now. Try 'rpmspec --parse frr.spec' to see how it looks to rpm, and it becomes quite clear. The pkgconf(systemd) dependency comes from the `%{?selinux_requires}` macro. And if rpmbuild -bs is executed in an environment where that macro is not defined then it will miss those defines and no error message will be emitted because it's a conditional macro like that. No bug here. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746550558 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
Closed #2690 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#event-10548896970 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
I suggest you try reproducing it in a different environment. A clean container image or such. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746536531 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
The one thing -bs and -br *will* disagree with is dynamic buildrequires from %generate_buildrequires. I don't see that in the src.rpm but I don't know what macros and stuff you may have locally. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746532629 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
@pmatilai Commented things – are my lines – I did not remove after experiments. Yes, our scripts build `.src.rpm` from `.spec` file and then (in the same environment) install build deps. The problem that `rpmbuild -rr` says about missing deps, but `dnf builddep` does not install them (does not see them). -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746512482 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
BTW, it's also technically possible to (externally) rewrite the specfile after launching a build on it, and end up with wildly different in the src.rpm than what the build was launched with. It would be a nasty thing to do of course, but technically possible, and could explain oddities like this when external build scripts are involved. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746421744 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
The dependencies recorded in an src.rpm are only valid for the environment (including any cli-switches) it was generated in. It's entirely possible to end up with something quite different on a spec reparse, which is what happens on any build. As for pkg-config deps, I see this in the spec, which makes me wonder: ``` # . # BuildRequires: pkgconfig(systemd) # BuildRequires: selinux-policy-devel ``` I can't reproduce any pkgconfig deps appearing in the build, and I can't imagine rpm hallucinating them up either (this is certainly not AI :sweat_smile: ). I suggest you double check your findings. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1746412779 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
Moreover, I don't understand how it appears in this srpm file. This file was made in our build scripts. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690#issuecomment-1745146423 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] Wrong src RPM deps parsing by rpmbuild (Issue #2690)
`rpm -qRp /home/fedora/rpmbuild/SRPMS/frr-8.5.2-2.1696341206.16.8ff8ce50.utm.src.rpm`: gives the following: ``` ... perl-XML-LibXML perl-generators python3-devel ... ``` That's OK. Nothing about pkgconfig. Now, try to build it: `su --login --shell=/usr/bin/env fedora -- "PATH=$PATH" "HOME=/home/fedora" rpmbuild --verbose --debug -rr /home/fedora/rpmbuild/SRPMS/frr-8.5.2-2.1696341206.16.8ff8ce50.utm.src.rpm` ``` Last login: Tue Oct 3 14:43:10 UTC 2023 on pts/0 Installing /home/fedora/rpmbuild/SRPMS/frr-8.5.2-2.1696341206.16.8ff8ce50.utm.src.rpm D: loading keyring from rpmdb D: PRAGMA secure_delete = OFF: 0 D: PRAGMA case_sensitive_like = ON: 0 D: read h# 1 Header SHA256 digest: OK Header SHA1 digest: OK D: added key gpg-pubkey-5323552a-6112bcdc to keyring D: /home/fedora/rpmbuild/SRPMS/frr-8.5.2-2.1696341206.16.8ff8ce50.utm.src.rpm: Header SHA256 digest: OK D: /home/fedora/rpmbuild/SRPMS/frr-8.5.2-2.1696341206.16.8ff8ce50.utm.src.rpm: Header SHA1 digest: OK D: install: frr-8.5.2-2.1696341206.16.8ff8ce50.utm.x86_64 has 13 files D: create 100644 1 (1000,1000) 1364 -remove-babeld-and-ldpd.patch;651c292f D: create 100644 1 (1000,1000) 1740 0002-enable-openssl.patch;651c292f D: create 100644 1 (1000,1000) 6746 0003-disable-eigrp-crypto.patch;651c292f D: create 100644 1 (1000,1000) 3619 0004-fips-mode.patch;651c292f D: create 100644 1 (1000,1000) 870 0005-remove-grpc-test.patch;651c292f D: create 100644 1 (1000,1000) 1619 0007-ideco-route-table.patch;651c292f D: create 100644 1 (1000,1000)9881857 frr-8.5.2.tar.gz;651c292f D: create 100644 1 (1000,1000) 185 frr-sysusers.conf;651c292f D: create 100644 1 (1000,1000)26 frr-tmpfiles.conf;651c292f D: create 100644 1 (1000,1000) 1633 frr.fc;651c292f D: create 100644 1 (1000,1000) 4177 frr.if;651c292f D: create 100644 1 (1000,1000) 16037 frr.spec;651c292f D: create 100644 1 (1000,1000) 3511 frr.te;651c292f setting SOURCE_DATE_EPOCH=1696204800 D: == +++ frr-8.5.2-2.1696341206.16.8ff8ce50.utm x86_64/linux 0x0 ... D: read h# 474 Header V4 RSA/SHA256 Signature, key ID 5323552a: OK Header SHA256 digest: OK Header SHA1 digest: OK D: Requires: perl-generators YES (db provides) D: Requires: pkgconfig(systemd)NO == D: read h# 480 Header V4 RSA/SHA256 Signature, key ID 5323552a: OK Header SHA256 digest: OK Header SHA1 digest: OK D: Requires: python3-devel YES (db provides) ... error: Failed build dependencies: pkgconfig(systemd) is needed by frr-8.5.2-2.1696341206.16.8ff8ce50.utm.x86_64 ``` So, WHY? From one point of view it's not in dependencies, from another – it is. RPM version 4.18.1 File is attached. Sorry for zip. GitHub does not allow attaching just rpm. [frr-8.5.2-2.1696341206.16.8ff8ce50.utm.src.zip](https://github.com/rpm-software-management/rpm/files/12793803/frr-8.5.2-2.1696341206.16.8ff8ce50.utm.src.zip) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2690 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