Compare commits

...

81 Commits

Author SHA1 Message Date
Michael Shigorin
672125b9e5 0.5.3-alt1
- multi-target, multi-arch, single-job builds
2012-01-02 21:01:09 +02:00
Michael Shigorin
e93d6cabca docs: minor updates
doc/variables.txt was missing the already-existing BUILDLOG
variable description, and ARCHES got added during multi-target
toplevel rewrite.  Other minor fixes come as appropriate.
2012-01-02 21:01:09 +02:00
Michael Shigorin
7738c6a67d bin/mktmpdir tweaks
The fallback case of building in a brother directory moved
from the last line of code to the first one becoming more
explicit along the way.

Support for slash-containing argument (being a tmpdir name
template prefix) has been added.
2012-01-02 21:01:09 +02:00
Michael Shigorin
2f307ffffb main.mk introduced, lib/*.mk partially rewritten
The former toplevel Makefile is now toplevel main.mk;
this change allows for multi-target, multi-arch processing
in the current toplevel Makefile.

As the "build" symlink semantics change quite considerably
when one is doing bulk builds (several pruned builddirs might
be useful for comparison), BUILDDIR is now much more likely
to be recreated: the cases when it will persist are when it's
either a single-image build or when the prefix hasn't changed.

There are some more or less subtle bugfixes and enhancements
all over the map as well.

Done within 20111230..20120102 timeframe, actually...
2012-01-02 21:01:09 +02:00
Michael Shigorin
3d2f69f112 lib/{clean,profile}.mk: robustness improvements
First, let's not do rsync --delete on an unverified target dir
again: the lesson was learned during a subway hacking session
and I must say that SSDs are frightening fast (even if it was
more than a second to realize what happens and terminate the
extermination before it got /home, thanks xterm).

Second, let's use a variable for common name and make's own
realpath function instead of external binary.
2012-01-02 21:01:09 +02:00
Michael Shigorin
abfd88e262 06syslog: more durability
At least it shouldn't bail out when the anticipated file
just isn't there...
2011-12-26 18:36:37 +02:00
Michael Shigorin
96e89d0062 s/subst/sed -i/g
Initial openSUSE package base taming effort has shown that
relatively few things should be fixed; subst has been generalized
as -i option to sed(1) since its introduction, so let's just fix it.
2011-12-26 18:21:22 +02:00
Michael Shigorin
643d4a753d p/l/Makefile: refactor repetitive actions
*_PACKAGES and *_LISTS shouldn't inflict copypasted blocks;
we can iterate over these just fine.

NB: dump-*, not dump_*, due to namespace pollution hurting
debug target if done the latter way (in case someone misses
the morning tea as wel).
2011-12-26 16:34:20 +02:00
Michael Shigorin
90d7a6142a rescue: drop evms by default
As current devmapper doesn't allow for simultaneous
mounts of virtually the same device by different names
(signalled by "Device or resource busy" when trying to
e.g. mount /dev/sda2 but with /dev/evms/sda2 being just
fine), EVMS triggering such behaviour but rarely needed
should be avoided altogether until a hook to disable it
is in place.
2011-12-21 21:13:38 +02:00
Michael Shigorin
180ed5359c "if test ..." replaced by "if [ ... ]"
Fixed up the remnants of the early style mix
to correspond to the proposed doc/style.txt;
the rationale being that

	if [ ... ]; then
		...
		...
	fi

is the more readable construct among itself,

	if test ...; then
		...
		...
	fi

and

	[ ... ] && {
		...
		...
	}

due to the condition being more distinguishable
when bracketed and the body more apparent as the
one inside "if" and not any other block; the less
obvious difference is that the final construct of
the latter form is prone to the whole script exit
status being non-zero if the condition isn't met.
2011-12-21 12:14:03 +02:00
Michael Shigorin
a8ccfb3d41 firmware related fixups
- it wasn't firmware-carl9170 but firmware-carl9170-1.9.4
- firmware-linux Obsoletes: firmware-iwl* since 20110520-alt1
2011-12-20 16:13:14 +02:00
Michael Shigorin
d3351bb8b7 server, rescue pkglists: minor additions
screen(1) is definitely the part of a server;
tmux(1) can also be installed of course.

Thanks vvk@ (#15887).
2011-12-20 14:03:05 +02:00
Michael Shigorin
d9585b48fb gear-store-tags 2011-12-19 22:50:34 +02:00
Michael Shigorin
e97c111f33 0.5.2-alt1
- THE_{KMODULES,PACKAGES,LISTS,GROUPS}
- incremental development, refactoring and bugfixing
2011-12-19 22:46:20 +02:00
Michael Shigorin
41a0b63051 conf.d/desktop.mk: split out distro/desktop-mini
Let's prepare some moderately sane base for future desktop
installers, it's not only icewm around anymore.
2011-12-19 22:32:59 +02:00
Michael Shigorin
f0414f8208 initial razorqt desktop support
As 0.4.0 just came out and seems to be quite interesting,
why not add it to the collection? :)

Package base advice is welcome, of course.
2011-12-19 22:32:59 +02:00
Michael Shigorin
c5e559b7b9 stop abusing use/live/*
Some parts of *image* configuration started slipping down
into the *feature* configuration, and that was wrong; fixed.

Also introduced proper use/live/x11 (via use/x11/xorg with added
wacom support for the sake of #26723/#26724) and rebased the
pre-existing descendants onto it.
2011-12-19 22:32:59 +02:00
Michael Shigorin
d6972a39bf introduced THE_{KMODULES,PACKAGES,LISTS,GROUPS}
As too many things started duplicating between distros proper
and (e.g. corresponding) LiveCDs, it became apparent that a class
of entities which end up working for THE_USER (not a sysadmin,
and not a developer, just a Linux user) is in need.

So THE_KMODULES will power installed basesystem and live image,
while THE_PACKAGES, THE_LISTS and THE_GROUPS will participate
in building those.
2011-12-19 22:32:59 +02:00
Michael Shigorin
dbed41bf81 syslinux: *.cfg tweaks
- parameter order fixed to "simple first, then those with args"
  and documented as the preferred one (might be debatable, okay)
- added "lowmem" to live so it avoids a ramdisk but works off media
  (it's a knob for propagator)
- added "fastboot" everywhere (but failsafe install) to make use
  of Linux 2.6.29+ async controller initialization
- every snippet got a trailing newline so that isolinux.cfg is readable

And a fancy makefile to check for shortcut dups!
2011-12-19 22:32:59 +02:00
Michael Shigorin
1d07b8f11b live-rescue: use rescue+fs (but drop ntfsprogs)
Some more filesystem related utilities inspired by PLD rescue
are due indeed; but ntfsprogs are obsoleted by ntfs-3g, in fact.

iotop and iperf were suggested by stalker@.
2011-12-19 22:32:30 +02:00
Michael Shigorin
16a06f51d0 cleanup dependency dups
Several targets were used in a duplicated way
that made no harm but no sense either.
2011-12-16 15:28:41 +02:00
Michael Shigorin
1b3b38b7c5 subprofiles: minor docs extension
"sub/stage2/live" might seem a bit cryptic and not readily
traceable, so let's expand on explanations accordingly.
2011-12-16 15:28:41 +02:00
Michael Shigorin
6fadf7e0e9 initial isohybrid support
Here we go with postprocessing priorities along the way
as ISO hybridization has to occur before implanting
final MD5 sum (which must happen earlier than e.g. some
external MD5SUM file generation).

Unfortunately proper dependencies aren't applicable here
(though I'd like to be proved wrong on this one).

Please note that this needs propagator > 20101130-alt9
for automatic mode to work (has also been worked around
in gfxboot case with design-bootloader-source-6.0-alt1).

Thanks rom_as@ for asking about the hybrid image status
and helping out with testing.
2011-12-16 15:22:28 +02:00
Michael Shigorin
1d66879681 live/stage2cfg.mk: rather LIVE_GROUPS
This one used to use LIVE_MAIN_GROUPS which seems to be
overlooked substitution artifact from walking over
GLOBAL_PKG_GROUPS and GLOBAL_LIVE_PKG_GROUPS of m-p-d...
(not that LIVE_GROUPS are defined anywhere yet)
2011-12-08 09:33:52 +02:00
Michael Shigorin
e89a0f1c62 lib/build.mk: tweak the optimizer
$(SHORTEN) is better in the midst of the pipe
so that greps are terminal and can sense the tty
(or the lack thereof in case we're logging further).
2011-12-08 09:30:06 +02:00
Michael Shigorin
c400ba59df build-distro.mk, pkg.in/lists/Makefile: fixups
Actually there's an added duplication in the form of the
test that was previously missing in pkg.in/lists/Makefile
-- that has to be done properly when it's clear how.

This fully omits pkg/lists/.base generation in environments
that won't make use of it.
2011-12-06 19:16:04 +02:00
Michael Shigorin
ed0842b745 features.in/Makefile: cosmetic rewrite
The outmost shell loop got replaced with a (hidden) bunch
of targets -- it's somewhat controversial as the inner loops
are still there (but at least don't wrap around my SXGA+).

Full targetization might be beneficial in terms of parallelism
achievable *but* that would ruin git history being generated,
and building a distro configuration takes a few seconds at most.

(upon reading http://stackoverflow.com/questions/5414418/)
2011-12-06 19:08:30 +02:00
Michael Shigorin
390f4f6bc8 lib/build.mk: add basic CHECK support
The idea is to check:
- the reachability of every target
  used to build the image in question;
- the availability of all the package lists
  and subsequently packages for that image;
- the lack of "dangling" intermediate targets,
  features, pkglists, hooks etc.

So far only the first step is implemented --
it's easy and somewhat helpful already for
  make CHECK=1 all
2011-12-06 14:22:20 +02:00
Michael Shigorin
a1d0b4a7c0 gear-store-tags 2011-12-02 20:09:07 +02:00
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
Michael Shigorin
b3e4d9af0c 0.4.3.1-alt1
- CLEAN by default unless DEBUG
2011-11-07 14:56:09 +02:00
Michael Shigorin
ab70588f94 CLEAN by default (unless DEBUG)
CLEAN is so useful and fiddling with .work chroots does
demand knowledge (hsh-shell is handy btw); so unless we
really get our hands dirty, let's spare ours preciouss
tmpfss.
2011-11-07 12:28:09 +02:00
Michael Shigorin
4313629aac 0.4.3-alt2
- include %mpdir/ itself as well
2011-11-07 11:50:23 +02:00
Michael Shigorin
0301f08e87 gear-store-tags 2011-11-07 00:08:29 +02:00
Michael Shigorin
a91acf3de7 0.4.3-alt1
- enhancements to logging
- NICE variable: employ nice(1) and ionice(1) if available
- features.in/syslinux: banner tweaked to include target name
- features.in/live: set up unicode locale/consolefont
2011-11-07 00:06:54 +02:00
Michael Shigorin
ddf0c5b7c7 full-view docs update
- toplevel README received some long-needed refactoring
  + lowlevel detail moved, well, to lowlevel READMEs
- reflected more thoroughly that m-p is not about distros anymore
- dropped features.in/00example/README.en: it's already out-of-date
  a bit, and there's no perceived need in thorough English docs so far
- wiki article got split into parts and somewhat rewritten, links updated
- mv doc/{CodingStyle,style.txt}
2011-11-07 00:01:36 +02:00
Michael Shigorin
73f676f92c live: set up basic unicode locale
This only deals with console output (a text livecd doesn't ask
the user regarding the preferred language so far).

Refer to these discussions if needed:
https://bugzilla.altlinux.org/show_bug.cgi?id=25225
https://lists.altlinux.org/pipermail/devel-conf/2005-August/001785.html
2011-11-07 00:01:36 +02:00
Michael Shigorin
3c1bca535c downstream postprocessing symlinks tweaked
The bigger goal was being able to set up build in a way
that would allow for images (with configs and logs) be
deposited in per-IMAGE_NAME subdirectories of IMAGEDIR;
that's not done yet but a part of it is ready.

NB: in BUILDDIR, symlinking the just-built image is now
replaced with symlinking the IMAGEDIR since its location
is then predictable thus .gitignore-able for further work
on a generated profile, and more documentable as well.
It's not a hard change though, if you miss the image link
just drop me a note (or a commit).
2011-11-07 00:01:36 +02:00
Michael Shigorin
07fdc6dd9b further toplevel logging tweaks
Essentially some more polishing:
- image path extracted from downstream build log;
- extended error/warning regexp a bit so those with
  color grep options get even prettier output.

Notes:
- "1024" a magic number (briefly explained when introduced)
  moved to a sort of variable;
- "100 lines" for tail(1) is a rule-of-thumb taking into account
  typical amount of hasher/mkimage exhaust given GLOBAL_VERBOSE.
2011-11-07 00:01:36 +02:00
Michael Shigorin
cc8982dd7e tweaked variable logging
Preferences might be somewhat interesting too: while the official
ones shouldn't influence the build result at all, there's no whitelist
so all kinds of weirdness can be stuffed into local config in principle.
That should be diagnosable at least.
2011-11-07 00:01:36 +02:00
Michael Shigorin
cd3e47c562 introduced NICE variable
This one regulates the build wrapper: if the value is non-empty
then nice(1) and ionice(1) will be attempted so that the build
behaves better in regard to other tasks running on the system.

A few doc/variables.txt updates along the way.
2011-11-07 00:01:36 +02:00
Michael Shigorin
102aa3851d syslinux *.cfg: replace banner
Back then I didn't come up with anything smarter than
"mkimage-profiles 2.0" (with my tongue in a cheek),
but as m-p has grown up to 0.4 it's time to fix this.

When done properly, all of the string should be brandable
(with some sane default value inheriting from image name),
but let's do it at least bit by bit.
2011-11-07 00:01:36 +02:00
Michael Shigorin
30b1aa9be6 toplevel build report now timestamped
Thanks torabora@ for yet again seemingly obvious feature request
which strangely managed to evade implementation before.

On an afterthought, mass builds would suggest too much coffee
instead of a progress indicator -- so implemented the latter.

NB: the actual downstream-make-calling rule would expand the "naive"
$(shell date) too early: the rule is evaluated before starting its
execution, and as it's the time consuming one the shell evaluation
was in need, not make's.  The result is less generally available
(needs to be double quoted and won't work inside e.g. awk programs)
but way more precise.
2011-11-07 00:01:36 +02:00
Michael Shigorin
813571cb10 dump sources.list to build.log
The seemingly obvious feature was proposed by torabora@.
APTCONF complicates things a bit of course...
(and was slightly kludgy btw; fixed)
2011-11-07 00:01:36 +02:00
Michael Shigorin
67a7f68e79 .gear/mkimage-profiles.spec: initial package
Also added to the live-builder ISO which is now self-hosted
(sans full repo): one can build an image capable of rebuilding
itself (which is not that useful) and of building other goodies
on some temporarily unused RAM-filled hardware (which is the goal).
2011-11-07 00:01:36 +02:00
Michael Shigorin
83392012d4 live-builder distro: your self-hosted livecd
If you make distro/live-builder.iso, the result is an image
containing almost everything (short of actual full enough
repository) to rebuild itself.  It will attempt to configure
eth0 with DHCP and reach http://ftp.altlinux.org for packages.

RAM requirements start with 2Gb, self-build is accomplished
on a 4Gb host with "make CLEAN=1 distro/live-builder.iso".

Packages required for "make distro/syslinux.iso" get included.

(some due fixups all over the place too)
2011-11-06 17:36:09 +02:00
Michael Shigorin
b6438b9c8f bin/mktmpdir: lower the space bar
With not-that-recent mkimage-profiles development,
it's no longer apparent that at least a gigabyte
of free space is required to build something useful
(at least for the tests, like syslinux.iso).

In short, the guesser cutoff margin is now 256M.
2011-11-06 17:36:09 +02:00
Michael Shigorin
08de714970 added doc/apt.conf.sample
Unfortunately apt configuration is not straightforward at all
regarding being overridden: one can't just provide sources.list
but needs a corresponding apt.conf along with it, and that apt.conf
must disable the SysV-style snippet directories to avoid interesting
side effects of all the things getting overlaid.

So it's not surprising that torabora has asked for an example...
(thanks go to boyarsh@ since I asked him for an example long ago)
2011-11-04 16:54:41 +02:00
Michael Shigorin
895fae7d82 BELL support
Implemented opportunistic alarm support as proposed by torabora;
the actual result depends on readline and/or terminal settings
(read up on "visual bell" vs "audible bell" in case it's wrong).

TODO: this ought to be shifted downstream when proper logging
framework is there.
2011-11-04 16:54:41 +02:00
147 changed files with 1419 additions and 657 deletions

View File

@@ -0,0 +1,94 @@
Name: mkimage-profiles
Version: 0.5.3
Release: alt1
Summary: ALT Linux based distribution metaprofile
License: GPLv2+
Group: Development/Other
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/*
%description
mkimage-profiles is a collection of bits and pieces useful for
distributions construction: it contains package lists, features,
and whole subprofiles (like "rescue" building block) for you
to choose from, and some ready-made image recipes as well.
Make no mistake: constructing distributions isn't just fun, it takes
a lot of passion and knowledge to produce a non-trivial one. So m-p
(the short nick for mkimage-profiles) is complex too. If you need
-- or want -- to make just a few tweaks to an existing recipe, it might
be easier to comprehend the generated profile (aka builddir) which
contains only the needed subprofiles, script hooks and package lists
and is way more compact.
Virtual environment template caches (OpenVZ/LXC) can be made either.
In short, setup hasher (http://en.altlinux.org/hasher) and here we go:
cd %mpdir
head README
make distro/syslinux.iso
But if you're into regular distro hacking and are not afraid of make
and modest metaprogramming (some code generation and introspection),
welcome to the metaprofile itself; read the docs and get the git:
%url
%prep
%setup
%build
%install
mkdir -p %buildroot%mpdir
cp -a * %buildroot%mpdir
%files
%mpdir/
%doc doc/
%doc README QUICKSTART
%changelog
* Mon Jan 02 2012 Michael Shigorin <mike@altlinux.org> 0.5.3-alt1
- multi-target, multi-arch, single-job builds
* Mon Dec 19 2011 Michael Shigorin <mike@altlinux.org> 0.5.2-alt1
- THE_{KMODULES,PACKAGES,LISTS,GROUPS}
- incremental development, refactoring and bugfixing
* 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
* Mon Nov 07 2011 Michael Shigorin <mike@altlinux.org> 0.4.3-alt2
- include %mpdir/ itself as well
* Mon Nov 07 2011 Michael Shigorin <mike@altlinux.org> 0.4.3-alt1
- enhancements to logging
- NICE variable: employ nice(1) and ionice(1) if available
- features.in/syslinux: banner tweaked to include target name
- features.in/live: set up unicode locale/consolefont
* Wed Nov 02 2011 Michael Shigorin <mike@altlinux.org> 0.4.2-alt1
- initial package

2
.gear/rules Normal file
View File

@@ -0,0 +1,2 @@
spec: .gear/mkimage-profiles.spec
tar: v@version@:.

View File

@@ -0,0 +1,6 @@
object e97c111f333ef69f4f9ee7009ad0352ca3ed9327
type commit
tag v0.5.2
tagger Michael Shigorin <mike@altlinux.org> 1324327747 +0200
THE

1
.gear/tags/list Normal file
View File

@@ -0,0 +1 @@
00550cc66a5c3a24317b3b0a5050136ce0987adb v0.5.2

View File

@@ -1,63 +1,35 @@
# steps to build a distribution image:
# --- here
# 1. initialize new profile (BUILDDIR) as a copy of image.in/
# 2. configure distro
# 3. copy the needed bits from metaprofile to a new profile
# --- in BUILDDIR
# 4. build subprofiles and subsequently an image
# umbrella mkimage-profiles makefile:
# iterate over multiple goals/arches
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
# most of the actual work done elsewhere
include lib/*.mk
include conf.d/*.mk
include features.in/*/config.mk
DISTRO_TARGETS := $(shell sed -n 's,^\(distro/[^:.]\+\):.*$$,\1,p' \
lib/distro.mk $(wildcard conf.d/*.mk) | sort)
VE_TARGETS := $(shell sed -n 's,^\(ve/[^:.]\+\):.*$$,\1,p' \
lib/ve.mk $(wildcard conf.d/*.mk) | sort)
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:
@for i in $(DISTROS); do \
echo "** building $$i:"; \
$(MAKE) --no-print-directory BUILDDIR=$(BUILDDIR) $$i; \
echo; \
done
$(IMAGES): debug \
config/with/$(IMAGE_CONF) \
config/like/$(IMAGE_CLASS) \
config/name/$(IMAGE_NAME) \
config/pack/$(IMAGE_TYPE) \
build; @:
debug:
ifeq (2,$(DEBUG))
@$(foreach v,\
$(filter IMAGE_%,$(sort $(.VARIABLES))),\
$(warning $v = $($v)))
# immediate assignment
ifndef ARCHES
ifdef ARCH
ARCHES := $(ARCH)
else
ARCHES := $(shell arch | sed 's/i686/i586/')
endif
endif
export ARCHES
# recursive make considered useful for m-p
MAKE += --no-print-directory
.PHONY: clean distclean help
clean distclean help:
@$(MAKE) -f main.mk $@
export NUM_TARGETS := $(words $(MAKECMDGOALS))
%:
@n=1; \
if [ "$(NUM_TARGETS)" -gt 1 ]; then \
n="`echo $(MAKECMDGOALS) \
| tr '[[:space:]]' '\n' \
| grep -nx "$@" \
| cut -d: -f1`"; \
echo "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
fi; \
for ARCH in $(ARCHES); do \
$(MAKE) -f main.mk ARCH=$$ARCH $@; \
done; \
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then echo; fi

View File

@@ -21,6 +21,7 @@
- от имени пользователя (после повторного входа):
$ git config --global user.email "my@email"
$ git config --global user.name "My Name"
$ mkdir ~/out
- тестовая сборка (см. тж. lib/distro.mk, doc/variables.txt):
$ make distro/icewm.iso
@@ -30,4 +31,4 @@ $ make distro/icewm.iso
- http://www.altlinux.org/tmpfs
- http://www.altlinux.org/hasher
- http://www.altlinux.org/mkimage
- http://www.altlinux.org/Mkimage/Profiles/next
- http://www.altlinux.org/Mkimage/Profiles/m-p

58
README
View File

@@ -8,15 +8,16 @@ see doc/profiles.mk.sample and libdistro.mk
License: GPLv2+, see COPYING.
Most docs in Russian, welcome to learn it or ask for English.
См. тж. http://www.altlinux.org/Mkimage/Profiles/next
Most docs are in Russian, welcome to learn it or ask for English.
См. тж. http://www.altlinux.org/Mkimage/Profiles/m-p
Задача:
- конфигурирование и создание образов на базе ALT Linux
Концепция:
- конфигурация, как и образ -- объект постадийной сборки
- метапрофиль служит репозиторием для построения индивидуального
профиля, по которому создаётся итоговый дистрибутив
- для одноразовых модификаций можно подправить сгенерированный
профиль, для долгосрочной разработки стоит вливать правки
в метапрофиль (что требует больше навыков и времени)
профиля, по которому создаётся итоговый образ
Особенности:
- метапрофиль может быть полностью read-only при сборке
@@ -25,52 +26,35 @@ Most docs in Russian, welcome to learn it or ask for English.
он автономен относительно метапрофиля
Стадии работы:
- инициализация дистрибутивного профиля
- сборка конфигурации дистрибутива
- наполнение дистрибутивного профиля
- сборка дистрибутива
- инициализация сборочного профиля
- сборка конфигурации образа
- наполнение сборочного профиля
- сборка образа
Объекты:
- виртуальные окружения:
+ описываются в lib/ve.mk
- дистрибутивы и виртуальные окружения:
+ описываются в conf.d/*.mk или соответственно lib/{distro,ve}.mk
+ могут основываться одно на другом
- дистрибутивы:
+ описываются в lib/distro.mk
+ могут основываться один на другом
+ включают один или более субпрофилей по надобности
+ дистрибутивы также:
- включают один или более субпрофилей по надобности
+ желательно избегать множественного наследования, см. тж. фичи
- субпрофили:
+ список собирается в $(SUBPROFILES)
+ базовые комплекты помещены в подкаталогах под sub.in/;
их наборы скриптов могут расширяться фичами
- stage1: propagator, ядро инсталятора и initrd в т.ч. с firmware
- stage2: базовый live-образ (и модули ядра, соответствующие stage1);
используется только с модификаторами (см. соответствующие фичи):
+ stage2/install2: инсталятор
+ stage2/live: LiveCD
+ stage2/rescue: спасательная система
- main: пакетная база к инсталяции (обязательная и дополнительная)
- фичи:
+ список собирается в $(FEATURES)
+ законченные блоки функциональности (или наборы таковых)
+ описываются в индивидуальных features.in/*/config.mk
+ могут требовать другие фичи, а также субпрофили
+ при сборке $(BUILDDIR) содержимое указанных в $(FEATURES) фич
(подкаталоги, соответствующие входящим в дистрибутив субпрофилям
под их итоговыми названиями -- например, live, а не stage2/live)
добавляется в профиль; затем выполняются generate.sh, generate.mk
- списки пакетов (*_LISTS): просьба по возможности избегать дублирования;
NB: перечисленные в этих переменных файлы автоматически копируются
в порождаемый профиль => не следует указывать пакаджлисты напрямую
- индивидуальные пакеты (*_PACKAGES): следует крайне осторожно пользоваться
SYSTEM_PACKAGES -- эти пакеты попадут во все стадии, в том числе в образ
чувствительной к объёму install2 (в stage1 -- только в инструментальный
чрут); применяйте для того, что обязано быть и в инсталяторе, и в готовой
системе -- и не путайте с COMMON_PACKAGES (main, live, rescue)
+ при сборке $(BUILDDIR) содержимое фич добавляется в профиль
- списки пакетов (*_LISTS):
+ просьба по возможности избегать дублирования
- индивидуальные пакеты (*_PACKAGES): см. тж. conf.d/README
Результат:
- при успешном завершении сборки образ называется сообразно
дистрибутиву и укладывается в $(IMAGEDIR):
- при успешном завершении сборки образ называется по имени цели
и укладывается в $(IMAGEDIR):
+ указанный явно,
+ либо ~/out/ (если возможно),
+ или $(BUILDDIR)/out/ иначе

View File

@@ -2,10 +2,10 @@
# analyze free space, preferring tmpfs over really many gigaz
# hope there aren't spaces in RM's $HOME are they?
DIRS="$TMP $TMPDIR $HOME/hasher /tmp /var/tmp"
MINSIZE=1048576 # face control criterion
DIRS="$TMP $TMPDIR $HOME/hasher /tmp /var/tmp .."
MINSIZE=262144 # face control criterion
# pick existing, writeable, >1Gb free space dirs
# pick existing, writeable, >256M free space dirs
# rank them wrt type: tmpfs > realfs > rootfs
choose_tmpdir() {
for i in $DIRS; do
@@ -25,5 +25,7 @@ choose_tmpdir() {
| cut -f2 -d' '
}
DIR="`choose_tmpdir`"
mktemp -d "${1:-tmpdir}.XXXXXXXXXX" --tmpdir="${DIR:-`realpath ..`}"
DIR="`choose_tmpdir`/`dirname "$1"`"
NAME="`basename "${1:-tmpdir}"`"
mkdir -p "$DIR" # in case $1 contains slash(es)
mktemp -d "$NAME.XXXXXXX" --tmpdir="${DIR%/.}"

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

@@ -1,17 +1,34 @@
Этот каталог содержит включаемые фрагменты конфигурации образов с тем,
чтобы было удобнее параллельно разрабатывать специфические дистрибутивы
без излишних merge conflict'ов.
и VE без излишних merge conflict'ов.
Следует понимать, что основная цель появления mkimage-profiles на свет
-- это уменьшение "форков" внутри семейства дистрибутивных профилей.
Поэтому при возможности следует всё-таки работать над общей базовой
частью, включая скриптовые хуки и списки пакетов, а также оптимизировать
граф зависимостей между дистрибутивными конфигурациями.
граф зависимостей между конфигурациями образов.
Попросту говоря, copy-paste -- тревожный признак.
NB: по переменным:
* $(VAR) подставляются перед их записью в $(CONFIG), который distcfg.mk;
* $$(VAR) раскрываются позже, при включении $(CONFIG) и востребовании
значений -- таким образом их значения могут изменяться до окончания
конфигурации, а также зависеть от значений других переменных.
По переменным:
- SYSTEM_PACKAGES стоит применять крайне осторожно -- эти пакеты попадут
во все стадии, в том числе в образ чувствительной к объёму install2
(в stage1 -- только в инструментальный чрут); применяйте для того,
что обязано быть и в инсталяторе, и в готовой системе
- для "обычного общего" (live, main, rescue) есть COMMON_PACKAGES
(NB: попадают в базовую систему)
- для "пользовательского" (live, main) есть THE_GROUPS, THE_LISTS
и THE_PACKAGES
- аналогично по модулям ядра:
+ STAGE1_KMODULES доступны в производных от stage2 (install2, live, rescue)
+ BASE_KMODULES попадут в установку по умолчанию
+ MAIN_KMODULES будут доступны для установки с носителя
+ LIVE_KMODULES предназначены для LiveCD/LiveFlash
+ THE_KMODULES попадут в "пользовательские" окружения
(live и установленную систему)
По подстановкам:
- $(VAR) подставляются перед их записью в $(CONFIG), который distcfg.mk
- $$(VAR) раскрываются позже, при включении $(CONFIG) и востребовании
значений; в этом случае их значения могут изменяться до окончания
конфигурации, а также зависеть от значений других переменных

View File

@@ -1,13 +1,16 @@
# 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/cleanup/alterator
distro/desktop-mini: distro/desktop-base \
use/lowmem use/x11/xdm use/bootloader/lilo \
use/power/acpi/button use/cleanup/alterator
distro/icewm: distro/desktop-mini
@$(call add,BASE_LISTS,$(call tags,icewm desktop))
distro/desktop-systemd: distro/icewm use/systemd
endif

View File

@@ -1,8 +1,40 @@
# live images
ifeq (distro,$(IMAGE_CLASS))
distro/live: distro/.base use/live use/syslinux/ui-menu
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-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,$(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))
distro/live-install: distro/.base use/live/base use/syslinux/localboot.cfg
@$(call add,LIVE_PACKAGES,live-install)
distro/live-icewm: distro/live use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || icewm)))
distro/live-razorqt: distro/live use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || razorqt)))
distro/live-rescue: distro/live-icewm
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
@$(call add,LIVE_LISTS, \
$(call tags,(base || extra) && (archive || rescue || network)))
endif

