summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-07-13 02:42:46 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:37 +0100
commit5686484347745a9d9c2cc945998dafaf61eb9411 (patch)
treebc15e0b4b173a2a5be320d514e87e1ae3e03fb0c /helpers
parent1985ada3a9cd98bd467450f977111c7b53f6744d (diff)
downloadvyos-live-build-5686484347745a9d9c2cc945998dafaf61eb9411.tar.gz
vyos-live-build-5686484347745a9d9c2cc945998dafaf61eb9411.zip
Temporarily replace /dev/urandom with /dev/random when creating local packages key.
This avoids blocking automated mage builds; we don't care about the security of this key anyway.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_chroot_sources9
1 files changed, 9 insertions, 0 deletions
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index cecba9593..b888c4aba 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -127,6 +127,12 @@ case "${1}" in
# Ensure ~/.gnupg exists (required for gnupg >= ~1.4.9)
mkdir -p chroot/root/.gnupg
+ # Temporarily replace /dev/urandom with /dev/random so as not
+ # to block automated image builds; we don't care about the
+ # security of this key anyway.
+ mv chroot/dev/random chroot/dev/random.orig
+ cp -a chroot/dev/urandom chroot/dev/random
+
if ls cache/local-package-keyring.* >/dev/null 2>&1
then
cp cache/local-package-keyring.* chroot/root
@@ -173,6 +179,9 @@ case "${1}" in
rm chroot/root/local-package-keyring.pub
rm chroot/root/local-package-keyring.sec
+ # Revert /dev/random
+ mv chroot/dev/random.orig chroot/dev/random
+
# Remove /root/.gnupg if we created it during the signing process
if [ "${_LH_DOTGNUPG_EXISTED}" -eq 0 ]
then