Re: [Rpm-maint] [rpm-software-management/rpm] Add all of the rpmbuild macro aliases to rpmspec as well (#848)
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/848#pullrequestreview-290938701___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Add all of the rpmbuild macro aliases to rpmspec as well (#848)
This adds all of the rpmbuild popt aliases that expand to defines to rpmspec as well. It also changes --trace to include --POPTdesc argument help. Signed-off-by: Peter Jones pjo...@redhat.com You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/848 -- Commit Summary -- * Add all of the rpmbuild macro aliases to rpmspec as well -- File Changes -- M rpmpopt.in (25) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/848.patch https://github.com/rpm-software-management/rpm/pull/848.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/848 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] %_build_cpu is untranslated in macros file (#791)
Panu, this is still open. Any insight on this issue? -- 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/791#issuecomment-533179508___ 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 new %[ ] expression expansion syntax (#846)
I also noticed it, but didn't want to check if it's still true ;) I removed that sentence. -- 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/846#issuecomment-533113309___ 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 double-free on ternary operator parsing error (#847)
The duplicate error is because rpmExprStr/rpmExprBool ignore the return value of the `rdToken()` call. That should also be fixed. It's not really about TOK_TERNARY_ALT, you'll get the same error with `%{expr:4 * +}` If the different error message bothers you, just delete the TOK_EOF case so that you'll also get a syntax error if the expression ends unexpectedly. -- 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/847#issuecomment-533110819___ 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 new %[ ] expression expansion syntax (#846)
Thanks. I'll need to take a proper look at this all, but this caught my eye from the docs as it's getting moved around in the patch: > There is currently an 8K limit on the size that this macro can expand to. That's a *little* outdated info, might want to drop it while at it :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/846#issuecomment-533106765___ 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 double-free on ternary operator parsing error (#847)
That'd work, but then we have inconsistent error messages depending on which branch the error is in: ``` $ ./rpm --eval "%{expr:0 < 1 ? 0 : 4+}" error: unexpected end of expression: 0 < 1 ? 0 : 4+ $ ./rpm --eval "%{expr:0 < 1 ? 4+ : 0}" error: syntax error in expression: 0 < 1 ? 4+ : 0 error:^ ``` It also causes a duplicate error at least in the bareword case: ``` $ ./rpm --eval "%{expr:bare}" error: bare words are no longer supported, please use "...": bare error: ^ error: syntax error in expression: bare error:^ Adding TOK_TERNARY_ALT as a fallthrough case to TOK_EOF in doPrimary() seems to work but didn't actually *think* about it so dunno if there would be other side-effects. -- 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/847#issuecomment-533104462___ 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 new %[ ] expression expansion syntax (#846)
I now also documented the difference to `%{expr:}` -- 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/846#issuecomment-533100283___ 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 new %[ ] expression expansion syntax (#846)
@mlschroe pushed 2 commits. c2469258af1915aeef5b44a6c1444a7a938d99d0 Add support for primary expansion to the expression parser d77df7f2275027228f15b674bbab59d9496adb61 Implement short-circuit for logical and ternary operators -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/846/files/3288db0c688e89131833258d9cac028fabf1e89e..d77df7f2275027228f15b674bbab59d9496adb61 ___ 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 new %[ ] expression expansion syntax (#846)
I fixed the comment plus added some basic documentation. -- 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/846#issuecomment-533091735___ 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 new %[ ] expression expansion syntax (#846)
@mlschroe pushed 2 commits. 02819e9b723f29329acaed20051f5a0cee10121a Add support for primary expansion to the expression parser 3288db0c688e89131833258d9cac028fabf1e89e Implement short-circuit for logical and ternary operators -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/846/files/616dc88f8e86cbad8d95722ae4357df9008e4df4..3288db0c688e89131833258d9cac028fabf1e89e ___ 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 double-free on ternary operator parsing error (#847)
I think we just need a ``` exprErr(state, _("syntax error in expression"), state->p); ``` in doPrimary()'s default case to fix missing error for `%{expr:0 < 1 ? 4+ : 0}`. -- 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/847#issuecomment-533083285___ 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 new %[ ] expression expansion syntax (#846)
pavlinamv commented on this pull request. > @@ -1349,6 +1386,13 @@ expandMacro(MacroBuf mb, const char *src, size_t slen) doShellEscape(mb, s, (se - 1 - s)); s = se; continue; + case '[': /* %[...] expression expansion */ + if (mb->macro_trace) + printMacro(mb, s, se); + s++;/* skip ( */ ``` s++;/* skip ( */ ``` -> ``` s++;/* skip [ */ ``` -- 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/846#pullrequestreview-290481295___ 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 double-free on ternary operator parsing error (#847)
@pmatilai pushed 1 commit. 203a47d2d8b7b499fba80d0fa5710429d17afbbe Fix double-free on ternary operator parsing error -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/847/files/7ec004c662eb73bc553c1ef4426ab991f244973a..203a47d2d8b7b499fba80d0fa5710429d17afbbe ___ 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 double-free on ternary operator parsing error (#847)
Oh, right, got mixed up trying various different things. With eg bare words (which is where I spotted this) both the true and false clauses report the error, but with unexpected end of expression the error message is missing (but it returns with exit code 1). I'll fix the test + commit message... -- 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/847#issuecomment-533069135___ 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 double-free on ternary operator parsing error (#847)
The false branch does get parsed, this needs to be fixed 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/847#issuecomment-533062908___ 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 new %[ ] expression expansion syntax (#846)
Yes, I just ran out of time yesterday but wanted to show your guys the current state. I've added some test cases, next comes the documentation. -- 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/846#issuecomment-533061305___ 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 double-free on ternary operator parsing error (#847)
good catch, thanks! -- 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/847#issuecomment-533060875___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Fix double-free on ternary operator parsing error (#847)
v1 gets double-freed when theres an error parsing the result side of the ternary operator. Add testcases to go, one that catches the actual error and another which serves to demonstrate that the false branch doesnt get parsed at all, errors or no. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/847 -- Commit Summary -- * Fix double-free on ternary operator parsing error -- File Changes -- M rpmio/expression.c (2) M tests/rpmmacro.at (3) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/847.patch https://github.com/rpm-software-management/rpm/pull/847.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/847 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Localize our chroot in/out operations to minimize time spent inside (#836)
Hmph, there's an elephant or two in the room. Of course there is... There are two major cases unresolved by this: fingerprinting, and rpm -V verification. Fixing verify is merely annoying, but fingerprinting is much harder and more intrusive as there are several far-apart places where we stat() stuff. However those are always read-only accesses, which seems to be mostly harmless and nothing seems to mind. The cases where it matters are open, close and writing. So at the very least, the commit message needs to clarify the chroot rules being laid out here, and that's what this is largely about: while rpm itself can generally be fixed to function on whichever side of chroot, that's not the case for external libraries we might call, and there's also our own API users and *their* external libraries that can be affected by all this. -- 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/836#issuecomment-533042740___ 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 new %[ ] expression expansion syntax (#846)
Yup, some testcases (along with docs) that show the behavior differences to %{expr:...} would be appreciated. -- 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/846#issuecomment-533035635___ 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 new %[ ] expression expansion syntax (#846)
Cool. It would be great to add a testcase. -- 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/846#issuecomment-533026052___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint