Compare commits

...

27 Commits

Author SHA1 Message Date
Michael Shigorin
386c1b14a3 1.1.0-alt1
- 1.1.x branch: public alpha development status
  + new subprofile: rootfs
  + new features: armh*, deflogin, init, services
  + refactored features: build-*, efi, fonts, live, x11*
  + tar2vm got rewritten as tar2fs, gained ARM support
- minor spec metadata update
2013-06-17 20:12:57 +04:00
Michael Shigorin
ccc6486417 main.mk, build.mk: tweaks for error reporting
I've finally moved away from LC_MESSAGES=C on my main
development system half a year ago and finally spotted
that a grep for "Stop\.$" stopped to yield anything now.
2013-06-17 19:29:12 +04:00
Michael Shigorin
d6c663bf02 desktop+regular: exclude alterator-x11
It's neither reasonable nor installable on ARM,
so far dropping it is better than any workarounds.
2013-06-17 19:29:12 +04:00
Michael Shigorin
9269e83382 extended cubox-xfce with simply packagelists
Those based on x86 ones but pruned according to armh repo
presence; most notably, these are missing:

compiz compiz-gtk
java-1.6.0-sun mozilla-plugin-java-1.6.0-sun
libreoffice
remmina
xfcalendar
yagf
2013-06-17 19:29:12 +04:00
Michael Shigorin
000848bb97 armh.mk: initial cubox images
These are intended to run on Cubox ARM systems.
Tough childhood, plastic toys...
2013-06-17 19:29:12 +04:00
Michael Shigorin
7dae342db1 initial armh-cubox feature
This one cares for SolidRun Cubox support.
2013-06-17 19:29:12 +04:00
Michael Shigorin
6daf50b4c9 initial armh-dovefb feature
This one cares for the less platform-specific aspects
of Marvell Dove platform support.
2013-06-17 19:29:12 +04:00
Michael Shigorin
7409aa2fc1 armh: added umkimage support
It was actually done much earlier during an experiment with
Marvell ArmadaXP but is now integrated more or less properly.

NB: ext2 is not needed anymore (uboot should do it),
ext4 should become configurable by an existing knob.
2013-06-17 19:29:12 +04:00
Michael Shigorin
61ecd095bb x11: added use/x11/mate target
It was implemented in a pretty quick-and-dirty way
for regular-mate back then, clean things up a bit.
Package lists should be deduplicated either but
that's another story.
2013-06-17 19:29:12 +04:00
Michael Shigorin
e532dedc7a slinux/misc: drop an obsolete package
gdm-theme-simply is still around but turns out that it counts
on gdm2.20 (providing gdm) to be installed, and it is not;
thus gdm-3 is actually pulled in and it doesn't work here.

The package should be dropped from Sisyphus probably,
let's drop it here anyways.
2013-06-17 19:29:12 +04:00
Michael Shigorin
d7689f30c7 tar2vm: rewrote as tar2fs
Overview of the changes:
- ARM support: separate ext2 /boot, no LILO
- avoid race condition with devmapper
- trap ERR so that -e in shebang doesn't result in extra cleanup hassle
- configurable root filesystem type (ext4 by default)
- jumps through parted hoops

Details:

1. LILO is x86-specific while the rest of the script can be used
   to prepare e.g. Marvell ArmadaXP or CuBox images; we can generally
   count on uboot supporting ext2 for relatively sane platforms but
   not ext4 that would be a better root filesystem performance-wise.

2. Apparently /dev/mapper/loopXpY can be still missing at the time
   when kpartx returns and pop up a bit later... sit there, wait
   and check for it.

3. If something went wrong with any command of the script it would bail out
   due to -e in shebang; it is now better to clean up the loopback device
   and its mappings in this situation either.

4. One size doesn't fit all, really.

5. The parted sizing was sloppy as in broken, now it's just half insane.
   Someone's decision to stick units and auto-alignment knobs into
   a single one was apparently hilarious...

   http://www.gnu.org/software/parted/manual/parted.html#unit

Manual loop/dm cleanup is described in documentation just in case.

/boot size meter is suboptimal in terms of additional I/O incurred,
will be most likely rewritten to make use of advance "du -s".
2013-06-17 19:29:11 +04:00
Michael Shigorin
ef02d479f7 stage1: add ehci_marvell to modules
This is ARM-specific (more specifically, Marvell ArmadaXP-specific
for me right now) but doesn't hurt if the module is absent.
2013-06-17 19:29:11 +04:00
Michael Shigorin
3770ca2260 metadata: fix a tiny bitrot
The generated comment went wrong when the script was renamed.
2013-06-17 19:29:11 +04:00
Michael Shigorin
72bc5d0539 pkg/lists: tweak Makefile to expand variables
The issue at hand is the hack to be employed in the init feature:

	@$(call add,THE_LISTS,$$(INIT_TYPE))

where INIT_TYPE is set separately; $(value $V) would leave that kind
of substitution unmolested while we would actually need it done.
2013-06-17 19:29:11 +04:00
Michael Shigorin
a00267ab8b live: disable dmeventd by default too
A service a day makes the boot a long wait!
2013-06-17 19:29:11 +04:00
Michael Shigorin
f6b9223b22 live.mk, test.mk: drop obsolete targets
live-{gnome,cinnamon,mate,sugar} have been superseded by regular-*
(see regular.mk); live-mate-systemd has no sense now either.
2013-06-17 16:01:35 +04:00
Michael Shigorin
0d8e44d8fd x11-autologin: factor out x11-autostart
It has value of its own and can be used standalone;
autologin does require autostart though.

Adjust x11 feature targets accordingly.
2013-06-17 16:01:35 +04:00
Michael Shigorin
b683d5d751 live: factor out x11-autologin
Hardly belonged there in the first place and became a culprit
during armh branch development since it had to be forked in
an ugly manner; move to rootfs hooks and be done with it.

VM images will be able to benefit either *but* installed systems
might have some trouble when this is implemented:
http://lists.altlinux.org/pipermail/devel/2013-May/197447.html

Split off use/live/x11 as a common free/proprietary ground either
(this refactoring had to be performed in parallel with x11 feature
being revamped, diffs quickly became intertangled unfortunately).
2013-06-17 16:01:35 +04:00
Michael Shigorin
ea8a908931 x11: driver and purpose related refactoring
This has had several goals:
- a target suitable for x86 and armh providing a rather
  minimal set of base xorg packages and generic drivers;
- task-oriented targets for graphics use cases:
  + "desktop" means rather 2D focus with 3D being welcome
    or even essential but not performance critical, thus
    "a slower driver is fine as long as it does work";
  + "3d" means specific 3D performance being critical,
    that is "no 3D means no use at all".

Regarding the free and proprietary 3D-capable drivers:
the previous idea was to split out some common ground
and then add the contenders on top of that; the current
approach is based on the observation that the live images
requiring proprietary NVIDIA/AMD drivers *by default*
are usually of not much use with hardware that lacks
proper 3D acceleration (like Tseng cards) or the driver
support for that (like Matrox these days).

Intel videodriver makes for a special case though:
it is both free and top-notch performer.

Thanks sem@ and boyarsh@ for discussion.

PS: xorg-drv-{keyboard,mouse,void} dropped;
those who need these can usually help themselves.
2013-06-17 16:01:35 +04:00
Michael Shigorin
d9ca33af6d initial armh* features
These handle only VE-like products (think TWRP on Nexus 7);
the proper image support should be backported later on.

An experiment in layered configurations is still in its
early stages regarding ARM zoo...
2013-06-17 16:01:35 +04:00
Michael Shigorin
d22c793ee9 initial deflogin feature (security sensitive!)
The feature officially introduces the "engineering passwords"
including empty ones which have been around since forever but
weren't properly managed (and still are not, at least until
there are no stray passwd/chpasswd/usermod calls in both the
profile, installer-features and all the other related parts).

It is based on an m-p-d init3-users script by stanv@ but was
cleaned up and restructured in a pretty severe manner; thanks
glebfm@ for additional discussion.

This also cleans up the kludge previously stuck into build-vm.

Note that vm/icewm sports graphical autologin now as well as
the default root password (which can be overridden by passing
ROOTPW=... to make but it is a change from the previous state
of affairs indeed).
2013-06-17 14:03:54 +04:00
Michael Shigorin
b337e72ead initial init feature
This one is finally there and should help reduce the
systemd-induced mess in package lists and specifications.
2013-06-17 14:03:54 +04:00
Michael Shigorin
f1a165bbd6 fonts: consistency tweak
The issue is that use/fonts/infinality doesn't actually
require the script hook thus registering the feature's
name in FEATURES variable so that the feature's contents
get copied over is not neccessary (distcfg.mk build-up
will have happened anyways).

But that's confusing if one's forgot this peculiarity
(like me today) or never knew of it, so let's spare
some frustration.
2013-06-17 14:03:54 +04:00
Michael Shigorin
8d26de28a3 efi: generalize (stage2 += rootfs)
This feature is more generally applicable indeed;
might result in duplication due to the installer
components adding "efivars" independently but that
is to be sorted out later in those components:
- check whether it's added already sometime soon;
- maybe stop adding that at some point in the future.

install2 and rescue roots still need this too though.
2013-06-17 14:03:53 +04:00
Michael Shigorin
3e1685aeb6 fonts: generalize (stage2 -> rootfs)
This feature should be more generally applicable indeed.
2013-06-17 14:03:53 +04:00
Michael Shigorin
ee5dd31a71 build-{ve,vm}: handle THE_* and DOT_BASE too
Classic VEs don't carry any kernel since these are running
under a single OpenVZ (or potentially LXC) kernel image;
ARM Multiboot (TWRP in this particular case) allows to boot
off a chroot via kexec, and we need a kernel in it for that,
obviously.

No bootloader required inside such VE though.
2013-06-17 14:03:53 +04:00
Michael Shigorin
67adab492f initial rootfs subprofile and services feature
This subprofile is akin to THE_* variables family: the configuration
bits and script hooks sitting there influence whatever chroot is
declared to be the user facing one in the end, whether it comes
from vm image or live subprofile.

The services feature ought to be a changeset of its own which would
be based on rootfs and become the base for ve/vm changes but I chose
to just do it atomically; some pre-existing duplicates are pruned now.
2013-06-17 14:03:53 +04:00
92 changed files with 1530 additions and 344 deletions

View File

@@ -1,12 +1,12 @@
Name: mkimage-profiles
Version: 1.0.0
Version: 1.1.0
Release: alt1
Summary: ALT Linux based distribution metaprofile
License: GPLv2+
Group: Development/Other
Url: http://www.altlinux.org/Mkimage/Profiles/m-p
Url: http://altlinux.org/m-p
Source: %name-%version.tar
Packager: Michael Shigorin <mike@altlinux.org>
@@ -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
a lot of passion and knowledge to produce a non-trivial one. So m-p
(the short nick for mkimage-profiles) is complex too. If you need
(the short alias for mkimage-profiles) is complex too. If you need
-- or want -- to make just a few tweaks to an existing recipe, it might
be easier to comprehend the generated profile (aka builddir) which
contains only the needed subprofiles, script hooks and package lists
@@ -78,6 +78,14 @@ cp -a * %buildroot%mpdir
%doc %docs/*
%changelog
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.1.0-alt1
- 1.1.x branch: public alpha development status
+ new subprofile: rootfs
+ new features: armh*, deflogin, init, services
+ refactored features: build-*, efi, fonts, live, x11*
+ tar2vm got rewritten as tar2fs, gained ARM support
- minor spec metadata update
* Mon Jun 17 2013 Michael Shigorin <mike@altlinux.org> 1.0.0-alt1
- 1.0

236
bin/tar2fs Executable file
View File

@@ -0,0 +1,236 @@
#!/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
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 (note the final ceil rounding to megabytes)
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))"
# image and /boot sizes in megabytes
ROOTSIZEM="$(($ROOTSIZE / $MB))"
BOOTSIZEM="$((($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

View File

@@ -1,134 +0,0 @@
#!/bin/bash -e
# usage:
# tar2vm chroot.tar image.raw [size_in_bytes]
. shell-error
if [ $# -lt 2 ]; then
fatal "error: tar2vm needs at least two arguments"
fi
# this needs env_keep sudo setup to actually work
if [ -n "$GLOBAL_BUILDDIR" ]; then
WORKDIR="$GLOBAL_BUILDDIR/vmroot"
else
WORKDIR="$(mktemp --tmpdir -d vmroot-XXXXX)"
fi
[ -n "$WORKDIR" ] || fatal "couldn't come up with suitable WORKDIR"
[ -n "$GLOBAL_DEBUG" ] || message "WORKDIR: $WORKDIR"
# a tarball containing chroot with a kernel
TAR="$1"
[ -s "$TAR" ] || fatal "source tarball doesn't really exist"
# a path to the image to be generated
IMG="$2"
[ -d "$(dirname "$IMG")" ] || fatal "target directory doesn't exist"
# image size in bytes (256M is a fallback)
TARSIZE="$(stat -Lc %s "$TAR")"
DEFSIZE="$((2 * $TARSIZE))"
DISKSIZE="${3:-${DEFSIZE:-268435456}}"
# ...and in megabytes
DISKSIZEM="$(($DISKSIZE / 1048576))"
# tested to work: ext[234], jfs
# NB: xfs doesn't have a spare sector for the bootloader
ROOTFSTYPE="${4:-ext4}"
# single root partition hardwired so far,
# add another image for swap if needed
ROOTDEV="/dev/sda1"
# last preparations...
for i in losetup sfdisk parted kpartx mkfs."$ROOTFSTYPE"; do
if ! type -t "$i" >&/dev/null; then
fatal "$i required but not found"
fi
done
LOOPDEV="$(losetup --find)"
ROOTFS="$WORKDIR/chroot"
exit_handler()
{
rc=$?
if [ -n "$ROOTFS" ]; then
umount "$ROOTFS"{/dev,/proc,/sys,}
if [ -n "$LOOPDEV" ]; then
kpartx -d "$LOOPDEV"
losetup --detach "$LOOPDEV"
fi
rm -r -- "$ROOTFS"
rmdir -- "$WORKDIR"
fi
exit $rc
}
trap exit_handler EXIT
# prepare disk image and a filesystem inside it
rm -f -- "$IMG"
dd if=/dev/zero of="$IMG" conv=notrunc \
bs=1 count=1 seek="$(($DISKSIZE - 1))"
losetup "$LOOPDEV" "$IMG"
parted --script "$LOOPDEV" mklabel msdos
parted --script "$LOOPDEV" mkpart primary ext2 1 "$DISKSIZEM"
kpartx -a "$LOOPDEV"
LOOPDEV1="/dev/mapper/$(basename "$LOOPDEV")p1"
mkfs."$ROOTFSTYPE" "$LOOPDEV1"
# mount and populate it
mkdir -pm755 "$ROOTFS"
mount "$LOOPDEV1" "$ROOTFS"
tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
for i in /dev /proc /sys; do mount --bind "$i" "$ROOTFS$i"; done
# NB: different storage modules might be needed for non-kvm
echo "$LOOPDEV1 / $ROOTFSTYPE defaults 1 1" >> "$ROOTFS/etc/fstab"
echo "MODULES_PRELOAD=sd_mod ata_piix $ROOTFSTYPE" >> "$ROOTFS/etc/initrd.mk"
KERNEL="$(readlink $ROOTFS/boot/vmlinuz | sed 's,vmlinuz-,,')"
chroot "$ROOTFS" make-initrd -k "$KERNEL"
sed -i "s,$LOOPDEV1,$ROOTDEV," "$ROOTFS/etc/fstab"
# configure and install bootloader
REGEXP='^Disk .*: ([0-9]+) cylinders, ([0-9]+) heads, ([0-9]+) sectors/track*$'
set -- $(sfdisk -l "$LOOPDEV" | grep -E "$REGEXP" | sed -r "s@$REGEXP@\1 \2 \3@")
LILO_COMMON="lba32
delay=1
vga=0
image=/boot/vmlinuz
initrd=/boot/initrd.img
append=\"root=$ROOTDEV rootdelay=3\"
label=linux"
cat > "$ROOTFS"/etc/lilo-loop.conf << EOF
boot=$LOOPDEV
disk=$LOOPDEV
bios=0x80
cylinders=$1
heads=$2
sectors=$3
partition=$LOOPDEV1
start=63
$LILO_COMMON
EOF
chroot "$ROOTFS" lilo -C /etc/lilo-loop.conf
cat > "$ROOTFS"/etc/lilo.conf << EOF
boot=${ROOTDEV%[0-9]*}
$LILO_COMMON
EOF
if [ -n "$SUDO_USER" ]; then
chown "$SUDO_USER" "$IMG" "$ROOTFS" "$WORKDIR"
fi

70
conf.d/armh.mk Normal file
View File

@@ -0,0 +1,70 @@
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
@$(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
@$(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/vm-net/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-base: vm/.arm-base use/armh use/armh-cubox use/deflogin/altlinuxroot \
use/services/ssh use/cleanup/installer use/repo use/branding +systemd
@$(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_LISTS,$(call tags,(base || desktop) && regular))
vm/.cubox-gtk: vm/.cubox-base use/x11/lightdm/gtk; @:
vm/cubox-e17: vm/.cubox-gtk use/x11/e17
@$(call add,BASE_PACKAGES,xterm)
vm/cubox-xfce: vm/.cubox-gtk use/x11/xfce
@$(call set,BRANDING,simply-linux)
@$(call add,THE_BRANDING,xfce-settings)
@$(call add,BASE_LISTS,slinux/arm)
vm/cubox-xfce-ru: vm/cubox-xfce
@$(call add,BASE_PACKAGES,livecd-ru)
@$(call add,BASE_PACKAGES,LibreOffice4-full LibreOffice4-langpack-ru)
vm/cubox-mate: vm/.cubox-gtk use/x11/mate
@$(call add,BASE_LISTS,$(call tags,desktop nm))
endif
endif

View File

@@ -10,8 +10,10 @@ distro/syslinux: distro/.init \
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
distro/.live-x11: distro/.live-base use/live/x11; @:
distro/.live-desktop: distro/.base +live use/live/install use/stage2/net-eth \
use/plymouth/live use/efi; @:
use/plymouth/live; @:
distro/.live-desktop-ru: distro/.live-desktop use/live/ru; @:
distro/.live-kiosk: distro/.base use/live/base use/live/autologin +power \
@@ -65,30 +67,18 @@ distro/live-webkiosk: distro/live-webkiosk-mini use/live/desktop; @:
distro/live-webkiosk-chromium: distro/.live-webkiosk
@$(call add,LIVE_PACKAGES,livecd-webkiosk-chromium)
distro/live-flightgear: distro/live-icewm use/live/sound use/x11/3d-proprietary
distro/live-flightgear: distro/.live-x11 use/x11/lightdm/gtk use/x11/3d +icewm
@$(call add,LIVE_LISTS,$(call tags,xorg misc))
@$(call add,LIVE_PACKAGES,FlightGear fgo input-utils)
@$(call try,HOMEPAGE,http://www.4p8.com/eric.brasseur/flight_simulator_tutorial.html)
distro/live-gnome: distro/.live-desktop-ru use/systemd use/live/nodm use/x11/3d-proprietary
@$(call add,LIVE_PACKAGES,gnome3-default)
distro/live-e17: distro/.live-desktop-ru use/x11/e17 use/x11/lightdm/gtk; @:
distro/live-cinnamon: distro/.live-desktop-ru use/live/autologin \
use/x11/cinnamon use/x11/3d-proprietary; @:
distro/live-mate: distro/.live-desktop-ru use/live/nodm use/x11/3d-free
@$(call add,LIVE_LISTS,openssh $(call tags,(desktop || mobile) && mate))
@$(call set,KFLAVOURS,un-def) # the newest one
distro/live-e17: distro/.live-desktop-ru use/live/autologin \
use/x11/e17 use/x11/gdm2.20; @:
distro/live-gimp: distro/live-icewm use/x11/3d-free use/live/ru
distro/live-gimp: distro/live-icewm use/live/ru
@$(call add,LIVE_PACKAGES,gimp tintii immix fim)
@$(call add,LIVE_PACKAGES,cvltonemap darktable geeqie rawstudio ufraw)
@$(call add,LIVE_PACKAGES,macrofusion python-module-pygtk-libglade)
@$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync)
@$(call add,LIVE_PACKAGES,design-graphics-sisyphus2)
distro/live-sugar: distro/.live-desktop-ru use/x11/sugar; @:
endif

View File

@@ -6,12 +6,15 @@ distro/.regular-bare: distro/.base +wireless use/efi/signed \
use/memtest use/stage2/net-eth use/kernel/net
@$(call try,SAVE_PROFILE,yes)
# WM base target
distro/.regular-base: distro/.regular-bare +vmguest +live \
use/live/ru use/live/install use/live/repo use/live/rw \
use/luks use/x11/3d-free use/branding
# graphical target (not enforcing xorg drivers or blobs)
distro/.regular-x11: distro/.regular-bare use/x11/wacom +vmguest \
use/live/x11 use/live/ru use/live/install use/live/repo use/live/rw \
use/luks use/branding
@$(call add,LIVE_LISTS,$(call tags,(base || desktop) && regular))
@$(call add,LIVE_LISTS,$(call tags,base rescue))
# WM base target
distro/.regular-base: distro/.regular-x11 use/x11/xorg
@$(call add,LIVE_PACKAGES,installer-feature-desktop-other-fs-stage2)
@$(call add,THE_BRANDING,indexhtml notes alterator)
@$(call add,THE_BRANDING,graphics)
@@ -19,7 +22,7 @@ distro/.regular-base: distro/.regular-bare +vmguest +live \
# DE base target
# TODO: use/plymouth/live when luks+plymouth is done, see also #28255
distro/.regular-desktop: distro/.regular-base \
use/systemd use/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind
use/syslinux/ui/gfxboot use/firmware/laptop use/efi/refind +systemd
@$(call add,LIVE_PACKAGES,fuse-exfat)
@$(call add,LIVE_LISTS,domain-client)
@$(call add,THE_BRANDING,bootloader)
@@ -27,7 +30,8 @@ distro/.regular-desktop: distro/.regular-base \
distro/.regular-gtk: distro/.regular-desktop use/x11/lightdm/gtk +plymouth; @:
distro/regular-icewm: distro/.regular-base use/x11/lightdm/gtk +icewm
distro/regular-icewm: distro/.regular-base use/init/sysv \
use/x11/lightdm/gtk +icewm
@$(call add,LIVE_LISTS,$(call tags,regular icewm))
@$(call set,KFLAVOURS,un-def)
@@ -47,8 +51,9 @@ distro/regular-lxde: distro/.regular-gtk use/x11/lxde use/fonts/infinality
distro/regular-xmonad: distro/.regular-gtk use/x11/xmonad
@$(call add,LIVE_PACKAGES,livecd-regular-xmonad)
distro/regular-mate: distro/.regular-gtk
@$(call add,LIVE_LISTS,$(call tags,(desktop || mobile) && (mate || nm)))
distro/regular-mate: distro/.regular-gtk use/x11/mate
@$(call add,LIVE_LISTS,$(call tags,mobile mate))
@$(call add,LIVE_LISTS,$(call tags,desktop nm)) ### +nm?
distro/regular-e17: distro/.regular-gtk use/x11/e17 use/fonts/infinality
@$(call add,LIVE_PACKAGES,xterm)

View File

@@ -6,7 +6,7 @@ ifeq (distro,$(IMAGE_CLASS))
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @:
distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @:
distro/live-systemd: distro/.base use/live/base use/systemd; @:
distro/live-systemd: distro/.base use/live/base +systemd; @:
distro/live-plymouth: distro/.live-base use/plymouth/live; @:
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@@ -26,7 +26,7 @@ distro/razorqt-kz: distro/regular-razorqt
@$(call set,GLOBAL_BOOT_LANG,kk_KZ)
@$(call add,LIVE_PACKAGES,hunspell-kk)
distro/server-systemd: distro/server-mini use/systemd
distro/server-systemd: distro/server-mini +systemd
@$(call set,KFLAVOURS,std-def)
distro/server-test: distro/server-mini use/relname
@@ -42,9 +42,8 @@ distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
@$(call add,SYSLINUX_CFG,netinstall2)
distro/desktop-luks: distro/icewm use/luks; @:
distro/desktop-systemd: distro/icewm use/systemd; @:
distro/desktop-systemd: distro/icewm +systemd; @:
distro/desktop-plymouth: distro/icewm +plymouth; @:
distro/live-mate-systemd: distro/live-mate use/systemd use/live/install; @:
distro/server-efi: distro/server-mini use/efi/debug; @:
endif # IMAGE_CLASS: distro

View File

@@ -4,6 +4,7 @@ ifeq (vm,$(IMAGE_CLASS))
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh; @:
# NB: use/x11 employs some installer-feature packages
vm/icewm: vm/net use/cleanup/installer use/repo +icewm; @:
vm/icewm: vm/net use/cleanup/installer use/repo use/deflogin/altlinuxroot \
use/x11/xorg use/x11/lightdm/gtk use/x11-autologin +icewm; @:
endif

View File

@@ -109,7 +109,7 @@
* VM_SIZE
** задаёт размер несжатого образа виртуальной машины в байтах
** значение: пусто (по умолчанию двойной размер чрута) или целое
** см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2vm
** см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2fs
[float]
=== пример ===

View File

@@ -2,14 +2,14 @@
*ВНИМАНИЕ:* заключительная операция создания образа жёсткого диска
из архива с содержимым корневой файловой системы требует доступа
к sudo и разрешения на выполнение скрипта bin/tar2vm в корневом
к sudo и разрешения на выполнение скрипта bin/tar2fs в корневом
каталоге метапрофиля при установке mkimage-profiles из пакета
(это в планах исправить, но подход к libguestfs пока успехом
не увенчался).
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2vm
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2fs
При работе с локальной копией mkimage-profiles.git следует иметь
в виду, что предоставлять недоверенному пользователю право выполнять
@@ -25,3 +25,10 @@
Пример сборки и запуска VM:
$ make ROOTPW=reallysecret1 vm/bare.img && kvm -hda ~/out/bare.img
Если при сборке образа файловой системы произойдёт сбой, может оказаться
нужным вручную освободить используемые loop-устройства, например, так:
# losetup -a
# kpartx -d /dev/loop0
# losetup -d /dev/loop0

View File

@@ -36,8 +36,8 @@ include $(BUILDDIR)/distcfg.mk
# first rsync what's static, and make backups (*~) --
# these might signal of file clashes (or plain dirt);
# second, care for toplevel and tagged script dirs;
# then handle two more ways of implementing a feature
# second, care for toplevel dirs;
# then handle feature generator scripts
#
# NB: some subprofiles will be specified as "src/dst"
# -- then both src/ and dst/ can hold the addons;
@@ -58,6 +58,11 @@ prep:
fi
# feat
# NB: this is somewhat complicated since it has to handle "$sub" like:
# - "/": copy feature's toplevel parts to the BUILDDIR toplevel
# - "stage1": copy feature's stage1 parts into stage1 subprofile
# - "stage2@live": copy feature's stage2 parts into live subprofile
# - "rootfs@/": copy feature's rootfs parts into BUILDDIR toplevel
$(FEATURES):
@feat=$@; \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
@@ -71,6 +76,13 @@ $(FEATURES):
else \
src="$${sub%@*}"; \
dst="$${sub#*@}"; \
if [ "$$src" = / ]; then \
echo "** src=/: you don't want this" >&2; \
exit 1; \
fi; \
if [ "$$dst" = / -o "$$dst" = "" ]; then \
dst="."; \
fi; \
srcdirs=; \
if [ -d "$$src" ]; then \
srcdirs="$$src"; \
@@ -78,9 +90,9 @@ $(FEATURES):
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
srcdirs="$${srcdirs:+$$srcdirs }$$dst"; \
fi; \
: "why this overduplication was done? (still needed)"; \
for srcdir in $$srcdirs; do \
rsync -qab --exclude tagged \
"$$srcdir/" "$(BUILDDIR)/$$dst/"; \
rsync -qab "$$srcdir/" "$(BUILDDIR)/$$dst/"; \
done; \
fi; \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
@@ -98,7 +110,7 @@ $(FEATURES):
done; \
popd >&/dev/null; \
done; \
if [ -n "$$dst" ]; then \
if [ -n "$$dst" -a "$$dst" != "." ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \

View File

@@ -0,0 +1 @@
Поддержка SolidRun Cubox в расчёте на подключенный по HDMI дисплей FullHD.

View File

@@ -0,0 +1,2 @@
use/armh-cubox: use/armh-dovefb
@$(call add_feature)

View File

@@ -0,0 +1,19 @@
#!/bin/sh
mkdir -p /boot
# 1920x1080 version of the boot script
cat > /boot/boot << EOF
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p2 ro video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 vmalloc=128M panic=3'
ext2load mmc 0:1 2000000 uimage
ext2load mmc 0:1 2800000 uinitrd
bootm 2000000 2800000
EOF
# 1280x720 version of the boot script (not used at the moment)
cat > /boot/boot.720 << EOF
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p2 ro video=dovefb:lcd0:1280x720-24@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 vmalloc=128M panic=3'
ext2load mmc 0:1 2000000 uimage
ext2load mmc 0:1 2800000 uinitrd
bootm 2000000 2800000
EOF

View File

@@ -0,0 +1 @@
Эта фича обеспечивает начальное конфигурирование Marvell Dove GPU.

View File

@@ -0,0 +1,3 @@
use/armh-dovefb:
@$(call add_feature)
@$(call add,THE_PACKAGES,xorg-drv-dovefb)

View File

@@ -0,0 +1,106 @@
#!/bin/sh
mkdir -p /etc/udev/rules.d
cd /etc/udev/rules.d
cat > 99-bmm.rules << EOF
KERNEL=="bmm|bmm[0-9]", GROUP="xgrp", MODE="0660"
EOF
cat > 99-fb.rules << EOF
KERNEL=="fb|fb[0-9]", GROUP="xgrp", MODE="0660"
EOF
cat > 99-galcore.rules << EOF
KERNEL=="galcore|galcore[0-9]", GROUP="xgrp", MODE="0660"
EOF
cat > 99-uio.rules << EOF
KERNEL=="uio|uio[0-9]", GROUP="xgrp", MODE="0660"
EOF
mkdir -p /etc/X11
cd /etc/X11
cat > xorg.conf.720 << EOF
Section "Device"
Identifier "Videocard0"
Driver "dovefb"
# Option "ExaAccel" "on"
Option "Solid" "on"
Option "Copy" "on"
Option "Composite" "on"
Option "Commit" "on"
Option "XvAccel" "on"
Option "UseGPU" "on"
EndSection
Section "Monitor"
Identifier "LCD0"
Option "PreferredMode" "1280x720"
EndSection
Section "Screen"
Identifier "Screen 0"
Device "Videocard0"
Monitor "LCD0"
DefaultDepth 24
DefaultFbBpp 24
SubSection "Display"
Depth 24
Modes "1280x720"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Main Layout"
Screen 0 "Screen 0"
EndSection
EOF
cat > xorg.conf.1080 << EOF
Section "Device"
Identifier "Videocard0"
Driver "dovefb"
# Option "ExaAccel" "on"
Option "Solid" "on"
Option "Copy" "on"
Option "Composite" "on"
Option "Commit" "on"
Option "XvAccel" "on"
Option "UseGPU" "on"
#Option "Debug" "on"
EndSection
Section "Monitor"
Identifier "LCD0"
Option "PreferredMode" "1920x1080"
EndSection
Section "Screen"
Identifier "Screen 0"
Device "Videocard0"
Monitor "LCD0"
DefaultDepth 16
DefaultFbBpp 16
SubSection "Display"
Depth 16
Modes "1920x1080@60"
EndSubSection
SubSection "Display"
Depth 24
Modes "1920x1080@60"
EndSubSection
SubSection "Display"
Depth 32
Modes "800x600@60"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Main Layout"
Screen 0 "Screen 0"
EndSection
EOF
ln -s xorg.conf.1080 xorg.conf

View File

@@ -0,0 +1 @@
Эта фича конфигурирует специфические для Google/ASUS Nexus7 аспекты.

View File

@@ -0,0 +1,2 @@
use/armh-nexus7:
@$(call add_feature)

View File

@@ -0,0 +1,172 @@
#!/bin/sh
# FIXME: the exact partition may vary
cat >> /etc/fstab << EOF
# YMMV, this might be /dev/mmcblk0p10 either
/dev/mmcblk0p9 / ext4 defaults 1 1
EOF
cd /etc/udev/rules.d || exit 1
cat > 90-tegra-rt5640.rules << EOF
SUBSYSTEM!="sound", GOTO="tegra_rt5640_end"
ACTION!="change", GOTO="tegra_rt5640_end"
KERNEL!="card*", GOTO="tegra_rt5640_end"
ATTRS{id}=="tegrart5640", ENV{PULSE_PROFILE_SET}="tegra-nexus7.conf"
LABEL="tegra_rt5640_end"
EOF
cd /usr/share/pulseaudio/alsa-mixer/profile-sets || exit 1
cat > tegra-nexus7.conf << EOF
[General]
auto-profiles = yes
[Mapping analog-stereo]
device-strings = front:%f hw:%f plughw:%f
channel-map = left,right
paths-output = tegra-nexus7-speaker tegra-nexus7-headphone
paths-input = tegra-nexus7-intmic
priority = 10
EOF
cd /etc/X11 || exit 1
cat > xorg.conf << EOF
Section "Device"
Identifier "nexus"
Driver "tegra"
EndSection
EOF
cd /etc/X11/xorg.conf.d || exit 1
cat > 99-nexus-calibration.conf << EOF
Section "InputClass"
Identifier "Nexus 7 Touchscreen"
MatchIsTouchscreen "on"
MatchProduct "elan-touchscreen"
MatchDevicePath "/dev/input/event*"
MatchDriver "evdev"
# Option "Calibration" "29 2125 106 1356"
# Option "SwapAxes" "0"
# Option "Calibration" "566 1201 1025 2075"
# Option "SwapAxes" "1"
Option "Calibration" "6 2132 29 1294"
Option "SwapAxes" "0"
EndSection
EOF
cat > 99-nexus-rotation.conf << EOF
Section "Monitor"
Identifier "Monitor"
Option "Rotate" "right"
EndSection
Section "Screen"
Identifier "Screen"
Monitor "Monitor"
EndSection
EOF
cd /usr/share/pulseaudio/alsa-mixer/paths || exit 1
cat > tegra-nexus7-headphone.conf << EOF
[General]
priority = 90
name = analog-output-headphones
[Jack HP-detect]
state.plugged = yes
[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element HP]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Headphone Jack]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Int Spk]
switch = off
; Due to a kernel bug (?) the "Int Mic" is a playback control.
; Therefore we enable it here instead of in the proper place
[Element Int Mic]
switch = on
EOF
cat > tegra-nexus7-intmic.conf << EOF
[General]
priority = 90
name = analog-input-microphone-internal
[Element ADC]
; For some reason the ADC volume seems not to be affecting input gain
switch = mute
volume = zero
override-map.1 = all
override-map.2 = all-left,all-right
[Element ADC Boost Gain]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Int Mic]
switch = mute
[Element DMIC]
enumeration = select
[Option DMIC:DMIC1]
priority = 89
name = analog-input-internal-microphone
EOF
cat > tegra-nexus7-speaker.conf << EOF
[General]
priority = 100
name = analog-output-speaker
[Jack HP-detect]
state.plugged = no
state.unplugged = unknown
[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Speaker]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Int Spk]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Headphone Jack]
switch = off
; Due to a kernel bug (?) the "Int Mic" is a playback control.
; Therefore we enable it here instead of in the proper place
[Element Int Mic]
switch = on
EOF

View File

@@ -0,0 +1 @@
Эта фича предназначена для базовой поддержки систем на чипсете NVIDIA Tegra3.

View File

@@ -0,0 +1,2 @@
use/armh-tegra3:
@$(call add_feature)

View File

@@ -0,0 +1,28 @@
#!/bin/sh
cd /etc/udev/rules.d || exit 1
cat > 69-tegra-gpu.rules << EOF
# Set the right permissions to the devices provided by the
# tegra driver
ENV{ACL_MANAGE}=="0", GOTO="tegra_gpu_end"
ACTION!="add|change", GOTO="tegra_gpu_end"
# root only devices
KERNEL=="knvrm" OWNER="root" GROUP="root" MODE="0660"
KERNEL=="knvmap" OWNER="root" GROUP="root" MODE="0660"
# graphics devices
ACTION=="add|change", KERNEL=="nvhost*", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="nvmap*", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="tegra*", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="nvram", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="nvhdcp*", GROUP="xgrp", MODE="0660"
LABEL="tegra_gpu_end"
EOF
# FIXME: xgrp is a kludge
cat > 69-tegra-touchscreen.rules << EOF
SUBSYSTEM=="input",ACTION=="add|change",KERNEL=="event*",ATTRS{name}=="elan-touchscreen", SYMLINK+="twofingtouch", MODE="0660", GROUP="xgrp"
EOF

2
features.in/armh/README Normal file
View File

@@ -0,0 +1,2 @@
Эта фича занимается тем подмножеством необходимой для ARM-образов
функциональности, которую получается как-то обобщить.

View File

@@ -0,0 +1,2 @@
use/armh:
@$(call add_feature)

View File

@@ -0,0 +1,2 @@
#!/bin/sh
echo 'HWCLOCK_SET_TIME_AT_START=false' >> /etc/sysconfig/clock

View File

@@ -0,0 +1,48 @@
#!/bin/sh
kver="$(rpm -qa 'kernel-image*' \
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
| sort -n \
| tail -n 1 \
| cut -f 2 -d ' ' \
| sed 's/kernel-image-//')"
[ -h /boot/vmlinuz ] || ln -s vmlinuz-$kver /boot/vmlinuz
[ -h /boot/initrd.img ] || ln -s initrd-$kver.img /boot/initrd.img
# NB: mkinitrd-3.0.16+ has rootsubdir support which is critical
# for TWRP based ARM "VE" chroots (e.g. for nexus7);
# should be implemented in make-initrd either
### rootfs type should become configurable
if rpm -q mkinitrd; then
mkinitrd --with ext4 -f /boot/initrd-$kver.img "$kver"
fi
# NB: if the adresses ever become different this "API" _will_ change
# NB: initrd compression (-C) might change, armadaxp handles gzip
umk() {
[ $# = 4 ] || exit 1
cd /boot
umkimage \
-A arm \
-O linux \
-T "$1" \
-C none \
-a "$2" \
-e "$2" \
-n "`readlink "$3"`" \
-d "$3" \
"$4"
}
### the addresses will become variables some day probably
if rpm -q uboot-tools; then
umk kernel 0x00008000 vmlinuz uimage
umk ramdisk 0x00800000 initrd.img uinitrd
if [ -s boot ]; then
umk script 0 boot boot.scr
fi
fi
:

View File

@@ -0,0 +1,73 @@
#!/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"
/bin/echo "127.0.0.1 localhost localhost.localdomain" > /etc/hosts
verbose "Truncate /etc/resolv.conf"
/bin/echo nameserver 8.8.8.8 >/etc/resolv.conf
chkconfig network on
netcfg="/etc/sysconfig/network"
verbose "Enable networking, disable FORWARD_IPV4, set hostname to $HOSTNAME, domainname to $DOMAINNAME"
shell_config_set "$netcfg" NETWORKING yes
shell_config_set "$netcfg" FORWARD_IPV4 false
shell_config_set "$netcfg" HOSTNAME "$HOSTNAME"
shell_config_set "$netcfg" DOMAINNAME "$DOMAINNAME"
if [ -x /etc/init.d/connmand ]; then
verbose "Enable connmand and finish"
chkconfig --add connmand && chkconfig connmand on
exit 0
fi
verbose "Setup defaults for NetworkManager"
shell_config_set /etc/net/ifaces/default/options-eth BOOTPROTO dhcp
if [ -f /usr/sbin/NetworkManager ] ; then
chkconfig --add NetworkManager && chkconfig NetworkManager on
shell_config_set /etc/net/ifaces/default/options-eth NM_CONTROLLED yes
shell_config_set /etc/net/ifaces/default/options-eth DISABLED yes
#subst 's/NM_CONTROLLED=no/NM_CONTROLLED=yes/' /etc/net/ifaces/*/options ||:
else
verbose "Did you install NetworkManager? Can't find them."
# Don't assign configuration to interfaces, untill ifplugd detects cable presence
subst 's/USE_IFPLUGD=no/USE_IFPLUGD=yes/' /etc/net/ifaces/default/options-eth
fi
verbose "finished"

View File

@@ -0,0 +1,11 @@
#!/bin/sh
# poor man's root switch
# NB: 50-users creates predefined users
control su public
control sudo public
cat >> /etc/openssh/sshd_config << EOF
PermitRootLogin yes
UseDNS no
EOF

View File

@@ -1,4 +1,5 @@
Эта фича конфигурирует создание образа виртуального окружения (VE).
Эта фича конфигурирует создание образа виртуального окружения (VE),
что используется для сборки шаблонов OpenVZ и ARM-чрутов для TWRP.
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
и тесно с ней связана.

View File

@@ -1,3 +1,3 @@
# hooked from ../../lib/sugar.mk
use/build-ve:
use/build-ve: sub/rootfs@/
@$(call add_feature)

View File

@@ -8,10 +8,14 @@ ifeq (cpio,$(IMAGE_PACKTYPE))
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
endif
IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
# some VEs _can_ contain kernels (think ARM multiboot
# but this can also help VE/VM hybrid images)
IMAGE_PACKAGES = $(DOT_BASE) \
$(SYSTEM_PACKAGES) \
$(COMMON_PACKAGES) \
$(BASE_PACKAGES)
$(BASE_PACKAGES) \
$(THE_PACKAGES) \
$(call list,$(BASE_LISTS) $(THE_LISTS))
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)

View File

@@ -1,4 +1,3 @@
# hooked from ../../lib/sugar.mk
use/build-vm:
use/build-vm: sub/rootfs@/ use/kernel use/deflogin
@$(call add_feature)
@$(call xport,ROOTPW)

View File

@@ -1,4 +1,4 @@
# copy tar2vm helper into generated profile to enable standalone builds
# copy tar2fs helper into generated profile to enable standalone builds
all:
@install -pD $(MKIMAGE_PROFILES)/bin/tar2vm $(BUILDDIR)/bin/tar2vm
@install -pD $(MKIMAGE_PROFILES)/bin/tar2fs $(BUILDDIR)/bin/tar2fs

View File

@@ -1,11 +0,0 @@
#!/bin/sh
if [ -n "$GLOBAL_ROOTPW" ]; then
if type -t chpasswd >&/dev/null; then
echo "root:$GLOBAL_ROOTPW" | chpasswd
else
echo "** warning: chpasswd binary missing" >&2
fi
else
echo "** warning: no root password provided, you're on your own" >&2
fi

View File

@@ -1,3 +0,0 @@
#!/bin/sh
# Run scripts from /etc/firsttime.d at first start
[ -f "/var/lock/TMP_1ST" ] || touch "/var/lock/TMP_1ST"

View File

@@ -1,19 +1,17 @@
# step 4: build the virtual machine image
IMAGE_PACKAGES = $(SYSTEM_PACKAGES) \
IMAGE_PACKAGES = $(DOT_BASE) \
$(SYSTEM_PACKAGES) \
$(COMMON_PACKAGES) \
$(BASE_PACKAGES) \
$(THE_PACKAGES) \
$(call list,$(BASE_LISTS) $(THE_LISTS)) \
$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))
$(call list,$(BASE_LISTS) $(THE_LISTS))
# intermediate chroot archive
VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar
VM_RAWDISK := $(IMAGE_OUTDIR)/$(IMAGE_NAME).raw
ifeq (,$(ROOTPW))
$(error please provide root password via ROOTPW)
endif
VM_FSTYPE ?= ext4
VM_SIZE ?= 0
check-sudo:
@if ! type -t sudo >&/dev/null; then \
@@ -22,9 +20,9 @@ check-sudo:
fi
prepare-image: check-sudo
@if ! sudo $(TOPDIR)/bin/tar2vm \
"$(VM_TARBALL)" "$(VM_RAWDISK)" $$VM_SIZE; then \
echo "** error: sudo tar2vm failed, see also doc/vm.txt" >&2; \
@if ! sudo $(TOPDIR)/bin/tar2fs \
"$(VM_TARBALL)" "$(VM_RAWDISK)" $(VM_SIZE) $(VM_FSTYPE); then \
echo "** error: sudo tar2fs failed, see also doc/vm.txt" >&2; \
exit 1; \
fi
@@ -43,7 +41,6 @@ convert-image: prepare-image
fi
run-image-scripts: GLOBAL_CLEANUP_PACKAGES := $(CLEANUP_PACKAGES)
run-image-scripts: GLOBAL_ROOTPW := $(ROOTPW)
# override
pack-image: MKI_PACK_RESULTS := tar:$(VM_TARBALL)

View File

@@ -0,0 +1,4 @@
Эта фича конфигурирует root login и пользователей по умолчанию.
ВНИМАНИЕ: применяйте разумно, т.к. крайне легко создать и оставить
дыру в безопасности!

View File

@@ -0,0 +1,29 @@
# WARNING: the variable values are stored in build config/log!
use/deflogin:
@$(call add_feature)
@$(call add,THE_PACKAGES,shadow-utils)
@$(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)

View File

@@ -0,0 +1,10 @@
#!/bin/sh
# set root password if any; no-op if it is unset
test="${GLOBAL_ROOTPW=:unset}"
if [ "$test" = ":unset" ]; then
echo "** warning: no root password provided, you're on your own" >&2
else
echo "$GLOBAL_ROOTPW" | passwd --stdin root
fi

View File

@@ -0,0 +1,33 @@
#!/bin/bash
# add regular user(s) assigning passwords and attributes of power
# NB: care that the utilities exist; shadow-utils is warranted
add_user() {
useradd -m "$1" &&
usermod -p "" "$1" &&
if [ -n "$GLOBAL_GROUPS" ]; then
usermod -a --groups "${GLOBAL_GROUPS// /,}" "$1" # bashism
fi ||
echo "*** failed to add user '$1'"
}
set_password() { echo "$1:$2" | chpasswd; }
set_admin() { usermod -a --groups "wheel" "$1"; }
set_sudo() {
[ ! -w "/etc/sudoers" ] ||
echo "$1\tALL=(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

View File

@@ -0,0 +1,4 @@
#!/bin/sh
# see also https://bugzilla.altlinux.org/27970
grep -q efivars /etc/modules || echo efivars >> /etc/modules

View File

@@ -1,4 +1,4 @@
#!/bin/sh
# see also https://bugzilla.altlinux.org/27970
echo efivars >> /etc/modules
grep -q efivars /etc/modules || echo efivars >> /etc/modules

View File

@@ -1,5 +1,5 @@
Эта фича занимается конфигурированием подсистемы
конфигурации шрифтов fontconfig (sic!); помимо
возможности выставить желаемые кусочки вручную
предлагаются и заранее заданные интегральные
варианты, прошедшие обкатку в дистрибутивах.
Эта фича позволяет системно конфигурировать файлы
конфигурации подсистемы конфигурирования шрифтов
fontconfig (sic!), заодно предоставляя прошедшие
обкатку в дистрибутивах варианты предварительно
заданной конфигурации для удобства.

View File

@@ -10,6 +10,6 @@ use/fonts/zerg: use/fonts
@$(call set,FONT_FEATURES_DISABLE,no-antialias lcdfilter-none \
unhinted no-sub-pixel)
# nothing configured to add_feature, let's skip that this time
use/fonts/infinality:
# nothing configured to add_feature but let's not skip that for consistency
use/fonts/infinality: use/fonts
@$(call add,THE_PACKAGES,libfreetype-infinality fontconfig-infinality)

11
features.in/init/README Normal file
View File

@@ -0,0 +1,11 @@
Эта фича определяет систему инициализации, которая будет использована
в пользовательской среде (livecd, установленный дистрибутив, vm).
Она не влияет на состав инсталятора и rescue-образа.
Обратите внимание: как и с use/bootloader/%, в силу особенностей make
переключение в каждую позицию возможно лишь один раз, далее эта цель
считается достигнутой и при последующих вызовах не отрабатывает.
См. тж.:
http://altlinux.org/sysvinit
http://altlinux.org/systemd

View File

@@ -0,0 +1,14 @@
+sysvinit: use/init/sysv; @:
+systemd: use/init/systemd; @:
use/init:
@$(call add_feature)
@$(call add,THE_LISTS,$$(INIT_TYPE))
use/init/sysv: use/init
@$(call set,INIT_TYPE,sysvinit)
### i-f should be dropped as soon as rootfs scripts are effective there
use/init/systemd: use/init
@$(call set,INIT_TYPE,systemd)
@$(call add,BASE_PACKAGES,installer-feature-systemd-stage3)

View File

@@ -0,0 +1,25 @@
#!/bin/sh
# the part below relates to systemd as init specifically
rpm -q systemd-sysvinit || exit 0
# file str [str...]
# NB: str is also treated as a regex,
# be careful if you copy the function
sub() {
local file="$1"
shift
for i in "$@"; do
grep -q "^$i" "$file" || echo "$i" >> "$file"
done
}
# tune make-initrd
sub /etc/initrd.mk 'FEATURES += systemd' 'MODULES_PRELOAD += autofs4'
# don't allow systemd to set LANG (see also #27408)
sub /etc/locale.conf 'LANG='
# aufs2 root is rw in reality; but don't bother if there's a record already
grep -q '[[:space:]]/[[:space:]]' /etc/fstab ||
sub /etc/fstab '/dev/root / auto defaults 0 0'

View File

@@ -2,3 +2,8 @@
специфическими для полноценного LiveCD настройками
и скриптовыми хуками, а также создаёт файл index.html
с домашней страницей (редиректором) в корне образа.
Графический вариант безусловно требует x11-autologin,
при появлении необходимости обойтись без него можно
временно продублировать содержимое цели и сообщить
о таком случае.

View File

@@ -2,7 +2,7 @@
# copy stage2 as live
# NB: starts to preconfigure but doesn't use/cleanup yet
use/live: use/stage2 sub/stage2@live
use/live: use/stage2 sub/rootfs@live sub/stage2@live
@$(call add_feature)
@$(call add,CLEANUP_PACKAGES,'installer*')
@@ -17,19 +17,17 @@ else
use/live/rw: use/live; @:
endif
# a very simplistic one
use/live/x11: use/live use/firmware use/x11/xorg
@$(call add,LIVE_PACKAGES,xinit)
# optimized out: use/x11/xorg
use/live/desktop: use/live/base use/x11/wacom use/live/sound \
+vmguest +power +efi
# graphical target (not enforcing xorg drivers or blobs)
use/live/x11: use/live/base use/x11-autologin use/live/sound +power +efi
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
@$(call add,LIVE_LISTS,$(call tags,base l10n))
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
@$(call add,LIVE_PACKAGES,pciutils)
@$(call add,SYSLINUX_CFG,localboot)
# this target specifically pulls free xorg drivers in (and a few more bits)
use/live/desktop: use/live/x11 use/x11/xorg use/x11/wacom +vmguest; @:
# preconfigure apt for both live and installed-from-live systems
use/live/repo: use/live
@$(call add,LIVE_PACKAGES,installer-feature-online-repo)
@@ -49,18 +47,22 @@ use/live/install: use/metadata use/syslinux/localboot.cfg
use/live/textinstall: use/syslinux/localboot.cfg
@$(call add,LIVE_PACKAGES,live-install)
# NB: there's an unconditional live/image-scripts.d/40-autologin script
# *but* it only configures some of the *existing* means; let's add one
# or another for the cases when there should be no display manager
use/live/autologin: use/live/x11
# a very simplistic one
use/live/.x11: use/live use/x11 use/x11-autologin
@$(call add,LIVE_PACKAGES,xinit)
# NB: some implementation has to be added if it's not a display manager
use/live/autologin: use/live/.x11
@$(call add,LIVE_PACKAGES,autologin)
use/live/nodm: use/live/x11
use/live/nodm: use/live/.x11
@$(call add,LIVE_PACKAGES,nodm)
# see also http://www.altlinux.org/Netbook-live/hooks
use/live/hooks: use/live
@$(call add,LIVE_PACKAGES,livecd-run-hooks)
# a crude hack to make sure Russian is supported in a particular image
use/live/ru: use/live
@$(call add,LIVE_PACKAGES,livecd-ru)

View File

@@ -53,6 +53,7 @@ bridge
clamd
crond
dhcpd
dmeventd
dnsmasq
lvm2-lvmetad
lvm2-monitor

View File

@@ -22,7 +22,7 @@ dump-LISTS = $(call dump-THEM,$(1),LISTS,cat)
metadata-.base:
@cd $(call list,/); \
{ \
echo "## generated by features.in/metadata/lib/metadata.mk"; \
echo "## generated by features.in/metadata/lib/50-metadata.mk"; \
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
if [ -n "$(DOT_BASE)" ]; then \

View File

@@ -0,0 +1,10 @@
Данная фича конфигурирует автоматический запуск сервисов
при загрузке системы.
Поскольку в конкретном образе может быть желательно перекрыть
умолчания предыдущей конфигурации, рекомендуется в фичах работать
с переменными DEFAULT_SERVICES_* и оставить переменные SERVICES_*
для релиз-менеджеров.
Выключение сервиса в каждой из этих пар имеет приоритет перед
включением.

View File

@@ -0,0 +1,14 @@
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/network: use/services
@$(call add,DEFAULT_SERVICES_ENABLE,network)
use/services/ssh: use/services use/services/network
@$(call add,DEFAULT_SERVICES_ENABLE,sshd)

View File

@@ -0,0 +1,35 @@
#!/bin/sh
# this script implements the services regulation
# according to what has been decided in the profile
CHKCONFIG=
SYSTEMCTL=
[ ! -x /sbin/chkconfig ] || CHKCONFIG=1
[ ! -x /bin/systemctl ] || SYSTEMCTL=1
[ -n "$CHKCONFIG$SYSTEMCTL" ] || exit 0
switch() {
case "$2" in
on)
cc=on; sc=enable;;
off)
cc=off; sc=disable;;
esac
{
[ -z "$SYSTEMCTL" ] || /bin/systemctl --no-reload $sc $1.service
[ -z "$CHKCONFIG" ] || /sbin/chkconfig $1 $cc
} # 2>/dev/null
}
# defaults (most likely features.in ones)
for i in $GLOBAL_DEFAULT_SERVICES_ENABLE; do switch $i on; done
for i in $GLOBAL_DEFAULT_SERVICES_DISABLE; do switch $i off; done
# explicitly specified behaviour (e.g. via conf.d)
for i in $GLOBAL_SERVICES_ENABLE; do switch $i on; done
for i in $GLOBAL_SERVICES_DISABLE; do switch $i off; done
:

View File

@@ -15,6 +15,6 @@ use/slinux: use/x11/xfce use/x11/gdm2.20
@$(call add,THE_LISTS,$(call tags,base l10n))
@$(call set,META_VOL_SET,Simply Linux)
use/slinux/full: use/isohybrid use/slinux use/systemd +wireless \
use/branding/complete use/x11/drm use/x11/3d-proprietary
use/slinux/full: use/isohybrid use/slinux +systemd +wireless \
use/branding/complete use/x11/3d
@$(call add,THE_PACKAGES,apt-conf-sisyphus)

View File

@@ -1,2 +1,2 @@
Эта фича заменяет в базовой системе sysvinit на systemd;
см. тж. http://www.altlinux.org/systemd
Эта фича заменяла в базовой системе sysvinit на systemd;
в настоящее время является устаревшей, см. ../init/

View File

@@ -1,4 +1,3 @@
use/systemd:
use/systemd: use/init/systemd
@$(call add_feature)
@$(call add,COMMON_PACKAGES,systemd systemd-units systemd-sysvinit)
@$(call add,COMMON_PACKAGES,installer-feature-systemd-stage3 chkconfig)
@$(warning deprecated, see init feature)

View File

@@ -1,4 +0,0 @@
#!/bin/sh
# Don't allow systemd to set LANG.
echo 'LANG=' >/etc/locale.conf

View File

@@ -1,4 +0,0 @@
#!/bin/sh -efu
# aufs2 root is rw in reality
echo "/dev/root / auto defaults 0 0" >>/etc/fstab

View File

@@ -0,0 +1,5 @@
Эта фича добавляет в формируемый пользовательский корень
(как правило, live) функцию автоматического входа путём
конфигурирования отдельно запрошенного для установки
display manager (например, lightdm) либо специального
средства (пакеты nodm или autologin).

View File

@@ -0,0 +1,3 @@
use/x11-autologin: use/x11-autostart
@$(call add_feature)
@$(call add,THE_PACKAGES,shadow-groups) # gpasswd

View File

