Compare commits

...

15 Commits

Author SHA1 Message Date
Michael Shigorin
ee09a917e8 1.0.3-alt0.M70T.1
- vm fixes/backports
2014-03-03 20:13:56 +04:00
Michael Shigorin
d60492e87c vm.mk: extend vm/net base image size to 5 Gb
qemu-img makes use of sparse files so the image will take up
reasonable space when handled appropriately (and compress nicely
as well); making images of minimal size is going to result in
grave usage problems starting with apt-get update hitting ENOSPC.
2014-03-03 19:16:24 +04:00
Michael Shigorin
b84182c5cb tar2vm: use UUID, prepare for virtio as well
Thanks glebfm@ and sem@ for reminding me about UUID;
the only hardwired thing left is "sda" which *will*
break for virtio_blk case when updating the kernel;
fixing this up in a firsttime script might be due
but the diagnostics should be pretty informative.

These images boot with SATA emulation, virtio_blk setup
(plain virtio disk), and virtio_scsi setup available in
newer qemu/kvm and libvirt; one is advised to read
http://linux-kvm.com/content/virtio-scsi
2014-03-03 19:06:53 +04:00
Michael Shigorin
c4dcf994b0 tar2vm: append to MODULES_PRELOAD, do not clobber
Thanks glebfm@ for spotting that it's = instead of +=
as it goes in all the other places; I remember no good
reason to overwrite the potentially preexisting contents.

(backport)
2014-03-03 19:05:00 +04:00
Michael Shigorin
8547de0f0b vm.mk: use led-ws kernel instead of un-def
It's the most compact "generic" kernel available
in Sisyphus and some branches; led-vs might have
been more suitable but it's not supported within
p7/branch (current stable).
2014-03-01 23:00:20 +04:00
Michael Shigorin
3311ce5d80 p7.mk: added vm/net alias
vm/altlinux-p7-vm-net is yet another bridge...

(backport)
2014-03-01 22:30:54 +04:00
Michael Shigorin
d65a61ea47 vm.mk: vm/net should use/repo
IOW one has every right to expect that package manager
is set up already in a networked virtual machine.

(backport)
2014-03-01 22:30:54 +04:00
Michael Shigorin
b441894df7 vm.mk: use sysvinit
I don't see any reason to use systemd within VM images,
and it would stick its journal as a syslog implementation
when not ditched explicitly :-/

(backport)
2014-03-01 22:30:49 +04:00
Michael Shigorin
e31b12cbf8 tar2vm: use -s Luke
This is a partial backport of g4918019 commit:
"Really no need to test and sleep when there's sync mode"
2014-02-27 17:53:55 +04:00
Michael Shigorin
4b45694ee4 gear-store-tags 2013-12-24 04:15:48 +02:00
Michael Shigorin
d9f11e6fee 1.0.2-alt0.M70T.1
- backported adaptations to handle EFI signed binaries the current way
2013-12-23 14:16:23 +04:00
Michael Shigorin
7bb22cce78 efi: drop -signed subpackages
We chose to provide methods to sign packages but to avoid
signing these by default (with some arbitrary test keys)
the signatures are being added *after* the build by means
of rpmrebuild-pesign; all of this is made significantly
more complicated if there are separate -signed subpackages.

So these are being dropped in the packages; account for that.
2013-12-23 12:02:14 +02:00
Michael Shigorin
f716669bc1 gear-store-tags 2013-11-25 21:07:30 +04:00
Michael Shigorin
3b2a0649bf 1.0.1-alt0.M70T.1
- important bugfix: THE_PACKAGES weren't getting through to .base
  (backported from 1.1.14)
2013-11-25 21:06:01 +04:00
Michael Shigorin
7929f61cad metadata: fix THE_PACKAGES processing
Actually the issue was worse in general: *_PACKAGES
weren't quoted when put into .base thus resulting
in a potentially broken echo command (silent one).

The macro scheme used was overgeneralized; stuffing
quoting differentiation into it was doable but ugly
(unless one is able to pass an unquoted quote sign
as a function's parameter in some elegant manner),
let's just make it straightforward.
2013-11-25 09:33:54 +04:00
10 changed files with 63 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
Name: mkimage-profiles
Version: 1.0.0
Release: alt1
Version: 1.0.3
Release: alt0.M70T.1
Summary: ALT Linux based distribution metaprofile
License: GPLv2+
@@ -16,7 +16,7 @@ BuildRequires: /proc
Requires: rsync git-core
Requires: time schedutils sfdisk
Requires: mkimage >= 0.2.5
Requires: mkimage >= 0.2.12
# Recommends: graphviz qemu-img
@@ -78,6 +78,16 @@ cp -a * %buildroot%mpdir
%doc %docs/*
%changelog
* Mon Mar 03 2014 Michael Shigorin <mike@altlinux.org> 1.0.3-alt0.M70T.1
- vm fixes/backports
* Mon Dec 23 2013 Michael Shigorin <mike@altlinux.org> 1.0.2-alt0.M70T.1
- backported adaptations to handle EFI signed binaries the current way
* Mon Nov 25 2013 Michael Shigorin <mike@altlinux.org> 1.0.1-alt0.M70T.1
- important bugfix: THE_PACKAGES weren't getting through to .base
(backported from 1.1.14)
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1
- 1.0

View File

@@ -0,0 +1,6 @@
object d9f11e6fee5b83d05dc0c2c3c95c12197d6d0b37
type commit
tag v1.0.2
tagger Michael Shigorin <mike@altlinux.org> 1387851343 +0200
efi updates

View File

@@ -1,6 +0,0 @@
object 5ffd07c65e360561c7a04f41aff746d9caa165cd
type commit
tag v1.0.0
tagger Michael Shigorin <mike@altlinux.org> 1371463392 +0400
1.0

View File

@@ -1 +1 @@
5f4103e2678b4db8760eda8622f094f694f9cdcd v1.0.0
43961c4ff4b6ca9ed5f20a63e97525e6590522c4 v1.0.2

View File

@@ -38,9 +38,10 @@ DISKSIZEM="$(($DISKSIZE / 1048576))"
# NB: xfs doesn't have a spare sector for the bootloader
ROOTFSTYPE="${4:-ext4}"
# single root partition hardwired so far,
# add another image for swap if needed
ROOTDEV="/dev/sda1"
# SCSI case hardwired so far;
# use virtio_scsi setup if performance is critical
# *and* updating the image is going to occur
BOOTDEV="/dev/sda"
# last preparations...
for i in losetup sfdisk parted kpartx mkfs."$ROOTFSTYPE"; do
@@ -78,20 +79,29 @@ losetup "$LOOPDEV" "$IMG"
parted --script "$LOOPDEV" mklabel msdos
parted --script "$LOOPDEV" mkpart primary ext2 1 "$DISKSIZEM"
kpartx -a "$LOOPDEV"
kpartx -a -s "$LOOPDEV"
LOOPDEV1="/dev/mapper/$(basename "$LOOPDEV")p1"
mkfs."$ROOTFSTYPE" "$LOOPDEV1"
ROOTUUID="$(blkid -s UUID -o value -c /dev/null "$LOOPDEV1")"
if [ -n "$ROOTUUID" ]; then
ROOTDEV="UUID=$ROOTUUID"
else
ROOTDEV="${BOOTDEV}1"
fi
# mount and populate it
mkdir -pm755 "$ROOTFS"
mount "$LOOPDEV1" "$ROOTFS"
tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
for i in /dev /proc /sys; do mount --bind "$i" "$ROOTFS$i"; done
# NB: different storage modules might be needed for non-kvm
# NB: different storage modules might be needed for different VMs
VIRTIO_MODULES="virtio_pci virtio_blk virtio_scsi"
echo "$LOOPDEV1 / $ROOTFSTYPE defaults 1 1" >> "$ROOTFS/etc/fstab"
echo "MODULES_PRELOAD=sd_mod ata_piix $ROOTFSTYPE" >> "$ROOTFS/etc/initrd.mk"
echo "MODULES_PRELOAD += sd_mod ata_piix $VIRTIO_MODULES $ROOTFSTYPE" \
>> "$ROOTFS/etc/initrd.mk"
KERNEL="$(readlink $ROOTFS/boot/vmlinuz | sed 's,vmlinuz-,,')"
chroot "$ROOTFS" make-initrd -k "$KERNEL"
@@ -125,7 +135,7 @@ EOF
chroot "$ROOTFS" lilo -C /etc/lilo-loop.conf
cat > "$ROOTFS"/etc/lilo.conf << EOF
boot=${ROOTDEV%[0-9]*}
boot=$BOOTDEV
$LILO_COMMON
EOF

View File

@@ -1,9 +1,10 @@
# p7 base kits
ifeq (distro,$(IMAGE_CLASS))
mixin/p7:
@$(call set,BRANDING,altlinux-starterkit)
ifeq (distro,$(IMAGE_CLASS))
### kludge compatibility: introspection stub for ../main.mk :-/
distro/altlinux-p7-cinnamon: distro/regular-cinnamon mixin/p7; @:
distro/altlinux-p7-e17: distro/regular-e17 mixin/p7; @:
@@ -18,3 +19,7 @@ distro/altlinux-p7-tde: distro/regular-tde mixin/p7; @:
distro/altlinux-p7-xfce: distro/regular-xfce mixin/p7; @:
endif
ifeq (vm,$(IMAGE_CLASS))
vm/altlinux-p7-vm-net: vm/net mixin/p7; @:
endif

View File

@@ -1,9 +1,10 @@
# virtual machines
ifeq (vm,$(IMAGE_CLASS))
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh; @:
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh use/repo
@$(call set,VM_SIZE,5368709120) # 5 Gb is enough for everyone
# NB: use/x11 employs some installer-feature packages
vm/icewm: vm/net use/cleanup/installer use/repo +icewm; @:
vm/icewm: vm/net use/cleanup/installer +icewm; @:
endif

View File

@@ -18,11 +18,9 @@ use/efi/refind: use/efi
@$(call set,EFI_BOOTLOADER,refind)
use/efi/signed: use/efi
@$(call set,MKI_VER_MINIMAL,0.2.7) # refind->elilo handoff
@$(call set,MKI_VER_MINIMAL,0.2.7) # refind->elilo handoff ### 0.2.11
@$(call set,EFI_CERT,altlinux)
@$(call add,THE_PACKAGES,shim-signed)
@$(call set,EFI_SHELL,efi-shell-signed) # even more useful
@$(call add,RESCUE_PACKAGES,refind-signed)
@$(call add,RESCUE_PACKAGES,openssl sbsigntools)
use/efi/shell: use/efi

View File

@@ -9,22 +9,25 @@ WHATEVER += metadata
# handle these too
DOT_BASE += $(BASE_PACKAGES_REGEXP)
# args: name, suffix, command
define dump-THEM
if [ -n "$($(1)_$(2))" ]; then echo -e "\n## $(1)_$(2)"; $(3) $($(1)_$(2)); fi;
# args: type, name
define dump
if [ -n "$($(2)_$(1))" ]; then \
echo -e "\n## $(2)_$(1)"; \
case "$(1)" in \
PACKAGES) echo "$($(2)_$(1))";; \
LISTS) cat $($(2)_$(1));; \
esac; \
fi;
endef
dump-PACKAGES = $(call dump-THEM,$(1),PACKAGES,echo)
dump-LISTS = $(call dump-THEM,$(1),LISTS,cat)
# BASE_PACKAGES, BASE_LISTS and whatever else goes into base install;
# thus construct requisite .base packagelist for alterator-pkg
metadata-.base:
@cd $(call list,/); \
{ \
echo "## generated by features.in/metadata/lib/metadata.mk"; \
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
echo "## generated by features.in/metadata/lib/50-metadata.mk";\
$(foreach p,SYSTEM COMMON THE BASE,$(call dump,PACKAGES,$(p))) \
$(foreach l,THE BASE,$(call dump,LISTS,$(l))) \
if [ -n "$(DOT_BASE)" ]; then \
echo -e "\n## DOT_BASE\n$(DOT_BASE)"; \
fi; \

View File

@@ -7,8 +7,10 @@ endif
ifeq (vm,$(IMAGE_CLASS))
vm/.bare: profile/bare
@$(call add,BASE_PACKAGES,interactivesystem lilo shadow-utils e2fsprogs)
@$(call set,KFLAVOURS,un-def)
@$(call add,BASE_PACKAGES,sysklogd syslogd sysvinit interactivesystem)
@$(call add,BASE_PACKAGES,lilo shadow-utils e2fsprogs)
@$(call set,KFLAVOURS,led-ws)
@$(call add,BASE_KMODULES,guest)
vm/bare: vm/.bare
@$(call add,BASE_PACKAGES,apt)