forked from altcloud/mkimage-profiles
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7bcbcdca83 | ||
|
6e12923402 | ||
|
df03a56a4e | ||
|
305e7e8fde | ||
|
bc2789e9d6 | ||
|
ba84ab0ae3 | ||
|
0e31d305ae | ||
|
c601706517 | ||
|
d59601f7ad | ||
|
8ca80d1ac4 | ||
|
c29ec7beaa | ||
|
ee09a917e8 | ||
|
d60492e87c | ||
|
b84182c5cb | ||
|
c4dcf994b0 | ||
|
8547de0f0b | ||
|
3311ce5d80 | ||
|
d65a61ea47 | ||
|
b441894df7 | ||
|
e31b12cbf8 | ||
|
4b45694ee4 | ||
|
d9f11e6fee | ||
|
7bb22cce78 | ||
|
f716669bc1 | ||
|
3b2a0649bf | ||
|
7929f61cad |
@ -1,6 +1,6 @@
|
|||||||
Name: mkimage-profiles
|
Name: mkimage-profiles
|
||||||
Version: 1.0.0
|
Version: 1.0.6
|
||||||
Release: alt1
|
Release: alt0.M70T.1
|
||||||
|
|
||||||
Summary: ALT Linux based distribution metaprofile
|
Summary: ALT Linux based distribution metaprofile
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -16,7 +16,7 @@ BuildRequires: /proc
|
|||||||
|
|
||||||
Requires: rsync git-core
|
Requires: rsync git-core
|
||||||
Requires: time schedutils sfdisk
|
Requires: time schedutils sfdisk
|
||||||
Requires: mkimage >= 0.2.5
|
Requires: mkimage >= 0.2.12
|
||||||
|
|
||||||
# Recommends: graphviz qemu-img
|
# Recommends: graphviz qemu-img
|
||||||
|
|
||||||
@ -78,6 +78,25 @@ cp -a * %buildroot%mpdir
|
|||||||
%doc %docs/*
|
%doc %docs/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 07 2015 Michael Shigorin <mike@altlinux.org> 1.0.6-alt0.M70T.1
|
||||||
|
- mktmpdir: fixed sort key
|
||||||
|
|
||||||
|
* Mon Feb 02 2015 Michael Shigorin <mike@altlinux.org> 1.0.5-alt0.M70T.1
|
||||||
|
- backported pkg/lists fix (and the commit before it)
|
||||||
|
|
||||||
|
* Mon Mar 17 2014 Michael Shigorin <mike@altlinux.org> 1.0.4-alt0.M70T.1
|
||||||
|
- kernel: don't insist on k-m-r8168
|
||||||
|
|
||||||
|
* 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
|
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1
|
||||||
- 1.0
|
- 1.0
|
||||||
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
object 5ffd07c65e360561c7a04f41aff746d9caa165cd
|
|
||||||
type commit
|
|
||||||
tag v1.0.0
|
|
||||||
tagger Michael Shigorin <mike@altlinux.org> 1371463392 +0400
|
|
||||||
|
|
||||||
1.0
|
|
6
.gear/tags/b3c51a2aab25e4d159009fabcde9945ef8bc4ca5
Normal file
6
.gear/tags/b3c51a2aab25e4d159009fabcde9945ef8bc4ca5
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
object 6e1292340242d94e4402e70c0235f546adfe0598
|
||||||
|
type commit
|
||||||
|
tag v1.0.6
|
||||||
|
tagger Michael Shigorin <mike@altlinux.org> 1441660082 +0300
|
||||||
|
|
||||||
|
mktmpdir fixup
|
@ -1 +1 @@
|
|||||||
5f4103e2678b4db8760eda8622f094f694f9cdcd v1.0.0
|
b3c51a2aab25e4d159009fabcde9945ef8bc4ca5 v1.0.6
|
||||||
|
@ -45,7 +45,7 @@ choose_tmpdir() {
|
|||||||
echo -n "$i "
|
echo -n "$i "
|
||||||
df -PT "$i" | tail -1
|
df -PT "$i" | tail -1
|
||||||
done \
|
done \
|
||||||
| sort -unk6 \
|
| sort -unk5 \
|
||||||
| while read dir dev fstype size used free percent mnt; do
|
| while read dir dev fstype size used free percent mnt; do
|
||||||
check_options "$dev" "$mnt" || continue
|
check_options "$dev" "$mnt" || continue
|
||||||
[ "$free" -gt "$MINSIZE" ] || continue
|
[ "$free" -gt "$MINSIZE" ] || continue
|
||||||
|
24
bin/tar2vm
24
bin/tar2vm
@ -38,9 +38,10 @@ DISKSIZEM="$(($DISKSIZE / 1048576))"
|
|||||||
# NB: xfs doesn't have a spare sector for the bootloader
|
# NB: xfs doesn't have a spare sector for the bootloader
|
||||||
ROOTFSTYPE="${4:-ext4}"
|
ROOTFSTYPE="${4:-ext4}"
|
||||||
|
|
||||||
# single root partition hardwired so far,
|
# SCSI case hardwired so far;
|
||||||
# add another image for swap if needed
|
# use virtio_scsi setup if performance is critical
|
||||||
ROOTDEV="/dev/sda1"
|
# *and* updating the image is going to occur
|
||||||
|
BOOTDEV="/dev/sda"
|
||||||
|
|
||||||
# last preparations...
|
# last preparations...
|
||||||
for i in losetup sfdisk parted kpartx mkfs."$ROOTFSTYPE"; do
|
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" mklabel msdos
|
||||||
parted --script "$LOOPDEV" mkpart primary ext2 1 "$DISKSIZEM"
|
parted --script "$LOOPDEV" mkpart primary ext2 1 "$DISKSIZEM"
|
||||||
|
|
||||||
kpartx -a "$LOOPDEV"
|
kpartx -a -s "$LOOPDEV"
|
||||||
LOOPDEV1="/dev/mapper/$(basename "$LOOPDEV")p1"
|
LOOPDEV1="/dev/mapper/$(basename "$LOOPDEV")p1"
|
||||||
|
|
||||||
mkfs."$ROOTFSTYPE" "$LOOPDEV1"
|
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
|
# mount and populate it
|
||||||
mkdir -pm755 "$ROOTFS"
|
mkdir -pm755 "$ROOTFS"
|
||||||
mount "$LOOPDEV1" "$ROOTFS"
|
mount "$LOOPDEV1" "$ROOTFS"
|
||||||
tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
|
tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
|
||||||
for i in /dev /proc /sys; do mount --bind "$i" "$ROOTFS$i"; done
|
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 "$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-,,')"
|
KERNEL="$(readlink $ROOTFS/boot/vmlinuz | sed 's,vmlinuz-,,')"
|
||||||
chroot "$ROOTFS" make-initrd -k "$KERNEL"
|
chroot "$ROOTFS" make-initrd -k "$KERNEL"
|
||||||
@ -125,7 +135,7 @@ EOF
|
|||||||
chroot "$ROOTFS" lilo -C /etc/lilo-loop.conf
|
chroot "$ROOTFS" lilo -C /etc/lilo-loop.conf
|
||||||
|
|
||||||
cat > "$ROOTFS"/etc/lilo.conf << EOF
|
cat > "$ROOTFS"/etc/lilo.conf << EOF
|
||||||
boot=${ROOTDEV%[0-9]*}
|
boot=$BOOTDEV
|
||||||
$LILO_COMMON
|
$LILO_COMMON
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# p7 base kits
|
# p7 base kits
|
||||||
ifeq (distro,$(IMAGE_CLASS))
|
|
||||||
|
|
||||||
mixin/p7:
|
mixin/p7:
|
||||||
@$(call set,BRANDING,altlinux-starterkit)
|
@$(call set,BRANDING,altlinux-starterkit)
|
||||||
|
|
||||||
|
ifeq (distro,$(IMAGE_CLASS))
|
||||||
|
|
||||||
### kludge compatibility: introspection stub for ../main.mk :-/
|
### kludge compatibility: introspection stub for ../main.mk :-/
|
||||||
distro/altlinux-p7-cinnamon: distro/regular-cinnamon mixin/p7; @:
|
distro/altlinux-p7-cinnamon: distro/regular-cinnamon mixin/p7; @:
|
||||||
distro/altlinux-p7-e17: distro/regular-e17 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; @:
|
distro/altlinux-p7-xfce: distro/regular-xfce mixin/p7; @:
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (vm,$(IMAGE_CLASS))
|
||||||
|
vm/altlinux-p7-vm-net: vm/net mixin/p7; @:
|
||||||
|
endif
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# virtual machines
|
# virtual machines
|
||||||
ifeq (vm,$(IMAGE_CLASS))
|
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
|
# 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
|
endif
|
||||||
|
@ -18,11 +18,9 @@ use/efi/refind: use/efi
|
|||||||
@$(call set,EFI_BOOTLOADER,refind)
|
@$(call set,EFI_BOOTLOADER,refind)
|
||||||
|
|
||||||
use/efi/signed: use/efi
|
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 set,EFI_CERT,altlinux)
|
||||||
@$(call add,THE_PACKAGES,shim-signed)
|
@$(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)
|
@$(call add,RESCUE_PACKAGES,openssl sbsigntools)
|
||||||
|
|
||||||
use/efi/shell: use/efi
|
use/efi/shell: use/efi
|
||||||
|
@ -9,5 +9,7 @@ use/kernel:
|
|||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call set,KFLAVOURS,std-def)
|
@$(call set,KFLAVOURS,std-def)
|
||||||
|
|
||||||
|
# r8168 is a kludge, never install it by default
|
||||||
use/kernel/net:
|
use/kernel/net:
|
||||||
@$(call add,THE_KMODULES,e1000e igb r8168 rtl8168)
|
@$(call add,THE_KMODULES,e1000e igb)
|
||||||
|
@$(call add,MAIN_KMODULES,r8168 rtl8168)
|
||||||
|
@ -9,22 +9,25 @@ WHATEVER += metadata
|
|||||||
# handle these too
|
# handle these too
|
||||||
DOT_BASE += $(BASE_PACKAGES_REGEXP)
|
DOT_BASE += $(BASE_PACKAGES_REGEXP)
|
||||||
|
|
||||||
# args: name, suffix, command
|
# args: type, name
|
||||||
define dump-THEM
|
define dump
|
||||||
if [ -n "$($(1)_$(2))" ]; then echo -e "\n## $(1)_$(2)"; $(3) $($(1)_$(2)); fi;
|
if [ -n "$($(2)_$(1))" ]; then \
|
||||||
|
echo -e "\n## $(2)_$(1)"; \
|
||||||
|
case "$(1)" in \
|
||||||
|
PACKAGES) echo "$($(2)_$(1))";; \
|
||||||
|
LISTS) cat $($(2)_$(1));; \
|
||||||
|
esac; \
|
||||||
|
fi;
|
||||||
endef
|
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;
|
# BASE_PACKAGES, BASE_LISTS and whatever else goes into base install;
|
||||||
# thus construct requisite .base packagelist for alterator-pkg
|
# thus construct requisite .base packagelist for alterator-pkg
|
||||||
metadata-.base:
|
metadata-.base:
|
||||||
@cd $(call list,/); \
|
@cd $(call list,/); \
|
||||||
{ \
|
{ \
|
||||||
echo "## generated by features.in/metadata/lib/metadata.mk"; \
|
echo "## generated by features.in/metadata/lib/50-metadata.mk";\
|
||||||
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
|
$(foreach p,SYSTEM COMMON THE BASE,$(call dump,PACKAGES,$(p))) \
|
||||||
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
|
$(foreach l,THE BASE,$(call dump,LISTS,$(l))) \
|
||||||
if [ -n "$(DOT_BASE)" ]; then \
|
if [ -n "$(DOT_BASE)" ]; then \
|
||||||
echo -e "\n## DOT_BASE\n$(DOT_BASE)"; \
|
echo -e "\n## DOT_BASE\n$(DOT_BASE)"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
@ -7,8 +7,10 @@ endif
|
|||||||
ifeq (vm,$(IMAGE_CLASS))
|
ifeq (vm,$(IMAGE_CLASS))
|
||||||
|
|
||||||
vm/.bare: profile/bare
|
vm/.bare: profile/bare
|
||||||
@$(call add,BASE_PACKAGES,interactivesystem lilo shadow-utils e2fsprogs)
|
@$(call add,BASE_PACKAGES,sysklogd syslogd sysvinit interactivesystem)
|
||||||
@$(call set,KFLAVOURS,un-def)
|
@$(call add,BASE_PACKAGES,lilo shadow-utils e2fsprogs)
|
||||||
|
@$(call set,KFLAVOURS,led-ws)
|
||||||
|
@$(call add,BASE_KMODULES,guest)
|
||||||
|
|
||||||
vm/bare: vm/.bare
|
vm/bare: vm/.bare
|
||||||
@$(call add,BASE_PACKAGES,apt)
|
@$(call add,BASE_PACKAGES,apt)
|
||||||
|
@ -21,13 +21,12 @@ TARGET := $(BUILDDIR)/$(SUFFIX)
|
|||||||
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
|
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
|
||||||
@mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"
|
@mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"
|
||||||
|
|
||||||
|
# env | sort -u | grep _LISTS | xargs cp
|
||||||
copy-lists:
|
copy-lists:
|
||||||
@# env | sort -u | grep _LISTS | xargs cp
|
@cp --parents -at $(TARGET) -- \
|
||||||
@$(foreach V, \
|
$(foreach V, \
|
||||||
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
||||||
$(if $(filter environment% file,$(origin $V)),\
|
$(if $(filter environment% file,$(origin $V)),$($V)))
|
||||||
$(shell cp --parents -at $(TARGET) \
|
|
||||||
-- $(value $V))))
|
|
||||||
|
|
||||||
copy-groups:
|
copy-groups:
|
||||||
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
|
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
|
||||||
@ -43,6 +42,6 @@ debug:
|
|||||||
@echo -e $(foreach V, \
|
@echo -e $(foreach V, \
|
||||||
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
||||||
$(if $(filter environment% file,$(origin $V)),\
|
$(if $(filter environment% file,$(origin $V)),\
|
||||||
$(shell echo '\\n"**"' $V: $(value $V)))) '\n'
|
$(shell echo '\\n"**"' $V: $($V)))) '\n'
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -169,7 +169,7 @@ qlogicfas408.ko
|
|||||||
qlogicfas.ko
|
qlogicfas.ko
|
||||||
qlogicfc.ko
|
qlogicfc.ko
|
||||||
qlogicisp.ko
|
qlogicisp.ko
|
||||||
r8168.ko
|
r8169.ko
|
||||||
raid_class.ko
|
raid_class.ko
|
||||||
reiserfs.ko
|
reiserfs.ko
|
||||||
rrunner.ko
|
rrunner.ko
|
||||||
|
Loading…
x
Reference in New Issue
Block a user