summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-02-26 20:48:09 +0100
committerHolger Levsen <holger@layer-acht.org>2015-02-26 20:48:09 +0100
commitca3438c6ea44d952d0f6834aaa3e3a4da853f786 (patch)
tree23b7376eb5df0d18c99d6ad88deb264241774204
parent4f7003859c69f35ca1669442badf26e930a1e3ad (diff)
downloadjenkins.debian.net-ca3438c6ea44d952d0f6834aaa3e3a4da853f786.tar.xz
add script to add key for reproducible repo - to proof the TODO item 'merge the two scripts to create schroots'... :/
-rwxr-xr-xbin/schroot-create.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index 9de123ff..fd9b3b43 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -44,6 +44,45 @@ if [ -z "$CHROOT_TARGET" ]; then
exit 1
fi
+#
+# create script to add key for reproducible repo
+#
+add_repokey() {
+ TMPFILE=$1
+ shift
+ cat > $TMPFILE <<- EOF
+echo "-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQINBFQsy/gBEADKGF55qQpXxpTn7E0Vvqho82/HFB/yT9N2wD8TkrejhJ1I6hfJ
+zFXD9fSi8WnNpLc6IjcaepuvvO4cpIQ8620lIuONQZU84sof8nAO0LDoMp/QdN3j
+VViXRXQtoUmTAzlOBNpyb8UctAoSzPVgO3jU1Ngr1LWi36hQPvQWSYPNmbsDkGVE
+unB0p8DCN88Yq4z2lDdlHgFIy0IDNixuRp/vBouuvKnpe9zyOkijV83Een0XSUsZ
+jmoksFzLzjChlS5fAL3FjtLO5XJGng46dibySWwYx2ragsrNUUSkqTTmU7bOVu9a
+zlnQNGR09kJRM77UoET5iSXXroK7xQ26UJkhorW2lXE5nQ97QqX7igWp2u0G74RB
+e6y3JqH9W8nV+BHuaCVmW0/j+V/l7T3XGAcbjZw1A4w5kj8YGzv3BpztXxqyHQsy
+piewX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mcPuqeOMMDQ+du6Hqj2Yl5GYo2McWvjpSgkt5VmQfIz
+=X8YA
+-----END PGP PUBLIC KEY BLOCK-----" | apt-key add -
+EOF
+}
+
bootstrap() {
mkdir -p "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d"
echo force-unsafe-io > "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d/02dpkg-unsafe-io"
@@ -58,6 +97,14 @@ bootstrap() {
echo "${EXTRA_PACKAGES}" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list >/dev/null
echo "${EXTRA_SOURCES}" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list >/dev/null
+ if [ "$1" == "reproducible" ] ; then
+ TMPFILE=$(mktemp -u)
+ add_repokey $CHROOT_TARGET/$TMPFILE
+ sudo chroot $CHROOT_TARGET $TMPFILE
+ rm $TMPFILE
+ shift
+ fi
+
sudo chroot $CHROOT_TARGET apt-get update
if [ -n "$1" ] ; then
for d in proc dev dev/pts ; do