@@ -21,6 +21,8 @@ backup() {
cp -av "$1" "$1$BAK"
}
## this is only relevant for installable livecd
### FIXME: this shouldn't proceed in other cases!
restore_later() {
[ -n "$1" ] || return 0
@@ -37,13 +39,6 @@ restore_later() {
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_CFG=/etc/sysconfig/autologin
if [ -x /usr/sbin/autologin ]; then

View File

@@ -0,0 +1,5 @@
Эта фича добавляет в формируемый пользовательский корень
(как правило, live) функцию автоматического запуска
графической сессии; обратите внимание, что автоматическим
входом после запуска графики занимается соседняя фича
x11-autologin.

View File

@@ -0,0 +1,3 @@
use/x11-autostart: use/x11
@$(call add_feature)
@$(call add,BASE_PACKAGES,installer-feature-runlevel5-stage3) ###

View File

@@ -0,0 +1,18 @@
#!/bin/sh
if [ ! -x /usr/bin/X ]; then
echo "SKIP autostart: X not installed" >&2
exit 0
fi
## setup automated graphical session startup
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
## ...and systemd, if any
rm -f /etc/systemd/system/default.target
:

View File

@@ -1,2 +1,22 @@
Эта фича добавляет базовую поддержку графической системы X11
и комплектует типовые десктопные окружения.
Эта фича добавляет базовую поддержку графической системы X11,
а также комплектует типовые десктопные окружения и средства
графического входа в систему.
Для добавления X-сервера и драйверов используйте цели:
- use/x11/xorg -- свободные драйверы, может недоставать
акселерации, особенно 3D, и функций энергосбережения,
но поддерживают наиболее широкий спектр оборудования
для типичных десктопных задач;
- use/x11/3d -- по возможности подключаются проприетарные
драйверы NVIDIA/AMD, обычно обладающие более высоким
уровнем ускорения графики, но также имеющие и больше
проблем совместимости со свежими ядрами/xorg-server,
а заодно обычно рано теряющие поддержку "устаревших"
видеокарт.
Их применение возможно совмещать, но в этом случае следует
понимать, что автоопределение в X.org предпочитает свободный
драйвер и nvidia при наличии nouveau не будет автоматически
выбран, т.е. потребуется дополнительное конфигурирование
(вручную или при помощи alterator-x11) -- для live-систем
это может быть лишено практического смысла.

View File

@@ -4,89 +4,109 @@
+tde: use/x11/tde use/x11/kdm; @:
+kde4-lite: use/x11/kde4-lite use/x11/kdm4; @:
use/x11/xorg:
# the very minimal driver set
use/x11:
@$(call add_feature)
@$(call add,THE_LISTS,xorg)
@$(call add,THE_KMODULES,drm) # required by recent nvidia.ko as well
@$(call add,THE_LISTS,$(call tags,base xorg))
use/x11/wacom: use/x11/xorg
@$(call add,THE_PACKAGES,xorg-drv-wacom xorg-drv-wizardpen)
# free drivers for various hardware (might lack acceleration)
use/x11/xorg: use/x11 use/x11/intel
@$(call add,THE_KMODULES,drm-radeon drm-nouveau)
@$(call add,THE_LISTS,$(call tags,desktop xorg))
use/x11/drm: use/x11/xorg
@$(call add,THE_KMODULES,drm drm-radeon)
# both free and excellent
use/x11/intel: use/x11
@$(call add,THE_PACKAGES,xorg-drv-intel)
@$(call add,THE_PACKAGES,xorg-dri-intel) ### #25044
use/x11/3d-free: use/x11/drm
@$(call add,THE_KMODULES,drm-nouveau)
# for those cases when no 3D means no use at all
# NB: blobs won't Just Work (TM) with use/x11/xorg,
# nouveau gets prioritized during autodetection
#use/x11/3d: use/x11/intel use/x11/nvidia use/x11/fglrx; @:
use/x11/3d: use/x11/intel use/x11/nvidia use/x11/radeon; @:
### fglrx is broken with xorg-1.13 so far
use/x11/3d-proprietary: use/x11/xorg
@$(call add,THE_KMODULES,fglrx nvidia)
# has performance problems but is getting better, just not there yet
use/x11/radeon: use/x11
@$(call add,THE_KMODULES,drm-radeon)
@$(call add,THE_PACKAGES,xorg-drv-radeon)
# sometimes broken with current xorg-server
use/x11/nvidia: use/x11
@$(call add,THE_KMODULES,nvidia)
@$(call add,THE_PACKAGES,nvidia-settings nvidia-xconfig)
# oftenly broken with current xorg-server, use radeon then
use/x11/fglrx: use/x11
@$(call add,THE_KMODULES,fglrx)
@$(call add,THE_PACKAGES,fglrx_glx fglrx-tools)
### strictly speaking, runlevel5 should require a *dm, not vice versa
use/x11/runlevel5: use/x11/xorg
@$(call add,THE_PACKAGES,installer-feature-runlevel5-stage3)
use/x11/wacom: use/x11
@$(call add,THE_PACKAGES,xorg-drv-wacom xorg-drv-wizardpen)
### xdm: see also #23108
use/x11/xdm: use/x11/runlevel5
use/x11/xdm: use/x11-autostart
@$(call add,THE_PACKAGES,xdm installer-feature-no-xconsole-stage3)
### : some set()-like thing might be better?
use/x11/lightdm/gtk use/x11/lightdm/qt use/x11/lightdm/razorqt \
use/x11/lightdm/kde: use/x11/lightdm/%: use/x11/runlevel5
use/x11/lightdm/kde: use/x11/lightdm/%: use/x11-autostart
@$(call add,THE_PACKAGES,lightdm-$*-greeter)
use/x11/kdm: use/x11/runlevel5
use/x11/kdm: use/x11-autostart
@$(call add,THE_PACKAGES,kdebase-kdm<4)
use/x11/kdm4: use/x11/runlevel5
use/x11/kdm4: use/x11-autostart
@$(call add,THE_PACKAGES,kde4base-workspace-kdm)
use/x11/gdm2.20: use/x11/runlevel5
use/x11/gdm2.20: use/x11-autostart
@$(call add,THE_PACKAGES,gdm2.20)
use/x11/icewm: use/x11/xorg
use/x11/icewm: use/x11
@$(call add,THE_LISTS,$(call tags,icewm desktop))
use/x11/razorqt: use/x11/xorg
use/x11/razorqt: use/x11
@$(call add,THE_LISTS,$(call tags,razorqt desktop))
use/x11/tde: use/x11/xorg
use/x11/tde: use/x11
@$(call add,THE_LISTS,$(call tags,tde desktop))
use/x11/kde4-lite: use/x11/xorg
use/x11/kde4-lite: use/x11
@$(call add,THE_LISTS,$(call tags,kde4 desktop))
use/x11/kde4: use/x11/xorg
use/x11/kde4: use/x11
@$(call add,THE_PACKAGES,kde4-default)
use/x11/xfce: use/x11/xorg
use/x11/xfce: use/x11
@$(call add,THE_LISTS,$(call tags,xfce desktop))
use/x11/cinnamon: use/x11/xorg use/x11/drm
use/x11/cinnamon: use/x11/xorg
@$(call add,THE_LISTS,$(call tags,cinnamon desktop))
use/x11/gnome3: use/x11/xorg use/x11/drm
use/x11/gnome3: use/x11/xorg
@$(call add,THE_PACKAGES,gnome3-default)
@$(call add,THE_PACKAGES,gst-libav pulseaudio-daemon)
use/x11/e17: use/x11/xorg use/x11/3d-free
use/x11/e17: use/x11
@$(call add,THE_LISTS,$(call tags,e17 desktop))
use/x11/lxde: use/x11/xorg
use/x11/lxde: use/x11
@$(call add,THE_LISTS,$(call tags,lxde desktop))
use/x11/fvwm: use/x11/xorg
use/x11/fvwm: use/x11
@$(call add,THE_LISTS,$(call tags,fvwm desktop))
use/x11/sugar: use/x11/xorg
use/x11/sugar: use/x11
@$(call add,THE_LISTS,$(call tags,sugar desktop))
use/x11/wmaker: use/x11/xorg
use/x11/wmaker: use/x11
@$(call add,THE_LISTS,$(call tags,wmaker desktop))
use/x11/gnustep: use/x11/xorg
use/x11/gnustep: use/x11
@$(call add,THE_LISTS,$(call tags,gnustep desktop))
use/x11/xmonad: use/x11/xorg
use/x11/xmonad: use/x11
@$(call add,THE_LISTS,$(call tags,xmonad desktop))
use/x11/mate: use/x11
@$(call add,THE_LISTS,$(call tags,mate desktop))

View File

@@ -2,7 +2,7 @@
ANSI_OK ?= 1;32
ANSI_FAIL ?= 1;31
MAX_ERRORS = 3
MAX_ERRORS = 5
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (FAILURE|FATAL|ERROR|conflicts|Depends:) .*)|(.* (Stop|failed|not found)\.))$$
ifndef MKIMAGE_PROFILES

View File

@@ -6,10 +6,6 @@ endif
ifeq (distro,$(IMAGE_CLASS))
# request particular image subprofile inclusion
sub/%:
@$(call add,SUBPROFILES,$(@:sub/%=%))
# install media bootloader
boot/%:
@$(call set,BOOTLOADER,$*)

View File

@@ -14,5 +14,9 @@ config/pack/%: use/pack/%
config/name/%:
@$(call set,IMAGE_NAME,$*)
# request particular image subprofile inclusion
sub/%:
@$(call add,SUBPROFILES,$(@:sub/%=%))
# the final thing will pull the rest in
build: postclean; @:

View File

@@ -10,9 +10,13 @@ ifeq (ve,$(IMAGE_CLASS))
ve/.bare: profile/bare
@$(call add,BASE_PACKAGES,basesystem)
# add those
ve/.base: ve/.bare
@$(call add,BASE_PACKAGES,etcnet apt)
# no "vzctl enter"
ve/bare: ve/.bare
@$(call add,BASE_PACKAGES,sysvinit etcnet apt)
ve/bare: ve/.base
@$(call add,BASE_PACKAGES,sysvinit)
# /dev/pty and friends start here
ve/base: ve/bare

View File

@@ -56,6 +56,9 @@ IMAGES := $(DISTROS) $(VES) $(VMS)
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS) $(VM_TARGETS)
.PHONY: debug everything help space
# grepping for localized error messages is not trivial
export LC_MESSAGES=C
### duplicate but still needed
everything:
@n=1; sum=$(words $(DISTROS)); \

View File

@@ -26,8 +26,7 @@ copy-lists:
@$(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell cp --parents -at $(TARGET) \
-- $(value $V))))
$(shell cp --parents -at $(TARGET) -- $($V))))
copy-groups:
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
@@ -43,6 +42,6 @@ debug:
@echo -e $(foreach V, \
$(filter %_LISTS,$(sort $(.VARIABLES))), \
$(if $(filter environment% file,$(origin $V)),\
$(shell echo '\\n"**"' $V: $(value $V)))) '\n'
$(shell echo '\\n"**"' $V: $($V)))) '\n'
endif

182
pkg.in/lists/slinux/arm Normal file
View File

@@ -0,0 +1,182 @@
### NB: this is a massive duplication which should be dropped
### as soon as the bits to handle archdep packages are there
## games
gnome-games-gnomine
gnome-games-gnotravex
gnome-games-gnotski
gnome-games-mahjongg
gnome-games-sol
## graphics
gimp2
gimp-plugin-gutenprint
xsane-gimp2
gphoto2
sane
xsane
ristretto
## misc
strace
altlinux-freedesktop-menu-shallow-menu
altlinux-freedesktop-menu-icon-theme-default
docs-simply-linux
docs-linux_intro
fonts-ttf-droid
fonts-ttf-ubuntu-font-family
fonts-ttf-liberation
fonts-ttf-dejavu
gnome-system-monitor
gnome-icon-theme
kde4libs-
firefox
firefox-ru
xulrunner-gnome-support
file-roller
unzip
unrar
unarj
dbus-tools-gui
brasero
medit
gcalctool
synaptic
synaptic-usermode
apt-indicator
gksu
cups
ghostscript-cups
cups-pdf
avahi-daemon
blueman
update-kernel
printer-drivers-base
udev-extras
libnss-mdns
pulseaudio-daemon
pulseaudio-utils
pavucontrol
alsa-plugins-pulse
fdisk
cpufreq-simple
attr
rfkill
#alterator-x11
alterator-auth
alterator-xkb
alterator-pkg
alterator-packages
alterator-datetime
alterator-standalone
alterator-sysconfig
gnome-search-tool
yelp
rpminstall
system-config-printer
system-config-printer-udev
apt-repo
rekonq-
xdg-user-dirs
x-cursor-theme-jimmac
plymouth
atril-gtk
stardict-gtk
stardict-mueller7
lvm2
mdadm
## multimedia
easytag
audacious
audacious-plugins
## network
firefox-yandexbar
thunderbird
thunderbird-ru
pidgin
pidgin-libnotify
chestnut-dialer-gtk2
alterator-net-pptp
alterator-net-eth
alterator-net-pppoe
alterator-net-general
rdesktop
telnet
NetworkManager
NetworkManager-vpnc
NetworkManager-openvpn
NetworkManager-pptp
NetworkManager-openvpn-gnome
NetworkManager-pptp-gnome
NetworkManager-vpnc-gnome
usb-modeswitch
alsa-utils
dialog
## xfce
xfce4-xkb-plugin
xfce4-appfinder
xfce4-settings
xfce4-mixer
xfce4-minimal
xfce4-session
xfce4-panel
xfce4-screenshooter
xfconf-utils
xfce4-power-manager
Thunar
Terminal
libexo
xfce4-default
gvfs
gvfs-backends
udisks2
thunar-media-tags-plugin
thunar-volman-plugin
thunar-archive-plugin
xscreensaver
xscreensaver-frontend
xscreensaver-hacks-gl-
xscreensaver-modules-gl-
thunar-shares-plugin
xfwm4-themes
xfce4-clipman-plugin
xfce4-cpufreq-plugin
xfce4-timer-plugin
xfce4-datetime-plugin
xfce4-places-plugin
xfce4-quicklauncher-plugin
xfce4-time-out-plugin
xfce4-fsguard-plugin
xfce4-mailwatch-plugin
xfce4-battery-plugin
xfce4-verve-plugin
xfce4-diskperf-plugin
xfce4-eyes-plugin
xfce4-notes-plugin
xfce4-netload-plugin
xfce4-mount-plugin
xfce4-systemload-plugin
xfce4-cpugraph-plugin

View File

@@ -3,7 +3,7 @@
#gnome-games-glines
#gnome-games-gnect
#gnome-games-gnibbles
gnome-games-gnobots
#gnome-games-gnobots
#gnome-games-quadrapassel
gnome-games-gnomine
gnome-games-gnotravex
@@ -13,5 +13,5 @@ gnome-games-gnotski
gnome-games-mahjongg
#gnome-games-swell-foop
gnome-games-sol
gnome-games-sudoku
#gnome-games-sudoku
gnome-games-glchess

View File

@@ -20,8 +20,6 @@ gdm2.20-help
ntfsprogs-
driconf-
gdm-theme-simply
kde4libs-
kde-common-
kde3-menu-common-

4
pkg.in/lists/systemd Normal file
View File

@@ -0,0 +1,4 @@
systemd
systemd-units
systemd-sysvinit
chkconfig

3
pkg.in/lists/sysvinit Normal file
View File

@@ -0,0 +1,3 @@
sysvinit
sysklogd
interactivesystem

View File

@@ -0,0 +1,24 @@
kde4mobile-regular
kde4-settings-kmobile
maliit-framework-settings
kde4base
kde4graphics
kde4multimedia
kde4network
### this one was hard to find out but requisite
python3-module-pygobject3
gst-plugins-base
mplayer
vlc-mini
libqt4-sql-sqlite
plasma-applet-networkmanager
NetworkManager
NetworkManager-vpnc
NetworkManager-openvpn
NetworkManager-pptp
wpa_gui

View File

@@ -0,0 +1,42 @@
xorg-server
xorg-utils
xterm
xauth
twofing
setxkbmap
fonts-ttf-dejavu
fonts-ttf-droid
alsa-utils
amixer
aplay
pulseaudio-daemon
pulseaudio-utils
pavucontrol
rfkill
wpa_supplicant
pciutils
glibc-timezones
tzdata
etcnet
dhcpcd
openssh
openssh-blacklist
sysklogd
nfs-clients
zsh
vim-console
screen
rsync
sudo
su

View File

@@ -0,0 +1,14 @@
xorg-server
xorg-drv-evdev
xorg-drv-synaptics
xorg-drv-vesa
xorg-drv-fbdev
xauth
xorg-utils
x-cursor-theme-jimmac
menu-icons-default

View File

@@ -25,7 +25,7 @@ alterator-net-wifi
alterator-net-shares
alterator-proxy
alterator-x11
#alterator-x11
alterator-xkb
#alterator-datetime

View File

@@ -0,0 +1,11 @@
xorg-drv-ati
xorg-drv-cirrus
xorg-drv-mga
xorg-drv-modesetting
xorg-drv-nouveau
xorg-drv-nv
xorg-drv-qxl
#xorg-drv-s3
xorg-drv-s3virge
xorg-drv-savage
xorg-drv-sis

View File

@@ -1,9 +0,0 @@
#wm-select
# for those who need these
xorg-drv-keyboard
xorg-drv-mouse
#xorg-extensions*
# :-/
#*-debuginfo-

View File

@@ -0,0 +1,2 @@
xorg-drv-joystick
xorg-drv-multimedia

View File

@@ -1,31 +0,0 @@
xorg-server
xorg-drv-ati
xorg-drv-cirrus
xorg-drv-evdev
xorg-drv-fbdev
xorg-drv-intel
xorg-drv-joystick
xorg-drv-mga
xorg-drv-modesetting
xorg-drv-multimedia
xorg-drv-nouveau
xorg-drv-nv
#xorg-drv-s3
xorg-drv-s3virge
xorg-drv-savage
xorg-drv-sis
xorg-drv-synaptics
xorg-drv-vesa
xorg-drv-void
xorg-drv-qxl
#25044?
xorg-dri-intel
xauth
xorg-utils
x-cursor-theme-jimmac
menu-icons-default

View File

@@ -8,14 +8,21 @@ include $(BUILDDIR)/distcfg.mk
# if the subprofile is specified in src/dst notation,
# take src/ and put it as dst/ (for stage2 variants)
# NB: rootfs may come in first
all:
@for sub in $(SUBPROFILES); do \
src="$${sub%@*}" && \
dst="$${sub#*@}" && \
neq="$${src#$$dst}" && \
dstdir=""$(BUILDDIR)/$$dst/"" && \
if [ -d "$$dstdir" ]; then \
action="complemented"; \
else \
action="initialized"; \
fi; \
rsync -qa "$$src/" "$(BUILDDIR)/$$dst/" && \
mp-commit "$(BUILDDIR)/$$dst/" \
"$$dst subprofile initialized$${neq:+ (using $$src)}"; \
"$$dst subprofile $$action$${neq:+ (using $$src)}"; \
done
clean:

18
sub.in/rootfs/README Normal file
View File

@@ -0,0 +1,18 @@
=== sub.in/rootfs ===
Этот каталог содержит общие компоненты, добавляемые в "пользовательскую"
корневую файловую систему вне зависимости от того, с чем именно в итоге
столкнётся пользователь: livecd, vm, arm...
Соответственно функциональность вроде настройки автоматического входа
в систему, которая должна быть задействована вне зависимости от того,
какая часть профиля отвечает за формирование итоговой "пользоФС",
может быть помещена в подкаталог rootfs/ (аналогично stage2/ для фич,
дополняющих все производные субпрофиля stage2).
В фичах, опирающихся на функциональность rootfs, следует указывать
зависимость на sub/rootfs@нужное (например, sub/rootfs@live в фиче
live, порождающей субпрофиль live из субпрофиля stage2).
Зависимость на sub/rootfs не имеет смысла, указывать подобное не следует
ни в фичах, дополняющих rootfs, ни в фичах, опирающихся на неё.

View File

@@ -81,6 +81,7 @@ eepro100.ko
eepro.ko
eexpress.ko
ehci-hcd.ko
ehci_marvell.ko
epic100.ko
eql.ko
eth16i.ko