vmklive: generate repos in rootfs/packages for local installation, bump to 0.8.0.

This commit is contained in:
Juan RP 2012-02-05 22:17:57 +01:00
parent 220189c95e
commit 7ae0eb96ac
2 changed files with 65 additions and 4 deletions

View file

@ -69,7 +69,11 @@ for more information and/or documentation about using the X Binary
Package System. If you think it is useful, please make a donation
to improve further development from the above URL, thanks.
To install Void Linux type 'sudo void-installer'.
To start the installation please type:
$ sudo void-installer
and follow the on-screen instructions. Thanks for trying Void Linux.
###############################################################################
_EOF
@ -110,13 +114,13 @@ LABEL linux
MENU LABEL Boot Void GNU/Linux ${kver} ($(uname -m))
KERNEL /casper/vmlinuz
INITRD /casper/initrd.lz
APPEND boot=casper vga=current keymap=${KEYMAP:-us} locale=${LOCALE:-en_US.UTF-8} ro
APPEND boot=casper keymap=${KEYMAP:-us} locale=${LOCALE:-en_US.UTF-8} ro
LABEL linuxtoram
MENU LABEL Boot Void GNU/Linux ${kver} (RAM) ($(uname -m))
KERNEL /casper/vmlinuz
INITRD /casper/initrd.lz
APPEND boot=casper vga=current toram keymap=${KEYMAP:-us} locale=${LOCALE:-en_US.UTF-8} ro
APPEND boot=casper toram keymap=${KEYMAP:-us} locale=${LOCALE:-en_US.UTF-8} ro
LABEL c
MENU LABEL Boot first HD found by the BIOS
@ -336,6 +340,63 @@ install -Dm644 /etc/casper.conf "$ROOTFS/etc/casper.conf" || error_out $?
install -Dm755 /sbin/casper-getty "$ROOTFS/sbin/casper-getty" || error_out $?
install -Dm755 /sbin/casper-login "$ROOTFS/sbin/casper-login" || error_out $?
# Generate a sane xbps.conf for the rootfs.
rm -f $ROOTFS/etc/xbps/xbps.conf
echo "# xbps.conf generated by vmklive-@@MKLIVE_VERSION@@" \
> $ROOTFS/etc/xbps/xbps.conf
echo "TransactionFrequencyFlush = 0" \
>> $ROOFS/etc/xbps/xbps.conf
echo "virtual-package rsyslog { targets = syslog-daemon-0 }" \
>> $ROOTFS/etc/xbps/xbps.conf
echo "virtual-package dcron { targets = cron-daemon-0 }" \
>> $ROOTFS/etc/xbps/xbps.conf
_devel=$($XBPS_UHELPER_CMD -r $ROOTFS version xbps-devel)
if [ -n "${_devel}" ]; then
echo "virtual-package xbps-devel { targets = xbps-9999 }" \
>> $ROOTFS/etc/xbps/xbps.conf
fi
# Generate a conf for local repositories.
cat > $ROOTFS/etc/xbps/local-repos.conf <<_EOF
repositories = {
/packages/noarch,
/packages/i686,
/packages/x86_64
}
_EOF
# Generate a conf for remote repositories.
cat > $ROOTFS/etc/xbps/network-repos.conf <<_EOF
repositories = {
http://xbps.goodluckwith.us/binpkgs/i686,
http://xbps.goodluckwith.us/binpkgs/noarch,
http://xbps.goodluckwith.us/binpkgs/nonfree/i686,
http://xbps.nopcode.org/repos/current/x86_64,
http://xbps.nopcode.org/repos/current/noarch,
http://xbps.nopcode.org/repos/current/nonfree/x86_64
}
_EOF
chmod 644 $ROOTFS/etc/xbps/*.conf || error_out $?
# Create local repos for base-system and grub packages required by
# the void-installer pkg.
ROOTFS_REPODIR=$ROOTFS/packages
mkdir -p $ROOTFS_REPODIR
pkgs=$($XBPS_BIN_CMD -r /tmp/blah -n install base-system grub)
set -- ${pkgs}
while [ $# -ne 0 ]; do
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5
shift 5
repodir=$(basename $repo)
[ ! -d $ROOTFS_REPODIR/$repodir ] && mkdir $ROOTFS_REPODIR/$repodir
bpkg=$repo/$binpkg
cp -f $bpkg $ROOTFS_REPODIR/$repodir
done
for f in $ROOTFS_REPODIR/*; do
${XBPS_REPO_CMD} genindex $f 2>&1 >>$LOGFILE
# remove rindex-files.plist, unneeded.
rm -f $f/rindex-files.plist
done
#
# The pseudofs aren't needed anymore in target rootfs.
#

View file

@ -1,6 +1,6 @@
# Template file for 'vmklive'
pkgname=vmklive
version=0.7.1
version=0.8.0
short_desc="Void GNU/Linux live image maker"
maintainer="Juan RP <xtraeme@gmail.com>"
license="Public domain"