Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690264 - sys-kernel/genkernel-4.0.0_beta6 don't pass TMPDIR into build sanbox, eltpatch use /tmp
Summary: sys-kernel/genkernel-4.0.0_beta6 don't pass TMPDIR into build sanbox, eltpatc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-07-20 05:38 UTC by Denis Kaganovich
Modified: 2019-08-07 00:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
pass TMPDIR into build sanbox (genkernel-4-tmpdir.patch,276 bytes, patch)
2019-07-20 05:38 UTC, Denis Kaganovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Kaganovich 2019-07-20 05:38:16 UTC
Created attachment 583686 [details, diff]
pass TMPDIR into build sanbox

sys-kernel/genkernel-4.0.0_beta6 don't pass TMPDIR into build sanbox, eltpatch use /tmp. (I run genkernel in ebuild, checked with top-level sandbox). Simple add TMPDIR into envvars sanitize it.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-20 12:10:45 UTC
Did you really encounter an error or did you only read code and reported? I am asking becaust eltpatch patch shouldn't use TMPDIR because we set ELT_LOGDIR in https://gitweb.gentoo.org/proj/genkernel.git/tree/worker_modules/gkbuild.sh?h=v4.0.0_beta6#n654
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-20 18:38:13 UTC
I now understand the problem.

PS: Curious, is this the only problem you encounter? I am currently adding --no-sandbox to allow running within portage where already a sandbox process is running.
Comment 3 Larry the Git Cow gentoo-dev 2019-07-21 16:26:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=306dd3f2f8c5eb1638a419f691781b68eeaf8d58

commit 306dd3f2f8c5eb1638a419f691781b68eeaf8d58
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-07-20 22:03:27 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-07-21 16:02:00 +0000

    gen_funcs.sh: gkbuild(): Export $TMPDIR
    
    Some portage programs like eltpatch depend on $TMPDIR.
    
    Bug: https://bugs.gentoo.org/690264
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 gen_funcs.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-21 21:05:31 UTC
Released with >=sys-kernel/genkernel-4.0.0_beta8.
Comment 5 Denis Kaganovich 2019-07-22 22:23:43 UTC
Yes, no more true sandbox-related problems ;). Near this area was problems with config-order, so logfile & tempdur/tmpdir from cmdline was always ignored to (to sandbox [un]pleasure), but I move everything into config file and keep bug reporting to future - as I don't figure out precise case. IMHO priority of cmdline must be strictly on top, so cmdline values must be always respected.
Comment 6 Denis Kaganovich 2019-07-22 22:27:00 UTC
PS But I keep in mind to try all packages. Now was only basic (busybox, etc) + mdadm.
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2019-07-22 22:48:23 UTC
(In reply to Denis Kaganovich from comment #5)
> Yes, no more true sandbox-related problems ;). Near this area was problems
> with config-order, so logfile & tempdur/tmpdir from cmdline was always
> ignored to (to sandbox [un]pleasure), but I move everything into config file
> and keep bug reporting to future - as I don't figure out precise case. IMHO
> priority of cmdline must be strictly on top, so cmdline values must be
> always respected.

I noticed this as well while working on your bug report and it should be already resolved in >=sys-kernel/genkernel-4.0.0_beta8.
Comment 8 Denis Kaganovich 2019-08-07 00:33:14 UTC
Strange: on most rare updated systems, disabling second sandbox required. On never - just warning happened. On rare - emerged (updated) "system" and genkernel (-DuN option), so still unknown true reason. Thanks for option to disable sanbox...