Compare commits
119 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
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
|
Name: mkimage-profiles
|
||||||
Version: 1.0.0
|
Version: 1.1.6
|
||||||
Release: alt1
|
Release: alt1
|
||||||
|
|
||||||
Summary: ALT Linux based distribution metaprofile
|
Summary: ALT Linux based distribution metaprofile
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Development/Other
|
Group: Development/Other
|
||||||
|
|
||||||
Url: http://www.altlinux.org/Mkimage/Profiles/m-p
|
Url: http://altlinux.org/m-p
|
||||||
Source: %name-%version.tar
|
Source: %name-%version.tar
|
||||||
Packager: Michael Shigorin <mike@altlinux.org>
|
Packager: Michael Shigorin <mike@altlinux.org>
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ to choose from, and some ready-made image recipes as well.
|
|||||||
|
|
||||||
Make no mistake: constructing distributions isn't just fun, it takes
|
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
|
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
|
-- or want -- to make just a few tweaks to an existing recipe, it might
|
||||||
be easier to comprehend the generated profile (aka builddir) which
|
be easier to comprehend the generated profile (aka builddir) which
|
||||||
contains only the needed subprofiles, script hooks and package lists
|
contains only the needed subprofiles, script hooks and package lists
|
||||||
@@ -78,6 +78,32 @@ cp -a * %buildroot%mpdir
|
|||||||
%doc %docs/*
|
%doc %docs/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1
|
||||||
- 1.0
|
- 1.0
|
||||||
|
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
object 5ffd07c65e360561c7a04f41aff746d9caa165cd
|
|
||||||
type commit
|
|
||||||
tag v1.0.0
|
|
||||||
tagger Michael Shigorin <mike@altlinux.org> 1371463392 +0400
|
|
||||||
|
|
||||||
1.0
|
|
6
.gear/tags/66dabc8773246fcfb212f57a33240f5d95f1b284
Normal file
6
.gear/tags/66dabc8773246fcfb212f57a33240f5d95f1b284
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
object 922b44bf5724a0b29326b4542df61550e55a88fc
|
||||||
|
type commit
|
||||||
|
tag v1.1.5
|
||||||
|
tagger Michael Shigorin <mike@altlinux.org> 1375724512 +0400
|
||||||
|
|
||||||
|
Makebug
|
@@ -1 +1 @@
|
|||||||
5f4103e2678b4db8760eda8622f094f694f9cdcd v1.0.0
|
66dabc8773246fcfb212f57a33240f5d95f1b284 v1.1.5
|
||||||
|
17
Makefile
17
Makefile
@@ -6,15 +6,16 @@
|
|||||||
-include $(HOME)/.mkimage/profiles.mk
|
-include $(HOME)/.mkimage/profiles.mk
|
||||||
|
|
||||||
# for immediate assignment
|
# for immediate assignment
|
||||||
ifndef ARCHES
|
ifndef ARCH
|
||||||
ifdef ARCH
|
ARCH := $(shell arch \
|
||||||
ARCHES := $(ARCH)
|
|
||||||
else
|
|
||||||
ARCHES := $(shell arch \
|
|
||||||
| sed 's/i686/i586/; s/armv7.*/armh/; s/armv.*/arm/; s/ppc.*/ppc/')
|
| sed 's/i686/i586/; s/armv7.*/armh/; s/armv.*/arm/; s/ppc.*/ppc/')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef ARCHES
|
||||||
|
ARCHES := $(ARCH)
|
||||||
endif
|
endif
|
||||||
export ARCHES
|
|
||||||
|
export ARCHES ARCH
|
||||||
|
|
||||||
export PATH := $(CURDIR)/bin:$(PATH)
|
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
|
DIRECT_TARGETS := help help/distro help/ve help/vm clean distclean check
|
||||||
.PHONY: $(DIRECT_TARGETS)
|
.PHONY: $(DIRECT_TARGETS)
|
||||||
|
|
||||||
|
# these build nothing so no use of reports either
|
||||||
$(DIRECT_TARGETS):
|
$(DIRECT_TARGETS):
|
||||||
@$(MAKE) -f main.mk $@
|
@$(MAKE) -f main.mk REPORT= $@
|
||||||
|
|
||||||
export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ while read first second third rest; do
|
|||||||
for to in $TO; do
|
for to in $TO; do
|
||||||
out=" \"$FROM\" -> \"$to\""
|
out=" \"$FROM\" -> \"$to\""
|
||||||
case $to in
|
case $to in
|
||||||
*distro/*)
|
*distro/*|*vm/*)
|
||||||
echo "$out [weight=10];";;
|
echo "$out [weight=10];";;
|
||||||
*)
|
*)
|
||||||
echo "$out";;
|
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-arm-e17: ve/arm-e17; @:
|
||||||
|
ve/regular-arm-kde4: ve/arm-kde4; @:
|
||||||
|
ve/altlinux-p7-nexus7-e17: ve/arm-e17; @:
|
||||||
|
ve/altlinux-p7-nexus7-kde4: ve/arm-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
|
@@ -10,8 +10,10 @@ distro/syslinux: distro/.init \
|
|||||||
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
|
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
|
||||||
|
|
||||||
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
|
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 \
|
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-desktop-ru: distro/.live-desktop use/live/ru; @:
|
||||||
|
|
||||||
distro/.live-kiosk: distro/.base use/live/base use/live/autologin +power \
|
distro/.live-kiosk: distro/.base use/live/base use/live/autologin +power \
|
||||||
@@ -47,9 +49,8 @@ distro/live-rescue: distro/live-icewm use/efi
|
|||||||
$(call tags,(base || extra) && (archive || rescue || network)))
|
$(call tags,(base || extra) && (archive || rescue || network)))
|
||||||
|
|
||||||
# NB: this one doesn't include the browser, needs to be chosen downstream
|
# 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_LISTS,$(call tags,desktop && (live || network)))
|
||||||
@$(call add,LIVE_PACKAGES,alsa-utils udev-alsa)
|
|
||||||
@$(call add,CLEANUP_PACKAGES,'libqt4*' 'qt4*')
|
@$(call add,CLEANUP_PACKAGES,'libqt4*' 'qt4*')
|
||||||
|
|
||||||
distro/live-webkiosk-mini: distro/.live-webkiosk
|
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
|
distro/live-webkiosk-chromium: distro/.live-webkiosk
|
||||||
@$(call add,LIVE_PACKAGES,livecd-webkiosk-chromium)
|
@$(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 add,LIVE_PACKAGES,FlightGear fgo input-utils)
|
||||||
@$(call try,HOMEPAGE,http://www.4p8.com/eric.brasseur/flight_simulator_tutorial.html)
|
@$(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
|
distro/live-e17: distro/.live-desktop-ru use/x11/e17 use/x11/lightdm/gtk; @:
|
||||||
@$(call add,LIVE_PACKAGES,gnome3-default)
|
|
||||||
|
|
||||||
distro/live-cinnamon: distro/.live-desktop-ru use/live/autologin \
|
distro/live-gimp: distro/live-icewm use/live/ru
|
||||||
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
|
|
||||||
@$(call add,LIVE_PACKAGES,gimp tintii immix fim)
|
@$(call add,LIVE_PACKAGES,gimp tintii immix fim)
|
||||||
@$(call add,LIVE_PACKAGES,cvltonemap darktable geeqie rawstudio ufraw)
|
@$(call add,LIVE_PACKAGES,cvltonemap darktable geeqie rawstudio ufraw)
|
||||||
@$(call add,LIVE_PACKAGES,macrofusion python-module-pygtk-libglade)
|
@$(call add,LIVE_PACKAGES,macrofusion python-module-pygtk-libglade)
|
||||||
@$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync)
|
@$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync)
|
||||||
@$(call add,LIVE_PACKAGES,design-graphics-sisyphus2)
|
@$(call add,LIVE_PACKAGES,design-graphics-sisyphus2)
|
||||||
|
|
||||||
distro/live-sugar: distro/.live-desktop-ru use/x11/sugar; @:
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@@ -6,12 +6,15 @@ distro/.regular-bare: distro/.base +wireless use/efi/signed \
|
|||||||
use/memtest use/stage2/net-eth use/kernel/net
|
use/memtest use/stage2/net-eth use/kernel/net
|
||||||
@$(call try,SAVE_PROFILE,yes)
|
@$(call try,SAVE_PROFILE,yes)
|
||||||
|
|
||||||
# WM base target
|
# graphical target (not enforcing xorg drivers or blobs)
|
||||||
distro/.regular-base: distro/.regular-bare +vmguest +live \
|
distro/.regular-x11: distro/.regular-bare use/x11/wacom +vmguest \
|
||||||
use/live/ru use/live/install use/live/repo use/live/rw \
|
use/live/x11 use/live/ru use/live/install use/live/repo use/live/rw \
|
||||||
use/luks use/x11/3d-free use/branding
|
use/luks use/branding
|
||||||
@$(call add,LIVE_LISTS,$(call tags,(base || desktop) && regular))
|
@$(call add,LIVE_LISTS,$(call tags,(base || desktop) && regular))
|
||||||
@$(call add,LIVE_LISTS,$(call tags,base rescue))
|
@$(call add,LIVE_LISTS,$(call tags,base rescue))
|
||||||
|
|
||||||
|
# WM base target
|
||||||
|
distro/.regular-base: distro/.regular-x11 use/x11/xorg
|
||||||
@$(call add,LIVE_PACKAGES,installer-feature-desktop-other-fs-stage2)
|
@$(call add,LIVE_PACKAGES,installer-feature-desktop-other-fs-stage2)
|
||||||
@$(call add,THE_BRANDING,indexhtml notes alterator)
|
@$(call add,THE_BRANDING,indexhtml notes alterator)
|
||||||
@$(call add,THE_BRANDING,graphics)
|
@$(call add,THE_BRANDING,graphics)
|
||||||
@@ -19,7 +22,7 @@ distro/.regular-base: distro/.regular-bare +vmguest +live \
|
|||||||
# DE base target
|
# DE base target
|
||||||
# TODO: use/plymouth/live when luks+plymouth is done, see also #28255
|
# TODO: use/plymouth/live when luks+plymouth is done, see also #28255
|
||||||
distro/.regular-desktop: distro/.regular-base \
|
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_PACKAGES,fuse-exfat)
|
||||||
@$(call add,LIVE_LISTS,domain-client)
|
@$(call add,LIVE_LISTS,domain-client)
|
||||||
@$(call add,THE_BRANDING,bootloader)
|
@$(call add,THE_BRANDING,bootloader)
|
||||||
@@ -27,7 +30,8 @@ distro/.regular-desktop: distro/.regular-base \
|
|||||||
|
|
||||||
distro/.regular-gtk: distro/.regular-desktop use/x11/lightdm/gtk +plymouth; @:
|
distro/.regular-gtk: distro/.regular-desktop use/x11/lightdm/gtk +plymouth; @:
|
||||||
|
|
||||||
distro/regular-icewm: distro/.regular-base use/x11/lightdm/gtk +icewm
|
distro/regular-icewm: distro/.regular-base use/init/sysv \
|
||||||
|
use/x11/lightdm/gtk +icewm
|
||||||
@$(call add,LIVE_LISTS,$(call tags,regular icewm))
|
@$(call add,LIVE_LISTS,$(call tags,regular icewm))
|
||||||
@$(call set,KFLAVOURS,un-def)
|
@$(call set,KFLAVOURS,un-def)
|
||||||
|
|
||||||
@@ -36,19 +40,22 @@ distro/regular-wmaker: distro/.regular-desktop use/x11/lightdm/gtk \
|
|||||||
@$(call add,LIVE_PACKAGES,livecd-install-wmaker)
|
@$(call add,LIVE_PACKAGES,livecd-install-wmaker)
|
||||||
@$(call add,LIVE_PACKAGES,xxkb)
|
@$(call add,LIVE_PACKAGES,xxkb)
|
||||||
|
|
||||||
|
ifeq (i586,$(ARCH))
|
||||||
distro/regular-gnustep: distro/regular-wmaker use/x11/gnustep +plymouth
|
distro/regular-gnustep: distro/regular-wmaker use/x11/gnustep +plymouth
|
||||||
@$(call add,THE_BRANDING,graphics)
|
@$(call add,THE_BRANDING,graphics)
|
||||||
|
else
|
||||||
|
$(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
|
distro/regular-lxde: distro/.regular-gtk use/x11/lxde use/fonts/infinality +nm; @:
|
||||||
@$(call add,LIVE_LISTS,$(call tags,desktop nm))
|
|
||||||
|
|
||||||
distro/regular-xmonad: distro/.regular-gtk use/x11/xmonad
|
distro/regular-xmonad: distro/.regular-gtk use/x11/xmonad
|
||||||
@$(call add,LIVE_PACKAGES,livecd-regular-xmonad)
|
@$(call add,LIVE_PACKAGES,livecd-regular-xmonad)
|
||||||
|
|
||||||
distro/regular-mate: distro/.regular-gtk
|
distro/regular-mate: distro/.regular-gtk use/x11/mate +nm
|
||||||
@$(call add,LIVE_LISTS,$(call tags,(desktop || mobile) && (mate || nm)))
|
@$(call add,LIVE_LISTS,$(call tags,mobile mate))
|
||||||
|
|
||||||
distro/regular-e17: distro/.regular-gtk use/x11/e17 use/fonts/infinality
|
distro/regular-e17: distro/.regular-gtk use/x11/e17 use/fonts/infinality
|
||||||
@$(call add,LIVE_PACKAGES,xterm)
|
@$(call add,LIVE_PACKAGES,xterm)
|
||||||
@@ -59,12 +66,12 @@ distro/regular-cinnamon: distro/.regular-gtk \
|
|||||||
|
|
||||||
distro/regular-gnome3: distro/.regular-desktop use/x11/gnome3 +plymouth; @:
|
distro/regular-gnome3: distro/.regular-desktop use/x11/gnome3 +plymouth; @:
|
||||||
|
|
||||||
distro/regular-tde: distro/.regular-desktop +tde +plymouth
|
distro/regular-tde: distro/.regular-desktop use/net-eth/dhcp +tde +plymouth
|
||||||
@$(call add,LIVE_LISTS,$(call tags,desktop nm))
|
|
||||||
@$(call add,LIVE_PACKAGES,kdegames kdeedu)
|
@$(call add,LIVE_PACKAGES,kdegames kdeedu)
|
||||||
|
@$(call add,LIVE_LISTS,openscada)
|
||||||
|
|
||||||
distro/regular-kde4: distro/.regular-desktop use/x11/kde4 use/x11/kdm4 \
|
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))
|
@$(call add,LIVE_LISTS,$(call tags,regular kde4))
|
||||||
|
|
||||||
distro/regular-razorqt: distro/.regular-desktop +razorqt +plymouth; @:
|
distro/regular-razorqt: distro/.regular-desktop +razorqt +plymouth; @:
|
||||||
@@ -75,8 +82,9 @@ 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
|
||||||
@$(call set,KFLAVOURS,un-def)
|
@$(call set,KFLAVOURS,un-def)
|
||||||
|
|
||||||
distro/regular-server: distro/.regular-bare +installer \
|
distro/regular-server: distro/.regular-bare +installer +sysvinit +power \
|
||||||
use/bootloader/grub use/firmware use/server/mini
|
use/install2/fs use/bootloader/lilo use/firmware use/server/mini
|
||||||
@$(call add,THE_LISTS,$(call tags,(base || server) && regular))
|
@$(call add,THE_LISTS,$(call tags,(base || server) && regular))
|
||||||
|
@$(call set,INSTALLER,desktop)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@@ -6,7 +6,7 @@ ifeq (distro,$(IMAGE_CLASS))
|
|||||||
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @:
|
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @:
|
||||||
distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @:
|
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-plymouth: distro/.live-base use/plymouth/live; @:
|
||||||
|
|
||||||
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
|
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 set,GLOBAL_BOOT_LANG,kk_KZ)
|
||||||
@$(call add,LIVE_PACKAGES,hunspell-kk)
|
@$(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)
|
@$(call set,KFLAVOURS,std-def)
|
||||||
|
|
||||||
distro/server-test: distro/server-mini use/relname
|
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)
|
@$(call add,SYSLINUX_CFG,netinstall2)
|
||||||
|
|
||||||
distro/desktop-luks: distro/icewm use/luks; @:
|
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/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; @:
|
distro/server-efi: distro/server-mini use/efi/debug; @:
|
||||||
|
|
||||||
endif # IMAGE_CLASS: distro
|
endif # IMAGE_CLASS: distro
|
||||||
@@ -73,9 +72,8 @@ endif # IMAGE_CLASS: ve
|
|||||||
|
|
||||||
ifeq (vm,$(IMAGE_CLASS))
|
ifeq (vm,$(IMAGE_CLASS))
|
||||||
|
|
||||||
vm/net-static: vm/bare use/vm-net/static use/vm-ssh
|
vm/net-static: vm/bare use/net-eth use/net-ssh
|
||||||
@$(call set,VM_NET_IPV4ADDR,10.0.2.16/24)
|
@$(call add,NET_ETH,eth0:static:10.0.2.16/24:10.0.2.2)
|
||||||
@$(call set,VM_NET_IPV4GW,10.0.2.2)
|
|
||||||
|
|
||||||
endif # IMAGE_CLASS: vm
|
endif # IMAGE_CLASS: vm
|
||||||
|
|
||||||
|
20
conf.d/ve.mk
Normal file
20
conf.d/ve.mk
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
ifeq (ve,$(IMAGE_CLASS))
|
||||||
|
|
||||||
|
# no "vzctl enter"
|
||||||
|
ve/bare: ve/.base
|
||||||
|
@$(call add,BASE_PACKAGES,sysvinit)
|
||||||
|
|
||||||
|
# /dev/pty and friends start here
|
||||||
|
ve/base: ve/bare
|
||||||
|
@$(call add,BASE_PACKAGES,interactivesystem)
|
||||||
|
|
||||||
|
# this should be more or less deployable
|
||||||
|
ve/generic: ve/base
|
||||||
|
@$(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
|
# virtual machines
|
||||||
ifeq (vm,$(IMAGE_CLASS))
|
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
|
# 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
|
endif
|
||||||
|
@@ -109,7 +109,7 @@
|
|||||||
* VM_SIZE
|
* 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]
|
[float]
|
||||||
=== пример ===
|
=== пример ===
|
||||||
|
11
doc/vm.txt
11
doc/vm.txt
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
*ВНИМАНИЕ:* заключительная операция создания образа жёсткого диска
|
*ВНИМАНИЕ:* заключительная операция создания образа жёсткого диска
|
||||||
из архива с содержимым корневой файловой системы требует доступа
|
из архива с содержимым корневой файловой системы требует доступа
|
||||||
к sudo и разрешения на выполнение скрипта bin/tar2vm в корневом
|
к sudo и разрешения на выполнение скрипта bin/tar2fs в корневом
|
||||||
каталоге метапрофиля при установке mkimage-profiles из пакета
|
каталоге метапрофиля при установке mkimage-profiles из пакета
|
||||||
(это в планах исправить, но подход к libguestfs пока успехом
|
(это в планах исправить, но подход к libguestfs пока успехом
|
||||||
не увенчался).
|
не увенчался).
|
||||||
|
|
||||||
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
|
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
|
||||||
|
|
||||||
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2vm
|
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2fs
|
||||||
|
|
||||||
При работе с локальной копией mkimage-profiles.git следует иметь
|
При работе с локальной копией mkimage-profiles.git следует иметь
|
||||||
в виду, что предоставлять недоверенному пользователю право выполнять
|
в виду, что предоставлять недоверенному пользователю право выполнять
|
||||||
@@ -25,3 +25,10 @@
|
|||||||
Пример сборки и запуска VM:
|
Пример сборки и запуска VM:
|
||||||
|
|
||||||
$ make ROOTPW=reallysecret1 vm/bare.img && kvm -hda ~/out/bare.img
|
$ make ROOTPW=reallysecret1 vm/bare.img && kvm -hda ~/out/bare.img
|
||||||
|
|
||||||
|
Если при сборке образа файловой системы произойдёт сбой, может оказаться
|
||||||
|
нужным вручную освободить используемые loop-устройства, например, так:
|
||||||
|
|
||||||
|
# losetup -a
|
||||||
|
# kpartx -d /dev/loop0
|
||||||
|
# losetup -d /dev/loop0
|
||||||
|
@@ -36,8 +36,8 @@ include $(BUILDDIR)/distcfg.mk
|
|||||||
|
|
||||||
# first rsync what's static, and make backups (*~) --
|
# first rsync what's static, and make backups (*~) --
|
||||||
# these might signal of file clashes (or plain dirt);
|
# these might signal of file clashes (or plain dirt);
|
||||||
# second, care for toplevel and tagged script dirs;
|
# second, care for toplevel dirs;
|
||||||
# then handle two more ways of implementing a feature
|
# then handle feature generator scripts
|
||||||
#
|
#
|
||||||
# NB: some subprofiles will be specified as "src/dst"
|
# NB: some subprofiles will be specified as "src/dst"
|
||||||
# -- then both src/ and dst/ can hold the addons;
|
# -- then both src/ and dst/ can hold the addons;
|
||||||
@@ -58,6 +58,11 @@ prep:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# feat
|
# 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):
|
$(FEATURES):
|
||||||
@feat=$@; \
|
@feat=$@; \
|
||||||
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
||||||
@@ -71,6 +76,13 @@ $(FEATURES):
|
|||||||
else \
|
else \
|
||||||
src="$${sub%@*}"; \
|
src="$${sub%@*}"; \
|
||||||
dst="$${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=; \
|
srcdirs=; \
|
||||||
if [ -d "$$src" ]; then \
|
if [ -d "$$src" ]; then \
|
||||||
srcdirs="$$src"; \
|
srcdirs="$$src"; \
|
||||||
@@ -78,9 +90,9 @@ $(FEATURES):
|
|||||||
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
|
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
|
||||||
srcdirs="$${srcdirs:+$$srcdirs }$$dst"; \
|
srcdirs="$${srcdirs:+$$srcdirs }$$dst"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
: "why this overduplication was done? (still needed)"; \
|
||||||
for srcdir in $$srcdirs; do \
|
for srcdir in $$srcdirs; do \
|
||||||
rsync -qab --exclude tagged \
|
rsync -qab "$$srcdir/" "$(BUILDDIR)/$$dst/"; \
|
||||||
"$$srcdir/" "$(BUILDDIR)/$$dst/"; \
|
|
||||||
done; \
|
done; \
|
||||||
fi; \
|
fi; \
|
||||||
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
||||||
@@ -98,7 +110,7 @@ $(FEATURES):
|
|||||||
done; \
|
done; \
|
||||||
popd >&/dev/null; \
|
popd >&/dev/null; \
|
||||||
done; \
|
done; \
|
||||||
if [ -n "$$dst" ]; then \
|
if [ -n "$$dst" -a "$$dst" != "." ]; then \
|
||||||
the="$$sub subprofile"; \
|
the="$$sub subprofile"; \
|
||||||
else \
|
else \
|
||||||
the="toplevel"; \
|
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
|
8
features.in/armh/rootfs/image-scripts.d/50-sshd-root
Executable file
8
features.in/armh/rootfs/image-scripts.d/50-sshd-root
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# poor man's root switch
|
||||||
|
# NB: use/deflogin might have been used to create predefined users
|
||||||
|
|
||||||
|
cat >> /etc/openssh/sshd_config << EOF
|
||||||
|
PermitRootLogin yes
|
||||||
|
UseDNS no
|
||||||
|
EOF
|
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" ||:
|
@@ -1,7 +1,8 @@
|
|||||||
# step 4: build the distribution image
|
# step 4: build the distribution image
|
||||||
|
|
||||||
# take the latter part for complex-specified subprofiles like stage2@live
|
# take the latter part for complex-specified subprofiles like stage2@live;
|
||||||
SUBDIRS = $(SUBPROFILE_DIRS)
|
# 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)
|
# proxy over the ISO metadata collected; see also genisoimagerc(5)
|
||||||
BOOT_SYSI := $(META_SYSTEM_ID)
|
BOOT_SYSI := $(META_SYSTEM_ID)
|
||||||
@@ -23,7 +24,7 @@ prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER)
|
|||||||
# can't use mp-showref which belongs to the metaprofile
|
# can't use mp-showref which belongs to the metaprofile
|
||||||
dot-disk:
|
dot-disk:
|
||||||
@mkdir -p files/.disk
|
@mkdir -p files/.disk
|
||||||
@echo "ALT Linux based" >files/.disk/info
|
@echo "$(META_VOL_ID)" >files/.disk/info
|
||||||
@echo "$(ARCH)" >files/.disk/arch
|
@echo "$(ARCH)" >files/.disk/arch
|
||||||
@echo "$(DATE)" >files/.disk/date
|
@echo "$(DATE)" >files/.disk/date
|
||||||
@if type -t git >&/dev/null; then \
|
@if type -t git >&/dev/null; then \
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
Эта фича конфигурирует создание образа виртуального окружения (VE).
|
Эта фича конфигурирует создание образа виртуального окружения (VE),
|
||||||
|
что используется для сборки шаблонов OpenVZ и ARM-чрутов для TWRP.
|
||||||
|
|
||||||
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
|
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
|
||||||
и тесно с ней связана.
|
и тесно с ней связана.
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
# hooked from ../../lib/sugar.mk
|
# hooked from ../../lib/sugar.mk
|
||||||
use/build-ve:
|
use/build-ve: sub/rootfs@/
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
|
@@ -8,10 +8,14 @@ ifeq (cpio,$(IMAGE_PACKTYPE))
|
|||||||
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
|
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
|
||||||
endif
|
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) \
|
$(SYSTEM_PACKAGES) \
|
||||||
$(COMMON_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 \
|
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
|
||||||
postprocess $(GLOBAL_CLEAN_WORKDIR)
|
postprocess $(GLOBAL_CLEAN_WORKDIR)
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
# hooked from ../../lib/sugar.mk
|
# hooked from ../../lib/sugar.mk
|
||||||
use/build-vm:
|
use/build-vm: sub/rootfs@/ use/kernel use/deflogin
|
||||||
@$(call add_feature)
|
@$(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:
|
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
|
# step 4: build the virtual machine image
|
||||||
|
|
||||||
IMAGE_PACKAGES = $(SYSTEM_PACKAGES) \
|
IMAGE_PACKAGES = $(DOT_BASE) \
|
||||||
|
$(SYSTEM_PACKAGES) \
|
||||||
$(COMMON_PACKAGES) \
|
$(COMMON_PACKAGES) \
|
||||||
$(BASE_PACKAGES) \
|
$(BASE_PACKAGES) \
|
||||||
$(THE_PACKAGES) \
|
$(THE_PACKAGES) \
|
||||||
$(call list,$(BASE_LISTS) $(THE_LISTS)) \
|
$(call list,$(BASE_LISTS) $(THE_LISTS))
|
||||||
$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))
|
|
||||||
|
|
||||||
# intermediate chroot archive
|
# intermediate chroot archive
|
||||||
VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar
|
VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar
|
||||||
VM_RAWDISK := $(IMAGE_OUTDIR)/$(IMAGE_NAME).raw
|
VM_RAWDISK := $(IMAGE_OUTDIR)/$(IMAGE_NAME).raw
|
||||||
|
VM_FSTYPE ?= ext4
|
||||||
ifeq (,$(ROOTPW))
|
VM_SIZE ?= 0
|
||||||
$(error please provide root password via ROOTPW)
|
|
||||||
endif
|
|
||||||
|
|
||||||
check-sudo:
|
check-sudo:
|
||||||
@if ! type -t sudo >&/dev/null; then \
|
@if ! type -t sudo >&/dev/null; then \
|
||||||
@@ -22,9 +20,9 @@ check-sudo:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
prepare-image: check-sudo
|
prepare-image: check-sudo
|
||||||
@if ! sudo $(TOPDIR)/bin/tar2vm \
|
@if ! sudo $(TOPDIR)/bin/tar2fs \
|
||||||
"$(VM_TARBALL)" "$(VM_RAWDISK)" $$VM_SIZE; then \
|
"$(VM_TARBALL)" "$(VM_RAWDISK)" $(VM_SIZE) $(VM_FSTYPE); then \
|
||||||
echo "** error: sudo tar2vm failed, see also doc/vm.txt" >&2; \
|
echo "** error: sudo tar2fs failed, see also doc/vm.txt" >&2; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -43,7 +41,6 @@ convert-image: prepare-image
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
run-image-scripts: GLOBAL_CLEANUP_PACKAGES := $(CLEANUP_PACKAGES)
|
run-image-scripts: GLOBAL_CLEANUP_PACKAGES := $(CLEANUP_PACKAGES)
|
||||||
run-image-scripts: GLOBAL_ROOTPW := $(ROOTPW)
|
|
||||||
|
|
||||||
# override
|
# override
|
||||||
pack-image: MKI_PACK_RESULTS := tar:$(VM_TARBALL)
|
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_feature)
|
||||||
@$(call add,THE_PACKAGES,git-core hasher gear)
|
@$(call add,THE_PACKAGES,git-core hasher gear)
|
||||||
|
@$(call add,CONTROL,pam_mktemp:enabled)
|
||||||
|
|
||||||
use/dev/mkimage: use/dev
|
use/dev/mkimage: use/dev
|
||||||
@$(call add,THE_PACKAGES,mkimage shadow-change su)
|
@$(call add,THE_PACKAGES,mkimage shadow-change su)
|
||||||
|
@@ -28,7 +28,6 @@ fi
|
|||||||
|
|
||||||
# $TMP
|
# $TMP
|
||||||
TMP="/tmp/.private/$USER"
|
TMP="/tmp/.private/$USER"
|
||||||
control pam_mktemp enabled
|
|
||||||
sed -i '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
|
sed -i '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
|
||||||
echo "%_tmppath $TMP" >> "$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
|
#!/bin/sh
|
||||||
# see also https://bugzilla.altlinux.org/27970
|
# 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/full: use/firmware/server use/firmware/laptop
|
||||||
|
|
||||||
use/firmware/cpu: use/firmware
|
use/firmware/cpu: use/firmware
|
||||||
@$(call add,THE_PACKAGES,firmware-amd-ucode)
|
|
||||||
@$(call add,THE_PACKAGES,microcode-data-intel microcode_ctl)
|
@$(call add,THE_PACKAGES,microcode-data-intel microcode_ctl)
|
||||||
|
|
||||||
use/firmware/server: use/firmware
|
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 \
|
@$(call set,FONT_FEATURES_DISABLE,no-antialias lcdfilter-none \
|
||||||
unhinted no-sub-pixel)
|
unhinted no-sub-pixel)
|
||||||
|
|
||||||
# nothing configured to add_feature, let's skip that this time
|
# nothing configured to add_feature but let's not skip that for consistency
|
||||||
use/fonts/infinality:
|
use/fonts/infinality: use/fonts
|
||||||
@$(call add,THE_PACKAGES,libfreetype-infinality fontconfig-infinality)
|
@$(call add,THE_PACKAGES,libfreetype-infinality fontconfig-infinality)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
use/homeros:
|
use/homeros: use/control/sudo-su use/services
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
# @$(call set,BRANDING,simply-linux)
|
# @$(call set,BRANDING,simply-linux)
|
||||||
# @$(call add,THE_BRANDING,menu xfce-settings)
|
# @$(call add,THE_BRANDING,menu xfce-settings)
|
||||||
@@ -8,3 +8,4 @@ use/homeros:
|
|||||||
@$(call add,THE_LISTS,homeros/yasr)
|
@$(call add,THE_LISTS,homeros/yasr)
|
||||||
@$(call add,THE_LISTS,homeros/tools)
|
@$(call add,THE_LISTS,homeros/tools)
|
||||||
# @$(call set,META_VOL_SET,Homeros)
|
# @$(call set,META_VOL_SET,Homeros)
|
||||||
|
@$(call add,DEFAULT_SERVICES_ENABLE,sshd voiceman)
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh -e
|
|
||||||
|
|
||||||
chkconfig sshd on
|
|
@@ -2,5 +2,3 @@
|
|||||||
|
|
||||||
mkdir -p /etc/sudo.d
|
mkdir -p /etc/sudo.d
|
||||||
chmod 700 /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
|
14
features.in/init/config.mk
Normal file
14
features.in/init/config.mk
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
+sysvinit: use/init/sysv; @:
|
||||||
|
+systemd: use/init/systemd; @:
|
||||||
|
|
||||||
|
use/init:
|
||||||
|
@$(call add_feature)
|
||||||
|
@$(call add,THE_LISTS,$$(INIT_TYPE))
|
||||||
|
|
||||||
|
use/init/sysv: use/init
|
||||||
|
@$(call set,INIT_TYPE,sysvinit)
|
||||||
|
|
||||||
|
### 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,3 +2,8 @@
|
|||||||
специфическими для полноценного LiveCD настройками
|
специфическими для полноценного LiveCD настройками
|
||||||
и скриптовыми хуками, а также создаёт файл index.html
|
и скриптовыми хуками, а также создаёт файл index.html
|
||||||
с домашней страницей (редиректором) в корне образа.
|
с домашней страницей (редиректором) в корне образа.
|
||||||
|
|
||||||
|
Графический вариант безусловно требует x11-autologin,
|
||||||
|
при появлении необходимости обойтись без него можно
|
||||||
|
временно продублировать содержимое цели и сообщить
|
||||||
|
о таком случае.
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# copy stage2 as live
|
# copy stage2 as live
|
||||||
# NB: starts to preconfigure but doesn't use/cleanup yet
|
# 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_feature)
|
||||||
@$(call add,CLEANUP_PACKAGES,'installer*')
|
@$(call add,CLEANUP_PACKAGES,'installer*')
|
||||||
|
|
||||||
@@ -17,19 +17,18 @@ else
|
|||||||
use/live/rw: use/live; @:
|
use/live/rw: use/live; @:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# a very simplistic one
|
# graphical target (not enforcing xorg drivers or blobs)
|
||||||
use/live/x11: use/live use/firmware use/x11/xorg
|
use/live/x11: use/live/base use/x11-autologin use/sound +power +efi
|
||||||
@$(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
|
|
||||||
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
|
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
|
||||||
@$(call add,LIVE_LISTS,$(call tags,base l10n))
|
@$(call add,LIVE_LISTS,$(call tags,base l10n))
|
||||||
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
|
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
|
||||||
@$(call add,LIVE_PACKAGES,pciutils)
|
@$(call add,LIVE_PACKAGES,pciutils)
|
||||||
@$(call add,SYSLINUX_CFG,localboot)
|
@$(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
|
# preconfigure apt for both live and installed-from-live systems
|
||||||
use/live/repo: use/live
|
use/live/repo: use/live
|
||||||
@$(call add,LIVE_PACKAGES,installer-feature-online-repo)
|
@$(call add,LIVE_PACKAGES,installer-feature-online-repo)
|
||||||
@@ -41,7 +40,7 @@ use/live/repo/online:
|
|||||||
@$(call add,LIVE_PACKAGES,livecd-online-repo)
|
@$(call add,LIVE_PACKAGES,livecd-online-repo)
|
||||||
|
|
||||||
# alterator-based permanent installation
|
# 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-install)
|
||||||
@$(call add,LIVE_PACKAGES,livecd-installer-features)
|
@$(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
|
use/live/textinstall: use/syslinux/localboot.cfg
|
||||||
@$(call add,LIVE_PACKAGES,live-install)
|
@$(call add,LIVE_PACKAGES,live-install)
|
||||||
|
|
||||||
# NB: there's an unconditional live/image-scripts.d/40-autologin script
|
# a very simplistic one
|
||||||
# *but* it only configures some of the *existing* means; let's add one
|
use/live/.x11: use/live use/x11 use/x11-autologin
|
||||||
# or another for the cases when there should be no display manager
|
@$(call add,LIVE_PACKAGES,xinit)
|
||||||
use/live/autologin: use/live/x11
|
|
||||||
|
# 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)
|
@$(call add,LIVE_PACKAGES,autologin)
|
||||||
|
|
||||||
use/live/nodm: use/live/x11
|
use/live/nodm: use/live/.x11
|
||||||
@$(call add,LIVE_PACKAGES,nodm)
|
@$(call add,LIVE_PACKAGES,nodm)
|
||||||
|
|
||||||
|
# see also http://www.altlinux.org/Netbook-live/hooks
|
||||||
use/live/hooks: use/live
|
use/live/hooks: use/live
|
||||||
@$(call add,LIVE_PACKAGES,livecd-run-hooks)
|
@$(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
|
use/live/ru: use/live
|
||||||
@$(call add,LIVE_PACKAGES,livecd-ru)
|
@$(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
|
clamd
|
||||||
crond
|
crond
|
||||||
dhcpd
|
dhcpd
|
||||||
|
dmeventd
|
||||||
dnsmasq
|
dnsmasq
|
||||||
lvm2-lvmetad
|
lvm2-lvmetad
|
||||||
lvm2-monitor
|
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; @:
|
+ltsp: use/ltsp/base; @:
|
||||||
|
|
||||||
use/ltsp:
|
use/ltsp: use/sound
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
|
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
|
||||||
@$(call add,MAIN_LISTS,ltsp-client)
|
@$(call add,MAIN_LISTS,ltsp-client)
|
||||||
|
@@ -22,7 +22,7 @@ dump-LISTS = $(call dump-THEM,$(1),LISTS,cat)
|
|||||||
metadata-.base:
|
metadata-.base:
|
||||||
@cd $(call list,/); \
|
@cd $(call list,/); \
|
||||||
{ \
|
{ \
|
||||||
echo "## generated by features.in/metadata/lib/metadata.mk"; \
|
echo "## generated by features.in/metadata/lib/50-metadata.mk"; \
|
||||||
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
|
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
|
||||||
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
|
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
|
||||||
if [ -n "$(DOT_BASE)" ]; then \
|
if [ -n "$(DOT_BASE)" ]; then \
|
||||||
|
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
|
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: SSH_DIR = $(BUILDDIR)/files/root/.ssh
|
||||||
all:
|
all:
|
||||||
@if [ -s "$(SSH_KEY)" ]; then \
|
@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
|
fi
|
||||||
|
|
||||||
endif
|
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)
|
36
features.in/net-usershares/rootfs/image-scripts.d/85-samba-usershares.sh
Executable file
36
features.in/net-usershares/rootfs/image-scripts.d/85-samba-usershares.sh
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh -efu
|
||||||
|
|
||||||
|
[ -s /etc/samba/smb.conf ] || exit 0
|
||||||
|
|
||||||
|
. shell-config
|
||||||
|
|
||||||
|
USERSHARES_DIR="/var/lib/samba/usershares"
|
||||||
|
USERSHARES_GROUP="sambashare"
|
||||||
|
DEFAULT_GROUPS='cdwriter cdrom audio proc radio camera floppy xgrp scanner uucp' ###
|
||||||
|
GROUPS_FILE="/usr/share/install3/default-groups"
|
||||||
|
|
||||||
|
mkdir -p "$USERSHARES_DIR"
|
||||||
|
groupadd -r "$USERSHARES_GROUP"
|
||||||
|
chown root:"$USERSHARES_GROUP" "$USERSHARES_DIR"
|
||||||
|
chmod 1770 "$USERSHARES_DIR"
|
||||||
|
|
||||||
|
USERSHARES_OPTIONS="# ----------------------- User Shares Options -------------------------\n\tusershare path = $USERSHARES_DIR\n\tusershare max shares = 100\n\tusershare allow guests = yes\n\tusershare owner only = yes"
|
||||||
|
|
||||||
|
sed -i -e "\|^\[global\]|a$USERSHARES_OPTIONS" \
|
||||||
|
-e "s/workgroup = MYGROUP/workgroup = WORKGROUP/" \
|
||||||
|
"/etc/samba/smb.conf"
|
||||||
|
|
||||||
|
# Create group file for alterator-users
|
||||||
|
if [ ! -s "$GROUPS_FILE" ]; then
|
||||||
|
mkdir -p "${GROUPS_FILE%/*}"
|
||||||
|
echo "$DEFAULT_GROUPS" >"$GROUPS_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add USERSHARES_GROUP to the default groups list.
|
||||||
|
echo "$USERSHARES_GROUP" >>"$GROUPS_FILE"
|
||||||
|
|
||||||
|
# Permissions for home dir must be 0701
|
||||||
|
tab="$(printf "\t")"
|
||||||
|
shell_config_set "/etc/login.defs" UMASK 076 "$tab" "$tab"
|
||||||
|
|
||||||
|
# smb and nmb services must be enabled
|
2
features.in/net/README
Normal file
2
features.in/net/README
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Эта фича конфигурирует базовую поддержку сети, включая нужную подсистему
|
||||||
|
(etcnet, NetworkManager поверх etcnet или connman).
|
20
features.in/net/config.mk
Normal file
20
features.in/net/config.mk
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
+nm: use/net/nm/nodelay; @:
|
||||||
|
|
||||||
|
use/net: use/services
|
||||||
|
@$(call add_feature)
|
||||||
|
@$(call add,THE_PACKAGES,etcnet)
|
||||||
|
@$(call add,DEFAULT_SERVICES_ENABLE,network)
|
||||||
|
|
||||||
|
use/net/dhcp: use/net
|
||||||
|
@$(call add,THE_PACKAGES,dhcpcd)
|
||||||
|
|
||||||
|
use/net/nm: use/net
|
||||||
|
@$(call add,THE_LISTS,$(call tags,desktop nm))
|
||||||
|
@$(call add,DEFAULT_SERVICES_ENABLE,NetworkManager ModemManager)
|
||||||
|
|
||||||
|
use/net/nm/nodelay: use/net/nm
|
||||||
|
@$(call add,DEFAULT_SERVICES_DISABLE,NetworkManager-wait-online)
|
||||||
|
|
||||||
|
use/net/connman: use/net
|
||||||
|
@$(call add,THE_PACKAGES,connman)
|
||||||
|
@$(call add,DEFAULT_SERVICES_ENABLE,connman)
|
2
features.in/oem/README
Normal file
2
features.in/oem/README
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Эта фича обеспечивает автоматический запуск предварительной настройки,
|
||||||
|
характерный для OEM-образов.
|
5
features.in/oem/config.mk
Normal file
5
features.in/oem/config.mk
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
use/oem: use/services use/branding
|
||||||
|
@$(call add_feature)
|
||||||
|
@$(call add,DEFAULT_SERVICES_ENABLE,messagebus alteratord setup)
|
||||||
|
@$(call add,THE_PACKAGES,alterator-setup alterator-notes)
|
||||||
|
@$(call add,THE_BRANDING,alterator notes)
|
12
features.in/oem/rootfs/image-scripts.d/99-oem-setup
Executable file
12
features.in/oem/rootfs/image-scripts.d/99-oem-setup
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# this breaks the default configuration on intent
|
||||||
|
# so that alterator-setup can run predictably
|
||||||
|
|
||||||
|
TARGET=/lib/systemd/system/setup.target
|
||||||
|
|
||||||
|
[ ! -s "$TARGET" ] ||
|
||||||
|
ln -s "$TARGET" /etc/systemd/system/default.target
|
||||||
|
|
||||||
|
echo "LANG=en_US.utf-8" >> /etc/sysconfig/i18n
|
||||||
|
|
||||||
|
:
|
15
features.in/services/README
Normal file
15
features.in/services/README
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Данная фича конфигурирует автоматический запуск сервисов
|
||||||
|
при загрузке системы.
|
||||||
|
|
||||||
|
Поскольку в конкретном образе может быть желательно перекрыть
|
||||||
|
умолчания предыдущей конфигурации, рекомендуется в фичах работать
|
||||||
|
с переменными DEFAULT_SERVICES_* и оставить переменные SERVICES_*
|
||||||
|
для релиз-менеджеров.
|
||||||
|
|
||||||
|
Выключение сервиса в каждой из этих пар имеет приоритет перед
|
||||||
|
включением.
|
||||||
|
|
||||||
|
Внимание: фича опирается на субпрофиль rootfs, он должен быть
|
||||||
|
задействован в каком-либо качестве, чтобы ожидаемое произошло.
|
||||||
|
На данный момент действие rootfs не распространяется на системы,
|
||||||
|
устанавливаемые при помощи install2.
|
6
features.in/services/config.mk
Normal file
6
features.in/services/config.mk
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
use/services: sub/rootfs
|
||||||
|
@$(call add_feature)
|
||||||
|
@$(call xport,DEFAULT_SERVICES_ENABLE)
|
||||||
|
@$(call xport,DEFAULT_SERVICES_DISABLE)
|
||||||
|
@$(call xport,SERVICES_ENABLE)
|
||||||
|
@$(call xport,SERVICES_DISABLE)
|
35
features.in/services/rootfs/image-scripts.d/10-services
Executable file
35
features.in/services/rootfs/image-scripts.d/10-services
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# this script implements the services regulation
|
||||||
|
# according to what has been decided in the profile
|
||||||
|
|
||||||
|
CHKCONFIG=
|
||||||
|
SYSTEMCTL=
|
||||||
|
|
||||||
|
[ ! -x /sbin/chkconfig ] || CHKCONFIG=1
|
||||||
|
[ ! -x /bin/systemctl ] || SYSTEMCTL=1
|
||||||
|
|
||||||
|
[ -n "$CHKCONFIG$SYSTEMCTL" ] || exit 0
|
||||||
|
|
||||||
|
switch() {
|
||||||
|
case "$2" in
|
||||||
|
on)
|
||||||
|
cc=on; sc=enable;;
|
||||||
|
off)
|
||||||
|
cc=off; sc=disable;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
{
|
||||||
|
[ -z "$SYSTEMCTL" ] || /bin/systemctl --no-reload $sc $1.service
|
||||||
|
[ -z "$CHKCONFIG" ] || /sbin/chkconfig $1 $cc
|
||||||
|
} # 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
# defaults (most likely features.in ones)
|
||||||
|
for i in $GLOBAL_DEFAULT_SERVICES_ENABLE; do switch $i on; done
|
||||||
|
for i in $GLOBAL_DEFAULT_SERVICES_DISABLE; do switch $i off; done
|
||||||
|
|
||||||
|
# explicitly specified behaviour (e.g. via conf.d)
|
||||||
|
for i in $GLOBAL_SERVICES_ENABLE; do switch $i on; done
|
||||||
|
for i in $GLOBAL_SERVICES_DISABLE; do switch $i off; done
|
||||||
|
|
||||||
|
:
|
@@ -1,7 +1,10 @@
|
|||||||
use/slinux: use/x11/xfce use/x11/gdm2.20
|
use/slinux: use/x11/xfce
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call set,BRANDING,simply-linux)
|
@$(call set,BRANDING,simply-linux)
|
||||||
@$(call add,THE_BRANDING,menu xfce-settings)
|
@$(call add,THE_BRANDING,menu xfce-settings)
|
||||||
|
@$(call set,META_VOL_SET,Simply Linux)
|
||||||
|
|
||||||
|
use/slinux/base: use/slinux use/x11/gdm2.20 +pulse
|
||||||
@$(call add,THE_LISTS,gnome-p2p)
|
@$(call add,THE_LISTS,gnome-p2p)
|
||||||
@$(call add,THE_LISTS,slinux/$(ARCH))
|
@$(call add,THE_LISTS,slinux/$(ARCH))
|
||||||
@$(call add,THE_LISTS,slinux/games)
|
@$(call add,THE_LISTS,slinux/games)
|
||||||
@@ -13,8 +16,9 @@ use/slinux: use/x11/xfce use/x11/gdm2.20
|
|||||||
@$(call add,THE_LISTS,slinux/network)
|
@$(call add,THE_LISTS,slinux/network)
|
||||||
@$(call add,THE_LISTS,slinux/xfce)
|
@$(call add,THE_LISTS,slinux/xfce)
|
||||||
@$(call add,THE_LISTS,$(call tags,base l10n))
|
@$(call add,THE_LISTS,$(call tags,base l10n))
|
||||||
@$(call set,META_VOL_SET,Simply Linux)
|
|
||||||
|
|
||||||
use/slinux/full: use/isohybrid use/slinux use/systemd +wireless \
|
use/slinux/full: use/isohybrid use/slinux/base +systemd +wireless \
|
||||||
use/branding/complete use/x11/drm use/x11/3d-proprietary
|
use/branding/complete use/x11/3d; @:
|
||||||
@$(call add,THE_PACKAGES,apt-conf-sisyphus)
|
|
||||||
|
use/slinux/arm: use/slinux use/x11/lightdm/gtk
|
||||||
|
@$(call add,THE_LISTS,slinux/arm)
|
||||||
|
2
features.in/sound/README
Normal file
2
features.in/sound/README
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Эта фича добавляет поддержку аудиоподсистемы (как ядерную,
|
||||||
|
если не включена в kernel-image, так и утилиты).
|
11
features.in/sound/config.mk
Normal file
11
features.in/sound/config.mk
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
+pulse: use/sound/pulse; @:
|
||||||
|
|
||||||
|
# "bare" ALSA (which is good enough for many of us) with persistent levels
|
||||||
|
use/sound:
|
||||||
|
@$(call add_feature)
|
||||||
|
@$(call add,THE_KMODULES,alsa)
|
||||||
|
@$(call add,THE_PACKAGES,amixer alsa-utils aplay udev-alsa)
|
||||||
|
|
||||||
|
# PulseAudio (useful for per-app levels, dynamic devices and networked sound)
|
||||||
|
use/sound/pulse: use/sound
|
||||||
|
@$(call add,THE_LISTS,pulseaudio)
|
@@ -1,2 +1,2 @@
|
|||||||
Эта фича заменяет в базовой системе sysvinit на systemd;
|
Эта фича заменяла в базовой системе sysvinit на systemd;
|
||||||
см. тж. http://www.altlinux.org/systemd
|
в настоящее время является устаревшей, см. ../init/
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
use/systemd:
|
use/systemd: use/init/systemd
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call add,COMMON_PACKAGES,systemd systemd-units systemd-sysvinit)
|
@$(warning deprecated, see init feature)
|
||||||
@$(call add,COMMON_PACKAGES,installer-feature-systemd-stage3 chkconfig)
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user