actually useful vm/icewm
See http://www.opennet.ru/openforum/vsluhforumID3/86239.html#1 for a query that has led to this one; in particular, - xdm dropped (won't log in root and there are no users yet); - network is brought up and configured via DHCP by default; - apt-get works out-of-box; - default image size is twice the chroot size.
This commit is contained in:
parent
0e8871e7b4
commit
e52e21781f
@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
# usage:
|
||||
# tar2vm chroot.tar image.raw [size_in_bytes]
|
||||
|
||||
. shell-error
|
||||
|
||||
@ -27,7 +29,7 @@ IMG="$2"
|
||||
|
||||
# image size in bytes (256M is a fallback)
|
||||
TARSIZE="$(stat -Lc %s "$TAR")"
|
||||
DEFSIZE="$((3 * $TARSIZE / 2))"
|
||||
DEFSIZE="$((2 * $TARSIZE))"
|
||||
DISKSIZE="${3:-${DEFSIZE:-268435456}}"
|
||||
# ...and in megabytes
|
||||
DISKSIZEM="$(($DISKSIZE / 1048576))"
|
||||
|
@ -1,9 +1,9 @@
|
||||
# virtual machines
|
||||
ifeq (vm,$(IMAGE_CLASS))
|
||||
|
||||
# NB: use/x11 employs some installer-feature packages
|
||||
vm/icewm: vm/bare use/cleanup/installer use/x11/xdm +icewm; @:
|
||||
|
||||
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh; @:
|
||||
|
||||
# NB: use/x11 employs some installer-feature packages
|
||||
vm/icewm: vm/net use/cleanup/installer use/repo +icewm; @:
|
||||
|
||||
endif
|
||||
|
@ -106,6 +106,11 @@
|
||||
- пусто (по умолчанию) либо строка (например, "alpha", "beta")
|
||||
+ см. ../image.in/Makefile
|
||||
|
||||
- VM_SIZE
|
||||
+ задаёт размер несжатого образа виртуальной машины в байтах
|
||||
+ значение: пусто (по умолчанию двойной размер чрута) или целое
|
||||
+ см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2vm
|
||||
|
||||
пример
|
||||
~~~~~~
|
||||
make DEBUG=1 CLEAN=1 distro/syslinux.iso
|
||||
|
20
features.in/repo/image-scripts.d/90-enable-repo
Executable file
20
features.in/repo/image-scripts.d/90-enable-repo
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# enable online repos if possible, just quit if anything's wrong
|
||||
|
||||
repo_source='/etc/apt/sources.list.d/alt.list'
|
||||
host='http://ftp.altlinux.org'
|
||||
|
||||
[ -s "$repo_source" ] || exit 0
|
||||
|
||||
# regexps from alterator-pkg (via installer-feature-online-repo)
|
||||
prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?"
|
||||
updates_re="${prefix_re}http:\/\/\([^[:space:]]\+\)[[:space:]]*"
|
||||
|
||||
# architectures
|
||||
host_arch="$(rpm --eval '%_host_cpu')"
|
||||
[ "$host_arch" = "x86_64" ] && compat="x86_64-i586" || compat=
|
||||
|
||||
# turn on unconditionally
|
||||
for arch in "$host_arch" noarch "$compat"; do
|
||||
sed -i "s/^#\($updates_re$arch\)/\1/" "$repo_source"
|
||||
done
|
Loading…
Reference in New Issue
Block a user