[Rpm-maint] [rpm-software-management/rpm] RFE: Make it easier to use new rpmbuild features (#761)
`%patchlist` is one of these things. It does not affect final binary rpm, but is very convenient in spec file. However, you really need to wait until all distros would get this feature before using it. It would be nice if rpmbuild would have some way of defining minimum compatible version of RPM and produce binary packages according to them. Some kind of splitting rpmbuild to its own thing. I understand that this is not something what can be done in few months, but this would be very helpful in the long-term. -- 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/761___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] RFE: rpmbuild -br --i-really-want-src-rpm (#760)
I have some scripts which operate on packages to generate their (build)dependency tree for Fedora Modularity stuff. It relies on normal binary and source RPMs for dependency information. However, with dynamic BuildRequires, I need a way to rebuild sourcerpms with some macros defined. And I found out that there is no way to get src.rpm with dynamic buildrequires without installing them. So I had to do something like ```diff diff --git a/build/build.c b/build/build.c index dec7d9608..c1f28b8f5 100644 --- a/build/build.c +++ b/build/build.c @@ -213,10 +213,12 @@ static int doBuildRequires(rpmSpec spec, int test) *packageDependencies(spec->sourcePackage, RPMTAG_REQUIRENAME), spec->sourcePackage->header); +#if 0 parseRCPOT(spec, spec->sourcePackage, "rpmlib(DynamicBuildRequires) = 4.15.0-1", RPMTAG_PROVIDENAME, 0, RPMSENSE_FIND_PROVIDES | RPMSENSE_RPMLIB, addReqProvPkg, NULL); +#endif rc = RPMRC_MISSINGBUILDREQUIRES; exit: @@ -305,6 +307,8 @@ static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what) (rc == RPMRC_MISSINGBUILDREQUIRES)) rc = doCheckBuildRequires(ts, spec, test); if (rc == RPMRC_MISSINGBUILDREQUIRES) { + rc = RPMRC_OK; +#if 0 if (what & RPMBUILD_DUMPBUILDREQUIRES) { /* Create buildreqs package */ char *nvr = headerGetAsString(spec->packages->header, RPMTAG_NVR); @@ -318,6 +322,7 @@ static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what) } else { rc = RPMRC_OK; } +#endif } else if (rc) { goto exit; } ``` and use `rpmbuild -rr -D "_module_build 1" --nodeps /path/to/srpm` and it does what I need. So what I want is to say "I am expert, I know src.rpm will have all dynamic dependencies, just give me src.rpm and not buildreqs.nosrc.rpm.". -- 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/760___ 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 excessive use of thread local storage (RhBug:1722181) (#759)
LGTM. Regarding > The __thread uses in rpmsq don't make sense at all in reality, so better > revert and rethink from scratch. I don't know what all is writing/reading to those variables but, global mutable statics are basically always wrong. In Rust for example a common pattern is `lazy_static!` + `Mutex`, like [this bit of code in rpm-ostree](https://github.com/projectatomic/rpm-ostree/blob/c94bd08b02499a3f2a5804f5c2ba207a0afbda18/rust/src/progress.rs#L50). (Or of course for integer variables like thise atomics can be used) -- 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/759#issuecomment-504019053___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Canonicalize Python versions and properly handle != spec (#757)
Note that this does still not properly work with beta versions. 1.4.0b3, won't be canonicalized to 1.4b3. However, the beta versions etc. won't sort properly anyway. -- 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/757#issuecomment-504008226___ 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 excessive use of thread local storage (RhBug:1722181) (#759)
@pmatilai pushed 1 commit. b39bd1965ed2fdeadb427648ec7e911613c8398f Fix excessive use of thread local storage (RhBug:1722181), part II -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/759/files/844c2488964cb69561659044a2c94d300a813745..b39bd1965ed2fdeadb427648ec7e911613c8398f ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
The exact syntax is subject to endless bikeshedding of course, but one thing that strikes me as just wrong are the surrounding spaces everywhere. There are no "courtesy spaces" for readability anywhere in rpm macros, I dont think this should be any different. This also makes me wonder if it's *really* worth the added complexity, it's merely syntactic sugar afterall. Any particular reason for this specific syntax over the others discussed in the ticket? Oh and to make it clear, this is strictly 4.16 material, we don't want changes this drastic at this point in 4.15 cycle, so there's all the time in the world for review and further discussion. -- 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/746#issuecomment-503987339___ 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 hog thread local storage, it's a scarce resource (RhBug:1722181) (#759)
Commit 6487e873f3169c2bffbd52808b6c749e6c104ff5 introduced a thread local BUFSIZ static buffer for header format error reporting but thread local storage is apparently a rather scarce resource (on some architectures more so than others) and this is highly excessive use of that resource. Use a thread local pointer to dynamically (re)allocated buffer instead. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/759 -- Commit Summary -- * Don't hog thread local storage, it's a scarce resource (RhBug:1722181) -- File Changes -- M lib/headerfmt.c (8) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/759.patch https://github.com/rpm-software-management/rpm/pull/759.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/759 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
> It is a small functional change. But the change is unimportant, because it includes only some of %load macros with more than one '?'. Like: %{!??load:file} %{!???load:file} or %{!!!??load:file} All this talk about a change, but it fails to explain what that change of behavior actually *is*. I'd say all of the above should be just errors. -- 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/746#issuecomment-503969355___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Python generators: Fails to add != dependency (#639)
Closed #639 via #757. -- 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/639#event-2426927555___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Canonicalize Python versions and properly handle != spec (#757)
Merged #757 into master. -- 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/757#event-2426927550___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
pmatilai commented on this pull request. > str++; } return str; } +static void partsInit(macroPartition *parts) +{ +parts->f = parts->fe = NULL; +parts->g = parts->ge = NULL; +parts->h = parts->he = NULL; +parts->fn = parts->gn = parts->hn = 0; +return; In general, never initialize more than one variable on a line, it only makes it harder to read. In a case like this, just memset() to zero. The return at end of void function is redundant. -- 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/746#pullrequestreview-252203689___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Canonicalize Python versions and properly handle != spec (#757)
Conan-Kudo approved this pull request. -- 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/757#pullrequestreview-252203325___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
pmatilai commented on this pull request. > @@ -45,6 +45,12 @@ enum macroFlags_e { ME_USED= (1 << 1), }; +enum checkConditionType { +CHK_NO = 0, +CHK_BASIC = (1 << 0), +CHK_TRIPLE = (1 << 1), +}; CHK_NO sounds like something that wants to pair with CHK_YES, but this is something entirely different. I didn't really look whether it makes sense in the rest of the code, I'd expect the to be a CHK_EXISTS bit, and if its of the triple format, there'd be an extra bit set on that, instead of being entirely separate entities. But please rethink these names anyhow. -- 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/746#pullrequestreview-252202908___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
pmatilai commented on this pull request. > +return; +} + +static void setPartsSize(macroPartition *parts) +{ +parts->fn = parts->fe - parts->f; +parts->gn = parts->ge - parts->g; +parts->hn = parts->he - parts->h; +return; +} + +/** + * Skip spaces before the input string + * @param str string that starts after the .. + * @ + */ In general, doxygen annotations don't belong to internal helper functions, trivial in particular. -- 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/746#pullrequestreview-252200956___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
pmatilai commented on this pull request. > +SKIPBLANK(parts->g, c); + +/* after %{? {macroo} must be ':' */ +if (parts->g[0] == ':') { + parts->g++; + SKIPBLANK(parts->g,c); + parts->ge = parts->g; + while ((parts->ge[0] != 0) && (parts->ge[0] != ':')) { + parts->ge++; + if (parts->ge[0] == '{') { + if ((parts->ge = matchchar(parts->ge++, '{', '}')) == NULL) + return NULL; + } + } +} else { + return NULL; Arrange a single point of return to the function, goto exit or such. -- 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/746#pullrequestreview-252200124___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
pmatilai commented on this pull request. > +if (parts->g[0] == ':') { + parts->g++; + SKIPBLANK(parts->g,c); + parts->ge = parts->g; + while ((parts->ge[0] != 0) && (parts->ge[0] != ':')) { + parts->ge++; + if (parts->ge[0] == '{') { + if ((parts->ge = matchchar(parts->ge++, '{', '}')) == NULL) + return NULL; + } + } +} else { + return NULL; +} + +/* be the trhird part starting by ':' is optional */ The comment has typos and doesn't make sense. -- 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/746#pullrequestreview-252199480___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)
pmatilai commented on this pull request. > + SKIPBLANK(parts->g,c); + parts->ge = parts->g; + while ((parts->ge[0] != 0) && (parts->ge[0] != ':')) { + parts->ge++; + if (parts->ge[0] == '{') { + if ((parts->ge = matchchar(parts->ge++, '{', '}')) == NULL) + return NULL; + } + } +} else { + return NULL; +} + +/* be the trhird part starting by ':' is optional */ +parts->h = parts->ge; +parts->ge = findParameterEnd(parts->h[0] == ':' ? parts->ge : --parts->ge); Never use --/++ side-effects like that. You're even assigning to the same variable so it should be just ```? parts->ge : parts->ge -1``` -- 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/746#pullrequestreview-252199254___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] debugedit: Add some testcases and handle .debug_macro (gcc -g3)
On 6/17/19 12:23 PM, Mark Wielaard wrote: Hi, debugedit wouldn't properly handle gcc -g3 which generates .debug_macro sections. The sections would contain references to .debug_str which debugedit rewrites. But it would not update the references in .debug_macro which would upset various tools. For example gdb: https://bugzilla.redhat.com/show_bug.cgi?id=1535174 Michael Schroeder had a patch for that, but that didn't handle relocations (which happen in e.g. linux kernel modules). So I added support for that. (patch four). debugedit didn't have any specific tests. It was only tested as part of the whole rpmbuild debuginfo pipeline. So I first added a bunch of test cases (the first two patches). That helped make sure my debugedit relocation code refactoring was working as expected (the third patches). It also found an small issue (under valgrind) with the .debug_line rewriting code (the last patch). [PATCH 1/5] Add some color to the tests if available and the terminal [PATCH 2/5] Add some debugedit tests. [PATCH 3/5] debugedit: Refactor reading/writing of relocated values. [PATCH 4/5] Handle .debug_macro in debugedit. [PATCH 5/5] debugedit: Make sure .debug_line old/new idx start equal. Series applied via https://github.com/rpm-software-management/rpm/pull/754 Thanks for the patches! - Panu - ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Python generators: Fails to add != dependency (#639)
https://github.com/rpm-software-management/rpm/pull/757 -- 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/639#issuecomment-503952134___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Python generators: Fails to add != dependency (#639)
I have a fix in https://github.com/hroncok/rpm/tree/canonicalize_version but github 500s on creating the PR. -- 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/639#issuecomment-503947840___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Python generators: Fails to add != dependency (#639)
https://packaging.pypa.io/en/latest/utils/#packaging.utils.canonicalize_version -- 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/639#issuecomment-503911967___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint