@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\
+
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:
@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)
+
@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);
+
+
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
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
@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)
+
@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
@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.
@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" >>
@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
@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:
@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([
+
@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
@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
@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
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:
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
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
%_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
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
@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)
+
@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" >>
@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)
+
@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([
+
@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" >>
@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
27 matches
Mail list logo