View File

@@ -1,30 +1,38 @@
# 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)
distro/server-mini: distro/server-base use/cleanup/x11-alterator
@$(call set,KFLAVOURS,el-smp)
@$(call add,KMODULES,e1000e igb)
@$(call add,THE_KMODULES,e1000e igb)
@$(call add,STAGE1_KMODULES,e1000e igb)
@$(call add,BASE_LISTS,\
$(call tags,base && (server || network || security || pkg)))
@$(call add,BASE_LISTS,$(call tags,extra network))
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,ipset ipt-netflow opendpi pf_ring xtables-addons)
@$(call add,KMODULES,drbd83 kvm)
@$(call add,BASE_KMODULES,rtl8168 rtl8192)
@$(call add,MAIN_KMODULES,bcmwl ndiswrapper)
@$(call add,MAIN_KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)
@$(call add,MAIN_KMODULES,drbd83 kvm)
@$(call add,INSTALL2_PACKAGES,curl) ### should become curl-mini
@$(call add,BASE_LISTS,ovz-server)
@$(call add,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

8
doc/apt.conf.sample Normal file
View File

@@ -0,0 +1,8 @@
// these must be unset to avoid picking up
// /etc/apt/{apt.conf.d,sources.list.d,}/
Dir::Etc::main "/dev/null";
Dir::Etc::parts "/var/empty";
Dir::Etc::SourceParts "/var/empty";
// this is what caused the whole trouble
Dir::Etc::sourcelist "/home/mike/apt/sources.list";

View File

@@ -1,5 +1,8 @@
предположения фрагментов кода об окружении
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NB: пути приводятся от верхнего уровня
- pkg.in/lists/Makefile
+ ожидает, что названия пакаджлистов указываются в переменных
вида *_LISTS, и копирует в генерируемый профиль только их

View File

@@ -8,3 +8,9 @@
# spares tmpfs, quite recommended unless you need raw workdir chroots
#CLEAN = 1
# run with lower CPU and I/O priorities
#NICE = 1
# try and draw attention when done (depends on readline/terminal settings)
#BELL = 1

View File

@@ -6,30 +6,65 @@
- APTCONF
+ задаёт путь к требуемому apt.conf
+ значение: пусто (по умолчанию системный) либо строка
+ см. ../image.in/Makefile
+ см. ../image.in/Makefile, apt.conf.sample
- ARCH
+ определяет целевую архитектуру образа
+ задаёт целевую архитектуру образов
+ значение: пусто (по умолчанию авто), i586 или x86_64
+ см. ../lib/build.mk
- ARCHES
+ задаёт набор целевых архитектур образов
+ значение: пусто (по умолчанию авто) либо список через пробел
+ см. ../Makefile
- BELL
+ подаёт сигнал после завершения сборки
+ значение: пусто (по умолчанию нет) либо любая строка
+ см. ../lib/build.mk
- BUILDDIR
+ определяет каталог генерируемого профиля и сборки
+ задаёт каталог генерируемого профиля и сборки
+ значение: пусто (по умолчанию авто) либо строка
+ см. ../lib/profile.mk
- BUILDDIR_PREFIX
+ задаёт префикс каталога генерируемого профиля и сборки
+ значение: строка; по умолчанию выбирается алгоритмически
+ см. ../main.mk
- BUILDLOG
+ задаёт путь к файлу журнала сборки/очистки
+ значение: по умолчанию $(BUILDDIR)/build.log либо строка
+ см. ../lib/log.mk
- CHECK
+ включает режим проверки сборки конфигурации
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../lib/build.mk
- CLEAN
+ экономия RAM+swap при сборке в tmpfs, иначе места на диске
+ очистка рабочего каталога после успешной сборки очередной стадии
+ может помешать использовать некоторые варианты отладки
+ значение: любая строка, по умолчанию пусто
+ значение: любая строка; по умолчанию пусто при DEBUG, иначе 1
+ см. ../lib/clean.mk
- DEBUG
+ включение средств отладки
+ включает средства отладки
+ значение: пусто (по умолчанию), 1 или 2
+ см. ../lib/log.mk
- ISOHYBRID
+ включает постобработку ISO-образа isohybrid
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../features.in/pack/config.mk
- NICE
+ понижает нагрузку системы сборочной задачей
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../lib/build.mk
пример
~~~~~~
make DEBUG=1 CLEAN=1 syslinux.iso
make DEBUG=1 CLEAN=1 distro/syslinux.iso

View File

@@ -2,38 +2,34 @@
и должен дать представление о том, какой код _может_ быть
включён в настоящую фичу: статические файлы, два makefile
для создания конфигурации и генерирования части профиля,
а также шелл-скрипт для генерирования.
а также шелл-скрипт для такого генерирования.
Вовсе не требуется втягивать всё в свою фичу, лучше постараться
Вовсе не требуется втягивать всё в свою фичу: лучше постараться
сделать её минимальной, самодостаточной и полезной в качестве
"кирпичика".
Единственной необходимой частью фичи является файл config.mk,
Единственной обязательной частью фичи является файл config.mk,
который включается в distro.mk верхнего уровня и предоставляет
цель вида use/*, специфичную для данной фичи (а также добавляет
её в переменную FEATURES -- к сожалению, реализовать добавление
автоматом не представляется возможным). Если название фичи не
упоминается в списке, содержащемся в этой переменной, то она
не задействуется при построении профиля, а только при сборке
конфигурации дистрибутива.
цель вида use/*, специфичную для данной фичи, а также добавляет
её в переменную FEATURES. Если название фичи не упоминается
в списке, содержащемся в этой переменной, то она не задействуется
при построении профиля, а только при сборке конфигурации.
Остальное содержимое является дополнительным и используется
в таком порядке (см. features.in/Makefile):
в таком порядке (см. ../Makefile):
- сперва в $(BUILDDIR)/image/ копируются все подкаталоги,
соответствующие именам субпрофилей, запрошенных для
дистрибутивного профиля; при этом они сливаются с деревом,
соответствующие итоговым именам субпрофилей, запрошенных
для профиля образа; при этом они сливаются с деревом,
которое уже сформировано субпрофилями (../sub.in/*) и уже
скопированными фичами; если какие-либо файлы перекрылись
по именам, rsync должен оставить резервные копии (*~),
которые должны просигнализировать о беспорядке;
- затем запускается generate.sh, если существует и исполнимый;
- затем используется generate.mk, если существует и непустой.
- запускается generate.sh, если существует и исполнимый;
- применяется generate.mk, если существует и непустой.
Например, если используются субпрофили stage1, stage2/install2
и main, вы можете решить собрать специфические для фичи скрипты
и main, можно решить собрать специфические для фичи скрипты
инсталятора в install2/image-scripts.d/ (или необходимые для
операций с пакетной базой -- в main/scripts.d/, смотря чего
надо добиться; загляните также в документацию mkimage).

View File

@@ -1,43 +0,0 @@
This directory contains phony example feature and should provide
you with a minimal idea what code _can_ be included into a real
feature: static files, configuration and generation makefiles,
and a generation shell script.
It's not neccessary to toss all of those into your feature,
better try to keep it minimalistic, self-contained and useful
as a building block.
The only requisite part of the feature is config.mk which
is included in toplevel distro.mk and which provides the
use/* target specific for the feature (and also registers
it in FEATURES variable -- sorry, it's not feasible to do
automatically). If the feature's name isn't mentioned in
the list contained in that variable, then it's not examined
while building up the profile either.
The rest of content is optional and used in this order
(see features.in/Makefile):
- first all subdirectories corresponding to subprofile names
requested for the distribution profile being made are copied
over to $(BUILDDIR)/image/; thus they get merged with the tree
which is already formed by subprofiles (../sub.in/*) and preceding
features; in case of overlapping files rsync should leave backup
copies which are to be treated as a signal of disorder;
- then generate.sh is run, if found and executable;
- then generate.mk is used, if found and non-empty.
e.g., if the distro needs stage1, install2 and main subprofiles,
you might want to collect feature-specific scripts for installer
into install2/image-scripts.d/ (or main/scripts.d/, depending on
what is to be achieved -- see also mkimage docs).
And if some non-trivial configuration actions are to be done
(like syslinux config file being compiled from pieces depending
on what bits are present of the functionality asked for...) then
you can perform them in generate.* code.
Please feel free to comment on what's useful here and what's crap
to mike@altlinux.

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,75 +24,100 @@ 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:
TARGETS := prep $(FEATURES) finalize
.PHONY: $(TARGETS)
all: | $(TARGETS)
prep:
@echo "** starting feature configuration"
@if [ -n "$(GLOBAL_DEBUG)" ]; then \
echo "** target subprofiles: $(SUBPROFILES)"; \
echo "** requested features: $(FEATURES)"; \
fi
@for feat in $(FEATURES); do \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
echo "** adding $$feat feature"; \
fi; \
pushd "$$feat" >/dev/null && \
for sub in / $(SUBPROFILES); do \
# feat
$(FEATURES):
@feat=$@; \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
echo "** adding $$feat feature"; \
fi; \
pushd "$$feat" >/dev/null && \
for sub in / $(SUBPROFILES); do \
dirtags=; \
if [ "$$sub" = / ]; then \
parts=lib; \
srcdirs="."; \
dst="."; \
else \
parts=; \
src="$${sub%/*}"; \
dst="$${sub#*/}"; \
srcdirs=; \
if [ -d "$$src" ]; then \
rsync -qab "$$src/" "$(BUILDDIR)/$$dst/"; \
srcdirs="$$src"; \
dirtags="&& $$src"; \
fi; \
if [ -d "$$dst" ]; then \
rsync -qab "$$dst/" "$(BUILDDIR)/$$dst/"; \
if [ "$$dst" != "$$src" ]; then \
dirtags="&& ($$src || $$dst)"; \
fi; \
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
srcdirs="$$srcdirs $$dst"; \
dirtags="&& ($$src || $$dst)"; \
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/"; \
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; \
for srcdir in $$srcdirs; do \
rsync -qab --exclude tagged \
"$$srcdir/" "$(BUILDDIR)/$$dst/"; \
done; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/$$dst/" >/dev/null; then \
test -n "`git status -s`" && \
git add . && \
if [ -n "$$dst" ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \
fi && \
git commit -qam "$$feat feature: $$the part added"; \
fi; \
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; \
[ -d "tagged/$$part" ] || continue; \
[ "$$srcdir" != "." ] || continue; \
pushd "tagged/$$part" >/dev/null; \
echo "$$feat $$dirtags" \
| tags2lists . \
| xargs -r cp -vpLt "$$destdir" --; \
popd >/dev/null; \
fi; \
done; \
popd >&/dev/null; \
done; \
if [ -x "generate.sh" ]; then sh generate.sh; fi; \
if [ -s "generate.mk" ]; then $(MAKE) -f generate.mk; fi; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/" >/dev/null; then \
if test -n "`git status -s`"; then \
git add . && \
git commit -qam "$$feat feature generation complete"; \
fi; \
pushd "$(BUILDDIR)/$$dst/" >/dev/null; then \
test -n "`git status -s`" && \
git add . && \
if [ -n "$$dst" ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \
fi && \
git commit -qam "$$feat feature: $$the part added"; \
popd >/dev/null; \
fi; \
done; \
if [ -x "generate.sh" ]; then sh generate.sh; fi; \
if [ -s "generate.mk" ]; then $(MAKE) -f generate.mk; fi; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/" >/dev/null; then \
if [ -n "`git status -s`" ]; then \
git add . && \
git commit -qam "$$feat feature generation complete"; \
fi; \
popd >/dev/null; \
done
fi; \
popd >/dev/null
finalize:
@find "$(BUILDDIR)/" -name '*~' \
| sed "s,$(BUILDDIR)/,** warning: file clash: ," >&2
endif

View File

@@ -1,21 +1,22 @@
Этот каталог содержит т.н. фичи (features, особенности) --
каталоги, содержимое каждого из которых реализует одну из
подключаемых автономных возможностей дистрибутива.
подключаемых автономных возможностей образа.
Каждая фича должна содержать задействуемый при построении
конфигурации будущего образа файл config.mk, включаемый
в ../Makefile; он может описывать одну или более целей
вида use/*, дополняющих конфигурацию дистрибутива, и при
наличии дополнительных хуков для копирования или generate.*
должен добавить имя фичи в $(FEATURES).
в ../main.mk; он может описывать одну или более целей
вида use/*, дополняющих конфигурацию, и при наличии
дополнительных хуков для копирования или generate.*
обязан добавить имя фичи в $(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: тегированные скрипты являются экспериментальными,
возможны недоработки и существенные изменения!
@@ -25,7 +26,7 @@ generate.sh и задействуется generate.mk (при их наличи
с именем исходного базового субпрофиля (см. $src, $dst в Makefile).
Каталог lib/ является специфическим для фич, определяющих
построение образа -- см. build-*/.
построение конкретного вида образа -- см. build-*/.
Несложный пример содержится в 00example/, более близкий к жизни
и нынешним пределам возможностей метапрофиля -- в syslinux/.

View File

@@ -6,5 +6,5 @@
и требует пакет выбранного загрузчика.
Реализация экспериментальная (нужно модуляризовать installer-steps),
пока завязана на installer-distro-altlinux-generic. Возможно,
пока завязана на installer-distro-altlinux-generic (TODO). Возможно,
с использованием alterator-lilo связаны проблемы времени установки.

View File

@@ -1,2 +1,3 @@
use/build-distro: boot/isolinux
@$(call add,FEATURES,build-distro)
# hooked from ../../lib/sugar.mk
use/build-distro:
@$(call add_feature)

View File

@@ -4,12 +4,11 @@
# 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)
# 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
@@ -17,7 +16,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
@@ -29,10 +28,8 @@ metadata: dot-base
| sed 's,$(PKGDIR)/*,,g')
dot-base:
@{ \
echo -e "\n## added by image.in/Makefile"; \
echo "$(call kpackages,$(KMODULES),$(KFLAVOURS))"; \
} >> $(call list,.base)
@p="$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))"; \
echo -e "\n## added by build-distro.mk\n$$p" >> $(call list,.base)
dot-disk:
@mkdir -p files/.disk
@@ -40,7 +37,7 @@ dot-disk:
@echo "$(ARCH)" >files/.disk/arch
@echo "$(DATE)" >files/.disk/date
@if type -t git >&/dev/null; then \
( cd $(TOPDIR) && \
git show-ref --head -ds -- HEAD ) \
( cd $(TOPDIR) && test -d .git && \
git show-ref --head -ds -- HEAD ||:) \
>files/.disk/commit 2>/dev/null; \
fi

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,3 @@
# hooked from ../../lib/sugar.mk
use/build-ve:
@$(call add,FEATURES,build-ve)
@$(call add_feature)

