* [devel-distro] I: mkimage-profiles 1.1.10
@ 2013-09-30 16:43 Michael Shigorin
2013-10-14 17:07 ` Michael Shigorin
0 siblings, 1 reply; 2+ messages in thread
From: Michael Shigorin @ 2013-09-30 16:43 UTC (permalink / raw)
To: devel-distro
[-- Attachment #1: Type: text/plain, Size: 852 bytes --]
Здравствуйте.
За прошлую неделю особых изменений не было -- всё так же висит ряд
экспериментальных коммитов и бранчей, не созревших для публикации.
Идёт доработка altlinux-p7-server.iso.
Среди прочего сейчас выясняю текущее состояние /vm/orthodox --
пока при попытке использовать приложенный хук для формирования
vm-profile.scm вместе с
# FIXME: /vm behaviour should be controllable in some sane manner
%post stage2
sed -i 's,^\(X-Alterator-URI=\).*$,\1/vm/ortodox,' \
%_datadir/install2/steps/vm.desktop
в installer-distro-altlinux-server.spec (этот субпакет
Requires: alterator-vm) приводит к вот такой картинке:
http://fly.osdn.org.ua/~mike/img/screenshots/vm-ortho.png
(обратите внимание на "0 МБ свободно" и "требуется 0 МБ").
--
---- WBR, Michael Shigorin / http://altlinux.org
------ http://opennet.ru / http://anna-news.info
[-- Attachment #2: 05-vm-profile --]
[-- Type: text/plain, Size: 2344 bytes --]
#!/bin/sh
# see also http://www.altlinux.org/Autoinstall
mem="$(sed -n '/^MemTotal/s/[^0-9]//gp' /proc/meminfo)" # in kB
max_disk="$(sort -rn /sys/block/[hs]d*/size | head -1)" # in 512-byte sectors
# feel free to suggest better defaults
if [ "$mem" -le 262144 ]; then
swap="$[ 2*$mem ]"
elif [ "$mem" -le 524288 ]; then
swap="$mem"
else
swap=1048576
fi
# don't do RAID in a VM, reduce swap to a minimum
if grep -qE '(101300b8)|(80eebeef)|(14ad0405)' /proc/bus/pci/devices; then
methods='plain'
swap=131072
else
methods='raid plain'
fi
# less than 10G, choose 1G partitions
if [ "$max_disk" -le 20971520 ]; then
base=2097152
elif [ "$max_disk" -le 52428800 ]; then
base=4194304
else
base=20971520
fi
# EVMS deals with sectors
swap="$[ 2*$swap ]"
base="$[ 2*$base ]"
# The Plan:
# - provide a few more or less equivalent server partitioning profiles
#
cat > /var/cache/alterator/vm-profile.scm << _EOF_
((var
(title . "Server (/var holds most space)")
(action . trivial)
(actiondata
("swap" (size . "$swap") (fsim . "SWAPFS") (methods $methods))
("/" (size "$base" . "$base") (fsim . "Ext2/3") (methods $methods))
("/var" (size "$base" . #t) (fsim . "Ext2/3") (methods $methods))))
(srv
(title . "Server (/srv holds most space)")
(action . trivial)
(actiondata
("swap" (size . "$swap") (fsim . "SWAPFS") (methods $methods))
("/" (size "$base" . "$base") (fsim . "Ext2/3") (methods $methods))
("/var" (size "$base" . "$base") (fsim . "Ext2/3") (methods $methods))
("/srv" (size "$base" . #t) (fsim . "Ext2/3") (methods $methods))))
(home
(title . "Server (/home holds most space)")
(action . trivial)
(actiondata
("swap" (size . "$swap") (fsim . "SWAPFS") (methods $methods))
("/" (size "$base" . "$base") (fsim . "Ext2/3") (methods $methods))
("/var" (size "$base" . "$base") (fsim . "Ext2/3") (methods $methods))
("/home" (size "$base" . #t) (fsim . "Ext2/3") (methods $methods))))
(build
(title . "Build server (larger swap for tmpfs)")
(action . trivial)
(actiondata
("swap" (size . "$[10*$swap]") (fsim . "SWAPFS") (methods $methods))
("/" (size "$base" . "$base") (fsim . "Ext2/3") (methods $methods))
("/var" (size "$base" . "$base") (fsim . "Ext2/3") (methods $methods))
("/home" (size "$base" . #t) (fsim . "Ext2/3") (methods $methods)))))
_EOF_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [devel-distro] I: mkimage-profiles 1.1.10
2013-09-30 16:43 [devel-distro] I: mkimage-profiles 1.1.10 Michael Shigorin
@ 2013-10-14 17:07 ` Michael Shigorin
0 siblings, 0 replies; 2+ messages in thread
From: Michael Shigorin @ 2013-10-14 17:07 UTC (permalink / raw)
To: devel-distro
On Mon, Sep 30, 2013 at 07:43:17PM +0300, I wrote:
> Среди прочего сейчас выясняю текущее состояние /vm/orthodox --
> пока при попытке использовать приложенный хук для формирования
> vm-profile.scm вместе с
Дело было в закавычивании по привычке переменных при создании
vm-profile.scm; а поскольку это here doc, то никто их не
раскавычивал и получились строковые константы, а не числа.
В итоговый installer-distro-altlinux-server-7.0.0-alt1
попал исправный скрипт.
> (обратите внимание на "0 МБ свободно" и "требуется 0 МБ").
Поэтому и неудивительно...
--
---- WBR, Michael Shigorin / http://altlinux.org
------ http://opennet.ru / http://anna-news.info
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-14 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30 16:43 [devel-distro] I: mkimage-profiles 1.1.10 Michael Shigorin
2013-10-14 17:07 ` Michael Shigorin
ALT Linux Distributions development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-distro/0 devel-distro/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel-distro devel-distro/ http://lore.altlinux.org/devel-distro \
devel-distro@lists.altlinux.org devel-distro@lists.altlinux.ru devel-distro@lists.altlinux.com
public-inbox-index devel-distro
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-distro
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git