diff options
author | Juan RP <xtraeme@voidlinux.eu> | 2016-04-20 14:36:57 +0200 |
---|---|---|
committer | Juan RP <xtraeme@voidlinux.eu> | 2016-04-20 14:36:57 +0200 |
commit | a15f8c0300399021d26b0428cfc441cbd237b43a (patch) | |
tree | 3b604726cbf077a010dfc55a40592b3768e7d0ac | |
parent | 4c932c619eff63916e149d0a0b4a2be3905a1410 (diff) | |
download | hrmpf-a15f8c0300399021d26b0428cfc441cbd237b43a.tar.gz hrmpf-a15f8c0300399021d26b0428cfc441cbd237b43a.tar.xz hrmpf-a15f8c0300399021d26b0428cfc441cbd237b43a.zip |
mkrootfs: generate x86 tarballs correctly, requested by scaleway.
-rw-r--r-- | mkrootfs.sh.in | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/mkrootfs.sh.in b/mkrootfs.sh.in index 472cec9..bdd76e9 100644 --- a/mkrootfs.sh.in +++ b/mkrootfs.sh.in @@ -76,7 +76,11 @@ umount_pseudofs() { run_cmd_target() { info_msg "Running $@ for target $_ARCH ..." - eval XBPS_TARGET_ARCH=${_TARGET_ARCH:=${_ARCH}} "$@" + if [ "${_TARGET_ARCH}" != "${_ARCH}" ]; then + eval XBPS_TARGET_ARCH=${_TARGET_ARCH:=${_ARCH}} "$@" + else + eval XBPS_ARCH=${_ARCH} "$@" + fi [ $? -ne 0 ] && die "Failed to run $@" } @@ -123,9 +127,9 @@ PLATFORM="$1" SUBPLATFORM=$PLATFORM case "$PLATFORM" in - i686-musl) _TARGET_ARCH="$PLATFORM"; _ARCH="i386";; - i686) _TARGET_ARCH="$PLATFORM"; _ARCH="i386";; - x86_64-musl) _TARGET_ARCH="$PLATFORM"; _ARCH="x86_64";; + i686-musl) _TARGET_ARCH="$PLATFORM"; _ARCH="i686-musl";; + i686) _TARGET_ARCH="$PLATFORM"; _ARCH="i686";; + x86_64-musl) _TARGET_ARCH="$PLATFORM"; _ARCH="x86_64-musl";; x86_64) _TARGET_ARCH="$PLATFORM"; _ARCH="x86_64";; dockstar) _TARGET_ARCH="armv5tel"; _ARCH="armv5tel";; rpi-musl) _TARGET_ARCH="armv6l-musl"; _ARCH="armv6l";; @@ -136,7 +140,10 @@ esac : ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current --repository=http://muslrepo.voidlinux.eu/current} : ${XBPS_CACHEDIR:=--cachedir=$PWD/xbps-cachedir-${_TARGET_ARCH}} -: ${PKGBASE:=base-system} +case "$PLATFORM" in + i686*|x86_64*) PKGBASE="base-voidstrap";; + *) PKGBASE="base-system";; +esac if [ -z "$PLATFORM" ]; then echo "$PROGNAME: platform was not set!" @@ -186,7 +193,7 @@ run_cmd_target "xbps-query -R -r $rootfs $XBPS_CONFFILE $XBPS_CACHEDIR $XBPS_REP chmod 755 $rootfs case "$PLATFORM" in - i686*|x86_64*) PKGS="${PKGBASE} grub" ;; + i686*|x86_64*) PKGS="${PKGBASE}" ;; *) PKGS="${PKGBASE} ${SUBPLATFORM}-base" ;; esac [ -n "$EXTRA_PKGS" ] && PKGS="${PKGS} ${EXTRA_PKGS}" |