diff --git a/build-chroots.sh b/build-chroots.sh index dd010412d..671c9334e 100755 --- a/build-chroots.sh +++ b/build-chroots.sh @@ -68,12 +68,15 @@ function strip_whitespace { if [[ ! -z $BUILDERCONF ]]; then STATE_DIR=$(grep STATE_DIR "$BUILDERCONF" | cut -d "=" -f2 | strip_whitespace) YUM_CONF=$(grep YUM_CONF "$BUILDERCONF" | cut -d "=" -f2 | strip_whitespace) + CERT=$(grep CERT "$BUILDERCONF" | cut -d "=" -f2 | strip_whitespace) elif [ -e "/etc/bundle-chroot-builder/builder.conf" ]; then STATE_DIR=$(grep STATE_DIR "/etc/bundle-chroot-builder/builder.conf" | cut -d "=" -f2 | strip_whitespace) YUM_CONF=$(grep YUM_CONF "/etc/bundle-chroot-builder/builder.conf" | cut -d "=" -f2 | strip_whitespace) + CERT=$(grep CERT "/etc/bundle-chroot-builder/builder.conf"| cut -d "=" -f2 | strip_whitespace) else STATE_DIR=$(grep STATE_DIR "/usr/share/defaults/bundle-chroot-builder/builder.conf" | cut -d "=" -f2 | strip_whitespace) YUM_CONF=$(grep YUM_CONF "/usr/share/defaults/bundle-chroot-builder/builder.conf" | cut -d "=" -f2 | strip_whitespace) + CERT=$(grep CERT "/usr/share/defaults/bundle-chroot-builder/builder.conf" | cut -d "=" -f2 | strip_whitespace) fi if [ "$BUILDTYPE" = "clear" ]; then @@ -103,6 +106,12 @@ else sudo -E sh -c "LD_PRELOAD=/usr/lib64/nosync/nosync.so $BUILDERSCRIPT -m $BUILDVER $CLRVER" fi +# insert the certificate needed for signing verification +if [ ! -z $CERT ]; then + echo -e "Installing certificate\n" + sudo cp $CERT "$STATE_DIR/image/$BUILDVER/os-core-update/usr/share/clear/update-ca/" +fi + # clean up the files-* entries since they are now copied into the webdir noship for i in $(ls $STATE_DIR/image/$MIXVER | grep files-*); do