Compare commits
82 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
edfdeca311 | ||
|
b6e640bd8d | ||
|
0c41e39ec0 | ||
|
ed7bf0db9f | ||
|
17bd880e19 | ||
|
80090d1f1a | ||
|
7ffd600076 | ||
|
1b7ce25f10 | ||
|
5dba27d011 | ||
|
79bb3f8d6e | ||
|
788cad885e | ||
|
a52b7476a4 | ||
|
deb63e0d63 | ||
|
3f85ed2b19 | ||
|
a07959e2f5 | ||
|
af6b9940de | ||
|
71f44090c5 | ||
|
872afb3c0c | ||
|
191388d7cf | ||
|
70f2a70fca | ||
|
dc9b706619 | ||
|
50c27a1782 | ||
|
3aaa45dd23 | ||
|
a0af945d7f | ||
|
a681b4bd98 | ||
|
b7a395c012 | ||
|
a8e70fd4e6 | ||
|
cff036c212 | ||
|
482e7bc9f3 | ||
|
e1ef65b410 | ||
|
a62cdfa69e | ||
|
045ae269b2 | ||
|
345319805d | ||
|
9c6824ea57 | ||
|
62ab13cc77 | ||
|
4355f401db | ||
|
3dd020338b | ||
|
402b6e080b | ||
|
ca67a20952 | ||
|
5c5c4a6a6b | ||
|
0ad3c6b8bd | ||
|
f044bdbc33 | ||
|
202f473499 | ||
|
97e1be6a31 | ||
|
c39c100cdc | ||
|
bc091ab919 | ||
|
8b39c4af27 | ||
|
6cd6a0ff0d | ||
|
7a3ab55db4 | ||
|
0c97aaf80b | ||
|
01a03d037b | ||
|
33fe8cbd1f | ||
|
178a700e6e | ||
|
3fcbed3378 | ||
|
d9a0d305ee | ||
|
8473fda02d | ||
|
9304c12c58 | ||
|
b95caa9b73 | ||
|
804cedbca5 | ||
|
efa73b97f0 | ||
|
5a7b6b5739 | ||
|
df0861ad02 | ||
|
37f050d227 | ||
|
5a1065c33e | ||
|
87bfa3f65d | ||
|
0ec7d7cd01 | ||
|
426c985da3 | ||
|
8fbf3585b0 | ||
|
a7ac4f236c | ||
|
672125b9e5 | ||
|
e93d6cabca | ||
|
7738c6a67d | ||
|
2f307ffffb | ||
|
3d2f69f112 | ||
|
abfd88e262 | ||
|
96e89d0062 | ||
|
643d4a753d | ||
|
90d7a6142a | ||
|
180ed5359c | ||
|
a8ccfb3d41 | ||
|
d3351bb8b7 | ||
|
d9585b48fb |
@@ -1,5 +1,5 @@
|
||||
Name: mkimage-profiles
|
||||
Version: 0.5.2
|
||||
Version: 0.6.1
|
||||
Release: alt1
|
||||
|
||||
Summary: ALT Linux based distribution metaprofile
|
||||
@@ -15,6 +15,8 @@ Requires: rsync git-core
|
||||
Requires: time schedutils
|
||||
Requires: mkimage >= 0.2.0
|
||||
|
||||
# Recommends: graphviz
|
||||
|
||||
%define mpdir %_datadir/%name
|
||||
%add_findreq_skiplist %mpdir/*.in/*
|
||||
|
||||
@@ -37,7 +39,7 @@ Virtual environment template caches (OpenVZ/LXC) can be made either.
|
||||
In short, setup hasher (http://en.altlinux.org/hasher) and here we go:
|
||||
cd %mpdir
|
||||
head README
|
||||
make distro/syslinux.iso
|
||||
make syslinux.iso
|
||||
|
||||
But if you're into regular distro hacking and are not afraid of make
|
||||
and modest metaprogramming (some code generation and introspection),
|
||||
@@ -59,6 +61,29 @@ cp -a * %buildroot%mpdir
|
||||
%doc README QUICKSTART
|
||||
|
||||
%changelog
|
||||
* Mon Mar 26 2012 Michael Shigorin <mike@altlinux.org> 0.6.1-alt1
|
||||
- ISO9660 metadata support
|
||||
- initial alien VE image
|
||||
|
||||
* Mon Mar 19 2012 Michael Shigorin <mike@altlinux.org> 0.6.0-alt1
|
||||
- reports (targets graph)
|
||||
|
||||
* Mon Mar 12 2012 Michael Shigorin <mike@altlinux.org> 0.5.7-alt1
|
||||
- distro tweaks
|
||||
|
||||
* Mon Feb 20 2012 Michael Shigorin <mike@altlinux.org> 0.5.6-alt1
|
||||
- minor fixups
|
||||
|
||||
* Mon Feb 06 2012 Michael Shigorin <mike@altlinux.org> 0.5.5-alt1
|
||||
- live-related tweaks (including live.hooks support)
|
||||
- terminal server and webkiosk images
|
||||
|
||||
* Mon Jan 16 2012 Michael Shigorin <mike@altlinux.org> 0.5.4-alt1
|
||||
- better diags for initial deployment
|
||||
|
||||
* Mon Jan 02 2012 Michael Shigorin <mike@altlinux.org> 0.5.3-alt1
|
||||
- multi-target, multi-arch, single-job builds
|
||||
|
||||
* Mon Dec 19 2011 Michael Shigorin <mike@altlinux.org> 0.5.2-alt1
|
||||
- THE_{KMODULES,PACKAGES,LISTS,GROUPS}
|
||||
- incremental development, refactoring and bugfixing
|
||||
|
@@ -1,6 +0,0 @@
|
||||
object ae85287f97ae2879647491b4e3b0467ea250d931
|
||||
type commit
|
||||
tag v0.5.1
|
||||
tagger Michael Shigorin <mike@altlinux.org> 1322849338 +0200
|
||||
|
||||
cpio.xz
|
6
.gear/tags/9f3938b732545a20e4acfd547c5a002fbca54b21
Normal file
6
.gear/tags/9f3938b732545a20e4acfd547c5a002fbca54b21
Normal file
@@ -0,0 +1,6 @@
|
||||
object 1b7ce25f10d8e3faede66d8c66d3f3bb43f59ceb
|
||||
type commit
|
||||
tag v0.6.0
|
||||
tagger Michael Shigorin <mike@altlinux.org> 1332177960 +0200
|
||||
|
||||
reports/targets
|
@@ -1 +1 @@
|
||||
461cfaf9fc1fffe08daf223d04fd3f52edd21c16 v0.5.1
|
||||
9f3938b732545a20e4acfd547c5a002fbca54b21 v0.6.0
|
||||
|
116
Makefile
116
Makefile
@@ -1,75 +1,47 @@
|
||||
# steps to build a distribution image:
|
||||
# --- here
|
||||
# 1. initialize new profile (BUILDDIR) as a copy of image.in/
|
||||
# 2. configure distro
|
||||
# 3. copy the needed bits from metaprofile to a new profile
|
||||
# --- in BUILDDIR
|
||||
# 4. build subprofiles and subsequently an image
|
||||
# umbrella mkimage-profiles makefile:
|
||||
# iterate over multiple goals/arches,
|
||||
# collect proceedings
|
||||
|
||||
help:
|
||||
@echo '** available distribution targets:'
|
||||
@echo $(DISTROS) | fmt -sw"$$((COLUMNS>>1))" | column -t
|
||||
@echo
|
||||
@echo '** available virtual environment targets:'
|
||||
@echo $(VES) | fmt -sw"$$((COLUMNS>>1))" | column -t
|
||||
|
||||
MKIMAGE_PROFILES = $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
|
||||
# only process the first target (inter-target cleanup is tricky)
|
||||
IMAGE_TARGET := $(firstword $(MAKECMDGOALS))# ve/generic.tar.gz
|
||||
ifeq (./,$(dir $(IMAGE_TARGET)))# convenience fallback
|
||||
IMAGE_TARGET := distro/$(IMAGE_TARGET)# for omitted "distro/"
|
||||
# for immediate assignment
|
||||
ifndef ARCHES
|
||||
ifdef ARCH
|
||||
ARCHES := $(ARCH)
|
||||
else
|
||||
ARCHES := $(shell arch | sed 's/i686/i586/')
|
||||
endif
|
||||
IMAGE_CONF := $(firstword $(subst ., ,$(IMAGE_TARGET)))# ve/generic
|
||||
IMAGE_CLASS := $(firstword $(subst /, ,$(IMAGE_TARGET)))# ve
|
||||
IMAGE_FILE := $(lastword $(subst /, ,$(IMAGE_TARGET)))# generic.tar.gz
|
||||
IMAGE_NAME := $(firstword $(subst ., ,$(IMAGE_FILE)))# generic
|
||||
IMAGE_TYPE := $(subst $(IMAGE_NAME).,,$(IMAGE_FILE))# tar.gz
|
||||
|
||||
# preferences
|
||||
-include $(HOME)/.mkimage/profiles.mk
|
||||
|
||||
# most of the actual work done elsewhere
|
||||
include lib/*.mk
|
||||
include conf.d/*.mk
|
||||
include features.in/*/config.mk
|
||||
|
||||
DISTRO_TARGETS := $(shell sed -n 's,^\(distro/[^:.]\+\):.*$$,\1,p' \
|
||||
lib/distro.mk $(wildcard conf.d/*.mk) | sort -u)
|
||||
VE_TARGETS := $(shell sed -n 's,^\(ve/[^:.]\+\):.*$$,\1,p' \
|
||||
lib/ve.mk $(wildcard conf.d/*.mk) | sort -u)
|
||||
DISTROS := $(call addsuffices,$(DISTRO_EXTS),$(DISTRO_TARGETS))
|
||||
VES := $(call addsuffices,$(VE_EXTS),$(VE_TARGETS))
|
||||
IMAGES := $(DISTROS) $(VES)
|
||||
|
||||
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS)
|
||||
|
||||
### suboptimal but at least clear, reliable and convenient
|
||||
all:
|
||||
@n=1; sum=$(words $(DISTROS)); \
|
||||
for distro in $(DISTROS); do \
|
||||
echo "** building $$distro:"; \
|
||||
$(MAKE) --no-print-directory \
|
||||
ALL=$$n/$$sum \
|
||||
BUILDDIR=$(BUILDDIR) \
|
||||
$$distro; \
|
||||
echo; \
|
||||
n=$$(($$n+1)); \
|
||||
done
|
||||
|
||||
$(IMAGES): debug \
|
||||
config/with/$(IMAGE_CONF) \
|
||||
config/like/$(IMAGE_CLASS) \
|
||||
config/name/$(IMAGE_NAME) \
|
||||
config/pack/$(IMAGE_TYPE) \
|
||||
build; @:
|
||||
|
||||
# convenience shortcut
|
||||
$(DISTROS:distro/%=%): %: distro/%
|
||||
|
||||
debug:
|
||||
ifeq (2,$(DEBUG))
|
||||
@$(foreach v,\
|
||||
$(filter IMAGE_%,$(sort $(.VARIABLES))),\
|
||||
$(warning $v = $($v)))
|
||||
endif
|
||||
export ARCHES
|
||||
|
||||
# supervise target tracing; leave stderr alone
|
||||
ifdef REPORT
|
||||
export REPORT_PATH := $(shell mktemp --tmpdir mkimage-profiles.report.XXXXXXX)
|
||||
POSTPROC := | bin/report-filter > $(REPORT_PATH)
|
||||
endif
|
||||
|
||||
# recursive make considered useful for m-p
|
||||
MAKE += -r --no-print-directory
|
||||
|
||||
.PHONY: clean distclean help
|
||||
clean distclean help:
|
||||
@$(MAKE) -f main.mk $@
|
||||
|
||||
export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
||||
|
||||
# real targets need real work
|
||||
%:
|
||||
@n=1; \
|
||||
say() { echo "$$@" >&2; }; \
|
||||
if [ "$(NUM_TARGETS)" -gt 1 ]; then \
|
||||
n="`echo $(MAKECMDGOALS) \
|
||||
| tr '[[:space:]]' '\n' \
|
||||
| grep -nx "$@" \
|
||||
| cut -d: -f1`"; \
|
||||
say "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
|
||||
fi; \
|
||||
for ARCH in $(ARCHES); do \
|
||||
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then say; fi; \
|
||||
say "** ARCH: $$ARCH" >&2; \
|
||||
$(MAKE) -f main.mk ARCH=$$ARCH $@ $(POSTPROC); \
|
||||
$(MAKE) -f reports.mk ARCH=$$ARCH; \
|
||||
done; \
|
||||
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then say; fi
|
||||
|
@@ -15,12 +15,13 @@
|
||||
команды
|
||||
~~~~~~~
|
||||
- от имени root:
|
||||
# apt-get install hasher git-core
|
||||
# apt-get install mkimage hasher git-core
|
||||
# hasher-useradd USER
|
||||
|
||||
- от имени пользователя (после повторного входа):
|
||||
$ git config --global user.email "my@email"
|
||||
$ git config --global user.name "My Name"
|
||||
$ mkdir ~/out
|
||||
|
||||
- тестовая сборка (см. тж. lib/distro.mk, doc/variables.txt):
|
||||
$ make distro/icewm.iso
|
||||
|
60
bin/mktmpdir
60
bin/mktmpdir
@@ -1,20 +1,53 @@
|
||||
#!/bin/sh
|
||||
# analyze free space, preferring tmpfs over really many gigaz
|
||||
# and taking into account configured hasher workdir prefices
|
||||
|
||||
# hope there aren't spaces in RM's $HOME are they?
|
||||
DIRS="$TMP $TMPDIR $HOME/hasher /tmp /var/tmp"
|
||||
DIRS="$TMP $TMPDIR $HOME/hasher /tmp /var/tmp .."
|
||||
MINSIZE=262144 # face control criterion
|
||||
|
||||
# poor man's SourceIfExists()
|
||||
try_source() { [ -f "$1" ] && . "$1"; }
|
||||
|
||||
# hasher accepted ones
|
||||
get_prefices()
|
||||
{
|
||||
try_source /etc/hasher-priv/system
|
||||
try_source `/usr/libexec/hasher-priv/getconf.sh`
|
||||
echo "$prefix" | tr ':' '\n' | while read i; do realpath "$i"; done
|
||||
}
|
||||
|
||||
# drop candidates that hasher won't handle anyways
|
||||
# NB: doesn't take --number into account,
|
||||
# prefix lists are defined by the primary configuration
|
||||
contemplate_dirs()
|
||||
{
|
||||
for d in "$@"; do
|
||||
D="`realpath "$d"`";
|
||||
for p in `get_prefices`; do
|
||||
[ "${D#$p}" = "$D" ] || echo "$D";
|
||||
done;
|
||||
done \
|
||||
| uniq # _not_ sort -u
|
||||
}
|
||||
|
||||
# hasher emits no meaningful errors regarding those, sigh
|
||||
check_options()
|
||||
{
|
||||
! egrep -q "^$1 $2 .*no(dev|exec)" /proc/mounts
|
||||
}
|
||||
|
||||
# pick existing, writeable, >256M free space dirs
|
||||
# rank them wrt type: tmpfs > realfs > rootfs
|
||||
choose_tmpdir() {
|
||||
for i in $DIRS; do
|
||||
for i in "$@"; do
|
||||
[ -d "$i" -a -w "$i" ] || continue
|
||||
echo -n "$i "
|
||||
df -Tl "$i" | tail -1
|
||||
done \
|
||||
| sort -unk6 \
|
||||
| while read dir dev fstype size used free percent mnt; do
|
||||
check_options "$dev" "$mnt" || continue
|
||||
[ "$free" -gt "$MINSIZE" ] || continue
|
||||
[ "$fstype" = "tmpfs" ] && { echo "2 $dir $free"; continue; }
|
||||
[ "$mnt" = "/" ] && { echo "0 $dir $free"; continue; }
|
||||
@@ -25,5 +58,24 @@ choose_tmpdir() {
|
||||
| cut -f2 -d' '
|
||||
}
|
||||
|
||||
DIR="`choose_tmpdir`"
|
||||
mktemp -d "${1:-tmpdir}.XXXXXXX" --tmpdir="${DIR:-`realpath ..`}"
|
||||
# bringing it all together
|
||||
TMPDIRS="`contemplate_dirs $DIRS`"
|
||||
if [ -z "$TMPDIRS" ]; then
|
||||
echo "error: no suitable directories found;" >&2
|
||||
echo "please check docs, filesystem and hasher setup" >&2
|
||||
echo "(mount enough tmpfs into /tmp or fix hasher-priv prefix?)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TEMP="`choose_tmpdir $TMPDIRS`"
|
||||
if [ -z "$TEMP" ]; then
|
||||
echo "error: no suitable directories found;" >&2
|
||||
echo "please check hasher docs and filesystem setup" >&2
|
||||
echo "(nodev and/or noexec on an otherwise suitable filesystem?)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIR="$TEMP/`dirname "$1"`"
|
||||
NAME="`basename "${1:-tmpdir}"`"
|
||||
mkdir -p "$DIR" # in case $1 contains slash(es)
|
||||
mktemp -d "$NAME.XXXXXXX" --tmpdir="${DIR%/.}"
|
||||
|
4
bin/report-filter
Executable file
4
bin/report-filter
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# filter worker make stdout for report scripts
|
||||
|
||||
grep '^trace:building ' | uniq
|
33
bin/report-targets
Executable file
33
bin/report-targets
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "digraph {"
|
||||
echo " { node [fontname=Helvetica,fontsize=20];"
|
||||
|
||||
while read first second third rest; do
|
||||
FROM=; TO=
|
||||
case "$first" in
|
||||
"trace:building")
|
||||
case "$third" in
|
||||
"->")
|
||||
FROM="$second"; TO="$rest";;
|
||||
*)
|
||||
continue;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
continue;;
|
||||
esac
|
||||
[ -n "$FROM" -a -n "$TO" ] || continue
|
||||
for to in $TO; do
|
||||
out=" \"$FROM\" -> \"$to\""
|
||||
case $to in
|
||||
*distro/*)
|
||||
echo "$out [weight=10];";;
|
||||
*)
|
||||
echo "$out";;
|
||||
esac
|
||||
done
|
||||
done
|
||||
|
||||
echo " }"
|
||||
echo "}"
|
52
bin/report-targets2vars
Executable file
52
bin/report-targets2vars
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
|
||||
DISTCFG=build/distcfg.mk
|
||||
[ -s "$DISTCFG" ] || exit 1
|
||||
|
||||
VARIABLES=
|
||||
|
||||
echo "graph { rankdir=LR;"
|
||||
echo " { node [height=.1,width=.3,fontname=Helvetica,fontsize=10];"
|
||||
|
||||
feat_vars()
|
||||
{
|
||||
FEATURE=
|
||||
while read first second rest; do
|
||||
case "$first" in
|
||||
\#[A-Z]*)
|
||||
continue;; # overridden feature
|
||||
\#) # feature mark
|
||||
case "$second" in
|
||||
profile/*)
|
||||
FEATURE=;;
|
||||
*)
|
||||
FEATURE="$second";;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
case "$second" in
|
||||
=|+=|?=)
|
||||
case "$first" in
|
||||
DISTCFG_MK|SUBPROFILES|FEATURES|IMAGE*|MKIMAGE_*)
|
||||
continue;;
|
||||
*)
|
||||
VAR="$first"
|
||||
VARIABLES="$VARIABLES; $VAR"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
continue;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
[ -n "$FEATURE" -a -n "$VAR" ] || continue
|
||||
echo " \"$FEATURE\" -- \"$VAR\";"
|
||||
done < "$DISTCFG"
|
||||
echo " { node [shape=box]$VARIABLES; }"
|
||||
}
|
||||
|
||||
feat_vars | LC_COLLATE=C sort -ru
|
||||
|
||||
echo " }"
|
||||
echo "}"
|
6
conf.d/alien.mk
Normal file
6
conf.d/alien.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
ve/.centos-base: ve/.bare
|
||||
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
|
||||
|
||||
ve/centos: ve/.centos-base
|
||||
@$(call add,BASE_PACKAGES,openssh-server)
|
||||
|
@@ -1,16 +1,18 @@
|
||||
# desktop distributions
|
||||
ifeq (distro,$(IMAGE_CLASS))
|
||||
|
||||
distro/desktop-base: distro/installer use/repo/main \
|
||||
use/syslinux/ui-vesamenu use/x11/xorg use/bootloader/grub
|
||||
distro/.desktop-base: distro/.installer use/syslinux/ui-vesamenu use/x11/xorg
|
||||
@$(call set,INSTALLER,desktop)
|
||||
|
||||
distro/desktop-mini: distro/desktop-base \
|
||||
use/lowmem use/x11/xdm use/bootloader/lilo \
|
||||
use/power/acpi/button use/cleanup/alterator
|
||||
distro/.desktop-mini: distro/.desktop-base use/lowmem use/x11/xdm \
|
||||
use/power/acpi/button use/cleanup/alterator; @:
|
||||
|
||||
distro/icewm: distro/desktop-mini
|
||||
@$(call add,BASE_LISTS,$(call tags,icewm desktop))
|
||||
distro/tde: distro/.desktop-mini +tde
|
||||
@$(call add,BASE_LISTS,$(call tags,(base || desktop) && network))
|
||||
|
||||
distro/desktop-systemd: distro/icewm use/systemd
|
||||
distro/icewm: distro/.desktop-mini +icewm; @:
|
||||
distro/ltsp-icewm: distro/icewm +ltsp; @:
|
||||
distro/ltsp-tde: distro/tde +ltsp; @:
|
||||
distro/desktop-systemd: distro/icewm use/systemd; @:
|
||||
|
||||
endif
|
||||
|
@@ -1,40 +1,43 @@
|
||||
# live images
|
||||
ifeq (distro,$(IMAGE_CLASS))
|
||||
|
||||
distro/dos: distro/.init use/dos use/syslinux/ui-menu
|
||||
distro/rescue: distro/.base use/rescue use/syslinux/ui-menu
|
||||
distro/live: distro/.base use/live/base use/power/acpi/cpufreq
|
||||
distro/live-systemd: distro/.base use/live/base use/systemd
|
||||
distro/syslinux: distro/.init \
|
||||
use/syslinux/localboot.cfg use/syslinux/ui-vesamenu use/hdt; @:
|
||||
|
||||
distro/dos: distro/.init use/dos use/syslinux/ui-menu; @:
|
||||
distro/rescue: distro/.base use/rescue use/syslinux/ui-menu; @:
|
||||
distro/live-systemd: distro/.base use/live/base use/systemd; @:
|
||||
|
||||
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
|
||||
distro/.live-desktop: distro/.base use/syslinux/ui-vesamenu +live; @:
|
||||
|
||||
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
|
||||
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
|
||||
|
||||
distro/live-builder: pkgs := livecd-tmpfs livecd-online-repo mkimage-profiles
|
||||
distro/live-builder: distro/.base use/repo/main \
|
||||
use/live/base use/dev/mkimage use/power/acpi/button
|
||||
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo
|
||||
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
|
||||
@$(call add,LIVE_PACKAGES,zsh sudo)
|
||||
@$(call add,LIVE_PACKAGES,$(pkgs))
|
||||
@$(call add,LIVE_PACKAGES,zsh sudo apt-repo)
|
||||
@$(call add,MAIN_PACKAGES,rpm-build basesystem)
|
||||
@$(call add,MAIN_PACKAGES,fakeroot sisyphus_check)
|
||||
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
|
||||
@$(call add,MAIN_PACKAGES,file make-initrd make-initrd-propagator)
|
||||
@$(call add,MAIN_PACKAGES,$(pkgs))
|
||||
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
|
||||
|
||||
distro/live-install: distro/.base use/live/base use/syslinux/localboot.cfg
|
||||
distro/live-install: distro/.live-base use/syslinux/localboot.cfg
|
||||
@$(call add,LIVE_PACKAGES,live-install)
|
||||
|
||||
distro/live-icewm: distro/live use/live/autologin
|
||||
@$(call add,LIVE_LISTS, \
|
||||
$(call tags,(base || desktop) && (live || network || icewm)))
|
||||
|
||||
distro/live-razorqt: distro/live use/live/autologin
|
||||
@$(call add,LIVE_LISTS, \
|
||||
$(call tags,(base || desktop) && (live || network || razorqt)))
|
||||
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
|
||||
distro/live-razorqt: distro/.live-desktop +razorqt; @:
|
||||
distro/live-tde: distro/.live-desktop +tde; @:
|
||||
|
||||
distro/live-rescue: distro/live-icewm
|
||||
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
|
||||
@$(call add,LIVE_LISTS, \
|
||||
$(call tags,(base || extra) && (archive || rescue || network)))
|
||||
|
||||
distro/live-webkiosk: distro/.live-desktop use/live/autologin \
|
||||
use/live/hooks use/live/ru use/cleanup
|
||||
@$(call add,LIVE_PACKAGES,livecd-webkiosk)
|
||||
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
|
||||
@$(call add,CLEANUP_PACKAGES,'installer*' 'alterator*' 'libqt4*')
|
||||
|
||||
endif
|
||||
|
@@ -1,21 +1,20 @@
|
||||
# server distributions
|
||||
ifeq (distro,$(IMAGE_CLASS))
|
||||
|
||||
distro/server-base: distro/installer use/repo/main \
|
||||
use/syslinux/ui-menu use/memtest use/bootloader/grub
|
||||
distro/.server-base: distro/.installer use/syslinux/ui-menu use/memtest
|
||||
@$(call add,BASE_LISTS,server-base)
|
||||
|
||||
distro/server-mini: distro/server-base use/cleanup/x11-alterator
|
||||
distro/server-mini: distro/.server-base use/cleanup/x11-alterator
|
||||
@$(call set,KFLAVOURS,el-smp)
|
||||
@$(call add,THE_KMODULES,e1000e igb)
|
||||
@$(call add,STAGE1_KMODULES,e1000e igb)
|
||||
@$(call add,BASE_LISTS,\
|
||||
$(call tags,base && (server || network || security || pkg)))
|
||||
@$(call add,BASE_LISTS,$(call tags,extra network))
|
||||
@$(call add,BASE_LISTS,$(call tags,extra (server || network)))
|
||||
|
||||
distro/server-systemd: distro/server-mini use/systemd
|
||||
distro/server-systemd: distro/server-mini use/systemd use/bootloader/lilo; @:
|
||||
|
||||
distro/server-ovz: distro/server-mini \
|
||||
distro/server-ovz: distro/server-mini use/install2/net \
|
||||
use/hdt use/rescue use/firmware/server use/power/acpi/button
|
||||
@$(call set,STAGE1_KFLAVOUR,std-def)
|
||||
@$(call set,KFLAVOURS,std-def ovz-el)
|
||||
@@ -23,7 +22,6 @@ distro/server-ovz: distro/server-mini \
|
||||
@$(call add,MAIN_KMODULES,bcmwl ndiswrapper)
|
||||
@$(call add,MAIN_KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)
|
||||
@$(call add,MAIN_KMODULES,drbd83 kvm)
|
||||
@$(call add,INSTALL2_PACKAGES,curl) ### should become curl-mini
|
||||
@$(call add,BASE_LISTS,ovz-server)
|
||||
@$(call add,MAIN_LISTS,kernel-wifi)
|
||||
@$(call add,MAIN_GROUPS,dns-server http-server ftp-server kvm-server)
|
||||
|
@@ -1,5 +1,14 @@
|
||||
предположения фрагментов кода об окружении
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
NB: пути приводятся от верхнего уровня; проект в целом предполагает
|
||||
GNU make 3.81 (с использованием которого и разрабатывается).
|
||||
|
||||
- lib/report.mk
|
||||
+ ожидает, что каждая подлежащая трассированию цель каждого
|
||||
makefile при сборке конфигурации образа содержит непустой
|
||||
recipe -- хотя бы "; @:" -- т.к. зависит от запуска $(SHELL)
|
||||
+ характерный признак пропуска -- разрыв графа (report-targets.png)
|
||||
|
||||
- pkg.in/lists/Makefile
|
||||
+ ожидает, что названия пакаджлистов указываются в переменных
|
||||
вида *_LISTS, и копирует в генерируемый профиль только их
|
||||
|
@@ -9,12 +9,18 @@
|
||||
+ см. ../image.in/Makefile, apt.conf.sample
|
||||
|
||||
- ARCH
|
||||
+ задаёт целевую архитектуру образа
|
||||
+ задаёт целевую архитектуру образов
|
||||
+ значение: пусто (по умолчанию авто), i586 или x86_64
|
||||
+ см. ../lib/build.mk
|
||||
|
||||
- ARCHES
|
||||
+ задаёт набор целевых архитектур образов
|
||||
+ значение: пусто (по умолчанию авто) либо список через пробел
|
||||
+ см. ../Makefile
|
||||
|
||||
- BELL
|
||||
+ подаёт сигнал после завершения сборки
|
||||
+ значение: пусто (по умолчанию нет) либо любая строка
|
||||
+ см. ../lib/build.mk
|
||||
|
||||
- BUILDDIR
|
||||
@@ -22,6 +28,16 @@
|
||||
+ значение: пусто (по умолчанию авто) либо строка
|
||||
+ см. ../lib/profile.mk
|
||||
|
||||
- BUILDDIR_PREFIX
|
||||
+ задаёт префикс каталога генерируемого профиля и сборки
|
||||
+ значение: строка; по умолчанию выбирается алгоритмически
|
||||
+ см. ../main.mk
|
||||
|
||||
- BUILDLOG
|
||||
+ задаёт путь к файлу журнала сборки/очистки
|
||||
+ значение: по умолчанию $(BUILDDIR)/build.log либо строка
|
||||
+ см. ../lib/log.mk
|
||||
|
||||
- CHECK
|
||||
+ включает режим проверки сборки конфигурации
|
||||
+ значение: пусто (по умолчанию) либо любая строка
|
||||
@@ -49,6 +65,16 @@
|
||||
+ значение: пусто (по умолчанию) либо любая строка
|
||||
+ см. ../lib/build.mk
|
||||
|
||||
- REPORT
|
||||
+ запрашивает создание отчёта о собранном образе
|
||||
+ значение: пусто (по умолчанию) либо любая строка
|
||||
+ см. ../Makefile, ../report.mk, ../lib/report.mk
|
||||
|
||||
- SAVE_PROFILE
|
||||
+ сохраняет архив сгенерированного профиля в .disk/
|
||||
+ значение: пусто (по умолчанию) либо любая строка
|
||||
+ см. ../image.in/Makefile
|
||||
|
||||
пример
|
||||
~~~~~~
|
||||
make DEBUG=1 CLEAN=1 distro/syslinux.iso
|
||||
|
@@ -2,15 +2,29 @@
|
||||
# (only regarding the needed subprofiles)
|
||||
|
||||
ifndef BUILDDIR
|
||||
help all:
|
||||
|
||||
help/plus all: banner
|
||||
@$(call grepper,'^+')
|
||||
|
||||
help/features: banner
|
||||
@$(call grepper,'^use/')
|
||||
|
||||
banner:
|
||||
@echo "** BUILDDIR not defined; available features:"
|
||||
|
||||
grepper = $(and $(1),$(grepper_body))
|
||||
define grepper_body
|
||||
@for dir in */; do \
|
||||
echo -n "$$dir: "; \
|
||||
grep -h '^use/' $$dir/config.mk \
|
||||
out="`grep -h $(1) $$dir/config.mk \
|
||||
| cut -f1 -d: \
|
||||
| tr ' ' '\n\n' \
|
||||
| grep $(1) \
|
||||
| tr '\n' ' ' \
|
||||
| sort -u; \
|
||||
| sort -u`"; \
|
||||
[ -z "$$out" ] || echo "$$dir: $$out"; \
|
||||
done
|
||||
endef
|
||||
|
||||
else
|
||||
|
||||
include $(BUILDDIR)/distcfg.mk
|
||||
@@ -108,7 +122,7 @@ $(FEATURES):
|
||||
if [ -s "generate.mk" ]; then $(MAKE) -f generate.mk; fi; \
|
||||
if type -t git >&/dev/null && \
|
||||
pushd "$(BUILDDIR)/" >/dev/null; then \
|
||||
if test -n "`git status -s`"; then \
|
||||
if [ -n "`git status -s`" ]; then \
|
||||
git add . && \
|
||||
git commit -qam "$$feat feature generation complete"; \
|
||||
fi; \
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
Каждая фича должна содержать задействуемый при построении
|
||||
конфигурации будущего образа файл config.mk, включаемый
|
||||
в ../Makefile; он может описывать одну или более целей
|
||||
в ../main.mk; он может описывать одну или более целей
|
||||
вида use/*, дополняющих конфигурацию, и при наличии
|
||||
дополнительных хуков для копирования или generate.*
|
||||
обязан добавить имя фичи в $(FEATURES), для чего
|
||||
@@ -14,17 +14,18 @@
|
||||
после инициализации профиля (см. ../image.in/) и копирования
|
||||
субпрофилей (см. ../sub.in/). Для каждой фичи, указанной
|
||||
в $(FEATURES), копируются подкаталоги сообразно субпрофилям,
|
||||
а также производится обработка {tagged/,}{image-,}scripts.d/;
|
||||
затем выполняется скрипт generate.sh и задействуется generate.mk
|
||||
а также производится обработка {image-,}scripts.d/; затем
|
||||
выполняется скрипт generate.sh и задействуется generate.mk
|
||||
(при их наличии).
|
||||
|
||||
NB: тегированные скрипты являются экспериментальными,
|
||||
возможны недоработки и существенные изменения!
|
||||
|
||||
Если фича дополняет хуками семейство целевых субпрофилей,
|
||||
построенных на одном базовом, можно воспользоваться подкаталогом
|
||||
с именем исходного базового субпрофиля (см. $src, $dst в Makefile).
|
||||
|
||||
Наиболее употребительные цели можно снабжать "ярлычками" вроде
|
||||
"+icewm" с тем, чтобы сделать более краткими и выразительными
|
||||
использующие их правила. Просьба не злоупотреблять количеством.
|
||||
|
||||
Каталог lib/ является специфическим для фич, определяющих
|
||||
построение конкретного вида образа -- см. build-*/.
|
||||
|
||||
|
@@ -5,6 +5,10 @@
|
||||
систему (он НЕ должен требоваться пакету installer-distro-*)
|
||||
и требует пакет выбранного загрузчика.
|
||||
|
||||
Реализация экспериментальная (нужно модуляризовать installer-steps),
|
||||
пока завязана на installer-distro-altlinux-generic (TODO). Возможно,
|
||||
с использованием alterator-lilo связаны проблемы времени установки.
|
||||
Обратите внимание: в процессе конфигурирования дистрибутива
|
||||
"переключение" загрузчика может происходить только в одну сторону
|
||||
-- если выставлен grub, произведено переключение на lilo и затем
|
||||
произведена ещё одна попытка переключения на grub, то в конфигурации
|
||||
останется lilo как последняя "новая" цель с точки зрения make.
|
||||
|
||||
Реализация экспериментальная (нужно модуляризовать installer-steps).
|
||||
|
@@ -1,5 +1,7 @@
|
||||
# TODO: invent something prettier (think "lilo+grub" -- or error out?)
|
||||
# - add,BASE_PACKAGES,alterator-$* is overly additive
|
||||
# NB: due to make target becoming having been made,
|
||||
# the last different one wins
|
||||
# - remember .base if adding yet another *_PACKAGES
|
||||
|
||||
use/bootloader: use/install2 sub/main
|
||||
|
@@ -1,4 +1,5 @@
|
||||
Эта фича конфигурирует создание образа дистрибутива, включая работу
|
||||
с субпрофилями -- которая сейчас нужна только дистрибутивным целям.
|
||||
|
||||
Дополняет финальную стадию сборки (lib/, scripts.d/).
|
||||
Дополняет финальную стадию сборки (lib/, scripts.d/)
|
||||
и тесно с ней связана.
|
||||
|
@@ -4,7 +4,17 @@
|
||||
# take the latter part
|
||||
SUBDIRS = $(notdir $(SUBPROFILES))
|
||||
|
||||
BOOT_TYPE = isolinux
|
||||
# proxy over the ISO metadata collected; see also genisoimagerc(5)
|
||||
BOOT_SYSI := $(META_SYSTEM_ID)
|
||||
BOOT_PUBL := $(META_PUBLISHER)
|
||||
BOOT_PREP := $(META_PREPARER)
|
||||
BOOT_APPI := $(META_APP_ID)
|
||||
BOOT_VOLI := $(META_VOL_ID)
|
||||
BOOT_VOLS := $(META_VOL_SET)
|
||||
BOOT_BIBL := $(META_BIBLIO)
|
||||
BOOT_ABST := $(META_ABSTRACT)
|
||||
|
||||
BOOT_TYPE := isolinux
|
||||
|
||||
# Metadata/ needed only for installers (and not for e.g. syslinux.iso)
|
||||
# FIXME: installable live needs it too, don't move to install2 feature
|
||||
@@ -13,6 +23,9 @@ ifneq (,$(findstring install2,$(FEATURES)))
|
||||
METADATA = metadata
|
||||
endif
|
||||
|
||||
# see also ../scripts.d/01-isosort; needs mkimage-0.2.2+
|
||||
MKI_SORTFILE := /tmp/isosort
|
||||
|
||||
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
|
||||
postprocess $(GLOBAL_CLEAN_WORKDIR)
|
||||
|
||||
|
14
features.in/build-distro/scripts.d/01-isosort
Executable file
14
features.in/build-distro/scripts.d/01-isosort
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# provide mkisofs with image contents sort order hints
|
||||
|
||||
### split over features or leave in a single piece?
|
||||
|
||||
# NB: only a single space/tab in between, no trailing whitespace
|
||||
cat > /tmp/isosort <<__EOF__
|
||||
ALTLinux 0
|
||||
Metadata 100
|
||||
altinst 700
|
||||
rescue 800
|
||||
live 900
|
||||
syslinux 1000
|
||||
__EOF__
|
@@ -1,3 +1,4 @@
|
||||
Эта фича конфигурирует создание образа виртуального окружения (VE).
|
||||
|
||||
Дополняет финальную стадию сборки (lib/, image-scripts.d/).
|
||||
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
|
||||
и тесно с ней связана.
|
||||
|
@@ -6,6 +6,8 @@
|
||||
# candidates:
|
||||
# off: keytable
|
||||
|
||||
[ -x /sbin/chkconfig ] || exit 0
|
||||
|
||||
for i in network random syslogd random; do chkconfig $i on; done
|
||||
for i in fbsetfont netfs rawdevices; do chkconfig $i off; done
|
||||
:
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh -e
|
||||
# we don't need no gettys in OpenVZ VEs (might need one in LXC though)
|
||||
subst 's,^[0-9]\+:[0-9]\+:respawn:/sbin/mingetty.*,#&,' /etc/inittab
|
||||
[ -s /etc/inittab ] || exit 0
|
||||
sed -i 's,^[0-9]\+:[0-9]\+:respawn:/sbin/mingetty.*,#&,' /etc/inittab
|
||||
|
@@ -5,9 +5,12 @@
|
||||
# remote syslog if you do care for reliable data anyways)
|
||||
# credits: vvk@, thresh@ (2010)
|
||||
|
||||
sed -i \
|
||||
-e 's,/dev/tty12,/var/log/syslog/console,' \
|
||||
-e 's,^.*/var/log/syslog/console$,#&,' \
|
||||
-e 's,-/var/log/,/var/log/,g' \
|
||||
-e 's,/var/log/,-/var/log/,g' \
|
||||
/etc/syslog.conf
|
||||
CONFIG=/etc/syslog.conf
|
||||
|
||||
[ ! -f "$CONFIG" ] || \
|
||||
sed -i \
|
||||
-e 's,/dev/tty12,/var/log/syslog/console,' \
|
||||
-e 's,^.*/var/log/syslog/console$,#&,' \
|
||||
-e 's,-/var/log/,/var/log/,g' \
|
||||
-e 's,/var/log/,-/var/log/,g' \
|
||||
"$CONFIG"
|
||||
|
6
features.in/build-ve/image-scripts.d/07fstab
Executable file
6
features.in/build-ve/image-scripts.d/07fstab
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -s /etc/fstab ] || cat >> /etc/fstab <<-EOF
|
||||
proc /proc proc nosuid,noexec,gid=proc 0 0
|
||||
devpts /dev/pts devpts gid=5,mode=620 0 0
|
||||
EOF
|
11
features.in/cleanup/live/image-scripts.d/80locales
Executable file
11
features.in/cleanup/live/image-scripts.d/80locales
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# FIXME: there should be less brutal i18n tuning
|
||||
|
||||
cd /usr/share/locale
|
||||
for i in */; do
|
||||
case "$i" in
|
||||
be*|en*|ru*|uk*) continue;;
|
||||
esac
|
||||
rm -r "$i"
|
||||
done
|
||||
:
|
6
features.in/cleanup/live/image-scripts.d/90cleanup-pkgs
Executable file
6
features.in/cleanup/live/image-scripts.d/90cleanup-pkgs
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh -efu
|
||||
# remove extra packages from a bare livecd
|
||||
|
||||
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
|
||||
[ -z "$list" ] || apt-get remove -f -y -- $list
|
||||
:
|
3
features.in/cleanup/live/image-scripts.d/99cleanupdb
Executable file
3
features.in/cleanup/live/image-scripts.d/99cleanupdb
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# remove rpm, apt databases and cache
|
||||
find /var/lib/rpm /var/lib/apt /var/cache/apt -type f -delete
|
@@ -1,7 +1,12 @@
|
||||
use/dev:
|
||||
@$(call add_feature)
|
||||
@$(call add,COMMON_PACKAGES,git-core hasher gear)
|
||||
@$(call add,THE_PACKAGES,git-core hasher gear)
|
||||
|
||||
use/dev/mkimage: use/dev
|
||||
@$(call add,COMMON_PACKAGES,mkimage)
|
||||
@$(call add,LIVE_PACKAGES,shadow-change)
|
||||
@$(call add,THE_PACKAGES,mkimage shadow-change)
|
||||
|
||||
use/dev/repo: use/dev use/repo/main
|
||||
@$(call add,THE_PACKAGES,apt-repo)
|
||||
@$(call add,MAIN_PACKAGES,rpm-build basesystem)
|
||||
@$(call add,MAIN_PACKAGES,fakeroot sisyphus_check)
|
||||
@$(call add,MAIN_PACKAGES,file make-initrd make-initrd-propagator)
|
||||
|
@@ -29,7 +29,7 @@ fi
|
||||
# $TMP
|
||||
TMP="/tmp/.private/$USER"
|
||||
control pam_mktemp enabled
|
||||
subst '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
|
||||
sed -i '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
|
||||
echo "%_tmppath $TMP" >> "$HOME/.rpmmacros"
|
||||
|
||||
# ~/hasher
|
||||
|
@@ -1,5 +1,9 @@
|
||||
# tries to fill in ISO metadata in case it's the only inhabitant
|
||||
use/dos: use/syslinux
|
||||
@$(call add_feature)
|
||||
@$(call add,SYSLINUX_CFG,dos)
|
||||
@$(call add,SYSLINUX_FILES,/usr/lib/syslinux/memdisk)
|
||||
@$(call add,STAGE1_PACKAGES,make-freedos-floppy glibc-gconv-modules)
|
||||
@$(call try,META_SYSTEM_ID,DOS)
|
||||
@$(call try,META_VOL_ID,FreeDOS 2.88M)
|
||||
@$(call try,META_VOL_SET,FreeDOS)
|
||||
|
@@ -12,8 +12,8 @@ use/firmware/server: use/firmware
|
||||
use/firmware/wireless: use/firmware
|
||||
@$(call add,MAIN_PACKAGES,firmware-acx100)
|
||||
@$(call add,MAIN_PACKAGES,firmware-i2400m)
|
||||
@$(call add,MAIN_PACKAGES,firmware-carl9170)
|
||||
@$(call add,MAIN_PACKAGES_REGEXP,firmware-carl9170.*)
|
||||
@$(call add,MAIN_PACKAGES_REGEXP,firmware-ipw.*)
|
||||
@$(call add,MAIN_PACKAGES_REGEXP,firmware-iwl.*)
|
||||
@#$(call add,MAIN_PACKAGES_REGEXP,firmware-iwl.*)
|
||||
@$(call add,MAIN_PACKAGES_REGEXP,firmware-rt.*)
|
||||
@$(call add,MAIN_PACKAGES_REGEXP,firmware-zd.*)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
use/hdt: use/syslinux use/memtest
|
||||
# optimized out use/syslinux due to use/memtest
|
||||
use/hdt: use/memtest
|
||||
@$(call add_feature)
|
||||
@$(call add,STAGE1_PACKAGES,pciids)
|
||||
@$(call add,SYSLINUX_MODULES,hdt)
|
||||
|
@@ -4,3 +4,7 @@ use/install2: use/stage2 sub/stage2/install2 use/cleanup/installer
|
||||
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)
|
||||
@$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
|
||||
@$(call add,BASE_LISTS,$(call tags,basesystem))
|
||||
|
||||
### FR: curl-mini
|
||||
use/install2/net: use/install2
|
||||
@$(call add,INSTALL2_PACKAGES,curl)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# FIXME: test run for installer-distro-altlinux-generic 6.0-alt2
|
||||
# NB: grub is currently the default in ALT Linux
|
||||
|
||||
sed -i "s/^grub$/$GLOBAL_BASE_BOOTLOADER/" /usr/share/install2/installer-steps
|
||||
sed -ri "s/^(grub|lilo)$/$GLOBAL_BASE_BOOTLOADER/" \
|
||||
/usr/share/install2/installer-steps
|
||||
|
@@ -1,6 +1,3 @@
|
||||
# remove rpm database
|
||||
rm -rf /var/lib/rpm/*
|
||||
|
||||
# remove apt data files
|
||||
rm -rf /var/cache/apt /var/lib*/apt
|
||||
|
||||
#!/bin/sh
|
||||
# remove rpm, apt databases and cache
|
||||
find /var/lib/rpm /var/lib/apt /var/cache/apt -type f -delete
|
||||
|
0
features.in/install2/tagged/image-scripts.d/.gitignore
vendored
Normal file
0
features.in/install2/tagged/image-scripts.d/.gitignore
vendored
Normal file
@@ -1,3 +1,5 @@
|
||||
+live: use/live/desktop; @:
|
||||
|
||||
# copy stage2 as live
|
||||
use/live: use/stage2 sub/stage2/live
|
||||
@$(call add_feature)
|
||||
@@ -5,9 +7,19 @@ use/live: use/stage2 sub/stage2/live
|
||||
use/live/base: use/live use/syslinux/ui-menu
|
||||
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
|
||||
|
||||
use/live/x11: use/live/base use/x11/xorg use/x11/wacom use/virtualbox/guest
|
||||
use/live/desktop: use/live/base use/x11/xorg use/x11/wacom \
|
||||
use/firmware use/virtualbox/guest \
|
||||
use/power/acpi/button use/power/acpi/cpufreq
|
||||
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
|
||||
|
||||
# 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
|
||||
use/live/autologin: use/live/x11
|
||||
# for the cases when there should be no display manager
|
||||
use/live/autologin: use/live/desktop
|
||||
@$(call add,LIVE_PACKAGES,autologin xinit)
|
||||
|
||||
use/live/hooks: use/live
|
||||
@$(call add,LIVE_PACKAGES,livecd-run-hooks)
|
||||
|
||||
use/live/ru: use/live
|
||||
@$(call add,LIVE_PACKAGES,livecd-ru)
|
||||
|
5
features.in/live/live/image-scripts.d/10-live-hooks
Executable file
5
features.in/live/live/image-scripts.d/10-live-hooks
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# if we're configured for running live hooks,
|
||||
# there should be a place for them either
|
||||
|
||||
chkconfig livecd-run-hooks on >&/dev/null && mkdir /live.hooks ||:
|
@@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh -x
|
||||
# * reset password for root
|
||||
# * add user `altlinux' (without password)
|
||||
|
||||
NPG="nopasswdlogin"
|
||||
GRPLIST="users scanner audio radio proc cdrom cdwriter wheel fuse $NPG"
|
||||
|
||||
verbose()
|
||||
{
|
||||
if [ -n "$GLOBAL_VERBOSE" ]; then
|
||||
@@ -12,8 +15,9 @@ verbose()
|
||||
add_user()
|
||||
{
|
||||
verbose "Add $1 user"
|
||||
groupadd -r "$NPG"
|
||||
local groups=
|
||||
for g in users scanner audio radio proc cdrom cdwriter wheel fuse; do
|
||||
for g in $GRPLIST; do
|
||||
if groupmod $g 2>/dev/null; then
|
||||
if [ -n "$groups" ]; then
|
||||
groups="$groups,$g"
|
||||
|
@@ -1,11 +1,17 @@
|
||||
#!/bin/sh -ef
|
||||
|
||||
if [ ! -x /usr/bin/X ]; then
|
||||
echo "warning: autologin feature requested but X not installed" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
USER=altlinux
|
||||
|
||||
# setup runlevel
|
||||
INITTAB=/etc/inittab
|
||||
if [ -f "$INITTAB" ]; then
|
||||
[ -z "$runlevel" ] && runlevel=5
|
||||
subst "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
|
||||
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
|
||||
fi
|
||||
|
||||
# autologin^2
|
||||
@@ -16,6 +22,15 @@ AUTOLOGIN=yes
|
||||
E_O_F
|
||||
fi
|
||||
|
||||
# lightdm autologin
|
||||
LIGHTDM_CONF=/etc/lightdm/lightdm.conf
|
||||
if [ -f "$LIGHTDM_CONF" ]; then
|
||||
sed -i \
|
||||
-e "s/^#\(autologin-user=\).*$/\1$USER/" \
|
||||
-e "s/^#\(autologin-user-timeout=0\)/\1/" \
|
||||
"$LIGHTDM_CONF"
|
||||
fi
|
||||
|
||||
# gdm2 autologin
|
||||
GDM_CONF=/etc/X11/gdm/custom.conf
|
||||
if [ -f "$GDM_CONF" ]; then
|
||||
|
@@ -1,6 +1,13 @@
|
||||
#!/bin/sh -efu
|
||||
# attempt to autoconfigure ethernet
|
||||
|
||||
[ -x /sbin/dhcpcd -o -x /sbin/dhclient ] || {
|
||||
echo "NOT configuring DHCP for eth0" >&2
|
||||
exit 0
|
||||
}
|
||||
|
||||
echo "configuring DHCP for eth0" >&2
|
||||
|
||||
mkdir -p /etc/net/ifaces/eth0 && {
|
||||
echo TYPE=eth
|
||||
echo BOOTPROTO=dhcp
|
6
features.in/live/live/image-scripts.d/90-cleanup-boot
Executable file
6
features.in/live/live/image-scripts.d/90-cleanup-boot
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# we don't really need the kernel in live root,
|
||||
# it's been booted already
|
||||
|
||||
rm -f /boot/*
|
||||
:
|
10
features.in/live/stage1/files/index.html
Normal file
10
features.in/live/stage1/files/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="3;url=http://www.altlinux.org/">
|
||||
<title>Welcome to ALT Linux!</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to ALT Linux!</h1>
|
||||
<p>You will be redirected to <a href="http://www.altlinux.org/">the home page</a> shortly.</p>
|
||||
</body>
|
||||
<html>
|
5
features.in/ltsp/README
Normal file
5
features.in/ltsp/README
Normal file
@@ -0,0 +1,5 @@
|
||||
Эта фича обеспечивает добавление функций терминального сервера:
|
||||
- загрузку бездисковых тонких клиентов по сети;
|
||||
- предоставление им доступа к серверу приложений.
|
||||
|
||||
На данный момент является совсем экспериментальной.
|
10
features.in/ltsp/config.mk
Normal file
10
features.in/ltsp/config.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
+ltsp: use/ltsp/base; @:
|
||||
|
||||
use/ltsp:
|
||||
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
|
||||
@$(call add,MAIN_LISTS,ltsp-client ltsp-client.$(ARCH))
|
||||
@$(call add,BASE_LISTS,ltsp)
|
||||
|
||||
use/ltsp/base: use/ltsp use/firmware
|
||||
@$(call add,BASE_LISTS,$(call tags,base network))
|
||||
@$(call add,BASE_PACKAGES,apt-repo firefox)
|
@@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
# check relevant kernel features availability
|
||||
|
||||
GZ_OPTS="-comp gzip"
|
||||
XZ_OPTS="-comp xz -b 524288 -noI"
|
||||
|
||||
# test for installer-required filesystems support
|
||||
for opt in CONFIG_SQUASHFS CONFIG_AUFS_FS; do
|
||||
if grep -q "^$opt=[my]$" /boot/config-*; then
|
||||
@@ -16,7 +19,14 @@ done
|
||||
# squashfs options: not really neccessary but better than none
|
||||
# NB: this config file should be carried over into install2
|
||||
if grep -q '^CONFIG_SQUASHFS_XZ=y$' /boot/config-*; then
|
||||
echo "PACK_SQUASHFS_OPTS=-comp xz -Xbcj x86" > /.image/squashcfg.mk
|
||||
# TODO: figure out if it's generally worth it even on x86:
|
||||
# if binaries account for less than ~70% of blocks,
|
||||
# the decompression filter overhead might hurt
|
||||
# NB: there are arm, powerpc and some other filters too
|
||||
if grep -q "^CONFIG_X86" /boot/config-*; then
|
||||
XZ_OPTS="$XZ_OPTS -Xbcj x86"
|
||||
fi
|
||||
echo "PACK_SQUASHFS_OPTS=$XZ_OPTS" > /.image/squashcfg.mk
|
||||
else
|
||||
echo "PACK_SQUASHFS_OPTS=-comp gzip" >> /.image/squashcfg.mk
|
||||
echo "PACK_SQUASHFS_OPTS=$GZ_OPTS" > /.image/squashcfg.mk
|
||||
fi
|
||||
|
@@ -2,5 +2,5 @@
|
||||
# prepare base make-initrd configuration for stage1
|
||||
# see also http://www.altlinux.org/Make-initrd-propagator
|
||||
|
||||
subst 's/AUTODETECT/#AUTODETECT/' /etc/initrd.mk
|
||||
sed -i 's/AUTODETECT/#AUTODETECT/' /etc/initrd.mk
|
||||
echo 'FEATURES += propagator' >> /etc/initrd.mk
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
# FIXME: move to plymouth feature
|
||||
#if [ -f /etc/plymouth/plymouthd.conf ];then
|
||||
# subst 's/#\([T\[]\)/\1/' /etc/plymouth/plymouthd.conf
|
||||
# sed -i 's/#\([T\[]\)/\1/' /etc/plymouth/plymouthd.conf
|
||||
# echo 'FEATURES += plymouth' >> /etc/initrd.mk
|
||||
#fi
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
use/syslinux: sub/stage1
|
||||
@$(call add_feature)
|
||||
@$(call add,STAGE1_PACKAGES,syslinux)
|
||||
@$(call try,META_SYSTEM_ID,SYSLINUX)
|
||||
|
||||
# UI is overwritten
|
||||
use/syslinux/ui-%: use/syslinux
|
||||
|
@@ -51,14 +51,13 @@ all: prep debug
|
||||
@### proper text branding should be implemented
|
||||
@sed -i 's,@mkimage-profiles@,$(IMAGE_NAME),' $(DSTDIR)/*.cfg
|
||||
@echo $(SYSLINUX_MODULES) > $(DSTDIR)/modules.list
|
||||
@echo $(SYSLINUX_FILES) > $(DSTDIR)/files.list
|
||||
@echo $(BOOTLOADER) > $(DSTDIR)/bootloader
|
||||
@echo $(SYSLINUX_FILES) > $(DSTDIR)/syslinux.list
|
||||
|
||||
prep:
|
||||
@mkdir -p $(DSTDIR)
|
||||
|
||||
debug:
|
||||
@if test -n "$(DEBUG)"; then \
|
||||
@if [ -n "$(DEBUG)" ]; then \
|
||||
echo "** BOOTLOADER: $(BOOTLOADER)"; \
|
||||
echo "** SYSLINUX_UI: $(SYSLINUX_UI)"; \
|
||||
echo "** SYSLINUX_CFG: $(SYSLINUX_CFG)"; \
|
||||
|
@@ -7,33 +7,33 @@ MODDIR="/usr/lib/syslinux"
|
||||
mkdir -p "$WORKDIR/syslinux"
|
||||
cd "$WORKDIR/syslinux"
|
||||
|
||||
# validate just in case (written by ../../generate.mk)
|
||||
BOOTLOADER="$(cat .in/bootloader)"
|
||||
case "$BOOTLOADER" in
|
||||
# validate just in case (see also stage1 Makefile)
|
||||
case "$GLOBAL_BOOTLOADER" in
|
||||
isolinux|syslinux) ;;
|
||||
*) echo "$0: error: weird BOOTLOADER: $BOOTLOADER" >&2; exit 1;;
|
||||
*) echo "error: weird GLOBAL_BOOTLOADER: \`$GLOBAL_BOOTLOADER'" >&2;
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
# copy extra files, if any
|
||||
SYSLINUX_FILES="$(cat .in/files.list)"
|
||||
if test -n "${SYSLINUX_FILES% }"; then
|
||||
SYSLINUX_FILES="$(cat .in/syslinux.list)"
|
||||
if [ -n "${SYSLINUX_FILES% }" ]; then
|
||||
cp -a $SYSLINUX_FILES .
|
||||
fi
|
||||
|
||||
# prune module-specific config snippets; skip built-in one
|
||||
SYSLINUX_MODULES="$(cat .in/modules.list)"
|
||||
if test -n "$SYSLINUX_MODULES"; then
|
||||
if [ -n "$SYSLINUX_MODULES" ]; then
|
||||
for module in $SYSLINUX_MODULES; do
|
||||
if test "$modules" == "prompt"; then continue; fi
|
||||
if [ "$modules" == "prompt" ]; then continue; fi
|
||||
cp -a $MODDIR/$module.c?? . || rm .in/[0-9][0-9]$module.cfg
|
||||
done
|
||||
fi
|
||||
|
||||
# number ordering sponsored by shell's pathname expansion
|
||||
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$BOOTLOADER.cfg"
|
||||
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$GLOBAL_BOOTLOADER.cfg"
|
||||
|
||||
# snippets are not going into the actual image
|
||||
if test "$DEBUG" != 2; then rm -r .in/; fi
|
||||
if [ "$DEBUG" != 2 ]; then rm -r .in/; fi
|
||||
|
||||
# NB: there will be final macro expansion based on actual image sizes
|
||||
# (done by ../../scripts.d/10-propagator-ramdisk)
|
||||
|
@@ -1,3 +1,7 @@
|
||||
+icewm: use/x11/icewm; @:
|
||||
+razorqt: use/x11/razorqt use/x11/lightdm; @:
|
||||
+tde: use/x11/tde use/x11/kdm; @:
|
||||
|
||||
use/x11/xorg:
|
||||
@$(call add,THE_LISTS,xorg)
|
||||
@$(call add,THE_KMODULES,drm)
|
||||
@@ -12,3 +16,19 @@ use/x11/runlevel5: use/x11/xorg
|
||||
### xdm: see also #23108
|
||||
use/x11/xdm: use/x11/runlevel5
|
||||
@$(call add,THE_PACKAGES,xdm installer-feature-no-xconsole)
|
||||
|
||||
### : some set()-like thing might be better?
|
||||
use/x11/lightdm: use/x11/runlevel5
|
||||
@$(call add,THE_PACKAGES,lightdm)
|
||||
|
||||
use/x11/kdm: use/x11/runlevel5
|
||||
@$(call add,THE_PACKAGES,kdebase-kdm)
|
||||
|
||||
use/x11/icewm: use/x11/xorg
|
||||
@$(call add,THE_LISTS,$(call tags,icewm desktop))
|
||||
|
||||
use/x11/razorqt: use/x11/xorg
|
||||
@$(call add,THE_LISTS,$(call tags,razorqt desktop))
|
||||
|
||||
use/x11/tde: use/x11/xorg
|
||||
@$(call add,THE_LISTS,$(call tags,tde desktop))
|
||||
|
@@ -10,6 +10,11 @@ MKI_VER_OPTIMAL = 0.2.0
|
||||
|
||||
include distcfg.mk
|
||||
include functions.mk
|
||||
|
||||
ifeq (,$(realpath $(MKIMAGE_PREFIX)/config.mk))
|
||||
$(error please apt-get install mkimage and have a look at QUICKSTART as well)
|
||||
endif
|
||||
|
||||
include $(MKIMAGE_PREFIX)/config.mk
|
||||
|
||||
ifeq (-,$(shell rpmvercmp $(MKI_VERSION) $(MKI_VER_MINIMAL) | tr -d [0-9]))
|
||||
@@ -42,6 +47,13 @@ include $(MKIMAGE_PREFIX)/targets.mk
|
||||
pack-image: OUTDIR = $(IMAGEDIR)
|
||||
pack-image: imagedir
|
||||
|
||||
copy-tree: $(SAVE_PROFILE:%=save-profile)
|
||||
|
||||
save-profile:
|
||||
@mkdir -p files/.disk; \
|
||||
git archive --prefix=mkimage-profile/ HEAD \
|
||||
| gzip -9 > files/.disk/profile.tgz
|
||||
|
||||
.PHONY: imagedir postprocess debug
|
||||
|
||||
imagedir:
|
||||
@@ -60,5 +72,6 @@ postprocess: | $(addprefix postprocess-,$(sort $(POSTPROCESS_TARGETS)))
|
||||
|
||||
debug:
|
||||
@echo "TOPDIR=$(TOPDIR)"
|
||||
@echo "IMAGEDIR=$(IMAGEDIR)"
|
||||
@echo "ARCH=$(ARCH)"
|
||||
@echo "GLOBAL_HSH_APT_CONFIG=$(GLOBAL_HSH_APT_CONFIG)"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# globals
|
||||
PKGDIR := $(GLOBAL_BUILDDIR)/pkg
|
||||
|
||||
### duplicated from toplevel build.mk, log.mk for sake of "local" builds
|
||||
# duplicated from metaprofile makefiles for the sake of "local" builds
|
||||
ARCH ?= $(shell arch | sed 's/i686/i586/')
|
||||
DATE ?= $(shell date +%Y%m%d)
|
||||
|
||||
|
@@ -10,7 +10,7 @@ PREFS := $(.VARIABLES)
|
||||
DISTCFG := $(.VARIABLES)
|
||||
|
||||
# a separator variable
|
||||
-- := --
|
||||
-- = --
|
||||
|
||||
.PHONY: dump-vars
|
||||
|
||||
|
@@ -3,5 +3,5 @@
|
||||
конфигурации образа и генерации соответствующего
|
||||
профиля для сборки; см. тж. ../conf.d/.
|
||||
|
||||
Следует помнить, что будучи включаемыми в ../Makefile,
|
||||
Следует помнить, что будучи включаемыми в ../main.mk,
|
||||
они работают в каталоге верхнего уровня.
|
||||
|
47
lib/build.mk
47
lib/build.mk
@@ -6,8 +6,6 @@ ifndef MKIMAGE_PROFILES
|
||||
$(error this makefile is designed to be included in toplevel one)
|
||||
endif
|
||||
|
||||
export ARCH ?= $(shell arch | sed 's/i686/i586/')
|
||||
|
||||
# try not to bog down the system, both CPU and I/O wise
|
||||
ifdef NICE
|
||||
START := nice $(shell ionice -c3 echo "ionice -c3" 2>/dev/null)
|
||||
@@ -22,14 +20,21 @@ START += time -f "%E %PCPU %Mk"
|
||||
# /usr/bin/{i586,x86_64} are setarch(8) symlinks
|
||||
START += $(ARCH)
|
||||
|
||||
# to be passed into distcfg.mk
|
||||
IMAGEDIR ?= $(shell [ -d "$$HOME/out" -a -w "$$HOME/out" ] \
|
||||
&& echo "$$HOME/out" \
|
||||
|| echo "$(BUILDDIR)/out" )
|
||||
# to be passed into distcfg.mk; suggestions are welcome
|
||||
IMAGEDIR ?= $(shell \
|
||||
if [ -d "$$HOME/out" -a -w "$$HOME/out" ]; then \
|
||||
echo "$$HOME/out"; \
|
||||
else \
|
||||
dir="`dirname $(BUILDDIR)`/out"; \
|
||||
mkdir -p "$$dir" && echo "$$dir" || echo "/tmp"; \
|
||||
fi; \
|
||||
)
|
||||
|
||||
# poehali
|
||||
build: profile/populate
|
||||
@if [ -n "$(CHECK)" ]; then \
|
||||
# actual build starter
|
||||
# NB: our output MUST go into stderr to escape POSTPROC
|
||||
build-image: profile/populate
|
||||
@{ \
|
||||
if [ -n "$(CHECK)" ]; then \
|
||||
echo "$(TIME) skipping actual image build (CHECK is set)"; \
|
||||
exit; \
|
||||
fi; \
|
||||
@@ -37,26 +42,26 @@ build: profile/populate
|
||||
if [ -n "$(DEBUG)" ]; then \
|
||||
echo ": tail -f $(BUILDLOG)" $(SHORTEN); \
|
||||
else \
|
||||
if [ -n "$(ALL)" ]; then \
|
||||
echo " [$(ALL)]"; \
|
||||
else \
|
||||
echo " (coffee time)"; \
|
||||
fi; \
|
||||
echo " (coffee time)"; \
|
||||
fi; \
|
||||
if $(START) $(MAKE) -C $(BUILDDIR)/ $(LOG); then \
|
||||
echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \
|
||||
tail -200 "$(BUILDLOG)" $(SHORTEN) \
|
||||
| GREP_COLOR="$(ANSI_OK)" \
|
||||
grep --color=auto '^\*\* image: .*' ||:; \
|
||||
| GREP_COLOR="$(ANSI_OK)" GREP_OPTIONS="--color=auto" \
|
||||
grep '^\*\* image: .*' ||:; \
|
||||
else \
|
||||
echo "$(TIME) failed, see log: $(BUILDLOG)" $(SHORTEN); \
|
||||
echo -n "$(TIME) failed, see log"; \
|
||||
if [ -z "$(DEBUG)" ]; then \
|
||||
echo "$(TIME) (you might want to re-run with DEBUG=1)"; \
|
||||
echo ": $(BUILDLOG)" $(SHORTEN); \
|
||||
echo "$(TIME) (you might want to rerun with DEBUG=1)"; \
|
||||
else \
|
||||
echo " above"; \
|
||||
fi; \
|
||||
tail -200 "$(BUILDLOG)" \
|
||||
| GREP_COLOR="$(ANSI_FAIL)" \
|
||||
egrep --color=auto "^(E:|[Ee]rror|[Ww]arning).*"; \
|
||||
| GREP_COLOR="$(ANSI_FAIL)" GREP_OPTIONS="--color=auto" \
|
||||
egrep "^((E:|[Ee]rror|[Ww]arning).*)|(.* Stop\.)$$"; \
|
||||
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
|
||||
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
|
||||
fi; \
|
||||
if [ -n "$(BELL)" ]; then echo -ne '\a' >&2; fi
|
||||
if [ -n "$(BELL)" ]; then echo -ne '\a'; fi; \
|
||||
} >&2
|
||||
|
52
lib/clean.mk
52
lib/clean.mk
@@ -3,6 +3,8 @@
|
||||
# drop stock predefined rules
|
||||
.DEFAULT:
|
||||
|
||||
SYMLINK = build
|
||||
|
||||
# tmpfs-sparing extra rule: cleanup workdir after completing each stage
|
||||
# (as packed results are saved this only lowers RAM pressure)
|
||||
# NB: it's useful enough to be enabled by default in DEBUG abscence
|
||||
@@ -17,23 +19,45 @@ endif
|
||||
endif
|
||||
|
||||
# ordinary clean: destroys workdirs but not the corresponding results
|
||||
# NB: our output MUST go into stderr to escape POSTPROC
|
||||
clean:
|
||||
@echo "$(TIME) cleaning up $(WARNING)"
|
||||
@find -name '*~' -delete >&/dev/null ||:
|
||||
@if [ -L build -a -d build/ ]; then \
|
||||
$(MAKE) -C build $@ \
|
||||
GLOBAL_BUILDDIR=$(shell readlink build) $(LOG) ||:; \
|
||||
fi
|
||||
@{ \
|
||||
find -name '*~' -delete >&/dev/null ||:; \
|
||||
if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
|
||||
echo "$(TIME) cleaning up $(WARNING)"; \
|
||||
$(MAKE) -C "$(SYMLINK)" $@ \
|
||||
GLOBAL_BUILDDIR="$(realpath $(SYMLINK))" $(LOG) ||:; \
|
||||
fi; \
|
||||
} >&2
|
||||
|
||||
# there can be some sense in writing log here even if normally
|
||||
# $(BUILDDIR)/ gets purged: make might have failed,
|
||||
# and BUILDLOG can be specified by hand either
|
||||
distclean: clean
|
||||
@if [ -L build -a -d build/ ]; then \
|
||||
rm -rf build/.git; \
|
||||
$(MAKE) -C build $@ \
|
||||
GLOBAL_BUILDDIR=$(shell readlink build) $(LOG) || \
|
||||
rm -rf build/; \
|
||||
rm -rf $(shell readlink build); \
|
||||
fi
|
||||
@rm -f build ||:
|
||||
@{ \
|
||||
if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
|
||||
build="$(realpath $(SYMLINK)/)"; \
|
||||
if [ "$$build" = / ]; then \
|
||||
echo "** ERROR: invalid \`"$(SYMLINK)"' symlink" >&2; \
|
||||
exit 128; \
|
||||
else \
|
||||
$(MAKE) -C "$(SYMLINK)" $@ \
|
||||
GLOBAL_BUILDDIR="$$build" $(LOG) ||: \
|
||||
rm -rf "$$build"; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f "$(SYMLINK)"; \
|
||||
} >&2
|
||||
|
||||
# builddir existing outside read-only metaprofile is less ephemeral
|
||||
# than BUILDDIR is -- usually it's unneeded afterwards so just zap it
|
||||
postclean: build-image
|
||||
@{ \
|
||||
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" ] || \
|
||||
[ ! -L "$(SYMLINK)" -a "0$(DEBUG)" -lt 2 ]; then \
|
||||
echo "$(TIME) cleaning up after build"; \
|
||||
$(MAKE) -C "$(BUILDDIR)" distclean \
|
||||
GLOBAL_BUILDDIR="$(BUILDDIR)" $(LOG) ||:; \
|
||||
rm -rf "$(BUILDDIR)"; \
|
||||
fi; \
|
||||
} >&2
|
||||
|
@@ -11,22 +11,23 @@ sub/%:
|
||||
@$(call add,SUBPROFILES,$(@:sub/%=%))
|
||||
|
||||
# install media bootloader
|
||||
boot/%: use/syslinux
|
||||
boot/%:
|
||||
@$(call set,BOOTLOADER,$*)
|
||||
|
||||
# fundamental targets
|
||||
|
||||
distro/.init: profile/bare
|
||||
@$(call try,META_PREPARER,mkimage-profiles)
|
||||
@$(call try,META_APP_ID,$(IMAGE_NAME))
|
||||
@$(call set,META_PUBLISHER,ALT Linux Team)
|
||||
|
||||
# NB: the last flavour in KFLAVOURS gets to be the default one;
|
||||
# the kernel packages regexp evaluation has to take place at build stage
|
||||
distro/.base: distro/.init
|
||||
@$(call set,KFLAVOURS,std-def)
|
||||
|
||||
# bootloader test target
|
||||
distro/syslinux: distro/.init \
|
||||
use/syslinux/localboot.cfg use/syslinux/ui-vesamenu \
|
||||
use/hdt use/memtest
|
||||
@$(call set,META_SYSTEM_ID,LINUX)
|
||||
@$(call set,META_VOL_ID,ALT Linux $(ARCH))
|
||||
@$(call set,META_VOL_SET,ALT Linux)
|
||||
|
||||
# something marginally useful (as a network-only installer)
|
||||
# NB: doesn't carry stage3 thus cannot use/bootloader
|
||||
@@ -34,4 +35,6 @@ distro/installer: distro/.base use/install2 use/syslinux/localboot.cfg
|
||||
@$(call set,INSTALLER,altlinux-generic)
|
||||
@$(call set,STAGE1_KMODULES_REGEXP,drm.*) # for KMS
|
||||
|
||||
distro/.installer: distro/installer use/bootloader/grub use/repo/main; @:
|
||||
|
||||
endif
|
||||
|
@@ -25,7 +25,7 @@ endef
|
||||
set = $(and $(1),$(2),$(set_body))
|
||||
define set_body
|
||||
{ $(log_body); \
|
||||
subst 's|^$(1)[ ]*[+?]*=.*$$|#& # overridden by $@|' "$(CONFIG)"; \
|
||||
sed -i 's|^$(1)[ ]*[+?]*=.*$$|#& # overridden by $@|' "$(CONFIG)"; \
|
||||
printf '%s = %s\n' '$(1)' '$(2)' >> "$(CONFIG)"; }
|
||||
endef
|
||||
|
||||
|
12
lib/help.mk
Normal file
12
lib/help.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
# this makefile holds the most helpful bits for the toplevel one
|
||||
|
||||
help/distro:
|
||||
@echo '** available distribution targets:'; \
|
||||
echo $(DISTROS) | fmt -sw"$$((COLUMNS>>1))" | column -t
|
||||
|
||||
help/ve:
|
||||
@echo '** available virtual environment targets:'; \
|
||||
echo $(VES) | fmt -sw"$$((COLUMNS>>1))" | column -t
|
||||
|
||||
help: | help/distro help/space help/ve; @:
|
||||
help/space:; @echo
|
11
lib/log.mk
11
lib/log.mk
@@ -8,7 +8,7 @@ endif
|
||||
|
||||
BUILDLOG ?= $(BUILDDIR)/build.log
|
||||
|
||||
# LOG holds a postprocessor
|
||||
# LOG holds a redirecting postprocessor
|
||||
ifdef DEBUG
|
||||
# 1) makefile target; 2) also passed to script hooks
|
||||
GLOBAL_DEBUG := debug
|
||||
@@ -27,3 +27,12 @@ DATE = $(shell date +%Y%m%d)
|
||||
TIME = `date +%H:%M:%S`
|
||||
|
||||
export BUILDLOG DATE GLOBAL_DEBUG GLOBAL_VERBOSE LOG MAKE SHELL
|
||||
|
||||
# brevity postprocessor; not exported, for toplevel use only
|
||||
SHORTEN = $(shell \
|
||||
echo -n "| sed"; \
|
||||
if [ -s "$(SYMLINK)" ]; then \
|
||||
echo -n " -e 's,$(BUILDDIR),$(SYMLINK),'"; \
|
||||
fi; \
|
||||
echo -n " -e 's,$(TMP),\$$TMP,' -e 's,$(HOME),~,'"; \
|
||||
)
|
||||
|
@@ -4,14 +4,23 @@ endif
|
||||
|
||||
SYMLINK = build
|
||||
|
||||
# this could have come from environment;
|
||||
# if not, can be symlinked if r/w, or made anew
|
||||
# this could have come from env; or could be symlinked; or is made anew
|
||||
# (the reuse rationale is avoiding extra tmpdir lookups)
|
||||
# NB: immediate assignment matters
|
||||
# NB: PATH has no effect here
|
||||
ifndef BUILDDIR
|
||||
BUILDDIR := $(shell [ -s "$(SYMLINK)" ] \
|
||||
&& realpath "$(SYMLINK)" \
|
||||
|| bin/mktmpdir mkimage-profiles)
|
||||
BUILDLINK := $(realpath $(SYMLINK))
|
||||
BUILDDIR := $(shell \
|
||||
if [ -s "$(SYMLINK)" -a "$(NUM_TARGETS)" = 1 ] && \
|
||||
[ -n "$(findstring $(BUILDDIR_PREFIX).,$(BUILDLINK))" ]; \
|
||||
then \
|
||||
echo "$(BUILDLINK)"; \
|
||||
else \
|
||||
bin/mktmpdir $(BUILDDIR_PREFIX) || exit 127; \
|
||||
fi; )
|
||||
endif
|
||||
|
||||
ifeq (,$(BUILDDIR))
|
||||
$(error suitable BUILDDIR unavailable)
|
||||
endif
|
||||
|
||||
# even smart caching only hurts when every build goes from scratch
|
||||
@@ -24,56 +33,58 @@ export BUILDDIR NO_CACHE PATH
|
||||
CONFIG := $(BUILDDIR)/distcfg.mk
|
||||
RC := $(HOME)/.mkimage/profiles.mk
|
||||
|
||||
# holds a postprocessor; shell test executes in particular situation
|
||||
# NB: not exported, for toplevel use only
|
||||
SHORTEN = $(shell \
|
||||
if [ -s "$(SYMLINK)" ]; then \
|
||||
echo "| sed 's,$(BUILDDIR),$(SYMLINK),'"; \
|
||||
else \
|
||||
echo "| sed 's,$(TMP),\$$TMP,'"; \
|
||||
fi;)
|
||||
|
||||
# step 1: initialize the off-tree mkimage profile (BUILDDIR)
|
||||
# NB: our output MUST go into stderr to escape POSTPROC
|
||||
profile/init: distclean
|
||||
@echo -n "$(TIME) initializing BUILDDIR: "
|
||||
@rsync -qaH --delete image.in/ "$(BUILDDIR)"/
|
||||
@mkdir "$(BUILDDIR)"/.mki # mkimage toplevel marker
|
||||
@{ \
|
||||
if [ "`realpath "$(BUILDDIR)/"`" = / ]; then \
|
||||
echo "$(TIME) ERROR: invalid BUILDDIR: \`$(BUILDDIR)'"; \
|
||||
exit 128; \
|
||||
fi; \
|
||||
echo -n "$(TIME) initializing BUILDDIR: "; \
|
||||
rsync -qaxH --delete-after image.in/ "$(BUILDDIR)"/; \
|
||||
mkdir "$(BUILDDIR)"/.mki; \
|
||||
} >&2
|
||||
@$(call put,ifndef DISTCFG_MK)
|
||||
@$(call put,DISTCFG_MK = 1)
|
||||
@if type -t git >&/dev/null; then \
|
||||
@{ \
|
||||
if type -t git >&/dev/null; then \
|
||||
if [ -d .git ]; then \
|
||||
git show-ref --head -d -s -- HEAD && \
|
||||
git status -s && \
|
||||
echo; \
|
||||
fi $(LOG); \
|
||||
fi
|
||||
@{ \
|
||||
fi; \
|
||||
{ \
|
||||
eval `apt-config shell $${APTCONF:+-c=$(wildcard $(APTCONF))} \
|
||||
SOURCELIST Dir::Etc::sourcelist/f \
|
||||
SOURCEPARTS Dir::Etc::sourceparts/d`; \
|
||||
find "$$SOURCEPARTS" -name '*.list' \
|
||||
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" && \
|
||||
echo; \
|
||||
} $(LOG)
|
||||
@if type -t git >&/dev/null; then \
|
||||
} $(LOG); \
|
||||
if type -t git >&/dev/null; then \
|
||||
if cd $(BUILDDIR); then \
|
||||
git init -q && \
|
||||
git add . && \
|
||||
git commit -qam 'derivative profile initialized'; \
|
||||
cd ->&/dev/null; \
|
||||
fi; \
|
||||
fi
|
||||
@if [ -w . ]; then \
|
||||
fi; \
|
||||
if [ -w . ]; then \
|
||||
rm -f "$(SYMLINK)" && \
|
||||
ln -sf "$(BUILDDIR)" "$(SYMLINK)" && \
|
||||
ln -s "$(BUILDDIR)" "$(SYMLINK)" && \
|
||||
echo "$(SYMLINK)/"; \
|
||||
else \
|
||||
echo "$(BUILDDIR)/" $(SHORTEN); \
|
||||
fi $(SHORTEN)
|
||||
echo "$(BUILDDIR)/"; \
|
||||
fi $(SHORTEN); \
|
||||
} >&2
|
||||
|
||||
profile/bare: profile/init
|
||||
@NOTE="$${GLOBAL_VERBOSE:+: $(CONFIG)}"; \
|
||||
echo "$(TIME) preparing distro config$$NOTE" \
|
||||
$(SHORTEN)
|
||||
@{ \
|
||||
NOTE="$${GLOBAL_VERBOSE:+: $(CONFIG)}"; \
|
||||
echo "$(TIME) preparing distro config$$NOTE" $(SHORTEN); \
|
||||
} >&2
|
||||
@$(call try,MKIMAGE_PREFIX,/usr/share/mkimage)
|
||||
@$(call try,GLOBAL_VERBOSE,)
|
||||
@$(call try,IMAGEDIR,$(IMAGEDIR))
|
||||
@@ -102,7 +113,7 @@ profile/dump-vars:
|
||||
fi $(LOG)
|
||||
|
||||
# step 3 entry point: copy the needed parts into BUILDDIR
|
||||
profile/populate: profile/init profile/finalize profile/dump-vars
|
||||
profile/populate: profile/finalize profile/dump-vars
|
||||
@for dir in sub.in features.in pkg.in; do \
|
||||
$(MAKE) -C $$dir $(LOG); \
|
||||
done
|
||||
|
9
lib/report.mk
Normal file
9
lib/report.mk
Normal file
@@ -0,0 +1,9 @@
|
||||
# enable make target tracing
|
||||
|
||||
ifdef REPORT
|
||||
TRACE_PREFIX := trace:building
|
||||
OLD_SHELL := $(SHELL)
|
||||
SHELL = $(info $(TRACE_PREFIX) $@$(if $^$|, -> $^ $|))$(OLD_SHELL)
|
||||
# piggyback BUILDDIR back into supervising environment
|
||||
$(info $(TRACE_PREFIX) BUILDDIR = $(BUILDDIR))
|
||||
endif
|
@@ -13,3 +13,6 @@ config/pack/%: use/pack/%
|
||||
# just preconfigure
|
||||
config/name/%:
|
||||
@$(call set,IMAGE_NAME,$*)
|
||||
|
||||
# the final thing will pull the rest in
|
||||
build: postclean; @:
|
||||
|
@@ -9,7 +9,11 @@ ifeq (ve,$(IMAGE_CLASS))
|
||||
ve/.bare: profile/bare
|
||||
@$(call add,BASE_PACKAGES,basesystem)
|
||||
|
||||
ve/bare: ve/.bare
|
||||
@$(call add,BASE_PACKAGES,apt)
|
||||
|
||||
ve/generic: ve/.bare
|
||||
@$(call add,BASE_PACKAGES,openssh-server openssh-blacklist openssh-clients)
|
||||
@$(call add,BASE_LISTS,\
|
||||
$(call tags,base && (server || network || security || pkg)))
|
||||
|
||||
|
74
main.mk
Normal file
74
main.mk
Normal file
@@ -0,0 +1,74 @@
|
||||
# steps to build an image:
|
||||
# --- here
|
||||
# 1. initialize new profile (BUILDDIR) as a copy of image.in/
|
||||
# 2. configure distro
|
||||
# 3. copy the needed bits from metaprofile to a new profile
|
||||
# --- in BUILDDIR
|
||||
# 4. build subprofiles and subsequently an image
|
||||
|
||||
MKIMAGE_PROFILES = $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
|
||||
# deal with one target at a time
|
||||
IMAGE_TARGET := $(firstword $(MAKECMDGOALS))# ve/generic.tar.gz
|
||||
ifeq (./,$(dir $(IMAGE_TARGET)))# convenience fallback
|
||||
IMAGE_TARGET := distro/$(IMAGE_TARGET)# for omitted "distro/"
|
||||
endif
|
||||
IMAGE_CONF := $(firstword $(subst ., ,$(IMAGE_TARGET)))# ve/generic
|
||||
IMAGE_CLASS := $(firstword $(subst /, ,$(IMAGE_TARGET)))# ve
|
||||
IMAGE_FILE := $(lastword $(subst /, ,$(IMAGE_TARGET)))# generic.tar.gz
|
||||
IMAGE_NAME := $(firstword $(subst ., ,$(IMAGE_FILE)))# generic
|
||||
IMAGE_TYPE := $(subst $(IMAGE_NAME).,,$(IMAGE_FILE))# tar.gz
|
||||
|
||||
# readjustable
|
||||
ifeq (1,$(NUM_TARGETS))
|
||||
BUILDDIR_PREFIX ?= mkimage-profiles.build
|
||||
else
|
||||
BUILDDIR_PREFIX ?= mkimage-profiles.build/$(IMAGE_CONF).$(ARCH)
|
||||
endif
|
||||
|
||||
# preferences
|
||||
-include $(HOME)/.mkimage/profiles.mk
|
||||
|
||||
# most of the actual work done elsewhere
|
||||
include lib/*.mk
|
||||
include conf.d/*.mk
|
||||
include features.in/*/config.mk
|
||||
|
||||
DISTRO_TARGETS := $(shell sed -n 's,^\(distro/[^:.]\+\):.*$$,\1,p' \
|
||||
lib/distro.mk $(wildcard conf.d/*.mk) | sort -u)
|
||||
VE_TARGETS := $(shell sed -n 's,^\(ve/[^:.]\+\):.*$$,\1,p' \
|
||||
lib/ve.mk $(wildcard conf.d/*.mk) | sort -u)
|
||||
DISTROS := $(call addsuffices,$(DISTRO_EXTS),$(DISTRO_TARGETS))
|
||||
VES := $(call addsuffices,$(VE_EXTS),$(VE_TARGETS))
|
||||
IMAGES := $(DISTROS) $(VES)
|
||||
|
||||
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS)
|
||||
.PHONY: debug everything help space
|
||||
|
||||
### duplicate but still needed
|
||||
everything:
|
||||
@n=1; sum=$(words $(DISTROS)); \
|
||||
for distro in $(DISTROS); do \
|
||||
echo "** building $$distro [$$n/$$sum]:"; \
|
||||
$(MAKE) -f main.mk --no-print-directory $$distro; \
|
||||
[ "$$n" -lt "$$sum" ] && echo; \
|
||||
n=$$(($$n+1)); \
|
||||
done
|
||||
|
||||
# config/with/ve/generic config/like/ve config/name/generic config/pack/tar.gz
|
||||
$(IMAGES): debug \
|
||||
config/with/$(IMAGE_CONF) \
|
||||
config/like/$(IMAGE_CLASS) \
|
||||
config/name/$(IMAGE_NAME) \
|
||||
config/pack/$(IMAGE_TYPE) \
|
||||
build; @:
|
||||
|
||||
# convenience shortcut
|
||||
$(DISTROS:distro/%=%): %: distro/%; @:
|
||||
|
||||
debug:
|
||||
ifeq (2,$(DEBUG))
|
||||
@$(foreach v,\
|
||||
$(filter IMAGE_%,$(sort $(.VARIABLES))),\
|
||||
$(warning $v = $($v)))
|
||||
endif
|
@@ -16,44 +16,7 @@ ifneq (,$(findstring install2,$(FEATURES)))
|
||||
DOTBASE := dot-base
|
||||
endif
|
||||
|
||||
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE)
|
||||
@# env | sort -u | grep _LISTS | xargs cp
|
||||
@$(foreach V, \
|
||||
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
||||
$(if $(filter environment% file,$(origin $V)),\
|
||||
$(shell cp --parents -at $(TARGET) \
|
||||
-- $(value $V))))
|
||||
|
||||
### FIXME: move to iterator/static pattern rule
|
||||
dot-base:
|
||||
@# construct .base packagelist for alterator-pkg
|
||||
@{ \
|
||||
echo "## generated by pkg.in/lists/Makefile"; \
|
||||
if [ -n "$(BRANDING)" ]; then \
|
||||
echo "branding-$(BRANDING)-release"; \
|
||||
fi; \
|
||||
if [ -n "$(SYSTEM_PACKAGES)" ]; then \
|
||||
echo -e "\n## SYSTEM_PACKAGES\n$(SYSTEM_PACKAGES)"; \
|
||||
fi; \
|
||||
if [ -n "$(COMMON_PACKAGES)" ]; then \
|
||||
echo -e "\n## COMMON_PACKAGES\n$(COMMON_PACKAGES)"; \
|
||||
fi; \
|
||||
if [ -n "$(THE_PACKAGES)" ]; then \
|
||||
echo -e "\n## THE_PACKAGES\n$(THE_PACKAGES)"; \
|
||||
fi; \
|
||||
if [ -n "$(BASE_PACKAGES)" ]; then \
|
||||
echo -e "\n## BASE_PACKAGES\n$(BASE_PACKAGES)"; \
|
||||
fi; \
|
||||
if [ -n "$(THE_LISTS)" ]; then \
|
||||
echo -e "\n## THE_LISTS"; cat $(THE_LISTS); \
|
||||
fi; \
|
||||
if [ -n "$(BASE_LISTS)" ]; then \
|
||||
echo -e "\n## BASE_LISTS"; cat $(BASE_LISTS); \
|
||||
fi; \
|
||||
} | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' >$(TARGET)/.base
|
||||
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
|
||||
cp -at $(TARGET) -- $(THE_GROUPS) $(MAIN_GROUPS); \
|
||||
fi
|
||||
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
|
||||
@if type -t git >&/dev/null && cd $(TARGET); then \
|
||||
if [ -n "`git status -s`" ]; then \
|
||||
git add . && \
|
||||
@@ -62,6 +25,35 @@ dot-base:
|
||||
cd - >&/dev/null; \
|
||||
fi
|
||||
|
||||
copy-lists:
|
||||
@# env | sort -u | grep _LISTS | xargs cp
|
||||
@$(foreach V, \
|
||||
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
||||
$(if $(filter environment% file,$(origin $V)),\
|
||||
$(shell cp --parents -at $(TARGET) \
|
||||
-- $(value $V))))
|
||||
|
||||
copy-groups:
|
||||
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
|
||||
cp -at $(TARGET) -- $(THE_GROUPS) $(MAIN_GROUPS); \
|
||||
fi
|
||||
|
||||
# args: name, suffix, command
|
||||
define dump-THEM
|
||||
if [ -n "$($(1)_$(2))" ]; then echo -e "\n## $(1)_$(2)"; $(3) $($(1)_$(2)); fi;
|
||||
endef
|
||||
|
||||
dump-PACKAGES = $(call dump-THEM,$(1),PACKAGES,echo)
|
||||
dump-LISTS = $(call dump-THEM,$(1),LISTS,cat)
|
||||
|
||||
dot-base:
|
||||
@# construct .base packagelist for alterator-pkg
|
||||
@{ \
|
||||
echo "## generated by pkg.in/lists/Makefile"; \
|
||||
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
|
||||
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
|
||||
} | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' >$(TARGET)/.base
|
||||
|
||||
# do beforehand as foreach gets expanded before recipe execution
|
||||
$(TARGET):
|
||||
@mkdir -p $(TARGET)
|
||||
|
32
pkg.in/lists/ltsp
Normal file
32
pkg.in/lists/ltsp
Normal file
@@ -0,0 +1,32 @@
|
||||
ltsp-server
|
||||
ltsp-server-basic
|
||||
openssh-server
|
||||
|
||||
#alterator-ltsconf
|
||||
#alterator-standalone
|
||||
|
||||
alsa-plugins
|
||||
alsa-plugins-pulse
|
||||
alsa-utils
|
||||
aplay
|
||||
mplayer
|
||||
|
||||
syslinux
|
||||
mkisofs
|
||||
|
||||
iftop
|
||||
|
||||
#kde-settings-kded-no_media_popup
|
||||
|
||||
#docs-install_ltsp
|
||||
#docs-issue-desktop_personal
|
||||
|
||||
installer-feature-ltsp-stage3
|
||||
|
||||
# Set available online repository and some useful utilites from /sbin
|
||||
installer-feature-symlinks-from-sbin
|
||||
installer-feature-online-repo
|
||||
|
||||
####
|
||||
vim-console
|
||||
cpio
|
5
pkg.in/lists/ltsp-client
Normal file
5
pkg.in/lists/ltsp-client
Normal file
@@ -0,0 +1,5 @@
|
||||
ltsp-client
|
||||
ltsp-client-full
|
||||
ltsp-client-nxsession
|
||||
# ouch!
|
||||
mc
|
3
pkg.in/lists/ltsp-client.i586
Normal file
3
pkg.in/lists/ltsp-client.i586
Normal file
@@ -0,0 +1,3 @@
|
||||
kernel-image-ltsp-client
|
||||
kernel-modules-drm-ltsp-client
|
||||
kernel-modules-alsa-ltsp-client
|
3
pkg.in/lists/ltsp-client.x86_64
Normal file
3
pkg.in/lists/ltsp-client.x86_64
Normal file
@@ -0,0 +1,3 @@
|
||||
kernel-image-std-def
|
||||
kernel-modules-drm-std-def
|
||||
kernel-modules-alsa-std-def
|
@@ -7,4 +7,5 @@ mdadm
|
||||
openssh-server
|
||||
openssh-clients
|
||||
openssh-blacklist
|
||||
screen
|
||||
acpid
|
||||
|
1
pkg.in/lists/tagged/desktop+network
Normal file
1
pkg.in/lists/tagged/desktop+network
Normal file
@@ -0,0 +1 @@
|
||||
firefox
|
@@ -1,4 +1,4 @@
|
||||
razorqt
|
||||
razor-qt
|
||||
arora
|
||||
qtfm
|
||||
qterminal
|
||||
|
@@ -16,3 +16,6 @@ qt4-settings
|
||||
qtparted
|
||||
tubularix
|
||||
smplayer
|
||||
|
||||
# upstream recommended
|
||||
#ptbatterysystemtray
|
||||
|
21
pkg.in/lists/tagged/desktop+tde
Normal file
21
pkg.in/lists/tagged/desktop+tde
Normal file
@@ -0,0 +1,21 @@
|
||||
kdebase
|
||||
###kde-icon-theme-tango
|
||||
kde-icon-theme-nuvola
|
||||
tango-icon-theme-extras
|
||||
kkbswitch
|
||||
kdegraphics-ksnapshot
|
||||
kdegraphics-kview
|
||||
kdeutils-laptop
|
||||
kdepim-akregator
|
||||
gtk2-themes-qtcurve
|
||||
#kde-styles-qtcurve
|
||||
kdeutils-ark
|
||||
#kdebluetooth
|
||||
kdeutils-kcalc
|
||||
kdegraphics-kpdf
|
||||
kde-i18n-ru
|
||||
kdeaddons-konqueror
|
||||
#digikam
|
||||
#digikam-image-plugins
|
||||
kaffeine
|
||||
kdemultimedia-kmix
|
@@ -8,8 +8,10 @@ bonnie++
|
||||
cfdisk
|
||||
ddrescue
|
||||
disktype
|
||||
evms
|
||||
evms-ncurses
|
||||
# NB: EVMS must be off by default as "normal" /dev/sd*
|
||||
# would suddenly get busy otherwise
|
||||
#evms
|
||||
#evms-ncurses
|
||||
fdisk
|
||||
gpart
|
||||
iotop
|
||||
@@ -67,8 +69,10 @@ iftop
|
||||
iproute2
|
||||
iptables
|
||||
iputils
|
||||
lft
|
||||
lftp
|
||||
mailx
|
||||
mtr
|
||||
netcat
|
||||
netlist
|
||||
nfs-utils
|
||||
@@ -99,3 +103,6 @@ mc
|
||||
# Development/Debuggers
|
||||
strace
|
||||
sysstat
|
||||
|
||||
# win32
|
||||
chntpw
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#anyfs-tools
|
||||
cpipe
|
||||
dar
|
||||
ddrescue
|
||||
|
@@ -9,6 +9,8 @@ mailx
|
||||
netcat
|
||||
netlist
|
||||
openssh-clients
|
||||
openssh-server
|
||||
openssh-blacklist
|
||||
rsync
|
||||
traceroute
|
||||
vlan-utils
|
||||
|
@@ -21,12 +21,13 @@ xorg-drv-wacom
|
||||
xorg-drv-wizardpen
|
||||
xorg-drv-qxl
|
||||
|
||||
# #25044?
|
||||
xorg-dri-intel
|
||||
|
||||
# for those who need these
|
||||
xorg-drv-keyboard
|
||||
xorg-drv-mouse
|
||||
|
||||
#xorg-dri-*
|
||||
|
||||
xauth
|
||||
xorg-utils
|
||||
#xorg-extensions*
|
||||
|
14
reports.mk
Normal file
14
reports.mk
Normal file
@@ -0,0 +1,14 @@
|
||||
# collect what's left
|
||||
|
||||
all: reports/targets
|
||||
|
||||
reports/targets:
|
||||
@if [ -n "$$REPORT_PATH" -a -s "$$REPORT_PATH" ]; then \
|
||||
BUILDDIR="`sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' \
|
||||
"$$REPORT_PATH"`"; \
|
||||
REPORT_IMAGE="$$BUILDDIR/targets.png"; \
|
||||
bin/report-targets < "$$REPORT_PATH" \
|
||||
| dot -Tpng -o "$$REPORT_IMAGE" \
|
||||
&& echo "** target graph report: $$REPORT_IMAGE" \
|
||||
&& mv "$$REPORT_PATH" "$$BUILDDIR/targets.log"; \
|
||||
fi
|
@@ -11,6 +11,7 @@ include $(MKIMAGE_PREFIX)/config.mk
|
||||
ifndef BOOTLOADER
|
||||
$(error BOOTLOADER not defined)
|
||||
endif
|
||||
GLOBAL_BOOTLOADER := $(BOOTLOADER)
|
||||
|
||||
MKI_PACK_RESULTS = data
|
||||
PROPAGATOR_VERSION = ALT Linux
|
||||
@@ -38,15 +39,15 @@ CHROOT_PACKAGES_REGEXP += $(STAGE1_PACKAGES_REGEXP)
|
||||
CHROOT_PACKAGES = $(STAGE1_PACKAGES) $(SYSTEM_PACKAGES)
|
||||
|
||||
# scripts prepare bootloader configuration, too
|
||||
# NB: we pass tested squashfs options for ../install2/Makefile
|
||||
# NB: we pass tested squashfs options for ../stage2/Makefile to include
|
||||
all: | debug prepare-workdir copy-tree run-scripts $(BUILD_PROPAGATOR) \
|
||||
copy-$(BOOTLOADER) $(COPY_SQUASHCFG) pack-image $(GLOBAL_CLEAN_WORKDIR)
|
||||
@if test -s $(OUTDIR)/squashcfg.mk; then \
|
||||
@if [ -s $(OUTDIR)/squashcfg.mk ]; then \
|
||||
cp $(OUTDIR)/squashcfg.mk $(GLOBAL_BUILDDIR)/; \
|
||||
fi
|
||||
|
||||
debug:
|
||||
@if test -n "$(GLOBAL_VERBOSE)"; then \
|
||||
@if [ -n "$(GLOBAL_VERBOSE)" ]; then \
|
||||
echo "** BRANDING: $(BRANDING)"; \
|
||||
echo "** IMAGE_INIT_LIST: $(IMAGE_INIT_LIST)"; \
|
||||
echo "** STAGE1_PACKAGES: $(STAGE1_PACKAGES)"; \
|
||||
|
Reference in New Issue
Block a user