Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1b7ce25f10 | ||
|
5dba27d011 | ||
|
79bb3f8d6e | ||
|
788cad885e | ||
|
a52b7476a4 | ||
|
deb63e0d63 |
@@ -1,5 +1,5 @@
|
|||||||
Name: mkimage-profiles
|
Name: mkimage-profiles
|
||||||
Version: 0.5.7
|
Version: 0.6.0
|
||||||
Release: alt1
|
Release: alt1
|
||||||
|
|
||||||
Summary: ALT Linux based distribution metaprofile
|
Summary: ALT Linux based distribution metaprofile
|
||||||
@@ -15,6 +15,8 @@ Requires: rsync git-core
|
|||||||
Requires: time schedutils
|
Requires: time schedutils
|
||||||
Requires: mkimage >= 0.2.0
|
Requires: mkimage >= 0.2.0
|
||||||
|
|
||||||
|
# Recommends: graphviz
|
||||||
|
|
||||||
%define mpdir %_datadir/%name
|
%define mpdir %_datadir/%name
|
||||||
%add_findreq_skiplist %mpdir/*.in/*
|
%add_findreq_skiplist %mpdir/*.in/*
|
||||||
|
|
||||||
@@ -59,6 +61,9 @@ cp -a * %buildroot%mpdir
|
|||||||
%doc README QUICKSTART
|
%doc README QUICKSTART
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Mon Mar 12 2012 Michael Shigorin <mike@altlinux.org> 0.5.7-alt1
|
||||||
- distro tweaks
|
- distro tweaks
|
||||||
|
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
object a8e70fd4e667a95fb429c3b77a2f45eca0da7859
|
|
||||||
type commit
|
|
||||||
tag v0.5.6
|
|
||||||
tagger Michael Shigorin <mike@altlinux.org> 1329770647 +0200
|
|
||||||
|
|
||||||
fixups
|
|
6
.gear/tags/8cc85c046ab7ddd162f08001f1b615ee080ab7c4
Normal file
6
.gear/tags/8cc85c046ab7ddd162f08001f1b615ee080ab7c4
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
object 3f85ed2b19708819aa28d23762f0d6b71741a483
|
||||||
|
type commit
|
||||||
|
tag v0.5.7
|
||||||
|
tagger Michael Shigorin <mike@altlinux.org> 1331583347 +0200
|
||||||
|
|
||||||
|
distro tweaks
|
@@ -1 +1 @@
|
|||||||
5f2dbc6d511b0a0a39799983df054a249298dd8c v0.5.6
|
8cc85c046ab7ddd162f08001f1b615ee080ab7c4 v0.5.7
|
||||||
|
25
Makefile
25
Makefile
@@ -1,7 +1,8 @@
|
|||||||
# umbrella mkimage-profiles makefile:
|
# umbrella mkimage-profiles makefile:
|
||||||
# iterate over multiple goals/arches
|
# iterate over multiple goals/arches,
|
||||||
|
# collect proceedings
|
||||||
|
|
||||||
# immediate assignment
|
# for immediate assignment
|
||||||
ifndef ARCHES
|
ifndef ARCHES
|
||||||
ifdef ARCH
|
ifdef ARCH
|
||||||
ARCHES := $(ARCH)
|
ARCHES := $(ARCH)
|
||||||
@@ -11,8 +12,14 @@ endif
|
|||||||
endif
|
endif
|
||||||
export ARCHES
|
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
|
# recursive make considered useful for m-p
|
||||||
MAKE += --no-print-directory
|
MAKE += -r --no-print-directory
|
||||||
|
|
||||||
.PHONY: clean distclean help
|
.PHONY: clean distclean help
|
||||||
clean distclean help:
|
clean distclean help:
|
||||||
@@ -23,16 +30,18 @@ export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
|||||||
# real targets need real work
|
# real targets need real work
|
||||||
%:
|
%:
|
||||||
@n=1; \
|
@n=1; \
|
||||||
|
say() { echo "$$@" >&2; }; \
|
||||||
if [ "$(NUM_TARGETS)" -gt 1 ]; then \
|
if [ "$(NUM_TARGETS)" -gt 1 ]; then \
|
||||||
n="`echo $(MAKECMDGOALS) \
|
n="`echo $(MAKECMDGOALS) \
|
||||||
| tr '[[:space:]]' '\n' \
|
| tr '[[:space:]]' '\n' \
|
||||||
| grep -nx "$@" \
|
| grep -nx "$@" \
|
||||||
| cut -d: -f1`"; \
|
| cut -d: -f1`"; \
|
||||||
echo "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
|
say "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
|
||||||
fi; \
|
fi; \
|
||||||
for ARCH in $(ARCHES); do \
|
for ARCH in $(ARCHES); do \
|
||||||
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then echo; fi; \
|
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then say; fi; \
|
||||||
echo "** ARCH: $$ARCH"; \
|
say "** ARCH: $$ARCH" >&2; \
|
||||||
$(MAKE) -f main.mk ARCH=$$ARCH $@; \
|
$(MAKE) -f main.mk ARCH=$$ARCH $@ $(POSTPROC); \
|
||||||
|
$(MAKE) -f reports.mk ARCH=$$ARCH; \
|
||||||
done; \
|
done; \
|
||||||
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then echo; fi
|
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then say; fi
|
||||||
|
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 "}"
|
@@ -7,19 +7,15 @@ distro/.desktop-base: distro/.installer \
|
|||||||
|
|
||||||
distro/.desktop-mini: distro/.desktop-base \
|
distro/.desktop-mini: distro/.desktop-base \
|
||||||
use/lowmem use/x11/xdm use/power/acpi/button \
|
use/lowmem use/x11/xdm use/power/acpi/button \
|
||||||
use/cleanup/alterator
|
use/cleanup/alterator; @:
|
||||||
|
|
||||||
distro/icewm: distro/.desktop-mini
|
distro/tde: distro/.desktop-mini +tde
|
||||||
@$(call add,BASE_LISTS,$(call tags,icewm desktop))
|
|
||||||
|
|
||||||
distro/tde: distro/.desktop-mini use/x11/kdm
|
|
||||||
@$(call add,BASE_LISTS, \
|
@$(call add,BASE_LISTS, \
|
||||||
$(call tags,(base || desktop) && (network || tde)))
|
$(call tags,(base || desktop) && network))
|
||||||
|
|
||||||
distro/ltsp-icewm: distro/icewm use/ltsp/base
|
distro/icewm: distro/.desktop-mini +icewm; @:
|
||||||
|
distro/ltsp-icewm: distro/icewm +ltsp; @:
|
||||||
distro/ltsp-tde: distro/tde use/ltsp/base
|
distro/ltsp-tde: distro/tde +ltsp; @:
|
||||||
|
distro/desktop-systemd: distro/icewm use/systemd; @:
|
||||||
distro/desktop-systemd: distro/icewm use/systemd
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@@ -2,52 +2,39 @@
|
|||||||
ifeq (distro,$(IMAGE_CLASS))
|
ifeq (distro,$(IMAGE_CLASS))
|
||||||
|
|
||||||
distro/syslinux: distro/.init \
|
distro/syslinux: distro/.init \
|
||||||
use/syslinux/localboot.cfg use/syslinux/ui-vesamenu \
|
use/syslinux/localboot.cfg use/syslinux/ui-vesamenu use/hdt; @:
|
||||||
use/hdt use/memtest
|
|
||||||
|
|
||||||
distro/dos: distro/.init use/dos use/syslinux/ui-menu
|
distro/dos: distro/.init use/dos use/syslinux/ui-menu; @:
|
||||||
distro/rescue: distro/.base use/rescue 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/live-systemd: distro/.base use/live/base use/systemd
|
|
||||||
|
|
||||||
distro/.live-x11: distro/live use/firmware use/power/acpi/button
|
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
|
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
|
||||||
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
|
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
|
||||||
|
|
||||||
distro/live-builder: pkgs := livecd-tmpfs livecd-online-repo mkimage-profiles
|
distro/live-builder: pkgs := livecd-tmpfs livecd-online-repo mkimage-profiles
|
||||||
distro/live-builder: distro/.base use/repo/main \
|
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo
|
||||||
use/live/base use/dev/mkimage use/power/acpi/button
|
|
||||||
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
|
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
|
||||||
|
@$(call add,LIVE_PACKAGES,zsh sudo)
|
||||||
@$(call add,LIVE_PACKAGES,$(pkgs))
|
@$(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,$(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)
|
@$(call add,LIVE_PACKAGES,live-install)
|
||||||
|
|
||||||
distro/live-icewm: distro/.live-x11 use/live/autologin
|
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
|
||||||
@$(call add,LIVE_LISTS, \
|
distro/live-razorqt: distro/.live-desktop +razorqt; @:
|
||||||
$(call tags,(base || desktop) && (live || network || icewm)))
|
distro/live-tde: distro/.live-desktop +tde; @:
|
||||||
|
|
||||||
distro/live-razorqt: distro/.live-x11 use/x11/lightdm use/syslinux/ui-vesamenu
|
|
||||||
@$(call add,LIVE_LISTS, \
|
|
||||||
$(call tags,(base || desktop) && (live || network || razorqt)))
|
|
||||||
|
|
||||||
distro/live-tde: distro/.live-x11 use/x11/kdm use/syslinux/ui-vesamenu
|
|
||||||
@$(call add,LIVE_LISTS, \
|
|
||||||
$(call tags,(base || desktop) && (live || network || tde)))
|
|
||||||
|
|
||||||
distro/live-rescue: distro/live-icewm
|
distro/live-rescue: distro/live-icewm
|
||||||
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
|
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
|
||||||
@$(call add,LIVE_LISTS, \
|
@$(call add,LIVE_LISTS, \
|
||||||
$(call tags,(base || extra) && (archive || rescue || network)))
|
$(call tags,(base || extra) && (archive || rescue || network)))
|
||||||
|
|
||||||
distro/live-webkiosk: distro/.live-x11 use/live/autologin use/live/hooks
|
distro/live-webkiosk: distro/.live-desktop use/live/autologin use/live/hooks
|
||||||
@$(call add,LIVE_PACKAGES,livecd-webkiosk)
|
@$(call add,LIVE_PACKAGES,livecd-webkiosk)
|
||||||
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
|
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ distro/server-mini: distro/.server-base use/cleanup/x11-alterator
|
|||||||
$(call tags,base && (server || network || security || pkg)))
|
$(call tags,base && (server || network || security || pkg)))
|
||||||
@$(call add,BASE_LISTS,$(call tags,extra (server || network)))
|
@$(call add,BASE_LISTS,$(call tags,extra (server || network)))
|
||||||
|
|
||||||
distro/server-systemd: distro/server-mini use/systemd use/bootloader/lilo
|
distro/server-systemd: distro/server-mini use/systemd use/bootloader/lilo; @:
|
||||||
|
|
||||||
distro/server-ovz: distro/server-mini \
|
distro/server-ovz: distro/server-mini \
|
||||||
use/hdt use/rescue use/firmware/server use/power/acpi/button
|
use/hdt use/rescue use/firmware/server use/power/acpi/button
|
||||||
|
@@ -3,6 +3,12 @@
|
|||||||
NB: пути приводятся от верхнего уровня; проект в целом предполагает
|
NB: пути приводятся от верхнего уровня; проект в целом предполагает
|
||||||
GNU make 3.81 (с использованием которого и разрабатывается).
|
GNU make 3.81 (с использованием которого и разрабатывается).
|
||||||
|
|
||||||
|
- lib/report.mk
|
||||||
|
+ ожидает, что каждая подлежащая трассированию цель каждого
|
||||||
|
makefile при сборке конфигурации образа содержит непустой
|
||||||
|
recipe -- хотя бы "; @:" -- т.к. зависит от запуска $(SHELL)
|
||||||
|
+ характерный признак пропуска -- разрыв графа (report-targets.png)
|
||||||
|
|
||||||
- pkg.in/lists/Makefile
|
- pkg.in/lists/Makefile
|
||||||
+ ожидает, что названия пакаджлистов указываются в переменных
|
+ ожидает, что названия пакаджлистов указываются в переменных
|
||||||
вида *_LISTS, и копирует в генерируемый профиль только их
|
вида *_LISTS, и копирует в генерируемый профиль только их
|
||||||
|
@@ -65,6 +65,11 @@
|
|||||||
+ значение: пусто (по умолчанию) либо любая строка
|
+ значение: пусто (по умолчанию) либо любая строка
|
||||||
+ см. ../lib/build.mk
|
+ см. ../lib/build.mk
|
||||||
|
|
||||||
|
- REPORT
|
||||||
|
+ запрашивает создание отчёта о собранном образе
|
||||||
|
+ значение: пусто (по умолчанию) либо любая строка
|
||||||
|
+ см. ../Makefile, ../report.mk, ../lib/report.mk
|
||||||
|
|
||||||
- SAVE_PROFILE
|
- SAVE_PROFILE
|
||||||
+ сохраняет архив сгенерированного профиля в .disk/
|
+ сохраняет архив сгенерированного профиля в .disk/
|
||||||
+ значение: пусто (по умолчанию) либо любая строка
|
+ значение: пусто (по умолчанию) либо любая строка
|
||||||
|
@@ -2,15 +2,29 @@
|
|||||||
# (only regarding the needed subprofiles)
|
# (only regarding the needed subprofiles)
|
||||||
|
|
||||||
ifndef BUILDDIR
|
ifndef BUILDDIR
|
||||||
help all:
|
|
||||||
|
help/plus all: banner
|
||||||
|
@$(call grepper,'^+')
|
||||||
|
|
||||||
|
help/features: banner
|
||||||
|
@$(call grepper,'^use/')
|
||||||
|
|
||||||
|
banner:
|
||||||
@echo "** BUILDDIR not defined; available features:"
|
@echo "** BUILDDIR not defined; available features:"
|
||||||
|
|
||||||
|
grepper = $(and $(1),$(grepper_body))
|
||||||
|
define grepper_body
|
||||||
@for dir in */; do \
|
@for dir in */; do \
|
||||||
echo -n "$$dir: "; \
|
out="`grep -h $(1) $$dir/config.mk \
|
||||||
grep -h '^use/' $$dir/config.mk \
|
|
||||||
| cut -f1 -d: \
|
| cut -f1 -d: \
|
||||||
|
| tr ' ' '\n\n' \
|
||||||
|
| grep $(1) \
|
||||||
| tr '\n' ' ' \
|
| tr '\n' ' ' \
|
||||||
| sort -u; \
|
| sort -u`"; \
|
||||||
|
[ -z "$$out" ] || echo "$$dir: $$out"; \
|
||||||
done
|
done
|
||||||
|
endef
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
include $(BUILDDIR)/distcfg.mk
|
include $(BUILDDIR)/distcfg.mk
|
||||||
|
@@ -22,6 +22,10 @@
|
|||||||
построенных на одном базовом, можно воспользоваться подкаталогом
|
построенных на одном базовом, можно воспользоваться подкаталогом
|
||||||
с именем исходного базового субпрофиля (см. $src, $dst в Makefile).
|
с именем исходного базового субпрофиля (см. $src, $dst в Makefile).
|
||||||
|
|
||||||
|
Наиболее употребительные цели можно снабжать "ярлычками" вроде
|
||||||
|
"+icewm" с тем, чтобы сделать более краткими и выразительными
|
||||||
|
использующие их правила. Просьба не злоупотреблять количеством.
|
||||||
|
|
||||||
Каталог lib/ является специфическим для фич, определяющих
|
Каталог lib/ является специфическим для фич, определяющих
|
||||||
построение конкретного вида образа -- см. build-*/.
|
построение конкретного вида образа -- см. build-*/.
|
||||||
|
|
||||||
|
@@ -1,7 +1,12 @@
|
|||||||
use/dev:
|
use/dev:
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@$(call add,COMMON_PACKAGES,git-core hasher gear)
|
@$(call add,THE_PACKAGES,git-core hasher gear)
|
||||||
|
|
||||||
use/dev/mkimage: use/dev
|
use/dev/mkimage: use/dev
|
||||||
@$(call add,COMMON_PACKAGES,mkimage)
|
@$(call add,THE_PACKAGES,mkimage shadow-change)
|
||||||
@$(call add,LIVE_PACKAGES,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)
|
||||||
|
@@ -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_feature)
|
||||||
@$(call add,STAGE1_PACKAGES,pciids)
|
@$(call add,STAGE1_PACKAGES,pciids)
|
||||||
@$(call add,SYSLINUX_MODULES,hdt)
|
@$(call add,SYSLINUX_MODULES,hdt)
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
+live: use/live/desktop; @:
|
||||||
|
|
||||||
# copy stage2 as live
|
# copy stage2 as live
|
||||||
use/live: use/stage2 sub/stage2/live
|
use/live: use/stage2 sub/stage2/live
|
||||||
@$(call add_feature)
|
@$(call add_feature)
|
||||||
@@ -5,11 +7,15 @@ use/live: use/stage2 sub/stage2/live
|
|||||||
use/live/base: use/live use/syslinux/ui-menu
|
use/live/base: use/live use/syslinux/ui-menu
|
||||||
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
|
@$(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
|
# 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
|
# *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)
|
@$(call add,LIVE_PACKAGES,autologin xinit)
|
||||||
|
|
||||||
use/live/hooks: use/live
|
use/live/hooks: use/live
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
+ltsp: use/ltsp/base; @:
|
||||||
|
|
||||||
use/ltsp:
|
use/ltsp:
|
||||||
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
|
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
|
||||||
@$(call add,MAIN_LISTS,ltsp-client ltsp-client.$(ARCH))
|
@$(call add,MAIN_LISTS,ltsp-client ltsp-client.$(ARCH))
|
||||||
|
@@ -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:
|
use/x11/xorg:
|
||||||
@$(call add,THE_LISTS,xorg)
|
@$(call add,THE_LISTS,xorg)
|
||||||
@$(call add,THE_KMODULES,drm)
|
@$(call add,THE_KMODULES,drm)
|
||||||
@@ -13,9 +17,18 @@ use/x11/runlevel5: use/x11/xorg
|
|||||||
use/x11/xdm: use/x11/runlevel5
|
use/x11/xdm: use/x11/runlevel5
|
||||||
@$(call add,THE_PACKAGES,xdm installer-feature-no-xconsole)
|
@$(call add,THE_PACKAGES,xdm installer-feature-no-xconsole)
|
||||||
|
|
||||||
use/x11/kdm: use/x11/runlevel5
|
|
||||||
@$(call add,THE_PACKAGES,kdebase-kdm)
|
|
||||||
|
|
||||||
### : some set()-like thing might be better?
|
### : some set()-like thing might be better?
|
||||||
use/x11/lightdm: use/x11/runlevel5
|
use/x11/lightdm: use/x11/runlevel5
|
||||||
@$(call add,THE_PACKAGES,lightdm)
|
@$(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))
|
||||||
|
@@ -31,8 +31,10 @@ IMAGEDIR ?= $(shell \
|
|||||||
)
|
)
|
||||||
|
|
||||||
# actual build starter
|
# actual build starter
|
||||||
|
# NB: our output MUST go into stderr to escape POSTPROC
|
||||||
build-image: profile/populate
|
build-image: profile/populate
|
||||||
@if [ -n "$(CHECK)" ]; then \
|
@{ \
|
||||||
|
if [ -n "$(CHECK)" ]; then \
|
||||||
echo "$(TIME) skipping actual image build (CHECK is set)"; \
|
echo "$(TIME) skipping actual image build (CHECK is set)"; \
|
||||||
exit; \
|
exit; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -61,4 +63,5 @@ build-image: profile/populate
|
|||||||
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
|
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
|
||||||
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
|
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
|
||||||
fi; \
|
fi; \
|
||||||
if [ -n "$(BELL)" ]; then echo -ne '\a' >&2; fi
|
if [ -n "$(BELL)" ]; then echo -ne '\a'; fi; \
|
||||||
|
} >&2
|
||||||
|
23
lib/clean.mk
23
lib/clean.mk
@@ -19,19 +19,23 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# ordinary clean: destroys workdirs but not the corresponding results
|
# ordinary clean: destroys workdirs but not the corresponding results
|
||||||
|
# NB: our output MUST go into stderr to escape POSTPROC
|
||||||
clean:
|
clean:
|
||||||
@find -name '*~' -delete >&/dev/null ||:
|
@{ \
|
||||||
@if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
|
find -name '*~' -delete >&/dev/null ||:; \
|
||||||
|
if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
|
||||||
echo "$(TIME) cleaning up $(WARNING)"; \
|
echo "$(TIME) cleaning up $(WARNING)"; \
|
||||||
$(MAKE) -C "$(SYMLINK)" $@ \
|
$(MAKE) -C "$(SYMLINK)" $@ \
|
||||||
GLOBAL_BUILDDIR="$(realpath $(SYMLINK))" $(LOG) ||:; \
|
GLOBAL_BUILDDIR="$(realpath $(SYMLINK))" $(LOG) ||:; \
|
||||||
fi
|
fi; \
|
||||||
|
} >&2
|
||||||
|
|
||||||
# there can be some sense in writing log here even if normally
|
# there can be some sense in writing log here even if normally
|
||||||
# $(BUILDDIR)/ gets purged: make might have failed,
|
# $(BUILDDIR)/ gets purged: make might have failed,
|
||||||
# and BUILDLOG can be specified by hand either
|
# and BUILDLOG can be specified by hand either
|
||||||
distclean: clean
|
distclean: clean
|
||||||
@if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
|
@{ \
|
||||||
|
if [ -L "$(SYMLINK)" -a -d "$(SYMLINK)"/ ]; then \
|
||||||
build="$(realpath $(SYMLINK)/)"; \
|
build="$(realpath $(SYMLINK)/)"; \
|
||||||
if [ "$$build" = / ]; then \
|
if [ "$$build" = / ]; then \
|
||||||
echo "** ERROR: invalid \`"$(SYMLINK)"' symlink" >&2; \
|
echo "** ERROR: invalid \`"$(SYMLINK)"' symlink" >&2; \
|
||||||
@@ -41,16 +45,19 @@ distclean: clean
|
|||||||
GLOBAL_BUILDDIR="$$build" $(LOG) ||: \
|
GLOBAL_BUILDDIR="$$build" $(LOG) ||: \
|
||||||
rm -rf "$$build"; \
|
rm -rf "$$build"; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi; \
|
||||||
@rm -f "$(SYMLINK)"
|
rm -f "$(SYMLINK)"; \
|
||||||
|
} >&2
|
||||||
|
|
||||||
# builddir existing outside read-only metaprofile is less ephemeral
|
# builddir existing outside read-only metaprofile is less ephemeral
|
||||||
# than BUILDDIR is -- usually it's unneeded afterwards so just zap it
|
# than BUILDDIR is -- usually it's unneeded afterwards so just zap it
|
||||||
postclean: build-image
|
postclean: build-image
|
||||||
@if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" ] || \
|
@{ \
|
||||||
|
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" ] || \
|
||||||
[ ! -L "$(SYMLINK)" -a "0$(DEBUG)" -lt 2 ]; then \
|
[ ! -L "$(SYMLINK)" -a "0$(DEBUG)" -lt 2 ]; then \
|
||||||
echo "$(TIME) cleaning up after build"; \
|
echo "$(TIME) cleaning up after build"; \
|
||||||
$(MAKE) -C "$(BUILDDIR)" distclean \
|
$(MAKE) -C "$(BUILDDIR)" distclean \
|
||||||
GLOBAL_BUILDDIR="$(BUILDDIR)" $(LOG) ||:; \
|
GLOBAL_BUILDDIR="$(BUILDDIR)" $(LOG) ||:; \
|
||||||
rm -rf "$(BUILDDIR)"; \
|
rm -rf "$(BUILDDIR)"; \
|
||||||
fi
|
fi; \
|
||||||
|
} >&2
|
||||||
|
@@ -11,12 +11,12 @@ sub/%:
|
|||||||
@$(call add,SUBPROFILES,$(@:sub/%=%))
|
@$(call add,SUBPROFILES,$(@:sub/%=%))
|
||||||
|
|
||||||
# install media bootloader
|
# install media bootloader
|
||||||
boot/%: use/syslinux
|
boot/%:
|
||||||
@$(call set,BOOTLOADER,$*)
|
@$(call set,BOOTLOADER,$*)
|
||||||
|
|
||||||
# fundamental targets
|
# fundamental targets
|
||||||
|
|
||||||
distro/.init: profile/bare
|
distro/.init: profile/bare; @:
|
||||||
|
|
||||||
# NB: the last flavour in KFLAVOURS gets to be the default one;
|
# NB: the last flavour in KFLAVOURS gets to be the default one;
|
||||||
# the kernel packages regexp evaluation has to take place at build stage
|
# the kernel packages regexp evaluation has to take place at build stage
|
||||||
@@ -29,6 +29,6 @@ distro/installer: distro/.base use/install2 use/syslinux/localboot.cfg
|
|||||||
@$(call set,INSTALLER,altlinux-generic)
|
@$(call set,INSTALLER,altlinux-generic)
|
||||||
@$(call set,STAGE1_KMODULES_REGEXP,drm.*) # for KMS
|
@$(call set,STAGE1_KMODULES_REGEXP,drm.*) # for KMS
|
||||||
|
|
||||||
distro/.installer: distro/installer use/bootloader/grub use/repo/main
|
distro/.installer: distro/installer use/bootloader/grub use/repo/main; @:
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
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
|
@@ -34,50 +34,57 @@ CONFIG := $(BUILDDIR)/distcfg.mk
|
|||||||
RC := $(HOME)/.mkimage/profiles.mk
|
RC := $(HOME)/.mkimage/profiles.mk
|
||||||
|
|
||||||
# step 1: initialize the off-tree mkimage profile (BUILDDIR)
|
# step 1: initialize the off-tree mkimage profile (BUILDDIR)
|
||||||
|
# NB: our output MUST go into stderr to escape POSTPROC
|
||||||
profile/init: distclean
|
profile/init: distclean
|
||||||
@if [ "`realpath "$(BUILDDIR)/"`" = / ]; then \
|
@{ \
|
||||||
|
if [ "`realpath "$(BUILDDIR)/"`" = / ]; then \
|
||||||
echo "$(TIME) ERROR: invalid BUILDDIR: \`$(BUILDDIR)'"; \
|
echo "$(TIME) ERROR: invalid BUILDDIR: \`$(BUILDDIR)'"; \
|
||||||
exit 128; \
|
exit 128; \
|
||||||
fi;
|
fi; \
|
||||||
@echo -n "$(TIME) initializing BUILDDIR: "
|
echo -n "$(TIME) initializing BUILDDIR: "; \
|
||||||
@rsync -qaxH --delete-after image.in/ "$(BUILDDIR)"/
|
rsync -qaxH --delete-after image.in/ "$(BUILDDIR)"/; \
|
||||||
@mkdir "$(BUILDDIR)"/.mki # mkimage toplevel marker
|
mkdir "$(BUILDDIR)"/.mki; \
|
||||||
|
} >&2
|
||||||
@$(call put,ifndef DISTCFG_MK)
|
@$(call put,ifndef DISTCFG_MK)
|
||||||
@$(call put,DISTCFG_MK = 1)
|
@$(call put,DISTCFG_MK = 1)
|
||||||
@if type -t git >&/dev/null; then \
|
@{ \
|
||||||
|
if type -t git >&/dev/null; then \
|
||||||
if [ -d .git ]; then \
|
if [ -d .git ]; then \
|
||||||
git show-ref --head -d -s -- HEAD && \
|
git show-ref --head -d -s -- HEAD && \
|
||||||
git status -s && \
|
git status -s && \
|
||||||
echo; \
|
echo; \
|
||||||
fi $(LOG); \
|
fi $(LOG); \
|
||||||
fi
|
fi; \
|
||||||
@{ \
|
{ \
|
||||||
eval `apt-config shell $${APTCONF:+-c=$(wildcard $(APTCONF))} \
|
eval `apt-config shell $${APTCONF:+-c=$(wildcard $(APTCONF))} \
|
||||||
SOURCELIST Dir::Etc::sourcelist/f \
|
SOURCELIST Dir::Etc::sourcelist/f \
|
||||||
SOURCEPARTS Dir::Etc::sourceparts/d`; \
|
SOURCEPARTS Dir::Etc::sourceparts/d`; \
|
||||||
find "$$SOURCEPARTS" -name '*.list' \
|
find "$$SOURCEPARTS" -name '*.list' \
|
||||||
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" && \
|
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" && \
|
||||||
echo; \
|
echo; \
|
||||||
} $(LOG)
|
} $(LOG); \
|
||||||
@if type -t git >&/dev/null; then \
|
if type -t git >&/dev/null; then \
|
||||||
if cd $(BUILDDIR); then \
|
if cd $(BUILDDIR); then \
|
||||||
git init -q && \
|
git init -q && \
|
||||||
git add . && \
|
git add . && \
|
||||||
git commit -qam 'derivative profile initialized'; \
|
git commit -qam 'derivative profile initialized'; \
|
||||||
|
cd ->&/dev/null; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi; \
|
||||||
@if [ -w . ]; then \
|
if [ -w . ]; then \
|
||||||
rm -f "$(SYMLINK)" && \
|
rm -f "$(SYMLINK)" && \
|
||||||
ln -s "$(BUILDDIR)" "$(SYMLINK)" && \
|
ln -s "$(BUILDDIR)" "$(SYMLINK)" && \
|
||||||
echo "$(SYMLINK)/"; \
|
echo "$(SYMLINK)/"; \
|
||||||
else \
|
else \
|
||||||
echo "$(BUILDDIR)/" $(SHORTEN); \
|
echo "$(BUILDDIR)/"; \
|
||||||
fi $(SHORTEN)
|
fi $(SHORTEN); \
|
||||||
|
} >&2
|
||||||
|
|
||||||
profile/bare: profile/init
|
profile/bare: profile/init
|
||||||
@NOTE="$${GLOBAL_VERBOSE:+: $(CONFIG)}"; \
|
@{ \
|
||||||
echo "$(TIME) preparing distro config$$NOTE" \
|
NOTE="$${GLOBAL_VERBOSE:+: $(CONFIG)}"; \
|
||||||
$(SHORTEN)
|
echo "$(TIME) preparing distro config$$NOTE" $(SHORTEN); \
|
||||||
|
} >&2
|
||||||
@$(call try,MKIMAGE_PREFIX,/usr/share/mkimage)
|
@$(call try,MKIMAGE_PREFIX,/usr/share/mkimage)
|
||||||
@$(call try,GLOBAL_VERBOSE,)
|
@$(call try,GLOBAL_VERBOSE,)
|
||||||
@$(call try,IMAGEDIR,$(IMAGEDIR))
|
@$(call try,IMAGEDIR,$(IMAGEDIR))
|
||||||
@@ -106,7 +113,7 @@ profile/dump-vars:
|
|||||||
fi $(LOG)
|
fi $(LOG)
|
||||||
|
|
||||||
# step 3 entry point: copy the needed parts into BUILDDIR
|
# 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 \
|
@for dir in sub.in features.in pkg.in; do \
|
||||||
$(MAKE) -C $$dir $(LOG); \
|
$(MAKE) -C $$dir $(LOG); \
|
||||||
done
|
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
|
@@ -15,4 +15,4 @@ config/name/%:
|
|||||||
@$(call set,IMAGE_NAME,$*)
|
@$(call set,IMAGE_NAME,$*)
|
||||||
|
|
||||||
# the final thing will pull the rest in
|
# the final thing will pull the rest in
|
||||||
build: postclean
|
build: postclean; @:
|
||||||
|
13
main.mk
13
main.mk
@@ -45,17 +45,6 @@ IMAGES := $(DISTROS) $(VES)
|
|||||||
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS)
|
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS)
|
||||||
.PHONY: debug everything help space
|
.PHONY: debug everything help space
|
||||||
|
|
||||||
distro/help:
|
|
||||||
@echo '** available distribution targets:'
|
|
||||||
@echo $(DISTROS) | fmt -sw"$$((COLUMNS>>1))" | column -t
|
|
||||||
|
|
||||||
ve/help:
|
|
||||||
@echo '** available virtual environment targets:'
|
|
||||||
@echo $(VES) | fmt -sw"$$((COLUMNS>>1))" | column -t
|
|
||||||
|
|
||||||
help: | distro/help space ve/help
|
|
||||||
space:; @echo
|
|
||||||
|
|
||||||
### duplicate but still needed
|
### duplicate but still needed
|
||||||
everything:
|
everything:
|
||||||
@n=1; sum=$(words $(DISTROS)); \
|
@n=1; sum=$(words $(DISTROS)); \
|
||||||
@@ -75,7 +64,7 @@ $(IMAGES): debug \
|
|||||||
build; @:
|
build; @:
|
||||||
|
|
||||||
# convenience shortcut
|
# convenience shortcut
|
||||||
$(DISTROS:distro/%=%): %: distro/%
|
$(DISTROS:distro/%=%): %: distro/%; @:
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
ifeq (2,$(DEBUG))
|
ifeq (2,$(DEBUG))
|
||||||
|
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
|
Reference in New Issue
Block a user