View File

@@ -1,3 +1,3 @@
#!/bin/sh -e
# we don't need no gettys in OpenVZ VEs (might need one in LXC though)
subst 's,^[0-9]\+:[0-9]\+:respawn:/sbin/mingetty.*,#&,' /etc/inittab
sed -i 's,^[0-9]\+:[0-9]\+:respawn:/sbin/mingetty.*,#&,' /etc/inittab

View File

@@ -5,9 +5,12 @@
# remote syslog if you do care for reliable data anyways)
# credits: vvk@, thresh@ (2010)
sed -i \
-e 's,/dev/tty12,/var/log/syslog/console,' \
-e 's,^.*/var/log/syslog/console$,#&,' \
-e 's,-/var/log/,/var/log/,g' \
-e 's,/var/log/,-/var/log/,g' \
/etc/syslog.conf
CONFIG=/etc/syslog.conf
[ ! -f "$CONFIG" ] || \
sed -i \
-e 's,/dev/tty12,/var/log/syslog/console,' \
-e 's,^.*/var/log/syslog/console$,#&,' \
-e 's,-/var/log/,/var/log/,g' \
-e 's,/var/log/,-/var/log/,g' \
"$CONFIG"

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

5
features.in/dev/README Normal file
View File

@@ -0,0 +1,5 @@
Эта фича служит для создания образов, предназначающихся для разработки.
В первую очередь обеспечивается развёртывание hasher и mkimage.
Реализована поддержка LiveCD, возможно приспособление для образов
сборочных VM/VE.

