Re: [Rpm-maint] [rpm-software-management/rpm] Add %postbuild section / Allow dynamic sub packages (#1239)
@pmatilai commented on this pull request. > +while (1) { + if ((rc = _readLine(spec, 0, 1)) > 0) { + res = PART_NONE; + break; + } else if (rc < 0) { + res = PART_ERROR; + break; + } + if (!strncmp(spec->line, "%%end", 5)) { + spec->line++; + res = PART_EMPTY; + break; + } + appendStringBufAux(spec->postbuild, spec->line, 0); +} +printf("XXX\n%s\nXXX\n", getStringBuf(spec->postbuild)); You say that as if there was some other way :open_mouth: -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1239#discussion_r429916893___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] RFE: allow append to previously declared spec sections (#1240)
An idea related to #1225 and various other dynamic spec generation macro items etc. Currently when a spec section is closed, there's no returning to that. %end doesn't help with that as it just enters a no-mans land where only comments and macro definitions may live. One possibility would be adding -a (for append) switch to the various sections which would make the append mode explicit. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1240___ 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 %postbuild section / Allow dynamic sub packages (#1239)
@ffesti commented on this pull request. > @@ -451,6 +453,7 @@ const char * rpmSpecGetSection(rpmSpec spec, int section) case RPMBUILD_BUILD:return getStringBuf(spec->build); case RPMBUILD_INSTALL: return getStringBuf(spec->install); case RPMBUILD_CHECK:return getStringBuf(spec->check); + //case RPMBUILD_POSTBUILD: return getStringBuf(spec->postbuild); left there as a reminder that RPMBUILD_POSTBUILD is still missing as a constant. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1239#discussion_r429877766___ 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: Create build tree after parsing a spec file (#1235)
Yup - the point being, parsing the spec simply can not require generating any directories. If it does, something is very wrong :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1235#issuecomment-633518266___ 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: Allow multiple snippets of the same build script (#1223)
Maybe %prep/%build/%install could simply take an optional name as an argument, just like %package, %files etc do? And actually execute them separately if defined that way. Seems it'd simplify eg conditional sub-packaging quite a bit. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1223#issuecomment-633517422___ 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 %postbuild section / Allow dynamic sub packages (#1239)
I like "generate spec" better than "post build", the latter only describes *when* it runs, the former actually gives some idea *what* it does. I'd rather see this pushed to an external file entirely. That would - drive the intended usage home with a sledgehammer - make it easier to generate spec fragments from %build - simplify the parsing as you don't need to try not to parse a thing when you're parsing that thing - be just as easy for complicated macro ecosystems External files could maybe presented as spec tags (instead of sections) resembling SOURCE, and thus allowing multiple files. Come to think of it, you'd actually want to ship the generated spec fragments in an src.rpm for reproducability / inspectability. So how about SpecN: ...where N > 0 because the spec itself is always 0. And these are then parsed after the build phase, post %install more like it. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1239#issuecomment-633506742___ 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: Create build tree after parsing a spec file (#1235)
makes sense, I can rework tarball case to create tempdir and set _specdir there. I guess we can drop creation of sourcedir as well. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1235#issuecomment-633505916___ 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 %postbuild section / Allow dynamic sub packages (#1239)
@ignatenkobrain commented on this pull request. > @@ -451,6 +453,7 @@ const char * rpmSpecGetSection(rpmSpec spec, int section) case RPMBUILD_BUILD:return getStringBuf(spec->build); case RPMBUILD_INSTALL: return getStringBuf(spec->install); case RPMBUILD_CHECK:return getStringBuf(spec->check); + //case RPMBUILD_POSTBUILD: return getStringBuf(spec->postbuild); any reason this is commented out? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1239#pullrequestreview-417602986___ 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 %postbuild section / Allow dynamic sub packages (#1239)
@ignatenkobrain commented on this pull request. > +while (1) { + if ((rc = _readLine(spec, 0, 1)) > 0) { + res = PART_NONE; + break; + } else if (rc < 0) { + res = PART_ERROR; + break; + } + if (!strncmp(spec->line, "%%end", 5)) { + spec->line++; + res = PART_EMPTY; + break; + } + appendStringBufAux(spec->postbuild, spec->line, 0); +} +printf("XXX\n%s\nXXX\n", getStringBuf(spec->postbuild)); at least I know that you are using good old printf-everywhere when writing new code :D -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1239#pullrequestreview-417602663___ 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 %postbuild section / Allow dynamic sub packages (#1239)
Some bikeshedding here: I'd call it `%generate_spec` because that's what it essentially is for. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1239#issuecomment-633491347___ 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: Create build tree after parsing a spec file (#1235)
There's also the question whether it should be creating %_specdir and %_sourcedir at all, as these need to pre-exist anyway. Except for tarbuild, and the reason tar-build "needs" %_specdir is also dubious, it could just as well use the current (or temporary) just as it does with %_sourcedir. They were added around 2007-2008 to basically to remove the need for people to run rpmdev-setuptree, but it was always a bit bogus reasoning and increasingly useless with dist-git style packaging setup. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1235#issuecomment-633490362___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Add %postbuild section / Allow dynamic sub packages (#1239)
This is a POC for the new dynamic sub package feature. It add a %postbuild (better names welcome) section that is not expanded during regular Spec parsing. It is fed to the spec parser after the build scripts have run. This allows to create sub packages based on the content of the buildroot. There are still areas that require improvement: The line numbers and filename for the section should probably look more like we are parsing the spec file itself. You currently cannot put the main package / initial preamble into the %postbuild section. This requires rethinking what kind of processing is done during (initial) build and how this affects other users of rpmSpecParse. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1239 -- Commit Summary -- * Add pushStrOFI() to parseSpec * Allow reading lines of spec file raw * Allow using PART_EMPTY as the beginning of a parse pass * Add suppport for %postbuild spec section -- File Changes -- M build/build.c (3) M build/parseSpec.c (238) M build/rpmbuild_internal.h (7) M build/spec.c (3) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/1239.patch https://github.com/rpm-software-management/rpm/pull/1239.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1239 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] The rpm Python binding may be missing a license (#1236)
@pmatilai you wrote: > In other words, GPLv2. That's what I thought (with some hope it would be LGPL like for librpm) > The license should be specified in the Python distutils module description > though, so thanks for reporting. That would be a nice improvement for clarity! Thank you! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1236#issuecomment-633451374___ 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: Create build tree after parsing a spec file (#1235)
@pmatilai FYI, this case have been fixed. This PR works fine from my testing. Sorry, forgot to type this before :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1235#issuecomment-633422873___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] The rpm Python binding may be missing a license (#1236)
The python bindings are part of the rpm source tree, hence COPYING applies: > The entire code base may be distributed under the terms of the GNU General Public License (GPL), which appears immediately below. Alternatively, all of the source code in the lib and rpmio subdirectories of the RPM source code distribution as well as any code derived from that code may instead be distributed under the GNU Library General Public License (LGPL), at the choice of the distributor. In other words, GPLv2. The license should be specified in the Python distutils module description though, so thanks for reporting. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1236#issuecomment-633420605___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Add license to Python distutils module description (#1238)
Fixes: #1236 You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1238 -- Commit Summary -- * Add license to Python distutils module description -- File Changes -- M python/setup.py.in (1) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/1238.patch https://github.com/rpm-software-management/rpm/pull/1238.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1238 ___ 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: Create build tree after parsing a spec file (#1235)
Yup, the tarball case is an annoying one. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1235#issuecomment-633415937___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint