Compare commits

...

33 Commits

Author SHA1 Message Date
Michael Shigorin
ae85287f97 0.5.1-alt1
- generic VE archive type (added cpio and xz either)
- minor additions/fixes
2011-12-02 20:08:17 +02:00
Michael Shigorin
8790a90cee pkgdups.sh and semi-random tagged pkglists shuffle
The bin/pkgdups.sh script comes from m-p-d in considerably optimized
form and is to be used with the pkglist files of interest passed
as its arguments to produce a "hall of duplicates" among those.

The tagged lists received some updates along the rescue image lines,
most of those are actually inspired by http://rescuecd.pld-linux.org/
and to lesser extent a few articles on rescue/recovery/forensics
software -- so some newcomers are even employed already.
2011-12-02 20:02:55 +02:00
Michael Shigorin
5bc3dc24dd repo: generate RPM-GPG-KEY as well
Just a hook to export alt-gpgkeys pubring data.
2011-12-02 17:46:04 +02:00
Michael Shigorin
3a5740d840 initial virtualbox feature
This sketch quickly pulls virtualbox guest additions in
the installed system; should probably be extended with
other VM support...
2011-12-02 17:46:04 +02:00
Michael Shigorin
e9fea01685 live tweaks for x11 rescue
New stuff:
* distro/live-icewm -- basic icewm livecd with autologin;
* distro/live-rescue -- yet another gparted^Wrescue CD.

A better part of base+rescue tagged pkglist split off into
extra+rescue where the content belongs.

Thanks ruslandh@ for proposing to do a graphical rescue with some
particular tools (albeit qt4-fsarchiver clearly needs more work).
2011-12-02 17:46:04 +02:00
Michael Shigorin
cd998fef41 initial live autologin
use/live/autologin target tries hard to configure any available
autologin means, including a dedicated package and a few DMs.

Thanks gns@ as liveflash.eeepc got robbed somewhat.
2011-12-02 17:46:04 +02:00
Michael Shigorin
3d982dabba conf/live.mk: minor refactoring
distro/live-builder target used to employ a few duplicated
packages that might make it to a list but as the list would
have only a single user so far these were moved to a target-
specific variable (hm, weird but "private" modifier broke).
2011-12-02 17:45:41 +02:00
Michael Shigorin
a543c9d5fb conf.d/README: minor clarification
COMMON_PACKAGES make it into basesystem like BASE_PACKAGES,
not just into RPMS.main like MAIN_PACKAGES.
2011-11-25 09:31:11 +02:00
Michael Shigorin
f9a8aaa4e0 spec: updated Url:
It's official now.
2011-11-24 22:23:10 +02:00
Michael Shigorin
7e78670e4b added support for cpio and xz
Actually this is the proper rewrite that was looming ever since
tgz support was introduced: there are multiple archive formats
supported by mkimage, and there are multiple compression methods
available as well.

So the bullet got bitten yet again along with the "goal parser"
which should be more straightforward by now.

Thanks dkr@ and mithraen@ for the inspiration of this evening.
2011-11-24 22:19:32 +02:00
Michael Shigorin
041d57542a Makefile: get help back up
Partially reverts "Makefile: presume a distro by default" commit:
plain `make' should better help the user to decide the target
rather than rush to build them all upon her.
2011-11-24 22:09:15 +02:00
Michael Shigorin
7e219c14f1 lib/distro.mk: don't do localboot by default
distro/.base target used to pull in localboot syslinux config
snippet which might be too early for some of the further distros;
it's a quite fragile equilibrium which was shifted a bit by imz@
(see #26606).  Feel free to reopen the discussion though, things
might be tweaked so that localboot might be desirable on almost
every image even if with lower priority...
2011-11-24 15:44:19 +02:00
Michael Shigorin
bc8251f3f8 features.in/syslinux: bump livecd boot priority
As noted by imz@ in #26608, a LiveCD is the more preferred
boot target to a local drive usually (just as was discussed
and implemented for ALT Linux 4.0 IIRC).
2011-11-24 13:11:17 +02:00
Michael Shigorin
3d78fd75e4 introduced live-install support
It was actually trivial given that the script was already
maintained as a package by enp@ and msp@; its usage requires
one to manually partition the target disk and optionally
mkswap in advance.
2011-11-24 13:11:16 +02:00
Michael Shigorin
4f6e1af23b features.in/power: use installer-feature-cpufreq
This tweak follows zerg@'s question whether it's possible
to employ i-f-cpufreq-stage3 (which pulls in cpufreq-simple too
but also tweaks the default governor for AMD CPUs as recommended
by kernel folks); see also this discussion:
http://lists.altlinux.org/pipermail/community/2011-November/thread.html#673459
2011-11-22 14:49:25 +02:00
Michael Shigorin
9626b284ef gear-store-tags 2011-11-21 14:26:54 +02:00
Michael Shigorin
48272c7119 0.5.0-alt1
- add_feature for autoregistration (simple but invasive)
- added features: isomd5sum, repo, systemd
- changed features: powerbutton -> power
2011-11-21 14:25:43 +02:00
Michael Shigorin
10b9e293b0 Makefile: presume a distro by default
When ve/ support was introduced, a simple "make icewm.iso"
had to turn into the more elaborate "make distro/icewm.iso".
This latter one involves several keystrokes more, which is
not even (environ)mentally friendly.

This was supposed to get fixed somewhere down the road with
a fallback but the elegance of IMAGE_* setup waterfall barred
me from tweaking IMAGE_TARGET at once (and the downstream fixup
would imply re-tweaking the consequent variables as well which
is blatantly anti-mkimage-profilic being a brute fork).

OTOH testing for a "directory" part of the goal is going to
either deadlock on IMAGE_CLASS or duplicate its assignment.

So now when I've had enough typing an extra "distro/",
I'm going to just bite the bullet and tweak IMAGE_TARGET
with a test duplicating IMAGE_CLASS assignment indeed
(testing for e.g. "/" results in a different test,
which would be worse yet).

Please suggest a more elegant solution if you invent one!
2011-11-21 14:25:06 +02:00
Michael Shigorin
b52ff4ef91 lib/build.mk: different colours for different outcomes
As was (quite reasonably) asked by someone and me too,
why should a successful build yield a *red* line
(a grep's default)?

So now it's new and improved, 25% free and so forth:
with a successful build you get a green line, while
errors from a broke one result in red ones.

Clinically tested in both b/w and w/b colour schemes;
in case you're not satisfied, please return original
ANSI_OK and ANSI_FAIL values to the colour dealer
and pass your favourite ones instead.
2011-11-21 13:52:41 +02:00
Michael Shigorin
ad68750855 experimental server-ovz-netinst image
It's now possible to:
- make distro/server-ovz.iso;
- make distro/server-ovz-netinst.iso;
- publish the former image's contents on ftp.linux.kiev.ua;
- boot the latter (~17M) image and enjoy the netinstall ;-)

The catch is that the stage2 (altinst file) location has to be
hardwired into syslinux config snippet for things to happen
automatically -- even if it can be specified manually in case
of failure.

The other catch is that currently a netinstall image is somewhat
tied to the particular image it installs since stage1 kernel and
stage2 modules must correspond strictly (the typical symptoms of
the glitch would be missing mouse driver and weird "permission
denied" errors during an attempt to partition the hard drives).

It might be desirable to provide multi-distro netinstall image...
2011-11-19 22:05:11 +02:00
Michael Shigorin
9cedefdba9 introduced add_feature function
The features might get copy-pasted (or even copied-and-pruned)
when initialized; there's an unneccessary duplication of the
function name in the line adding it to FEATURES list, thus
prone to being forgotten and causing some havoc later on.

It was wrong in the first place but tackling this with some
double-colon rules ran into terminality issues, and further
tortures were considered unneccessary.

The current solution isn't perfect (no completely transparent
function name registration upon corresponding target being called)
but at least it is an improvement...
2011-11-19 11:47:29 +02:00
Michael Shigorin
781c98bb3d server-ovz: rebase onto server-mini
The culprit was missing dhcpcd, although the rest
of niceties already in server-mini were welcome to
server-ovz either.
2011-11-19 11:47:19 +02:00
Michael Shigorin
c4a5515b64 tagged scripts breakage partially fixed
It appears that features.in/Makefile functioned a bit
differently by now than was described back then: after
loops and pushds got rearranged for robustness, it stopped
to pick up a cleanup feature tagged script.

That particular script is now better de-tagged and simply
placed as a script to be merged into install2 subprofile.

The tagged scripts still require a bit more comprehension
to understand the use cases (e.g., do we need per-subprofile
tagged script subdirs or just a toplevel one should be looked
at, with script names telling where to put them).

README used to mix up subprofiles and features; fixed.
2011-11-19 11:45:59 +02:00
Michael Shigorin
ae7139f8b6 initial repo feature
We've got some parts of it in build-distro feature,
and some went to dev feature for no real reason.

But a bare installer might go without package base,
and LiveCDs other than live-builder might find local
repository useful given aufs2 root overlay.

Now the overall scheme is more straightforward:
- a distro:
  + asks that a package repo be included
  + cares to further add the packages to it
- a repo feature:
  + pulls in sub/main for it to happen
  + provides genbasedir script to create repo metadata
  + supplements live feature with repo configuration
2011-11-19 11:45:59 +02:00
Michael Shigorin
7964bccb92 initial systemd feature
Thanks shaba@ for both the package and a wiki page,
and dek@ for the inspiration to finally get to it.
2011-11-19 11:45:50 +02:00
Michael Shigorin
7110ba77de minor pkglist/docs tweaks
server-base += openssh-slients
xorg += xorg-drv-wizardpen
2011-11-13 00:37:45 +02:00
Michael Shigorin
52f6897318 initial isomd5sum feature
This is a base for "media check" to become available:
using this feature will implant a checksum into the image
so that it can be verified during install.

Also added a test/demo distro/live-isomd5sum target.
For real distros an alterator module is probably due.
2011-11-11 19:50:54 +02:00
Michael Shigorin
f257b8e9df stage1/modules: added sdhci
This might be needed to install onto an SD card in a "native"
(non-USB-mediated) SD/MMC cardreader; thanks Vladimir Karpinsky
and gns@ for going over it for liveflash.eeepc case.
2011-11-09 21:20:53 +02:00
Michael Shigorin
94d2ca36aa image.in/Makefile: phonytize targets
It is a current convention to prefer clearly phony targets
(see the wiki page) so let's follow it here too.
2011-11-09 21:16:45 +02:00
Michael Shigorin
b85d82c219 features.in/power: renamed++ from powerbutton
This feature was handling powersave already, so the name
should be changed already.  Thanks sem@ for cpufreq-simple,
there's now a compelling reason for that rename.

Tweaked a few distro recipes accordingly.
2011-11-09 17:56:05 +02:00
Michael Shigorin
e2eef6eb71 gear-store-tags 2011-11-08 00:10:48 +02:00
Michael Shigorin
6782808223 0.4.3.2-alt1
- mkimage version required/checked
2011-11-08 00:08:30 +02:00
Michael Shigorin
7a8ac9e7e0 image.in/Makefile: mkimage version check
There's a recommended version (0.2.0+ currently) and also
the minimal version, 0.1.7, which received the important fixes.
It was proposed by nice antique@ folks IIRC.

Unfortunately the "suboptimal version" warning is pretty modest,
and "minimal version" error will be apparent with DEBUG enabled;
still the latter will terminate the downstream build and leave
a clear message in build.log at any rate.
2011-11-08 00:07:38 +02:00
84 changed files with 592 additions and 319 deletions

View File

@@ -1,18 +1,19 @@
Name: mkimage-profiles
Version: 0.4.3.1
Version: 0.5.1
Release: alt1
Summary: ALT Linux based distribution metaprofile
License: GPLv2+
Group: Development/Other
Url: http://www.altlinux.org/Mkimage/Profiles/next
Url: http://www.altlinux.org/Mkimage/Profiles/m-p
Source: %name-%version.tar
Packager: Michael Shigorin <mike@altlinux.org>
BuildArch: noarch
Requires: rsync git-core
Requires: time schedutils
Requires: mkimage >= 0.2.0
%define mpdir %_datadir/%name
%add_findreq_skiplist %mpdir/*.in/*
@@ -58,6 +59,18 @@ cp -a * %buildroot%mpdir
%doc README QUICKSTART
%changelog
* Fri Dec 02 2011 Michael Shigorin <mike@altlinux.org> 0.5.1-alt1
- generic VE archive type (added cpio and xz either)
- minor additions/fixes
* Mon Nov 21 2011 Michael Shigorin <mike@altlinux.org> 0.5.0-alt1
- add_feature for autoregistration (simple but invasive)
- added features: isomd5sum, repo, systemd
- changed features: powerbutton -> power
* Tue Nov 08 2011 Michael Shigorin <mike@altlinux.org> 0.4.3.2-alt1
- mkimage version required/checked
* Mon Nov 07 2011 Michael Shigorin <mike@altlinux.org> 0.4.3.1-alt1
- CLEAN by default unless DEBUG

View File

@@ -0,0 +1,6 @@
object 48272c7119328f0c68142087edba1494c6442cbc
type commit
tag v0.5.0
tagger Michael Shigorin <mike@altlinux.org> 1321878408 +0200
add_feature

View File

@@ -1,6 +0,0 @@
object a91acf3de735965e0b32ab3edfc633c543f7dd3e
type commit
tag v0.4.3
tagger Michael Shigorin <mike@altlinux.org> 1320617277 +0200
graduate tweaks

View File

@@ -1 +1 @@
cfd4133492d16bfd2fc31a83d5df43f78fb15da1 v0.4.3
851085a67914bd2f9470cf81f552b06a9b98d83d v0.5.0

View File

@@ -6,17 +6,25 @@
# --- in BUILDDIR
# 4. build subprofiles and subsequently an image
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))# distro/server-base.iso
IMAGE_CONF := $(basename $(MAKECMDGOALS))# distro/server-base
IMAGE_CLASS := $(dir $(IMAGE_TARGET))# distro/ (let's fix it)
IMAGE_CLASS := $(IMAGE_CLASS:%/=%)# distro
IMAGE_FILE := $(notdir $(IMAGE_TARGET))# server-base.iso
IMAGE_NAME := $(basename $(IMAGE_FILE))# server-base
IMAGE_TYPE := $(suffix $(IMAGE_FILE))# .iso (fix this too)
IMAGE_TYPE := $(IMAGE_TYPE:.%=%)# iso
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
# preferences
-include $(HOME)/.mkimage/profiles.mk
@@ -27,22 +35,15 @@ 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)
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)
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)
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
### suboptimal but at least clear, reliable and convenient
all:
@n=1; sum=$(words $(DISTROS)); \
@@ -63,6 +64,9 @@ $(IMAGES): debug \
config/pack/$(IMAGE_TYPE) \
build; @:
# convenience shortcut
$(DISTROS:distro/%=%): %: distro/%
debug:
ifeq (2,$(DEBUG))
@$(foreach v,\

3
README
View File

@@ -47,8 +47,7 @@ Most docs are in Russian, welcome to learn it or ask for English.
+ законченные блоки функциональности (или наборы таковых)
+ описываются в индивидуальных features.in/*/config.mk
+ могут требовать другие фичи, а также субпрофили
+ при сборке $(BUILDDIR) содержимое указанных в $(FEATURES) фич
добавляется в профиль с постобработкой (generate.*)
+ при сборке $(BUILDDIR) содержимое фич добавляется в профиль
- списки пакетов (*_LISTS):
+ просьба по возможности избегать дублирования
- индивидуальные пакеты (*_PACKAGES): см. тж. conf.d/README

20
bin/pkgdups.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
# a script to help weed out duplicate packages
# contained in package lists given as arguments
#
# Requires: libshell
. /bin/shell-quote
sort "$@" \
| grep -v '^ *#' \
| sed -s 's,[ ]\+, ,g' \
| grep -v '^ *$' \
| uniq -cd \
| while read num str; do
echo -n "$str: $num ";
pattern="`quote_sed_regexp "$str"`"
grep -l "^$pattern$" "$@" | tr '\n' ' '
echo
done \
| sort -rn -t: -k2

View File

@@ -15,7 +15,8 @@
во все стадии, в том числе в образ чувствительной к объёму install2
(в stage1 -- только в инструментальный чрут); применяйте для того,
что обязано быть и в инсталяторе, и в готовой системе;
* для "обычного общего" (main, live, rescue) есть COMMON_PACKAGES.
* для "обычного общего" (main, live, rescue) есть COMMON_PACKAGES
(NB: попадают в базовую систему).
По подстановкам:
* $(VAR) подставляются перед их записью в $(CONFIG), который distcfg.mk;

View File

@@ -1,13 +1,15 @@
# desktop distributions
ifeq (distro,$(IMAGE_CLASS))
distro/desktop-base: distro/installer sub/main \
distro/desktop-base: distro/installer use/repo/main \
use/syslinux/ui-vesamenu use/x11/xorg use/bootloader/grub
distro/icewm: distro/desktop-base \
use/lowmem use/x11/xdm use/x11/runlevel5 \
use/bootloader/lilo use/powerbutton/acpi \
use/bootloader/lilo use/power/acpi/button \
use/cleanup/alterator
@$(call add,BASE_LISTS,$(call tags,icewm desktop))
distro/desktop-systemd: distro/icewm use/systemd
endif

View File

@@ -1,21 +1,31 @@
# live images
ifeq (distro,$(IMAGE_CLASS))
distro/live: distro/.base use/live/base
distro/rescue: distro/.base use/rescue 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/live: distro/.base use/live/base use/power/acpi/cpufreq
distro/live-systemd: distro/.base use/live/base use/systemd
distro/live-install: distro/.base use/live/install use/syslinux/localboot.cfg
distro/live-icewm: distro/live use/live/icewm
distro/live-builder: distro/.base sub/main \
use/live/base use/dev/mkimage
distro/live-rescue: distro/live-icewm
@$(call add,LIVE_LISTS,$(call tags,rescue && (live || x11)))
@$(call add,LIVE_LISTS, \
$(call tags,(base || extra) && (archive || rescue || network)))
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
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
@$(call add,LIVE_PACKAGES,livecd-tmpfs livecd-online-repo)
@$(call add,LIVE_PACKAGES,mkimage-profiles)
@$(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,livecd-tmpfs livecd-online-repo)
@$(call add,MAIN_PACKAGES,mkimage-profiles)
@$(call add,MAIN_PACKAGES,$(pkgs))
endif

View File

@@ -1,7 +1,7 @@
# server distributions
ifeq (distro,$(IMAGE_CLASS))
distro/server-base: distro/installer sub/main \
distro/server-base: distro/installer use/repo/main \
use/syslinux/ui-menu use/memtest use/bootloader/grub
@$(call add,BASE_LISTS,server-base)
@@ -12,19 +12,25 @@ distro/server-mini: distro/server-base use/cleanup/x11-alterator
$(call tags,base && (server || network || security || pkg)))
@$(call add,BASE_LISTS,$(call tags,extra network))
distro/server-ovz: distro/server-base \
use/hdt use/rescue use/firmware/server use/powerbutton/acpi \
use/cleanup/x11-alterator
distro/server-systemd: distro/server-mini use/systemd
distro/server-ovz: distro/server-mini \
use/hdt use/rescue use/firmware/server use/power/acpi/button
@$(call set,STAGE1_KFLAVOUR,std-def)
@$(call set,KFLAVOURS,std-def ovz-el)
@$(call add,KMODULES,bcmwl e1000e igb ndiswrapper rtl8168 rtl8192)
@$(call add,KMODULES,bcmwl ndiswrapper rtl8168 rtl8192)
@$(call add,KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)
@$(call add,KMODULES,drbd83 kvm)
@$(call add,INSTALL2_PACKAGES,curl) ### should become curl-mini
@$(call add,BASE_LISTS,ovz-server)
@$(call add,BASE_LISTS,$(call tags,base 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)
# tiny network-only server-ovz installer (stage2 comes over net too)
distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
use/syslinux/ui-menu use/syslinux/localboot.cfg use/memtest
@$(call add,SYSLINUX_CFG,netinstall2)
endif

View File

@@ -9,5 +9,5 @@
# for somewhat more involved example, see syslinux feature
use/00example: sub/main use/anotherfeature
@$(call add,FEATURES,00example)
@$(call add_feature)
@$(call add,MAIN_PACKAGES,hello)

View File

@@ -24,9 +24,6 @@ include $(BUILDDIR)/distcfg.mk
# -- then both src/ and dst/ can hold the addons;
# still both pieces go into a single destination
### {image-,}scripts.d/ get rsynced twice :-/
### still we don't want the trimmed-down case
### sorry for somewhat complicated and overly long lines
all:
@echo "** starting feature configuration"
@@ -40,33 +37,50 @@ all:
fi; \
pushd "$$feat" >/dev/null && \
for sub in / $(SUBPROFILES); do \
src="$${sub%/*}"; \
dst="$${sub#*/}"; \
if [ -d "$$src" ]; then \
rsync -qab "$$src/" "$(BUILDDIR)/$$dst/"; \
dirtags="&& $$src"; \
fi; \
if [ -d "$$dst" ]; then \
rsync -qab "$$dst/" "$(BUILDDIR)/$$dst/"; \
if [ "$$dst" != "$$src" ]; then \
dirtags=; \
if [ "$$sub" = / ]; then \
parts=lib; \
srcdirs="."; \
dst="."; \
else \
parts=; \
src="$${sub%/*}"; \
dst="$${sub#*/}"; \
srcdirs=; \
if [ -d "$$src" ]; then \
srcdirs="$$src"; \
dirtags="&& $$src"; \
fi; \
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
srcdirs="$$srcdirs $$dst"; \
dirtags="&& ($$src || $$dst)"; \
fi; \
for srcdir in $$srcdirs; do \
rsync -qab --exclude tagged \
"$$srcdir/" "$(BUILDDIR)/$$dst/"; \
done; \
fi; \
for dir in lib {image-,}scripts.d; do \
destdir="$(BUILDDIR)/$$dst/$$dir/"; \
if [ -d "$$destdir" ]; then \
if [ -d "$$dir" ]; then \
rsync -qab "$$dir/" "$$destdir/"; \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
echo "** src=[$$src] dst=[$$dst] srcdirs=[$$srcdirs]"; \
fi; \
for srcdir in $$srcdirs; do \
[ -d "$$srcdir" ] || continue; \
pushd "$$srcdir" >&/dev/null; \
for part in $$parts {image-,}scripts.d; do \
destdir="$(BUILDDIR)/$$dst/$$part"; \
[ -d "$$destdir" ] || continue; \
if [ "$$sub" = / -a -d "$$part" ]; then \
rsync -qab "$$part/" "$$destdir/"; \
fi; \
if [ -d "tagged/$$dir" ]; then \
if pushd "tagged/$$dir" >/dev/null; then \
echo "$$feat $$dirtags" \
| tags2lists . \
| xargs -r cp -vpLt "$$destdir" --; \
popd >/dev/null; \
fi; \
fi; \
fi; \
[ -d "tagged/$$part" ] || continue; \
[ "$$srcdir" != "." ] || continue; \
pushd "tagged/$$part" >/dev/null; \
echo "$$feat $$dirtags" \
| tags2lists . \
| xargs -r cp -vpLt "$$destdir" --; \
popd >/dev/null; \
done; \
popd >&/dev/null; \
done; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/$$dst/" >/dev/null; then \

View File

@@ -7,15 +7,16 @@
в ../Makefile; он может описывать одну или более целей
вида use/*, дополняющих конфигурацию, и при наличии
дополнительных хуков для копирования или generate.*
должен добавить имя фичи в $(FEATURES).
обязан добавить имя фичи в $(FEATURES), для чего
создана функция add_feature без аргументов.
На этапе генерации сборочного профиля фичи рассматриваются
после инициализации профиля (см. ../image.in/) и копирования
субпрофилей (см. ../sub.in/). Для каждой фичи, указанной
в $(FEATURES), копируются подкаталоги сообразно субпрофилям,
а также производится обработка {tagged/,}{image-},scripts.d/
(см. cleanup/ в качестве примера); затем выполняется скрипт
generate.sh и задействуется generate.mk (при их наличии).
а также производится обработка {tagged/,}{image-,}scripts.d/;
затем выполняется скрипт generate.sh и задействуется generate.mk
(при их наличии).
NB: тегированные скрипты являются экспериментальными,
возможны недоработки и существенные изменения!
@@ -29,9 +30,3 @@ generate.sh и задействуется generate.mk (при их наличи
Несложный пример содержится в 00example/, более близкий к жизни
и нынешним пределам возможностей метапрофиля -- в syslinux/.
Основные фичи для построения дистрибутивных образов:
- stage1: propagator, ядро инсталятора и initrd в т.ч. с firmware
- stage2: базовый live-образ (и модули ядра, соответствующие stage1);
используется фичами install2, live, rescue
- main: пакетная база

View File

@@ -1,2 +1,2 @@
use/build-distro: boot/isolinux
@$(call add,FEATURES,build-distro)
@$(call add_feature)

View File

@@ -4,8 +4,6 @@
# take the latter part
SUBDIRS = $(notdir $(SUBPROFILES))
# "main" subprofile needs genbasedir
CHROOT_PACKAGES = apt-utils
BOOT_TYPE = isolinux
# Metadata/ needed only for installers (and not for e.g. syslinux.iso)
@@ -17,7 +15,7 @@ endif
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: $(GLOBAL_DEBUG) dot-disk $(METADATA) $(IMAGEDIR)
prep: $(GLOBAL_DEBUG) dot-disk $(METADATA) imagedir
metadata: dot-base
@mkdir -p files/Metadata

View File

@@ -1,40 +0,0 @@
#!/bin/sh
# FIXME: bring to common style
verbose()
{
[ -z "$GLOBAL_VERBOSE" ] ||
echo >&2 "HOOK: 01-genbasedir: $*"
}
verbose started
[ -d "$WORKDIR/ALTLinux" ] || exit 0
cd "$WORKDIR/ALTLinux"
comps="$(find -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' |
sed 's/^RPMS\.//')"
verbose "comps=$comps"
[ -n "$comps" ] || exit 1
genbasedir \
--topdir="$WORKDIR" \
--architecture="$INFO_ARCH" \
--no-oldhashfile \
--partial \
--xz \
--bz2 \
--create \
--notautomatic=false \
${INFO_NAME:+--archive="$INFO_NAME"} \
${INFO_VERSION:+--version="$INFO_VERSION"} \
${INFO_ORIGIN:+--origin="$INFO_ORIGIN"} \
${INFO_LABEL:+--label="$INFO_LABEL"} \
ALTLinux $comps
### drop this when genbasedir is fixed (--no-uncompressed)
for comp in $comps; do rm -f base/{pkg,src}list.$comp; done
verbose finished

View File

@@ -1,2 +1,2 @@
use/build-ve:
@$(call add,FEATURES,build-ve)
@$(call add_feature)

View File

@@ -1,6 +1,12 @@
# step 4: build the virtual environment image
ifeq (tar,$(IMAGE_PACKTYPE))
MKI_TAR_COMPRESS = $(IMAGE_COMPRESS)
endif
ifeq (cpio,$(IMAGE_PACKTYPE))
MKI_CPIO_COMPRESS = $(IMAGE_COMPRESS)
endif
IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
$(SYSTEM_PACKAGES) \
@@ -9,3 +15,5 @@ IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: imagedir

View File

@@ -1,5 +1,5 @@
use/cleanup:
@$(call add,FEATURES,cleanup)
@$(call add_feature)
use/cleanup/installer: use/cleanup
@$(call add,CLEANUP_PACKAGES,'installer-*')

View File

@@ -1,11 +1,11 @@
#!/bin/sh -efu
# create a postinstall script to drop temporarily needed packages
### create a postinstall script to drop temporarily needed packages
if [ -n "$GLOBAL_VERBOSE" ]; then
echo "** GLOBAL_CLEANUP_PACKAGES: $GLOBAL_CLEANUP_PACKAGES"
fi >&2
SCRIPT="/usr/share/install2/postinstall.d/01+install2+cleanup"
SCRIPT="/usr/share/install2/postinstall.d/01-remove-pkgs"
cat > "$SCRIPT" << EOF
#!/bin/sh -efu

View File

@@ -1,5 +1,5 @@
use/dev:
@$(call add,FEATURES,dev)
@$(call add_feature)
@$(call add,COMMON_PACKAGES,git-core hasher gear)
use/dev/mkimage: use/dev

View File

@@ -1,9 +0,0 @@
#!/bin/sh -efu
# configure local image repository provided by sub/main
# TODO: some integration with sub/main to ensure that it is there
{
echo "# for real stuff you'll need full repo, see apt-repo"
echo "rpm file:/image ALTLinux main"
} > /etc/apt/sources.list.d/cdrom.list

View File

@@ -1,5 +1,5 @@
use/dos: use/syslinux
@$(call add,FEATURES,dos)
@$(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)

View File

@@ -1,4 +1,4 @@
use/hdt: use/syslinux use/memtest
@$(call add,FEATURES,hdt)
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,pciids)
@$(call add,SYSLINUX_MODULES,hdt)

View File

@@ -1,5 +1,5 @@
use/install2: use/stage2 sub/stage2/install2 use/cleanup/installer
@$(call add,FEATURES,install2)
@$(call add_feature)
@$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)
@$(call add,MAIN_PACKAGES,branding-$$(BRANDING)-release)

View File

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

View File

@@ -0,0 +1,3 @@
use/isomd5sum:
@$(call add_feature)
@$(call add,POSTPROCESS_TARGETS,isomd5sum)

View File

@@ -0,0 +1,4 @@
CHROOT_PACKAGES += isomd5sum
postprocess-isomd5sum:
@implantisomd5 "$(IMAGEDIR)/$(IMAGE_OUTFILE)"

View File

@@ -1,9 +1,18 @@
use/live: use/stage2 sub/stage2/live
@$(call add,FEATURES,live)
@$(call add_feature)
use/live/base: use/live use/syslinux/ui-menu
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
use/live/icewm: use/live/base
@$(call add,LIVE_LISTS,\
# 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/base
@$(call add,LIVE_PACKAGES,autologin xinit)
use/live/icewm: use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || icewm)))
# this is a manual installation script (text-based)
use/live/install: use/live/base
@$(call add,LIVE_PACKAGES,live-install)

View File

@@ -0,0 +1,34 @@
#!/bin/sh -ef
USER=altlinux
# setup runlevel
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
subst "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
# autologin^2
if [ -x /usr/sbin/autologin ]; then
cat << E_O_F >> /etc/sysconfig/autologin
USER=$USER
AUTOLOGIN=yes
E_O_F
fi
# gdm2 autologin
GDM_CONF=/etc/X11/gdm/custom.conf
if [ -f "$GDM_CONF" ]; then
sed -i -e '/\[daemon\]/aAutomaticLoginEnable=true\nAutomaticLogin='$USER \
"$GDM_CONF"
fi
# kdm3 autologin
# TODO: iterate over kdm{,4} if feasible
KDMRC=/etc/X11/kdm/kdmrc
if [ -f "$KDMRC" ]; then
sed -i \
-e '/AutoLoginEnable/ s,^.*$,AutoLoginEnable=true,' \
-e '/AutoLoginUser/ s,^.*$,AutoLoginUser='$USER',' \
"$KDMRC"
fi

View File

@@ -1,4 +1,4 @@
use/lowmem: use/install2
@$(call add,FEATURES,lowmem)
@$(call add_feature)
# TODO: http://www.altlinux.org/Branding/slideshow => disable?
# also installer-feature-rm-slideshow

View File

@@ -1,4 +1,4 @@
use/memtest: use/syslinux
@$(call add,FEATURES,memtest)
@$(call add_feature)
@$(call add,SYSTEM_PACKAGES,memtest86+)
@$(call add,SYSLINUX_CFG,memtest)

View File

@@ -1,3 +1,4 @@
Эта фича определяет формат упаковки создаваемого образа.
На данный момент поддерживаются iso (загрузочный ISO9660
для дистрибутивов) и tar/tgz (виртуальные окружения).
для дистрибутивов) и tar/cpio с возможностью сжатия gz/xz
(виртуальные окружения).

View File

@@ -1,8 +1,7 @@
DISTRO_EXTS := .iso
VE_EXTS := .tar .tgz
use/pack:
@$(call add,FEATURES,pack)
@$(call add_feature)
use/pack/iso: use/pack boot/isolinux
ifeq (distro,$(IMAGE_CLASS))
@@ -11,8 +10,25 @@ else
@$(call set,IMAGE_PACKTYPE,isodata)
endif
use/pack/tar: use/pack
@$(call set,IMAGE_PACKTYPE,tar)
VE_ARCHIVES := tar cpio
VE_COMPRESSORS := gz xz# there's no sense in bzip2 by now
VE_ZIPS := $(call addsuffices, \
$(addprefix .,$(VE_COMPRESSORS)), \
$(VE_ARCHIVES))# tar.gz cpio.xz ...
VE_EXTS := $(sort $(addprefix .,$(VE_ARCHIVES) $(VE_ZIPS)))# .tar .tar.gz ...
use/pack/tgz: use/pack/tar
@$(call set,IMAGE_COMPRESS,gzip)
# generate rules for archive/compressor combinations
define PACK_containers
use/pack/$(1): use/pack
@$$(call set,IMAGE_PACKTYPE,$(1))
endef
define PACK_compressors
use/pack/$(1).$(2): use/pack/$(1)
@$$(call set,IMAGE_COMPRESS,$(2))
endef
$(foreach c,$(VE_ARCHIVES), \
$(eval $(call PACK_containers,$(c))) \
$(foreach z,$(VE_COMPRESSORS), \
$(eval $(call PACK_compressors,$(c),$(z)))))

6
features.in/power/README Normal file
View File

@@ -0,0 +1,6 @@
Эта фича конфигурирует поддержку управления питанием
-- выключение и регулировку частоты CPU для ACPI,
засыпание для APM (не проверялось).
TODO: учесть изложенное в https://bugzilla.altlinux.org/25018
(для gnome & co)

View File

@@ -0,0 +1,21 @@
# common
# TODO: invent multi-target scripts and integrate that 08-powerbutton
use/power:
@$(call add,COMMON_PACKAGES,installer-feature-powerbutton-stage3)
# modern power management
use/power/acpi: use/power
@$(call add,COMMON_PACKAGES,acpid)
use/power/acpi/button: use/power/acpi
@$(call add,COMMON_PACKAGES,acpid-events-power)
use/power/acpi/cpufreq: use/power/acpi
@$(call add,COMMON_PACKAGES,installer-feature-cpufreq-stage3)
use/power/acpi/powersave: use/power/acpi
@$(call add,COMMON_PACKAGES,powersave)
# legacy power management
use/power/apm: use/power
@$(call add,COMMON_PACKAGES,apmd)

View File

@@ -1,4 +0,0 @@
Эта фича конфигурирует поддержку управления кнопкой питания
-- выключение для ACPI, засыпание для APM (не проверялось).
TODO: учесть изложенное в https://bugzilla.altlinux.org/25018

View File

@@ -1,14 +0,0 @@
# common
use/powerbutton:
@$(call add,COMMON_PACKAGES,installer-feature-powerbutton-stage3)
# modern power management
use/powerbutton/acpi: use/powerbutton
@$(call add,COMMON_PACKAGES,acpid acpid-events-power)
use/powerbutton/powersave: use/powerbutton/acpi
@$(call add,COMMON_PACKAGES,powersave)
# legacy power management
use/powerbutton/apm: use/powerbutton
@$(call add,COMMON_PACKAGES,apmd)

8
features.in/repo/README Normal file
View File

@@ -0,0 +1,8 @@
Эта фича предназначена для конфигурирования репозиториев
в образе, включая генерацию хэшей и подключение к LiveCD.
На данный момент единственным таким репозиторием является
RPMS.main (создаваемый sub/main), но возможно добавление
addons, updates или иных по мере необходимости.
Результат -- каталог ALTLinux/base/ для копирования в образ.

View File

@@ -0,0 +1,5 @@
use/repo:
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,gnupg)
use/repo/main: sub/main use/repo

View File

@@ -0,0 +1,2 @@
# ../scripts.d/01-genbasedir needs that
CHROOT_PACKAGES += apt-utils

View File

@@ -0,0 +1,10 @@
#!/bin/sh -efu
# configure package repository of the image (provided by sub/main);
# this script will be run iff both live and repo features are used
DIR=/etc/apt/sources.list.d
mkdir -p $DIR && {
echo "# for real stuff you'll need full repo, see apt-repo"
echo "rpm file:/image ALTLinux main"
} > $DIR/main.list

View File

@@ -0,0 +1,28 @@
#!/bin/sh -efu
PREFIX=ALTLinux
cd "$WORKDIR/$PREFIX"
COMPS="$(find -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' |
sed 's/^RPMS\.//')"
[ -z "$GLOBAL_VERBOSE" ] || echo "** COMPS=$COMPS" >&2
[ -n "$COMPS" ] || exit 1
genbasedir \
--topdir="$WORKDIR" \
--no-oldhashfile \
--partial \
--xz \
--bz2 \
--create \
--notautomatic=false \
${INFO_ARCH:+--architecture="$INFO_ARCH"} \
${INFO_NAME:+--archive="$INFO_NAME"} \
${INFO_VERSION:+--version="$INFO_VERSION"} \
${INFO_ORIGIN:+--origin="$INFO_ORIGIN"} \
${INFO_LABEL:+--label="$INFO_LABEL"} \
$PREFIX $COMPS
### drop this when genbasedir is fixed (--no-uncompressed)
for c in $COMPS; do rm -f base/{pkg,src}list.$c; done

View File

@@ -0,0 +1,4 @@
#!/bin/sh
# generate current plaintext rpm pubring representation
gpg --export --armor --homedir=/usr/lib/alt-gpgkeys >$WORKDIR/RPM-GPG-KEY

View File

@@ -1,4 +1,4 @@
use/rescue: use/stage2 sub/stage2/rescue
@$(call add,FEATURES,rescue)
@$(call add,RESCUE_LISTS,$(call tags,base && (rescue || network)))
@$(call add,RESCUE_LISTS,$(call tags,extra network))
@$(call add_feature)
@$(call add,RESCUE_LISTS, \
$(call tags,(base || extra) && (rescue || network)))

View File

@@ -4,8 +4,10 @@
mv -f -- /etc/inittab.rescue /etc/inittab
# enable NFS mounts
chkconfig rpcbind on
sed -i 's,#\(RPCBIND_ARGS="-l".*\),\1,' /etc/sysconfig/rpcbind
if [ -x /etc/rc.d/init.d/rpcbind ]; then
chkconfig rpcbind on
sed -i 's,#\(RPCBIND_ARGS="-l".*\),\1,' /etc/sysconfig/rpcbind
fi
# remove unwanted startup scripts
find /etc/rc.d/rc{2,3,4,5}.d/ -type l -name 'S*' \

View File

@@ -1,6 +1,6 @@
# "1" is not a typo
use/stage2: sub/stage1
@$(call add,FEATURES,stage2)
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,file make-initrd make-initrd-propagator)
# NB: sub/stage2 isn't used standalone but rather

View File

@@ -0,0 +1,6 @@
label linux
menu label Install server-ovz via internet
kernel alt0/vmlinuz
append initrd=alt0/full.cz ramdisk_size=131072 vga=0x314 quiet=1 showopts automatic=method:http,network:dhcp,server:ftp.linux.kiev.ua,directory:/pub/Linux/ALT/people/mike/iso/mkimage-profiles/netinst/server-ovz/x86_64
### ramdisk_size=@altinst_size@
### $(IMAGE_NAME)

View File

@@ -1,6 +1,6 @@
# default is plain text prompt
use/syslinux: sub/stage1
@$(call add,FEATURES,syslinux)
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,syslinux)
# UI is overwritten

View File

@@ -0,0 +1,3 @@
Эта фича заменяет в базовой системе sysvinit на systemd;
в настоящее время является экспериментальной, читайте
http://www.altlinux.org/systemd

View File

@@ -0,0 +1,4 @@
use/systemd:
@$(call add_feature)
@$(call add,COMMON_PACKAGES,systemd systemd-units systemd-sysvinit)
@$(call add,COMMON_PACKAGES,installer-feature-systemd-stage3)

View File

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

View File

@@ -0,0 +1,4 @@
use/virtualbox/guest:
@$(call add_feature)
@$(call add,KMODULES,virtualbox-addition)
@$(call add,BASE_PACKAGES,virtualbox-guest-additions)

View File

@@ -4,10 +4,23 @@ GLOBAL_BUILDDIR ?= $(shell pwd)
CURRENT_LINK := mkimage-profiles
OUT_LINK := out
# there were mkimage fixes induced by mkimage-profile development
MKI_VER_MINIMAL = 0.1.7
MKI_VER_OPTIMAL = 0.2.0
include distcfg.mk
include functions.mk
include $(MKIMAGE_PREFIX)/config.mk
ifeq (-,$(shell rpmvercmp $(MKI_VERSION) $(MKI_VER_MINIMAL) | tr -d [0-9]))
$(info error: mkimage-$(MKI_VERSION) is too old, please upgrade)
$(error mkimage is too old, $(MKI_VER_MINIMAL) is minimal supported version)
endif
ifeq (-,$(shell rpmvercmp $(MKI_VERSION) $(MKI_VER_OPTIMAL) | tr -d [0-9]))
$(info warning: mkimage-$(MKI_VERSION) is suboptimal, consider upgrading)
$(warning consider upgrading mkimage to $(MKI_VER_OPTIMAL) or better)
endif
# reconstruct instead of passing yet another variable
IMAGE_LINK := $(IMAGE_NAME).$(IMAGE_TYPE)
IMAGE_OUTFILE := $(IMAGE_NAME)-$(DATE)-$(ARCH).$(IMAGE_TYPE)
@@ -27,12 +40,14 @@ include $(MKIMAGE_PREFIX)/targets.mk
# specified only for the final image (target-specific)
pack-image: OUTDIR = $(IMAGEDIR)
pack-image: $(IMAGEDIR)
pack-image: imagedir
$(IMAGEDIR):
.PHONY: imagedir postprocess debug
imagedir:
@mkdir -p "$(IMAGEDIR)"
postprocess:
postprocess: $(addprefix postprocess-,$(POSTPROCESS_TARGETS))
@OUTPATH="$(IMAGEDIR)/$(IMAGE_OUTFILE)"; \
echo "** image: $$OUTPATH" >&2 && \
ln -sf "$(IMAGE_OUTFILE)" "$(IMAGEDIR)/$(IMAGE_LINK)" && \

View File

@@ -7,11 +7,12 @@
Соответственно для сборки требуется или features.in/build-distro,
или use/build-ve.
Пакетная база рабочего чрута минимальна; apt-utils включены
ради genbasedir, который после завершения первоначального
наполнения субпрофилей может переехать в ../sub.in/main/ (TODO).
Пакетная база рабочего чрута минимальна (может чуть расширяться
фичами -- см. ../features.in/repo/lib/build-genbasedir.mk
в качестве примера).
Если требуется какая-либо иная обработка чрута, следует
предпочитать scripts.d/.
предпочитать scripts.d/ -- для универсальной обработки
скрипт можно добавить здесь, для специфичной -- в фичу.
Результат -- готовый образ в $(IMAGEDIR)/.

View File

@@ -1,4 +1,6 @@
# step 4 is kicked off here but actually done by image.in/Makefile
ANSI_OK ?= 1;32
ANSI_FAIL ?= 1;31
ifndef MKIMAGE_PROFILES
$(error this makefile is designed to be included in toplevel one)
@@ -25,6 +27,7 @@ IMAGEDIR ?= $(shell [ -d "$$HOME/out" -a -w "$$HOME/out" ] \
&& echo "$$HOME/out" \
|| echo "$(BUILDDIR)/out" )
# poehali
build: profile/populate
@echo -n "$(TIME) starting image build"
@if [ -n "$(DEBUG)" ]; then \
@@ -39,13 +42,16 @@ build: profile/populate
@if $(START) $(MAKE) -C $(BUILDDIR)/ $(LOG); then \
echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \
tail -200 "$(BUILDLOG)" \
| grep --color=always '^\*\* image: .*' $(SHORTEN) ||:; \
| GREP_COLOR="$(ANSI_OK)" \
grep --color=always '^\*\* image: .*' $(SHORTEN) ||:; \
else \
echo "$(TIME) failed, see log: $(BUILDLOG)" $(SHORTEN); \
if [ -z "$(DEBUG)" ]; then \
echo "$(TIME) (you might want to re-run with DEBUG=1)"; \
fi; \
tail -200 "$(BUILDLOG)" | egrep "^(E:|[Ee]rror|[Ww]arning).*"; \
tail -200 "$(BUILDLOG)" \
| GREP_COLOR="$(ANSI_FAIL)" \
egrep --color=always "^(E:|[Ee]rror|[Ww]arning).*"; \
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
fi

View File

@@ -20,7 +20,7 @@ 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 use/syslinux/localboot.cfg
distro/.base: distro/.init
@$(call set,KFLAVOURS,std-def)
# bootloader test target
@@ -30,7 +30,7 @@ distro/syslinux: distro/.init \
# something marginally useful (as a network-only installer)
# NB: doesn't carry stage3 thus cannot use/bootloader
distro/installer: distro/.base use/install2
distro/installer: distro/.base use/install2 use/syslinux/localboot.cfg
@$(call set,INSTALLER,altlinux-generic)
@$(call set,STAGE1_KMODULES_REGEXP,drm.*) # for KMS

View File

@@ -42,6 +42,9 @@ define log_body
grep -q '^# $@$$' "$(CONFIG)" || printf '# %s\n' '$@' >> "$(CONFIG)"; }
endef
# in a use/feature/particularly target, we need a "feature" bit
add_feature = $(call add,FEATURES,$(word 2,$(subst /, ,$@)))
# convert tag list into a list of relative package list paths
# NB: tags can do boolean expressions: (tag1 && !(tag2 || tag3))
tags = $(and $(strip $(1)),$(addprefix tagged/,$(shell echo "$(1)" | bin/tags2lists pkg.in/lists/tagged)))

View File

@@ -5,5 +5,6 @@ sfdisk
mdadm
openssh-server
openssh-clients
openssh-blacklist
acpid

View File

@@ -2,7 +2,7 @@
реализация (tags2lists) требует, чтобы каждый из тегов был
отдельным словом, состоящим из символов из набора a-zA-Z0-9_
(внимание: не используйте в слове "-"); рекомендуется
разделять слова "+" или "," (стандарт ещё не устоялся).
разделять слова "+".
Предположительное применение: дополнение функциональности,
заданной статически (наследственно или явно), факультативным

View File

@@ -0,0 +1,6 @@
bzip2
cpio
gzip
tar
xz
zip

View File

@@ -0,0 +1,30 @@
#gzrt
lzip
lzop
p7zip
pax
rzip
star
unrar
unzip
xar
# parallel (de)compression
lbzip2
pbzip2
pigz
plzip
pxz
# legacy
arj
cabextract
ha
lha
mscompress
nomarch
ncompress
unace
unarj
unzoo
uudeview

View File

@@ -0,0 +1,5 @@
ckermit
lrzsz
minicom
picocom
sredird

View File

@@ -1,6 +0,0 @@
# compression
cpio
p7zip
tar
unzip
zip

View File

@@ -18,109 +18,3 @@ man-pages
sysfsutils
sysklogd
util-linux
# CPU utils
cpuburn
x86info
# Disk utils
bonnie++
cfdisk
ddrescue
disktype
evms
evms-ncurses
gpart
hdparm
lvm2
mdadm
ms-sys
parted
sdparm
sfdisk
smartmontools
testdisk
mtools
partimage
# Applications
binutils
dmidecode
hexedit
pciutils
procps
quota
shadow-suite
sharutils
time
openssl
# Applications/Archiving
arj
bzip2
gzip
unrar
unzip
zip
# Applications/Editors
vim-console
# Applications/File
findutils
file
less
mtools
# Filesystem utils
dosfstools
e2fsprogs
jfsprogs
ntfs-3g
recover
recoverdm
reiserfsprogs
xfsprogs
btrfs-progs
ext3grep
# Applications/Networking
arpwatch
elinks
hostinfo
iftop
iproute2
iptables
iputils
lftp
mailx
netcat
netlist
nfs-utils
ngrep
nmap
openssh-clients
openssh-server
p0f
postfix
rsync
scanssh
#stunnel
tcpdump
tcptraceroute
telnet
traceroute
wget
whois
# Applications/Shells
zsh
ash
bash
bc
gpm
mc
# Development/Debuggers
strace
sysstat

View File

@@ -0,0 +1,3 @@
flawfinder
rats
valgrind

View File

@@ -0,0 +1,3 @@
httperf
nepim

View File

@@ -0,0 +1,4 @@
aircrack-ng
#kismet*
macchanger
tcptrace

View File

@@ -0,0 +1,99 @@
# CPU utils
cpuburn
x86info
# Disk utils
bonnie++
cfdisk
ddrescue
disktype
evms
evms-ncurses
fdisk
gpart
hdparm
lvm2
mdadm
ms-sys
parted
sdparm
sfdisk
smartmontools
testdisk
mtools
partimage
# Applications
binutils
dmidecode
gnupg
hexedit
pciutils
procps
quota
shadow-suite
sharutils
time
openssl
# Applications/Editors
vim-console
# Applications/File
findutils
file
less
# Filesystem utils
dosfstools
e2fsprogs
jfsprogs
ntfs-3g
recover
recoverdm
reiserfsprogs
xfsprogs
btrfs-progs
ext3grep
# Applications/Networking
arpwatch
elinks
hostinfo
iftop
iproute2
iptables
iputils
lftp
mailx
netcat
netlist
nfs-utils
ngrep
nmap
openssh-clients
openssh-server
p0f
postfix
rsync
scanssh
#stunnel
tcpdump
tcptraceroute
telnet
traceroute
wget
whois
# Applications/Shells
zsh
ash
bash
bc
gpm
mc
# Development/Debuggers
strace
sysstat

View File

@@ -0,0 +1,8 @@
cpipe
dar
ddrescue
foremost
ntfsprogs
sleuthkit
xfsdump
#zfs-fuse

View File

@@ -1,5 +1,3 @@
fdisk
parted
mdadm
rsync
etcnet-full

View File

@@ -0,0 +1,3 @@
fsarchiver
qt4-fsarchiver
gparted

View File

@@ -0,0 +1,9 @@
apg
#chkrootkit
dcfldd
john
#logcheck
md5deep
osec
osec-cronjob
osec-mailreport

View File

@@ -0,0 +1,11 @@
apt
basesystem
sysklogd
etcnet
glibc-nss
openvpn
netlist
#alterator-fbi
openssh-server
passwd
less

View File

@@ -1,11 +0,0 @@
apt
basesystem
sysklogd
etcnet
glibc-nss
openvpn
netlist
#alterator-fbi
openssh-server
passwd
less

View File

@@ -18,6 +18,7 @@ xorg-drv-vesa
xorg-drv-video
xorg-drv-void
xorg-drv-wacom
xorg-drv-wizardpen
xorg-drv-qxl
# for those who need these

View File

@@ -1,7 +1,7 @@
Этот каталог содержит субпрофиль main, собирающий пакетную базу
для локальной инсталяции дистрибутива из полученного образа,
включая необязательные пакеты; в live-builder применяется как
локальный репозиторий для сборки.
включая необязательные пакеты; в distro/live-builder применяется
как локальный репозиторий для сборки.
Подбирает:
- SYSTEM_PACKAGES, COMMON_PACKAGES, BASE_PACKAGES, BASE_LISTS:
@@ -11,4 +11,7 @@
В image-scripts.d/* смысла нет, только scripts.d/* --
рабочий чрут не содержит исполняемых файлов.
Не следует использовать этот субпрофиль напрямую, для добавления
пакетного репозитория в образ предназначена фича repo/main.
Результат -- каталог ALTLinux/RPMS.main для копирования в образ.

View File

@@ -18,3 +18,7 @@ STAGE1_KMODULES_REGEXP -- будет подмножество модулей
(в силу зависимости stage2 от stage1).
Результат -- каталог syslinux/ для копирования в образ.
TODO (3.2+): "The network drivers directory (drivers/net)
has been massively rearranged with most drivers moved into
media-specific or protocol-specific subdirectories."

View File

@@ -255,3 +255,5 @@ scsi_mod.ko
sd_mod.ko
serio_raw.ko
sr_mod.ko
sdhci.ko
sdhci_pci.ko