Re: [Rpm-maint] [rpm-software-management/rpm] Add %{shescape:...} macro for single quoting with escapes for the shell (#1783)

2021-09-22 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -1145,6 +1145,29 @@ static size_t doVerbose(MacroBuf mb, rpmMacroEntry me, > ARGV_t argv) return 0; } +static size_t doShescape(MacroBuf mb, rpmMacroEntry me, ARGV_t argv) +{ +char *result, *dst; +const char *src = argv[1]; + +

[Rpm-maint] [rpm-software-management/rpm] Check file iterator for being NULL consistently (#1784)

2021-09-22 Thread Florian Festi
No point in allowing NULL only for one of the arguments. Thanks to ex0z3 (https://github.com/ex0z3) for reporting! Resolves: #1782 You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1784 -- Commit Summary -- * https://github.

Re: [Rpm-maint] [rpm-software-management/rpm] Add %{shescape:...} macro for single quoting with escapes for the shell (#1783)

2021-09-22 Thread Florian Festi
Looks good to me. -- 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/1783#issuecomment-924876305___ Rpm-maint mailing list Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Add %{shescape:...} macro for single quoting with escapes for the shell (#1783)

2021-09-22 Thread Panu Matilainen
@pmatilai pushed 1 commit. 794617038125580fc94c8570a3bbc0eba3c1008b Use the new shescape macro for :shescape query format too -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1783/files/a13ae1fb454cd2bc

Re: [Rpm-maint] [rpm-software-management/rpm] Properly quote %sources and %patches (#1781)

2021-09-22 Thread Panu Matilainen
See #1783 -- 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/1781#issuecomment-924829127___ Rpm-maint mailing list Rpm-maint@lists.

[Rpm-maint] [rpm-software-management/rpm] Add %{shescape:...} macro for single quoting with escapes for the shell (#1783)

2021-09-22 Thread Panu Matilainen
This is exactly the same as :shescape query format, hence the name. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1783 -- Commit Summary -- * https://github.com/rpm-software-management/rpm/pull/1783/commits/a13ae1fb454cd2b

Re: [Rpm-maint] [rpm-software-management/rpm] Properly quote %sources and %patches (#1781)

2021-09-22 Thread Panu Matilainen
> A macro will always see the macro expanded version of the parameter. Not sure > if there is a way around that with the current macro system - especially as > one needs to expand %{PATCH5} or what every hold the data in question at some > point. Macro arguments are expanded yes, but you need t

Re: [Rpm-maint] [rpm-software-management/rpm] Properly quote %sources and %patches (#1781)

2021-09-22 Thread Florian Festi
Yes, we need quoting at more places. Reopened #1644. -- 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/1781#issuecomment-924750241_

Re: [Rpm-maint] [rpm-software-management/rpm] rpm-build: %setup and %autosetup crashes on directories with spaces (#1644)

2021-09-22 Thread Panu Matilainen
Yup. I bet there are plenty of places needing that kind of quoting, only most of the world is sane enough not to use spaces and special characters like quotes in file names so nobody ever notices. -- You are receiving this because you are subscribed to this thread. Reply to this email directly

Re: [Rpm-maint] [rpm-software-management/rpm] Properly quote %sources and %patches (#1781)

2021-09-22 Thread Florian Festi
Not sure if we can do a quoting macro. This patch has the benefit of running in lua and though work on the original content of the file name. A macro will always see the macro expanded version of the parameter. Not sure if there is a way around that with the current macro system - especially as

Re: [Rpm-maint] [rpm-software-management/rpm] rpm-build: %setup and %autosetup crashes on directories with spaces (#1644)

2021-09-22 Thread Florian Festi
This needs the same kind of quoting as #1445 but at other places. %patches is not actually used by %autosetup. -- 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/1644#issuec

Re: [Rpm-maint] [rpm-software-management/rpm] rpm-build: %setup and %autosetup crashes on directories with spaces (#1644)

2021-09-22 Thread Florian Festi
Reopened #1644. -- 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/1644#event-5341789680___ Rpm-maint mailing list Rpm-maint@lists

Re: [Rpm-maint] [rpm-software-management/rpm] Properly quote %sources and %patches (#1781)

2021-09-22 Thread Panu Matilainen
Adding the single quotes seems like a no-brainer on the outset, but when you need to escape them, it opens a different can of worms: macro use is not limited to shell, only there's no way to tell (rhymes nicely, no? :laughing: ) and can occur outside the spec as well (the number of backslashes s