forked from altcloud/mkimage-profiles
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a4836609d9 | ||
|
d1922af0dd | ||
|
9eae9d7b15 | ||
|
8be6c2383d | ||
|
e6aa4eccd9 | ||
|
6b0e583843 | ||
|
c83cc111a6 | ||
|
90930184f3 | ||
|
57f7b70900 | ||
|
c7f056412f | ||
|
a958b7450d | ||
|
0d4181bee1 | ||
|
3e30ebdb4a | ||
|
4e28b094e7 | ||
|
71aac4587c | ||
|
efbecbe765 | ||
|
21325bb436 | ||
|
d66d82943c | ||
|
ed9b394951 | ||
|
454e7162f3 | ||
|
0439df3159 | ||
|
7d09fed79b | ||
|
51f5b88062 | ||
|
c20e820ac7 | ||
|
57d31b9c94 | ||
|
1fc86f6e82 |
@@ -1,5 +1,5 @@
|
||||
Name: mkimage-profiles
|
||||
Version: 0.6.4
|
||||
Version: 0.6.6
|
||||
Release: alt1
|
||||
|
||||
Summary: ALT Linux based distribution metaprofile
|
||||
@@ -61,6 +61,13 @@ cp -a * %buildroot%mpdir
|
||||
%doc README QUICKSTART
|
||||
|
||||
%changelog
|
||||
* Mon May 14 2012 Michael Shigorin <mike@altlinux.org> 0.6.6-alt1
|
||||
- build helpers refactored
|
||||
- initial frontend support
|
||||
|
||||
* Mon May 07 2012 Michael Shigorin <mike@altlinux.org> 0.6.5-alt1
|
||||
- branding feature
|
||||
|
||||
* Mon Apr 23 2012 Michael Shigorin <mike@altlinux.org> 0.6.4-alt1
|
||||
- simply better (tm)
|
||||
|
||||
|
6
.gear/tags/2875a11aad94e07a8a7183698f1481cb441e1c6d
Normal file
6
.gear/tags/2875a11aad94e07a8a7183698f1481cb441e1c6d
Normal file
@@ -0,0 +1,6 @@
|
||||
object 57f7b70900d8764dd39eb78b1281769edc971db8
|
||||
type commit
|
||||
tag v0.6.5
|
||||
tagger Michael Shigorin <mike@altlinux.org> 1336421542 +0300
|
||||
|
||||
branding
|
@@ -1,6 +0,0 @@
|
||||
object d190759717b97a39e5d0de0ffb555424d6b1c335
|
||||
type commit
|
||||
tag v0.6.3
|
||||
tagger Michael Shigorin <mike@altlinux.org> 1334001608 +0300
|
||||
|
||||
squash!
|
@@ -1 +1 @@
|
||||
5090c03579f3fc620063211417b18e9a57a0eb8d v0.6.3
|
||||
2875a11aad94e07a8a7183698f1481cb441e1c6d v0.6.5
|
||||
|
9
Makefile
9
Makefile
@@ -23,15 +23,20 @@ endif
|
||||
# recursive make considered useful for m-p
|
||||
MAKE += -r --no-print-directory
|
||||
|
||||
.PHONY: clean distclean help
|
||||
clean distclean help:
|
||||
DIRECT_TARGETS := clean distclean check help help/distro help/ve
|
||||
.PHONY: $(DIRECT_TARGETS)
|
||||
$(DIRECT_TARGETS):
|
||||
@$(MAKE) -f main.mk $@
|
||||
|
||||
export NUM_TARGETS := $(words $(MAKECMDGOALS))
|
||||
|
||||
# for pipefail
|
||||
SHELL = /bin/bash
|
||||
|
||||
# real targets need real work
|
||||
%:
|
||||
@n=1; \
|
||||
set -o pipefail; \
|
||||
say() { echo "$$@" >&2; }; \
|
||||
if [ "$(NUM_TARGETS)" -gt 1 ]; then \
|
||||
n="`echo $(MAKECMDGOALS) \
|
||||
|
@@ -28,11 +28,8 @@ distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo
|
||||
@$(call add,MAIN_PACKAGES,$(pkgs))
|
||||
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
|
||||
|
||||
distro/live-install: distro/.live-base use/syslinux/localboot.cfg
|
||||
@$(call add,LIVE_PACKAGES,live-install)
|
||||
|
||||
distro/.livecd-install: distro/.live-base
|
||||
@$(call add,LIVE_PACKAGES,livecd-install)
|
||||
distro/live-install: distro/.live-base use/live/textinst; @:
|
||||
distro/.livecd-install: distro/.live-base use/live/install; @:
|
||||
|
||||
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
|
||||
distro/live-razorqt: distro/.live-desktop +razorqt; @:
|
||||
@@ -55,6 +52,16 @@ distro/live-flightgear: distro/live-icewm use/live/sound use/x11/3d-proprietary
|
||||
@$(call try,HOMEPAGE,http://www.4p8.com/eric.brasseur/flight_simulator_tutorial.html)
|
||||
|
||||
distro/live-cinnamon: distro/.live-desktop use/live/autologin use/live/ru \
|
||||
use/x11/cinnamon use/x11/3d-free
|
||||
use/x11/cinnamon use/x11/3d-proprietary
|
||||
|
||||
distro/live-enlightenment: distro/.live-desktop use/live/autologin use/live/ru use/x11/3d-free
|
||||
@$(call add,LIVE_PACKAGES,enlightenment)
|
||||
|
||||
distro/live-gimp: distro/live-icewm use/x11/3d-free use/live/ru
|
||||
@$(call add,LIVE_PACKAGES,gimp tintii immix fim)
|
||||
@$(call add,LIVE_PACKAGES,cvltonemap darktable geeqie rawstudio ufraw)
|
||||
@$(call add,LIVE_PACKAGES,macrofusion python-module-pygtk-libglade)
|
||||
@$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync)
|
||||
@$(call add,LIVE_PACKAGES,design-graphics-sisyphus2)
|
||||
|
||||
endif
|
||||
|
@@ -27,7 +27,6 @@ distro/server-ovz: distro/server-mini use/install2/net use/hdt use/rescue \
|
||||
@$(call add,MAIN_KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)
|
||||
@$(call add,MAIN_KMODULES,drbd83 kvm)
|
||||
@$(call add,BASE_LISTS,ovz-server)
|
||||
@$(call add,MAIN_LISTS,kernel-wifi)
|
||||
@$(call add,MAIN_GROUPS,dns-server http-server ftp-server kvm-server)
|
||||
@$(call add,MAIN_GROUPS,ipmi mysql-server dhcp-server mail-server)
|
||||
@$(call add,MAIN_GROUPS,monitoring diag-tools)
|
||||
|
@@ -2,8 +2,10 @@
|
||||
|
||||
ifeq (distro,$(IMAGE_CLASS))
|
||||
|
||||
distro/live-simply: distro/.livecd-install use/isohybrid use/slinux-live use/systemd \
|
||||
use/firmware/wireless use/x11/drm use/x11/3d-proprietary use/syslinux/ui/gfxboot
|
||||
@$(call set,BRANDING,simply-linux)
|
||||
distro/live-simply: distro/.livecd-install use/slinux/full
|
||||
@$(call add,THE_LISTS,slinux/live-install)
|
||||
|
||||
distro/simply: distro/.installer use/slinux/full
|
||||
@$(call set,INSTALLER,desktop)
|
||||
|
||||
endif
|
||||
|
@@ -65,11 +65,9 @@ $(FEATURES):
|
||||
for sub in / $(SUBPROFILES); do \
|
||||
dirtags=; \
|
||||
if [ "$$sub" = / ]; then \
|
||||
parts=lib; \
|
||||
srcdirs="."; \
|
||||
dst="."; \
|
||||
else \
|
||||
parts=; \
|
||||
src="$${sub%/*}"; \
|
||||
dst="$${sub#*/}"; \
|
||||
srcdirs=; \
|
||||
@@ -92,7 +90,7 @@ $(FEATURES):
|
||||
for srcdir in $$srcdirs; do \
|
||||
[ -d "$$srcdir" ] || continue; \
|
||||
pushd "$$srcdir" >&/dev/null; \
|
||||
for part in $$parts {image-,}scripts.d; do \
|
||||
for part in lib {image-,}scripts.d; do \
|
||||
destdir="$(BUILDDIR)/$$dst/$$part"; \
|
||||
[ -d "$$destdir" ] || continue; \
|
||||
if [ "$$sub" = / -a -d "$$part" ]; then \
|
||||
|
3
features.in/branding/README
Normal file
3
features.in/branding/README
Normal file
@@ -0,0 +1,3 @@
|
||||
Эта фича врезается в makefile субпрофилей и обеспечивает
|
||||
добавление задающих внешний вид и сообщения дистрибутива
|
||||
пакетов; см. тж. http://www.altlinux.org/Branding
|
12
features.in/branding/config.mk
Normal file
12
features.in/branding/config.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
use/branding:
|
||||
@$(call add_feature)
|
||||
@### see install2
|
||||
@#$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
|
||||
|
||||
# NB: not every distro might have all the branding of its own
|
||||
use/branding/full: use/branding use/syslinux/ui/gfxboot
|
||||
@$(call add,THE_BRANDING,alterator bootsplash graphics)
|
||||
@$(call add,THE_BRANDING,indexhtml notes slideshow)
|
||||
|
||||
use/branding/complete: use/branding/full
|
||||
@$(call add,INSTALL2_BRANDING,notes slideshow)
|
1
features.in/branding/install2/lib/50branding.mk
Normal file
1
features.in/branding/install2/lib/50branding.mk
Normal file
@@ -0,0 +1 @@
|
||||
IMAGE_PACKAGES_REGEXP += $(call branding,$(INSTALL2_BRANDING))
|
4
features.in/branding/lib/20-branding.mk
Normal file
4
features.in/branding/lib/20-branding.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
# step 4: build the distribution image
|
||||
# NB: this comes just before build-distro.mk
|
||||
|
||||
DOT_BASE += $(call branding,$(THE_BRANDING))
|
1
features.in/branding/live/lib/50branding.mk
Normal file
1
features.in/branding/live/lib/50branding.mk
Normal file
@@ -0,0 +1 @@
|
||||
IMAGE_PACKAGES_REGEXP += $(call branding,$(THE_BRANDING))
|
1
features.in/branding/main/lib/50branding.mk
Normal file
1
features.in/branding/main/lib/50branding.mk
Normal file
@@ -0,0 +1 @@
|
||||
IMAGE_PACKAGES_REGEXP += $(call branding,$(THE_BRANDING))
|
1
features.in/branding/stage1/lib/50branding.mk
Normal file
1
features.in/branding/stage1/lib/50branding.mk
Normal file
@@ -0,0 +1 @@
|
||||
CHROOT_PACKAGES_REGEXP += $(call branding,$(STAGE1_BRANDING))
|
@@ -16,33 +16,14 @@ 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
|
||||
### see also .../pkg.in/lists/Makefile
|
||||
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)
|
||||
|
||||
prep: $(GLOBAL_DEBUG) dot-disk $(METADATA) imagedir
|
||||
|
||||
metadata: dot-base
|
||||
@mkdir -p files/Metadata
|
||||
@rm -f files/Metadata/pkg-groups.tar
|
||||
# see also alterator-pkg (backend3/pkg-install); we only tar up what's up to it
|
||||
@tar -cvf files/Metadata/pkg-groups.tar -C $(PKGDIR) \
|
||||
$$(echo $(call list,$(MAIN_GROUPS) .base) \
|
||||
$(call group,$(MAIN_GROUPS)) \
|
||||
| sed 's,$(PKGDIR)/*,,g')
|
||||
|
||||
dot-base:
|
||||
@p="$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))"; \
|
||||
echo -e "\n## added by build-distro.mk\n$$p" >> $(call list,.base)
|
||||
prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER) imagedir
|
||||
#prep: $(GLOBAL_DEBUG) dot-disk metadata imagedir
|
||||
|
||||
dot-disk:
|
||||
@mkdir -p files/.disk
|
@@ -1,4 +1,5 @@
|
||||
use/install2: use/stage2 sub/stage2/install2 use/cleanup/installer
|
||||
# alterator-based installer, second (livecd) stage
|
||||
use/install2: use/stage2 sub/stage2/install2 use/metadata use/cleanup/installer
|
||||
@$(call add_feature)
|
||||
@$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
|
||||
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)
|
||||
@@ -8,6 +9,10 @@ use/install2: use/stage2 sub/stage2/install2 use/cleanup/installer
|
||||
use/install2/net: use/install2
|
||||
@$(call add,INSTALL2_PACKAGES,curl)
|
||||
|
||||
# modern free xorg drivers for mainstream hardware requires KMS support
|
||||
use/install2/kms:
|
||||
@$(call set,STAGE1_KMODULES_REGEXP,drm.*)
|
||||
|
||||
# see also use/vm/kvm/guest; qxl included in xorg pkglist
|
||||
use/install2/kvm:
|
||||
@$(call add,INSTALL2_PACKAGES,spice-vdagent xorg-drv-qxl)
|
||||
|
4
features.in/kernel/config.mk
Normal file
4
features.in/kernel/config.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
###
|
||||
use/kernel:
|
||||
@$(call add_feature)
|
||||
@$(call set,KFLAVOURS,std-def)
|
4
features.in/kernel/lib/10-kernel.mk
Normal file
4
features.in/kernel/lib/10-kernel.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
# step 4: build the distribution image
|
||||
# take care for kernel bits
|
||||
|
||||
DOT_BASE += $(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))
|
@@ -16,6 +16,14 @@ use/live/desktop: use/live/base use/x11/wacom use/live/sound +vmguest +power
|
||||
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
|
||||
@$(call add,SYSLINUX_CFG,localboot)
|
||||
|
||||
# alterator-based permanent installation
|
||||
use/live/install: use/metadata use/syslinux/localboot.cfg
|
||||
@$(call add,LIVE_PACKAGES,livecd-install)
|
||||
|
||||
# text-based installation script
|
||||
use/live/textinstall: use/syslinux/localboot.cfg
|
||||
@$(call add,LIVE_PACKAGES,live-install)
|
||||
|
||||
# NB: there's an unconditional live/image-scripts.d/40-autologin script
|
||||
# *but* it only configures some of the *existing* means; let's add one
|
||||
# for the cases when there should be no display manager
|
||||
|
@@ -12,3 +12,7 @@ IMAGE_PACKAGES = $(COMMON_PACKAGES) $(THE_PACKAGES) $(LIVE_PACKAGES) \
|
||||
interactivesystem
|
||||
|
||||
MKI_PACK_RESULTS = squash:live
|
||||
|
||||
debug::
|
||||
@echo "** live: IMAGE_PACKAGES: $(IMAGE_PACKAGES)"
|
||||
@echo "** live: IMAGE_PACKAGES_REGEXP: $(IMAGE_PACKAGES_REGEXP)"
|
||||
|
3
features.in/metadata/README
Normal file
3
features.in/metadata/README
Normal file
@@ -0,0 +1,3 @@
|
||||
Эта фича занимается метаданными в составе образов --
|
||||
в первую очередь инсталяционных и пригодных к установке
|
||||
"живых".
|
2
features.in/metadata/config.mk
Normal file
2
features.in/metadata/config.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
use/metadata:
|
||||
@$(call add_feature)
|
37
features.in/metadata/lib/50-metadata.mk
Normal file
37
features.in/metadata/lib/50-metadata.mk
Normal file
@@ -0,0 +1,37 @@
|
||||
# step 4: build the distribution image
|
||||
|
||||
# package lists are needed for installer and live-install images
|
||||
METADIR := files/Metadata
|
||||
|
||||
# preparation targets of ../../build-distro/lib/build-distro.mk
|
||||
WHATEVER += metadata
|
||||
|
||||
# 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)
|
||||
|
||||
# BASE_PACKAGES, BASE_LISTS and whatever else goes into base install;
|
||||
# thus construct requisite .base packagelist for alterator-pkg
|
||||
metadata-.base:
|
||||
@cd $(call list,/); \
|
||||
{ \
|
||||
echo "## generated by features.in/metadata/lib/metadata.mk"; \
|
||||
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
|
||||
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
|
||||
if [ -n "$(DOT_BASE)" ]; then \
|
||||
echo -e "\n## DOT_BASE\n$(DOT_BASE)"; \
|
||||
fi; \
|
||||
} | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' > .base
|
||||
|
||||
# see also alterator-pkg (backend3/pkg-install);
|
||||
# we only tar up what's up to it
|
||||
metadata: metadata-.base
|
||||
@mkdir -p $(METADIR); \
|
||||
tar -C $(PKGDIR) -cvf - \
|
||||
$(call rlist,$(MAIN_GROUPS) .base) \
|
||||
$(call rgroup,$(MAIN_GROUPS)) \
|
||||
> $(METADIR)/pkg-groups.tar
|
@@ -1,5 +1,7 @@
|
||||
use/slinux: use/x11/xfce use/x11/gdm2.20
|
||||
@$(call add_feature)
|
||||
@$(call set,BRANDING,simply-linux)
|
||||
@$(call add,THE_BRANDING,menu xfce-settings)
|
||||
@$(call add,THE_LISTS,gnome-p2p)
|
||||
@$(call add,THE_LISTS,slinux/$(ARCH))
|
||||
@$(call add,THE_LISTS,slinux/games)
|
||||
@@ -11,7 +13,8 @@ use/slinux: use/x11/xfce use/x11/gdm2.20
|
||||
@$(call add,THE_LISTS,slinux/network)
|
||||
@$(call add,THE_LISTS,slinux/xfce)
|
||||
@$(call add,THE_LISTS,$(call tags,base l10n))
|
||||
@$(call add,THE_PACKAGES,apt-conf-sisyphus)
|
||||
|
||||
use/slinux-live: use/slinux
|
||||
@$(call add,THE_LISTS,slinux/live-install)
|
||||
use/slinux/full: use/isohybrid use/slinux use/systemd \
|
||||
use/firmware/wireless use/branding/complete \
|
||||
use/x11/drm use/x11/3d-proprietary
|
||||
@$(call add,THE_PACKAGES,apt-conf-sisyphus)
|
||||
|
@@ -1,38 +1,29 @@
|
||||
#!/bin/sh -x
|
||||
#!/bin/sh
|
||||
# see also m-p-d::profiles/live/image-scripts.d/init3-services
|
||||
|
||||
SYSTEMCTL=/bin/systemctl
|
||||
CHKCONFIG=/sbin/chkconfig
|
||||
#[ -x /bin/systemctl ] || exit 0
|
||||
#[ -x /bin/systemctl ] || exit 0
|
||||
|
||||
turn_on() {
|
||||
if [ -x $SYSTEMCTL ]; then
|
||||
$SYSTEMCTL enable ${*}.service
|
||||
else if [ -x $CHKCONFIG ]; then
|
||||
$CHKCONFIG $* on
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
ENABLE="
|
||||
network
|
||||
NetworkManager
|
||||
lvm2-monitor
|
||||
mdadm
|
||||
"
|
||||
|
||||
turn_off() {
|
||||
if [ -x $SYSTEMCTL ]; then
|
||||
$SYSTEMCTL disable ${*}.service
|
||||
else if [ -x $CHKCONFIG ]; then
|
||||
$CHKCONFIG $* off
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
# NB: dnsmasq: https://bugzilla.altlinux.org/show_bug.cgi?id=18799
|
||||
# NB: sshd might be needed for some particular cases
|
||||
DISABLE="
|
||||
sshd
|
||||
"
|
||||
|
||||
SERVICES_TO_ENABLE="NetworkManager"
|
||||
SERVICES_TO_DISABLE=
|
||||
|
||||
for i in $SERVICES_TO_ENABLE; do
|
||||
turn_on $i;
|
||||
for i in $ENABLE; do
|
||||
[ -x /bin/systemctl ] && /bin/systemctl enable ${i}.service
|
||||
[ -x /sbin/chkconfig ] && /sbin/chkconfig $i on
|
||||
done
|
||||
|
||||
for i in $SERVICES_TO_DISABLE; do
|
||||
turn_off $i;
|
||||
for i in $DISABLE; do
|
||||
[ -x /bin/systemctl ] && /bin/systemctl disable ${i}.service
|
||||
[ -x /sbin/chkconfig ] && /sbin/chkconfig $i off
|
||||
done
|
||||
:
|
||||
|
@@ -9,7 +9,7 @@ use/syslinux/ui/%: use/syslinux
|
||||
@$(call set,SYSLINUX_UI,$*)
|
||||
@if [ "$*" == gfxboot ]; then \
|
||||
$(call add,STAGE1_PACKAGES,gfxboot); \
|
||||
$(call add,STAGE1_PACKAGES,branding-$$(BRANDING)-bootloader); \
|
||||
$(call add,STAGE1_BRANDING,bootloader); \
|
||||
fi
|
||||
|
||||
# modules and config snippets just add up
|
||||
|
@@ -5,11 +5,13 @@ PKGDIR := $(GLOBAL_BUILDDIR)/pkg
|
||||
ARCH ?= $(shell arch | sed 's/i686/i586/')
|
||||
DATE ?= $(shell date +%Y%m%d)
|
||||
|
||||
# prefix pkglist name with its directory to form a path
|
||||
list = $(1:%=$(PKGDIR)/lists/%)
|
||||
# prefix pkglist name with its directory to form a path (relative/absolute)
|
||||
rlist = $(1:%=lists/%)
|
||||
list = $(addprefix $(PKGDIR)/,$(call rlist,$(1)))
|
||||
|
||||
# prefix/suffix group name to form a path
|
||||
group = $(1:%=$(PKGDIR)/groups/%.directory)
|
||||
# prefix/suffix group name to form a path (relative/absolute)
|
||||
rgroup = $(1:%=groups/%.directory)
|
||||
group = $(addprefix $(PKGDIR)/,$(call rgroup,$(1)))
|
||||
|
||||
# map first argument (a function) onto second one (an argument list)
|
||||
map = $(foreach a,$(2),$(call $(1),$(a)))
|
||||
@@ -19,5 +21,9 @@ NULL :=
|
||||
SPACE := $(NULL) # the officially documented way of getting a space
|
||||
|
||||
list2re = $(subst $(SPACE),|,$(strip $(1)))
|
||||
|
||||
# args: KMODULES, KFLAVOURS
|
||||
kpackages = ^kernel-(image|modules-($(call list2re,$(1))))-($(call list2re,$(2)))$$
|
||||
|
||||
# arg: branding subpackages
|
||||
branding = ^branding-$(BRANDING)-($(call list2re,$(1)))$$
|
||||
|
@@ -2,7 +2,8 @@
|
||||
ANSI_OK ?= 1;32
|
||||
ANSI_FAIL ?= 1;31
|
||||
|
||||
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (Stop|failed)\.))$$
|
||||
MAX_ERRORS = 3
|
||||
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (conflicts|Depends:) .*)|(.* (Stop|failed)\.))$$
|
||||
|
||||
ifndef MKIMAGE_PROFILES
|
||||
$(error this makefile is designed to be included in toplevel one)
|
||||
@@ -51,7 +52,9 @@ build-image: profile/populate
|
||||
tail -200 "$(BUILDLOG)" $(SHORTEN) \
|
||||
| GREP_COLOR="$(ANSI_OK)" GREP_OPTIONS="--color=auto" \
|
||||
grep '^\*\* image: .*$$' ||:; \
|
||||
RETVAL=0; \
|
||||
else \
|
||||
RETVAL=$$?; \
|
||||
echo -n "$(TIME) failed, see log"; \
|
||||
if [ -z "$(DEBUG)" ]; then \
|
||||
echo ": $(BUILDLOG)" $(SHORTEN); \
|
||||
@@ -61,9 +64,10 @@ build-image: profile/populate
|
||||
fi; \
|
||||
tail -200 "$(BUILDLOG)" \
|
||||
| GREP_COLOR="$(ANSI_FAIL)" GREP_OPTIONS="--color=auto" \
|
||||
egrep "$(GOTCHA)"; \
|
||||
egrep -m "$(MAX_ERRORS)" "$(GOTCHA)"; \
|
||||
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
|
||||
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
|
||||
fi; \
|
||||
if [ -n "$(BELL)" ]; then echo -ne '\a'; fi; \
|
||||
exit $$RETVAL; \
|
||||
} >&2
|
||||
|
11
lib/check.mk
Normal file
11
lib/check.mk
Normal file
@@ -0,0 +1,11 @@
|
||||
ifndef MKIMAGE_PROFILES
|
||||
$(error this makefile is designed to be included in toplevel one)
|
||||
endif
|
||||
|
||||
check:
|
||||
@find sub.in features.in \
|
||||
-path '*scripts.d/*' \
|
||||
\! \( -perm 755 -o -name .gitignore \) \
|
||||
| while read line; do \
|
||||
echo "chmod 755 $$line"; \
|
||||
done
|
@@ -53,7 +53,7 @@ distclean: clean
|
||||
# than BUILDDIR is -- usually it's unneeded afterwards so just zap it
|
||||
postclean: build-image
|
||||
@{ \
|
||||
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" ] || \
|
||||
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" -a -z "$(__frontend)" ] ||\
|
||||
[ ! -L "$(SYMLINK)" -a "0$(DEBUG)" -lt 2 ]; then \
|
||||
echo "$(TIME) cleaning up after build"; \
|
||||
$(MAKE) -C "$(BUILDDIR)" distclean \
|
||||
|
@@ -23,18 +23,16 @@ distro/.init: profile/bare
|
||||
|
||||
# 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)
|
||||
distro/.base: distro/.init use/kernel
|
||||
@$(call set,META_SYSTEM_ID,LINUX)
|
||||
@$(call set,META_VOL_ID,ALT Linux $(ARCH))
|
||||
@$(call set,META_VOL_ID,ALT Linux $(IMAGE_NAME)/$(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
|
||||
distro/installer: distro/.base use/install2 use/install2/kvm \
|
||||
use/syslinux/localboot.cfg
|
||||
distro/installer: distro/.base use/syslinux/localboot.cfg \
|
||||
use/install2 use/install2/kms use/install2/kvm
|
||||
@$(call set,INSTALLER,altlinux-generic)
|
||||
@$(call set,STAGE1_KMODULES_REGEXP,drm.*) # for KMS
|
||||
|
||||
distro/.installer: distro/installer use/bootloader/grub use/repo/main; @:
|
||||
|
||||
|
16
lib/help.mk
16
lib/help.mk
@@ -1,8 +1,20 @@
|
||||
# this makefile holds the most helpful bits for the toplevel one
|
||||
|
||||
ifdef __frontend
|
||||
define help_body
|
||||
@for i in $(2); do echo $$i; done
|
||||
endef
|
||||
else
|
||||
define help_body
|
||||
@echo '** available $(1) targets:'; \
|
||||
columnize $(2)
|
||||
endef
|
||||
endif
|
||||
|
||||
help = $(and $(2),$(help_body))
|
||||
|
||||
help/distro:
|
||||
@echo '** available distribution targets:'; \
|
||||
columnize $(sort $(DISTROS:distro/%=%))
|
||||
$(call help,distribution,$(sort $(DISTROS:distro/%=%)))
|
||||
|
||||
help/ve:
|
||||
@echo '** available virtual environment targets:'; \
|
||||
|
@@ -18,13 +18,6 @@ include $(BUILDDIR)/distcfg.mk
|
||||
SUFFIX := pkg/lists
|
||||
TARGET := $(BUILDDIR)/$(SUFFIX)
|
||||
|
||||
# Metadata/ needed only for installers (and not for e.g. syslinux.iso)
|
||||
# FIXME: installable live needs it too, don't move to install2 feature
|
||||
### see also .../features.in/build-distro/lib/build-distro.mk
|
||||
ifneq (,$(findstring install2,$(FEATURES)))
|
||||
DOTBASE := dot-base
|
||||
endif
|
||||
|
||||
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
|
||||
@if type -t git >&/dev/null && cd $(TARGET); then \
|
||||
if [ -n "`git status -s`" ]; then \
|
||||
@@ -47,23 +40,6 @@ copy-groups:
|
||||
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)
|
||||
|
||||
# BASE_PACKAGES, BASE_LISTS and whatever else goes into base install
|
||||
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)
|
||||
|
@@ -20,23 +20,6 @@ gdm2.20-help
|
||||
ntfsprogs-
|
||||
driconf-
|
||||
|
||||
# Branding things
|
||||
branding-simply-linux-xfce-settings
|
||||
branding-simply-linux-menu
|
||||
branding-simply-linux-alterator
|
||||
branding-sisyphus-server-light-alterator-
|
||||
|
||||
#branding-simply-linux-bootloader
|
||||
#branding-simply-linux-bootsplash
|
||||
branding-simply-linux-graphics
|
||||
branding-simply-linux-indexhtml
|
||||
branding-simply-linux-notes
|
||||
#branding-simply-linux-release
|
||||
branding-simply-linux-slideshow
|
||||
|
||||
|
||||
#added through use/syslinux/gfx... ?
|
||||
#branding-simply-linux-bootloader
|
||||
gdm-theme-simply
|
||||
|
||||
kde4libs-
|
||||
@@ -122,3 +105,7 @@ libreoffice-langpack-ru
|
||||
evince
|
||||
stardict-gtk
|
||||
stardict-mueller7
|
||||
|
||||
# disks
|
||||
lvm2
|
||||
mdadm
|
||||
|
34
reports.mk
34
reports.mk
@@ -6,7 +6,7 @@ include lib/common.mk
|
||||
|
||||
BUILDDIR := $(shell sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' "$(REPORT_PATH)")
|
||||
BUILDLOG := $(BUILDDIR)/$(BUILD_LOG)
|
||||
REPORTDIR := $(BUILDDIR)/reports/
|
||||
REPORTDIR := $(BUILDDIR)/reports
|
||||
IMAGE_OUTPATH := $(shell sed -n 's/^IMAGE_OUTPATH = \(.*\)/\1/p' $(BUILDLOG))
|
||||
|
||||
# for a multi-image build there's no sense to refer to buildroot
|
||||
@@ -16,31 +16,39 @@ SHORTEN := >/dev/null
|
||||
endif
|
||||
|
||||
all: reports/targets reports/scripts
|
||||
@cp -a $(REPORTDIR) $(IMAGE_OUTPATH).reports
|
||||
@if [ -n "$(IMAGE_OUTPATH)" ]; then \
|
||||
cp -a $(REPORTDIR) $(IMAGE_OUTPATH).reports; \
|
||||
fi
|
||||
|
||||
reports/prep:
|
||||
@mkdir -p "$(REPORTDIR)"
|
||||
|
||||
reports/scripts: reports/prep
|
||||
@grep "^mki.*scripts: Run: " $(BUILDLOG) \
|
||||
| sed -rn "s,^.*($(BUILDDIR)|$(SYMLINK))/(.*)'$$,\2,p" \
|
||||
> "$(REPORTDIR)/$*.log" \
|
||||
&& echo "** scripts report: $(BUILDDIR)/$(@F).log" $(SHORTEN)
|
||||
@OUT="$(REPORTDIR)/$(@F).log"; \
|
||||
grep "^mki.*scripts: Run: " $(BUILDLOG) \
|
||||
| sed -rn "s,^.*($(BUILDDIR)|$(SYMLINK))/(.*)'$$,\2,p" > "$$OUT" \
|
||||
&& if [ -s "$$OUT" ]; then \
|
||||
echo "** scripts report: $$OUT" $(SHORTEN); \
|
||||
fi
|
||||
|
||||
reports/targets: reports/prep
|
||||
@if ! [ -n "$(REPORT_PATH)" -a -s "$(REPORT_PATH)" ]; then \
|
||||
exit 0; \
|
||||
fi; \
|
||||
if type -t dot >&/dev/null; then \
|
||||
REPORT_IMAGE="$(BUILDDIR)/$@.png"; \
|
||||
OUT="$(REPORTDIR)/$(@F).png"; \
|
||||
report-targets < "$(REPORT_PATH)" \
|
||||
| dot -Tpng -o "$$REPORT_IMAGE" \
|
||||
&& echo "** target graph report: $$REPORT_IMAGE"; \
|
||||
| dot -Tpng -o "$$OUT" \
|
||||
&& if [ -s "$$OUT" ]; then \
|
||||
echo "** target graph report: $$OUT"; \
|
||||
fi; \
|
||||
else \
|
||||
REPORT_DOT="$(BUILDDIR)/targets.dot"; \
|
||||
report-targets < "$(REPORT_PATH)" > "$$REPORT_DOT" \
|
||||
&& echo "** graphviz missing, " \
|
||||
"target graph dot file: $$REPORT_DOT"; \
|
||||
OUT="$(BUILDDIR)/targets.dot"; \
|
||||
report-targets < "$(REPORT_PATH)" > "$$OUT" \
|
||||
&& if [ -s "$$OUT" ]; then \
|
||||
echo "** graphviz missing, " \
|
||||
"target graph dot file: $$OUT"; \
|
||||
fi; \
|
||||
fi $(SHORTEN); \
|
||||
mv "$(REPORT_PATH)" "$(REPORTDIR)/$(@F).log"
|
||||
|
||||
|
@@ -28,6 +28,8 @@ IMAGE_PACKAGES = $(call map,list, \
|
||||
$(SYSTEM_PACKAGES) $(COMMON_PACKAGES) \
|
||||
$(THE_PACKAGES) $(BASE_PACKAGES) $(MAIN_PACKAGES)
|
||||
|
||||
-include lib/*.mk
|
||||
|
||||
MKI_DESTDIR = ALTLinux/RPMS.main
|
||||
MKI_PACK_RESULTS = data
|
||||
|
||||
|
@@ -41,6 +41,8 @@ CHROOT_PACKAGES = $(STAGE1_PACKAGES) $(SYSTEM_PACKAGES)
|
||||
# pass for use/stage2
|
||||
GLOBAL_SQUASHFS := $(SQUASHFS)
|
||||
|
||||
-include lib/*.mk
|
||||
|
||||
# scripts prepare bootloader configuration, too
|
||||
# NB: we pass tested squashfs options for ../stage2/Makefile to include
|
||||
all: | debug prepare-workdir copy-tree run-scripts $(BUILD_PROPAGATOR) \
|
||||
|
@@ -36,6 +36,8 @@ IMAGE_PACKAGES_REGEXP += $(call kpackages, \
|
||||
$(STAGE1_KMODULES) $(STAGE2_KMODULES), \
|
||||
$(STAGE1_KFLAVOUR))
|
||||
|
||||
-include lib/*.mk
|
||||
|
||||
# see also scripts.d/99-elf-stats
|
||||
ifdef GLOBAL_SQUASHFS_SORT
|
||||
ifeq (tight,$(SQUASHFS))
|
||||
|
Reference in New Issue
Block a user