Re: [Rpm-maint] [rpm-software-management/rpm] RFE: implement wrapper for posix.fork()+posix.exec() (#389)

2018-02-06 Thread Jeff Johnson
@ignatenkobrain: Um not, implements, but embeds. lposix.c was a concatenation of the lua posix module available at the time. Note the "posix." name spacing. Perhaps it's time to upgrade the lua posix module and eliminate bloat? -- You are receiving this because you are subscribed to this

Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)

2018-02-06 Thread daurnimator
> And I meant adding the couple of required #ifdef's into the code directly, > without pulling a whole external entity into our codebase for our rather > modest needs. Well I guess it's easy enough to pull ~20 lines out of compat-5.3 and paste them into the start of the file -- You are

Re: [Rpm-maint] [rpm-software-management/rpm] lua: add rpm.execute() (#390)

2018-02-06 Thread Igor Gnatenko
@Conan-Kudo no, they don't use malloc, they use `lua_newuserdata` which is managed by Lua itself IIUC. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] lua: add rpm.execute() (#390)

2018-02-06 Thread ニール・ゴンパ
@ignatenkobrain Is the memory leak fix needed in upstream [luaposix](https://github.com/luaposix/luaposix)? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] lua: add rpm.execute() (#390)

2018-02-06 Thread Igor Gnatenko
Alright, moved under RPM namespace and renamed to `execute()` which better aligns with what function really does. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] lua: add posix.spawn() (#390)

2018-02-06 Thread Igor Gnatenko
@pmatilai okay, will rework it. Does code look good for you? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] lua: add posix.spawn() (#390)

2018-02-06 Thread Panu Matilainen
We shouldn't really be adding stuff to the posix or rexlib modules, because we're not the upstream for them, the place for rpm specific helpers would be the rpm module. Yes there's redirect2null() which should've gone to rpm too, and some other local hacks, but if anything we should be working

Re: [Rpm-maint] [rpm-software-management/rpm] lua: add posix.spawn() (#390)

2018-02-06 Thread Igor Gnatenko
@Conan-Kudo right, fixed. -- 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/390#issuecomment-363428659___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] lua: add posix.spawn() (#390)

2018-02-06 Thread ニール・ゴンパ
@ignatenkobrain Do you mean "not optimal" instead of "not optional"? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: implement wrapper for posix.fork()+posix.exec() (#389)

2018-02-06 Thread Igor Gnatenko
Submitted #390 for 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/issues/389#issuecomment-363428099___ Rpm-maint mailing list

[Rpm-maint] [rpm-software-management/rpm] lua: add posix.spawn() (#390)

2018-02-06 Thread Igor Gnatenko
At this point, if you want to avoid using shell you have only option which is to use posix.fork() and posix.exec() which is too verbose and not optional (as Florian Weimer says, posix_spawn() can be implemented more efficiently than usual fork() / execve() sequence). Typical use-case is shown

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: implement wrapper for posix.fork()+posix.exec() (#389)

2018-02-06 Thread Igor Gnatenko
@n3npq except that RPM doesn't use lua posix module... It implements its own. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: implement wrapper for posix.fork()+posix.exec() (#389)

2018-02-06 Thread Jeff Johnson
These are RFE's for the lua posix module (and should be implemented/patched there), not for RPM. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] tests: Ensure that only available gpg is used to import keys (#378)

2018-02-06 Thread Panu Matilainen
Closed #378. -- 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/378#event-1459926830___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] tests: Ensure that only available gpg is used to import keys (#378)

2018-02-06 Thread Panu Matilainen
What actually broke the CI is a downstrame libgcrypt patch, see https://bugzilla.redhat.com/show_bug.cgi?id=1542453 In the meanwhile I've changed the gpg import to only use gpg2 ever, as that's what the testsuite requires really. Closing this one. -- You are receiving this because you are

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: implement wrapper for posix.fork()+posix.exec() (#389)

2018-02-06 Thread Florian Weimer
It might also be nice to use `posix_spawn`, which can be implemented more efficiently that the usual `fork`/`execve` sequence. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] RFE: implement wrapper for posix.fork()+posix.exec() (#389)

2018-02-06 Thread Igor Gnatenko
Many of packages which use filetriggers (e.g glibc and systemd) use following construction: ```lua pid = posix.fork() if pid == 0 then assert(posix.exec("/foo/bar")) elseif pid > 0 then posix.wait(pid) end ``` this is just not user friendly and we could implement something like

Re: [Rpm-maint] [rpm-software-management/rpm] work with lua 5.3 without compat mode (#169)

2018-02-06 Thread Panu Matilainen
>> What I'd prefer is a patch that adds support for Lua 5.3 without requiring >> LUA_COMPAT_MODULE for it, but allowing 5.1-5.2 to keep building without any >> extra hassle. >That's what compat-5.3 is for. The question in here was how to bring in a new dependency? Is vendoring the best way?