public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: "Maxim Yu. Osipov" <mosipov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/2] ci_build: Add signing cached repo test
Date: Thu, 25 Jul 2019 08:52:10 +0200	[thread overview]
Message-ID: <20190725085210.441f52c4@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20190724203303.11549-1-mosipov@ilbers.de>

Hi,

testing is always good but i guess we first need an implementation that
deals with passphrase protected keys and gpg-agent.

On Wed, 24 Jul 2019 22:33:02 +0200
"Maxim Yu. Osipov" <mosipov@ilbers.de> wrote:

> Signed-off-by: Maxim Yu. Osipov <mosipov@isar-build.org>
> ---
>  scripts/ci_build.sh | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
> index 01f09b6..fcec14d 100755
> --- a/scripts/ci_build.sh
> +++ b/scripts/ci_build.sh
> @@ -50,6 +50,7 @@ REPRO_TARGETS_SET="\
>              multiconfig:qemuamd64-stretch:isar-image-base \
>              multiconfig:qemuarm-buster:isar-image-base"
>  
> +GPG_PUB_KEY_FILE="$HOME/.gnupg/my_pub.key"

This will not work. The test keys have to be part of the repo.

Henning

>  show_help() {
>      echo "This script builds the default Isar images."
> @@ -103,6 +104,9 @@ do
>          ;;
>      -r|--repro)
>          REPRO_BUILD="1"
> +        case "$2" in
> +        -s|--sign) SIGN_REPO='1'; shift ;;
> +        esac
>          ;;
>      *)
>          echo "error: invalid parameter '$key', please try '--help'
> to get list of supported parameters" @@ -113,6 +117,7 @@ do
>      shift
>  done
>  
> +
>  # Setup build folder for the current build
>  if [ ! -d "$BUILD_DIR" ]; then
>          mkdir -p "$BUILD_DIR"
> @@ -124,6 +129,9 @@ if [ -n "$CROSS_BUILD" ]; then
>  fi
>  
>  if [ -n "$REPRO_BUILD" ]; then
> +    if [ -n "$SIGN_REPO" ]; then
> +        echo BASE_REPO_KEY=\"file://$GPG_PUB_KEY_FILE\" >>
> conf/local.conf
> +    fi
>      # Enable use of cached base repository
>      bitbake $BB_ARGS -c cache_base_repo $REPRO_TARGETS_SET
>      while [ -e bitbake.sock ]; do sleep 1; done
> @@ -134,6 +142,9 @@ if [ -n "$REPRO_BUILD" ]; then
>      # Cleanup and disable use of cached base repository
>      sudo rm -rf tmp
>      sed -i -e 's/ISAR_USE_CACHED_BASE_REPO ?=
> "1"/#ISAR_USE_CACHED_BASE_REPO ?= "1"/g' conf/local.conf
> +    if [ -n "$SIGN_REPO" ]; then
> +        sed -i -e 's/BASE_REPO_KEY/#BASE_REPO_KEY/g' conf/local.conf
> +    fi
>  fi
>  
>  # Start cross build for the defined set of configurations


  parent reply	other threads:[~2019-07-25  6:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 20:33 Maxim Yu. Osipov
2019-07-24 20:33 ` [PATCH 2/2] doc/user_manual: Add reference to GPG tutorial Maxim Yu. Osipov
2019-07-25  6:52 ` Henning Schild [this message]
2019-07-25 16:38   ` [PATCH 1/2] ci_build: Add signing cached repo test Baurzhan Ismagulov
2019-07-25 19:30   ` Baurzhan Ismagulov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190725085210.441f52c4@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=mosipov@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox