Skip to content

Commit d7859ad

Browse files
committed
Merge release branch 4.6 to master
* 4.6: Revert "Change references of people.apache.org to home.apache.org in the test code" Change references of people.apache.org to home.apache.org in the test code This closes apache#1123 Signed-off-by: SrikanteswaraRao Talluri <[email protected]> CLOUDSTACK-9077 Fix injectkeys.sh to work on CentOS7 CLOUDSTACK-9065: fix bug when creating packaging with noredist flag
2 parents 3358d65 + 92913a1 commit d7859ad

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

packaging/package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function packaging() {
102102
echo ". executing rpmbuild"
103103
cp "$DISTRO/cloud.spec" "$RPMDIR/SPECS"
104104

105-
(cd "$RPMDIR"; rpmbuild --define "_topdir ${RPMDIR}" "${DEFVER}" "${DEFREL}" ${DEFPRE+"$DEFPRE"} ${DEFOSSNOSS+$DEFOSSNOSS} ${DEFSIM+"$DEFSIM"} -bb SPECS/cloud.spec)
105+
(cd "$RPMDIR"; rpmbuild --define "_topdir ${RPMDIR}" "${DEFVER}" "${DEFREL}" ${DEFPRE+"$DEFPRE"} ${DEFOSSNOSS+"$DEFOSSNOSS"} ${DEFSIM+"$DEFSIM"} -bb SPECS/cloud.spec)
106106
if [ $? -ne 0 ]; then
107107
echo "RPM Build Failed "
108108
exit 3

scripts/vm/systemvm/injectkeys.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,19 @@ systemvmpath=$3
8585

8686
command -v mkisofs > /dev/null || (echo "$(basename $0): mkisofs not found, please install or ensure PATH is accurate" ; exit 4)
8787

88-
# if running into Docker as unprivileges, skip ssh verification as iso cannot be mounted.
89-
if [ -e /dev/loop0 ]; then
88+
# if running into Docker as unprivileges, skip ssh verification as iso cannot be mounted due to missing loop device.
89+
if [ -f /.dockerinit ]; then
90+
if [ -e /dev/loop0 ]; then
91+
# it's a docker instance with privileges.
92+
inject_into_iso systemvm.iso $newpubkey
93+
[ $? -ne 0 ] && exit 5
94+
copy_priv_key $newprivkey
95+
else
96+
# this mean it's a docker instance, ssh key cannot be verify.
97+
echo "We run inside Docker, skipping ssh key insertion in systemvm.iso"
98+
fi
99+
else
90100
inject_into_iso systemvm.iso $newpubkey
91101
[ $? -ne 0 ] && exit 5
92102
copy_priv_key $newprivkey
93-
else
94-
# this mean it's a docker instance, ssh key cannot be verify.
95-
echo "No loop device found, skipping ssh key insertion in systemvm.iso"
96103
fi
97-
98-
exit $?

0 commit comments

Comments
 (0)