Package: sbuild Version: 0.65.2-1dima3 Severity: normal Hi. Here's a patch that allows an interactive shell to be spawned as an external command. STDIN, STDOUT and STDERR must be redirected to make the shell usable, so this patch requires the patch in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782672 It could be made independent, but that would require more special-case code. Clearly this needs to be in the mapage also, but I wanted to wait before this got accepted before making that change
>From 1a19e20e46c5dc231d7a8157c086f907c900bca3 Mon Sep 17 00:00:00 2001 From: Dima Kogan <d...@secretsauce.net> Date: Tue, 21 Apr 2015 16:14:42 -0700 Subject: [PATCH 1/2] external command %SBUILD_SHELL produces an interactive shell --- lib/Sbuild/Build.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm index 03e5522..e9a233d 100644 --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -1168,6 +1168,7 @@ sub run_external_commands { my $hostarch = $self->get('Host Arch') if ($self->get('Host Arch')); my $build_dir = $self->get('Build Dir'); my $pkgbuild_dir = $build_dir . '/' . $self->get('DSC Dir'); + my $shell_cmd = "bash -i </dev/tty >/dev/tty 2>/dev/tty"; my %percent = ( "%" => "%", "d" => $dsc, "SBUILD_DSC" => $dsc, @@ -1175,6 +1176,7 @@ sub run_external_commands { "a" => $hostarch, "SBUILD_HOST_ARCH" => $hostarch, "b" => $build_dir, "SBUILD_BUILD_DIR" => $build_dir, "p" => $pkgbuild_dir, "SBUILD_PKGBUILD_DIR" => $pkgbuild_dir, + "s" => $shell_cmd, "SBUILD_SHELL" => $shell_cmd, ); if ($chroot == 0) { my $chroot_dir = $self->get('Chroot Dir'); -- 2.1.4