View File

@@ -0,0 +1,7 @@
use/dev:
@$(call add_feature)
@$(call add,COMMON_PACKAGES,git-core hasher gear)
use/dev/mkimage: use/dev
@$(call add,COMMON_PACKAGES,mkimage)
@$(call add,LIVE_PACKAGES,shadow-change)

View File

@@ -0,0 +1,44 @@
#!/bin/sh -efu
# configure hasher (implies that 30-users has been run already)
# predefined passwordless livecd user
USER="altlinux"
if ! id "$USER" >&/dev/null; then
echo "No such user '$USER'" >&2
exit
fi
# ~
HOME="/home/$USER"
install -dm750 -o "$USER" -g "$USER" "$HOME"
# we honestly don't know much more
if type -t git >&/dev/null; then
su - -c "git config --global user.email $USER@localhost" "$USER"
su - -c "git config --global user.name 'live builder'" "$USER"
fi
# developer should feel comfortable, eh? ;-)
ZSHELL="/bin/zsh"
if [ -x "$ZSHELL" ]; then
chsh -s "$ZSHELL" "$USER"
install -m755 -o "$USER" -g "$USER" /dev/null "$HOME/.zshrc"
echo "mkdir -p \"\$TMP/hasher\"" >> "$HOME/.zshrc"
fi
# $TMP
TMP="/tmp/.private/$USER"
control pam_mktemp enabled
sed -i '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
echo "%_tmppath $TMP" >> "$HOME/.rpmmacros"
# ~/hasher
WORKDIR="$TMP/hasher"
ln -s "$TMP/hasher" "$HOME/hasher"
# online repo needs network not isolation
echo "export share_network=1" >> /etc/profile.d/hasher.sh
chmod +x /etc/profile.d/hasher.sh
# requisite
hasher-useradd "$USER"

