Compare commits
207 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f47091fc8f | ||
|
c18ef37274 | ||
|
3c40bb0d46 | ||
|
f6f7caec30 | ||
|
815b4ebbe0 | ||
|
f383969f37 | ||
|
7a75cb1320 | ||
|
220c760708 | ||
|
9ff4d968d8 | ||
|
e329617c57 | ||
|
b1c18d43da | ||
|
45842a0773 | ||
|
6d1f4f6b89 | ||
|
93cd57c8d2 | ||
|
00c58c3725 | ||
|
657c0bf6ef | ||
|
02e3012d3b | ||
|
b5b96931ad | ||
|
f8bdbdd607 | ||
|
20138959de | ||
|
87a22774c0 | ||
|
3c61d471a0 | ||
|
737d0d3cb0 | ||
|
326142c8f6 | ||
|
e469a19e2a | ||
|
5dc287f885 | ||
|
08706b6f43 | ||
|
251c26da57 | ||
|
da5eae9b17 | ||
|
d3636555b2 | ||
|
ae10a1bf7c | ||
|
b94bc99e3f | ||
|
e3f5060d90 | ||
|
db279fc279 | ||
|
8b3b306685 | ||
|
b3e3234c1c | ||
|
9cebd23bcf | ||
|
8834dd824f | ||
|
cf838e7859 | ||
|
9e1c834b0d | ||
|
1cf502329c | ||
|
c104fd0341 | ||
|
884c37f044 | ||
|
8b4208bd9c | ||
|
44dbda4170 | ||
|
bcaa37704d | ||
|
fde155993a | ||
|
af739c1d3d | ||
|
b44e6e2ed0 | ||
|
0ab00c0902 | ||
|
c5346a456e | ||
|
8e590f70b2 | ||
|
f23fdcb859 | ||
|
34df065896 | ||
|
50c72650e2 | ||
|
8eae258a8c | ||
|
9a86628882 | ||
|
b4c7954db5 | ||
|
c7a79f4c0a | ||
|
beb011f509 | ||
|
73fd4d337e | ||
|
7dd8e77753 | ||
|
a87b793d47 | ||
|
23c4ebf14d | ||
|
144d4c0f22 | ||
|
c7dadfd899 | ||
|
8f7c712390 | ||
|
01b3adb619 | ||
|
3f34577393 | ||
|
0e3484c25b | ||
|
210baab8cd | ||
|
418cc79195 | ||
|
7bdda821e7 | ||
|
3bad58987b | ||
|
441a5bdfbd | ||
|
3161c43467 | ||
|
b2a1befe25 | ||
|
f43d68ce62 | ||
|
93371601fb | ||
|
d931d69ddd | ||
|
bd9fef2c2c | ||
|
15a0e6769e | ||
|
674f7db26e | ||
|
891f982e92 | ||
|
b05007943b | ||
|
07cc320b99 | ||
|
f0368c6327 | ||
|
4cfe0fa10f | ||
|
8b26752de9 | ||
|
f44c386107 | ||
|
af1dd0f4e3 | ||
|
1276284ce7 | ||
|
20f8c1853d | ||
|
989c903efb | ||
|
de38413966 | ||
|
43e76bd650 | ||
|
de94641c41 | ||
|
62a37f373f | ||
|
9257927e86 | ||
|
99a7a97284 | ||
|
49b400378d | ||
|
922b44bf57 | ||
|
e43386c1fe | ||
|
84ad4092dc | ||
|
fbe571e296 | ||
|
5ef8291755 | ||
|
9dc9f14f21 | ||
|
873737a24e | ||
|
6470e1d8da | ||
|
a7146f993a | ||
|
25616fb388 | ||
|
c8d92ab767 | ||
|
282257d479 | ||
|
6063a9913f | ||
|
3820a3cb26 | ||
|
ce6c4b6bf2 | ||
|
c1366d3195 | ||
|
4db16f0eb8 | ||
|
5c943e1cdf | ||
|
615d1793ab | ||
|
fc3569a491 | ||
|
dc8799be08 | ||
|
8e87358b66 | ||
|
5a09eed232 | ||
|
93a8a89103 | ||
|
4918019b29 | ||
|
0cb540acf2 | ||
|
9c09cd1447 | ||
|
72986b5321 | ||
|
a10125ffb2 | ||
|
da65dc2fd9 | ||
|
33e154dd7e | ||
|
f110716ae6 | ||
|
607aa1b7d8 | ||
|
7afce7b46c | ||
|
81a6ab9ec1 | ||
|
d79061fb44 | ||
|
f123fea698 | ||
|
f059955d31 | ||
|
7666d3ac2d | ||
|
42e6674120 | ||
|
37b971f533 | ||
|
ba857b9e34 | ||
|
f879c16d80 | ||
|
889be05910 | ||
|
ddca9d469b | ||
|
0b870ef03c | ||
|
42ed473409 | ||
|
006230139c | ||
|
f92a36da7d | ||
|
e59dca158e | ||
|
ce8e2d2272 | ||
|
1b0d05100c | ||
|
6933b7d41e | ||
|
40468c8395 | ||
|
ee703cef93 | ||
|
8613271d5d | ||
|
e3e9d4b894 | ||
|
fd9a5fcbe2 | ||
|
a97ef4c905 | ||
|
6889a65ebd | ||
|
5672e96c1f | ||
|
91f0c4217c | ||
|
fb419a9f7d | ||
|
3ee510aa3a | ||
|
b7fd499aa2 | ||
|
e543e6dd7b | ||
|
8b7138546d | ||
|
b1fe179d21 | ||
|
8da18aefa6 | ||
|
a06a4852f0 | ||
|
fac87182c9 | ||
|
7f6947fd13 | ||
|
e8a067b4af | ||
|
a7e9cf88db | ||
|
768df7e9e9 | ||
|
a18295f223 | ||
|
d160d6100e | ||
|
969d1eb6b2 | ||
|
802ea74da8 | ||
|
386c1b14a3 | ||
|
ccc6486417 | ||
|
d6c663bf02 | ||
|
9269e83382 | ||
|
000848bb97 | ||
|
7dae342db1 | ||
|
6daf50b4c9 | ||
|
7409aa2fc1 | ||
|
61ecd095bb | ||
|
e532dedc7a | ||
|
d7689f30c7 | ||
|
ef02d479f7 | ||
|
3770ca2260 | ||
|
72bc5d0539 | ||
|
a00267ab8b | ||
|
f6b9223b22 | ||
|
0d8e44d8fd | ||
|
b683d5d751 | ||
|
ea8a908931 | ||
|
d9ca33af6d | ||
|
d22c793ee9 | ||
|
b337e72ead | ||
|
f1a165bbd6 | ||
|
8d26de28a3 | ||
|
3e1685aeb6 | ||
|
ee5dd31a71 | ||
|
67adab492f |
@@ -1,12 +1,12 @@
|
||||
Name: mkimage-profiles
|
||||
Version: 1.0.0
|
||||
Version: 1.1.14
|
||||
Release: alt1
|
||||
|
||||
Summary: ALT Linux based distribution metaprofile
|
||||
License: GPLv2+
|
||||
Group: Development/Other
|
||||
|
||||
Url: http://www.altlinux.org/Mkimage/Profiles/m-p
|
||||
Url: http://altlinux.org/m-p
|
||||
Source: %name-%version.tar
|
||||
Packager: Michael Shigorin <mike@altlinux.org>
|
||||
|
||||
@@ -17,6 +17,7 @@ BuildRequires: /proc
|
||||
Requires: rsync git-core
|
||||
Requires: time schedutils sfdisk
|
||||
Requires: mkimage >= 0.2.5
|
||||
Requires: mkimage-preinstall
|
||||
|
||||
# Recommends: graphviz qemu-img
|
||||
|
||||
@@ -37,7 +38,7 @@ to choose from, and some ready-made image recipes as well.
|
||||
|
||||
Make no mistake: constructing distributions isn't just fun, it takes
|
||||
a lot of passion and knowledge to produce a non-trivial one. So m-p
|
||||
(the short nick for mkimage-profiles) is complex too. If you need
|
||||
(the short alias for mkimage-profiles) is complex too. If you need
|
||||
-- or want -- to make just a few tweaks to an existing recipe, it might
|
||||
be easier to comprehend the generated profile (aka builddir) which
|
||||
contains only the needed subprofiles, script hooks and package lists
|
||||
@@ -78,6 +79,57 @@ cp -a * %buildroot%mpdir
|
||||
%doc %docs/*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 25 2013 Michael Shigorin <mike@altlinux.org> 1.1.14-alt1
|
||||
- important bugfix: THE_PACKAGES weren't getting through to .base
|
||||
- regular-sysv-tde related churn
|
||||
|
||||
* Mon Nov 04 2013 Michael Shigorin <mike@altlinux.org> 1.1.13-alt1
|
||||
- rescue friday
|
||||
|
||||
* Mon Oct 21 2013 Michael Shigorin <mike@altlinux.org> 1.1.12-alt1
|
||||
- live-builder update
|
||||
|
||||
* Mon Oct 14 2013 Michael Shigorin <mike@altlinux.org> 1.1.11-alt1
|
||||
- luks better
|
||||
|
||||
* Mon Sep 30 2013 Michael Shigorin <mike@altlinux.org> 1.1.10-alt1
|
||||
- regular tweaks
|
||||
|
||||
* Mon Sep 23 2013 Michael Shigorin <mike@altlinux.org> 1.1.9-alt1
|
||||
- regular fixes
|
||||
|
||||
* Mon Sep 16 2013 Michael Shigorin <mike@altlinux.org> 1.1.8-alt1
|
||||
- armh/p7/ve fixes
|
||||
|
||||
* Mon Aug 26 2013 Michael Shigorin <mike@altlinux.org> 1.1.7-alt1
|
||||
- minor fixes
|
||||
|
||||
* Mon Aug 12 2013 Michael Shigorin <mike@altlinux.org> 1.1.6-alt1
|
||||
- vm-net retired
|
||||
|
||||
* Mon Aug 05 2013 Michael Shigorin <mike@altlinux.org> 1.1.5-alt1
|
||||
- armh related fixes
|
||||
|
||||
* Mon Jul 29 2013 Michael Shigorin <mike@altlinux.org> 1.1.4-alt1
|
||||
- assorted fixups
|
||||
|
||||
* Mon Jul 22 2013 Michael Shigorin <mike@altlinux.org> 1.1.3-alt1
|
||||
- armh fixes and tweaks
|
||||
|
||||
* Mon Jul 15 2013 Michael Shigorin <mike@altlinux.org> 1.1.2-alt1
|
||||
- control and sound features
|
||||
|
||||
* Mon Jul 01 2013 Michael Shigorin <mike@altlinux.org> 1.1.1-alt1
|
||||
- cuboxism
|
||||
|
||||
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.1.0-alt1
|
||||
- 1.1.x branch: public alpha development status
|
||||
+ new subprofile: rootfs
|
||||
+ new features: armh*, deflogin, init, services
|
||||
+ refactored features: build-*, efi, fonts, live, x11*
|
||||
+ tar2vm got rewritten as tar2fs, gained ARM support
|
||||
- minor spec metadata update
|
||||
|
||||
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1
|
||||
- 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/ef6d21aa51ad57e7cba3de2f86f23beff6dbe0cc
Normal file
6
.gear/tags/ef6d21aa51ad57e7cba3de2f86f23beff6dbe0cc
Normal file
@@ -0,0 +1,6 @@
|
||||
object 251c26da57b04666a2c074744bf91f0bd7df83d6
|
||||
type commit
|
||||
tag v1.1.13
|
||||
tagger Michael Shigorin <mike@altlinux.org> 1383576950 +0400
|
||||
|
||||
rescue friday
|
@@ -1 +1 @@
|
||||
5f4103e2678b4db8760eda8622f094f694f9cdcd v1.0.0
|
||||
ef6d21aa51ad57e7cba3de2f86f23beff6dbe0cc v1.1.13
|
||||
|
17
Makefile
17
Makefile
@@ -6,15 +6,16 @@
|
||||
-include $(HOME)/.mkimage/profiles.mk
|
||||
|
||||
# for immediate assignment
|
||||
ifndef ARCHES
|
||||
ifdef ARCH
|
||||
ARCHES := $(ARCH)
|
||||
else
|
||||
ARCHES := $(shell arch \
|
||||
ifndef ARCH
|
||||
ARCH := $(shell arch \
|
||||
| sed 's/i686/i586/; s/armv7.*/armh/; s/armv.*/arm/; s/ppc.*/ppc/')
|
||||
endif
|
||||
|
||||
ifndef ARCHES
|
||||
ARCHES := $(ARCH)
|
||||
endif
|
||||
export ARCHES
|
||||
|
||||
export ARCHES ARCH
|
||||
|
||||
export PATH := $(CURDIR)/bin:$(PATH)
|
||||
|
||||
@@ -29,8 +30,10 @@ MAKE += -r --no-print-directory
|
||||
|
||||
DIRECT_TARGETS := help help/distro help/ve help/vm clean distclean check
|
||||
.PHONY: $(DIRECT_TARGETS)
|
||||
|
||||
# these build nothing so no use of reports either
|
||||
$(DIRECT_TARGETS):
|
||||
@$(MAKE) -f main.mk $@
|
||||
@$(MAKE) -f main.mk REPORT= $@
|
||||
|
||||
export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
||||
|
||||
|
@@ -21,7 +21,7 @@ while read first second third rest; do
|
||||
for to in $TO; do
|
||||
out=" \"$FROM\" -> \"$to\""
|
||||
case $to in
|
||||
*distro/*)
|
||||
*distro/*|*vm/*)
|
||||
echo "$out [weight=10];";;
|
||||
*)
|
||||
echo "$out";;
|
||||
|
233
bin/tar2fs
Executable file
233
bin/tar2fs
Executable file
@@ -0,0 +1,233 @@
|
||||
#!/bin/bash -ex
|
||||
# usage:
|
||||
# tar2fs chroot.tar image.raw [size_in_bytes [fstype]]
|
||||
|
||||
. shell-error
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
fatal "error: tar2fs needs at least two arguments"
|
||||
fi
|
||||
|
||||
# this needs env_keep sudo setup to actually work
|
||||
if [ -n "$GLOBAL_BUILDDIR" ]; then
|
||||
WORKDIR="$GLOBAL_BUILDDIR/vmroot"
|
||||
else
|
||||
WORKDIR="$(mktemp --tmpdir -d vmroot-XXXXX)"
|
||||
fi
|
||||
|
||||
[ -n "$WORKDIR" ] || fatal "couldn't come up with suitable WORKDIR"
|
||||
|
||||
[ -n "$GLOBAL_DEBUG" ] || message "WORKDIR: $WORKDIR"
|
||||
|
||||
MB=1048576 # a parted's "megabyte" in bytes is *broken*
|
||||
|
||||
SIZE_FACTOR=2 # multiply the sizes found by this value
|
||||
BOOT_SIZE_FACTOR=2 # multiply /boot size by this value additionally
|
||||
|
||||
CUR_BOUNDARY=0 # align first partition at 1MB for performance (+1)
|
||||
|
||||
INITRD_MODULES=
|
||||
BOOTFSTYPE=
|
||||
BOOTPART=
|
||||
|
||||
case "`arch`" in # NB: sudo => no GLOBAL_ will do either; mind qemu-*
|
||||
*86*)
|
||||
# NB: different storage modules might be needed for non-kvm
|
||||
INITRD_MODULES="sd_mod ata_piix"
|
||||
BLOCKDEV="/dev/sda" # might be /dev/vda for virtio
|
||||
ROOTPART="1"
|
||||
;;
|
||||
arm*)
|
||||
BOOTFSTYPE="ext2" # support expected in every sane target uboot
|
||||
BLOCKDEV="/dev/mmcblk0p" # ...hopefully...
|
||||
BOOTPART="1"
|
||||
ROOTPART="2"
|
||||
;;
|
||||
esac
|
||||
|
||||
# figure out the part taken by /boot in the given tarball
|
||||
boot_size() {
|
||||
if [ -n "$BOOTPART" ]; then
|
||||
tar tvf "$1" \
|
||||
| awk ' \
|
||||
BEGIN { sum=0 }
|
||||
/^-.* \.\/boot\// { sum=sum+$3 }
|
||||
END { print sum }'
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
# parted wrapper for convenience
|
||||
parting() { parted "$LOOPDEV" --align optimal --script -- "$@"; }
|
||||
|
||||
# unfortunately parted is insane enough to lump alignment controls
|
||||
# into unit controls so creating adjacent partitions sized in MiB
|
||||
# is not as straightforward as it might be... thus "+1" padding;
|
||||
# see also http://www.gnu.org/software/parted/manual/parted.html#unit
|
||||
mkpart() {
|
||||
# a bit different start/end semantics to handle end of device too
|
||||
local start="$(($CUR_BOUNDARY + 1))" # yes, we lose a megabyte
|
||||
if [ -n "$1" ]; then
|
||||
CUR_BOUNDARY="$(($start + $1))"
|
||||
local end="$CUR_BOUNDARY"MiB
|
||||
else
|
||||
local end="-1s" # last sector of the image
|
||||
fi
|
||||
parting mkpart primary ext2 "$start"MiB "$end"
|
||||
}
|
||||
|
||||
# a tarball containing chroot with a kernel
|
||||
TAR="$1"
|
||||
[ -s "$TAR" ] || fatal "source tarball doesn't really exist"
|
||||
|
||||
# a path to the image to be generated
|
||||
IMG="$2"
|
||||
[ -d "$(dirname "$IMG")" ] || fatal "target directory doesn't exist"
|
||||
|
||||
# 0 means auto; if a value is specified it holds (no /boot subtracted)
|
||||
ROOTSIZE="$3"
|
||||
[ -n "$ROOTSIZE" -a "$ROOTSIZE" != 0 ] || unset ROOTSIZE
|
||||
|
||||
# image size in bytes
|
||||
TARSIZE="$(stat -Lc %s "$TAR")"
|
||||
# /boot size in that tarball
|
||||
BOOTSIZE="$(boot_size "$TAR")"
|
||||
DEFSIZE="$(($SIZE_FACTOR * ($TARSIZE - $BOOTSIZE)))" # (exact sizes)
|
||||
ROOTSIZE="$((${ROOTSIZE:-$DEFSIZE} + $MB - 1))" # for ceil rounding to MB
|
||||
# image and /boot sizes in megabytes
|
||||
ROOTSIZEM="$(($ROOTSIZE / $MB))"
|
||||
BOOTSIZEM="$((($SIZE_FACTOR * $BOOT_SIZE_FACTOR * $BOOTSIZE + $MB - 1) / $MB))"
|
||||
|
||||
# tested to work: ext[234], jfs
|
||||
# NB: xfs doesn't have a spare sector for the bootloader
|
||||
ROOTFSTYPE="${4:-ext4}"
|
||||
|
||||
# single root partition hardwired so far,
|
||||
# add another image for home/data/swap if needed
|
||||
ROOTDEV="$BLOCKDEV$ROOTPART"
|
||||
|
||||
# last preparations...
|
||||
MKFS="mkfs.$ROOTFSTYPE ${BOOTFSTYPE:+mkfs.$BOOTFSTYPE}"
|
||||
for i in losetup sfdisk parted kpartx $MKFS; do
|
||||
if ! type -t "$i" >&/dev/null; then
|
||||
fatal "$i required but not found in host system"
|
||||
fi
|
||||
done
|
||||
|
||||
LOOPDEV="$(losetup --find)" # would be sad about non-binary megabytes too
|
||||
ROOTFS="$WORKDIR/chroot"
|
||||
|
||||
BOOTFS=
|
||||
if [ -n "$BOOTPART" ]; then
|
||||
BOOTFS="$ROOTFS/boot"
|
||||
fi
|
||||
|
||||
exit_handler() {
|
||||
rc=$?
|
||||
if [ -n "$ROOTFS" ]; then
|
||||
umount ${BOOTFS:+"$BOOTFS"} "$ROOTFS"{/dev,/proc,/sys,}
|
||||
|
||||
if [ -n "$LOOPDEV" ]; then
|
||||
kpartx -d "$LOOPDEV"
|
||||
losetup --detach "$LOOPDEV"
|
||||
fi
|
||||
rm -r -- "$ROOTFS"
|
||||
rmdir -- "$WORKDIR"
|
||||
fi
|
||||
exit $rc
|
||||
}
|
||||
|
||||
# handle -e in shebang as well
|
||||
trap exit_handler EXIT ERR
|
||||
|
||||
# prepare disk image and a filesystem inside it
|
||||
rm -f -- "$IMG"
|
||||
OFFSET="$(($CUR_BOUNDARY + $BOOTSIZEM + $ROOTSIZEM - 1))"
|
||||
dd if=/dev/zero of="$IMG" conv=notrunc bs=$MB count=1 seek="$OFFSET"
|
||||
losetup "$LOOPDEV" "$IMG"
|
||||
|
||||
parting mklabel msdos
|
||||
|
||||
if [ -n "$BOOTPART" ]; then
|
||||
BOOTDEV="$BLOCKDEV$BOOTPART"
|
||||
mkpart "$BOOTSIZEM"
|
||||
fi
|
||||
|
||||
# not ROOTSIZEM but "the rest"; somewhat non-trivial arithmetics lurk in parted
|
||||
mkpart
|
||||
|
||||
kpartx -a -s "$LOOPDEV"
|
||||
LOOPROOT="/dev/mapper/$(basename "$LOOPDEV")p$ROOTPART"
|
||||
|
||||
mkfs."$ROOTFSTYPE" "$LOOPROOT"
|
||||
|
||||
if [ -n "$BOOTPART" ]; then
|
||||
LOOPBOOT="/dev/mapper/$(basename "$LOOPDEV")p$BOOTPART"
|
||||
mkfs."$BOOTFSTYPE" "$LOOPBOOT"
|
||||
fi
|
||||
|
||||
# mount and populate it
|
||||
mkdir -pm755 "$ROOTFS"
|
||||
mount "$LOOPROOT" "$ROOTFS"
|
||||
|
||||
if [ -n "$BOOTPART" ]; then
|
||||
mkdir -pm700 "$BOOTFS"
|
||||
mount "$LOOPBOOT" "$BOOTFS"
|
||||
fi
|
||||
|
||||
tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
|
||||
for i in /dev /proc /sys; do mount --bind "$i" "$ROOTFS$i"; done
|
||||
|
||||
# loop device so lilo could work...
|
||||
echo "$LOOPROOT / $ROOTFSTYPE relatime 1 1" >> "$ROOTFS/etc/fstab"
|
||||
|
||||
# target device at once
|
||||
if [ -n "$BOOTPART" ]; then
|
||||
echo "$BOOTDEV /boot $BOOTFSTYPE defaults 1 2" >> "$ROOTFS/etc/fstab"
|
||||
fi
|
||||
|
||||
echo "MODULES_PRELOAD=$INITRD_MODULES $ROOTFSTYPE" >> "$ROOTFS/etc/initrd.mk"
|
||||
|
||||
KERNEL="$(readlink $ROOTFS/boot/vmlinuz | sed 's,vmlinuz-,,')"
|
||||
chroot "$ROOTFS" make-initrd -k "$KERNEL"
|
||||
|
||||
# ...target device too
|
||||
sed -i "s,$LOOPROOT,$ROOTDEV," "$ROOTFS/etc/fstab"
|
||||
|
||||
if [ -x /sbin/lilo ]; then
|
||||
# configure and install bootloader
|
||||
REGEXP='^Disk .*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'
|
||||
set -- $(sfdisk -l "$LOOPDEV" | grep -E "$REGEXP" | sed -r "s@$REGEXP@\1 \2 \3@")
|
||||
|
||||
LILO_COMMON="lba32
|
||||
delay=1
|
||||
vga=0
|
||||
image=/boot/vmlinuz
|
||||
initrd=/boot/initrd.img
|
||||
append=\"root=$ROOTDEV rootdelay=3 quiet\"
|
||||
label=linux"
|
||||
|
||||
cat > "$ROOTFS"/etc/lilo-loop.conf <<-EOF
|
||||
boot=$LOOPDEV
|
||||
disk=$LOOPDEV
|
||||
bios=0x80
|
||||
cylinders=$1
|
||||
heads=$2
|
||||
sectors=$3
|
||||
partition=$LOOPROOT
|
||||
start=63
|
||||
$LILO_COMMON
|
||||
EOF
|
||||
|
||||
chroot "$ROOTFS" lilo -C /etc/lilo-loop.conf
|
||||
|
||||
cat > "$ROOTFS"/etc/lilo.conf <<-EOF
|
||||
boot=$BLOCKDEV
|
||||
$LILO_COMMON
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -n "$SUDO_USER" ]; then
|
||||
chown "$SUDO_USER" "$IMG" "$ROOTFS" "$WORKDIR"
|
||||
fi
|
134
bin/tar2vm
134
bin/tar2vm
@@ -1,134 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
# usage:
|
||||
# tar2vm chroot.tar image.raw [size_in_bytes]
|
||||
|
||||
. shell-error
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
fatal "error: tar2vm needs at least two arguments"
|
||||
fi
|
||||
|
||||
# this needs env_keep sudo setup to actually work
|
||||
if [ -n "$GLOBAL_BUILDDIR" ]; then
|
||||
WORKDIR="$GLOBAL_BUILDDIR/vmroot"
|
||||
else
|
||||
WORKDIR="$(mktemp --tmpdir -d vmroot-XXXXX)"
|
||||
fi
|
||||
|
||||
[ -n "$WORKDIR" ] || fatal "couldn't come up with suitable WORKDIR"
|
||||
|
||||
[ -n "$GLOBAL_DEBUG" ] || message "WORKDIR: $WORKDIR"
|
||||
|
||||
# a tarball containing chroot with a kernel
|
||||
TAR="$1"
|
||||
[ -s "$TAR" ] || fatal "source tarball doesn't really exist"
|
||||
|
||||
# a path to the image to be generated
|
||||
IMG="$2"
|
||||
[ -d "$(dirname "$IMG")" ] || fatal "target directory doesn't exist"
|
||||
|
||||
# image size in bytes (256M is a fallback)
|
||||
TARSIZE="$(stat -Lc %s "$TAR")"
|
||||
DEFSIZE="$((2 * $TARSIZE))"
|
||||
DISKSIZE="${3:-${DEFSIZE:-268435456}}"
|
||||
# ...and in megabytes
|
||||
DISKSIZEM="$(($DISKSIZE / 1048576))"
|
||||
|
||||
# tested to work: ext[234], jfs
|
||||
# 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"
|
||||
|
||||
# last preparations...
|
||||
for i in losetup sfdisk parted kpartx mkfs."$ROOTFSTYPE"; do
|
||||
if ! type -t "$i" >&/dev/null; then
|
||||
fatal "$i required but not found"
|
||||
fi
|
||||
done
|
||||
|
||||
LOOPDEV="$(losetup --find)"
|
||||
ROOTFS="$WORKDIR/chroot"
|
||||
|
||||
exit_handler()
|
||||
{
|
||||
rc=$?
|
||||
if [ -n "$ROOTFS" ]; then
|
||||
umount "$ROOTFS"{/dev,/proc,/sys,}
|
||||
if [ -n "$LOOPDEV" ]; then
|
||||
kpartx -d "$LOOPDEV"
|
||||
losetup --detach "$LOOPDEV"
|
||||
fi
|
||||
rm -r -- "$ROOTFS"
|
||||
rmdir -- "$WORKDIR"
|
||||
fi
|
||||
exit $rc
|
||||
}
|
||||
|
||||
trap exit_handler EXIT
|
||||
|
||||
# prepare disk image and a filesystem inside it
|
||||
rm -f -- "$IMG"
|
||||
dd if=/dev/zero of="$IMG" conv=notrunc \
|
||||
bs=1 count=1 seek="$(($DISKSIZE - 1))"
|
||||
losetup "$LOOPDEV" "$IMG"
|
||||
|
||||
parted --script "$LOOPDEV" mklabel msdos
|
||||
parted --script "$LOOPDEV" mkpart primary ext2 1 "$DISKSIZEM"
|
||||
|
||||
kpartx -a "$LOOPDEV"
|
||||
LOOPDEV1="/dev/mapper/$(basename "$LOOPDEV")p1"
|
||||
|
||||
mkfs."$ROOTFSTYPE" "$LOOPDEV1"
|
||||
|
||||
# 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
|
||||
echo "$LOOPDEV1 / $ROOTFSTYPE defaults 1 1" >> "$ROOTFS/etc/fstab"
|
||||
echo "MODULES_PRELOAD=sd_mod ata_piix $ROOTFSTYPE" >> "$ROOTFS/etc/initrd.mk"
|
||||
|
||||
KERNEL="$(readlink $ROOTFS/boot/vmlinuz | sed 's,vmlinuz-,,')"
|
||||
chroot "$ROOTFS" make-initrd -k "$KERNEL"
|
||||
|
||||
sed -i "s,$LOOPDEV1,$ROOTDEV," "$ROOTFS/etc/fstab"
|
||||
|
||||
# configure and install bootloader
|
||||
REGEXP='^Disk .*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'
|
||||
set -- $(sfdisk -l "$LOOPDEV" | grep -E "$REGEXP" | sed -r "s@$REGEXP@\1 \2 \3@")
|
||||
|
||||
LILO_COMMON="lba32
|
||||
delay=1
|
||||
vga=0
|
||||
image=/boot/vmlinuz
|
||||
initrd=/boot/initrd.img
|
||||
append=\"root=$ROOTDEV rootdelay=3\"
|
||||
label=linux"
|
||||
|
||||
cat > "$ROOTFS"/etc/lilo-loop.conf << EOF
|
||||
boot=$LOOPDEV
|
||||
disk=$LOOPDEV
|
||||
bios=0x80
|
||||
cylinders=$1
|
||||
heads=$2
|
||||
sectors=$3
|
||||
partition=$LOOPDEV1
|
||||
start=63
|
||||
$LILO_COMMON
|
||||
EOF
|
||||
|
||||
chroot "$ROOTFS" lilo -C /etc/lilo-loop.conf
|
||||
|
||||
cat > "$ROOTFS"/etc/lilo.conf << EOF
|
||||
boot=${ROOTDEV%[0-9]*}
|
||||
$LILO_COMMON
|
||||
EOF
|
||||
|
||||
if [ -n "$SUDO_USER" ]; then
|
||||
chown "$SUDO_USER" "$IMG" "$ROOTFS" "$WORKDIR"
|
||||
fi
|
94
conf.d/armh.mk
Normal file
94
conf.d/armh.mk
Normal file
@@ -0,0 +1,94 @@
|
||||
ifeq (armh,$(ARCH))
|
||||
|
||||
ifeq (ve,$(IMAGE_CLASS))
|
||||
|
||||
# aliases for autobuild
|
||||
ve/regular-nexus7-e17: ve/nexus7-e17; @:
|
||||
ve/regular-nexus7-kde4: ve/nexus7-kde4; @:
|
||||
ve/altlinux-p7-nexus7-e17: ve/nexus7-e17; @:
|
||||
ve/altlinux-p7-nexus7-kde4: ve/nexus7-kde4; @:
|
||||
|
||||
ve/.tegra3-base: ve/.base use/armh use/kernel
|
||||
@$(call add,BASE_PACKAGES,nvidia-tegra)
|
||||
|
||||
ve/.tegra3-tablet: ve/.tegra3-base use/armh-tegra3 +pulse
|
||||
@$(call add,BASE_LISTS,$(call tags,base tablet))
|
||||
|
||||
ve/.nexus7-tablet: ve/.tegra3-tablet use/armh-nexus7 \
|
||||
use/x11-autologin use/deflogin/altlinuxroot
|
||||
@$(call set,KFLAVOURS,grouper) # fits tilapia just fine
|
||||
@$(call set,BRANDING,altlinux-kdesktop) ### the only suitable so far
|
||||
@$(call add,BASE_PACKAGES,mkinitrd) ### rootsubdir support
|
||||
@$(call add,BASE_PACKAGES,firmware-nexus7)
|
||||
@$(call add,BASE_PACKAGES,livecd-ru) ### until l10n is there
|
||||
|
||||
ve/nexus7-e17: ve/.nexus7-tablet use/x11/e17 use/x11/lightdm/gtk; @:
|
||||
|
||||
ve/nexus7-kde4: ve/.nexus7-tablet use/x11/lightdm/kde +systemd +pulse +nm
|
||||
@$(call add,BASE_LISTS,$(call tags,base kde4mobile))
|
||||
|
||||
ve/nexus7-xfce: ve/.nexus7-tablet use/x11/xfce use/x11/lightdm/gtk +systemd
|
||||
@$(call add,BASE_PACKAGES,florence at-spi2-atk)
|
||||
|
||||
endif
|
||||
|
||||
ifeq (vm,$(IMAGE_CLASS))
|
||||
|
||||
# NB: early dependency on use/kernel is on intent
|
||||
vm/.arm-base: profile/bare use/kernel use/net-eth/dhcp use/net-ssh; @:
|
||||
@$(call add,BASE_PACKAGES,interactivesystem e2fsprogs)
|
||||
@$(call add,BASE_PACKAGES,apt)
|
||||
@$(call add,BASE_PACKAGES,mkinitrd uboot-tools)
|
||||
@$(call set,BRANDING,altlinux-kdesktop)
|
||||
|
||||
vm/.cubox-bare: vm/.arm-base use/armh-cubox use/net-ssh use/repo use/tty/S0
|
||||
@$(call add,BASE_PACKAGES,glibc-locales vim-console rsync)
|
||||
|
||||
vm/.cubox-desktop: vm/.cubox-bare use/armh-dovefb +systemd +pulse \
|
||||
use/armh-cubox use/branding use/xdg-user-dirs/deep
|
||||
@$(call set,BRANDING,altlinux-kdesktop)
|
||||
@$(call add,THE_BRANDING,alterator graphics indexhtml menu notes)
|
||||
@$(call add,BASE_PACKAGES,parole gst-ffmpeg gst-plugins-vmeta)
|
||||
@$(call add,BASE_PACKAGES,gst-plugins-good gst-plugins-nice)
|
||||
@$(call add,BASE_PACKAGES,gst-plugins-bad gst-plugins-ugly)
|
||||
@$(call add,BASE_PACKAGES,fonts-ttf-droid fonts-ttf-ubuntu-font-family)
|
||||
@$(call add,BASE_PACKAGES,fonts-ttf-liberation fonts-ttf-dejavu)
|
||||
@$(call add,BASE_PACKAGES,LibreOffice4-full LibreOffice4-langpack-ru)
|
||||
@$(call add,BASE_LISTS,$(call tags,(base || desktop) && regular))
|
||||
|
||||
vm/cubox-xfce-ru: vm/.cubox-desktop use/deflogin/altlinuxroot \
|
||||
use/slinux/arm use/x11/lightdm/gtk use/x11-autologin +nm
|
||||
@$(call add,BASE_PACKAGES,livecd-ru)
|
||||
|
||||
# these images use a kind of OEM setup
|
||||
vm/.cubox-oem: vm/.cubox-desktop use/oem; @:
|
||||
|
||||
vm/.cubox-gtk: vm/.cubox-oem use/x11/lightdm/gtk +nm; @:
|
||||
|
||||
vm/cubox-xfce: vm/.cubox-gtk \
|
||||
use/slinux/arm use/net-usershares use/domain-client; @:
|
||||
|
||||
vm/cubox-mate: vm/.cubox-gtk use/x11/mate; @:
|
||||
@$(call set,BRANDING,altlinux-centaurus)
|
||||
@$(call add,THE_BRANDING,mate-settings)
|
||||
|
||||
vm/cubox-tde: vm/.cubox-oem use/net-eth/dhcp use/x11-autostart +tde
|
||||
@$(call add,BASE_LISTS,openscada)
|
||||
|
||||
vm/cubox-kde4: vm/.cubox-oem use/x11/kde4 use/x11/kdm4 use/fonts/zerg +pulse
|
||||
@$(call add,BASE_LISTS,$(call tags,desktop && kde4 && !extra))
|
||||
|
||||
vm/cubox-server: vm/.cubox-bare use/deflogin/altlinuxroot use/control/sudo-su \
|
||||
+sysvinit
|
||||
@$(call set,BRANDING,altlinux-centaurus)
|
||||
@$(call add,BASE_PACKAGES,agetty fdisk)
|
||||
@$(call add,BASE_LISTS,$(call tags,base security))
|
||||
|
||||
vm/arm-server: vm/.arm-base use/net-eth/dhcp use/cleanup/installer +sysvinit
|
||||
@$(call set,KFLAVOURS,armadaxp)
|
||||
@$(call add,BASE_PACKAGES,agetty)
|
||||
@$(call add,BASE_LISTS,$(call tags,extra (server || network)))
|
||||
|
||||
endif
|
||||
|
||||
endif
|
@@ -6,16 +6,20 @@ distro/.desktop-base: distro/.installer use/syslinux/ui/vesamenu use/x11/xorg
|
||||
|
||||
distro/.desktop-mini: distro/.desktop-base use/x11/xdm +power; @:
|
||||
|
||||
distro/.desktop-network: distro/.desktop-mini use/stage2/net-eth +vmguest
|
||||
mixin/desktop-installer: use/x11-autostart use/sound +vmguest
|
||||
@$(call add,SYSTEM_PACKAGES,fonts-ttf-google-croscore-arimo)
|
||||
@$(call add,BASE_PACKAGES,udev-rule-generator-net sysklogd)
|
||||
@$(call add,BASE_LISTS, \
|
||||
$(call tags,(base || desktop) && (l10n || network)))
|
||||
|
||||
distro/.desktop-network: distro/.desktop-mini \
|
||||
mixin/desktop-installer use/stage2/net-eth; @:
|
||||
|
||||
distro/.desktop-extra:
|
||||
@$(call add,BASE_LISTS,$(call tags,(archive || base) && (extra)))
|
||||
|
||||
distro/kde4-lite: distro/.desktop-mini distro/.desktop-network distro/.desktop-extra +kde4-lite
|
||||
distro/kde4-lite: distro/.desktop-mini \
|
||||
distro/.desktop-network distro/.desktop-extra +kde4-lite
|
||||
@$(call set,KFLAVOURS,std-def)
|
||||
|
||||
distro/tde: distro/.desktop-network +tde; @:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
ifeq (distro,$(IMAGE_CLASS))
|
||||
|
||||
distro/homeros-mini: distro/.live-base use/live/textinstall use/homeros; @:
|
||||
distro/homeros-mini: distro/.live-base use/live/textinstall \
|
||||
use/homeros use/speech/en use/isohybrid; @:
|
||||
|
||||
endif
|
||||
|
@@ -10,8 +10,10 @@ distro/syslinux: distro/.init \
|
||||
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
|
||||
|
||||
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
|
||||
distro/.live-x11: distro/.live-base use/live/x11; @:
|
||||
|
||||
distro/.live-desktop: distro/.base +live use/live/install use/stage2/net-eth \
|
||||
use/plymouth/live use/efi; @:
|
||||
use/plymouth/live; @:
|
||||
distro/.live-desktop-ru: distro/.live-desktop use/live/ru; @:
|
||||
|
||||
distro/.live-kiosk: distro/.base use/live/base use/live/autologin +power \
|
||||
@@ -20,7 +22,7 @@ distro/.live-kiosk: distro/.base use/live/base use/live/autologin +power \
|
||||
@$(call add,CLEANUP_PACKAGES,'alterator*' 'guile*' 'vim-common')
|
||||
|
||||
distro/live-builder-mini: distro/.live-base use/dev/mkimage use/dev \
|
||||
use/syslinux/timeout/30
|
||||
use/stage2/net-eth use/net-eth/dhcp use/syslinux/timeout/30
|
||||
@$(call set,KFLAVOURS,$(BIGRAM))
|
||||
@$(call add,LIVE_LISTS,\
|
||||
$(call tags,(base || live) && (server || builder)))
|
||||
@@ -47,9 +49,8 @@ distro/live-rescue: distro/live-icewm use/efi
|
||||
$(call tags,(base || extra) && (archive || rescue || network)))
|
||||
|
||||
# NB: this one doesn't include the browser, needs to be chosen downstream
|
||||
distro/.live-webkiosk: distro/.live-kiosk use/live/hooks use/live/ru
|
||||
distro/.live-webkiosk: distro/.live-kiosk use/live/hooks use/live/ru use/sound
|
||||
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
|
||||
@$(call add,LIVE_PACKAGES,alsa-utils udev-alsa)
|
||||
@$(call add,CLEANUP_PACKAGES,'libqt4*' 'qt4*')
|
||||
|
||||
distro/live-webkiosk-mini: distro/.live-webkiosk
|
||||
@@ -65,30 +66,18 @@ distro/live-webkiosk: distro/live-webkiosk-mini use/live/desktop; @:
|
||||
distro/live-webkiosk-chromium: distro/.live-webkiosk
|
||||
@$(call add,LIVE_PACKAGES,livecd-webkiosk-chromium)
|
||||
|
||||
distro/live-flightgear: distro/live-icewm use/live/sound use/x11/3d-proprietary
|
||||
distro/live-flightgear: distro/.live-x11 use/x11/lightdm/gtk use/x11/3d +icewm
|
||||
@$(call add,LIVE_LISTS,$(call tags,xorg misc))
|
||||
@$(call add,LIVE_PACKAGES,FlightGear fgo input-utils)
|
||||
@$(call try,HOMEPAGE,http://www.4p8.com/eric.brasseur/flight_simulator_tutorial.html)
|
||||
|
||||
distro/live-gnome: distro/.live-desktop-ru use/systemd use/live/nodm use/x11/3d-proprietary
|
||||
@$(call add,LIVE_PACKAGES,gnome3-default)
|
||||
distro/live-e17: distro/.live-desktop-ru use/x11/e17 use/x11/lightdm/gtk; @:
|
||||
|
||||
distro/live-cinnamon: distro/.live-desktop-ru use/live/autologin \
|
||||
use/x11/cinnamon use/x11/3d-proprietary; @:
|
||||
|
||||
distro/live-mate: distro/.live-desktop-ru use/live/nodm use/x11/3d-free
|
||||
@$(call add,LIVE_LISTS,openssh $(call tags,(desktop || mobile) && mate))
|
||||
@$(call set,KFLAVOURS,un-def) # the newest one
|
||||
|
||||
distro/live-e17: distro/.live-desktop-ru use/live/autologin \
|
||||
use/x11/e17 use/x11/gdm2.20; @:
|
||||
|
||||
distro/live-gimp: distro/live-icewm use/x11/3d-free use/live/ru
|
||||
distro/live-gimp: distro/live-icewm use/live/ru
|
||||
@$(call add,LIVE_PACKAGES,gimp tintii immix fim)
|
||||
@$(call add,LIVE_PACKAGES,cvltonemap darktable geeqie rawstudio ufraw)
|
||||
@$(call add,LIVE_PACKAGES,macrofusion python-module-pygtk-libglade)
|
||||
@$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync)
|
||||
@$(call add,LIVE_PACKAGES,design-graphics-sisyphus2)
|
||||
|
||||
distro/live-sugar: distro/.live-desktop-ru use/x11/sugar; @:
|
||||
|
||||
endif
|
||||
|
13
conf.d/p7.mk
13
conf.d/p7.mk
@@ -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; @:
|
||||
@@ -15,6 +16,16 @@ distro/altlinux-p7-mate: distro/regular-mate mixin/p7; @:
|
||||
distro/altlinux-p7-razorqt: distro/regular-razorqt mixin/p7; @:
|
||||
distro/altlinux-p7-rescue: distro/regular-rescue mixin/p7; @:
|
||||
distro/altlinux-p7-tde: distro/regular-tde mixin/p7; @:
|
||||
distro/altlinux-p7-tde-sysv: distro/regular-tde-sysv mixin/p7; @:
|
||||
distro/altlinux-p7-wmaker: distro/regular-wmaker mixin/p7; @:
|
||||
distro/altlinux-p7-xfce: distro/regular-xfce mixin/p7; @:
|
||||
|
||||
distro/altlinux-p7-sysv-tde: distro/regular-sysv-tde mixin/p7; @:
|
||||
|
||||
distro/altlinux-p7-server: distro/regular-server mixin/p7; @:
|
||||
|
||||
endif
|
||||
|
||||
ifeq (ve,$(IMAGE_CLASS))
|
||||
ve/altlinux-p7: ve/generic mixin/p7; @:
|
||||
endif
|
||||
|
@@ -6,49 +6,73 @@ distro/.regular-bare: distro/.base +wireless use/efi/signed \
|
||||
use/memtest use/stage2/net-eth use/kernel/net
|
||||
@$(call try,SAVE_PROFILE,yes)
|
||||
|
||||
# WM base target
|
||||
distro/.regular-base: distro/.regular-bare +vmguest +live \
|
||||
use/live/ru use/live/install use/live/repo use/live/rw \
|
||||
use/luks use/x11/3d-free use/branding
|
||||
# graphical target (not enforcing xorg drivers or blobs)
|
||||
distro/.regular-x11: distro/.regular-bare use/x11/wacom +vmguest \
|
||||
use/live/x11 use/live/install use/live/repo use/live/rw \
|
||||
use/luks use/branding
|
||||
@$(call add,LIVE_LISTS,$(call tags,(base || desktop) && regular))
|
||||
@$(call add,LIVE_LISTS,$(call tags,base rescue))
|
||||
@$(call add,LIVE_PACKAGES,installer-feature-desktop-other-fs-stage2)
|
||||
@$(call add,THE_BRANDING,indexhtml notes alterator)
|
||||
@$(call add,THE_BRANDING,graphics)
|
||||
@$(call add,LIVE_PACKAGES,gpm livecd-install-apt-cache)
|
||||
@$(call add,DEFAULT_SERVICES_ENABLE,gpm)
|
||||
|
||||
# common WM live/installer bits
|
||||
mixin/regular-desktop: use/x11/xorg use/sound use/xdg-user-dirs
|
||||
@$(call add,THE_PACKAGES,installer-feature-desktop-other-fs-stage2)
|
||||
@$(call add,THE_PACKAGES,alterator-notes)
|
||||
@$(call add,THE_BRANDING,alterator graphics indexhtml notes)
|
||||
|
||||
# WM base target
|
||||
distro/.regular-base: distro/.regular-x11 mixin/regular-desktop
|
||||
|
||||
# DE base target
|
||||
# TODO: use/plymouth/live when luks+plymouth is done, see also #28255
|
||||
distro/.regular-desktop: distro/.regular-base \
|
||||
use/systemd use/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind
|
||||
use/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind +systemd
|
||||
@$(call add,LIVE_PACKAGES,fuse-exfat)
|
||||
@$(call add,LIVE_LISTS,domain-client)
|
||||
@$(call add,THE_BRANDING,bootloader)
|
||||
@$(call set,KFLAVOURS,std-def)
|
||||
|
||||
distro/.regular-gtk: distro/.regular-desktop use/x11/lightdm/gtk +plymouth; @:
|
||||
distro/.regular-sysv: distro/.regular-base +sysvinit; @:
|
||||
distro/.regular-sysv-gtk: distro/.regular-sysv use/x11/lightdm/gtk; @:
|
||||
|
||||
distro/regular-icewm: distro/.regular-base use/x11/lightdm/gtk +icewm
|
||||
distro/.regular-install: distro/.regular-bare +installer +sysvinit +power \
|
||||
use/branding use/bootloader/grub use/luks
|
||||
@$(call add,INSTALL2_BRANDING,alterator notes)
|
||||
@$(call add,THE_BRANDING,alterator)
|
||||
|
||||
distro/.regular-install-x11: distro/.regular-install mixin/regular-desktop
|
||||
@$(call set,INSTALLER,desktop)
|
||||
|
||||
distro/regular-icewm: distro/.regular-sysv-gtk +icewm
|
||||
@$(call add,LIVE_LISTS,$(call tags,regular icewm))
|
||||
@$(call set,KFLAVOURS,un-def)
|
||||
|
||||
distro/regular-wmaker: distro/.regular-desktop use/x11/lightdm/gtk \
|
||||
use/x11/wmaker
|
||||
distro/regular-wmaker: distro/.regular-sysv-gtk use/x11/wmaker \
|
||||
use/syslinux/ui/gfxboot use/efi/refind
|
||||
@$(call add,LIVE_PACKAGES,livecd-install-wmaker)
|
||||
@$(call add,LIVE_PACKAGES,xxkb)
|
||||
@$(call add,MAIN_PACKAGES,wmgtemp wmhdaps wmpomme wmxkbru)
|
||||
|
||||
ifeq (i586,$(ARCH))
|
||||
distro/regular-gnustep: distro/regular-wmaker use/x11/gnustep +plymouth
|
||||
@$(call add,THE_BRANDING,graphics)
|
||||
else
|
||||
distro/regular-gnustep:
|
||||
$(error $@ is known buggy on non-i586 at the moment)
|
||||
endif
|
||||
|
||||
distro/regular-xfce: distro/.regular-gtk use/x11/xfce; @:
|
||||
distro/regular-xfce: distro/.regular-gtk use/x11/xfce +nm; @:
|
||||
|
||||
distro/regular-lxde: distro/.regular-gtk use/x11/lxde use/fonts/infinality
|
||||
@$(call add,LIVE_LISTS,$(call tags,desktop nm))
|
||||
distro/regular-lxde: distro/.regular-gtk use/x11/lxde use/fonts/infinality +nm
|
||||
@$(call add,LIVE_LISTS,$(call tags,desktop gvfs))
|
||||
|
||||
distro/regular-xmonad: distro/.regular-gtk use/x11/xmonad
|
||||
@$(call add,LIVE_PACKAGES,livecd-regular-xmonad)
|
||||
|
||||
distro/regular-mate: distro/.regular-gtk
|
||||
@$(call add,LIVE_LISTS,$(call tags,(desktop || mobile) && (mate || nm)))
|
||||
distro/regular-mate: distro/.regular-gtk use/x11/mate +nm
|
||||
@$(call add,LIVE_LISTS,$(call tags,mobile mate))
|
||||
|
||||
distro/regular-e17: distro/.regular-gtk use/x11/e17 use/fonts/infinality
|
||||
@$(call add,LIVE_PACKAGES,xterm)
|
||||
@@ -59,12 +83,18 @@ distro/regular-cinnamon: distro/.regular-gtk \
|
||||
|
||||
distro/regular-gnome3: distro/.regular-desktop use/x11/gnome3 +plymouth; @:
|
||||
|
||||
distro/regular-tde: distro/.regular-desktop +tde +plymouth
|
||||
@$(call add,LIVE_LISTS,$(call tags,desktop nm))
|
||||
@$(call add,LIVE_PACKAGES,kdegames kdeedu)
|
||||
# reusable bits
|
||||
mixin/regular-tde: use/syslinux/ui/gfxboot +tde +plymouth
|
||||
@$(call add,THE_PACKAGES,kdegames kdeedu)
|
||||
@$(call add,THE_LISTS,openscada)
|
||||
|
||||
distro/regular-tde: distro/.regular-desktop mixin/regular-tde +nm; @:
|
||||
|
||||
distro/regular-tde-sysv: distro/.regular-sysv mixin/regular-tde \
|
||||
use/net-eth/dhcp use/efi/refind; @:
|
||||
|
||||
distro/regular-kde4: distro/.regular-desktop use/x11/kde4 use/x11/kdm4 \
|
||||
use/fonts/zerg +plymouth
|
||||
use/fonts/zerg +pulse +plymouth
|
||||
@$(call add,LIVE_LISTS,$(call tags,regular kde4))
|
||||
|
||||
distro/regular-razorqt: distro/.regular-desktop +razorqt +plymouth; @:
|
||||
@@ -72,11 +102,17 @@ distro/regular-razorqt: distro/.regular-desktop +razorqt +plymouth; @:
|
||||
distro/regular-sugar: distro/.regular-gtk use/x11/sugar; @:
|
||||
|
||||
distro/regular-rescue: distro/.regular-bare use/rescue/rw \
|
||||
use/syslinux/ui/menu use/hdt use/efi/refind
|
||||
use/syslinux/ui/menu use/hdt use/efi/refind use/efi/shell
|
||||
@$(call set,KFLAVOURS,un-def)
|
||||
@$(call add,RESCUE_PACKAGES,gpm)
|
||||
|
||||
distro/regular-server: distro/.regular-bare +installer \
|
||||
use/bootloader/grub use/firmware use/server/mini
|
||||
distro/regular-sysv-tde: distro/.regular-install-x11 \
|
||||
mixin/desktop-installer mixin/regular-tde use/branding/complete \
|
||||
use/net-eth/dhcp use/install2/fs use/efi/refind; @:
|
||||
|
||||
distro/regular-server: distro/.regular-install \
|
||||
use/install2/fs use/server/mini
|
||||
@$(call add,THE_LISTS,$(call tags,(base || server) && regular))
|
||||
@$(call set,INSTALLER,altlinux-server)
|
||||
|
||||
endif
|
||||
|
@@ -6,7 +6,7 @@ ifeq (distro,$(IMAGE_CLASS))
|
||||
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @:
|
||||
distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @:
|
||||
|
||||
distro/live-systemd: distro/.base use/live/base use/systemd; @:
|
||||
distro/live-systemd: distro/.base use/live/base +systemd; @:
|
||||
distro/live-plymouth: distro/.live-base use/plymouth/live; @:
|
||||
|
||||
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
|
||||
@@ -26,7 +26,7 @@ distro/razorqt-kz: distro/regular-razorqt
|
||||
@$(call set,GLOBAL_BOOT_LANG,kk_KZ)
|
||||
@$(call add,LIVE_PACKAGES,hunspell-kk)
|
||||
|
||||
distro/server-systemd: distro/server-mini use/systemd
|
||||
distro/server-systemd: distro/server-mini +systemd
|
||||
@$(call set,KFLAVOURS,std-def)
|
||||
|
||||
distro/server-test: distro/server-mini use/relname
|
||||
@@ -42,9 +42,8 @@ distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
|
||||
@$(call add,SYSLINUX_CFG,netinstall2)
|
||||
|
||||
distro/desktop-luks: distro/icewm use/luks; @:
|
||||
distro/desktop-systemd: distro/icewm use/systemd; @:
|
||||
distro/desktop-systemd: distro/icewm +systemd; @:
|
||||
distro/desktop-plymouth: distro/icewm +plymouth; @:
|
||||
distro/live-mate-systemd: distro/live-mate use/systemd use/live/install; @:
|
||||
distro/server-efi: distro/server-mini use/efi/debug; @:
|
||||
|
||||
endif # IMAGE_CLASS: distro
|
||||
@@ -73,9 +72,8 @@ endif # IMAGE_CLASS: ve
|
||||
|
||||
ifeq (vm,$(IMAGE_CLASS))
|
||||
|
||||
vm/net-static: vm/bare use/vm-net/static use/vm-ssh
|
||||
@$(call set,VM_NET_IPV4ADDR,10.0.2.16/24)
|
||||
@$(call set,VM_NET_IPV4GW,10.0.2.2)
|
||||
vm/net-static: vm/bare use/net-eth use/net-ssh
|
||||
@$(call add,NET_ETH,eth0:static:10.0.2.16/24:10.0.2.2)
|
||||
|
||||
endif # IMAGE_CLASS: vm
|
||||
|
||||
|
27
conf.d/ve.mk
Normal file
27
conf.d/ve.mk
Normal file
@@ -0,0 +1,27 @@
|
||||
ifeq (ve,$(IMAGE_CLASS))
|
||||
|
||||
# no "vzctl enter"
|
||||
ve/bare: ve/.base use/init/sysv; @:
|
||||
|
||||
# /dev/pty and friends start here
|
||||
ve/base: ve/bare
|
||||
@$(call add,BASE_PACKAGES,interactivesystem)
|
||||
|
||||
# a particular package list
|
||||
ve/ldv: ve/bare
|
||||
@$(call add,BASE_PACKAGES,xz bzip2 glibc hostinfo less)
|
||||
@$(call add,BASE_PACKAGES,vim-console netlist rsync time)
|
||||
@$(call add,BASE_PACKAGES,openssh-blacklist openssh-server)
|
||||
@$(call add,BASE_PACKAGES,shadow-edit shadow-groups)
|
||||
|
||||
# this should be more or less convenient
|
||||
ve/generic: ve/base use/repo
|
||||
@$(call add,BASE_PACKAGES,vim-console etckeeper)
|
||||
@$(call add,BASE_LISTS,openssh \
|
||||
$(call tags,base && (server || network || security || pkg)))
|
||||
|
||||
# example of service-specific template
|
||||
ve/openvpn: ve/bare
|
||||
@$(call add,BASE_LISTS,$(call tags,server openvpn))
|
||||
|
||||
endif
|
@@ -1,9 +1,14 @@
|
||||
# virtual machines
|
||||
ifeq (vm,$(IMAGE_CLASS))
|
||||
|
||||
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh; @:
|
||||
vm/bare: vm/.bare
|
||||
@$(call add,BASE_PACKAGES,apt)
|
||||
|
||||
vm/net: vm/bare use/net-eth/dhcp use/net-ssh
|
||||
@$(call add,BASE_PACKAGES,su)
|
||||
|
||||
# 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 use/repo use/deflogin/altlinuxroot \
|
||||
use/x11/xorg use/x11/lightdm/gtk use/x11-autologin +icewm; @:
|
||||
|
||||
endif
|
||||
|
@@ -17,11 +17,11 @@ mkimage-profiles, или _m-p_ — результат осмысления и о
|
||||
*Средства*
|
||||
|
||||
Двухуровневость:
|
||||
метапрофиль более объёмен и сложен, но выгоден для долгосрочной разработки
|
||||
сгенерированный дистрибутивный профиль более легко обозрим и модифицируем как одноразовый форк
|
||||
наследственность на уровне индивидуальных особенностей и образов в целом
|
||||
прозрачность и диагностируемость формирования конфигурации
|
||||
документированность
|
||||
* метапрофиль более объёмен и сложен, но выгоден для долгосрочной разработки
|
||||
* сгенерированный дистрибутивный профиль более легко обозрим и модифицируем как одноразовый форк
|
||||
* наследственность на уровне индивидуальных особенностей и образов в целом
|
||||
* прозрачность и диагностируемость формирования конфигурации
|
||||
* документированность
|
||||
|
||||
*Примеры использования*
|
||||
|
||||
|
@@ -47,7 +47,7 @@
|
||||
** экономия RAM+swap при сборке в tmpfs, иначе места на диске
|
||||
** очистка рабочего каталога после успешной сборки очередной стадии
|
||||
** может помешать использовать некоторые варианты отладки
|
||||
** значение: любая строка; по умолчанию пусто при DEBUG, иначе 1
|
||||
** значение: пусто, 0, 1, 2; по умолчанию пусто при DEBUG, иначе 1
|
||||
** см. ../lib/clean.mk
|
||||
|
||||
* DEBUG
|
||||
@@ -109,7 +109,7 @@
|
||||
* VM_SIZE
|
||||
** задаёт размер несжатого образа виртуальной машины в байтах
|
||||
** значение: пусто (по умолчанию двойной размер чрута) или целое
|
||||
** см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2vm
|
||||
** см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2fs
|
||||
|
||||
[float]
|
||||
=== пример ===
|
||||
|
@@ -14,14 +14,14 @@
|
||||
** THE_KMODULES, BASE_KMODULES, MAIN_KMODULES, BASE_KMODULES_REGEXP
|
||||
*** KFLAVOURS
|
||||
|
||||
* stage2: общая часть installer, live, rescue
|
||||
* stage2: общая часть install2, live, rescue
|
||||
** sub.in/stage2/Makefile, features.in/\*/stage2/lib/*.mk
|
||||
** SYSTEM_PACKAGES, STAGE2_PACKAGES
|
||||
** STAGE1_KMODULES, STAGE1_KMODULES_REGEXP,
|
||||
STAGE2_KMODULES, STAGE2_KMODULES_REGEXP
|
||||
*** STAGE1_KFLAVOUR или последний из KFLAVOURS
|
||||
|
||||
* installer: компактная "живая" система, содержащая только инсталятор
|
||||
* install2: компактная "живая" система, содержащая только инсталятор
|
||||
** см. stage2
|
||||
*** features.in/install2/install2/stage2cfg.mk,
|
||||
features.in/\*/install2/lib/*.mk
|
||||
|
11
doc/vm.txt
11
doc/vm.txt
@@ -2,14 +2,14 @@
|
||||
|
||||
*ВНИМАНИЕ:* заключительная операция создания образа жёсткого диска
|
||||
из архива с содержимым корневой файловой системы требует доступа
|
||||
к sudo и разрешения на выполнение скрипта bin/tar2vm в корневом
|
||||
к sudo и разрешения на выполнение скрипта bin/tar2fs в корневом
|
||||
каталоге метапрофиля при установке mkimage-profiles из пакета
|
||||
(это в планах исправить, но подход к libguestfs пока успехом
|
||||
не увенчался).
|
||||
|
||||
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
|
||||
|
||||
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2vm
|
||||
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2fs
|
||||
|
||||
При работе с локальной копией mkimage-profiles.git следует иметь
|
||||
в виду, что предоставлять недоверенному пользователю право выполнять
|
||||
@@ -25,3 +25,10 @@
|
||||
Пример сборки и запуска VM:
|
||||
|
||||
$ make ROOTPW=reallysecret1 vm/bare.img && kvm -hda ~/out/bare.img
|
||||
|
||||
Если при сборке образа файловой системы произойдёт сбой, может оказаться
|
||||
нужным вручную освободить используемые loop-устройства, например, так:
|
||||
|
||||
# losetup -a
|
||||
# kpartx -d /dev/loop0
|
||||
# losetup -d /dev/loop0
|
||||
|
@@ -8,6 +8,6 @@
|
||||
#
|
||||
# for somewhat more involved example, see syslinux feature
|
||||
|
||||
use/00example: sub/main use/anotherfeature
|
||||
use/00example: use/repo/main use/anotherfeature
|
||||
@$(call add_feature)
|
||||
@$(call add,MAIN_PACKAGES,hello)
|
||||
|
@@ -36,8 +36,8 @@ include $(BUILDDIR)/distcfg.mk
|
||||
|
||||
# first rsync what's static, and make backups (*~) --
|
||||
# these might signal of file clashes (or plain dirt);
|
||||
# second, care for toplevel and tagged script dirs;
|
||||
# then handle two more ways of implementing a feature
|
||||
# second, care for toplevel dirs;
|
||||
# then handle feature generator scripts
|
||||
#
|
||||
# NB: some subprofiles will be specified as "src/dst"
|
||||
# -- then both src/ and dst/ can hold the addons;
|
||||
@@ -58,6 +58,11 @@ prep:
|
||||
fi
|
||||
|
||||
# feat
|
||||
# NB: this is somewhat complicated since it has to handle "$sub" like:
|
||||
# - "/": copy feature's toplevel parts to the BUILDDIR toplevel
|
||||
# - "stage1": copy feature's stage1 parts into stage1 subprofile
|
||||
# - "stage2@live": copy feature's stage2 parts into live subprofile
|
||||
# - "rootfs@/": copy feature's rootfs parts into BUILDDIR toplevel
|
||||
$(FEATURES):
|
||||
@feat=$@; \
|
||||
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
||||
@@ -71,6 +76,13 @@ $(FEATURES):
|
||||
else \
|
||||
src="$${sub%@*}"; \
|
||||
dst="$${sub#*@}"; \
|
||||
if [ "$$src" = / ]; then \
|
||||
echo "** src=/: you don't want this" >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ "$$dst" = / -o "$$dst" = "" ]; then \
|
||||
dst="."; \
|
||||
fi; \
|
||||
srcdirs=; \
|
||||
if [ -d "$$src" ]; then \
|
||||
srcdirs="$$src"; \
|
||||
@@ -78,9 +90,9 @@ $(FEATURES):
|
||||
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
|
||||
srcdirs="$${srcdirs:+$$srcdirs }$$dst"; \
|
||||
fi; \
|
||||
: "why this overduplication was done? (still needed)"; \
|
||||
for srcdir in $$srcdirs; do \
|
||||
rsync -qab --exclude tagged \
|
||||
"$$srcdir/" "$(BUILDDIR)/$$dst/"; \
|
||||
rsync -qab "$$srcdir/" "$(BUILDDIR)/$$dst/"; \
|
||||
done; \
|
||||
fi; \
|
||||
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
||||
@@ -98,7 +110,7 @@ $(FEATURES):
|
||||
done; \
|
||||
popd >&/dev/null; \
|
||||
done; \
|
||||
if [ -n "$$dst" ]; then \
|
||||
if [ -n "$$dst" -a "$$dst" != "." ]; then \
|
||||
the="$$sub subprofile"; \
|
||||
else \
|
||||
the="toplevel"; \
|
||||
|
1
features.in/armh-cubox/README
Normal file
1
features.in/armh-cubox/README
Normal file
@@ -0,0 +1 @@
|
||||
Поддержка SolidRun Cubox в расчёте на подключенный по HDMI дисплей FullHD.
|
3
features.in/armh-cubox/config.mk
Normal file
3
features.in/armh-cubox/config.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
use/armh-cubox: use/armh
|
||||
@$(call add_feature)
|
||||
@$(call set,KFLAVOURS,cubox)
|
19
features.in/armh-cubox/rootfs/image-scripts.d/40-boot
Executable file
19
features.in/armh-cubox/rootfs/image-scripts.d/40-boot
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /boot
|
||||
|
||||
# 1920x1080 version of the boot script
|
||||
cat > /boot/boot << EOF
|
||||
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p2 ro video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 vmalloc=128M panic=3'
|
||||
ext2load mmc 0:1 2000000 uimage
|
||||
ext2load mmc 0:1 2800000 uinitrd
|
||||
bootm 2000000 2800000
|
||||
EOF
|
||||
|
||||
# 1280x720 version of the boot script (not used at the moment)
|
||||
cat > /boot/boot.720 << EOF
|
||||
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p2 ro video=dovefb:lcd0:1280x720-24@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 vmalloc=128M panic=3'
|
||||
ext2load mmc 0:1 2000000 uimage
|
||||
ext2load mmc 0:1 2800000 uinitrd
|
||||
bootm 2000000 2800000
|
||||
EOF
|
1
features.in/armh-dovefb/README
Normal file
1
features.in/armh-dovefb/README
Normal file
@@ -0,0 +1 @@
|
||||
Эта фича обеспечивает начальное конфигурирование Marvell Dove GPU.
|
3
features.in/armh-dovefb/config.mk
Normal file
3
features.in/armh-dovefb/config.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
use/armh-dovefb: use/armh
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_PACKAGES,xorg-drv-dovefb)
|
106
features.in/armh-dovefb/rootfs/image-scripts.d/90-armh-dovefb.sh
Executable file
106
features.in/armh-dovefb/rootfs/image-scripts.d/90-armh-dovefb.sh
Executable file
@@ -0,0 +1,106 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /etc/udev/rules.d
|
||||
cd /etc/udev/rules.d
|
||||
|
||||
cat > 99-bmm.rules << EOF
|
||||
KERNEL=="bmm|bmm[0-9]", GROUP="xgrp", MODE="0660"
|
||||
EOF
|
||||
|
||||
cat > 99-fb.rules << EOF
|
||||
KERNEL=="fb|fb[0-9]", GROUP="xgrp", MODE="0660"
|
||||
EOF
|
||||
|
||||
cat > 99-galcore.rules << EOF
|
||||
KERNEL=="galcore|galcore[0-9]", GROUP="xgrp", MODE="0660"
|
||||
EOF
|
||||
|
||||
cat > 99-uio.rules << EOF
|
||||
KERNEL=="uio|uio[0-9]", GROUP="xgrp", MODE="0660"
|
||||
EOF
|
||||
|
||||
mkdir -p /etc/X11
|
||||
cd /etc/X11
|
||||
|
||||
cat > xorg.conf.720 << EOF
|
||||
Section "Device"
|
||||
Identifier "Videocard0"
|
||||
Driver "dovefb"
|
||||
# Option "ExaAccel" "on"
|
||||
Option "Solid" "on"
|
||||
Option "Copy" "on"
|
||||
Option "Composite" "on"
|
||||
Option "Commit" "on"
|
||||
Option "XvAccel" "on"
|
||||
Option "UseGPU" "on"
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
Identifier "LCD0"
|
||||
Option "PreferredMode" "1280x720"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Screen 0"
|
||||
Device "Videocard0"
|
||||
Monitor "LCD0"
|
||||
DefaultDepth 24
|
||||
DefaultFbBpp 24
|
||||
SubSection "Display"
|
||||
Depth 24
|
||||
Modes "1280x720"
|
||||
EndSubSection
|
||||
EndSection
|
||||
|
||||
Section "ServerLayout"
|
||||
Identifier "Main Layout"
|
||||
Screen 0 "Screen 0"
|
||||
EndSection
|
||||
EOF
|
||||
|
||||
cat > xorg.conf.1080 << EOF
|
||||
Section "Device"
|
||||
Identifier "Videocard0"
|
||||
Driver "dovefb"
|
||||
# Option "ExaAccel" "on"
|
||||
Option "Solid" "on"
|
||||
Option "Copy" "on"
|
||||
Option "Composite" "on"
|
||||
Option "Commit" "on"
|
||||
Option "XvAccel" "on"
|
||||
Option "UseGPU" "on"
|
||||
#Option "Debug" "on"
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
Identifier "LCD0"
|
||||
Option "PreferredMode" "1920x1080"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Screen 0"
|
||||
Device "Videocard0"
|
||||
Monitor "LCD0"
|
||||
DefaultDepth 16
|
||||
DefaultFbBpp 16
|
||||
SubSection "Display"
|
||||
Depth 16
|
||||
Modes "1920x1080@60"
|
||||
EndSubSection
|
||||
SubSection "Display"
|
||||
Depth 24
|
||||
Modes "1920x1080@60"
|
||||
EndSubSection
|
||||
SubSection "Display"
|
||||
Depth 32
|
||||
Modes "800x600@60"
|
||||
EndSubSection
|
||||
EndSection
|
||||
|
||||
Section "ServerLayout"
|
||||
Identifier "Main Layout"
|
||||
Screen 0 "Screen 0"
|
||||
EndSection
|
||||
EOF
|
||||
|
||||
ln -s xorg.conf.1080 xorg.conf
|
1
features.in/armh-nexus7/README
Normal file
1
features.in/armh-nexus7/README
Normal file
@@ -0,0 +1 @@
|
||||
Эта фича конфигурирует специфические для Google/ASUS Nexus7 аспекты.
|
2
features.in/armh-nexus7/config.mk
Normal file
2
features.in/armh-nexus7/config.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
use/armh-nexus7:
|
||||
@$(call add_feature)
|
172
features.in/armh-nexus7/rootfs/image-scripts.d/90-armh-nexus7.sh
Executable file
172
features.in/armh-nexus7/rootfs/image-scripts.d/90-armh-nexus7.sh
Executable file
@@ -0,0 +1,172 @@
|
||||
#!/bin/sh
|
||||
|
||||
# FIXME: the exact partition may vary
|
||||
cat >> /etc/fstab << EOF
|
||||
# YMMV, this might be /dev/mmcblk0p10 either
|
||||
/dev/mmcblk0p9 / ext4 defaults 1 1
|
||||
EOF
|
||||
|
||||
cd /etc/udev/rules.d || exit 1
|
||||
|
||||
cat > 90-tegra-rt5640.rules << EOF
|
||||
SUBSYSTEM!="sound", GOTO="tegra_rt5640_end"
|
||||
ACTION!="change", GOTO="tegra_rt5640_end"
|
||||
KERNEL!="card*", GOTO="tegra_rt5640_end"
|
||||
|
||||
ATTRS{id}=="tegrart5640", ENV{PULSE_PROFILE_SET}="tegra-nexus7.conf"
|
||||
|
||||
LABEL="tegra_rt5640_end"
|
||||
EOF
|
||||
|
||||
cd /usr/share/pulseaudio/alsa-mixer/profile-sets || exit 1
|
||||
cat > tegra-nexus7.conf << EOF
|
||||
[General]
|
||||
auto-profiles = yes
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f hw:%f plughw:%f
|
||||
channel-map = left,right
|
||||
paths-output = tegra-nexus7-speaker tegra-nexus7-headphone
|
||||
paths-input = tegra-nexus7-intmic
|
||||
priority = 10
|
||||
EOF
|
||||
|
||||
cd /etc/X11 || exit 1
|
||||
cat > xorg.conf << EOF
|
||||
Section "Device"
|
||||
Identifier "nexus"
|
||||
Driver "tegra"
|
||||
EndSection
|
||||
EOF
|
||||
|
||||
cd /etc/X11/xorg.conf.d || exit 1
|
||||
cat > 99-nexus-calibration.conf << EOF
|
||||
Section "InputClass"
|
||||
Identifier "Nexus 7 Touchscreen"
|
||||
MatchIsTouchscreen "on"
|
||||
MatchProduct "elan-touchscreen"
|
||||
MatchDevicePath "/dev/input/event*"
|
||||
MatchDriver "evdev"
|
||||
# Option "Calibration" "29 2125 106 1356"
|
||||
# Option "SwapAxes" "0"
|
||||
# Option "Calibration" "566 1201 1025 2075"
|
||||
# Option "SwapAxes" "1"
|
||||
Option "Calibration" "6 2132 29 1294"
|
||||
Option "SwapAxes" "0"
|
||||
EndSection
|
||||
EOF
|
||||
|
||||
cat > 99-nexus-rotation.conf << EOF
|
||||
Section "Monitor"
|
||||
Identifier "Monitor"
|
||||
Option "Rotate" "right"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Screen"
|
||||
Monitor "Monitor"
|
||||
EndSection
|
||||
EOF
|
||||
|
||||
cd /usr/share/pulseaudio/alsa-mixer/paths || exit 1
|
||||
cat > tegra-nexus7-headphone.conf << EOF
|
||||
[General]
|
||||
priority = 90
|
||||
name = analog-output-headphones
|
||||
|
||||
[Jack HP-detect]
|
||||
state.plugged = yes
|
||||
|
||||
[Element Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element HP]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Headphone Jack]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Int Spk]
|
||||
switch = off
|
||||
|
||||
; Due to a kernel bug (?) the "Int Mic" is a playback control.
|
||||
; Therefore we enable it here instead of in the proper place
|
||||
[Element Int Mic]
|
||||
switch = on
|
||||
|
||||
EOF
|
||||
|
||||
cat > tegra-nexus7-intmic.conf << EOF
|
||||
[General]
|
||||
priority = 90
|
||||
name = analog-input-microphone-internal
|
||||
|
||||
[Element ADC]
|
||||
; For some reason the ADC volume seems not to be affecting input gain
|
||||
switch = mute
|
||||
volume = zero
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element ADC Boost Gain]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Int Mic]
|
||||
switch = mute
|
||||
|
||||
[Element DMIC]
|
||||
enumeration = select
|
||||
|
||||
[Option DMIC:DMIC1]
|
||||
priority = 89
|
||||
name = analog-input-internal-microphone
|
||||
|
||||
EOF
|
||||
|
||||
cat > tegra-nexus7-speaker.conf << EOF
|
||||
[General]
|
||||
priority = 100
|
||||
name = analog-output-speaker
|
||||
|
||||
[Jack HP-detect]
|
||||
state.plugged = no
|
||||
state.unplugged = unknown
|
||||
|
||||
[Element Master]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Speaker]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Int Spk]
|
||||
switch = mute
|
||||
volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
[Element Headphone Jack]
|
||||
switch = off
|
||||
|
||||
; Due to a kernel bug (?) the "Int Mic" is a playback control.
|
||||
; Therefore we enable it here instead of in the proper place
|
||||
[Element Int Mic]
|
||||
switch = on
|
||||
EOF
|
1
features.in/armh-tegra3/README
Normal file
1
features.in/armh-tegra3/README
Normal file
@@ -0,0 +1 @@
|
||||
Эта фича предназначена для базовой поддержки систем на чипсете NVIDIA Tegra3.
|
2
features.in/armh-tegra3/config.mk
Normal file
2
features.in/armh-tegra3/config.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
use/armh-tegra3:
|
||||
@$(call add_feature)
|
28
features.in/armh-tegra3/rootfs/image-scripts.d/90-armh-tegra3.sh
Executable file
28
features.in/armh-tegra3/rootfs/image-scripts.d/90-armh-tegra3.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /etc/udev/rules.d || exit 1
|
||||
|
||||
cat > 69-tegra-gpu.rules << EOF
|
||||
# Set the right permissions to the devices provided by the
|
||||
# tegra driver
|
||||
ENV{ACL_MANAGE}=="0", GOTO="tegra_gpu_end"
|
||||
ACTION!="add|change", GOTO="tegra_gpu_end"
|
||||
|
||||
# root only devices
|
||||
KERNEL=="knvrm" OWNER="root" GROUP="root" MODE="0660"
|
||||
KERNEL=="knvmap" OWNER="root" GROUP="root" MODE="0660"
|
||||
|
||||
# graphics devices
|
||||
ACTION=="add|change", KERNEL=="nvhost*", GROUP="xgrp", MODE="0660"
|
||||
ACTION=="add|change", KERNEL=="nvmap*", GROUP="xgrp", MODE="0660"
|
||||
ACTION=="add|change", KERNEL=="tegra*", GROUP="xgrp", MODE="0660"
|
||||
ACTION=="add|change", KERNEL=="nvram", GROUP="xgrp", MODE="0660"
|
||||
ACTION=="add|change", KERNEL=="nvhdcp*", GROUP="xgrp", MODE="0660"
|
||||
|
||||
LABEL="tegra_gpu_end"
|
||||
EOF
|
||||
|
||||
# FIXME: xgrp is a kludge
|
||||
cat > 69-tegra-touchscreen.rules << EOF
|
||||
SUBSYSTEM=="input",ACTION=="add|change",KERNEL=="event*",ATTRS{name}=="elan-touchscreen", SYMLINK+="twofingtouch", MODE="0660", GROUP="xgrp"
|
||||
EOF
|
2
features.in/armh/README
Normal file
2
features.in/armh/README
Normal file
@@ -0,0 +1,2 @@
|
||||
Эта фича занимается тем подмножеством необходимой для ARM-образов
|
||||
функциональности, которую получается как-то обобщить.
|
2
features.in/armh/config.mk
Normal file
2
features.in/armh/config.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
use/armh: use/control/sudo-su
|
||||
@$(call add_feature)
|
2
features.in/armh/rootfs/image-scripts.d/40-noclock.sh
Executable file
2
features.in/armh/rootfs/image-scripts.d/40-noclock.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo 'HWCLOCK_SET_TIME_AT_START=false' >> /etc/sysconfig/clock
|
48
features.in/armh/rootfs/image-scripts.d/50-initrd
Executable file
48
features.in/armh/rootfs/image-scripts.d/50-initrd
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
kver="$(rpm -qa 'kernel-image*' \
|
||||
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
|
||||
| sort -n \
|
||||
| tail -n 1 \
|
||||
| cut -f 2 -d ' ' \
|
||||
| sed 's/kernel-image-//')"
|
||||
|
||||
[ -h /boot/vmlinuz ] || ln -s vmlinuz-$kver /boot/vmlinuz
|
||||
[ -h /boot/initrd.img ] || ln -s initrd-$kver.img /boot/initrd.img
|
||||
|
||||
# NB: mkinitrd-3.0.16+ has rootsubdir support which is critical
|
||||
# for TWRP based ARM "VE" chroots (e.g. for nexus7);
|
||||
# should be implemented in make-initrd either
|
||||
|
||||
### rootfs type should become configurable
|
||||
if rpm -q mkinitrd; then
|
||||
mkinitrd --with ext4 -f /boot/initrd-$kver.img "$kver"
|
||||
fi
|
||||
|
||||
# NB: if the adresses ever become different this "API" _will_ change
|
||||
# NB: initrd compression (-C) might change, armadaxp handles gzip
|
||||
umk() {
|
||||
[ $# = 4 ] || exit 1
|
||||
cd /boot
|
||||
umkimage \
|
||||
-A arm \
|
||||
-O linux \
|
||||
-T "$1" \
|
||||
-C none \
|
||||
-a "$2" \
|
||||
-e "$2" \
|
||||
-n "`readlink "$3"`" \
|
||||
-d "$3" \
|
||||
"$4"
|
||||
}
|
||||
|
||||
### the addresses will become variables some day probably
|
||||
if rpm -q uboot-tools; then
|
||||
umk kernel 0x00008000 vmlinuz uimage
|
||||
umk ramdisk 0x00800000 initrd.img uinitrd
|
||||
if [ -s boot ]; then
|
||||
umk script 0 boot boot.scr
|
||||
fi
|
||||
fi
|
||||
|
||||
:
|
40
features.in/armh/rootfs/image-scripts.d/50-network
Executable file
40
features.in/armh/rootfs/image-scripts.d/50-network
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Setup network settings
|
||||
# 1. Truncate /etc/resolv.conf
|
||||
# 2. Init /etc/hosts with "127.0.0.1 localhost"
|
||||
# 3. Set hostname, domainname
|
||||
# 4. Set defaults for NetworkManager.
|
||||
|
||||
|
||||
# REQUIRES
|
||||
#
|
||||
# Nothing
|
||||
|
||||
|
||||
# INFO
|
||||
# At startup time hostname may be changed by live-hostname package.
|
||||
|
||||
. shell-config
|
||||
|
||||
NAME="init3-network"
|
||||
|
||||
verbose()
|
||||
{
|
||||
if [ -n "$GLOBAL_VERBOSE" ]; then
|
||||
echo "HOOK: $NAME: $@"
|
||||
fi
|
||||
}
|
||||
|
||||
verbose "has started"
|
||||
|
||||
DOMAINNAME="localdomain"
|
||||
HOSTNAME="localhost.localdomain"
|
||||
|
||||
verbose "Init /etc/hosts with 127.0.0.1 localhost"
|
||||
echo "127.0.0.1 localhost localhost.localdomain" > /etc/hosts
|
||||
|
||||
verbose "Truncate /etc/resolv.conf"
|
||||
echo nameserver 8.8.8.8 >/etc/resolv.conf
|
7
features.in/armh/rootfs/image-scripts.d/91-unsigned-repo
Executable file
7
features.in/armh/rootfs/image-scripts.d/91-unsigned-repo
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Sisyphus/armh is not being signed as of June, 2013
|
||||
|
||||
repo_source='/etc/apt/sources.list.d/alt.list'
|
||||
[ -s "$repo_source" ] || exit 0
|
||||
|
||||
sed -i 's, \[alt\],,' "$repo_source" ||:
|
@@ -4,7 +4,7 @@
|
||||
# the last different one wins
|
||||
# - remember .base if adding yet another *_PACKAGES
|
||||
|
||||
use/bootloader: use/install2 sub/main
|
||||
use/bootloader:
|
||||
@$(call add_feature)
|
||||
@$(call add,BASE_PACKAGES,alterator-$$(BASE_BOOTLOADER))
|
||||
|
||||
|
6
features.in/bootloader/install2/image-scripts.d/00-check-bootloader
Executable file
6
features.in/bootloader/install2/image-scripts.d/00-check-bootloader
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$GLOBAL_BASE_BOOTLOADER" ]; then
|
||||
echo "** error: BASE_BOOTLOADER empty while bootloader feature requested" >&2
|
||||
exit 1
|
||||
fi
|
@@ -4,7 +4,7 @@ use/branding:
|
||||
|
||||
# NB: not every distro might have all the branding of its own
|
||||
use/branding/full: use/branding use/syslinux/ui/gfxboot
|
||||
@$(call add,THE_BRANDING,alterator bootsplash graphics)
|
||||
@$(call add,THE_BRANDING,alterator bootloader bootsplash graphics)
|
||||
@$(call add,THE_BRANDING,indexhtml notes slideshow)
|
||||
|
||||
use/branding/complete: use/branding/full use/plymouth/full
|
||||
|
@@ -1,7 +1,8 @@
|
||||
# step 4: build the distribution image
|
||||
|
||||
# take the latter part for complex-specified subprofiles like stage2@live
|
||||
SUBDIRS = $(SUBPROFILE_DIRS)
|
||||
# take the latter part for complex-specified subprofiles like stage2@live;
|
||||
# care to exclude non-directories holding no makefiles like rootfs
|
||||
SUBDIRS = $(sort $(dir $(wildcard $(addsuffix /Makefile,$(SUBPROFILE_DIRS)))))
|
||||
|
||||
# proxy over the ISO metadata collected; see also genisoimagerc(5)
|
||||
BOOT_SYSI := $(META_SYSTEM_ID)
|
||||
@@ -12,6 +13,7 @@ BOOT_VOLI := $(shell echo $(META_VOL_ID) | cut -c1-32)
|
||||
BOOT_VOLS := $(META_VOL_SET)
|
||||
BOOT_BIBL := $(META_BIBLIO)
|
||||
BOOT_ABST := $(META_ABSTRACT)
|
||||
DATE_F := $(shell date +%F)
|
||||
|
||||
BOOT_TYPE := isolinux
|
||||
|
||||
@@ -23,7 +25,7 @@ prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER)
|
||||
# can't use mp-showref which belongs to the metaprofile
|
||||
dot-disk:
|
||||
@mkdir -p files/.disk
|
||||
@echo "ALT Linux based" >files/.disk/info
|
||||
@echo "$(META_VOL_ID) $(DATE_F)" >files/.disk/info
|
||||
@echo "$(ARCH)" >files/.disk/arch
|
||||
@echo "$(DATE)" >files/.disk/date
|
||||
@if type -t git >&/dev/null; then \
|
||||
|
@@ -1,4 +1,5 @@
|
||||
Эта фича конфигурирует создание образа виртуального окружения (VE).
|
||||
Эта фича конфигурирует создание образа виртуального окружения (VE),
|
||||
что используется для сборки шаблонов OpenVZ и ARM-чрутов для TWRP.
|
||||
|
||||
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
|
||||
и тесно с ней связана.
|
||||
|
@@ -1,3 +1,3 @@
|
||||
# hooked from ../../lib/sugar.mk
|
||||
use/build-ve:
|
||||
use/build-ve: sub/rootfs@/
|
||||
@$(call add_feature)
|
||||
|
@@ -8,10 +8,14 @@ ifeq (cpio,$(IMAGE_PACKTYPE))
|
||||
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
|
||||
endif
|
||||
|
||||
IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
|
||||
# some VEs _can_ contain kernels (think ARM multiboot
|
||||
# but this can also help VE/VM hybrid images)
|
||||
IMAGE_PACKAGES = $(DOT_BASE) \
|
||||
$(SYSTEM_PACKAGES) \
|
||||
$(COMMON_PACKAGES) \
|
||||
$(BASE_PACKAGES)
|
||||
$(BASE_PACKAGES) \
|
||||
$(THE_PACKAGES) \
|
||||
$(call list,$(BASE_LISTS) $(THE_LISTS))
|
||||
|
||||
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
|
||||
postprocess $(GLOBAL_CLEAN_WORKDIR)
|
||||
|
@@ -1,4 +1,3 @@
|
||||
# hooked from ../../lib/sugar.mk
|
||||
use/build-vm:
|
||||
use/build-vm: sub/rootfs@/ use/kernel use/deflogin
|
||||
@$(call add_feature)
|
||||
@$(call xport,ROOTPW)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# copy tar2vm helper into generated profile to enable standalone builds
|
||||
# copy tar2fs helper into generated profile to enable standalone builds
|
||||
|
||||
all:
|
||||
@install -pD $(MKIMAGE_PROFILES)/bin/tar2vm $(BUILDDIR)/bin/tar2vm
|
||||
@install -pD $(MKIMAGE_PROFILES)/bin/tar2fs $(BUILDDIR)/bin/tar2fs
|
||||
|
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -n "$GLOBAL_ROOTPW" ]; then
|
||||
if type -t chpasswd >&/dev/null; then
|
||||
echo "root:$GLOBAL_ROOTPW" | chpasswd
|
||||
else
|
||||
echo "** warning: chpasswd binary missing" >&2
|
||||
fi
|
||||
else
|
||||
echo "** warning: no root password provided, you're on your own" >&2
|
||||
fi
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Run scripts from /etc/firsttime.d at first start
|
||||
[ -f "/var/lock/TMP_1ST" ] || touch "/var/lock/TMP_1ST"
|
@@ -1,19 +1,17 @@
|
||||
# step 4: build the virtual machine image
|
||||
|
||||
IMAGE_PACKAGES = $(SYSTEM_PACKAGES) \
|
||||
IMAGE_PACKAGES = $(DOT_BASE) \
|
||||
$(SYSTEM_PACKAGES) \
|
||||
$(COMMON_PACKAGES) \
|
||||
$(BASE_PACKAGES) \
|
||||
$(THE_PACKAGES) \
|
||||
$(call list,$(BASE_LISTS) $(THE_LISTS)) \
|
||||
$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))
|
||||
$(call list,$(BASE_LISTS) $(THE_LISTS))
|
||||
|
||||
# intermediate chroot archive
|
||||
VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar
|
||||
VM_RAWDISK := $(IMAGE_OUTDIR)/$(IMAGE_NAME).raw
|
||||
|
||||
ifeq (,$(ROOTPW))
|
||||
$(error please provide root password via ROOTPW)
|
||||
endif
|
||||
VM_FSTYPE ?= ext4
|
||||
VM_SIZE ?= 0
|
||||
|
||||
check-sudo:
|
||||
@if ! type -t sudo >&/dev/null; then \
|
||||
@@ -22,9 +20,9 @@ check-sudo:
|
||||
fi
|
||||
|
||||
prepare-image: check-sudo
|
||||
@if ! sudo $(TOPDIR)/bin/tar2vm \
|
||||
"$(VM_TARBALL)" "$(VM_RAWDISK)" $$VM_SIZE; then \
|
||||
echo "** error: sudo tar2vm failed, see also doc/vm.txt" >&2; \
|
||||
@if ! sudo $(TOPDIR)/bin/tar2fs \
|
||||
"$(VM_TARBALL)" "$(VM_RAWDISK)" $(VM_SIZE) $(VM_FSTYPE); then \
|
||||
echo "** error: sudo tar2fs failed, see also doc/vm.txt" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
@@ -43,7 +41,6 @@ convert-image: prepare-image
|
||||
fi
|
||||
|
||||
run-image-scripts: GLOBAL_CLEANUP_PACKAGES := $(CLEANUP_PACKAGES)
|
||||
run-image-scripts: GLOBAL_ROOTPW := $(ROOTPW)
|
||||
|
||||
# override
|
||||
pack-image: MKI_PACK_RESULTS := tar:$(VM_TARBALL)
|
||||
|
2
features.in/control/README
Normal file
2
features.in/control/README
Normal file
@@ -0,0 +1,2 @@
|
||||
Эта фича предоставляет интерфейс для конфигурирования дистрибутивных
|
||||
значений по умолчанию control(8); см. тж. http://altlinux.org/control
|
8
features.in/control/config.mk
Normal file
8
features.in/control/config.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
use/control:
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_PACKAGES,control)
|
||||
@$(call xport,CONTROL)
|
||||
|
||||
# some presets
|
||||
use/control/sudo-su: use/control
|
||||
@$(call add,CONTROL,su:public sudo:public)
|
11
features.in/control/rootfs/image-scripts.d/50-control
Executable file
11
features.in/control/rootfs/image-scripts.d/50-control
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# setup control(8) states
|
||||
|
||||
[ -z "$GLOBAL_CONTROL" ] ||
|
||||
echo "$GLOBAL_CONTROL" \
|
||||
| tr ' ' '\n' \
|
||||
| while IFS=':' read facility state; do
|
||||
[ -z "$facility" -o -z "$state" ] ||
|
||||
control "$facility" "$state"
|
||||
done
|
||||
:
|
4
features.in/deflogin/README
Normal file
4
features.in/deflogin/README
Normal file
@@ -0,0 +1,4 @@
|
||||
Эта фича конфигурирует root login и пользователей по умолчанию.
|
||||
|
||||
ВНИМАНИЕ: применяйте разумно, т.к. крайне легко создать и оставить
|
||||
дыру в безопасности!
|
29
features.in/deflogin/config.mk
Normal file
29
features.in/deflogin/config.mk
Normal file
@@ -0,0 +1,29 @@
|
||||
# WARNING: the variable values are stored in build config/log!
|
||||
use/deflogin:
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_PACKAGES,shadow-utils passwd)
|
||||
@$(call xport,ROOTPW)
|
||||
@$(call xport,USERS)
|
||||
@$(call xport,GROUPS)
|
||||
|
||||
# some presets
|
||||
# USERS variable chunk format is "login:passwd:admin:sudo"
|
||||
# GROUPS are just stashed there to include USERS logins created
|
||||
|
||||
# livecd: root and altlinux users with no password at all
|
||||
use/deflogin/empty: use/deflogin use/deflogin/altlinux
|
||||
@$(call set,ROOTPW,)
|
||||
@$(call add,USERS,altlinux::1:1)
|
||||
|
||||
# mostly used to allow access to videocard and desktop related hardware
|
||||
use/deflogin/xgrp: use/deflogin
|
||||
@$(call add,GROUPS,xgrp)
|
||||
|
||||
# appliances: "root:altlinux"; "altlinux:root" in "xgrp" group
|
||||
use/deflogin/altlinuxroot: use/deflogin/xgrp
|
||||
@$(call try,ROOTPW,altlinux)
|
||||
@$(call add,USERS,altlinux:root:1:1)
|
||||
|
||||
# could also be passed on the commandline
|
||||
use/deflogin/root: use/deflogin
|
||||
@$(call try,ROOTPW,altlinux)
|
10
features.in/deflogin/rootfs/image-scripts.d/50-root
Executable file
10
features.in/deflogin/rootfs/image-scripts.d/50-root
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# set root password if any; no-op if it is unset
|
||||
|
||||
test="${GLOBAL_ROOTPW=:unset}"
|
||||
|
||||
if [ "$test" = ":unset" ]; then
|
||||
echo "** warning: no root password provided, you're on your own" >&2
|
||||
else
|
||||
echo "$GLOBAL_ROOTPW" | passwd --stdin root
|
||||
fi
|
33
features.in/deflogin/rootfs/image-scripts.d/50-users
Executable file
33
features.in/deflogin/rootfs/image-scripts.d/50-users
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# add regular user(s) assigning passwords and attributes of power
|
||||
|
||||
# NB: care that the utilities exist; shadow-utils is warranted
|
||||
|
||||
add_user() {
|
||||
useradd -m "$1" &&
|
||||
usermod -p "" "$1" &&
|
||||
if [ -n "$GLOBAL_GROUPS" ]; then
|
||||
usermod -a --groups "${GLOBAL_GROUPS// /,}" "$1" # bashism
|
||||
fi ||
|
||||
echo "*** failed to add user '$1'"
|
||||
}
|
||||
|
||||
set_password() { echo "$1:$2" | chpasswd; }
|
||||
|
||||
set_admin() { usermod -a --groups "wheel" "$1"; }
|
||||
|
||||
set_sudo() {
|
||||
[ ! -w "/etc/sudoers" ] ||
|
||||
echo "$1 ALL=(ALL) ALL" >> "/etc/sudoers"
|
||||
}
|
||||
|
||||
# chpasswd is inteded for batch use but that would be less comprehensible
|
||||
[ -z "$GLOBAL_USERS" ] ||
|
||||
echo "$GLOBAL_USERS" \
|
||||
| tr ' ' '\n' \
|
||||
| while IFS=':' read login passwd admin sudo; do
|
||||
add_user "$login"
|
||||
[ -z "$passwd" ] || set_password "$login" "$passwd"
|
||||
[ -z "$admin" ] || set_admin "$login"
|
||||
[ -z "$sudo" ] || set_sudo "$login"
|
||||
done
|
@@ -1,6 +1,7 @@
|
||||
use/dev:
|
||||
use/dev: use/control
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_PACKAGES,git-core hasher gear)
|
||||
@$(call add,CONTROL,pam_mktemp:enabled)
|
||||
|
||||
use/dev/mkimage: use/dev
|
||||
@$(call add,THE_PACKAGES,mkimage shadow-change su)
|
||||
|
@@ -28,7 +28,6 @@ fi
|
||||
|
||||
# $TMP
|
||||
TMP="/tmp/.private/$USER"
|
||||
control pam_mktemp enabled
|
||||
sed -i '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
|
||||
echo "%_tmppath $TMP" >> "$HOME/.rpmmacros"
|
||||
|
||||
|
3
features.in/domain-client/README
Normal file
3
features.in/domain-client/README
Normal file
@@ -0,0 +1,3 @@
|
||||
Эта фича конфигурирует поддержку клиента домена ALT Linux.
|
||||
|
||||
NB: не проверена на инсталяторах!
|
4
features.in/domain-client/config.mk
Normal file
4
features.in/domain-client/config.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
use/domain-client: use/net/dhcp
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_LISTS,domain-client)
|
||||
@$(call add,DEFAULT_SERVICES_ENABLE,avahi-daemon)
|
10
features.in/domain-client/rootfs/image-scripts.d/70-network-shares-dhcpcd.sh
Executable file
10
features.in/domain-client/rootfs/image-scripts.d/70-network-shares-dhcpcd.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
dhcpcd_conf="/etc/dhcpcd.conf"
|
||||
|
||||
[ -f "$dhcpcd_conf" ] || exit 0
|
||||
|
||||
grep -q '^option[[:blank:]]\+vendor_encapsulated_options' "$dhcpcd_conf" || {
|
||||
echo "# added by 70-network-shares-dhcpcd.sh"
|
||||
echo "option vendor_encapsulated_options"
|
||||
} >> "$dhcpcd_conf"
|
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# bump name services caching time up
|
||||
|
||||
[ -s /etc/nscd.conf ] || exit 0
|
||||
|
||||
sed -i 's/\(positive-time-to-live[^0-9]*\)[0-9]*$/\1 31536000/g' /etc/nscd.conf
|
117
features.in/domain-client/rootfs/image-scripts.d/70-network-shares-samba.sh
Executable file
117
features.in/domain-client/rootfs/image-scripts.d/70-network-shares-samba.sh
Executable file
@@ -0,0 +1,117 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
##
|
||||
# This script:
|
||||
# 1) updates pam_mount configuration
|
||||
# 2) updates pam configuration
|
||||
#
|
||||
# NB: network shares automounted only for a particular uid range
|
||||
|
||||
. shell-error
|
||||
|
||||
msg() {
|
||||
printf "$* \n"
|
||||
}
|
||||
|
||||
pmconf="/etc/security/pam_mount.conf.xml"
|
||||
pamconf="/etc/pam.d/system-auth-krb5"
|
||||
|
||||
##
|
||||
# Update pam_mount configuration file
|
||||
#
|
||||
update_pmconf() {
|
||||
|
||||
local insert_at tmp_conf
|
||||
|
||||
tmp_conf="${pmconf}.new"
|
||||
|
||||
# no pam_mount: impossible(tm)
|
||||
[ -w "$pmconf" ] || return 1
|
||||
|
||||
# already configured
|
||||
grep -qs dnssd_lookup "$pmconf" 2>/dev/null && return 0
|
||||
|
||||
# configure pam_mount to use avahi
|
||||
insert_at="$(sed -n '/<!-- Volume definitions -->/=' "$pmconf" \
|
||||
| head -n 1)"
|
||||
|
||||
if [ -z "$insert_at" ]; then
|
||||
msg "Can't find position for injection in $pmconf"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# part 1 (head)
|
||||
head -n $((insert_at-1)) "$pmconf" > "$tmp_conf"
|
||||
|
||||
# part 2 (inserted text)
|
||||
cat >> "$tmp_conf" <<'__EOF__'
|
||||
|
||||
<!-- # inserted by 70-network-shares-samba.sh ##################### -->
|
||||
|
||||
<volume uid="5000-10000" fstype="cifs" dnssd_lookup="1" mountpoint="/home/%(USER)/share" options="sec=krb5,cruid=%(USERUID)" />
|
||||
<cifsmount>/sbin/mount.cifs //%(SERVER)/%(VOLUME) %(MNTPT) -o %(OPTIONS)</cifsmount>
|
||||
<cifsumount>/sbin/umount.cifs %(MNTPT)</cifsumount>
|
||||
|
||||
<!-- ############################################################## -->
|
||||
|
||||
__EOF__
|
||||
|
||||
# part 3 (tail)
|
||||
sed -n "$insert_at,\$p" "$pmconf" >> "$tmp_conf"
|
||||
|
||||
# update config
|
||||
chown root:root "$tmp_conf"
|
||||
chmod 644 "$tmp_conf"
|
||||
mv -f "$tmp_conf" "$pmconf"
|
||||
|
||||
# XXX: REMOVE FOR RELEASE
|
||||
# sed -i -e '/debug enable/ s/0/1/' "$pmconf"
|
||||
}
|
||||
|
||||
##
|
||||
# Update pam configuration
|
||||
#
|
||||
update_pam() {
|
||||
local append_after
|
||||
|
||||
# no pam-config: impossible(tm)
|
||||
[ -w "$pamconf" ] || return 1
|
||||
|
||||
if [ -L "$pamconf" ]; then
|
||||
pamconf="$(realpath "$pamconf")"
|
||||
fi
|
||||
|
||||
# already configured
|
||||
grep -qs pam_mount "$pamconf" && return 0
|
||||
|
||||
append_after="$(sed -n '/^auth[[:space:]]\+required/=' "$pamconf" \
|
||||
| tail -n 1)"
|
||||
[ -n "$append_after" ] &&
|
||||
sed -i \
|
||||
-e "$append_after a auth optional pam_mount.so" \
|
||||
"$pamconf"
|
||||
|
||||
append_after="$(sed -n '/^session[[:space:]]\+required/=' "$pamconf" \
|
||||
| tail -n 1)"
|
||||
[ -n "$append_after" ] &&
|
||||
sed -i \
|
||||
-e "$append_after a session optional pam_mount.so" \
|
||||
"$pamconf"
|
||||
append_after="$(sed -n '/^auth[[:space:]]\+required/=' \
|
||||
"$pamconf"_ccreds | tail -n 1)"
|
||||
|
||||
[ -n "$append_after" ] &&
|
||||
sed -i \
|
||||
-e "$append_after a auth optional pam_mount.so" \
|
||||
"$pamconf"_ccreds
|
||||
|
||||
### set ccache to predicadable value (ouch!)
|
||||
sed -i 's|pam_krb5.so use_first_pass$|pam_krb5.so use_first_pass ccache=/tmp/krb5cc_%u|' "$pamconf"
|
||||
}
|
||||
|
||||
##
|
||||
# Start
|
||||
#
|
||||
update_pmconf &&
|
||||
update_pam
|
||||
|
4
features.in/efi/rootfs/image-scripts.d/50-efi
Executable file
4
features.in/efi/rootfs/image-scripts.d/50-efi
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# see also https://bugzilla.altlinux.org/27970
|
||||
|
||||
grep -q efivars /etc/modules || echo efivars >> /etc/modules
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
# see also https://bugzilla.altlinux.org/27970
|
||||
|
||||
echo efivars >> /etc/modules
|
||||
grep -q efivars /etc/modules || echo efivars >> /etc/modules
|
||||
|
@@ -9,7 +9,6 @@ use/firmware:
|
||||
use/firmware/full: use/firmware/server use/firmware/laptop
|
||||
|
||||
use/firmware/cpu: use/firmware
|
||||
@$(call add,THE_PACKAGES,firmware-amd-ucode)
|
||||
@$(call add,THE_PACKAGES,microcode-data-intel microcode_ctl)
|
||||
|
||||
use/firmware/server: use/firmware
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Эта фича занимается конфигурированием подсистемы
|
||||
конфигурации шрифтов fontconfig (sic!); помимо
|
||||
возможности выставить желаемые кусочки вручную
|
||||
предлагаются и заранее заданные интегральные
|
||||
варианты, прошедшие обкатку в дистрибутивах.
|
||||
Эта фича позволяет системно конфигурировать файлы
|
||||
конфигурации подсистемы конфигурирования шрифтов
|
||||
fontconfig (sic!), заодно предоставляя прошедшие
|
||||
обкатку в дистрибутивах варианты предварительно
|
||||
заданной конфигурации для удобства.
|
||||
|
@@ -10,6 +10,6 @@ use/fonts/zerg: use/fonts
|
||||
@$(call set,FONT_FEATURES_DISABLE,no-antialias lcdfilter-none \
|
||||
unhinted no-sub-pixel)
|
||||
|
||||
# nothing configured to add_feature, let's skip that this time
|
||||
use/fonts/infinality:
|
||||
# nothing configured to add_feature but let's not skip that for consistency
|
||||
use/fonts/infinality: use/fonts
|
||||
@$(call add,THE_PACKAGES,libfreetype-infinality fontconfig-infinality)
|
||||
|
@@ -1,10 +1,7 @@
|
||||
use/homeros:
|
||||
use/homeros: use/control/sudo-su use/services
|
||||
@$(call add_feature)
|
||||
# @$(call set,BRANDING,simply-linux)
|
||||
# @$(call add,THE_BRANDING,menu xfce-settings)
|
||||
@$(call add,THE_LISTS,homeros/voiceman)
|
||||
@$(call add,THE_LISTS,homeros/homeros)
|
||||
@$(call add,THE_LISTS,homeros/tts)
|
||||
@$(call add,THE_LISTS,homeros/yasr)
|
||||
@$(call add,THE_LISTS,homeros/tools)
|
||||
# @$(call set,META_VOL_SET,Homeros)
|
||||
@$(call add,DEFAULT_SERVICES_ENABLE,sshd)
|
||||
|
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat <<EOF > /etc/rc.d/rc.local
|
||||
#!/bin/sh
|
||||
|
||||
amixer set Master 75%
|
||||
amixer set Master toggle
|
||||
amixer set PCM 75%
|
||||
amixer set PCM toggle
|
||||
|
||||
EOF
|
||||
|
||||
chmod 755 /etc/rc.d/rc.local
|
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
/bin/ln -s /etc/tts.d/rhvoice-en.voiceman /etc/voiceman.d/rhvoice-en.output
|
||||
/bin/ln -s /etc/tts.d/rhvoice.voiceman /etc/voiceman.d/rhvoice.output
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
chkconfig sshd on
|
@@ -2,5 +2,3 @@
|
||||
|
||||
mkdir -p /etc/sudo.d
|
||||
chmod 700 /etc/sudo.d
|
||||
control su public
|
||||
control sudo public
|
||||
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
chkconfig voiceman on
|
11
features.in/init/README
Normal file
11
features.in/init/README
Normal file
@@ -0,0 +1,11 @@
|
||||
Эта фича определяет систему инициализации, которая будет использована
|
||||
в пользовательской среде (livecd, установленный дистрибутив, vm).
|
||||
Она не влияет на состав инсталятора и rescue-образа.
|
||||
|
||||
Обратите внимание: как и с use/bootloader/%, в силу особенностей make
|
||||
переключение в каждую позицию возможно лишь один раз, далее эта цель
|
||||
считается достигнутой и при последующих вызовах не отрабатывает.
|
||||
|
||||
См. тж.:
|
||||
http://altlinux.org/sysvinit
|
||||
http://altlinux.org/systemd
|
17
features.in/init/config.mk
Normal file
17
features.in/init/config.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
+sysvinit: use/init/sysv; @:
|
||||
+systemd: use/init/systemd; @:
|
||||
|
||||
use/init:
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_LISTS,$$(INIT_TYPE))
|
||||
|
||||
# THE_LISTS is too late when BASE_PACKAGES have pulled in
|
||||
# the wrong syslogd-daemon provider already
|
||||
use/init/sysv: use/init
|
||||
@$(call set,INIT_TYPE,sysvinit)
|
||||
@$(call add,BASE_PACKAGES,syslogd)
|
||||
|
||||
### i-f should be dropped as soon as rootfs scripts are effective there
|
||||
use/init/systemd: use/init
|
||||
@$(call set,INIT_TYPE,systemd)
|
||||
@$(call add,BASE_PACKAGES,installer-feature-systemd-stage3)
|
25
features.in/init/rootfs/image-scripts.d/90-init
Executable file
25
features.in/init/rootfs/image-scripts.d/90-init
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
# the part below relates to systemd as init specifically
|
||||
rpm -q systemd-sysvinit || exit 0
|
||||
|
||||
# file str [str...]
|
||||
# NB: str is also treated as a regex,
|
||||
# be careful if you copy the function
|
||||
sub() {
|
||||
local file="$1"
|
||||
shift
|
||||
for i in "$@"; do
|
||||
grep -q "^$i" "$file" || echo "$i" >> "$file"
|
||||
done
|
||||
}
|
||||
|
||||
# tune make-initrd
|
||||
sub /etc/initrd.mk 'FEATURES += systemd' 'MODULES_PRELOAD += autofs4'
|
||||
|
||||
# don't allow systemd to set LANG (see also #27408)
|
||||
sub /etc/locale.conf 'LANG='
|
||||
|
||||
# aufs2 root is rw in reality; but don't bother if there's a record already
|
||||
grep -q '[[:space:]]/[[:space:]]' /etc/fstab ||
|
||||
sub /etc/fstab '/dev/root / auto defaults 0 0'
|
@@ -2,7 +2,8 @@
|
||||
|
||||
+installer: use/install2/full; @:
|
||||
|
||||
use/install2: use/stage2 sub/stage2@install2 use/metadata use/cleanup/installer
|
||||
use/install2: use/stage2 sub/stage2@install2 use/metadata \
|
||||
use/cleanup/installer use/bootloader
|
||||
@$(call add_feature)
|
||||
@$(call try,INSTALLER,altlinux-generic) # might be replaced later
|
||||
@$(call add,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
|
||||
@@ -12,7 +13,8 @@ use/install2: use/stage2 sub/stage2@install2 use/metadata use/cleanup/installer
|
||||
@$(call xport,BASE_BOOTLOADER)
|
||||
|
||||
# doesn't use/install2/fs on purpose (at least so far)
|
||||
use/install2/full: use/install2/packages use/install2/kms use/install2/kvm \
|
||||
use/install2/full: use/install2/packages use/install2/kms \
|
||||
use/install2/kvm use/install2/vbox \
|
||||
use/syslinux/localboot.cfg use/syslinux/ui/menu; @:
|
||||
|
||||
# stash local packages within installation media
|
||||
@@ -30,6 +32,10 @@ use/install2/kms: use/stage2/kms
|
||||
use/install2/kvm:
|
||||
@$(call add,INSTALL2_PACKAGES,spice-vdagent xorg-drv-qxl)
|
||||
|
||||
# virtualbox guest support for installer
|
||||
use/install2/vbox:
|
||||
@$(call add,STAGE1_KMODULES,virtualbox-addition)
|
||||
|
||||
# filesystems handling
|
||||
use/install2/fs: use/install2/xfs use/install2/jfs use/install2/reiserfs; @:
|
||||
|
||||
|
@@ -2,3 +2,8 @@
|
||||
специфическими для полноценного LiveCD настройками
|
||||
и скриптовыми хуками, а также создаёт файл index.html
|
||||
с домашней страницей (редиректором) в корне образа.
|
||||
|
||||
Графический вариант безусловно требует x11-autologin,
|
||||
при появлении необходимости обойтись без него можно
|
||||
временно продублировать содержимое цели и сообщить
|
||||
о таком случае.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
# copy stage2 as live
|
||||
# NB: starts to preconfigure but doesn't use/cleanup yet
|
||||
use/live: use/stage2 sub/stage2@live
|
||||
use/live: use/stage2 sub/rootfs@live sub/stage2@live
|
||||
@$(call add_feature)
|
||||
@$(call add,CLEANUP_PACKAGES,'installer*')
|
||||
|
||||
@@ -17,19 +17,18 @@ else
|
||||
use/live/rw: use/live; @:
|
||||
endif
|
||||
|
||||
# a very simplistic one
|
||||
use/live/x11: use/live use/firmware use/x11/xorg
|
||||
@$(call add,LIVE_PACKAGES,xinit)
|
||||
|
||||
# optimized out: use/x11/xorg
|
||||
use/live/desktop: use/live/base use/x11/wacom use/live/sound \
|
||||
+vmguest +power +efi
|
||||
# graphical target (not enforcing xorg drivers or blobs)
|
||||
use/live/x11: use/live/base use/x11-autologin use/sound +power +efi
|
||||
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
|
||||
@$(call add,LIVE_LISTS,$(call tags,base l10n))
|
||||
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
|
||||
@$(call add,LIVE_PACKAGES,pciutils)
|
||||
@$(call add,SYSLINUX_CFG,localboot)
|
||||
|
||||
# this target specifically pulls free xorg drivers in (and a few more bits)
|
||||
use/live/desktop: use/live/x11 use/x11/xorg use/x11/wacom \
|
||||
use/xdg-user-dirs/deep +vmguest; @:
|
||||
|
||||
# preconfigure apt for both live and installed-from-live systems
|
||||
use/live/repo: use/live
|
||||
@$(call add,LIVE_PACKAGES,installer-feature-online-repo)
|
||||
@@ -41,7 +40,7 @@ use/live/repo/online:
|
||||
@$(call add,LIVE_PACKAGES,livecd-online-repo)
|
||||
|
||||
# alterator-based permanent installation
|
||||
use/live/install: use/metadata use/syslinux/localboot.cfg
|
||||
use/live/install: use/metadata use/xdg-user-dirs use/syslinux/localboot.cfg
|
||||
@$(call add,LIVE_PACKAGES,livecd-install)
|
||||
@$(call add,LIVE_PACKAGES,livecd-installer-features)
|
||||
|
||||
@@ -49,20 +48,21 @@ use/live/install: use/metadata use/syslinux/localboot.cfg
|
||||
use/live/textinstall: use/syslinux/localboot.cfg
|
||||
@$(call add,LIVE_PACKAGES,live-install)
|
||||
|
||||
# NB: there's an unconditional live/image-scripts.d/40-autologin script
|
||||
# *but* it only configures some of the *existing* means; let's add one
|
||||
# or another for the cases when there should be no display manager
|
||||
use/live/autologin: use/live/x11
|
||||
# a very simplistic one
|
||||
use/live/.x11: use/live use/x11 use/x11-autologin
|
||||
@$(call add,LIVE_PACKAGES,xinit)
|
||||
|
||||
# NB: some implementation has to be added if it's not a display manager
|
||||
use/live/autologin: use/live/.x11
|
||||
@$(call add,LIVE_PACKAGES,autologin)
|
||||
|
||||
use/live/nodm: use/live/x11
|
||||
use/live/nodm: use/live/.x11
|
||||
@$(call add,LIVE_PACKAGES,nodm)
|
||||
|
||||
# see also http://www.altlinux.org/Netbook-live/hooks
|
||||
use/live/hooks: use/live
|
||||
@$(call add,LIVE_PACKAGES,livecd-run-hooks)
|
||||
|
||||
# a crude hack to make sure Russian is supported in a particular image
|
||||
use/live/ru: use/live
|
||||
@$(call add,LIVE_PACKAGES,livecd-ru)
|
||||
|
||||
use/live/sound: use/live
|
||||
@$(call add,LIVE_PACKAGES,amixer alsa-utils aplay udev-alsa)
|
||||
|
@@ -53,6 +53,7 @@ bridge
|
||||
clamd
|
||||
crond
|
||||
dhcpd
|
||||
dmeventd
|
||||
dnsmasq
|
||||
lvm2-lvmetad
|
||||
lvm2-monitor
|
||||
|
@@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Turn on xdg-user-dirs.
|
||||
# NB: not yet available on t6/p6 hence the warning
|
||||
|
||||
. shell-config
|
||||
|
||||
if control xdg-user-dirs enabled; then
|
||||
shell_config_set /etc/xdg/user-dirs.defaults MOVIES 'Documents/Videos'
|
||||
shell_config_set /etc/xdg/user-dirs.defaults PHOTOS 'Documents/Pictures'
|
||||
else
|
||||
echo "** warning: control xdg-user-dirs failed" >&2
|
||||
fi
|
@@ -1,6 +1,6 @@
|
||||
+ltsp: use/ltsp/base; @:
|
||||
|
||||
use/ltsp:
|
||||
use/ltsp: use/sound
|
||||
@$(call add_feature)
|
||||
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
|
||||
@$(call add,MAIN_LISTS,ltsp-client)
|
||||
|
@@ -1,5 +1,7 @@
|
||||
LUKS_LISTS := $(call tags,security luks)
|
||||
|
||||
use/luks:
|
||||
@$(call add_feature)
|
||||
@$(call add,BASE_PACKAGES,make-initrd-luks)
|
||||
@$(call add,THE_LISTS,$(LUKS_LISTS))
|
||||
@$(call add,RESCUE_LISTS,$(LUKS_LISTS))
|
||||
|
9
features.in/luks/install2/image-scripts.d/50-check-luks
Executable file
9
features.in/luks/install2/image-scripts.d/50-check-luks
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# let's check if support is there until installer-steps are dynamic
|
||||
|
||||
CONFIG="/usr/share/install2/installer-steps"
|
||||
|
||||
if ! grep -q '^luks$' "$CONFIG"; then
|
||||
PKG="$(rpm -qf "$CONFIG")"
|
||||
echo "** warning: luks step missing in ${PKG:-$CONFIG}" >&2
|
||||
fi
|
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo 'FEATURES += luks' >> /etc/initrd.mk
|
@@ -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; \
|
||||
|
1
features.in/net-eth/README
Normal file
1
features.in/net-eth/README
Normal file
@@ -0,0 +1 @@
|
||||
Эта фича позволяет задать конфигурацию Ethernet-интерфейсов.
|
9
features.in/net-eth/config.mk
Normal file
9
features.in/net-eth/config.mk
Normal file
@@ -0,0 +1,9 @@
|
||||
use/net-eth: use/net
|
||||
@$(call add_feature)
|
||||
@$(call xport,NET_ETH)
|
||||
|
||||
# typical boilerplate
|
||||
use/net-eth/dhcp: use/net-eth use/net/dhcp
|
||||
@$(call add,NET_ETH,eth0:dhcp)
|
||||
|
||||
# use e.g. eth0:static:10.0.0.2/24:10.0.0.1 for predefined static configuration
|
51
features.in/net-eth/rootfs/image-scripts.d/50-net-eth
Executable file
51
features.in/net-eth/rootfs/image-scripts.d/50-net-eth
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
# parse interface configuration tuples:
|
||||
# iface:proto[:ipv4addr/netmask[:ipv4gw]]
|
||||
# and write it down as intended
|
||||
|
||||
fatal() { echo "error: $*" >&2; exit 1; }
|
||||
|
||||
# simple etcnet configurations are also picked up by NM
|
||||
if type -t NetworkManager >&/dev/null ||
|
||||
type -t connmand >&/dev/null; then
|
||||
NMCTL=yes
|
||||
else
|
||||
NMCTL=no
|
||||
fi
|
||||
|
||||
IFACEDIR="/etc/net/ifaces"
|
||||
|
||||
# uses global variables
|
||||
write_iface() {
|
||||
dir="$IFACEDIR/$iface"
|
||||
mkdir -p "$dir"
|
||||
case "$proto" in
|
||||
dhcp)
|
||||
;;
|
||||
static)
|
||||
[ -n "$ipv4addr" ] || fatal "ipv4addr missing"
|
||||
echo "$ipv4addr" > "$dir/ipv4address"
|
||||
[ -z "$ipv4gw" ] ||
|
||||
echo "default via $ipv4gw" > "$dir/ipv4route"
|
||||
;;
|
||||
*)
|
||||
fatal "unknown proto value: $proto"
|
||||
;;
|
||||
esac
|
||||
{
|
||||
echo "TYPE=eth"
|
||||
echo "DISABLED=no"
|
||||
echo "BOOTPROTO=$proto"
|
||||
echo "NM_CONTROLLED=$NMCTL"
|
||||
echo "DISABLED=$NMCTL"
|
||||
echo "#USE_IFPLUGD=yes"
|
||||
} > "$dir/options"
|
||||
}
|
||||
|
||||
[ -z "$GLOBAL_NET_ETH" ] ||
|
||||
echo "$GLOBAL_NET_ETH" \
|
||||
| tr ' ' '\n' \
|
||||
| while IFS=':' read iface proto ipv4addr ipv4gw; do
|
||||
[ -n "$iface" -a -n "$proto" ] || continue
|
||||
write_iface
|
||||
done
|
3
features.in/net-ssh/README
Normal file
3
features.in/net-ssh/README
Normal file
@@ -0,0 +1,3 @@
|
||||
Эта фича предназначена для добавления в образ поддержки SSH:
|
||||
добавляется клиент и конфигурируется сервер (требуется задание
|
||||
пути к существующему публичному ключу посредством переменной SSH_KEY).
|
4
features.in/net-ssh/config.mk
Normal file
4
features.in/net-ssh/config.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
use/net-ssh: use/net use/services
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_LISTS,openssh)
|
||||
@$(call add,DEFAULT_SERVICES_ENABLE,sshd)
|
@@ -2,11 +2,12 @@ ifdef BUILDDIR
|
||||
|
||||
include $(BUILDDIR)/distcfg.mk
|
||||
|
||||
# prepare the provided public SSH key to be carried over into the VM image
|
||||
# prepare the provided public SSH key to be carried over into the image
|
||||
all: SSH_DIR = $(BUILDDIR)/files/root/.ssh
|
||||
all:
|
||||
@if [ -s "$(SSH_KEY)" ]; then \
|
||||
install -pD "$(SSH_KEY)" "$(SSH_DIR)/authorized_keys"; \
|
||||
mkdir -pm0700 "$(SSH_DIR)"; \
|
||||
install -pm0600 "$(SSH_KEY)" "$(SSH_DIR)/authorized_keys"; \
|
||||
fi
|
||||
|
||||
endif
|
5
features.in/net-usershares/README
Normal file
5
features.in/net-usershares/README
Normal file
@@ -0,0 +1,5 @@
|
||||
Эта фича выполняет предварительное конфигурирование системы
|
||||
для работы плагинов файл-менеджеров, реализующих взаимодействие
|
||||
с Samba-сервером для динамического создания разделяемых файловых
|
||||
ресурсов ("пользовательских шар"). Без добавления соответствующего
|
||||
файл-менеджера и нужного плагина смысла не имеет.
|
5
features.in/net-usershares/config.mk
Normal file
5
features.in/net-usershares/config.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
# requires thunar-shares-plugin or mate-user-share to make sense
|
||||
use/net-usershares: use/services use/deflogin
|
||||
@$(call add,GROUPS,sambashare)
|
||||
@$(call add,DEFAULT_SERVICES_ENABLE,smb nmb)
|
||||
@$(call add,THE_PACKAGES,libshell)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user