From: Ian Jackson Subject: Re: [osstest PATCH] target_cmd_build: honour DistccHosts host property Date: Thu, 28 Nov 2013 18:25:16 +0000 Message-ID: <21143.35468.275534.482654@mariner.uk.xensource.com> References: <21143.35146.795471.495670@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21143.35146.795471.495670@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, Ian Campbell List-Id: xen-devel@lists.xenproject.org Ian Jackson writes ("[osstest PATCH] target_cmd_build: honour DistccHosts host property"): > Unfortunately there is another problem which is that ts-xen-build has > been made to require root access (which osstest doesn't have on army). Here's a fix to this. I have not pushed this to pretest yet because I want to be sure we get a pass to fix the freebsd hostflags problem and I'm not 100.000% sure that this change will pass. For now it's in xenbits.xen.org:/home/iwj/ext/osstest.git#wip.distcc Ian. From: Ian Jackson Date: Thu, 28 Nov 2013 18:20:04 +0000 Subject: [PATCH] target_file_exists: Use non-root access for this check The new call of this in built_stash_file makes ts-*-build require root access, which is not desirable. The only other caller of target_file_exists is in ts-xen-install where it is called on /etc/default/xencommons /etc/sysconfig/xencommons /etc/default/xend /etc/sysconfig/xend all of which should be accessible as a normal user in a default config. So change the access to use target_cmd_output rather than target_cmd_output_root. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 4954d84..3bad5ca 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -457,7 +457,7 @@ sub target_putfilecontents_root_stash ($$$$;$) { sub target_file_exists ($$) { my ($ho,$rfile) = @_; - my $out= target_cmd_output_root($ho, "if test -e $rfile; then echo y; fi"); + my $out= target_cmd_output($ho, "if test -e $rfile; then echo y; fi"); return 1 if $out =~ m/^y$/; return 0 if $out !~ m/\S/; die "$rfile $out ?"; -- 1.7.10.4