View File

@@ -0,0 +1,7 @@
#!/bin/sh -efu
# attempt to autoconfigure ethernet
mkdir -p /etc/net/ifaces/eth0 && {
echo TYPE=eth
echo BOOTPROTO=dhcp
} > /etc/net/ifaces/eth0/options ||:

View File

@@ -4,3 +4,6 @@
Для практического применения (в первую очередь это
перешивка firmware) требуется сделать подключение
CD и/или USB Flash с тем, чтобы класть туда прошивки.
Спасибо за идею и местами реализацию: Александру Бандуре,
Сергею Горенко, Николаю Гречуху и Алексею Фролову.

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

@@ -12,8 +12,8 @@ use/firmware/server: use/firmware
use/firmware/wireless: use/firmware
@$(call add,MAIN_PACKAGES,firmware-acx100)
@$(call add,MAIN_PACKAGES,firmware-i2400m)
@$(call add,MAIN_PACKAGES,firmware-carl9170)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-carl9170.*)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-ipw.*)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-iwl.*)
@#$(call add,MAIN_PACKAGES_REGEXP,firmware-iwl.*)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-rt.*)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-zd.*)

View File

@@ -1,4 +1,4 @@
Добавление модуля hdt (Hardware Detection Tool COM32 module) к syslinux;
Добавление модуля hdt (Hardware Detection Tool) к syslinux;
может быть востребовано для инсталяторов, live/rescue.
Фича не только требует фичу syslinux (и соответствующий пакет,

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,6 +1,6 @@
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)
@$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
@$(call add,BASE_LISTS,$(call tags,basesystem))

