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

2022-11-07 Thread Panu Matilainen
@pmatilai 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-maint] [rpm-software-management/rpm] Eliminate remaining %{u2p:...} uses (PR #2267)

2022-11-07 Thread Panu Matilainen
The build and source directories are plain old directories, never any sort of URLs. Drop the misleading and obfuscating u2p macro uses from the build environment setting. As of this commit, u2p is unused within rpm. You can view, comment on, or merge this pull request online at:

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

2022-11-07 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) +

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

2022-11-07 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -273,6 +273,15 @@ static int doSetupMacro(rpmSpec spec, const char *line) free(buf); } +/* mkdir for dynamic specparts */ +buf = rpmExpand("%{__mkdir} SPECPARTS", NULL); +appendBuf(spec, buf, 1); +free(buf); + +

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

2022-11-07 Thread Andrew Zah
installed fakechroot, which now has most tests passing: [rpmtests.log](https://github.com/rpm-software-management/rpm/files/9953028/rpmtests.log) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2246#issuecomment-1305774290 You are

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

2022-11-07 Thread Florian Festi
OK, addressed all the comments above except the issue with the signature of `parseSpecSection()` where I not quite see what a better solution would be. Fixed for now: - Reworded documentation - Merged spec files for test cases - Failing test case checks rpmbuild output - removed spurious u2p

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

2022-11-07 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-07 Thread Florian Festi
@ffesti commented on this pull request. > @@ -273,6 +273,15 @@ static int doSetupMacro(rpmSpec spec, const char *line) free(buf); } +/* mkdir for dynamic specparts */ +buf = rpmExpand("%{__mkdir} SPECPARTS", NULL); +appendBuf(spec, buf, 1); +free(buf); + +buf

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

2022-11-07 Thread Florian Festi
@ffesti commented on this pull request. > +layout: default +title: rpm.org - Package Build Process +--- +# Dynamic Spec Generation + +Since rpm 4.19 RPM supports parsing dynamically generated specs. This +allows the build scripts (**%build** or **%install**) to create parts +of the spec file.

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

2022-11-07 Thread Florian Festi
@ffesti commented on this pull request. > +%description +Simple rpm demonstration. + +%prep +%setup -q -T -c + +%build +echo "Q: Why?\nA: Because we can!" > FAQ + +%install +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +echo " " > $RPM_BUILD_ROOT/usr/local/bin/hello + + +echo "%package docs" >>

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

2022-11-07 Thread Florian Festi
@ffesti commented on this pull request. > @@ -273,6 +273,15 @@ static int doSetupMacro(rpmSpec spec, const char *line) free(buf); } +/* mkdir for dynamic specparts */ +buf = rpmExpand("%{__mkdir} SPECPARTS", NULL); +appendBuf(spec, buf, 1); +free(buf); + +buf

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

2022-11-07 Thread Florian Festi
@ffesti commented on this pull request. > + +%prep +%setup -q -T -c + +%build +echo "Q: Why?\nA: Because we can!" > FAQ + +%install +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +echo " " > $RPM_BUILD_ROOT/usr/local/bin/hello + + +echo "%package docs" >> %{specpartsdir}/docs.specpart +echo "Summary:

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

2022-11-07 Thread Florian Festi
@ffesti commented on this pull request. > @@ -2272,3 +2272,44 @@ runroot rpmbuild \ ], [ignore]) AT_CLEANUP + +# -- +# Check if dynamic spec generation works +AT_SETUP([rpmbuild with dynamic spec generation]) +AT_KEYWORDS([build]) +RPMDB_INIT +AT_CHECK([ +

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

2022-11-07 Thread Florian Festi
@ffesti pushed 1 commit. 387da564de03e2c12200d09abf746690b103af86 Add Dynamic Spec generation -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1485/files/ab78270fca71149a42fdead2b8dd14a0f2d0898c..387da564de03e2c12200d09abf746690b103af86 You are receiving this because

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

2022-11-07 Thread xujing
@pmatilai PTAL -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2254#issuecomment-1305596821 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing

Re: [Rpm-maint] [rpm-software-management/rpm] Packaging a fifo with rpm 4.18rc1 seems to hang (Issue #2195)

2022-11-07 Thread xujing
@pmatilai PTAL -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2195#issuecomment-1305520794 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing

Re: [Rpm-maint] [rpm-software-management/rpm] The time zone set by the %changelog does not take effect. (Issue #2253)

2022-11-07 Thread Panu Matilainen
Oh and BTW, this is actually a good example of the problems with the timezoned timestamp: we can't currently tell if a timezone abbreviation is valid or not. So it appears it just doesn't work. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] The time zone set by the %changelog does not take effect. (Issue #2253)

2022-11-07 Thread Panu Matilainen
Uh. That's a good question. I assume it only expects abbreviated timezone names, as per `date` command default after which the long format changelog time was modeled (commit 57f94a582602f0353cdb17a02dc12c4461d4f32d). Seems harmless but is anything but as the abbreviations are ambiguous and

Re: [Rpm-maint] [rpm-software-management/rpm] The time zone set by the %changelog does not take effect. (Issue #2253)

2022-11-07 Thread xujing
I found that CST and CEST seem to be invalid settings in my system, and when I set it to CST6CDT, the problem no longer exists. But I also have another question, why should the time zone length be limited to less than 10, many time zones may exceed 10, is this reasonable? In

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

2022-11-07 Thread Panu Matilainen
%_smp_mflags and the related macros that it grew around itself used to be platform specific as they relied on external tooling (eg getconf for getting processor count), but since rpm 4.15 this has been backed by the built-in %{getncpus} macro which is available on all platforms, so theres zero

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

2022-11-07 Thread Panu Matilainen
Right, thanks for reporting / reminding us about this. Looking at it again, the simple and correct fix is to move these definitions from platform to the main macros file: there used to be a reason for it being in the platform macros as it dependend on external, platform dependent tooling, but

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

2022-11-07 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) +

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

2022-11-07 Thread Michal Domonkos
@dmnks commented on this pull request. > +%description +Simple rpm demonstration. + +%prep +%setup -q -T -c + +%build +echo "Q: Why?\nA: Because we can!" > FAQ + +%install +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +echo " " > $RPM_BUILD_ROOT/usr/local/bin/hello + + +echo "%package docs" >>

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

2022-11-07 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) +

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

2022-11-07 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -2272,3 +2272,44 @@ runroot rpmbuild \ ], [ignore]) AT_CLEANUP + +# -- +# Check if dynamic spec generation works +AT_SETUP([rpmbuild with dynamic spec generation]) +AT_KEYWORDS([build]) +RPMDB_INIT +AT_CHECK([ +

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

2022-11-07 Thread Panu Matilainen
@pmatilai commented on this pull request. > +%description +Simple rpm demonstration. + +%prep +%setup -q -T -c + +%build +echo "Q: Why?\nA: Because we can!" > FAQ + +%install +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +echo " " > $RPM_BUILD_ROOT/usr/local/bin/hello + + +echo "%package docs" >>

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

2022-11-07 Thread Panu Matilainen
@pmatilai commented on this pull request. > + +%prep +%setup -q -T -c + +%build +echo "Q: Why?\nA: Because we can!" > FAQ + +%install +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +echo " " > $RPM_BUILD_ROOT/usr/local/bin/hello + + +echo "%package docs" >> %{specpartsdir}/docs.specpart +echo