Re: [Rpm-maint] [rpm-software-management/rpm] Minor test-suite tweaks/fixes, volume V (PR #2696)

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



> @@ -52,6 +52,23 @@ RUN dnf -y install \
   && dnf clean all
 RUN echo "%_dbpath $(rpm --eval '%_dbpath')" > /root/.rpmmacros
 
+# Workaround for pkgconf(1)'s unlisted dependency on rpm.
+# This is needed for cmake to work without an rpm installation.
+RUN ln -sf $(rpm --eval '%{_target_platform}%{?_gnu}')-pkg-config \
+   /usr/bin/pkg-config
+
+RUN rpm -e --nodeps --nodb \

Hey, somebody found a use-case for --nodb :partying_face: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2696#pullrequestreview-1658924593
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] Split development tests into its own file (PR #2698)

2023-10-04 Thread Panu Matilainen
These are rather different than the general tests otherwise, might 
as well have them in their own set.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Split development tests into its own file

-- File Changes --

M tests/CMakeLists.txt (1)
A tests/rpmdevel.at (37)
M tests/rpmgeneral.at (35)
M tests/rpmtests.at (1)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2698
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] Minor test-suite tweaks/fixes, volume V (PR #2696)

2023-10-04 Thread Michal Domonkos
@dmnks pushed 4 commits.

8194e8fdf95dc456397b2ea173bb9b0918246a3c  Move snapshot() to mktree.common
9037d8290b254fa6f243dd97f314cafb8cb4b7b2  Rename make target env to atshell
e67e5e7d2f7953183002d64c2812f65d05fdf92b  Keep record of stock RPM in RPMDB in 
Dockerfile
6db07918dfc25dbe7b3bd5016b689d06df9716c6  Add build stages to Dockerfile

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2696/files/df79a0c58fff90a5e9e65121d6ca3125595faf54..6db07918dfc25dbe7b3bd5016b689d06df9716c6
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] Don't assume PWD of / in tests (PR #2695)

2023-10-04 Thread Michal Domonkos
OK, I realized this change is actually not needed for #2691 or at all, so 
scratch that.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2695#issuecomment-1747774484
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] Minor test-suite tweaks/fixes, volume V (PR #2696)

2023-10-04 Thread Michal Domonkos
@dmnks pushed 5 commits.

14aa701f38bcd1c32b31d5d9db47e78a68c10535  Make snapshot() work without CMake 
configuration
55c24dc6e444ebd3ce54af1d2ecafe6fbc808b4d  Move snapshot() to mktree.common
f9113d73e2f9de831874b1299967b9fa563d186d  Rename make target env to atshell
0d9df924a81f90c27bdbed3b51edb3cef8b31b41  Keep record of stock RPM in RPMDB in 
Dockerfile
df79a0c58fff90a5e9e65121d6ca3125595faf54  Add build stages to Dockerfile

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2696/files/3f4e7c960abdcf71f7ac31192f1d6cc9ba4c..df79a0c58fff90a5e9e65121d6ca3125595faf54
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] Native sysusers support is missing dependencies (Issue #2697)

2023-10-04 Thread Zbigniew Jędrzejewski-Szmek
Please correct me if I got something wrong. My understanding is the following:
- rpmbuild will generate `Provides: user(foo) = ` and `Provides: 
group(foo) = ` (??, see below) for packages which have sysusers.d files
- rpmbuild will generate `Requires: {user,group}(foo)` or `Recommends: 
{user,group}(foo)` for packages which carry files owned by user or group `foo` 
(depending on `%_use_weak_usergroup_deps`)
- rpm carries `/usr/lib/rpm/sysusers.sh` and will invoke it when installing 
packages which have the appropriate Provides.
- `sysusers.sh` is in bash (provided by `bash.rpm`) and calls `useradd`, 
`groupadd`, `usermod`, `groupmod` (provided by `shadow-utils.rpm`), `touch`, 
`cut`, `mkdir` (provided by `coreutils.rpm`), and `grep` (provided by 
`grep.rpm`).
- `rpm.rpm` declares dependency on `bash` and `coreutils`, but **not** `grep` 
or `shadow-utils`
- `sysusers.sh` implements `u`, `g`, and `m`, but **not** `r`
- `sysusers.sh` knows about `/usr/lib/sysusers.d`, `/run/sysusers.d`, and 
`/etc/sysusers.d`, but **not** about `/usr/local/lib/sysusers.d`.
- `sysusers.sh` also doesn't know about specifiers

The lack of dependencies seems to be a problem. A package may have `Requires: 
user(foo)`, which will pull in some package that has `Provides: user(foo)`, but 
this is not enough. Something else needs to pull in both `rpm` and 
`shadow-utils` and `grep`.

Those tool dependencies are a problem: `rpm` is a very big dependency. It is 
strange to install it in images just to create users. Maybe it should be split 
out to `rpm-sysusers-impl` (name TBD), so it can be installed without the rest 
of the stack? Also, that package should probably get dependencies on the 
appropriate tools.

Packages which are supposed to provide a user should get a Requires or 
Recommends dependency on the implementing tool (depending on 
`%_use_weak_usergroup_deps`).

I understand the decision to move away from `systemd-sysusers` as the 
implementation, but it would be great if it was still allowed as an option. In 
fact, systemd provides two implementations: one in `systemd.rpm` and the second 
one in `systemd-standalone-sysusers`. The latter has dependencies only on 
`glibc`, `libcap`, `libgcc`, `libselinux`, and `libgcrypt`, and is much smaller 
than `shadow-utils`.

For example, packages that have `Provides: {user,group}(…)`, could have a 
dependency on `rpm-sysusers-impl | systemd-sysusers`, and `rpm` should attempt 
to call both `systemd-sysusers` and `sysusers.sh`.

Please explain how this is all supposed to be integrated by a distro…

---

I was testing this with `dbus` package, and I noticed the following:
- `dbus-common` has `Provides: user(dbus) = 
dSBkYnVzIDgxICJTeXN0ZW0gTWVzc2FnZSBCdXMiIC0gLQAA` but `Provides: group(dbus)`, 
with no `= …`. Looking at the code, this provides will be ignored. Is this 
intentional?
- I can't get this to work at all. After calling `sudo dnf5 install 
--use-host-config --installroot=/var/tmp/inst5 
noarch/dbus-common-1.14.10-1.fc40.noarch.rpm` I get no dbus in 
`/var/tmp/inst5/etc/{group,passwd}`. I tried installing `rpm`, `grep`, 
`shadow-utils` and part of the same transaction, or in an earlier transaction, 
and the result is the same.


/cc @DaanDeMeyer 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2697
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] Execute dependency generators on the .spec file which ships them (#782)

2023-10-04 Thread Vít Ondruch
Looking into this again and in more detail, I think it would be enough if there 
were some `dummy.attr` file loaded. This would later enable to just define some 
`__dummy_requires` macro and this could be enough.

My (probably very silly idea) would be to ship `find.attr` file with RPM, that 
would enable to reuse the `__find_requires` macro used previously for the 
external helpers. This functionality is controlled by separate macro anyway. 
But I don't think that RPM protect these macros in any special way.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/782#issuecomment-1747200612
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] Minor test-suite tweaks/fixes, volume V (PR #2696)

2023-10-04 Thread Michal Domonkos
@dmnks pushed 2 commits.

e281e9559faafa0f23d666cc59aa4a73080ea95b  Keep record of stock RPM in RPMDB in 
Dockerfile
1d7f308059202bfd44c0cdbfcfaf7f699949aef7  Add build stages to Dockerfile

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2696/files/4871b237fe9b98b001880b7d2dc70a72b6526ff8..1d7f308059202bfd44c0cdbfcfaf7f699949aef7
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] Minor test-suite tweaks/fixes, volume V (PR #2696)

2023-10-04 Thread Michal Domonkos
@dmnks pushed 3 commits.

e3d8b2a627ffb79e6a098788f39fd8a2b40288cf  Make snapshot() work without CMake 
configuration
dd08d096253a1f1137ad4cde32fbbf977a2281f4  Move snapshot() to mktree.common
4871b237fe9b98b001880b7d2dc70a72b6526ff8  Rename make target env to atshell

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2696/files/945dc36f0e7b9c7d4edcfb0710d9299eaa1badd6..4871b237fe9b98b001880b7d2dc70a72b6526ff8
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] Minor test-suite tweaks/fixes, volume V (PR #2696)

2023-10-04 Thread Michal Domonkos
These are mostly preparatory work for #2643.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Dont assume PWD of / in tests
  * Make snapshot() work without CMake configuration
  * Move snapshot() to mktree.common
  * Rename make target env to atshell

-- File Changes --

M tests/CMakeLists.txt (4)
M tests/README.md (4)
M tests/atlocal.in (51)
M tests/mktree.common (49)
M tests/mktree.fedora (9)
M tests/mktree.rootfs (2)
M tests/rpmbuild.at (2)
M tests/rpmgeneral.at (4)
M tests/rpmi.at (2)
M tests/rpmmacro.at (2)
M tests/rpmquery.at (2)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2696
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] Don't assume PWD of / in tests (PR #2695)

2023-10-04 Thread Michal Domonkos
Closed #2695.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2695#event-10551803373
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] Don't assume PWD of / in tests (PR #2695)

2023-10-04 Thread Michal Domonkos
Included in #2696, closing this one.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2695#issuecomment-1746976877
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] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-10-04 Thread Panu Matilainen
Closed #2650 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#event-10551580009
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] 4.18.99: broken off-source-tree install target (Issue #2650)

2023-10-04 Thread Panu Matilainen
Closing as I fail to see any bug in here. All our CI builds are done outside 
the source tree.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2650#issuecomment-1746943425
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 OCI mktree backend (PR #2691)

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



> @@ -647,7 +647,7 @@ AT_SETUP([xml format])
 AT_KEYWORDS([query])
 RPMTEST_CHECK([
 RPMDB_INIT
-runroot rpm -qp --xml  data/RPMS/hello-2.0-1.x86_64.rpm
+runroot rpm -qp --xml  /data/RPMS/hello-2.0-1.x86_64.rpm

Fix for the above: https://github.com/rpm-software-management/rpm/pull/2695

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#discussion_r1345784102
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] Don't assume PWD of / in tests (PR #2695)

2023-10-04 Thread Michal Domonkos
Instead, just use absolute paths everywhere.  This allows us to revert the ugly 
workaround for bwraps double-chdir warning from commit 
5e9c71296e8cd6c5f2f5a6188b303bbd7a2c74db as well as let make shell 
also start in /srv.

No functional change.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Dont assume PWD of / in tests

-- File Changes --

M tests/atlocal.in (4)
M tests/mktree.fedora (3)
M tests/rpmbuild.at (2)
M tests/rpmgeneral.at (4)
M tests/rpmi.at (2)
M tests/rpmmacro.at (2)
M tests/rpmquery.at (2)

-- Patch Links --

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

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


[Rpm-maint] [rpm-software-management/rpm] Software Heritage archival of RPM source code (Discussion #2694)

2023-10-04 Thread benoit-chauvet
Hello,

Software Heritage is the universal archive of source code, and a non profit 
organization.
Our mission is to collect, preserve and share source code from every possible 
origins, 
including forges and package managers.

Software Heritage will soon be ready to support the ingestion of RPM source code
modules. The RPM loader has been deployed in our staging infrastructure [1].
We have ingested origins that were listed from Fedora and CentOS [2].

We now would like to have a round of public review on the actual data output
of the ingestion process, so we can either validate or ask for some more
updates, and then eventually deploy it in production.

Still, for now, please have a look at some of those origins loaded [2]
and let us know what you think!

[1] https://gitlab.softwareheritage.org/swh/meta/-/issues/5042
[2] 
https://webapp.staging.swh.network/browse/search/?q=_visit=true_content=true_type=rpm

Best regards,

Benoit Chauvet
Software Engineering Manager
Software Heritage 

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

2023-10-04 Thread Коренберг Марк
#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] 'rpmbuild -br --nodeps' does not always generate buildreqs.nosrc.rpm (#781)

2023-10-04 Thread Коренберг Марк
#797

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

2023-10-04 Thread Коренберг Марк
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)

2023-10-04 Thread Коренберг Марк
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)

2023-10-04 Thread Коренберг Марк
@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)

2023-10-04 Thread Panu Matilainen
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)

2023-10-04 Thread Коренберг Марк
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


[Rpm-maint] [rpm-software-management/rpm] Prevent Dynamic Spec part to create things needed earlier (Issue #2693)

2023-10-04 Thread Florian Festi
As noted in #2646 dynamic spec parts can create/declare tags and sections that 
cannot be used that late and we should not allow that and error out. First 
rough list:

- all build sections
  - including %generatebuildrequires 
- BuildRequires
- BuildArch except noarch


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2693
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 checks and package initialization after build (PR #2646)

2023-10-04 Thread Florian Festi
Yes, this thought has occurred to me, too. I have not addressed this here as it 
is mainly an issue of the original dynamic spec change. But it is something we 
need to address.
 
Funny enough we could actually allow %prep to create later build scripts. Ofc 
this doesn't work right now. Also there isn't really a point.

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

2023-10-04 Thread Коренберг Марк
@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)

2023-10-04 Thread Коренберг Марк
@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)

2023-10-04 Thread Коренберг Марк
@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)

2023-10-04 Thread Panu Matilainen
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)

2023-10-04 Thread Panu Matilainen
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)

2023-10-04 Thread Panu Matilainen
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)

2023-10-04 Thread Panu Matilainen
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] Could the default %clean section remove non-readable+non-empty directories? (Issue #2519)

2023-10-04 Thread Michal Domonkos
FTR, CMake does something similar on `make clean` as I discovered the other 
day. As for the test-suite artifacts, we already do exactly 
[that](https://github.com/rpm-software-management/rpm/blob/ea19571b86ff1f828efc264744715b69e30d6832/tests/mktree.fedora#L82).
 It just seems natural to have `%clean` follow suit...

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

2023-10-04 Thread Коренберг Марк
@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] Move checks and package initialization after build (PR #2646)

2023-10-04 Thread Panu Matilainen
Seeing requiredTagsForBuild inspired some thoughts for the basical reverse 
cases of things that cannot be handled from generated content.

What happens if somebody generates a BuildArch line from inside the build? 
Other than noarch sub-packages that is. 

What happens with stuff like BuildRequires / %generate_buildrequires?  Those 
would end up in the src.rpm requires and the parsed spec in the src.rpm, but 
since they're not in the spec they wouldn't be enforced in the next build 
either. Or %prep/%build/%install? 

And that must be just scratching the surface of such issues...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2646#issuecomment-1746477484
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] rpmbuild should report missing files for all subpackages (#1277)

2023-10-04 Thread Michal Domonkos
Just FTR, this could be related to #1277.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1277#issuecomment-1746473960
You are receiving this because you commented.

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)

2023-10-04 Thread Panu Matilainen
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)

2023-10-04 Thread Panu Matilainen
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] Add OCI mktree backend (PR #2691)

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



> @@ -647,7 +647,7 @@ AT_SETUP([xml format])
 AT_KEYWORDS([query])
 RPMTEST_CHECK([
 RPMDB_INIT
-runroot rpm -qp --xml  data/RPMS/hello-2.0-1.x86_64.rpm
+runroot rpm -qp --xml  /data/RPMS/hello-2.0-1.x86_64.rpm

Indeed, this is another example of something that could've gone in separately. 
In fact, I'll start submitting these little changes now, before this PR is 
undrafted.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#discussion_r1345402104
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] Binary PGP keys cannot be imported (Issue #2689)

2023-10-04 Thread Panu Matilainen
Oh right, so there was a concrete reason for not allowing binary certificates 
in the current API.

Wherever new APIs are needed, just do what makes most sense to you. No reason 
to hang with the old ad-hoc API and its naming.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2689#issuecomment-1746378294
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 OCI mktree backend (PR #2691)

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



> @@ -647,7 +647,7 @@ AT_SETUP([xml format])
 AT_KEYWORDS([query])
 RPMTEST_CHECK([
 RPMDB_INIT
-runroot rpm -qp --xml  data/RPMS/hello-2.0-1.x86_64.rpm
+runroot rpm -qp --xml  /data/RPMS/hello-2.0-1.x86_64.rpm

These relative -> absolute path changes look like something that could be 
applied regardless of this change. Most path usage in the tests is absolute 
anyhow, these mostly just look out of the place now, but could be remnants from 
the days where we actually ran some stuff outside the test-root.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#pullrequestreview-1656881464
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 build-order regression from 1c98b67911e19a5f92c7fa4492aaa1000a06edad (PR #2692)

2023-10-04 Thread Panu Matilainen
Merged #2692 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2692#event-10547324621
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 OCI mktree backend (PR #2691)

2023-10-04 Thread Panu Matilainen
There's also at least commit  a25d881f287e67568c15a87c9fc9a2c4acc0650e embedded 
in here. So yep, please rebase before a closer look. Rebasing before submitting 
a PR is usually a good idea.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#issuecomment-1746323721
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 build-order regression from 1c98b67911e19a5f92c7fa4492aaa1000a06edad (PR #2692)

2023-10-04 Thread Michal Domonkos
LGTM

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2692#issuecomment-1746316556
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 OCI mktree backend (PR #2691)

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



> @@ -1,6 +1,4 @@
-# Use our top-level targets as an ordering clue to cmake: the project
-# needs to be built before we can populate anything...
-get_property(TOP_TARGETS DIRECTORY .. PROPERTY BUILDSYSTEM_TARGETS)
+set(RPM_TARGETS librpm librpmio librpmbuild librpmsign)

It's also a good example of bad (variable) naming in the original version: 
being top-level had nothing to do with it, it was the tools we were after. Had 
the variable been called "TOOLPROGS" or such from the start, it probably 
would've been far more obvious as to why it's not working now.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#discussion_r1345340162
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 OCI mktree backend (PR #2691)

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



> @@ -1,6 +1,4 @@
-# Use our top-level targets as an ordering clue to cmake: the project
-# needs to be built before we can populate anything...
-get_property(TOP_TARGETS DIRECTORY .. PROPERTY BUILDSYSTEM_TARGETS)
+set(RPM_TARGETS librpm librpmio librpmbuild librpmsign)

Submitted as #2692 now. And whenever you run into mysteries like that, just ask 
:sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#discussion_r1345337173
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 build-order regression from 1c98b67911e19a5f92c7fa4492aaa1000a06edad (PR #2692)

2023-10-04 Thread Panu Matilainen
Running the test-suite obviously requires on having the project completely 
built first. The test-suite was relying on the cli tools in the top level 
directory for this, but now that we moved the tools elsewhere there are zero 
targets at the top-level. Oops.

Update the property get_property() path accordingly, this shouldve been in 
commit 1c98b67911e19a5f92c7fa4492aaa1000a06edad. Rename the variable and add 
commentary on why were doing this the way we are, its not entirely 
obvious.

Suggested-by: Michal Domonkos mdomo...@redhat.com
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix build-order regression from 1c98b67911e19a5f92c7fa4492aaa1000a06edad

-- File Changes --

M tests/CMakeLists.txt (9)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2692
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] Add OCI mktree backend (PR #2691)

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



> @@ -1,6 +1,4 @@
-# Use our top-level targets as an ordering clue to cmake: the project
-# needs to be built before we can populate anything...
-get_property(TOP_TARGETS DIRECTORY .. PROPERTY BUILDSYSTEM_TARGETS)
+set(RPM_TARGETS librpm librpmio librpmbuild librpmsign)

Oh, this explains that little mystery of "why on earth doesn't this TOP_TARGETS 
work for me as expected" :smile: I actually settled on that having been broken 
from the start and just patched it quickly this way, with the thought of 
investigating a bit more afterwards. And yes, this would've gone to a separate 
commit in this PR as well :smile: 

So yup, feel free to fix, I'll then just rebase. Thanks :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#discussion_r1345326049
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 OCI mktree backend (PR #2691)

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



> @@ -1,6 +1,4 @@
-# Use our top-level targets as an ordering clue to cmake: the project
-# needs to be built before we can populate anything...
-get_property(TOP_TARGETS DIRECTORY .. PROPERTY BUILDSYSTEM_TARGETS)
+set(RPM_TARGETS librpm librpmio librpmbuild librpmsign)

After a brief wtf moment, I see that I broke the top level target fetch in 
commit 86d99a1d20bbebfeb4427c99b1bb1053029c3317. Oof. 

But this is a fine example of what should've gone into a separate PR as soon as 
noticed because this has nothing to do with the change in *this* PR. I'll fix 
since it's me who broke it in the first place.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2691#pullrequestreview-1656827186
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] WIP: Use Python Stable ABI for the bindings (PR #2674)

2023-10-04 Thread Panu Matilainen
I'd prefer the "Fix comment style" commit to be merged into the previous commit 
that introduces the comment, but other than that looks fine to me. Unless you 
have something else you're planning to work on here, just flag ready for review 
and I'll merge, we already did the review part here.

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