View File

@@ -0,0 +1,9 @@
Эта фича производит постобработку ISO-образа утилитой isohybrid
с целью обеспечения возможности его загрузки как с CD/DVD,
так и с USB-флэшки.
Можно указать в цепочке зависимостей дистрибутива явно с тем,
чтобы гарантировать гибридный вид образа; в экспериментальном
порядке сделана возможность запросить включение этой фичи при
сборке конфигурации произвольного дистрибутива
(ISOHYBRID=1, см. ../pack/config.mk).

View File

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

View File

@@ -0,0 +1,4 @@
CHROOT_PACKAGES += syslinux
postprocess-80isohybrid:
@isohybrid "$(IMAGEDIR)/$(IMAGE_OUTFILE)"

View File

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

View File

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

View File

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

View File

@@ -1,3 +1,13 @@
# copy stage2 as live
use/live: use/stage2 sub/stage2/live
@$(call add,FEATURES,live)
@$(call add,LIVE_LISTS,$(call tags,(base || desktop) && (live || network || icewm)))
@$(call add_feature)
use/live/base: use/live use/syslinux/ui-menu
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
use/live/x11: use/live/base use/x11/xorg use/x11/wacom use/virtualbox/guest
# NB: there's an unconditional live/image-scripts.d/40-autologin script
# *but* it only configures some of the *existing* means; let's add one
use/live/autologin: use/live/x11
@$(call add,LIVE_PACKAGES,autologin xinit)

View File

@@ -0,0 +1,12 @@
#!/bin/sh -efu
# if no means for locale setup are employed,
# it should still be somewhat reasonable
# NB: keyboard layout not included!
mkdir -p /etc/sysconfig
cat >> /etc/sysconfig/i18n << _EOF_
# mkimage-profiles live 20-locale hook
SYSFONT=UniCyr_8x16
LANG=en_US.utf8
_EOF_
:

View File

@@ -23,8 +23,7 @@ add_user()
fi
done
/usr/sbin/useradd -p "" -G "$groups" "$1" ||:
chown -R "$1:auth" "/etc/tcb/$1"
useradd -p "" -G "$groups" "$1" ||:
chown -R "$1:$1" /home/$1
if [ -n "$GLOBAL_CRYPT_HOMES" ]; then
@@ -39,13 +38,14 @@ add_user()
else
verbose "Can't find writable $sudoers file."
fi
echo "Hello friend, say \`$1' to log in at \\l" >> /etc/issue
}
verbose "has started"
verbose "Clear password for root account"
/usr/sbin/usermod -p "" root
chown -R root.auth /etc/tcb/root
usermod -p "" root
add_user altlinux

View File

@@ -0,0 +1,34 @@
#!/bin/sh -ef
USER=altlinux
# setup runlevel
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
# autologin^2
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,8 +1,11 @@
# stage2 mod: livecd
IMAGE_PACKAGES = $(COMMON_PACKAGES) \
$(LIVE_PACKAGES) \
$(call map,list,$(LIVE_LISTS) $(LIVE_MAIN_GROUPS)) \
STAGE2_KMODULES = $(THE_KMODULES) $(LIVE_KMODULES)
IMAGE_PACKAGES = $(COMMON_PACKAGES) $(THE_PACKAGES) $(LIVE_PACKAGES) \
$(call map,list, \
$(THE_LISTS) $(THE_GROUPS) \
$(LIVE_LISTS) $(LIVE_GROUPS)) \
interactivesystem
MKI_PACK_RESULTS = squash:live

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 (виртуальные окружения).
для дистрибутивов) и tar/cpio с возможностью сжатия gz/xz
(виртуальные окружения).

View File

@@ -1,18 +1,36 @@
DISTRO_EXTS := .iso
VE_EXTS := .tar .tgz
use/pack:
@$(call add,FEATURES,pack)
@$(call add_feature)
use/pack/iso: use/pack boot/isolinux
# conventional ISO9660 image hybridization
# for direct bootable usbflash imaging
use/pack/iso: use/pack boot/isolinux $(ISOHYBRID:%=use/isohybrid)
ifeq (distro,$(IMAGE_CLASS))
@$(call set,IMAGE_PACKTYPE,isoboot)
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

@@ -2,5 +2,5 @@
# prepare base make-initrd configuration for stage1
# see also http://www.altlinux.org/Make-initrd-propagator
subst 's/AUTODETECT/#AUTODETECT/' /etc/initrd.mk
sed -i 's/AUTODETECT/#AUTODETECT/' /etc/initrd.mk
echo 'FEATURES += propagator' >> /etc/initrd.mk

View File

@@ -5,7 +5,7 @@
# FIXME: move to plymouth feature
#if [ -f /etc/plymouth/plymouthd.conf ];then
# subst 's/#\([T\[]\)/\1/' /etc/plymouth/plymouthd.conf
# sed -i 's/#\([T\[]\)/\1/' /etc/plymouth/plymouthd.conf
# echo 'FEATURES += plymouth' >> /etc/initrd.mk
#fi

View File

@@ -2,18 +2,14 @@
реализуется в рамках stage1.
Цели config.mk:
* use/syslinux/ui-% -- конфигурирование интерфейса (см. cfg.in/00*.cfg);
при использовании автоматически добавляют syslinux в FEATURES;
* use/syslinux/%.com, use/syslinux/%.c32 -- подключение одноименных модулей
(копирование бинарников и включение кусочков конфигурации; экспериментальное);
* use/syslinux/%.cfg -- подключение кусочков конфигурации.
Переменные generate.mk:
* BOOTLOADER -- isolinux (TODO: добавить поддержку syslinux для флэшек);
* BOOTLOADER -- isolinux (реализовано с оглядкой на syslinux/syslinux4);
* SYSLINUX_UI -- модуль интерфейса (если не указан, то внутренний prompt);
* SYSLINUX_MODULES -- модули .com или .c32 (перечисляются без расширения);
* SYSLINUX_CFG -- дополнительные кусочки конфигурации (например, localboot).
@@ -23,4 +19,5 @@
TODO: может потребоваться обобщение механизма генерации с учётом
многоуровневых меню и включаемых файлов (которыми лучше не злоупотреблять
из соображений скорости инициализации загрузчика).
из соображений скорости инициализации загрузчика); требуется обеспечить
брендирование заголовков.

View File

@@ -1,3 +1,3 @@
ui gfxboot bootlogo message
menu title mkimage-profiles 2.0
menu title ALT Linux (@mkimage-profiles@)
prompt 0

View File

@@ -1,3 +1,3 @@
ui menu.c32
menu title mkimage-profiles 2.0
menu title ALT Linux (@mkimage-profiles@)
prompt 0

View File

@@ -1,2 +1,2 @@
say mkimage-profiles 2.0
say ALT Linux (@mkimage-profiles@)
prompt 1

View File

@@ -1,3 +1,3 @@
ui vesamenu
menu title mkimage-profiles 2.0
menu title ALT Linux (@mkimage-profiles@)
prompt 0

View File

@@ -1 +1,2 @@
timeout 200

View File

@@ -0,0 +1,5 @@
label live
menu label ^LiveCD (no hard disk needed)
kernel alt0/vmlinuz
append initrd=alt0/full.cz fastboot live lowmem showopts automatic=method:cdrom ramdisk_size=@live_size@ stagename=live

View File

@@ -1,3 +1,4 @@
label harddisk
menu label ^Boot from hard drive as usual
localboot 0x80

View File

@@ -1,3 +1,4 @@
label removable
menu label Boot from ^removable drive
menu label Boot from removable ^drive
localboot 0x00

View File

@@ -1,4 +0,0 @@
label live
menu label ^LiveCD (no hard disk needed)
kernel alt0/vmlinuz
append initrd=alt0/full.cz live ramdisk_size=@live_size@ fastboot stagename=live showopts automatic=method:cdrom

View File

@@ -1,8 +1,10 @@
label linux
menu label ^Install ALT Linux
kernel alt0/vmlinuz
append initrd=alt0/full.cz ramdisk_size=@altinst_size@ changedisk vga=0x314 quiet=1 showopts automatic=method:cdrom
append initrd=alt0/full.cz changedisk fastboot showopts automatic=method:cdrom quiet=1 ramdisk_size=@altinst_size@ vga=0x314
label noapic
menu label ^Failsafe install
kernel alt0/vmlinuz
append initrd=alt0/full.cz ramdisk_size=@altinst_size@ changedisk showopts nolapic noapic
append initrd=alt0/full.cz changedisk lowmem noapic nolapic showopts ramdisk_size=@altinst_size@

View File

@@ -0,0 +1,6 @@
label netinst
menu label Install server-ovz via inter^net
kernel alt0/vmlinuz
append initrd=alt0/full.cz fastboot 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 quiet=1 ramdisk_size=131072 vga=0x314
### hardwired parameters and strings should become dynamic someday

View File

@@ -1,4 +1,5 @@
label rescue
menu label ^Rescue LiveCD
kernel alt0/vmlinuz
append initrd=alt0/full.cz live ramdisk_size=@rescue_size@ fastboot stagename=rescue showopts automatic=method:cdrom
append initrd=alt0/full.cz fastboot live showopts automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue

View File

@@ -1,4 +1,5 @@
label freedos
menu label Live ^FreeDOS
menu label Live Free^DOS
kernel memdisk
append initrd=freedos.img

View File

@@ -6,3 +6,4 @@ label hdt
com32 hdt.c32
append quiet
# no reed for "append pciids=pci.ids memtest=memtest", defaults are fine

View File

@@ -1,3 +1,4 @@
label memtest
menu label ^Memory Test
linux memtest.bin

View File

@@ -0,0 +1,3 @@
# check for shortcut overlaps
check:
@sed -n 's/^.*\^\(.\).*$$/\1/p' *.cfg | sort | uniq -c

View File

@@ -0,0 +1,16 @@
Здесь хранятся кусочки конфигурации для syslinux,
нужные из которых копируются с подстановкой значений
из метапрофиля в профиль и уже там в зависимости от
доступных модулей собираются в конфигурационный файл.
При изменении или добавлении просьба по оформлению
с тем, чтобы легче было отсматривать и сводить:
- параметры append перечисляются в следующем порядке:
+ initrd=...
+ по алфавиту те, что без аргументов
+ по алфавиту те, что имеют аргументы
- в конце файла пустая строка
Для проверки уникальности клавиатурных сокращений
служит команда "make check".

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

@@ -45,9 +45,11 @@ cfg = $(wildcard cfg.in/??$(1).cfg)
#
# arguments get evaluated before recipe body execution thus prep
all: prep debug
cp -pLt $(DSTDIR) -- $(sort \
@cp -pLt $(DSTDIR) -- $(sort \
$(foreach C,$(SYSLINUX_CFG),$(call cfg,$(C))) \
$(foreach M,$(SYSLINUX_MODULES),$(call cfg,$(M))))
@### proper text branding should be implemented
@sed -i 's,@mkimage-profiles@,$(IMAGE_NAME),' $(DSTDIR)/*.cfg
@echo $(SYSLINUX_MODULES) > $(DSTDIR)/modules.list
@echo $(SYSLINUX_FILES) > $(DSTDIR)/files.list
@echo $(BOOTLOADER) > $(DSTDIR)/bootloader
@@ -56,7 +58,7 @@ prep:
@mkdir -p $(DSTDIR)
debug:
@if test -n "$(DEBUG)"; then \
@if [ -n "$(DEBUG)" ]; then \
echo "** BOOTLOADER: $(BOOTLOADER)"; \
echo "** SYSLINUX_UI: $(SYSLINUX_UI)"; \
echo "** SYSLINUX_CFG: $(SYSLINUX_CFG)"; \

View File

@@ -16,15 +16,15 @@ esac
# copy extra files, if any
SYSLINUX_FILES="$(cat .in/files.list)"
if test -n "${SYSLINUX_FILES% }"; then
if [ -n "${SYSLINUX_FILES% }" ]; then
cp -a $SYSLINUX_FILES .
fi
# prune module-specific config snippets; skip built-in one
SYSLINUX_MODULES="$(cat .in/modules.list)"
if test -n "$SYSLINUX_MODULES"; then
if [ -n "$SYSLINUX_MODULES" ]; then
for module in $SYSLINUX_MODULES; do
if test "$modules" == "prompt"; then continue; fi
if [ "$modules" == "prompt" ]; then continue; fi
cp -a $MODDIR/$module.c?? . || rm .in/[0-9][0-9]$module.cfg
done
fi
@@ -33,7 +33,7 @@ fi
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$BOOTLOADER.cfg"
# snippets are not going into the actual image
if test "$DEBUG" != 2; then rm -r .in/; fi
if [ "$DEBUG" != 2 ]; then rm -r .in/; fi
# NB: there will be final macro expansion based on actual image sizes
# (done by ../../scripts.d/10-propagator-ramdisk)

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,THE_KMODULES,virtualbox-addition)
@$(call add,THE_PACKAGES,virtualbox-guest-additions)

View File

@@ -1,10 +1,14 @@
use/x11/xorg:
@$(call add,BASE_LISTS,xorg)
@$(call add,THE_LISTS,xorg)
@$(call add,THE_KMODULES,drm)
use/x11/wacom: use/x11/xorg
@$(call add,THE_PACKAGES,xorg-drv-wacom)
### strictly speaking, runlevel5 should require a *dm, not vice versa
use/x11/runlevel5: use/x11/xorg
@$(call add,BASE_PACKAGES,installer-feature-runlevel5-stage3)
@$(call add,THE_PACKAGES,installer-feature-runlevel5-stage3)
### xdm: see also #23108
use/x11/xdm: use/x11/runlevel5
@$(call add,BASE_PACKAGES,xdm installer-feature-no-xconsole)
@$(call add,THE_PACKAGES,xdm installer-feature-no-xconsole)

View File

@@ -1,14 +1,28 @@
# stage 4: dive into mkimage
GLOBAL_BUILDDIR ?= $(shell pwd)
LINKPREFIX := mkimage-profiles
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_FILE := $(IMAGE_NAME).$(IMAGE_TYPE)
IMAGE_LINK := $(IMAGE_NAME).$(IMAGE_TYPE)
IMAGE_OUTFILE := $(IMAGE_NAME)-$(DATE)-$(ARCH).$(IMAGE_TYPE)
MKI_PACK_RESULTS = $(IMAGE_PACKTYPE):$(IMAGE_OUTFILE)
@@ -18,12 +32,7 @@ COPY_TREE = ./files
# outdir shouldn't be wiped clean before use
CLEANUP_OUTDIR ?=
APTCONF := $(wildcard $(APTCONF))
ifeq (,$(APTCONF))
GLOBAL_HSH_APT_CONFIG = /etc/apt/apt.conf
else
GLOBAL_HSH_APT_CONFIG = $(APTCONF)
endif
GLOBAL_HSH_APT_CONFIG := $(wildcard $(APTCONF))
# the lib/build-*.mk comes from features.in/build-*/lib
include lib/*.mk
@@ -31,17 +40,19 @@ 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-,$(sort $(POSTPROCESS_TARGETS)))
@OUTPATH="$(IMAGEDIR)/$(IMAGE_OUTFILE)"; \
echo "** image: $(IMAGE_OUTFILE)" && \
ln -sf "$(IMAGE_OUTFILE)" "$(IMAGEDIR)/$(IMAGE_FILE)" && \
ln -sf "$(IMAGE_FILE)" "$(IMAGEDIR)/$(LINKPREFIX).$(IMAGE_TYPE)"; \
ln -sf "$$OUTPATH" "$(IMAGE_FILE)"; \
echo "** image: $$OUTPATH" >&2 && \
ln -sf "$(IMAGE_OUTFILE)" "$(IMAGEDIR)/$(IMAGE_LINK)" && \
ln -sf "$${IMAGEDIR#`pwd`/}" "$(OUT_LINK)"; \
ln -sf "$(IMAGE_LINK)" $(OUT_LINK)/"$(CURRENT_LINK).$(IMAGE_TYPE)"; \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
cp -a build.log "$$OUTPATH.log"; \
cp -a distcfg.mk "$$OUTPATH.cfg"; \
@@ -49,5 +60,6 @@ postprocess:
debug:
@echo "TOPDIR=$(TOPDIR)"
@echo "IMAGEDIR=$(IMAGEDIR)"
@echo "ARCH=$(ARCH)"
@echo "GLOBAL_HSH_APT_CONFIG=$(GLOBAL_HSH_APT_CONFIG)"

Some files were not shown because too many files have changed in this diff Show More