Package: sbuild Version: 0.64.0-1 Severity: normal Tags: patch Dear Maintainer,
during package builds I noticed my current desktop session variables leaking into the build-logs. This has been fine, until unit-tests started to interact with my current session's XDG_RUNTIME_DIR. Please consider removing a few more variables at unset_env() time. Patch is attached. Regards, Dmitrijs.
>From f9110d36d5d4ac425aa1354eda4feb96767eeb2a Mon Sep 17 00:00:00 2001 From: Dmitrijs Ledkovs <x...@ubuntu.com> Date: Thu, 7 Nov 2013 22:00:08 +0000 Subject: [PATCH] Unset more unneeded typical desktop variables. They are mostly harmless, sometimes unit-tests of package under build interracts badly with current session via those variables (e.g. RUNTIME_DIR). --- lib/Buildd.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Buildd.pm b/lib/Buildd.pm index 420e724..c2a04df 100644 --- a/lib/Buildd.pm +++ b/lib/Buildd.pm @@ -77,6 +77,10 @@ sub unset_env () { # other unneeded variables that might be set delete $ENV{'DISPLAY'}; delete $ENV{'TERM'}; + delete $ENV{'XDG_RUNTIME_DIR'}; + delete $ENV{'XDG_SEAT'}; + delete $ENV{'XDG_SESSION_ID'}; + delete $ENV{'XDG_VTNR'}; } sub lock_file ($;$) { -- 1.8.4.2