forked from altcloud/mkimage-profiles
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7bcbcdca83 | ||
|
6e12923402 | ||
|
df03a56a4e | ||
|
305e7e8fde | ||
|
bc2789e9d6 | ||
|
ba84ab0ae3 | ||
|
0e31d305ae | ||
|
c601706517 | ||
|
d59601f7ad | ||
|
8ca80d1ac4 | ||
|
c29ec7beaa | ||
|
ee09a917e8 | ||
|
d60492e87c | ||
|
b84182c5cb | ||
|
c4dcf994b0 | ||
|
8547de0f0b | ||
|
3311ce5d80 | ||
|
d65a61ea47 | ||
|
b441894df7 | ||
|
e31b12cbf8 | ||
|
4b45694ee4 | ||
|
d9f11e6fee | ||
|
7bb22cce78 | ||
|
f716669bc1 | ||
|
3b2a0649bf | ||
|
7929f61cad |
@@ -1,12 +1,12 @@
|
|||||||
Name: mkimage-profiles
|
Name: mkimage-profiles
|
||||||
Version: 1.1.2
|
Version: 1.0.6
|
||||||
Release: alt1
|
Release: alt0.M70T.1
|
||||||
|
|
||||||
Summary: ALT Linux based distribution metaprofile
|
Summary: ALT Linux based distribution metaprofile
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Development/Other
|
Group: Development/Other
|
||||||
|
|
||||||
Url: http://altlinux.org/m-p
|
Url: http://www.altlinux.org/Mkimage/Profiles/m-p
|
||||||
Source: %name-%version.tar
|
Source: %name-%version.tar
|
||||||
Packager: Michael Shigorin <mike@altlinux.org>
|
Packager: Michael Shigorin <mike@altlinux.org>
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ BuildRequires: /proc
|
|||||||
|
|
||||||
Requires: rsync git-core
|
Requires: rsync git-core
|
||||||
Requires: time schedutils sfdisk
|
Requires: time schedutils sfdisk
|
||||||
Requires: mkimage >= 0.2.5
|
Requires: mkimage >= 0.2.12
|
||||||
|
|
||||||
# Recommends: graphviz qemu-img
|
# Recommends: graphviz qemu-img
|
||||||
|
|
||||||
@@ -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 alias for mkimage-profiles) is complex too. If you need
|
(the short nick 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,19 +78,24 @@ cp -a * %buildroot%mpdir
|
|||||||
%doc %docs/*
|
%doc %docs/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jul 15 2013 Michael Shigorin <mike@altlinux.org> 1.1.2-alt1
|
* Mon Sep 07 2015 Michael Shigorin <mike@altlinux.org> 1.0.6-alt0.M70T.1
|
||||||
- control and sound features
|
- mktmpdir: fixed sort key
|
||||||
|
|
||||||
* Mon Jul 01 2013 Michael Shigorin <mike@altlinux.org> 1.1.1-alt1
|
* Mon Feb 02 2015 Michael Shigorin <mike@altlinux.org> 1.0.5-alt0.M70T.1
|
||||||
- cuboxism
|
- backported pkg/lists fix (and the commit before it)
|
||||||
|
|
||||||
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.1.0-alt1
|
* Mon Mar 17 2014 Michael Shigorin <mike@altlinux.org> 1.0.4-alt0.M70T.1
|
||||||
- 1.1.x branch: public alpha development status
|
- kernel: don't insist on k-m-r8168
|
||||||
+ new subprofile: rootfs
|
|
||||||
+ new features: armh*, deflogin, init, services
|
* Mon Mar 03 2014 Michael Shigorin <mike@altlinux.org> 1.0.3-alt0.M70T.1
|
||||||
+ refactored features: build-*, efi, fonts, live, x11*
|
- vm fixes/backports
|
||||||
+ tar2vm got rewritten as tar2fs, gained ARM support
|
|
||||||
- minor spec metadata update
|
* Mon Dec 23 2013 Michael Shigorin <mike@altlinux.org> 1.0.2-alt0.M70T.1
|
||||||
|
- backported adaptations to handle EFI signed binaries the current way
|
||||||
|
|
||||||
|
* Mon Nov 25 2013 Michael Shigorin <mike@altlinux.org> 1.0.1-alt0.M70T.1
|
||||||
|
- important bugfix: THE_PACKAGES weren't getting through to .base
|
||||||
|
(backported from 1.1.14)
|
||||||
|
|
||||||
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1
|
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1
|
||||||
- 1.0
|
- 1.0
|
||||||
|
6
.gear/tags/b3c51a2aab25e4d159009fabcde9945ef8bc4ca5
Normal file
6
.gear/tags/b3c51a2aab25e4d159009fabcde9945ef8bc4ca5
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
object 6e1292340242d94e4402e70c0235f546adfe0598
|
||||||
|
type commit
|
||||||
|
tag v1.0.6
|
||||||
|
tagger Michael Shigorin <mike@altlinux.org> 1441660082 +0300
|
||||||
|
|
||||||
|
mktmpdir fixup
|
@@ -1,6 +0,0 @@
|
|||||||
object 40468c8395516cf29c7c6f16b56d46bbb23c3f9f
|
|
||||||
type commit
|
|
||||||
tag v1.1.1
|
|
||||||
tagger Michael Shigorin <mike@altlinux.org> 1372711661 +0000
|
|
||||||
|
|
||||||
cuboxism
|
|
@@ -1 +1 @@
|
|||||||
f48e25ec93bdc02ceda53058eb16780369a41738 v1.1.1
|
b3c51a2aab25e4d159009fabcde9945ef8bc4ca5 v1.0.6
|
||||||
|
4
Makefile
4
Makefile
@@ -29,10 +29,8 @@ 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 REPORT= $@
|
@$(MAKE) -f main.mk $@
|
||||||
|
|
||||||
export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ choose_tmpdir() {
|
|||||||
echo -n "$i "
|
echo -n "$i "
|
||||||
df -PT "$i" | tail -1
|
df -PT "$i" | tail -1
|
||||||
done \
|
done \
|
||||||
| sort -unk6 \
|
| sort -unk5 \
|
||||||
| while read dir dev fstype size used free percent mnt; do
|
| while read dir dev fstype size used free percent mnt; do
|
||||||
check_options "$dev" "$mnt" || continue
|
check_options "$dev" "$mnt" || continue
|
||||||
[ "$free" -gt "$MINSIZE" ] || continue
|
[ "$free" -gt "$MINSIZE" ] || continue
|
||||||
|
@@ -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/*|*vm/*)
|
*distro/*)
|
||||||
echo "$out [weight=10];";;
|
echo "$out [weight=10];";;
|
||||||
*)
|
*)
|
||||||
echo "$out";;
|
echo "$out";;
|
||||||
|
238
bin/tar2fs
238
bin/tar2fs
@@ -1,238 +0,0 @@
|
|||||||
#!/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 "$LOOPDEV"
|
|
||||||
LOOPROOT="/dev/mapper/$(basename "$LOOPDEV")p$ROOTPART"
|
|
||||||
|
|
||||||
# might take a tiny bit of time to actually appear
|
|
||||||
for i in `seq 10`; do
|
|
||||||
[ -b "$LOOPROOT" ] && break || sleep 0.1
|
|
||||||
done
|
|
||||||
|
|
||||||
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
|
|
144
bin/tar2vm
Executable file
144
bin/tar2vm
Executable file
@@ -0,0 +1,144 @@
|
|||||||
|
#!/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}"
|
||||||
|
|
||||||
|
# SCSI case hardwired so far;
|
||||||
|
# use virtio_scsi setup if performance is critical
|
||||||
|
# *and* updating the image is going to occur
|
||||||
|
BOOTDEV="/dev/sda"
|
||||||
|
|
||||||
|
# last preparations...
|
||||||
|
for i in losetup sfdisk parted kpartx mkfs."$ROOTFSTYPE"; do
|
||||||
|
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 -s "$LOOPDEV"
|
||||||
|
LOOPDEV1="/dev/mapper/$(basename "$LOOPDEV")p1"
|
||||||
|
|
||||||
|
mkfs."$ROOTFSTYPE" "$LOOPDEV1"
|
||||||
|
|
||||||
|
ROOTUUID="$(blkid -s UUID -o value -c /dev/null "$LOOPDEV1")"
|
||||||
|
if [ -n "$ROOTUUID" ]; then
|
||||||
|
ROOTDEV="UUID=$ROOTUUID"
|
||||||
|
else
|
||||||
|
ROOTDEV="${BOOTDEV}1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# mount and populate it
|
||||||
|
mkdir -pm755 "$ROOTFS"
|
||||||
|
mount "$LOOPDEV1" "$ROOTFS"
|
||||||
|
tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
|
||||||
|
for i in /dev /proc /sys; do mount --bind "$i" "$ROOTFS$i"; done
|
||||||
|
|
||||||
|
# NB: different storage modules might be needed for different VMs
|
||||||
|
VIRTIO_MODULES="virtio_pci virtio_blk virtio_scsi"
|
||||||
|
echo "$LOOPDEV1 / $ROOTFSTYPE defaults 1 1" >> "$ROOTFS/etc/fstab"
|
||||||
|
echo "MODULES_PRELOAD += sd_mod ata_piix $VIRTIO_MODULES $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=$BOOTDEV
|
||||||
|
$LILO_COMMON
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ -n "$SUDO_USER" ]; then
|
||||||
|
chown "$SUDO_USER" "$IMG" "$ROOTFS" "$WORKDIR"
|
||||||
|
fi
|
@@ -1,66 +0,0 @@
|
|||||||
ifeq (armh,$(ARCH))
|
|
||||||
|
|
||||||
ifeq (ve,$(IMAGE_CLASS))
|
|
||||||
|
|
||||||
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/vm-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 use/armh-cubox use/services/ssh +systemd \
|
|
||||||
use/cleanup/installer use/repo use/branding use/xdg-user-dirs/deep \
|
|
||||||
+pulse
|
|
||||||
@$(call set,KFLAVOURS,cubox)
|
|
||||||
@$(call set,BRANDING,altlinux-kdesktop)
|
|
||||||
@$(call add,THE_BRANDING,alterator graphics indexhtml menu notes)
|
|
||||||
@$(call add,BASE_PACKAGES,glibc-locales vim-console rsync)
|
|
||||||
@$(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-base: vm/.cubox-bare use/deflogin/altlinuxroot; @:
|
|
||||||
vm/.cubox-gtk: vm/.cubox-base use/x11/lightdm/gtk +nm; @:
|
|
||||||
|
|
||||||
vm/cubox-xfce: vm/.cubox-bare use/slinux/arm use/oem use/net-usershares \
|
|
||||||
use/domain-client +nm; @:
|
|
||||||
|
|
||||||
vm/cubox-xfce-ru: vm/.cubox-gtk use/slinux/arm use/x11-autologin
|
|
||||||
@$(call add,BASE_PACKAGES,livecd-ru)
|
|
||||||
|
|
||||||
vm/cubox-mate: vm/.cubox-gtk use/x11/mate; @:
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
|
@@ -10,10 +10,8 @@ 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/plymouth/live use/efi; @:
|
||||||
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 \
|
||||||
@@ -49,9 +47,9 @@ 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/alsa
|
|
||||||
@$(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
|
||||||
@@ -67,18 +65,30 @@ 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-x11 use/x11/lightdm/gtk use/x11/3d +icewm
|
distro/live-flightgear: distro/live-icewm use/live/sound use/x11/3d-proprietary
|
||||||
@$(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-e17: distro/.live-desktop-ru use/x11/e17 use/x11/lightdm/gtk; @:
|
distro/live-gnome: distro/.live-desktop-ru use/systemd use/live/nodm use/x11/3d-proprietary
|
||||||
|
@$(call add,LIVE_PACKAGES,gnome3-default)
|
||||||
|
|
||||||
distro/live-gimp: distro/live-icewm use/live/ru
|
distro/live-cinnamon: distro/.live-desktop-ru use/live/autologin \
|
||||||
|
use/x11/cinnamon use/x11/3d-proprietary; @:
|
||||||
|
|
||||||
|
distro/live-mate: distro/.live-desktop-ru use/live/nodm use/x11/3d-free
|
||||||
|
@$(call add,LIVE_LISTS,openssh $(call tags,(desktop || mobile) && mate))
|
||||||
|
@$(call set,KFLAVOURS,un-def) # the newest one
|
||||||
|
|
||||||
|
distro/live-e17: distro/.live-desktop-ru use/live/autologin \
|
||||||
|
use/x11/e17 use/x11/gdm2.20; @:
|
||||||
|
|
||||||
|
distro/live-gimp: distro/live-icewm use/x11/3d-free use/live/ru
|
||||||
@$(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
|
||||||
|
@@ -1,9 +1,10 @@
|
|||||||
# p7 base kits
|
# p7 base kits
|
||||||
ifeq (distro,$(IMAGE_CLASS))
|
|
||||||
|
|
||||||
mixin/p7:
|
mixin/p7:
|
||||||
@$(call set,BRANDING,altlinux-starterkit)
|
@$(call set,BRANDING,altlinux-starterkit)
|
||||||
|
|
||||||
|
ifeq (distro,$(IMAGE_CLASS))
|
||||||
|
|
||||||
### kludge compatibility: introspection stub for ../main.mk :-/
|
### kludge compatibility: introspection stub for ../main.mk :-/
|
||||||
distro/altlinux-p7-cinnamon: distro/regular-cinnamon mixin/p7; @:
|
distro/altlinux-p7-cinnamon: distro/regular-cinnamon mixin/p7; @:
|
||||||
distro/altlinux-p7-e17: distro/regular-e17 mixin/p7; @:
|
distro/altlinux-p7-e17: distro/regular-e17 mixin/p7; @:
|
||||||
@@ -18,3 +19,7 @@ distro/altlinux-p7-tde: distro/regular-tde mixin/p7; @:
|
|||||||
distro/altlinux-p7-xfce: distro/regular-xfce mixin/p7; @:
|
distro/altlinux-p7-xfce: distro/regular-xfce mixin/p7; @:
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (vm,$(IMAGE_CLASS))
|
||||||
|
vm/altlinux-p7-vm-net: vm/net mixin/p7; @:
|
||||||
|
endif
|
||||||
|
@@ -6,15 +6,12 @@ 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)
|
||||||
|
|
||||||
# graphical target (not enforcing xorg drivers or blobs)
|
# WM base target
|
||||||
distro/.regular-x11: distro/.regular-bare use/x11/wacom +vmguest \
|
distro/.regular-base: distro/.regular-bare +vmguest +live \
|
||||||
use/live/x11 use/live/ru use/live/install use/live/repo use/live/rw \
|
use/live/ru use/live/install use/live/repo use/live/rw \
|
||||||
use/luks use/branding
|
use/luks use/x11/3d-free 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)
|
||||||
@@ -22,7 +19,7 @@ distro/.regular-base: distro/.regular-x11 use/x11/xorg
|
|||||||
# 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/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind +systemd
|
use/systemd use/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind
|
||||||
@$(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)
|
||||||
@@ -30,8 +27,7 @@ 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/init/sysv \
|
distro/regular-icewm: distro/.regular-base use/x11/lightdm/gtk +icewm
|
||||||
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)
|
||||||
|
|
||||||
@@ -40,22 +36,19 @@ 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 +nm; @:
|
distro/regular-xfce: distro/.regular-gtk use/x11/xfce; @:
|
||||||
|
|
||||||
distro/regular-lxde: distro/.regular-gtk use/x11/lxde use/fonts/infinality +nm; @:
|
distro/regular-lxde: distro/.regular-gtk use/x11/lxde use/fonts/infinality
|
||||||
|
@$(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 use/x11/mate +nm
|
distro/regular-mate: distro/.regular-gtk
|
||||||
@$(call add,LIVE_LISTS,$(call tags,mobile mate))
|
@$(call add,LIVE_LISTS,$(call tags,(desktop || mobile) && (mate || nm)))
|
||||||
|
|
||||||
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)
|
||||||
@@ -66,11 +59,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 +nm
|
distro/regular-tde: distro/.regular-desktop +tde +plymouth
|
||||||
|
@$(call add,LIVE_LISTS,$(call tags,desktop nm))
|
||||||
@$(call add,LIVE_PACKAGES,kdegames kdeedu)
|
@$(call add,LIVE_PACKAGES,kdegames kdeedu)
|
||||||
|
|
||||||
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 +pulse +plymouth
|
use/fonts/zerg +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; @:
|
||||||
@@ -81,9 +75,8 @@ 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 +sysvinit +power \
|
distro/regular-server: distro/.regular-bare +installer \
|
||||||
use/install2/fs use/bootloader/lilo use/firmware use/server/mini
|
use/bootloader/grub 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 +systemd; @:
|
distro/live-systemd: distro/.base use/live/base use/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 +systemd
|
distro/server-systemd: distro/server-mini use/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,8 +42,9 @@ 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 +systemd; @:
|
distro/desktop-systemd: distro/icewm use/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
|
||||||
|
20
conf.d/ve.mk
20
conf.d/ve.mk
@@ -1,20 +0,0 @@
|
|||||||
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
|
|
10
conf.d/vm.mk
10
conf.d/vm.mk
@@ -1,14 +1,10 @@
|
|||||||
# virtual machines
|
# virtual machines
|
||||||
ifeq (vm,$(IMAGE_CLASS))
|
ifeq (vm,$(IMAGE_CLASS))
|
||||||
|
|
||||||
vm/bare: vm/.bare
|
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh use/repo
|
||||||
@$(call add,BASE_PACKAGES,apt)
|
@$(call set,VM_SIZE,5368709120) # 5 Gb is enough for everyone
|
||||||
|
|
||||||
vm/net: vm/bare use/vm-net/dhcp use/vm-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 use/deflogin/altlinuxroot \
|
vm/icewm: vm/net use/cleanup/installer +icewm; @:
|
||||||
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/tar2fs
|
** см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2vm
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
=== пример ===
|
=== пример ===
|
||||||
|
11
doc/vm.txt
11
doc/vm.txt
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
*ВНИМАНИЕ:* заключительная операция создания образа жёсткого диска
|
*ВНИМАНИЕ:* заключительная операция создания образа жёсткого диска
|
||||||
из архива с содержимым корневой файловой системы требует доступа
|
из архива с содержимым корневой файловой системы требует доступа
|
||||||
к sudo и разрешения на выполнение скрипта bin/tar2fs в корневом
|
к sudo и разрешения на выполнение скрипта bin/tar2vm в корневом
|
||||||
каталоге метапрофиля при установке mkimage-profiles из пакета
|
каталоге метапрофиля при установке mkimage-profiles из пакета
|
||||||
(это в планах исправить, но подход к libguestfs пока успехом
|
(это в планах исправить, но подход к libguestfs пока успехом
|
||||||
не увенчался).
|
не увенчался).
|
||||||
|
|
||||||
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
|
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
|
||||||
|
|
||||||
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2fs
|
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2vm
|
||||||
|
|
||||||
При работе с локальной копией mkimage-profiles.git следует иметь
|
При работе с локальной копией mkimage-profiles.git следует иметь
|
||||||
в виду, что предоставлять недоверенному пользователю право выполнять
|
в виду, что предоставлять недоверенному пользователю право выполнять
|
||||||
@@ -25,10 +25,3 @@
|
|||||||
Пример сборки и запуска 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 dirs;
|
# second, care for toplevel and tagged script dirs;
|
||||||
# then handle feature generator scripts
|
# then handle two more ways of implementing a feature
|
||||||
#
|
#
|
||||||
# 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,11 +58,6 @@ 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 \
|
||||||
@@ -76,13 +71,6 @@ $(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"; \
|
||||||
@@ -90,9 +78,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 "$$srcdir/" "$(BUILDDIR)/$$dst/"; \
|
rsync -qab --exclude tagged \
|
||||||
|
"$$srcdir/" "$(BUILDDIR)/$$dst/"; \
|
||||||
done; \
|
done; \
|
||||||
fi; \
|
fi; \
|
||||||
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
||||||
@@ -110,7 +98,7 @@ $(FEATURES):
|
|||||||
done; \
|
done; \
|
||||||
popd >&/dev/null; \
|
popd >&/dev/null; \
|
||||||
done; \
|
done; \
|
||||||
if [ -n "$$dst" -a "$$dst" != "." ]; then \
|
if [ -n "$$dst" ]; then \
|
||||||
the="$$sub subprofile"; \
|
the="$$sub subprofile"; \
|
||||||
else \
|
else \
|
||||||
the="toplevel"; \
|
the="toplevel"; \
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
Поддержка SolidRun Cubox в расчёте на подключенный по HDMI дисплей FullHD.
|
|
@@ -1,2 +0,0 @@
|
|||||||
use/armh-cubox: use/armh-dovefb
|
|
||||||
@$(call add_feature)
|
|
@@ -1,19 +0,0 @@
|
|||||||
#!/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 +0,0 @@
|
|||||||
Эта фича обеспечивает начальное конфигурирование Marvell Dove GPU.
|
|
@@ -1,3 +0,0 @@
|
|||||||
use/armh-dovefb:
|
|
||||||
@$(call add_feature)
|
|
||||||
@$(call add,THE_PACKAGES,xorg-drv-dovefb)
|
|
@@ -1,106 +0,0 @@
|
|||||||
#!/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 +0,0 @@
|
|||||||
Эта фича конфигурирует специфические для Google/ASUS Nexus7 аспекты.
|
|
@@ -1,2 +0,0 @@
|
|||||||
use/armh-nexus7:
|
|
||||||
@$(call add_feature)
|
|
@@ -1,172 +0,0 @@
|
|||||||
#!/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 +0,0 @@
|
|||||||
Эта фича предназначена для базовой поддержки систем на чипсете NVIDIA Tegra3.
|
|
@@ -1,2 +0,0 @@
|
|||||||
use/armh-tegra3:
|
|
||||||
@$(call add_feature)
|
|
@@ -1,28 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,2 +0,0 @@
|
|||||||
Эта фича занимается тем подмножеством необходимой для ARM-образов
|
|
||||||
функциональности, которую получается как-то обобщить.
|
|
@@ -1,2 +0,0 @@
|
|||||||
use/armh: use/control/sudo-su
|
|
||||||
@$(call add_feature)
|
|
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
echo 'HWCLOCK_SET_TIME_AT_START=false' >> /etc/sysconfig/clock
|
|
@@ -1,48 +0,0 @@
|
|||||||
#!/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
|
|
||||||
|
|
||||||
:
|
|
@@ -1,40 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# poor man's root switch
|
|
||||||
# NB: 50-users creates predefined users
|
|
||||||
|
|
||||||
cat >> /etc/openssh/sshd_config << EOF
|
|
||||||
PermitRootLogin yes
|
|
||||||
UseDNS no
|
|
||||||
EOF
|
|
@@ -1,7 +0,0 @@
|
|||||||
#!/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,8 +1,7 @@
|
|||||||
# 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
|
||||||
# care to exclude non-directories holding no makefiles like rootfs
|
SUBDIRS = $(SUBPROFILE_DIRS)
|
||||||
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)
|
||||||
@@ -24,7 +23,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 "$(META_VOL_ID)" >files/.disk/info
|
@echo "ALT Linux based" >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,5 +1,4 @@
|
|||||||
Эта фича конфигурирует создание образа виртуального окружения (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: sub/rootfs@/
|
use/build-ve:
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
|
@@ -8,14 +8,10 @@ ifeq (cpio,$(IMAGE_PACKTYPE))
|
|||||||
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
|
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# some VEs _can_ contain kernels (think ARM multiboot
|
IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
|
||||||
# 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,3 +1,4 @@
|
|||||||
# hooked from ../../lib/sugar.mk
|
# hooked from ../../lib/sugar.mk
|
||||||
use/build-vm: sub/rootfs@/ use/kernel use/deflogin
|
use/build-vm:
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
|
@$(call xport,ROOTPW)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# copy tar2fs helper into generated profile to enable standalone builds
|
# copy tar2vm helper into generated profile to enable standalone builds
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@install -pD $(MKIMAGE_PROFILES)/bin/tar2fs $(BUILDDIR)/bin/tar2fs
|
@install -pD $(MKIMAGE_PROFILES)/bin/tar2vm $(BUILDDIR)/bin/tar2vm
|
||||||
|
11
features.in/build-vm/image-scripts.d/00-root
Executable file
11
features.in/build-vm/image-scripts.d/00-root
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/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
|
3
features.in/build-vm/image-scripts.d/90-firsttime
Executable file
3
features.in/build-vm/image-scripts.d/90-firsttime
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Run scripts from /etc/firsttime.d at first start
|
||||||
|
[ -f "/var/lock/TMP_1ST" ] || touch "/var/lock/TMP_1ST"
|
@@ -1,17 +1,19 @@
|
|||||||
# step 4: build the virtual machine image
|
# step 4: build the virtual machine image
|
||||||
|
|
||||||
IMAGE_PACKAGES = $(DOT_BASE) \
|
IMAGE_PACKAGES = $(SYSTEM_PACKAGES) \
|
||||||
$(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
|
|
||||||
VM_SIZE ?= 0
|
ifeq (,$(ROOTPW))
|
||||||
|
$(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 \
|
||||||
@@ -20,9 +22,9 @@ check-sudo:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
prepare-image: check-sudo
|
prepare-image: check-sudo
|
||||||
@if ! sudo $(TOPDIR)/bin/tar2fs \
|
@if ! sudo $(TOPDIR)/bin/tar2vm \
|
||||||
"$(VM_TARBALL)" "$(VM_RAWDISK)" $(VM_SIZE) $(VM_FSTYPE); then \
|
"$(VM_TARBALL)" "$(VM_RAWDISK)" $$VM_SIZE; then \
|
||||||
echo "** error: sudo tar2fs failed, see also doc/vm.txt" >&2; \
|
echo "** error: sudo tar2vm failed, see also doc/vm.txt" >&2; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -41,6 +43,7 @@ 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)
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
Эта фича предоставляет интерфейс для конфигурирования дистрибутивных
|
|
||||||
значений по умолчанию control(8); см. тж. http://altlinux.org/control
|
|
@@ -1,8 +0,0 @@
|
|||||||
use/control:
|
|
||||||
@$(call add_feature)
|
|
||||||
@$(call add,THE_PACKAGES,control)
|
|
||||||
@$(call xport,CONTROL)
|
|
||||||
|
|
||||||
# some presets
|
|
||||||
use/control/sudo-su:
|
|
||||||
@$(call add,CONTROL,su:public sudo:public)
|
|
@@ -1,11 +0,0 @@
|
|||||||
#!/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
|
|
||||||
:
|
|
@@ -1,4 +0,0 @@
|
|||||||
Эта фича конфигурирует root login и пользователей по умолчанию.
|
|
||||||
|
|
||||||
ВНИМАНИЕ: применяйте разумно, т.к. крайне легко создать и оставить
|
|
||||||
дыру в безопасности!
|
|
@@ -1,29 +0,0 @@
|
|||||||
# 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)
|
|
@@ -1,10 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,33 +0,0 @@
|
|||||||
#!/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,7 +1,6 @@
|
|||||||
use/dev: use/control
|
use/dev:
|
||||||
@$(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,6 +28,7 @@ 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"
|
||||||
|
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
Эта фича конфигурирует поддержку клиента домена ALT Linux.
|
|
||||||
|
|
||||||
NB: не проверена на инсталяторах!
|
|
@@ -1,4 +0,0 @@
|
|||||||
use/domain-client: use/net/dhcp
|
|
||||||
@$(call add_feature)
|
|
||||||
@$(call add,THE_LISTS,domain-client)
|
|
||||||
@$(call add,DEFAULT_SERVICES_ENABLE,avahi-daemon)
|
|
@@ -1,10 +0,0 @@
|
|||||||
#!/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"
|
|
@@ -1,6 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,117 +0,0 @@
|
|||||||
#!/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
|
|
||||||
|
|
@@ -18,11 +18,9 @@ use/efi/refind: use/efi
|
|||||||
@$(call set,EFI_BOOTLOADER,refind)
|
@$(call set,EFI_BOOTLOADER,refind)
|
||||||
|
|
||||||
use/efi/signed: use/efi
|
use/efi/signed: use/efi
|
||||||
@$(call set,MKI_VER_MINIMAL,0.2.7) # refind->elilo handoff
|
@$(call set,MKI_VER_MINIMAL,0.2.7) # refind->elilo handoff ### 0.2.11
|
||||||
@$(call set,EFI_CERT,altlinux)
|
@$(call set,EFI_CERT,altlinux)
|
||||||
@$(call add,THE_PACKAGES,shim-signed)
|
@$(call add,THE_PACKAGES,shim-signed)
|
||||||
@$(call set,EFI_SHELL,efi-shell-signed) # even more useful
|
|
||||||
@$(call add,RESCUE_PACKAGES,refind-signed)
|
|
||||||
@$(call add,RESCUE_PACKAGES,openssl sbsigntools)
|
@$(call add,RESCUE_PACKAGES,openssl sbsigntools)
|
||||||
|
|
||||||
use/efi/shell: use/efi
|
use/efi/shell: use/efi
|
||||||
|
@@ -1,4 +0,0 @@
|
|||||||
#!/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
|
||||||
|
|
||||||
grep -q efivars /etc/modules || echo efivars >> /etc/modules
|
echo efivars >> /etc/modules
|
||||||
|
@@ -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 but let's not skip that for consistency
|
# nothing configured to add_feature, let's skip that this time
|
||||||
use/fonts/infinality: use/fonts
|
use/fonts/infinality:
|
||||||
@$(call add,THE_PACKAGES,libfreetype-infinality fontconfig-infinality)
|
@$(call add,THE_PACKAGES,libfreetype-infinality fontconfig-infinality)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
use/homeros: use/control/sudo-su
|
use/homeros:
|
||||||
@$(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)
|
||||||
|
@@ -2,3 +2,5 @@
|
|||||||
|
|
||||||
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,11 +0,0 @@
|
|||||||
Эта фича определяет систему инициализации, которая будет использована
|
|
||||||
в пользовательской среде (livecd, установленный дистрибутив, vm).
|
|
||||||
Она не влияет на состав инсталятора и rescue-образа.
|
|
||||||
|
|
||||||
Обратите внимание: как и с use/bootloader/%, в силу особенностей make
|
|
||||||
переключение в каждую позицию возможно лишь один раз, далее эта цель
|
|
||||||
считается достигнутой и при последующих вызовах не отрабатывает.
|
|
||||||
|
|
||||||
См. тж.:
|
|
||||||
http://altlinux.org/sysvinit
|
|
||||||
http://altlinux.org/systemd
|
|
@@ -1,14 +0,0 @@
|
|||||||
+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)
|
|
@@ -1,25 +0,0 @@
|
|||||||
#!/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'
|
|
@@ -9,5 +9,7 @@ use/kernel:
|
|||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call set,KFLAVOURS,std-def)
|
@$(call set,KFLAVOURS,std-def)
|
||||||
|
|
||||||
|
# r8168 is a kludge, never install it by default
|
||||||
use/kernel/net:
|
use/kernel/net:
|
||||||
@$(call add,THE_KMODULES,e1000e igb r8168 rtl8168)
|
@$(call add,THE_KMODULES,e1000e igb)
|
||||||
|
@$(call add,MAIN_KMODULES,r8168 rtl8168)
|
||||||
|
@@ -2,8 +2,3 @@
|
|||||||
специфическими для полноценного 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/rootfs@live sub/stage2@live
|
use/live: use/stage2 sub/stage2@live
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call add,CLEANUP_PACKAGES,'installer*')
|
@$(call add,CLEANUP_PACKAGES,'installer*')
|
||||||
|
|
||||||
@@ -17,18 +17,19 @@ else
|
|||||||
use/live/rw: use/live; @:
|
use/live/rw: use/live; @:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# graphical target (not enforcing xorg drivers or blobs)
|
# a very simplistic one
|
||||||
use/live/x11: use/live/base use/x11-autologin use/sound +power +efi
|
use/live/x11: use/live use/firmware use/x11/xorg
|
||||||
|
@$(call add,LIVE_PACKAGES,xinit)
|
||||||
|
|
||||||
|
# optimized out: use/x11/xorg
|
||||||
|
use/live/desktop: use/live/base use/x11/wacom use/live/sound \
|
||||||
|
+vmguest +power +efi
|
||||||
@$(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)
|
||||||
@@ -40,7 +41,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/xdg-user-dirs use/syslinux/localboot.cfg
|
use/live/install: use/metadata 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)
|
||||||
|
|
||||||
@@ -48,21 +49,20 @@ use/live/install: use/metadata use/xdg-user-dirs 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)
|
||||||
|
|
||||||
# a very simplistic one
|
# NB: there's an unconditional live/image-scripts.d/40-autologin script
|
||||||
use/live/.x11: use/live use/x11 use/x11-autologin
|
# *but* it only configures some of the *existing* means; let's add one
|
||||||
@$(call add,LIVE_PACKAGES,xinit)
|
# or another for the cases when there should be no display manager
|
||||||
|
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,7 +53,6 @@ bridge
|
|||||||
clamd
|
clamd
|
||||||
crond
|
crond
|
||||||
dhcpd
|
dhcpd
|
||||||
dmeventd
|
|
||||||
dnsmasq
|
dnsmasq
|
||||||
lvm2-lvmetad
|
lvm2-lvmetad
|
||||||
lvm2-monitor
|
lvm2-monitor
|
||||||
|
12
features.in/live/live/image-scripts.d/35-xdg-user-dirs
Executable file
12
features.in/live/live/image-scripts.d/35-xdg-user-dirs
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/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
|
@@ -21,8 +21,6 @@ backup() {
|
|||||||
cp -av "$1" "$1$BAK"
|
cp -av "$1" "$1$BAK"
|
||||||
}
|
}
|
||||||
|
|
||||||
## this is only relevant for installable livecd
|
|
||||||
### FIXME: this shouldn't proceed in other cases!
|
|
||||||
restore_later() {
|
restore_later() {
|
||||||
[ -n "$1" ] || return 0
|
[ -n "$1" ] || return 0
|
||||||
|
|
||||||
@@ -39,6 +37,13 @@ restore_later() {
|
|||||||
chmod +x "$hook"
|
chmod +x "$hook"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## setup runlevel
|
||||||
|
INITTAB=/etc/inittab
|
||||||
|
if [ -f "$INITTAB" ]; then
|
||||||
|
[ -z "$runlevel" ] && runlevel=5
|
||||||
|
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
|
||||||
|
fi
|
||||||
|
|
||||||
## autologin^2
|
## autologin^2
|
||||||
AUTOLOGIN_CFG=/etc/sysconfig/autologin
|
AUTOLOGIN_CFG=/etc/sysconfig/autologin
|
||||||
if [ -x /usr/sbin/autologin ]; then
|
if [ -x /usr/sbin/autologin ]; then
|
@@ -1,6 +1,6 @@
|
|||||||
+ltsp: use/ltsp/base; @:
|
+ltsp: use/ltsp/base; @:
|
||||||
|
|
||||||
use/ltsp: use/sound
|
use/ltsp:
|
||||||
@$(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)
|
||||||
|
@@ -9,22 +9,25 @@ WHATEVER += metadata
|
|||||||
# handle these too
|
# handle these too
|
||||||
DOT_BASE += $(BASE_PACKAGES_REGEXP)
|
DOT_BASE += $(BASE_PACKAGES_REGEXP)
|
||||||
|
|
||||||
# args: name, suffix, command
|
# args: type, name
|
||||||
define dump-THEM
|
define dump
|
||||||
if [ -n "$($(1)_$(2))" ]; then echo -e "\n## $(1)_$(2)"; $(3) $($(1)_$(2)); fi;
|
if [ -n "$($(2)_$(1))" ]; then \
|
||||||
|
echo -e "\n## $(2)_$(1)"; \
|
||||||
|
case "$(1)" in \
|
||||||
|
PACKAGES) echo "$($(2)_$(1))";; \
|
||||||
|
LISTS) cat $($(2)_$(1));; \
|
||||||
|
esac; \
|
||||||
|
fi;
|
||||||
endef
|
endef
|
||||||
|
|
||||||
dump-PACKAGES = $(call dump-THEM,$(1),PACKAGES,echo)
|
|
||||||
dump-LISTS = $(call dump-THEM,$(1),LISTS,cat)
|
|
||||||
|
|
||||||
# BASE_PACKAGES, BASE_LISTS and whatever else goes into base install;
|
# BASE_PACKAGES, BASE_LISTS and whatever else goes into base install;
|
||||||
# thus construct requisite .base packagelist for alterator-pkg
|
# thus construct requisite .base packagelist for alterator-pkg
|
||||||
metadata-.base:
|
metadata-.base:
|
||||||
@cd $(call list,/); \
|
@cd $(call list,/); \
|
||||||
{ \
|
{ \
|
||||||
echo "## generated by features.in/metadata/lib/50-metadata.mk"; \
|
echo "## generated by features.in/metadata/lib/50-metadata.mk";\
|
||||||
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
|
$(foreach p,SYSTEM COMMON THE BASE,$(call dump,PACKAGES,$(p))) \
|
||||||
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
|
$(foreach l,THE BASE,$(call dump,LISTS,$(l))) \
|
||||||
if [ -n "$(DOT_BASE)" ]; then \
|
if [ -n "$(DOT_BASE)" ]; then \
|
||||||
echo -e "\n## DOT_BASE\n$(DOT_BASE)"; \
|
echo -e "\n## DOT_BASE\n$(DOT_BASE)"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
Эта фича позволяет задать конфигурацию Ethernet-интерфейсов.
|
|
@@ -1,9 +0,0 @@
|
|||||||
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
|
|
@@ -1,51 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,5 +0,0 @@
|
|||||||
Эта фича выполняет предварительное конфигурирование системы
|
|
||||||
для работы плагинов файл-менеджеров, реализующих взаимодействие
|
|
||||||
с Samba-сервером для динамического создания разделяемых файловых
|
|
||||||
ресурсов ("пользовательских шар"). Без добавления соответствующего
|
|
||||||
файл-менеджера и нужного плагина смысла не имеет.
|
|
@@ -1,5 +0,0 @@
|
|||||||
# 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)
|
|
@@ -1,36 +0,0 @@
|
|||||||
#!/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
|
|
@@ -1,2 +0,0 @@
|
|||||||
Эта фича конфигурирует базовую поддержку сети, включая нужную подсистему
|
|
||||||
(etcnet, NetworkManager поверх etcnet или connman).
|
|
@@ -1,17 +0,0 @@
|
|||||||
+nm: use/net/nm; @:
|
|
||||||
|
|
||||||
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/connman: use/net
|
|
||||||
@$(call add,THE_PACKAGES,connman)
|
|
||||||
@$(call add,DEFAULT_SERVICES_ENABLE,connman)
|
|
@@ -1,2 +0,0 @@
|
|||||||
Эта фича обеспечивает автоматический запуск предварительной настройки,
|
|
||||||
характерный для OEM-образов.
|
|
@@ -1,5 +0,0 @@
|
|||||||
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)
|
|
@@ -1,12 +0,0 @@
|
|||||||
#!/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
|
|
||||||
|
|
||||||
:
|
|
@@ -1,15 +0,0 @@
|
|||||||
Данная фича конфигурирует автоматический запуск сервисов
|
|
||||||
при загрузке системы.
|
|
||||||
|
|
||||||
Поскольку в конкретном образе может быть желательно перекрыть
|
|
||||||
умолчания предыдущей конфигурации, рекомендуется в фичах работать
|
|
||||||
с переменными DEFAULT_SERVICES_* и оставить переменные SERVICES_*
|
|
||||||
для релиз-менеджеров.
|
|
||||||
|
|
||||||
Выключение сервиса в каждой из этих пар имеет приоритет перед
|
|
||||||
включением.
|
|
||||||
|
|
||||||
Внимание: фича опирается на субпрофиль rootfs, он должен быть
|
|
||||||
задействован в каком-либо качестве, чтобы ожидаемое произошло.
|
|
||||||
На данный момент действие rootfs не распространяется на системы,
|
|
||||||
устанавливаемые при помощи install2.
|
|
@@ -1,12 +0,0 @@
|
|||||||
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)
|
|
||||||
|
|
||||||
# some presets
|
|
||||||
|
|
||||||
use/services/ssh: use/services use/net
|
|
||||||
@$(call add,THE_LISTS,openssh)
|
|
||||||
@$(call add,DEFAULT_SERVICES_ENABLE,sshd)
|
|
@@ -1,35 +0,0 @@
|
|||||||
#!/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,10 +1,7 @@
|
|||||||
use/slinux: use/x11/xfce
|
use/slinux: use/x11/xfce use/x11/gdm2.20
|
||||||
@$(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)
|
||||||
@@ -16,9 +13,8 @@ use/slinux/base: use/slinux use/x11/gdm2.20 +pulse
|
|||||||
@$(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/base +systemd +wireless \
|
use/slinux/full: use/isohybrid use/slinux use/systemd +wireless \
|
||||||
use/branding/complete use/x11/3d; @:
|
use/branding/complete use/x11/drm use/x11/3d-proprietary
|
||||||
|
@$(call add,THE_PACKAGES,apt-conf-sisyphus)
|
||||||
use/slinux/arm: use/slinux use/x11/lightdm/gtk
|
|
||||||
@$(call add,THE_LISTS,slinux/arm)
|
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
Эта фича добавляет поддержку аудиоподсистемы (как ядерную,
|
|
||||||
если не включена в kernel-image, так и утилиты).
|
|
@@ -1,15 +0,0 @@
|
|||||||
+pulse: use/sound/pulse; @:
|
|
||||||
|
|
||||||
# common ALSA based part
|
|
||||||
use/sound:
|
|
||||||
@$(call add_feature)
|
|
||||||
@$(call add,THE_KMODULES,alsa)
|
|
||||||
@$(call add,THE_PACKAGES,amixer alsa-utils aplay)
|
|
||||||
|
|
||||||
# "bare" ALSA (which is good enough for many of us) with persistent levels
|
|
||||||
use/sound/alsa: use/sound
|
|
||||||
@$(call add,THE_PACKAGES,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;
|
||||||
в настоящее время является устаревшей, см. ../init/
|
см. тж. http://www.altlinux.org/systemd
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
use/systemd: use/init/systemd
|
use/systemd:
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(warning deprecated, see init feature)
|
@$(call add,COMMON_PACKAGES,systemd systemd-units systemd-sysvinit)
|
||||||
|
@$(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