Commit 1418dfc7 by Michael H. Warfield Committed by Stéphane Graber

Fix arch cross-build when running distro cross-build.

Corner case existed when building a cross-arch container (i686 on x86_64) on a cross-distro host (Fedora container on Ubuntu host). Fixed the arch "fixup" code to do the right thing when running from the bootstrap. Signed-off-by: 's avatarMichael H. Warfield <mhw@WittsEnd.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 6d37caf0
...@@ -665,7 +665,7 @@ This will take a couple of minutes. Patience..." ...@@ -665,7 +665,7 @@ This will take a couple of minutes. Patience..."
chroot . rpm --root /run/install --nodeps -ivh fedora-release-* chroot . rpm --root /run/install --nodeps -ivh fedora-release-*
# yum will take $basearch from host, so force the arch we want # yum will take $basearch from host, so force the arch we want
sed -i "s|\$basearch|$basearch|" ./etc/yum.repos.d/* sed -i "s|\$basearch|$basearch|" ./run/install/etc/yum.repos.d/*
chroot . yum -y --nogpgcheck --installroot /run/install install python rpm yum chroot . yum -y --nogpgcheck --installroot /run/install install python rpm yum
...@@ -774,10 +774,12 @@ download_fedora() ...@@ -774,10 +774,12 @@ download_fedora()
echo "Downloading fedora minimal ..." echo "Downloading fedora minimal ..."
# These will get changed if it's decided that we need a # These will get changed if it's decided that we need a
# boostrap environment (can not build natively) # boostrap environment (can not build natively). These
# are the defaults for the non-boostrap (native) mode.
BOOTSTRAP_INSTALL_ROOT=${INSTALL_ROOT} BOOTSTRAP_INSTALL_ROOT=${INSTALL_ROOT}
BOOTSTRAP_CHROOT= BOOTSTRAP_CHROOT=
BOOTSTRAP_DIR=
PKG_LIST="yum initscripts passwd rsyslog vim-minimal openssh-server openssh-clients dhclient chkconfig rootfiles policycoreutils fedora-release" PKG_LIST="yum initscripts passwd rsyslog vim-minimal openssh-server openssh-clients dhclient chkconfig rootfiles policycoreutils fedora-release"
MIRRORLIST_URL="http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$release&arch=$basearch" MIRRORLIST_URL="http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$release&arch=$basearch"
...@@ -858,7 +860,7 @@ download_fedora() ...@@ -858,7 +860,7 @@ download_fedora()
${BOOTSTRAP_CHROOT}rpm --root ${BOOTSTRAP_INSTALL_ROOT} --nodeps -ivh ${BOOTSTRAP_INSTALL_ROOT}/${RELEASE_RPM} ${BOOTSTRAP_CHROOT}rpm --root ${BOOTSTRAP_INSTALL_ROOT} --nodeps -ivh ${BOOTSTRAP_INSTALL_ROOT}/${RELEASE_RPM}
# yum will take $basearch from host, so force the arch we want # yum will take $basearch from host, so force the arch we want
sed -i "s|\$basearch|$basearch|" ${BOOTSTRAP_INSTALL_ROOT}/etc/yum.repos.d/* sed -i "s|\$basearch|$basearch|" ${BOOTSTRAP_DIR}/${BOOTSTRAP_INSTALL_ROOT}/etc/yum.repos.d/*
${BOOTSTRAP_CHROOT}yum --installroot ${BOOTSTRAP_INSTALL_ROOT} -y --nogpgcheck install ${PKG_LIST} ${BOOTSTRAP_CHROOT}yum --installroot ${BOOTSTRAP_INSTALL_ROOT} -y --nogpgcheck install ${PKG_LIST}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment