public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 1/2] ci_build: Add signing cached repo test
@ 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 ` [PATCH 1/2] ci_build: Add signing cached repo test Henning Schild
  0 siblings, 2 replies; 5+ messages in thread
From: Maxim Yu. Osipov @ 2019-07-24 20:33 UTC (permalink / raw)
  To: isar-users

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"
 
 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
-- 
2.11.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-25 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 20:33 [PATCH 1/2] ci_build: Add signing cached repo test 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 ` [PATCH 1/2] ci_build: Add signing cached repo test Henning Schild
2019-07-25 16:38   ` Baurzhan Ismagulov
2019-07-25 19:30   ` Baurzhan Ismagulov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox