Re: [Rpm-maint] [rpm-software-management/rpm] Fix regression: -bp should check BuildRequires (PR #2271)

2022-11-08 Thread Panu Matilainen
Hmm, %prep not checking buildrequires does sound like a bug, or rather, a regression. While %prep is mainly for unpacking sources and applying patches, that can require custom tools just like any other step. Such as that autoreconf. If that's affected I'm quite surprised this hasn't turned up b

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread xujing
@JetXujing pushed 1 commit. aba4fa3281fba07be3a10a039c844bb91295a31b tests: add test for Obsoletes -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2254/files/8bd8742fec1a6956106b632aab4db9cba8415a5a..aba4fa3281fba07be3a10a039c844bb91295a31b You are receiving this becau

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread xujing
> Additionally, do remark in the commit messages the reason for adding these > tests: they are simply previously uncovered cases. Thank you for your comments. I have made relevant changes. Please review the changes. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-s

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread xujing
@JetXujing commented on this pull request. > @@ -631,3 +631,21 @@ runroot rpm -Va --nodeps --nouser --nogroup ], []) AT_CLEANUP + +AT_SETUP([test for %verify in %files]) +AT_KEYWORDS([verify]) +AT_CHECK([ +RPMDB_INIT + +runroot rpmbuild \ + --quiet -bb /data/SPECS/test-parseForVerify.spec T

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread xujing
@JetXujing commented on this pull request. > @@ -1371,3 +1371,21 @@ runroot rpm -q --whatprovides / ], []) AT_CLEANUP + +AT_SETUP([rpm -U with Obsoletes]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_INIT + +runroot rpmbuild -bb --quiet /data/SPECS/test-obsoletes.spec +runroot rpm -i --nodeps -

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread xujing
@JetXujing commented on this pull request. > @@ -1371,3 +1371,21 @@ runroot rpm -q --whatprovides / ], []) AT_CLEANUP + +AT_SETUP([rpm -U with Obsoletes]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_INIT + +runroot rpmbuild -bb --quiet /data/SPECS/test-obsoletes.spec +runroot rpm -i --nodeps -

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread xujing
@JetXujing pushed 2 commits. 087be9967ee867da7ceac9326f50498065ea9f59 tests: add test for %verify in %files 8bd8742fec1a6956106b632aab4db9cba8415a5a tests: add test for Obsoletes -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2254/files/8c63ec4ff6d8c9ae37c9f7334cd0a4

Re: [Rpm-maint] [rpm-software-management/rpm] Fix regression: -bp should check BuildRequires (PR #2271)

2022-11-08 Thread Paul Donohue
... Looking at this again more closely ... It looks like a the BuildRequires checks have been moved after %prep in a lot of other places. Should this be considered a bug in `openssh` instead? (Should `autoreconf` be moved to the new %conf section to fix this?) -- Reply to this email directly

[Rpm-maint] [rpm-software-management/rpm] Fix regression: -bp should check BuildRequires (PR #2271)

2022-11-08 Thread Paul Donohue
Some source packages assume that BuildRequires are installed before %prep is executed. For example, `openssh` BuildRequires `automake` and runs `autoreconf` in %prep. Prior to 11c56d5 `rpmbuild -bp` checked BuildRequires and printed a helpful error message if there were any missing dependencie

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -1129,3 +1155,29 @@ rpmSpec rpmSpecParse(const char *specFile, > rpmSpecFlags flags, { return parseSpec(specFile, flags, buildRoot, 0); } + +rpmRC parseGeneratedSpecs(rpmSpec spec) +{ +ARGV_t argv = NULL; +int argc = 0; +int i; +

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Panu Matilainen
@pmatilai commented on this pull request. > + if (checkForEncoding(pkg->header, 0) != RPMRC_OK) { + badenc = 1; + } + } + if (badenc) + goto errxit; +} + +closeSpec(spec); + +exit: +return spec; + +errxit: +if (!secondary) +

[Rpm-maint] [rpm-software-management/rpm] Improve CPU/thread calculations a bit (PR #2270)

2022-11-08 Thread Panu Matilainen
See commit messages for details, this stuff needs to be calculated at the time of build, not time of (spec) parse and restored when done. Besides making more sense, it removes stuff out of the way of #1485. You can view, comment on, or merge this pull request online at: https://github.com/rpm-

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
Added alternative error handling. Turns out to be less of a change than I expected. So it's probably just the way to go. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1485#issuecomment-1307049064 You are receiving this because you are s

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
@ffesti pushed 1 commit. a2ec843b8dbc11ece43f057092b0f768931c933c Move rpmSpecFree out of parseSpecSection -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1485/files/a07501c24c391ed091f72c2933f259bb617c6185..a2ec843b8dbc11ece43f057092b0f768931c933c You are receiving t

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
@ffesti commented on this pull request. > + if (checkForEncoding(pkg->header, 0) != RPMRC_OK) { + badenc = 1; + } + } + if (badenc) + goto errxit; +} + +closeSpec(spec); + +exit: +return spec; + +errxit: +if (!secondary) +

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
@ffesti commented on this pull request. > + if (checkForEncoding(pkg->header, 0) != RPMRC_OK) { + badenc = 1; + } + } + if (badenc) + goto errxit; +} + +closeSpec(spec); + +exit: +return spec; + +errxit: +if (!secondary) +

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
- Removed u2p macro - Added _prefix to test case - Removed unnneccessary rpmSpecFree call -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1485#issuecomment-1306984561 You are receiving this because you are subscribed to this thread. Messa

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
@ffesti commented on this pull request. > + +runroot rpmbuild -ba /data/SPECS/dynamic.spec +], +[0], +[ignore], +[ignore]) + +AT_CHECK([ + +runroot rpm -qp --qf "%{Summary}\n" /build/RPMS/noarch/dynamic-docs-1.0-1.noarch.rpm +runroot rpm -ql /build/RPMS/noarch/dynamic-docs-1.0-1.noarch.rpm +],

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
@ffesti commented on this pull request. > @@ -715,7 +715,8 @@ package or when debugging this package.\ RPM_ARCH=\"%{_arch}\"\ RPM_OS=\"%{_os}\"\ RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\ - export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS\ + RPM_SPECPAR

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Florian Festi
@ffesti pushed 3 commits. 825d644e5654c1898849c54eb2b7327a9044f7da Split actual parsing of spec into its own function a3f967656ccdec466653a12301c7449f9f746975 Allow starting new spec parts with PART_EMPTY a07501c24c391ed091f72c2933f259bb617c6185 Add Dynamic Spec generation -- View it on Git

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread Panu Matilainen
Additionally, do remark in the commit messages the reason for adding these tests: they are simply previously uncovered cases. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2254#issuecomment-1306879056 You are receiving this because you

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -631,3 +631,21 @@ runroot rpm -Va --nodeps --nouser --nogroup ], []) AT_CLEANUP + +AT_SETUP([test for %verify in %files]) +AT_KEYWORDS([verify]) +AT_CHECK([ +RPMDB_INIT + +runroot rpmbuild \ + --quiet -bb /data/SPECS/test-parseForVerify.spec An

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -1371,3 +1371,21 @@ runroot rpm -q --whatprovides / ], []) AT_CLEANUP + +AT_SETUP([rpm -U with Obsoletes]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_INIT + +runroot rpmbuild -bb --quiet /data/SPECS/test-obsoletes.spec +runroot rpm -i --nodeps --

Re: [Rpm-maint] [rpm-software-management/rpm] Add some tests (PR #2254)

2022-11-08 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -1371,3 +1371,21 @@ runroot rpm -q --whatprovides / ], []) AT_CLEANUP + +AT_SETUP([rpm -U with Obsoletes]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_INIT + +runroot rpmbuild -bb --quiet /data/SPECS/test-obsoletes.spec +runroot rpm -i --nodeps --

Re: [Rpm-maint] [rpm-software-management/rpm] CI hardening tweaks (PR #2268)

2022-11-08 Thread Panu Matilainen
Merged #2268 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2268#event-7760332837 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint maili

[Rpm-maint] [rpm-software-management/rpm] Trouble linking against the sequoia backend when using cmake (Issue #2269)

2022-11-08 Thread Neal H. Walfield
I'm trying to build HEAD (5049fc701561b258b722b3400460d8828ce9e64e) with the sequoia backend, but I'm having trouble. I documented how I build rpm with the autoconf build system [here](https://github.com/rpm-software-management/rpm-sequoia#building). In short: ``` $ mkdir /tmp/rpm $ cd /tmp/r

[Rpm-maint] [rpm-software-management/rpm] CI hardening tweaks (PR #2268)

2022-11-08 Thread Panu Matilainen
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2268 -- Commit Summary -- * Run CI builds entirely outside source tree * Enforce read-only tree in CI builds * Do CI builds with a random install prefix -- File Changes -

Re: [Rpm-maint] [rpm-software-management/rpm] build breaks on libmagic, but it's installed (Issue #2246)

2022-11-08 Thread Panu Matilainen
One of the failures is due to missing "cpio" utility in the environment, add that to the yum install to fix. The others are a bit strange: > +/usr/bin/python3.6: symbol lookup error: > /usr/local/lib64/rpm-plugins/dbus_announce.so: undefined symbol: rcalloc It does point out a difference to the

Re: [Rpm-maint] [rpm-software-management/rpm] Make CPU and thread-related macros available on all platforms (PR #2266)

2022-11-08 Thread Panu Matilainen
Merged #2266 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2266#event-7759878545 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint maili

Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild fails when no default value is available for %_smp_build_ncpus (Issue #2265)

2022-11-08 Thread Panu Matilainen
Closed #2265 as completed via #2266. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2265#event-7759878673 You are receiving this because you are subscribed to this thread. Message ID: ___ Rp

Re: [Rpm-maint] [rpm-software-management/rpm] Eliminate remaining %{u2p:...} uses (PR #2267)

2022-11-08 Thread Panu Matilainen
Merged #2267 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2267#event-7759875585 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint maili

Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)

2022-11-08 Thread Panu Matilainen
@pmatilai commented on this pull request. > + +runroot rpmbuild -ba /data/SPECS/dynamic.spec +], +[0], +[ignore], +[ignore]) + +AT_CHECK([ + +runroot rpm -qp --qf "%{Summary}\n" /build/RPMS/noarch/dynamic-docs-1.0-1.noarch.rpm +runroot rpm -ql /build/RPMS/noarch/dynamic-docs-1.0-1.noarch.rpm +]