vmklive: always create generic initramfs, xbps-0.16 support.
This commit is contained in:
parent
edfa855fd8
commit
b1794246ca
|
@ -273,10 +273,8 @@ if [ -n "$REPOSITORY_CACHE" ]; then
|
||||||
fi
|
fi
|
||||||
XBPS_VERSION=$($XBPS_BIN_CMD -V|awk '{print $2}')
|
XBPS_VERSION=$($XBPS_BIN_CMD -V|awk '{print $2}')
|
||||||
case $XBPS_VERSION in
|
case $XBPS_VERSION in
|
||||||
# XBPS >= 0.12
|
# XBPS >= 0.16
|
||||||
[0-9].[1-9][2-9]*);;
|
[0-9].[1-9][6-9]*) XBPS_016=1;;
|
||||||
# XBPS < 0.12
|
|
||||||
*) purge_flag="-p" ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
info_msg "Redirecting stdout/stderr to $LOGFILE..."
|
info_msg "Redirecting stdout/stderr to $LOGFILE..."
|
||||||
|
@ -295,7 +293,7 @@ if [ -z "$ROOTDIR" ]; then
|
||||||
2>&1|cat >> $LOGFILE || error_out
|
2>&1|cat >> $LOGFILE || error_out
|
||||||
${XBPS_BIN_CMD} ${XBPS_ARGS} autoupdate \
|
${XBPS_BIN_CMD} ${XBPS_ARGS} autoupdate \
|
||||||
2>&1|cat >> $LOGFILE || error_out
|
2>&1|cat >> $LOGFILE || error_out
|
||||||
${XBPS_BIN_CMD} ${XBPS_ARGS} ${purge_flag} autoremove \
|
${XBPS_BIN_CMD} ${XBPS_ARGS} autoremove \
|
||||||
2>&1|cat >> $LOGFILE || error_out
|
2>&1|cat >> $LOGFILE || error_out
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -313,7 +311,7 @@ write_etc_motd
|
||||||
# Create the initramfs with XZ compression.
|
# Create the initramfs with XZ compression.
|
||||||
#
|
#
|
||||||
info_msg "[3/9] Creating initramfs image ($COMPRESSTYPE)..."
|
info_msg "[3/9] Creating initramfs image ($COMPRESSTYPE)..."
|
||||||
dracut --add "dmsquash-live vmklive" --${COMPRESSTYPE} \
|
dracut --no-hostonly --add "dmsquash-live vmklive" --${COMPRESSTYPE} \
|
||||||
"${ISOLINUX_DIR}/initrd.lz" ${KERNELVERSION} 2>/dev/null || error_out
|
"${ISOLINUX_DIR}/initrd.lz" ${KERNELVERSION} 2>/dev/null || error_out
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -345,6 +343,9 @@ fi
|
||||||
# Generate a conf for local repositories.
|
# Generate a conf for local repositories.
|
||||||
cat > $ROOTFS/etc/xbps/local-repos.conf <<_EOF
|
cat > $ROOTFS/etc/xbps/local-repos.conf <<_EOF
|
||||||
repositories = {
|
repositories = {
|
||||||
|
# XBPS >= 0.16
|
||||||
|
/packages,
|
||||||
|
# XBPS < 0.16
|
||||||
/packages/noarch,
|
/packages/noarch,
|
||||||
/packages/i686,
|
/packages/i686,
|
||||||
/packages/x86_64
|
/packages/x86_64
|
||||||
|
@ -353,6 +354,11 @@ _EOF
|
||||||
# Generate a conf for remote repositories.
|
# Generate a conf for remote repositories.
|
||||||
cat > $ROOTFS/etc/xbps/network-repos.conf <<_EOF
|
cat > $ROOTFS/etc/xbps/network-repos.conf <<_EOF
|
||||||
repositories = {
|
repositories = {
|
||||||
|
# XBPS >= 0.16
|
||||||
|
http://xbps.hosting-unlimited.org/binpkgs,
|
||||||
|
http://xbps.goodluckwith.us/binpkgs,
|
||||||
|
http://xbps.nopcode.org/repos/current,
|
||||||
|
# XBPS < 0.16
|
||||||
http://xbps.goodluckwith.us/binpkgs/i686,
|
http://xbps.goodluckwith.us/binpkgs/i686,
|
||||||
http://xbps.goodluckwith.us/binpkgs/noarch,
|
http://xbps.goodluckwith.us/binpkgs/noarch,
|
||||||
http://xbps.goodluckwith.us/binpkgs/nonfree/i686,
|
http://xbps.goodluckwith.us/binpkgs/nonfree/i686,
|
||||||
|
@ -365,23 +371,29 @@ chmod 644 $ROOTFS/etc/xbps/*.conf || error_out $?
|
||||||
|
|
||||||
# Create local repos for base-system and grub packages required by
|
# Create local repos for base-system and grub packages required by
|
||||||
# the void-installer pkg.
|
# the void-installer pkg.
|
||||||
ROOTFS_REPODIR=$ROOTFS/packages
|
|
||||||
mkdir -p $ROOTFS_REPODIR
|
|
||||||
pkgs=$($XBPS_BIN_CMD -r /tmp/blah -n install base-system grub)
|
pkgs=$($XBPS_BIN_CMD -r /tmp/blah -n install base-system grub)
|
||||||
set -- ${pkgs}
|
set -- ${pkgs}
|
||||||
while [ $# -ne 0 ]; do
|
while [ $# -ne 0 ]; do
|
||||||
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5
|
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5; arch=$6
|
||||||
shift 5
|
if [ -z "$XBPS_016" ]; then
|
||||||
repodir=$(basename $repo)
|
arch=$(basename $repo)
|
||||||
[ ! -d $ROOTFS_REPODIR/$repodir ] && mkdir $ROOTFS_REPODIR/$repodir
|
shift 5
|
||||||
bpkg=$repo/$binpkg
|
else
|
||||||
cp -f $bpkg $ROOTFS_REPODIR/$repodir
|
shift 6
|
||||||
done
|
fi
|
||||||
for f in $ROOTFS_REPODIR/*; do
|
mkdir -p $ROOTFS/packages/$arch
|
||||||
${XBPS_REPO_CMD} genindex $f 2>&1 >>$LOGFILE
|
bpkg=$repo/$arch/$binpkg
|
||||||
# remove rindex-files.plist, unneeded.
|
cp -f $bpkg $ROOTFS/packages/$arch
|
||||||
rm -f $f/rindex-files.plist
|
|
||||||
done
|
done
|
||||||
|
if [ -n "$XBPS_016" ]; then
|
||||||
|
$XBPS_REPO_CMD genindex $ROOTFS/packages 2>&1 >>$LOGFILE
|
||||||
|
rm -f $ROOTFS/packages/index-files.plist
|
||||||
|
else
|
||||||
|
for f in $ROOTFS_REPODIR/*; do
|
||||||
|
${XBPS_REPO_CMD} genindex $f 2>&1 >>$LOGFILE
|
||||||
|
rm -f $f/rindex-files.plist
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# install lsblk and blkid from util-linux. to avoid installing
|
# install lsblk and blkid from util-linux. to avoid installing
|
||||||
# the whole package.
|
# the whole package.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'vmklive'
|
# Template file for 'vmklive'
|
||||||
pkgname=vmklive
|
pkgname=vmklive
|
||||||
version=0.9.2
|
version=0.9.3
|
||||||
replaces="xbps-mklive>=0 vanilla-mklive>=0"
|
replaces="xbps-mklive>=0 vanilla-mklive>=0"
|
||||||
noextract=yes
|
noextract=yes
|
||||||
noarch=yes
|
noarch=yes
|
||||||
|
|
Loading…
Reference in New Issue
Block a user