[PATCH v2 11/12] tests/docker: add support for DEB_KEYRING

Alex Bennée posted 12 patches 5 years, 6 months ago
There is a newer version of this series
[PATCH v2 11/12] tests/docker: add support for DEB_KEYRING
Posted by Alex Bennée 5 years, 6 months ago
For installing stuff from sid or ports you may need to manually
specify the location of the keyring. You can even import keys into
your personal keyring and point it there, e.g.:

  gpg --keyserver keyring.debian.org --recv-keys 84C573CD4E1AFD6C
  make docker-binfmt-image-debian-sid-hppa DEB_TYPE=sid DEB_ARCH=hppa \
      DEB_URL=http://ftp.ports.debian.org/debian-ports/ \
      EXECUTABLE=./hppa-linux-user/qemu-hppa V=1 \
      DEB_KEYRING=${HOME}/.gnupg/pubring.kbx

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/debian-bootstrap.pre | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre
index c164778c302..35c85f7db8a 100755
--- a/tests/docker/dockerfiles/debian-bootstrap.pre
+++ b/tests/docker/dockerfiles/debian-bootstrap.pre
@@ -79,6 +79,13 @@ else
     fi
 fi
 
+#
+# Add optional args
+#
+if [ -n "${DEB_KEYRING}" ]; then
+    DEBOOTSTRAP="${DEBOOTSTRAP} --keyring=${DEB_KEYRING}"
+fi
+
 #
 # Finally check to see if any qemu's are installed
 #
-- 
2.20.1


Re: [PATCH v2 11/12] tests/docker: add support for DEB_KEYRING
Posted by Philippe Mathieu-Daudé 5 years, 6 months ago
On 7/22/20 8:29 AM, Alex Bennée wrote:
> For installing stuff from sid or ports you may need to manually
> specify the location of the keyring. You can even import keys into
> your personal keyring and point it there, e.g.:
> 
>   gpg --keyserver keyring.debian.org --recv-keys 84C573CD4E1AFD6C
>   make docker-binfmt-image-debian-sid-hppa DEB_TYPE=sid DEB_ARCH=hppa \
>       DEB_URL=http://ftp.ports.debian.org/debian-ports/ \
>       EXECUTABLE=./hppa-linux-user/qemu-hppa V=1 \
>       DEB_KEYRING=${HOME}/.gnupg/pubring.kbx
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/dockerfiles/debian-bootstrap.pre | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre
> index c164778c302..35c85f7db8a 100755
> --- a/tests/docker/dockerfiles/debian-bootstrap.pre
> +++ b/tests/docker/dockerfiles/debian-bootstrap.pre
> @@ -79,6 +79,13 @@ else
>      fi
>  fi
>  
> +#
> +# Add optional args
> +#
> +if [ -n "${DEB_KEYRING}" ]; then
> +    DEBOOTSTRAP="${DEBOOTSTRAP} --keyring=${DEB_KEYRING}"
> +fi
> +
>  #
>  # Finally check to see if any qemu's are installed
>  #
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [PATCH v2 11/12] tests/docker: add support for DEB_KEYRING
Posted by Richard Henderson 5 years, 6 months ago
On 7/21/20 11:29 PM, Alex Bennée wrote:
> For installing stuff from sid or ports you may need to manually
> specify the location of the keyring. You can even import keys into
> your personal keyring and point it there, e.g.:
> 
>   gpg --keyserver keyring.debian.org --recv-keys 84C573CD4E1AFD6C
>   make docker-binfmt-image-debian-sid-hppa DEB_TYPE=sid DEB_ARCH=hppa \
>       DEB_URL=http://ftp.ports.debian.org/debian-ports/ \
>       EXECUTABLE=./hppa-linux-user/qemu-hppa V=1 \
>       DEB_KEYRING=${HOME}/.gnupg/pubring.kbx
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/dockerfiles/debian-bootstrap.pre | 7 +++++++
>  1 file changed, 7 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~