diff options
| author | Antonio Terceiro <terceiro@debian.org> | 2016-01-04 20:22:20 (GMT) |
|---|---|---|
| committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-01-05 11:54:11 (GMT) |
| commit | 98e219ebfa933aa1b9591eed9b4844c5390430b6 (patch) | |
| tree | 95587b6f4193075954bec91b36a4a9ac9faf2f58 | |
| parent | 298cc9311dace794ce1e86d5a4d948da062e7b91 (diff) | |
adt-build-{lxc,lxd}: Run testbed setup scripts also if they are not executable
The scripts in setup-commands/* are installed as data and not as proper
binaries, what makes adt-build-{lxc,lxd} not run any setup, producing
mostly broken containers.
Since the setup script is always piped into a shell instead of executed
directly, it is probably not useful to install it with the execution
bits on anyway.
Closes: #809917
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rwxr-xr-x | tools/adt-build-lxc | 2 | ||||
| -rwxr-xr-x | tools/adt-build-lxd | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 23ba0af..c9d9e30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ autopkgtest (3.19.1) UNRELEASED; urgency=medium * Gracefully handle failure to kill a timed out process. * ssh-setup/nova: Use image UUID instead of its name for "nova boot". This avoids failures if multiple images have the same name. (LP: #1524216) + * adt-build-{lxc,lxd}: Run testbed setup scripts also if they are not + executable. Thanks Antonio Terceiro! (Closes: #809917) -- Martin Pitt <mpitt@debian.org> Sun, 20 Dec 2015 09:52:05 +0100 diff --git a/tools/adt-build-lxc b/tools/adt-build-lxc index 89a8750..0247f2c 100755 --- a/tools/adt-build-lxc +++ b/tools/adt-build-lxc @@ -113,7 +113,7 @@ setup() { # find setup-testbed script for script in $(dirname $(dirname "$0"))/setup-commands/setup-testbed \ /usr/share/autopkgtest/setup-commands/setup-testbed; do - if [ -x "$script" ]; then + if [ -r "$script" ]; then echo "Running setup script $script..." cat "$script" | lxc-attach --name=$1 sh break diff --git a/tools/adt-build-lxd b/tools/adt-build-lxd index f525215..22e6343 100755 --- a/tools/adt-build-lxd +++ b/tools/adt-build-lxd @@ -82,7 +82,7 @@ setup() { # find setup-testbed script for script in $(dirname $(dirname "$0"))/setup-commands/setup-testbed \ /usr/share/autopkgtest/setup-commands/setup-testbed; do - if [ -x "$script" ]; then + if [ -r "$script" ]; then echo "Running setup script $script..." lxc exec "$CONTAINER" -- sh < "$script" break |
