Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-07-04 Thread Peter Kjellerstedt
core-boun...@lists.openembedded.org] On Behalf Of > Alexander Kanavin > Sent: den 3 juli 2018 14:33 > To: OE-core ; Olof Johansson > > Subject: Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet > files > > Thanks, looks good now! > > Alex > > 2018-07-03 14:01 GMT

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-07-03 Thread Alexander Kanavin
Thanks, looks good now! Alex 2018-07-03 14:01 GMT+02:00 Olof Johansson : > On 18-06-30 08:37 +0200, Alexander Kanavin wrote: >> Ideally, "/" should've been replaced with rpmtsRootDir(ts), but ts is >> not accessible from the function, or from its parent, or parent >> parent. So yes, I concede

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-07-03 Thread Olof Johansson
On 18-06-30 08:37 +0200, Alexander Kanavin wrote: > Ideally, "/" should've been replaced with rpmtsRootDir(ts), but ts is > not accessible from the function, or from its parent, or parent > parent. So yes, I concede this would be too invasive to pass that down > the call stack. So if you can amend

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-30 Thread Alexander Kanavin
2018-06-30 1:53 GMT+02:00 Olof Johansson : >> As scriptlets are executed outside of rpm's chroot, they are being >> written into system's /var/tmp, not rootfs's. This patch should >> probably be amended to prepend the rootfs path when scriptlets are >> written out, and then we should be sorted. >

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-29 Thread Olof Johansson
On 18-06-26 12:33 +0200, Alexander Kanavin wrote: > I believe the culprit is likely this patch: > http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch > > As scriptlets are executed outside of rpm's

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-26 Thread Alexander Kanavin
I believe the culprit is likely this patch: http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch As scriptlets are executed outside of rpm's chroot, they are being written into system's /var/tmp, not

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-25 Thread Alexander Kanavin
The temporary files are written here (macros.in file): %_tmppath %{_var}/tmp What I don't understand is why they end up in the host /var and not the rootfs one. The rpm database location is deduced from to _var as well, and it does get created in the correct location. Further

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-25 Thread Alexander Kanavin
2018-06-25 18:47 GMT+02:00 Mark Hatle : > My question is "why is this a problem"? (Why is debugging on for normal > usage?) > > If you want to enable debugging with RPM, leaving the files is the right > answer. > Otherwise, as mentioned in the post it's REALLY hard to debug scriptlet >

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-25 Thread Olof Johansson
On 18-06-25 15:25 +0200, Alexander Kanavin wrote: > It's better to clean them up in meta/lib/oe/rootfs.py, instead of > forever carrying a custom patch to rpm. I have the same hesitations, but we don't know the filenames to clean up. We can't remove every /var/tmp/rpm-tmp.*, since they can be

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-25 Thread Mark Hatle
On 6/25/18 8:25 AM, Alexander Kanavin wrote: > 2018-06-25 11:27 GMT+02:00 Olof Johansson : >> RPM writes each package scriptlet (post-/preinstall) to >> /var/tmp/rpm-tmp.XX >> --- a lot of files get created. When debugging is enabled, these temporary >> scriptlet files aren't cleaned up at

Re: [OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-25 Thread Alexander Kanavin
2018-06-25 11:27 GMT+02:00 Olof Johansson : > RPM writes each package scriptlet (post-/preinstall) to > /var/tmp/rpm-tmp.XX > --- a lot of files get created. When debugging is enabled, these temporary > scriptlet files aren't cleaned up at all and after a while this results in the >

[OE-core] [PATCH] rpm: Avoid leaking temporary scriplet files

2018-06-25 Thread Olof Johansson
RPM writes each package scriptlet (post-/preinstall) to /var/tmp/rpm-tmp.XX --- a lot of files get created. When debugging is enabled, these temporary scriptlet files aren't cleaned up at all and after a while this results in the filesystem resources are eaten up (like running out of