Compare commits

...

184 Commits

Author SHA1 Message Date
Michael Shigorin
a4836609d9 0.6.6-alt1
- build helpers refactored
- initial frontend support
2012-05-14 20:48:21 +03:00
Michael Shigorin
d1922af0dd initial frontend support 2012-05-14 20:48:21 +03:00
Michael Shigorin
9eae9d7b15 lib/distro.mk: tiny ISO info tweak
udisks seem to pass up META_VOL_ID;
let's make it a bit more informative.
2012-05-10 21:19:32 +03:00
Michael Shigorin
8be6c2383d citramon: use proprietary 3d drivers
nouveau just didn't work out on a GF7100 at hand
(while nvidia did fine) as well as on a MX440.

Need more real hardware testing though.
2012-05-10 21:18:02 +03:00
Michael Shigorin
e6aa4eccd9 use/installer/kms
Just like livecd-install, graphical installer KMS support
looks better as an optional part of install2 feature.

Of course it's optional only if the release manager is fine
with VESA drivers and not KMS-requiring intel/radeon/nouveau;
thanks led@ for a confirmation just in case.
2012-05-10 21:18:02 +03:00
Michael Shigorin
6b0e583843 live: factored out installation options
After having added metadata dependency livecd-install
started to look more like a feature than like an intermediate
distribution target; so things were shuffled a bit that way.
2012-05-10 21:18:02 +03:00
Michael Shigorin
c83cc111a6 initial kernel and metadata features
This further refines the modular build by making
metadata being a clearly separated feature rather
than having to rely on runtime tests, and also by
moving the code which cares for kernel bits of base
installation (.base list) in a feature of its own.

There's more to it but let's get the ball rolling first.
2012-05-10 21:18:02 +03:00
Michael Shigorin
90930184f3 gear-store-tags 2012-05-07 23:12:29 +03:00
Michael Shigorin
57f7b70900 0.6.5-alt1
- branding feature
2012-05-07 23:11:59 +03:00
Michael Shigorin
c7f056412f branding: actually support installation
The initial work covered live images but missed an installer bit
(thus notes and slideshow were missing in install2) while forgetting
to put branding packages into base list (thus kindly making these
available for *manual* installation sometime after, ouch).
2012-05-07 22:06:16 +03:00
Michael Shigorin
a958b7450d simply: dvd refactoring 2012-05-06 21:58:25 +03:00
Gleb F-Malinovskiy
0d4181bee1 simply: trying to build simply-dvd 2012-05-06 19:27:53 +03:00
Gleb F-Malinovskiy
3e30ebdb4a simply: simplify 50services script 2012-05-06 19:27:50 +03:00
Gleb F-Malinovskiy
4e28b094e7 simply: support for lvm2 and raid in live 2012-05-06 19:27:45 +03:00
Michael Shigorin
71aac4587c initial live-enlightenment
E17 has a lil' bit too thorough setup sequence
for a LiveCD but hey it's worth it anyways :)
2012-05-06 19:17:10 +03:00
Michael Shigorin
efbecbe765 initial live-gimp
It's actually convenient to test new software (moreso stacks)
in a known clean isolated environment ;-)

Thanks "asd" at opennet for the motivation to do it all:
http://www.opennet.ru/openforum/vsluhforumID3/84402.html#109
2012-05-06 19:17:10 +03:00
Michael Shigorin
21325bb436 simply += localboot
It's a bit simpler to choose "boot from hdd"
than to eject a disk/ISO.

No need for the specific apt-conf either.
2012-05-06 19:17:10 +03:00
Michael Shigorin
d66d82943c server-ovz -= kernel-wifi
It doesn't really need WiFi support so far,
and when it does the feature should be done
properly (along with setup tools at least).
2012-05-06 19:17:10 +03:00
Michael Shigorin
ed9b394951 live: add variable debug target too
It was done in other stage2 mods already.
2012-05-06 19:17:10 +03:00
Michael Shigorin
454e7162f3 no build means *no* build (and less reports), really
It's hard to tell a successful build from a failed one
if downstream hides the exit code; it's useless to continue
a `for' loop if a pipe shoves that to a subshell; well it seems
that a bashism is worth a thousand quirks with extra fds here.
Minor regexp enhancements are also due.

reports.mk made a bit more resilient/prudent either.
2012-05-06 19:17:10 +03:00
Michael Shigorin
0439df3159 reports.mk: fixups and hardening
No need for .reports/ in toplevel directory even after build failure,
and a few more hasty hacking fixups are also due, shame on me.
2012-05-06 19:17:10 +03:00
Michael Shigorin
7d09fed79b simply: use/branding
NB: for the feature to work properly the chosen branding
package set should have proper Provides: and Conflicts:,
specifically it must explicitly conflict with the most
lexicographically cool package set around (these days
it's sisyphus-server-light).
2012-05-06 19:17:10 +03:00
Michael Shigorin
51f5b88062 initial branding feature
As duly noted by glebfm@, branding issues need more attention
by now since only stage1/install2 got some of it so far in this
regard.  Hence the dedicated feature comes to the rescue
(well no, it doesn't actually mess with rescue!).
2012-05-04 15:57:06 +03:00
Michael Shigorin
c20e820ac7 features.in: generalize lib/ handling
From now on, subprofiles can include the lib/*.mk
brought in by features just like image.in/ long did.
2012-04-25 14:31:26 +03:00
Michael Shigorin
57d31b9c94 initial `make check'
Thanks glebfm@ yet again :)
2012-04-24 11:11:04 +03:00
Michael Shigorin
1fc86f6e82 gear-store-tags 2012-04-23 23:53:10 +03:00
Michael Shigorin
e10d55d0ad 0.6.4-alt1
- simply better (tm)
2012-04-23 23:41:48 +03:00
Gleb Fotengauer-Malinovskiy
8c042fe775 add simply branding things 2012-04-23 23:35:43 +03:00
Gleb Fotengauer-Malinovskiy
5fc270f996 move simply to conf.d/simply.mk
There will be two types of Simply: DVD and Live versions.
2012-04-23 23:35:43 +03:00
Michael Shigorin
6e6f572b43 better output directory and results structuring
Following m-p-d, a more involved default output directory
structure is feasible now:

  ~/out/name/date/name-date-arch.type

instead of plain

  ~/out/name-date-arch.type

This particular behaviour can be achieved by passing
SORTDIR='$(IMAGE_NAME)/$(DATE)'; note the single quotes.

Reports are also saved in this resulting structure
albeit the place is still highly debatable.
2012-04-23 23:35:43 +03:00
Michael Shigorin
c692da6a06 reports.mk: cosmetic tweaks
REPORT_PATH comes from a makefile;
let's use corresponding notation.
2012-04-23 23:28:40 +03:00
Michael Shigorin
7221c53ccf Makefile: no build means no reports
Trying to extract reports for a failed build is a bad idea.
2012-04-23 23:28:32 +03:00
Michael Shigorin
aed6540702 conf.d/live.mk: dropped extra distro/live-simply-*
That's what command-line variables serve for
(without causing a combinatorial explosion) :)
2012-04-23 23:10:30 +03:00
Gleb Fotengauer-Malinovskiy
a83b7a17cb slinux hacking
- xfce-utils removed from Sisyphus
- apt-indicator needs gksu
- add slinux misc packages:
  + pm-utils
  + strace
- image-scripts.d/50services is a script which starts/stop some services
2012-04-23 23:10:30 +03:00
Gleb Fotengauer-Malinovskiy
3a4ba20a0f some fixes in slinux lists and configuration
use/slinux-live: in p6 slinux had install-dvd version too
lists/slinux/misc-dvd: user 3d-proprietary comes from use/x11/3d-proprietary
lists/slinux/misc-dvd:restore compiz
slinux: use/syslinux/localboot.cfg
2012-04-23 23:10:29 +03:00
Michael Shigorin
305e97d5a2 introduced lib/kernel.mk helper makefile
Sometimes it's desirable to provide the kernel supporting
maximal amount of RAM on the system; bad news is that x86
has a kludge named PAE, good news is that x86_64 doesn't
need it at all; but now we must be able to choose between
those.

BIGRAM will hold the flavour needed.
2012-04-23 23:10:29 +03:00
Michael Shigorin
6647e8996a reports.mk: fixed behaviour with no REPORT set
Toplevel Makefile is a bit optimistic regarding
calling reports.mk...
2012-04-23 23:10:29 +03:00
Michael Shigorin
6ada32dc91 reports.mk: added reports/scripts
This one extracts the exact time-ordered list of script hooks
run while building the image.

Some commons refactoring is also due.
2012-04-23 23:10:29 +03:00
Michael Shigorin
c66e8ae242 several features forgot to show up in FEATURES
This could harm the debug...
2012-04-23 23:10:29 +03:00
Michael Shigorin
674e1482ae live: added preliminary l10n support
The missing part so far is passing "lang=ab_CD" to the kernel;
it's done with gfxboot and is somewhat doable without it...
2012-04-23 23:10:29 +03:00
Michael Shigorin
600fc011cb live: added 03services hook
This script specifies the (excessive) lists of services
to be enabled and disabled explicitly; these are mostly based
on profiles/live/image-scripts.d/init3-services from m-p-d.

There might be systemd related pecularities though...
2012-04-23 23:10:29 +03:00
Michael Shigorin
f57759d6dc initial cinnamon support and livecd
Thanks slava@ for the packages and inspiration,
and aris@ for the useful advice and fixups.
2012-04-23 23:10:29 +03:00
Michael Shigorin
50bfea9d5c cleanup: *support* livecd-install
livecd-install support wasn't added properly;
fixed (thanks glebfm@ yet again).

Something like fine-grained KEEP_* might be due...
2012-04-23 23:10:29 +03:00
Michael Shigorin
d0a8ea6ba8 85cleanup-legacy: less cruel one
The early version considered ISO and KOI encoding families
as obsolete; the current one is a bit more wise and knows
these are just /rare/.  Thanks glebfm@ for #27168 research
and cinnamon by slava@ for ISO-related noises at startup.
2012-04-23 23:10:29 +03:00
Michael Shigorin
dc3002560a conf.d/server.mk: dropped wifi kernel modules
There's no real reason to keep bcmwl and ndiswrapper
around exclusively as the currently available support
vastly takes over the early attempts at the task.

(it's not about bare firmware though, and some day
something like use/hardware/wireless should get in)
2012-04-23 23:10:24 +03:00
Michael Shigorin
4858791145 virtualbox feature renamed to vm, extended
Initial SPICE support has been added for kvm/libvirt installation
and boot-up using qxl and spice by default as proposed by shaba@.

VirtualBox part is shifted a level deeper correspondingly
but otherwise stays the same.
2012-04-18 21:04:11 +03:00
Michael Shigorin
03de0aabac conf.d/live.mk: distro/live-simply
It is actually an effort by glebfm@ to create an experimental
systemd-based Simply Linux LiveCD; I merely reviewed the original
diff, moved kernel related bits to firmware (see preceding commits)
and introduced a dedicated pkglist namespace by creating a directory.
2012-04-11 16:21:08 +03:00
Michael Shigorin
8576a1655b bin/pkgdups: now with a UI frontend
Calling ../../bin/pkgdups with a bunch of pkglists was messy,
so is done algorithmically from now on while in pkg.in/lists:

  make pkgdups
2012-04-10 23:39:53 +04:00
Michael Shigorin
865f4c7614 firmware: mv {MAIN,THE}_PACKAGES
THE_PACKAGES_REGEXP is in place, let's rebase firmware packages
so these would be available in LiveCDs either.

The news for systems being installed is that MAIN_* is optional
while THE_* is included in base system; firmware packages tend
to be pretty tiny and harmless.

kernel-wifi pkglist has absolutely no sense by now, hence purged;
firmware-rt* and firmware-i2400m are merged into firmware-linux.
2012-04-10 23:39:53 +04:00
Michael Shigorin
86c42e2db6 implemented {THE,BASE,LIVE}_PACKAGES_REGEXP
There were STAGE1_PACKAGES_REGEXP and MAIN_PACKAGES_REGEXP
but adding more of those was postponed to avoid bloat and
bitrot; THE_PACKAGES_REGEXP is needed for use/firmware now
and looks like BASE_PACKAGES_REGEXP and LIVE_PACKAGES_REGEXP
will be useful before too long either.

Docs updated to include stage-specific package related vatiables.
2012-04-10 23:39:53 +04:00
Michael Shigorin
a6cc9fa8c3 lib/build.mk: tweaked wreckage filter
A pretty common issue breaking the image build is inter-package
file conflict resulting in hsh-install failure down there.
Let's bring that back to attention conveniently.
2012-04-10 23:39:53 +04:00
Michael Shigorin
780acc8e6b gear-store-tags 2012-04-09 23:02:24 +03:00
Michael Shigorin
d190759717 0.6.3-alt1
- massive squashfs tuning
2012-04-09 22:44:11 +03:00
Gleb Fotengauer-Malinovskiy
1432bb1607 add dummy distro/livecd-install
sub.in/stage2/image-scripts.d/99cleanup-boot,
livecd-install need /boot files too
2012-04-09 22:44:11 +03:00
Michael Shigorin
f4519332e9 READMEs: pkglist related clarification
glebfm@ asked what to do with new package lists: whether these
belong to features, or to distributions themselves.  This question
is actually open and up for discussion but there are guidelines
that can and should be written down already; and so they were.

Added pkgdups utility reference as well.
2012-04-09 22:21:10 +03:00
Michael Shigorin
acaf12c34e doc/variables.txt: ARCHES explained
Multiple ARCHES won't just magically work without
the ability to figure out the correct apt.conf;
fortunately there's just the right example handy
in profiles.mk.sample already.

Thanks glebfm@ for feedback.
2012-04-09 22:08:00 +03:00
Michael Shigorin
8d16069882 stage2: squashfs blocksize tweaks
Looks like the 128k default block size is pretty well chosen:
it saves ~6% of image size compared to 64k, and subsequent
differences are ~3% per doubling the block size up to 1M
(thanks led@ for carrying out the tests).

So we'll stick with 256k for "normal" xz compression (inodes
uncompressed) and get 512k back for "tight" one (compressed).
The runtime performance issues are to be examined yet when
bootchart or the like is deployed, nothing drastic though.

With "fast" (gzip/lzo) squash compression inodes go unmolested.

For the record, tight live-webkiosk builds as 95M image in 3:40,
and tight live-flightgear.iso builds as 669M image in 6:34.  Nice.

There's no much sense going for 1M block size: e.g. live-webkiosk
would drop to 93M (3:46) but its load time would increase up to
2:07 as compared to 1:48 for -b 524288 and 1:42 for -b 262144 -noI
on a Duron 500/512M system given the very same DVD+RW media.
2012-04-09 22:03:29 +03:00
Michael Shigorin
931d23e86c reports.mk: handle missing gra{phviz,cefully}
If there's no dot(1) then its input file should just be stored;
thanks glebfm@ for reminding about this.
2012-04-09 22:03:29 +03:00
Michael Shigorin
6fee43e9cb live: tweak autologin warning
Should be removed when console autologin is there
(mind the live-builder).
2012-04-09 22:03:29 +03:00
Michael Shigorin
fe58c46ead stage2: tunable squashfs compression
The existing implementation would handle kernel differences
just fine but a bit too automatically: if it sees xz support,
that's what will end up being used (and if there's -Xbcj binary
compression filter available for the target platform, it will
be applied unequivocally either).

It's perfectly suitabe for getting fine-tuned release images
but is also a bit too resource-consuming while developing the
image configuration which has no business with its compression.

The one and only knob is SQUASHFS (see doc/variables.txt);
to give an idea of the differences, here are some numbers
for a mostly-binary (43% as per 99-elf-stats) webkiosk livecd
and a rather less so (18%) flightgear one on a dual quad-core
X5570 node (each mksquashfs run used up all the cores):

SQUASHFS | live-webkiosk.iso | live-flightgear.iso
---------+-------------------+---------------------
fast     | 3:30 / 130M       | 5:11 / 852M
normal * | 3:37 / 100M       | 5:35 / 688M
tight    | 3:50 / 98M        | 6:47 / 683M

Thus if the knob isn't fiddled with, the defaults will allow
for a reasonably fast build of a pretty slim image; if one is
building a release or if a particular image is very sensitive
being close to the media capacity then just add SQUASHFS=tight
and see it a percent or two down on size.

Please note that lzo/gzip-compressed images are also quicker
to uncompress thus further helping with test iterations.

Thanks to led@ and glebfm@ for helpful hints and questions.
2012-04-09 22:03:29 +03:00
Michael Shigorin
0cc20d107d power: apm += lphdisk
APM enabled notebooks would usually hibernate to
a partition of special type and special format;
thus to make use of this APM BIOS feature folks
might need a corresponding formatter.
2012-04-09 22:03:29 +03:00
Michael Shigorin
c2996cc493 stage2: 99-elf-stats for squashfs tuning
This kind of test was proposed by led@ to gather statistics
on chroot's contents going to become squashfs (the script
optimizations lowering added overhead from ~10 sec down
to a subsecond range were also proposed by him).

Intentionally not documented in doc/variables.txt due to
the rather lowlevel nature of the probe (at least so far).

The knobs involved are SQUASHFS (the additional effort kicks
in only for "tight" case) and GLOBAL_SQUASHFS_SORT (must be
non-empty for this extra overhead to occur).

Additional experimentation is needed to find out whether
the difference in squashfs size and performance is worth
the trouble (seems the impact is non-zero but pretty minor).
2012-04-09 22:03:29 +03:00
Michael Shigorin
94b2052bfb stage1: halve squashfs block size
gns@ has 512k, led@ suggests that it's too much a bit;
let's try 256k.
2012-04-07 15:46:03 +03:00
Michael Shigorin
665c70a444 use PATH instead of hardwired pathlets
bin/ prefix tried to become a permatemp(tm).  No way.
2012-04-07 15:45:40 +03:00
Michael Shigorin
68022a3222 conf.d/live.mk: add joystick calibration tools
Thanks Chernetsky Andrey for testing and suggesting it.
(NB: currently only t6 build is proper, see input-utils bugs)
2012-04-06 12:41:05 +03:00
Michael Shigorin
88050c9742 lib/log.mk: check hasher version
There is at least one known deficiency for mkimage-profiles:
build.log will be truncated if verbose mode is enabled and
hasher version is lower than 1.3.22.

The check is done here since it's where the logging is arranged,
and doing it in image.in/Makefile would result in the warning
about log-truncating software being truncated by the said software.

Thanks Max Kosmach for reporting this inobviousity.
2012-04-03 16:26:25 +03:00
Michael Shigorin
c6ee8861f4 gear-store-tags 2012-04-02 18:22:09 +03:00
Michael Shigorin
5347d342cc 0.6.2-alt1
- better live-webkiosk and initial live-flightgear
- cleanup, syslinux, xorg feature tweaks
2012-04-02 18:18:52 +03:00
Michael Shigorin
74d1e45a1c docs update
Status updates and readability tweaks all over the place.
2012-04-02 18:13:14 +03:00
Michael Shigorin
dccf9a58b5 conf.d/server.mk += server-nano
A very basic server image with sshd onboard for testing
and very basic installs; thanks legion@ for the query.
2012-04-02 17:16:27 +03:00
Michael Shigorin
9fd0bc143e more readable `make help', finally
The output was still somewhat ragged in 80x24 terminal window
with fmt(1) which wasn't anticipating the word length difference
subsequent column(1) would have to cope with later on.

Thanks Loic Cattani for his shell columnizer implementation:
https://github.com/Arko/Columnize
2012-04-02 17:16:27 +03:00
Michael Shigorin
4afd735adb live-flightgear.iso lacked sound
Thanks snejok@ for spotting the missing, I didn't get around
to tests with headphones...

Also fixed nouveau getting in after target shuffling,
and tweaked firefox homepage to be useful in this context.
2012-03-31 21:08:09 +03:00
Michael Shigorin
3d649db656 live: introduce homepage redirector knobs
There are three more variables to adjust the redirect page:
HOMEPAGE, HOMENAME and HOMEWAIT; e.g. live-webkiosk is now
quite a bit more whitelabel.
2012-03-31 21:08:09 +03:00
Michael Shigorin
b5e6906b56 syslinux configuration revisited
- incompatible change (to fix the rather broken early style):
  use/syslinux/ui-% is now use/syslinux/ui/%;

- default timeout changed to 9 seconds (long enough and keeps
  the countdown in a single figure);

- added totaltimeout of 300 seconds;

- provided live kiosk images with almost-instant boot by default;

...and some other assorted tweaks here and there, sorry.
2012-03-31 21:08:09 +03:00
Michael Shigorin
afd84973d9 live-webkiosk-mini.iso: 85M is enough
Thanks to a reviewer who came with useful feedback and a goal:
http://www.opennet.ru/openforum/vsluhforumID3/83728.html#136
the live-webkiosk image got forked into a separate one:

- dropped DRI, virtualbox GA, mc & co, docs, rpmdb;
- added Russian keyboard layout (ctrl+shift to toggle);
- rebased live-webkiosk onto live-webkiosk-mini ;-)

Maybe vbox guest additions will get back but rpmdb is a bit
impractical on a kiosk squashfs image, even in presence of
aufs rw overlay.
2012-03-31 21:08:09 +03:00
Michael Shigorin
b129c86ac1 xorg reorg
Now is the time for all fonts to be pulled in when needed and not
along with the X server and hardware drivers; tablet support is
moved to a (preexisting) specific target either.

There's no need now to arch-discriminate a few older drivers too.
2012-03-31 21:08:09 +03:00
Michael Shigorin
1b885b3d24 cleanup scripts rehashed
There's much reason for reuse instead of duplication
among the different stage2-based subprofiles.

In particular, the rather monolithic driver cleanup script
of the ancient is better done in several clear pieces with
the final depmod run.

Scripts dropping apt/rpm databases will dump pkglist first.

A script purging /boot/* will honour live-install if present.

Minor inno^Wfixups all over the map too.
2012-03-31 21:08:09 +03:00
Michael Shigorin
ea5ae29ada mind the aptitude
Folks asked to include aptitude in desktop user distros:
http://www.opennet.ru/openforum/vsluhforumID3/83728.html#117
2012-03-30 23:38:26 +03:00
Michael Shigorin
ece828c0dc image.in/Makefile: output image size too
Checking the image size is one of the usual things
after building it, and there's some media related
testing to be ported from m-p-d as well.
2012-03-29 16:30:05 +03:00
Michael Shigorin
50a0c66899 fix live-install image
Removing /boot stuff from the live root was a nice idea
to spare some space except that live-install depends on it...
2012-03-28 21:46:29 +03:00
Michael Shigorin
5ff765275b initial live-flightgear.iso
This one should help (erm... hope not the other way around!)
testing both 3D setup and FlightGear packages I happen to
maintain in a known clean environment.
2012-03-28 21:38:14 +03:00
Michael Shigorin
9555f1f69a enhanced 3D graphics support
The previous configuration would result in intel-only
3D being available since nouveau and radeon kernel modules
are packaged separately with most kernel-images; getting
NVIDIA/AMD drivers in is more tricky due to availability
of both proprietary and free implementations with the choice
being rather a tradeoff in each case (somewhat less so with
ATI/AMD drivers).

So this is a first shot at the problem: FlightGear would
freeze on me with today's nouveau.
2012-03-28 21:38:14 +03:00
Michael Shigorin
87502d2a4a live-tde += ru
This is actually a band-aid until decent l10n is there...
2012-03-28 21:37:11 +03:00
Michael Shigorin
d39b0b984a live index.html: fix typo
The <html> tag wasn't closed but actually duplicated;
thanks Aleksey Ilchenko for spotting.
2012-03-27 11:30:50 +03:00
Michael Shigorin
587eac45ec tweak the fatal errorlevel
127 is also returned by dot(1), and we're toasted
if unable to create $(BUILDDIR).
2012-03-27 08:36:23 +03:00
Michael Shigorin
d6e899d129 gear-store-tags 2012-03-26 23:24:24 +03:00
Michael Shigorin
edfdeca311 0.6.1-alt1
- ISO9660 metadata support
- initial alien VE image
2012-03-26 23:23:30 +03:00
Michael Shigorin
b6e640bd8d slimmer webkiosk with Russian layout
Thanks someone for review and feedback:
http://www.opennet.ru/openforum/vsluhforumID3/83728.html#136

Better cleanup and i18n controls are due but in the meantime,
let's at least build something actually useful.
2012-03-26 23:17:41 +03:00
Michael Shigorin
0c41e39ec0 initial alien image support
"Alien" rather means "CentOS-based" than "xenophilic" here;
in case you still wonder: http://www.altlinux.org/Hasher/CentOS
2012-03-26 22:40:40 +03:00
Michael Shigorin
ed7bf0db9f initial ISO9660 metadata support
As was noted by Alexey Shabalin in libosinfo context,
current ALT Linux images tend to lack ISO9660 metadata
-- which they did have back in the day of Master 2.4.

Please note that the data collection occurs this way
due to mkimage's config.mk resetting the values to be
empty; this was worked around by using another config
file, $(BUILDDIR)lib/iso.mk, and including it later
but that would require a separate target with per-target
CONFIG variable which isn't elegant at all given the need
to actually build up the metadata set.

So the variables were changed (to be more readable anyways)
and then proxied back to BOOT_*.  This might be cleaned up
some day after the inclusion order is tweaked or mkimage
defaults get set-if-unset-yet (?=).
2012-03-26 22:23:28 +03:00
Michael Shigorin
17bd880e19 ve/generic += openssh suite
openssh-server is in need indeed on almost any server instance;
thanks Aleksey Cheusov for reporting the shortage.

This might be amended in the future but is reasonable right now.
2012-03-25 21:46:45 +03:00
Michael Shigorin
80090d1f1a minor tweaks (no functional changes)
Mostly multiline compactions, but also use/install2/net
got factored out from distro/server-ovz for future reuse.
2012-03-21 15:55:24 +02:00
Michael Shigorin
7ffd600076 gear-store-tags 2012-03-19 19:26:10 +02:00
Michael Shigorin
1b7ce25f10 0.6.0-alt1
- reports (targets graph)
2012-03-19 19:23:38 +02:00
Michael Shigorin
5dba27d011 main.mk: factored out help targets
These are better off in their own lib/help.mk
2012-03-19 19:23:38 +02:00
Michael Shigorin
79bb3f8d6e plant SHELL beacons into all config-forming rules
As noted in doc/assumptions.txt, the SHELL based target tracing
only works for rules with recipes, even empty but present ones.

The simplest thing to do is hooking "; @:" onto the rule's tail
(one-liner with a non-printing shell builting "true" command).
2012-03-19 19:23:38 +02:00
Michael Shigorin
788cad885e initial target tracing support and reporting
The purpose is being able to examine particular target interdependency
graph for a given image having been configured to avoid convoluted
dependencies (loops in particular).

The implementation is based on SHELL hook hint by John Graham-Cumming:
http://cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
2012-03-19 19:23:38 +02:00
Michael Shigorin
a52b7476a4 initial "+shortcut" support and refactoring
It looks like the intermediate targets aren't all equal:
some define a finished feature while some create a common
lower level piece of configuration.

Let's do shortcuts for the former so that a distro line can be
more terse and descriptive; help targets in features.in/ tweaked
accordingly.
2012-03-19 13:14:07 +02:00
Michael Shigorin
deb63e0d63 gear-store-tags 2012-03-12 22:15:54 +02:00
Michael Shigorin
3f85ed2b19 0.5.7-alt1
- distro tweaks
2012-03-12 22:15:06 +02:00
Michael Shigorin
a07959e2f5 hide intermediate distro targets
There are pseudo-distro targets that are useful to combine
the needed bits and pieces for a few more different end-user
images but that are useless themselves (e.g. desktop-base
wouldn't even start X session before someone would have
installed a window manager).

Let's just hide these under the hood so that `make help',
`make everything' and potential frontends don't bother.
2012-03-12 22:07:18 +02:00
Michael Shigorin
af6b9940de initial TDE distros
A minimal live, tiny desktop system and a test LTSP installer;
all of these work.
2012-03-12 11:52:44 +02:00
Michael Shigorin
71f44090c5 initial TDE (KDE3 descendant) support
The package list taken from mkimage-profiles-desktop
and trimmed down due to current TDE packaging difference
as well as extras being defined elsewhere.
2012-03-12 11:52:44 +02:00
Michael Shigorin
872afb3c0c refactored base part from distro/ltsp-icewm
ltsp-icewm used to be the only ALTSP (testbed) distro over here
but now its terminal server part works good enough to seperate
it from the UI part.

A few additions to facilitate testing, tweaking and benchmarking:
iftop, openssh-server, mplayer
2012-03-12 11:49:48 +02:00
Michael Shigorin
191388d7cf tweak razor-qt extras list
ptbatterysystemtray is a bit annoying out-of-box,
should run only if battery found and should not
throw up a dialog upfront for no real reason.
2012-03-07 16:00:40 +02:00
Michael Shigorin
70f2a70fca conf.d/live.mk: autologin rehash
If we have a supported display manager, we should rather autoconfigure
that one for autologin instead of configuring autologin package:
those tend to play better with "modern" session management in terms
of runlevel control etc.

xdm doesn't really differ though.

TODO: maybe skip autologin *package* configuration if any dm found
in the live image-script?
2012-03-07 15:57:07 +02:00
Michael Shigorin
dc9b706619 features.in/live: implemented lightdm autologin
The main part is done as per
https://wiki.archlinux.org/index.php/LightDM#Enable_Autologin;
there's an issue that the lightdm developer insist that autologin
user belongs to "nopasswdlogin" group though.
2012-03-07 15:57:07 +02:00
Michael Shigorin
50c27a1782 ltsp += alsa-utils
alsamixer *is* useful :)
2012-03-07 14:21:57 +02:00
Michael Shigorin
3aaa45dd23 conf.d/live.mk: add firmware to all X11 livecds
GPU firmware might have been missing otherwise...
2012-03-05 18:16:46 +02:00
Michael Shigorin
a0af945d7f essentially added firefox to live-icewm
(via a specially crafted pkglist name)
2012-03-05 18:16:46 +02:00
Michael Shigorin
a681b4bd98 features.in/README: un-document tagged scripts
These are gone for now, this fix should have been done before.
2012-02-21 11:54:35 +02:00
Michael Shigorin
b7a395c012 gear-store-tags 2012-02-20 22:44:16 +02:00
Michael Shigorin
a8e70fd4e6 0.5.6-alt1
- minor fixups
2012-02-20 22:43:10 +02:00
Michael Shigorin
cff036c212 doc/assumptions.txt: specify minimal gmake version
From what I've read so far, most of the code should run on 3.80;
there seem to have been some bits that are dependent on 3.81
features, but there is not a bit that depends on 3.82+ features
so far.
2012-02-18 09:48:38 +02:00
Michael Shigorin
482e7bc9f3 features.in/x11: add lightdm support
It's preferred for Razor-qt's logout app to be able to turn
the system off or reboot it; xdm lacks consolekit support.

Thanks Alexander Sokoloff for the hint.
2012-02-17 12:11:11 +02:00
Michael Shigorin
e1ef65b410 live-razorqt: adapted for razor-qt 0.4.1 packages
The main package has been renamed from razorqt to razor-qt
to fit upstream brand better.
2012-02-16 13:42:42 +02:00
Michael Shigorin
a62cdfa69e 50-etcnet-dhcp: moved from dev to live feature
If there's an ethernet interface, a DHCP client, and these
can result in connectivity out-of-box, then it's rather
a feature for almost any LiveCD.

Thus the configuration script is moved from dev feature
to live one with the addition of dhcpcd/dhclient test.
This is asking for some more neat solution though...
2012-02-16 13:42:42 +02:00
Michael Shigorin
045ae269b2 updated ltsp pkglist
alterator-ltsconf needs further testing,
and aplay is handy for remote audio tests.
2012-02-14 20:25:12 +02:00
Michael Shigorin
345319805d 10bootloader: replace both grub and lilo
As it happens, I've stumbled upon a successfully built image
with alterator-grub in BASE and lilo in install2's installer-steps.
Of course the installer bailed out after dealing with packages :-/

Thanks Leo-sp50 for pointing out the (hopefully) right direction.
2012-02-09 17:47:10 +02:00
Michael Shigorin
9c6824ea57 grub by default in "production" targets
There's still an annoying problem (a race?) manifesting itself
as installer bailing out between packages installation and lilo
setup with X segfault in logs; while the culprit is not known yet,
let's avoid that for most images by moving the bootloader request
from the former "leaf" target (which noe became a "node") into an
experimental server-systemd one.

Thanks Leo-sp50 for bringing that to my attention again; see also
http://forum.russ2.com/index.php?showtopic=3310&pid=31364&st=0&#entry31364
2012-02-09 09:41:12 +02:00
Michael Shigorin
62ab13cc77 distro/installer related graph cleanup
As was duly noted by Leo-sp50, both server.mk and desktop.mk
duplicate a few bits layered over bare distro/installer which
happened to be both a dependency (thus should reduce redundancy)
and a "real distro" target (well, it doesn't just work yet, need
to provide networking and sources.list in install2 by hand).

Fixed by moving a "node" to distro/.installer along with typical
additions and leaving a bare installer as is by now; there's a
need to get it working at least for DHCP/ftp.altlinux.org case.
2012-02-09 09:33:39 +02:00
Michael Shigorin
4355f401db image.in/Makefile: introduced save-profile
From now on, non-empty SAVE_PROFILE variable will indicate
the need to carry the particular generated profile inside
the image built from it.

Thanks gns@ for this feature in liveflash.eeepc.
2012-02-07 22:21:33 +02:00
Michael Shigorin
3dd020338b "untag" install2 tagged scripts
So far the tagged scripts concept is too fragile,
and these were used unconditionally anyways.

features.in/Makefile is broken regarding copying
tagged scripts right now...
2012-02-07 22:19:17 +02:00
Michael Shigorin
402b6e080b pkg.in/lists/Makefile: fixed committing what's copied
Was broken during dot-base introduction
by wrong recipe split...
2012-02-06 21:49:31 +02:00
Michael Shigorin
ca67a20952 renamed base+server+disk pkglist to server+extra
This is to fit base/extra separation better
and to avoid lvm2 creeping into VE images.
2012-02-06 20:18:14 +02:00
Michael Shigorin
5c5c4a6a6b gear-store-tags 2012-02-06 17:10:41 +02:00
Michael Shigorin
0ad3c6b8bd 0.5.5-alt1
- live-related tweaks (including live.hooks support)
- terminal server and webkiosk images
2012-02-06 17:09:33 +02:00
Michael Shigorin
f044bdbc33 xorg: added xorg-dri-intel explicitly
xorg-drv-intel doesn't pull it in at the moment:
https://bugzilla.altlinux.org/25044
2012-02-06 13:14:35 +02:00
Michael Shigorin
202f473499 conf.d/live.mk: live-webkiosk += live.hooks
Rather convenient for native flash images but can also be
beneficial with usual ISO by editing one before burning it.
2012-02-06 12:58:20 +02:00
Michael Shigorin
97e1be6a31 features.in/live: introduced live.hooks support
The implementation builds upon liveflash.eeepc by gns@;
thanks <sol/codis.ru> who suggested adding it to live-webkiosk
2012-02-06 12:58:20 +02:00
Michael Shigorin
c39c100cdc conf.d/live.mk: initial live-webkiosk
This one starts up a Firefox session in kiosk mode
(there are several extensions, I find hsv@'s one
preferable) and tries to browse /image/index.html
which corresponds to index.html in the image root
(could be edited by means of e.g. isomaster).
2012-02-06 12:58:20 +02:00
Michael Shigorin
bc091ab919 conf.d/live.mk: factor commons into distro/.live-x11
It's rather unexpected that someone would do an X11 LiveCD
without user autologin -- but even if that's the case,
then this waypoint is just not used for it.
2012-02-06 12:58:20 +02:00
Michael Shigorin
8b39c4af27 lists/tagged/rescue+extra += chntpw
Thanks ildar@ for the reminder:
http://www.altlinux.org/Talk:ALT_Linux_5.0_Rescue
2012-02-06 12:58:20 +02:00
Michael Shigorin
6cd6a0ff0d features.in/bootloader: mind the make
Document the one-way nature of bootloader type switching.
2012-02-06 12:58:20 +02:00
Michael Shigorin
7a3ab55db4 image.in/Makefile: fixed thinko regression
MKI_VERSION was tested against even before the config.mk
that defines it got included.  Ouch.
2012-02-06 12:58:20 +02:00
Michael Shigorin
0c97aaf80b ltsp-icewm += firefox
That way it's at least marginally useful...
2012-02-06 12:58:20 +02:00
Michael Shigorin
01a03d037b features.in/ltsp: support x86_64 clients
Courtesy of prividen@, there's actual x86_64 client support in ALTSP.
Although led@ tells that it's i586 optimization that hurts on i686+
and should be replaced with either i486 or i686 for that matter...
2012-02-06 12:58:20 +02:00
Michael Shigorin
33fe8cbd1f initial ltsp feature
Sort of builds on current Sisyphus with ltsp-related packages
fixed up in a pocket but the latter are rather in need of some
proper face-lift.
2012-02-06 12:58:20 +02:00
Michael Shigorin
178a700e6e 03-test-kernel: tweak squashfs compression
A larger block size was recommended by led@;
gns@ seems to concur as the 512k value was borrowed
from liveflash.eeepc profile (along with -noI).

The other issue is with binary specific compressors:
x86 was clearly assumed while the data for an educated
guess are pretty handy.  Please note that using filters
incurs additional compression attempts for the utility
to choose the best result.
2012-01-18 23:33:29 +02:00
Michael Shigorin
3fcbed3378 features.in/live: added 90-cleanup-boot script
Spotted /boot/vmlinuz* in a live environment,
and wondered why waste a few megs of potentially
precious space...
2012-01-18 23:11:04 +02:00
Michael Shigorin
d9a0d305ee gear-store-tags 2012-01-16 22:38:37 +02:00
Michael Shigorin
8473fda02d 0.5.4-alt1
- better diags for initial deployment
2012-01-17 00:36:43 +04:00
Michael Shigorin
9304c12c58 fix toplevel arch/distro loops
There was a somewhat subtle Makefile->main.mk rename leftover
lurking in "everything" target: the default Makefile got used,
not the supposed main.mk -- which resulted in an attempt to
get way too much job done (the number of builds per target
became $ARCH squared, not just $ARCH).

Huge thanks to led@ for being an inspiring pedantic!
2012-01-17 00:32:54 +04:00
Michael Shigorin
b95caa9b73 lib/ve.mk: introduced ve/bare
A minimal chroot supporting extension via apt-get;
vitals if built on Sisyphus as of Jan 16, 2012:

  i586: 13M tar.xz, 58M chroot (33M w/o /usr/share/{doc,locale,man})
x86_64: 14M tar.xz, 60M chroot (35M w/o /usr/share/{doc,locale,man})

Trivial fixups (extra checks) added to two script hooks.
2012-01-16 20:10:16 +04:00
Michael Shigorin
804cedbca5 features.in/build-distro: initial isosort implementation
mkisofs can use hints on file disposition; this needs some
support on mkimage side but that's pretty trivial (hope to
see it in 0.2.2+).
2012-01-15 23:00:19 +02:00
Michael Shigorin
efa73b97f0 sub.in/stage1/Makefile: comment fixup
Referring to install2 subprofile after it got generalized
and renamed to stage2 is an omission, better fix it late
than never.
2012-01-11 15:54:59 +02:00
Michael Shigorin
5a7b6b5739 icewm.iso: use desktop installer
It's burdensome for testing but at least the result
is somewhat useful then.
2012-01-11 15:54:55 +02:00
Michael Shigorin
df0861ad02 Makefile: dummy commit
The point is to give Colin S. Miller the credit for
a hack to get the current goal's word-in-a-list position:
http://lists.gnu.org/archive/html/help-gnu-utils/2010-05/msg00004.html
2012-01-11 12:23:12 +02:00
Michael Shigorin
37f050d227 features.in/bootloader: README update
The dependency is actually long gone since the current hack
is to just replace hardwired "grub" in an installer-steps
with whatever got configured...
2012-01-11 10:35:52 +02:00
Michael Shigorin
5a1065c33e bin/mktmpdir: check for filesystem mount options
As was found out by Vladimir Karpinsky (thanks for patience!),
the autochosen directory might still have too restrictive mount
options -- nodev and/or noexec.  Hopefully the diags are a bit
better and faster by now.
2012-01-10 16:00:56 +02:00
Michael Shigorin
87bfa3f65d check vigorously the autochosen path prefix either
It happens that if the host environment isn't particularly
tuned up for package builds already then bin/mktmpdir might
come up with a directory outside hasher-allowed prefix list;
now that's a shame and not a Christmas gift, clearly.

Thanks Vladimir Karpinsky for pointing this problem out too.
2012-01-06 19:15:07 +02:00
Michael Shigorin
0ec7d7cd01 check vigorously for installed mkimage
It was briefly mentioned in QUICKSTART but somehow managed
to evade the commandlines provided.  And while at it, let's
make errors like this more explicit to avoid extra lookups.
Oh, and fix QUICKSTART so that readers miss the hassle. :)

Thanks Vladimir Karpinsky for pointing this problem out.
2012-01-04 22:33:53 +02:00
Michael Shigorin
426c985da3 syslinux: piggybacking cleanups
Avoid extra files where a variable would suffice; and use
the more specific "syslinux.list" rather than a "files.list".
2012-01-04 15:50:01 +02:00
Michael Shigorin
8fbf3585b0 40-autologin: don't do runlevel 5 if X is absent
We can do textmode live images, after all.
Some sort of autologin would be useful there too
but doing it right is less obvious to me at the moment...
2012-01-03 15:09:33 +02:00
Michael Shigorin
a7ac4f236c gear-store-tags 2012-01-02 21:01:33 +02:00
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
205 changed files with 2448 additions and 595 deletions

View File

@@ -1,5 +1,5 @@
Name: mkimage-profiles
Version: 0.5.1
Version: 0.6.6
Release: alt1
Summary: ALT Linux based distribution metaprofile
@@ -15,6 +15,8 @@ Requires: rsync git-core
Requires: time schedutils
Requires: mkimage >= 0.2.0
# Recommends: graphviz
%define mpdir %_datadir/%name
%add_findreq_skiplist %mpdir/*.in/*
@@ -37,7 +39,7 @@ Virtual environment template caches (OpenVZ/LXC) can be made either.
In short, setup hasher (http://en.altlinux.org/hasher) and here we go:
cd %mpdir
head README
make distro/syslinux.iso
make syslinux.iso
But if you're into regular distro hacking and are not afraid of make
and modest metaprogramming (some code generation and introspection),
@@ -59,6 +61,50 @@ cp -a * %buildroot%mpdir
%doc README QUICKSTART
%changelog
* Mon May 14 2012 Michael Shigorin <mike@altlinux.org> 0.6.6-alt1
- build helpers refactored
- initial frontend support
* Mon May 07 2012 Michael Shigorin <mike@altlinux.org> 0.6.5-alt1
- branding feature
* Mon Apr 23 2012 Michael Shigorin <mike@altlinux.org> 0.6.4-alt1
- simply better (tm)
* Mon Apr 09 2012 Michael Shigorin <mike@altlinux.org> 0.6.3-alt1
- massive squashfs tuning
* Mon Apr 02 2012 Michael Shigorin <mike@altlinux.org> 0.6.2-alt1
- better live-webkiosk and initial live-flightgear
- cleanup, syslinux, xorg feature tweaks
* Mon Mar 26 2012 Michael Shigorin <mike@altlinux.org> 0.6.1-alt1
- ISO9660 metadata support
- initial alien VE image
* Mon Mar 19 2012 Michael Shigorin <mike@altlinux.org> 0.6.0-alt1
- reports (targets graph)
* Mon Mar 12 2012 Michael Shigorin <mike@altlinux.org> 0.5.7-alt1
- distro tweaks
* Mon Feb 20 2012 Michael Shigorin <mike@altlinux.org> 0.5.6-alt1
- minor fixups
* Mon Feb 06 2012 Michael Shigorin <mike@altlinux.org> 0.5.5-alt1
- live-related tweaks (including live.hooks support)
- terminal server and webkiosk images
* Mon Jan 16 2012 Michael Shigorin <mike@altlinux.org> 0.5.4-alt1
- better diags for initial deployment
* Mon Jan 02 2012 Michael Shigorin <mike@altlinux.org> 0.5.3-alt1
- multi-target, multi-arch, single-job builds
* Mon Dec 19 2011 Michael Shigorin <mike@altlinux.org> 0.5.2-alt1
- THE_{KMODULES,PACKAGES,LISTS,GROUPS}
- incremental development, refactoring and bugfixing
* 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

View File

@@ -0,0 +1,6 @@
object 57f7b70900d8764dd39eb78b1281769edc971db8
type commit
tag v0.6.5
tagger Michael Shigorin <mike@altlinux.org> 1336421542 +0300
branding

View File

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

View File

@@ -1 +1 @@
851085a67914bd2f9470cf81f552b06a9b98d83d v0.5.0
2875a11aad94e07a8a7183698f1481cb441e1c6d v0.6.5

126
Makefile
View File

@@ -1,75 +1,57 @@
# steps to build a distribution image:
# --- here
# 1. initialize new profile (BUILDDIR) as a copy of image.in/
# 2. configure distro
# 3. copy the needed bits from metaprofile to a new profile
# --- in BUILDDIR
# 4. build subprofiles and subsequently an image
# umbrella mkimage-profiles makefile:
# iterate over multiple goals/arches,
# collect proceedings
help:
@echo '** available distribution targets:'
@echo $(DISTROS) | fmt -sw"$$((COLUMNS>>1))" | column -t
@echo
@echo '** available virtual environment targets:'
@echo $(VES) | fmt -sw"$$((COLUMNS>>1))" | column -t
MKIMAGE_PROFILES = $(dir $(lastword $(MAKEFILE_LIST)))
# only process the first target (inter-target cleanup is tricky)
IMAGE_TARGET := $(firstword $(MAKECMDGOALS))# ve/generic.tar.gz
ifeq (./,$(dir $(IMAGE_TARGET)))# convenience fallback
IMAGE_TARGET := distro/$(IMAGE_TARGET)# for omitted "distro/"
# for immediate assignment
ifndef ARCHES
ifdef ARCH
ARCHES := $(ARCH)
else
ARCHES := $(shell arch | sed 's/i686/i586/')
endif
IMAGE_CONF := $(firstword $(subst ., ,$(IMAGE_TARGET)))# ve/generic
IMAGE_CLASS := $(firstword $(subst /, ,$(IMAGE_TARGET)))# ve
IMAGE_FILE := $(lastword $(subst /, ,$(IMAGE_TARGET)))# generic.tar.gz
IMAGE_NAME := $(firstword $(subst ., ,$(IMAGE_FILE)))# generic
IMAGE_TYPE := $(subst $(IMAGE_NAME).,,$(IMAGE_FILE))# tar.gz
# preferences
-include $(HOME)/.mkimage/profiles.mk
# most of the actual work done elsewhere
include lib/*.mk
include conf.d/*.mk
include features.in/*/config.mk
DISTRO_TARGETS := $(shell sed -n 's,^\(distro/[^:.]\+\):.*$$,\1,p' \
lib/distro.mk $(wildcard conf.d/*.mk) | sort -u)
VE_TARGETS := $(shell sed -n 's,^\(ve/[^:.]\+\):.*$$,\1,p' \
lib/ve.mk $(wildcard conf.d/*.mk) | sort -u)
DISTROS := $(call addsuffices,$(DISTRO_EXTS),$(DISTRO_TARGETS))
VES := $(call addsuffices,$(VE_EXTS),$(VE_TARGETS))
IMAGES := $(DISTROS) $(VES)
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS)
### suboptimal but at least clear, reliable and convenient
all:
@n=1; sum=$(words $(DISTROS)); \
for distro in $(DISTROS); do \
echo "** building $$distro:"; \
$(MAKE) --no-print-directory \
ALL=$$n/$$sum \
BUILDDIR=$(BUILDDIR) \
$$distro; \
echo; \
n=$$(($$n+1)); \
done
$(IMAGES): debug \
config/with/$(IMAGE_CONF) \
config/like/$(IMAGE_CLASS) \
config/name/$(IMAGE_NAME) \
config/pack/$(IMAGE_TYPE) \
build; @:
# convenience shortcut
$(DISTROS:distro/%=%): %: distro/%
debug:
ifeq (2,$(DEBUG))
@$(foreach v,\
$(filter IMAGE_%,$(sort $(.VARIABLES))),\
$(warning $v = $($v)))
endif
export ARCHES
export PATH := $(CURDIR)/bin:$(PATH)
# supervise target tracing; leave stderr alone
ifdef REPORT
export REPORT_PATH := $(shell mktemp --tmpdir mkimage-profiles.report.XXXXXXX)
POSTPROC := | report-filter > $(REPORT_PATH)
endif
# recursive make considered useful for m-p
MAKE += -r --no-print-directory
DIRECT_TARGETS := clean distclean check help help/distro help/ve
.PHONY: $(DIRECT_TARGETS)
$(DIRECT_TARGETS):
@$(MAKE) -f main.mk $@
export NUM_TARGETS := $(words $(MAKECMDGOALS))
# for pipefail
SHELL = /bin/bash
# real targets need real work
%:
@n=1; \
set -o pipefail; \
say() { echo "$$@" >&2; }; \
if [ "$(NUM_TARGETS)" -gt 1 ]; then \
n="`echo $(MAKECMDGOALS) \
| tr '[[:space:]]' '\n' \
| grep -nx "$@" \
| cut -d: -f1`"; \
say "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
fi; \
for ARCH in $(ARCHES); do \
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then say; fi; \
say "** ARCH: $$ARCH" >&2; \
if $(MAKE) -f main.mk ARCH=$$ARCH $@ $(POSTPROC); then \
if [ -n "$$REPORT" ]; then \
$(MAKE) -f reports.mk ARCH=$$ARCH; \
fi; \
fi; \
done; \
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then say; fi

View File

@@ -15,12 +15,13 @@
команды
~~~~~~~
- от имени root:
# apt-get install hasher git-core
# apt-get install mkimage hasher git-core
# hasher-useradd USER
- от имени пользователя (после повторного входа):
$ git config --global user.email "my@email"
$ git config --global user.name "My Name"
$ mkdir ~/out
- тестовая сборка (см. тж. lib/distro.mk, doc/variables.txt):
$ make distro/icewm.iso

9
README
View File

@@ -1,12 +1,12 @@
Welcome to mkimage-profiles!
English quickstart: make distro/server-base.iso;
English quickstart: make server-mini.iso;
see http://en.altlinux.org/Hasher (and a large tmpfs).
Configurables: ~/.mkimage/profiles.mk;
see doc/profiles.mk.sample and libdistro.mk
see doc/variables.txt and conf.d/README
License: GPLv2+, see COPYING.
License: GPLv2+, see COPYING
Most docs are in Russian, welcome to learn it or ask for English.
См. тж. http://www.altlinux.org/Mkimage/Profiles/m-p
@@ -34,7 +34,7 @@ Most docs are in Russian, welcome to learn it or ask for English.
Объекты:
- дистрибутивы и виртуальные окружения:
+ описываются в conf.d/*.mk или соответственно lib/{distro,ve}.mk
+ могут основываться одно на другом
+ могут основываться на предшественниках, расширяя их
+ дистрибутивы также:
- включают один или более субпрофилей по надобности
+ желательно избегать множественного наследования, см. тж. фичи
@@ -58,3 +58,4 @@ Most docs are in Russian, welcome to learn it or ask for English.
+ указанный явно,
+ либо ~/out/ (если возможно),
+ или $(BUILDDIR)/out/ иначе
- формируются отчёты, если запрошены (REPORTS)

36
bin/columnize Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
# columnize.sh
# Take a list of values and output them in a nicely formatted column view.
# Author: Loïc Cattani "Arko" <loic cattani at gmail com>
# https://github.com/Arko/Columnize
values=($*)
longest_value=0
# Find the longest value
for value in ${values[@]}; do
if [[ ${#value} -gt $longest_value ]]; then
longest_value=${#value}
fi
done
# Compute column span
term_width=${COLUMNS:-$(tput cols)}
(( columns = $term_width / ($longest_value + 2) ))
# Print values with pretty column width
curr_col=0
for value in ${values[@]}; do
value_len=${#value}
echo -n $value
(( spaces_missing = $longest_value - $value_len + 2 ))
printf "%*s" $spaces_missing
(( curr_col++ ))
if [[ $curr_col == $columns ]]; then
echo
curr_col=0
fi
done
# Make sure there is a newline at the end
if [[ $curr_col != 0 ]]; then echo; fi

View File

@@ -1,20 +1,53 @@
#!/bin/sh
# analyze free space, preferring tmpfs over really many gigaz
# and taking into account configured hasher workdir prefices
# hope there aren't spaces in RM's $HOME are they?
DIRS="$TMP $TMPDIR $HOME/hasher /tmp /var/tmp"
DIRS="$TMP $TMPDIR $HOME/hasher /tmp /var/tmp .."
MINSIZE=262144 # face control criterion
# poor man's SourceIfExists()
try_source() { [ -f "$1" ] && . "$1"; }
# hasher accepted ones
get_prefices()
{
try_source /etc/hasher-priv/system
try_source `/usr/libexec/hasher-priv/getconf.sh`
echo "$prefix" | tr ':' '\n' | while read i; do realpath "$i"; done
}
# drop candidates that hasher won't handle anyways
# NB: doesn't take --number into account,
# prefix lists are defined by the primary configuration
contemplate_dirs()
{
for d in "$@"; do
D="`realpath "$d"`";
for p in `get_prefices`; do
[ "${D#$p}" = "$D" ] || echo "$D";
done;
done \
| uniq # _not_ sort -u
}
# hasher emits no meaningful errors regarding those, sigh
check_options()
{
! egrep -q "^$1 $2 .*no(dev|exec)" /proc/mounts
}
# pick existing, writeable, >256M free space dirs
# rank them wrt type: tmpfs > realfs > rootfs
choose_tmpdir() {
for i in $DIRS; do
for i in "$@"; do
[ -d "$i" -a -w "$i" ] || continue
echo -n "$i "
df -Tl "$i" | tail -1
done \
| sort -unk6 \
| while read dir dev fstype size used free percent mnt; do
check_options "$dev" "$mnt" || continue
[ "$free" -gt "$MINSIZE" ] || continue
[ "$fstype" = "tmpfs" ] && { echo "2 $dir $free"; continue; }
[ "$mnt" = "/" ] && { echo "0 $dir $free"; continue; }
@@ -25,5 +58,24 @@ choose_tmpdir() {
| cut -f2 -d' '
}
DIR="`choose_tmpdir`"
mktemp -d "${1:-tmpdir}.XXXXXXX" --tmpdir="${DIR:-`realpath ..`}"
# bringing it all together
TMPDIRS="`contemplate_dirs $DIRS`"
if [ -z "$TMPDIRS" ]; then
echo "error: no suitable directories found;" >&2
echo "please check docs, filesystem and hasher setup" >&2
echo "(mount enough tmpfs into /tmp or fix hasher-priv prefix?)" >&2
exit 1
fi
TEMP="`choose_tmpdir $TMPDIRS`"
if [ -z "$TEMP" ]; then
echo "error: no suitable directories found;" >&2
echo "please check hasher docs and filesystem setup" >&2
echo "(nodev and/or noexec on an otherwise suitable filesystem?)" >&2
exit 1
fi
DIR="$TEMP/`dirname "$1"`"
NAME="`basename "${1:-tmpdir}"`"
mkdir -p "$DIR" # in case $1 contains slash(es)
mktemp -d "$NAME.XXXXXXX" --tmpdir="${DIR%/.}"

4
bin/report-filter Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
# filter worker make stdout for report scripts
grep '^trace:building ' | uniq

33
bin/report-targets Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
echo "digraph {"
echo " { node [fontname=Helvetica,fontsize=20];"
while read first second third rest; do
FROM=; TO=
case "$first" in
"trace:building")
case "$third" in
"->")
FROM="$second"; TO="$rest";;
*)
continue;;
esac
;;
*)
continue;;
esac
[ -n "$FROM" -a -n "$TO" ] || continue
for to in $TO; do
out=" \"$FROM\" -> \"$to\""
case $to in
*distro/*)
echo "$out [weight=10];";;
*)
echo "$out";;
esac
done
done
echo " }"
echo "}"

52
bin/report-targets2vars Executable file
View File

@@ -0,0 +1,52 @@
#!/bin/sh
DISTCFG=build/distcfg.mk
[ -s "$DISTCFG" ] || exit 1
VARIABLES=
echo "graph { rankdir=LR;"
echo " { node [height=.1,width=.3,fontname=Helvetica,fontsize=10];"
feat_vars()
{
FEATURE=
while read first second rest; do
case "$first" in
\#[A-Z]*)
continue;; # overridden feature
\#) # feature mark
case "$second" in
profile/*)
FEATURE=;;
*)
FEATURE="$second";;
esac
;;
*)
case "$second" in
=|+=|?=)
case "$first" in
DISTCFG_MK|SUBPROFILES|FEATURES|IMAGE*|MKIMAGE_*)
continue;;
*)
VAR="$first"
VARIABLES="$VARIABLES; $VAR"
;;
esac
;;
*)
continue;;
esac
;;
esac
[ -n "$FEATURE" -a -n "$VAR" ] || continue
echo " \"$FEATURE\" -- \"$VAR\";"
done < "$DISTCFG"
echo " { node [shape=box]$VARIABLES; }"
}
feat_vars | LC_COLLATE=C sort -ru
echo " }"
echo "}"

View File

@@ -11,15 +11,40 @@
Попросту говоря, copy-paste -- тревожный признак.
По переменным:
* SYSTEM_PACKAGES стоит применять крайне осторожно -- эти пакеты попадут
- SYSTEM_PACKAGES стоит применять крайне осторожно -- эти пакеты попадут
во все стадии, в том числе в образ чувствительной к объёму install2
(в stage1 -- только в инструментальный чрут); применяйте для того,
что обязано быть и в инсталяторе, и в готовой системе;
* для "обычного общего" (main, live, rescue) есть COMMON_PACKAGES
(NB: попадают в базовую систему).
что обязано быть и в инсталяторе, и в готовой системе
- для "обычного общего" (live, main, rescue) есть COMMON_PACKAGES
(NB: попадают в базовую систему)
- для "пользовательского" окружения (live, main) предназначены
THE_PACKAGES, THE_LISTS, THE_GROUPS, THE_PACKAGES_REGEXP
- для строго направленного действия служат:
+ STAGE1_PACKAGES, STAGE1_PACKAGES_REGEXP (первая стадия загрузки)
+ INSTALL2_PACKAGES (инсталятор)
+ BASE_PACKAGES, BASE_LISTS, BASE_PACKAGES_REGEXP (базовая система)
+ MAIN_PACKAGES, MAIN_LISTS, MAIN_PACKAGES_REGEXP (дополнительные пакеты)
+ LIVE_PACKAGES, LIVE_LISTS, LIVE_PACKAGES_REGEXP ("живая" система)
- аналогично по модулям ядра:
+ THE_KMODULES попадут в "пользовательскую" среду (live, main)
+ STAGE1_KMODULES доступны в производных от stage2 (install2, live, rescue)
+ BASE_KMODULES попадут в установку по умолчанию
+ MAIN_KMODULES будут доступны для установки с носителя
+ LIVE_KMODULES предназначены для LiveCD/LiveFlash
По подстановкам:
* $(VAR) подставляются перед их записью в $(CONFIG), который distcfg.mk;
* $$(VAR) раскрываются позже, при включении $(CONFIG) и востребовании
значений -- таким образом их значения могут изменяться до окончания
конфигурации, а также зависеть от значений других переменных;
- $(VAR) подставляются перед их записью в $(CONFIG), который distcfg.mk
- $$(VAR) раскрываются позже, при включении $(CONFIG) и востребовании
значений; в этом случае их значения могут изменяться до окончания
конфигурации, а также зависеть от значений других переменных
По спискам пакетов:
- на этапе экспериментирования можно забивать прямо в описание образа
- при фиксации состояния стоит воспользоваться существующими списками,
а дополнительные оформить как можно более чётко обособленными по тем
задачам, для решения которых они и подобраны
- повторяющиеся логически связанные группы списков может иметь смысл
выделить в фичу (см., например, power или x11)
- если явной фичи не наблюдается, но у группы дистрибутивов намечается
заметная общая часть -- её можно выделить в промежуточную цель вида
distro/.name, не являющуюся самостоятельно собираемой

6
conf.d/alien.mk Normal file
View File

@@ -0,0 +1,6 @@
ve/.centos-base: ve/.bare
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
ve/centos: ve/.centos-base
@$(call add,BASE_PACKAGES,openssh-server)

View File

@@ -1,15 +1,18 @@
# desktop distributions
ifeq (distro,$(IMAGE_CLASS))
distro/desktop-base: distro/installer use/repo/main \
use/syslinux/ui-vesamenu use/x11/xorg use/bootloader/grub
distro/.desktop-base: distro/.installer use/syslinux/ui/vesamenu use/x11/xorg
@$(call set,INSTALLER,desktop)
distro/icewm: distro/desktop-base \
use/lowmem use/x11/xdm use/x11/runlevel5 \
use/bootloader/lilo use/power/acpi/button \
use/cleanup/alterator
@$(call add,BASE_LISTS,$(call tags,icewm desktop))
distro/.desktop-mini: distro/.desktop-base use/x11/xdm +power; @:
distro/desktop-systemd: distro/icewm use/systemd
distro/.desktop-network: distro/.desktop-mini +vmguest
@$(call add,BASE_LISTS,$(call tags,(base || desktop) && network))
distro/icewm: distro/.desktop-network use/lowmem +icewm; @:
distro/tde: distro/.desktop-mini +tde; @:
distro/ltsp-tde: distro/tde +ltsp; @:
distro/ltsp-icewm: distro/icewm +ltsp; @:
distro/desktop-systemd: distro/icewm use/systemd; @:
endif

View File

@@ -1,31 +1,67 @@
# live images
ifeq (distro,$(IMAGE_CLASS))
distro/dos: distro/.init use/dos use/syslinux/ui-menu
distro/rescue: distro/.base use/rescue use/syslinux/ui-menu
distro/live: distro/.base use/live/base use/power/acpi/cpufreq
distro/live-systemd: distro/.base use/live/base use/systemd
distro/live-install: distro/.base use/live/install use/syslinux/localboot.cfg
distro/live-icewm: distro/live use/live/icewm
distro/syslinux: distro/.init \
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
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/dos: distro/.init use/dos use/syslinux/ui/menu; @:
distro/rescue: distro/.base use/rescue use/syslinux/ui/menu; @:
distro/live-systemd: distro/.base use/live/base use/systemd; @:
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
distro/.live-desktop: distro/.base +live use/syslinux/ui/vesamenu; @:
distro/.live-kiosk: distro/.base use/live/base use/live/autologin \
use/syslinux/timeout/1 use/cleanup +power
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu)
@$(call add,CLEANUP_PACKAGES,'alterator*' 'guile*' 'vim-common')
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
distro/live-builder: pkgs := livecd-tmpfs livecd-online-repo mkimage-profiles
distro/live-builder: distro/.base use/repo/main \
use/live/base use/dev/mkimage use/power/acpi/button
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo
@$(call set,KFLAVOURS,$(BIGRAM))
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
@$(call add,LIVE_PACKAGES,zsh sudo)
@$(call add,LIVE_PACKAGES,$(pkgs))
@$(call add,LIVE_PACKAGES,zsh sudo apt-repo)
@$(call add,MAIN_PACKAGES,rpm-build basesystem)
@$(call add,MAIN_PACKAGES,fakeroot sisyphus_check)
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
@$(call add,MAIN_PACKAGES,file make-initrd make-initrd-propagator)
@$(call add,MAIN_PACKAGES,$(pkgs))
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
distro/live-install: distro/.live-base use/live/textinst; @:
distro/.livecd-install: distro/.live-base use/live/install; @:
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
distro/live-razorqt: distro/.live-desktop +razorqt; @:
distro/live-tde: distro/.live-desktop use/live/ru +tde; @:
distro/live-rescue: distro/live-icewm
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
@$(call add,LIVE_LISTS, \
$(call tags,(base || extra) && (archive || rescue || network)))
distro/live-webkiosk-mini: distro/.live-kiosk use/live/hooks use/live/ru
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
@$(call add,LIVE_PACKAGES,livecd-webkiosk)
@$(call add,CLEANUP_PACKAGES,'libqt4*' 'qt4*')
distro/live-webkiosk: distro/live-webkiosk-mini use/live/desktop; @:
distro/live-flightgear: distro/live-icewm use/live/sound use/x11/3d-proprietary
@$(call add,LIVE_PACKAGES,FlightGear fgo input-utils)
@$(call try,HOMEPAGE,http://www.4p8.com/eric.brasseur/flight_simulator_tutorial.html)
distro/live-cinnamon: distro/.live-desktop use/live/autologin use/live/ru \
use/x11/cinnamon use/x11/3d-proprietary
distro/live-enlightenment: distro/.live-desktop use/live/autologin use/live/ru use/x11/3d-free
@$(call add,LIVE_PACKAGES,enlightenment)
distro/live-gimp: distro/live-icewm use/x11/3d-free use/live/ru
@$(call add,LIVE_PACKAGES,gimp tintii immix fim)
@$(call add,LIVE_PACKAGES,cvltonemap darktable geeqie rawstudio ufraw)
@$(call add,LIVE_PACKAGES,macrofusion python-module-pygtk-libglade)
@$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync)
@$(call add,LIVE_PACKAGES,design-graphics-sisyphus2)
endif

View File

@@ -1,36 +1,39 @@
# server distributions
ifeq (distro,$(IMAGE_CLASS))
distro/server-base: distro/installer use/repo/main \
use/syslinux/ui-menu use/memtest use/bootloader/grub
distro/.server-base: distro/.installer use/syslinux/ui/menu use/memtest
@$(call add,BASE_LISTS,server-base)
distro/server-mini: distro/server-base use/cleanup/x11-alterator
distro/server-nano: distro/.server-base \
use/cleanup/x11-alterator use/bootloader/lilo
@$(call add,BASE_LISTS,$(call tags,server network))
@$(call add,BASE_PACKAGES,dhcpcd cpio)
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))
@$(call add,BASE_LISTS,$(call tags,extra (server || network)))
distro/server-systemd: distro/server-mini use/systemd
distro/server-systemd: distro/server-mini use/systemd use/bootloader/lilo; @:
distro/server-ovz: distro/server-mini \
use/hdt use/rescue use/firmware/server use/power/acpi/button
distro/server-ovz: distro/server-mini use/install2/net use/hdt use/rescue \
use/firmware/server use/firmware/wireless use/power/acpi/button
@$(call set,STAGE1_KFLAVOUR,std-def)
@$(call set,KFLAVOURS,std-def ovz-el)
@$(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_KMODULES,rtl8168 rtl8192)
@$(call add,MAIN_KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)
@$(call add,MAIN_KMODULES,drbd83 kvm)
@$(call add,BASE_LISTS,ovz-server)
@$(call add,MAIN_LISTS,kernel-wifi)
@$(call add,MAIN_GROUPS,dns-server http-server ftp-server kvm-server)
@$(call add,MAIN_GROUPS,ipmi mysql-server dhcp-server mail-server)
@$(call add,MAIN_GROUPS,monitoring diag-tools)
# 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
use/syslinux/ui/menu use/syslinux/localboot.cfg use/memtest
@$(call add,SYSLINUX_CFG,netinstall2)
endif

11
conf.d/simply.mk Normal file
View File

@@ -0,0 +1,11 @@
# simply images
ifeq (distro,$(IMAGE_CLASS))
distro/live-simply: distro/.livecd-install use/slinux/full
@$(call add,THE_LISTS,slinux/live-install)
distro/simply: distro/.installer use/slinux/full
@$(call set,INSTALLER,desktop)
endif

View File

@@ -1,5 +1,15 @@
предположения фрагментов кода об окружении
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NB: пути приводятся от верхнего уровня; проект в целом предполагает
ALT Linux 6.0+ и GNU make 3.81 (на которых и разрабатывается),
но может быть портирован вместе с mkimage.
- lib/report.mk
+ ожидает, что каждая подлежащая трассированию цель каждого
makefile при сборке конфигурации образа содержит непустой
recipe -- хотя бы "; @:" -- т.к. зависит от запуска $(SHELL)
+ характерный признак пропуска -- разрыв графа (report-targets.png)
- pkg.in/lists/Makefile
+ ожидает, что названия пакаджлистов указываются в переменных
вида *_LISTS, и копирует в генерируемый профиль только их

View File

@@ -2,7 +2,7 @@
~~~~
Особенности дистрибутива, не учитываемые в пакетной базе
или зависящие от переменных времени сборки/установки образа,
могут быть оформлены несколькими образами:
могут быть оформлены как:
* scripts.d/ или image-scripts.d/ различных стадий;
* пакеты installer-feature-*
@@ -10,7 +10,7 @@
В большинстве случаев можно рекомендовать создание feature
средствами метапрофиля, поскольку при этом дерево кода более
удобно для анализа и обновления (и в отличие от m-p-d, нет
удобно для анализа и обновления (и в отличие от m-p-d -- нет
вынужденной необходимости либо контролировать включение нужных
фич "вручную" в скриптах по косвенным признакам, либо выносить
их в пакеты installer-feature-*).

View File

@@ -1,4 +1,5 @@
# sample ~/.mkimage/profiles.mk
# NB: REPORT doesn't work here, it's somewhat special
# where to look for apt.conf; system one used by default
#APTCONF = ~/apt/apt.conf.$(ARCH)

View File

@@ -9,12 +9,18 @@
+ см. ../image.in/Makefile, apt.conf.sample
- ARCH
+ задаёт целевую архитектуру образа
+ задаёт целевую архитектуру образов
+ значение: пусто (по умолчанию авто), i586 или x86_64
+ см. ../lib/build.mk
- ARCHES
+ задаёт набор целевых архитектур при параметрическом задании APTCONF
+ значение: пусто (по умолчанию авто) либо список через пробел
+ см. ../Makefile, profiles.mk.sample
- BELL
+ подаёт сигнал после завершения сборки
+ значение: пусто (по умолчанию нет) либо любая строка
+ см. ../lib/build.mk
- BUILDDIR
@@ -22,6 +28,21 @@
+ значение: пусто (по умолчанию авто) либо строка
+ см. ../lib/profile.mk
- BUILDDIR_PREFIX
+ задаёт префикс каталога генерируемого профиля и сборки
+ значение: строка; по умолчанию выбирается алгоритмически
+ см. ../main.mk
- BUILDLOG
+ задаёт путь к файлу журнала сборки/очистки
+ значение: по умолчанию $(BUILDDIR)/build.log либо строка
+ см. ../lib/log.mk
- CHECK
+ включает режим проверки сборки конфигурации
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../lib/build.mk
- CLEAN
+ экономия RAM+swap при сборке в tmpfs, иначе места на диске
+ очистка рабочего каталога после успешной сборки очередной стадии
@@ -34,11 +55,46 @@
+ значение: пусто (по умолчанию), 1 или 2
+ см. ../lib/log.mk
- HOMEPAGE, HOMENAME, HOMEWAIT
+ указывают адрес, название и таймаут перехода для домашней страницы
+ значение: корректный URL, строка, целое неотрицательное число
+ см. ../features.in/live/generate.mk (тж. по умолчаниям)
- ISOHYBRID
+ включает постобработку ISO-образа isohybrid
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../features.in/pack/config.mk
- NICE
+ понижает нагрузку системы сборочной задачей
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../lib/build.mk
- REPORT
+ запрашивает создание отчётов о собранном образе
+ значение: пусто (по умолчанию) либо любая строка
+ NB: в силу специфики обработки передаётся только явно
+ см. ../Makefile, ../report.mk, ../lib/report.mk
- SAVE_PROFILE
+ сохраняет архив сгенерированного профиля в .disk/
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../image.in/Makefile
- SQUASHFS
+ определяет характер сжатия squashfs для stage2
+ значение:
- пусто (по умолчанию) либо normal: xz
- tight: xz с -Xbcj по платформе (лучше, но дольше -- подбор в два прохода)
- fast: gzip/lzo (быстрее запаковывается и распаковывается, меньше степень)
+ см. ../features.in/stage2/stage1/scripts.d/03-test-kernel
- SORTDIR
+ дополнительно структурирует каталог собранных образов
+ значение: пусто (по умолчанию) либо строка
- например, '$(IMAGE_NAME)/$(DATE)'
+ см. ../image.in/Makefile
пример
~~~~~~
make DEBUG=1 CLEAN=1 distro/syslinux.iso

View File

@@ -15,6 +15,11 @@
в списке, содержащемся в этой переменной, то она не задействуется
при построении профиля, а только при сборке конфигурации.
Для наиболее ходовых целей use/*, особенно если их много, можно
создавать цели-алиасы +* (например, +power). Просьба относиться
вдумчиво, т.к. в дальнейшем предполагается визуализировать такие
цели в UI конфигурирования образа.
Остальное содержимое является дополнительным и используется
в таком порядке (см. ../Makefile):

View File

@@ -2,15 +2,32 @@
# (only regarding the needed subprofiles)
ifndef BUILDDIR
help all:
help/plus all: banner
@$(call grepper,'^+')
help/features: banner
@$(call grepper,'^use/')
banner:
@echo "** BUILDDIR not defined; available features:"
grepper = $(and $(1),$(grepper_body))
define grepper_body
@for dir in */; do \
echo -n "$$dir: "; \
grep -h '^use/' $$dir/config.mk \
out="`grep -h $(1) $$dir/config.mk \
| cut -f1 -d: \
| tr ' ' '\n\n' \
| grep $(1) \
| tr '\n' ' ' \
| sort -u; \
| sort -u`"; \
[ -z "$$out" ] || echo "$$dir: $$out"; \
done
endef
%:
$(error BUILDDIR not defined)
else
include $(BUILDDIR)/distcfg.mk
@@ -25,88 +42,97 @@ include $(BUILDDIR)/distcfg.mk
# still both pieces go into a single destination
### 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 \
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; \
# 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 \
srcdirs="."; \
dst="."; \
else \
src="$${sub%/*}"; \
dst="$${sub#*/}"; \
srcdirs=; \
if [ -d "$$src" ]; then \
srcdirs="$$src"; \
dirtags="&& $$src"; \
fi; \
if [ -n "$(GLOBAL_DEBUG)" ]; then \
echo "** src=[$$src] dst=[$$dst] srcdirs=[$$srcdirs]"; \
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
srcdirs="$$srcdirs $$dst"; \
dirtags="&& ($$src || $$dst)"; \
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; \
done; \
popd >&/dev/null; \
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 lib {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

@@ -4,7 +4,7 @@
Каждая фича должна содержать задействуемый при построении
конфигурации будущего образа файл config.mk, включаемый
в ../Makefile; он может описывать одну или более целей
в ../main.mk; он может описывать одну или более целей
вида use/*, дополняющих конфигурацию, и при наличии
дополнительных хуков для копирования или generate.*
обязан добавить имя фичи в $(FEATURES), для чего
@@ -14,17 +14,18 @@
после инициализации профиля (см. ../image.in/) и копирования
субпрофилей (см. ../sub.in/). Для каждой фичи, указанной
в $(FEATURES), копируются подкаталоги сообразно субпрофилям,
а также производится обработка {tagged/,}{image-,}scripts.d/;
затем выполняется скрипт generate.sh и задействуется generate.mk
а также производится обработка {image-,}scripts.d/; затем
выполняется скрипт generate.sh и задействуется generate.mk
(при их наличии).
NB: тегированные скрипты являются экспериментальными,
возможны недоработки и существенные изменения!
Если фича дополняет хуками семейство целевых субпрофилей,
построенных на одном базовом, можно воспользоваться подкаталогом
с именем исходного базового субпрофиля (см. $src, $dst в Makefile).
Наиболее употребительные цели можно снабжать "ярлычками" вроде
"+icewm" с тем, чтобы сделать более краткими и выразительными
использующие их правила. Просьба не злоупотреблять количеством.
Каталог lib/ является специфическим для фич, определяющих
построение конкретного вида образа -- см. build-*/.

View File

@@ -5,6 +5,10 @@
систему (он НЕ должен требоваться пакету installer-distro-*)
и требует пакет выбранного загрузчика.
Реализация экспериментальная (нужно модуляризовать installer-steps),
пока завязана на installer-distro-altlinux-generic (TODO). Возможно,
с использованием alterator-lilo связаны проблемы времени установки.
Обратите внимание: в процессе конфигурирования дистрибутива
"переключение" загрузчика может происходить только в одну сторону
-- если выставлен grub, произведено переключение на lilo и затем
произведена ещё одна попытка переключения на grub, то в конфигурации
останется lilo как последняя "новая" цель с точки зрения make.
Реализация экспериментальная (нужно модуляризовать installer-steps).

View File

@@ -1,8 +1,11 @@
# TODO: invent something prettier (think "lilo+grub" -- or error out?)
# - add,BASE_PACKAGES,alterator-$* is overly additive
# NB: due to make target becoming having been made,
# the last different one wins
# - remember .base if adding yet another *_PACKAGES
use/bootloader: use/install2 sub/main
@$(call add_feature)
@$(call add,BASE_PACKAGES,alterator-$$(BASE_BOOTLOADER))
use/bootloader/grub use/bootloader/lilo: use/bootloader/%: use/bootloader

View File

@@ -0,0 +1,3 @@
Эта фича врезается в makefile субпрофилей и обеспечивает
добавление задающих внешний вид и сообщения дистрибутива
пакетов; см. тж. http://www.altlinux.org/Branding

View File

@@ -0,0 +1,12 @@
use/branding:
@$(call add_feature)
@### see install2
@#$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
# NB: not every distro might have all the branding of its own
use/branding/full: use/branding use/syslinux/ui/gfxboot
@$(call add,THE_BRANDING,alterator bootsplash graphics)
@$(call add,THE_BRANDING,indexhtml notes slideshow)
use/branding/complete: use/branding/full
@$(call add,INSTALL2_BRANDING,notes slideshow)

View File

@@ -0,0 +1 @@
IMAGE_PACKAGES_REGEXP += $(call branding,$(INSTALL2_BRANDING))

View File

@@ -0,0 +1,4 @@
# step 4: build the distribution image
# NB: this comes just before build-distro.mk
DOT_BASE += $(call branding,$(THE_BRANDING))

View File

@@ -0,0 +1 @@
IMAGE_PACKAGES_REGEXP += $(call branding,$(THE_BRANDING))

View File

@@ -0,0 +1 @@
IMAGE_PACKAGES_REGEXP += $(call branding,$(THE_BRANDING))

View File

@@ -0,0 +1 @@
CHROOT_PACKAGES_REGEXP += $(call branding,$(STAGE1_BRANDING))

View File

@@ -1,4 +1,5 @@
Эта фича конфигурирует создание образа дистрибутива, включая работу
с субпрофилями -- которая сейчас нужна только дистрибутивным целям.
Дополняет финальную стадию сборки (lib/, scripts.d/).
Дополняет финальную стадию сборки (lib/, scripts.d/)
и тесно с ней связана.

View File

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

View File

@@ -0,0 +1,37 @@
# step 4: build the distribution image
# for complex-specified subprofiles like stage2/live,
# take the latter part
SUBDIRS = $(notdir $(SUBPROFILES))
# proxy over the ISO metadata collected; see also genisoimagerc(5)
BOOT_SYSI := $(META_SYSTEM_ID)
BOOT_PUBL := $(META_PUBLISHER)
BOOT_PREP := $(META_PREPARER)
BOOT_APPI := $(META_APP_ID)
BOOT_VOLI := $(META_VOL_ID)
BOOT_VOLS := $(META_VOL_SET)
BOOT_BIBL := $(META_BIBLIO)
BOOT_ABST := $(META_ABSTRACT)
BOOT_TYPE := isolinux
# see also ../scripts.d/01-isosort; needs mkimage-0.2.2+
MKI_SORTFILE := /tmp/isosort
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER) imagedir
#prep: $(GLOBAL_DEBUG) dot-disk metadata imagedir
dot-disk:
@mkdir -p files/.disk
@echo "ALT Linux based" >files/.disk/info
@echo "$(ARCH)" >files/.disk/arch
@echo "$(DATE)" >files/.disk/date
@if type -t git >&/dev/null; then \
( cd $(TOPDIR) && test -d .git && \
git show-ref --head -ds -- HEAD ||:) \
>files/.disk/commit 2>/dev/null; \
fi

View File

@@ -1,44 +0,0 @@
# step 4: build the distribution image
# for complex-specified subprofiles like stage2/live,
# take the latter part
SUBDIRS = $(notdir $(SUBPROFILES))
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
ifneq (,$(findstring install2,$(FEATURES)))
METADATA = metadata
endif
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: $(GLOBAL_DEBUG) dot-disk $(METADATA) imagedir
metadata: dot-base
@mkdir -p files/Metadata
@rm -f files/Metadata/pkg-groups.tar
# see also alterator-pkg (backend3/pkg-install); we only tar up what's up to it
@tar -cvf files/Metadata/pkg-groups.tar -C $(PKGDIR) \
$$(echo $(call list,$(MAIN_GROUPS) .base) \
$(call group,$(MAIN_GROUPS)) \
| sed 's,$(PKGDIR)/*,,g')
dot-base:
@{ \
echo -e "\n## added by image.in/Makefile"; \
echo "$(call kpackages,$(KMODULES),$(KFLAVOURS))"; \
} >> $(call list,.base)
dot-disk:
@mkdir -p files/.disk
@echo "ALT Linux based" >files/.disk/info
@echo "$(ARCH)" >files/.disk/arch
@echo "$(DATE)" >files/.disk/date
@if type -t git >&/dev/null; then \
( cd $(TOPDIR) && test -d .git && \
git show-ref --head -ds -- HEAD ||:) \
>files/.disk/commit 2>/dev/null; \
fi

View File

@@ -0,0 +1,14 @@
#!/bin/sh
# provide mkisofs with image contents sort order hints
### split over features or leave in a single piece?
# NB: only a single space/tab in between, no trailing whitespace
cat > /tmp/isosort <<__EOF__
ALTLinux 0
Metadata 100
altinst 700
rescue 800
live 900
syslinux 1000
__EOF__

View File

@@ -1,3 +1,4 @@
Эта фича конфигурирует создание образа виртуального окружения (VE).
Дополняет финальную стадию сборки (lib/, image-scripts.d/).
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
и тесно с ней связана.

View File

@@ -1,2 +1,3 @@
# hooked from ../../lib/sugar.mk
use/build-ve:
@$(call add_feature)

View File

@@ -6,6 +6,8 @@
# candidates:
# off: keytable
for i in network random syslogd random; do chkconfig $i on; done
[ -x /sbin/chkconfig ] || exit 0
for i in network random syslogd; do chkconfig $i on; done
for i in fbsetfont netfs rawdevices; do chkconfig $i off; done
:

View File

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

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

@@ -0,0 +1,6 @@
#!/bin/sh
[ -s /etc/fstab ] || cat >> /etc/fstab <<-EOF
proc /proc proc nosuid,noexec,gid=proc 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
EOF

View File

@@ -0,0 +1,12 @@
#!/bin/sh
# FIXME: there should be less brutal i18n tuning
cd /usr/share/locale
rm -r *@*
for i in */; do
case "$i" in
be*|en*|ru*|uk*) continue;;
esac
rm -r "$i"
done
:

View File

@@ -0,0 +1,6 @@
#!/bin/sh -efu
# remove extra packages from a bare livecd
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "$list" ] || apt-get remove -f -y -- $list
:

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# dump what's here by this point
echo "** live packages before rpmdb purge:"
rpmquery -a --qf='%{NAME} %{VERSION}-%{RELEASE}\n'
# remove apt database and cache
find /var/lib/apt /var/cache/apt -type f -delete
# not going to need them without rpmdb, it's not even rescue anymore
rpm -e --nodeps apt libapt rpm librpmbuild librpm 2>/dev/null ||:
# finally, drop rpmdb
find /var/lib/rpm -type f -delete
:

View File

@@ -1,7 +1,12 @@
use/dev:
@$(call add_feature)
@$(call add,COMMON_PACKAGES,git-core hasher gear)
@$(call add,THE_PACKAGES,git-core hasher gear)
use/dev/mkimage: use/dev
@$(call add,COMMON_PACKAGES,mkimage)
@$(call add,LIVE_PACKAGES,shadow-change)
@$(call add,THE_PACKAGES,mkimage shadow-change)
use/dev/repo: use/dev use/repo/main
@$(call add,THE_PACKAGES,apt-repo)
@$(call add,MAIN_PACKAGES,rpm-build basesystem)
@$(call add,MAIN_PACKAGES,fakeroot sisyphus_check)
@$(call add,MAIN_PACKAGES,file make-initrd make-initrd-propagator)

View File

@@ -29,7 +29,7 @@ fi
# $TMP
TMP="/tmp/.private/$USER"
control pam_mktemp enabled
subst '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
sed -i '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
echo "%_tmppath $TMP" >> "$HOME/.rpmmacros"
# ~/hasher

View File

@@ -1,5 +1,9 @@
# tries to fill in ISO metadata in case it's the only inhabitant
use/dos: use/syslinux
@$(call add_feature)
@$(call add,SYSLINUX_CFG,dos)
@$(call add,SYSLINUX_FILES,/usr/lib/syslinux/memdisk)
@$(call add,STAGE1_PACKAGES,make-freedos-floppy glibc-gconv-modules)
@$(call try,META_SYSTEM_ID,DOS)
@$(call try,META_VOL_ID,FreeDOS 2.88M)
@$(call try,META_VOL_SET,FreeDOS)

View File

@@ -1,4 +1,4 @@
#!/bin/sh -x
#!/bin/sh
# create a barebone bootable freedos floppy
# TODO: some sub-framework to populate it as well

View File

@@ -3,17 +3,23 @@
# for mkmodpack to use
use/firmware:
@$(call add_feature)
@$(call add,SYSTEM_PACKAGES,firmware-linux)
use/firmware/server: use/firmware
@$(call add,SYSTEM_PACKAGES,firmware-aic94xx-seq)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-ql.*)
@$(call add,THE_PACKAGES_REGEXP,firmware-ql.*)
# NB: individual firmwarez would sometimes conflict
# with ones newly merged into firmware-linux
# FIXME: kernel modules rather belong to use/hardware
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-ipw.*)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-iwl.*)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-rt.*)
@$(call add,MAIN_PACKAGES_REGEXP,firmware-zd.*)
@$(call add,THE_KMODULES,bcmwl ndiswrapper)
@$(call add,THE_PACKAGES,firmware-acx100)
@#$(call add,THE_PACKAGES,firmware-i2400m)
@$(call add,THE_PACKAGES_REGEXP,firmware-carl9170.*)
@$(call add,THE_PACKAGES_REGEXP,firmware-prism.*)
@$(call add,THE_PACKAGES_REGEXP,firmware-ipw.*)
@#$(call add,THE_PACKAGES_REGEXP,firmware-iwl.*)
@#$(call add,THE_PACKAGES_REGEXP,firmware-rt.*)
@$(call add,THE_PACKAGES_REGEXP,firmware-zd.*)

View File

@@ -1,4 +1,5 @@
use/hdt: use/syslinux use/memtest
# optimized out use/syslinux due to use/memtest
use/hdt: use/memtest
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,pciids)
@$(call add,SYSLINUX_MODULES,hdt)

View File

@@ -6,4 +6,5 @@
чтобы в компактном livecd, которым является инсталятор, оказались
нужные им утилиты (INSTALL2_PACKAGES). Перегружать его не следует,
поскольку это прямо влияет на требования по минимальному размеру
оперативной памяти для установки.
оперативной памяти для установки (если не задействован параметр
загрузки ядра lowmem, обрабатываемый propagator).

View File

@@ -1,6 +1,18 @@
use/install2: use/stage2 sub/stage2/install2 use/cleanup/installer
# alterator-based installer, second (livecd) stage
use/install2: use/stage2 sub/stage2/install2 use/metadata use/cleanup/installer
@$(call add_feature)
@$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)
@$(call add,MAIN_PACKAGES,branding-$$(BRANDING)-release)
@$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
@$(call add,BASE_LISTS,$(call tags,basesystem))
use/install2/net: use/install2
@$(call add,INSTALL2_PACKAGES,curl)
# modern free xorg drivers for mainstream hardware requires KMS support
use/install2/kms:
@$(call set,STAGE1_KMODULES_REGEXP,drm.*)
# see also use/vm/kvm/guest; qxl included in xorg pkglist
use/install2/kvm:
@$(call add,INSTALL2_PACKAGES,spice-vdagent xorg-drv-qxl)

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# FIXME: test run for installer-distro-altlinux-generic 6.0-alt2
# NB: grub is currently the default in ALT Linux
sed -i "s/^grub$/$GLOBAL_BASE_BOOTLOADER/" /usr/share/install2/installer-steps
sed -ri "s/^(grub|lilo)$/$GLOBAL_BASE_BOOTLOADER/" \
/usr/share/install2/installer-steps

View File

@@ -27,6 +27,4 @@ rpmquery -a cpp\* gcc\* perl-base file ipv6calc \
rpmquery -a bind-utils libbind \
| xargs -r rpmi -e --
# outstanding binaries
rm -f /sbin/{sln,tc}
rm -f /usr/bin/openssl
:

View File

@@ -0,0 +1,5 @@
#!/bin/sh
# remove all docs
rpmquery -ad |grep ^/ |xargs -r rm -f --
rm -rf /usr/share/{doc,man,info,license,gfxboot}

View File

@@ -107,17 +107,3 @@ rm -rf /lib/modules/*/kernel/net/tipc
rm -rf /lib/modules/*/kernel/net/{wimax,wireless,mac80211}
rm -rf /lib/modules/*/kernel/net/x25
rm -rf /lib/modules/*/kernel/sound
# blacklisted kernel modules
sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' /etc/modprobe.d/* |
while read i; do
find /lib/modules/ -type f -name "$i.ko" -delete
done
# regenerate module dependencies
for i in /lib*/modules/*; do
/sbin/depmod -a -F /boot/System.map-${i##*/} ${i##*/}
done
# kernel images
rm -rf /boot/*

View File

@@ -12,11 +12,14 @@ rm -f /usr/lib*/gconv/BIG5*
rm -f /usr/lib*/gconv/EBCDIC*
# en_* variations
rm -rf /usr/{lib*,share}/locale/en_[^U]*
rm -rf /usr/{lib,share}/locale/en_[^U]*
# mods
rm -rf /usr/{lib,share}/locale/*@*
# non-utf8 locales
find /usr/lib*/locale -mindepth 1 -maxdepth 1 -type d \! -name '*.utf8' -print0 |
find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d \! -name '*.utf8' -print0 |
xargs -r0 rm -rf --
# dangling symlinks
find /usr/lib*/locale \! -readable -delete
find /usr/lib/locale \! -readable -delete

View File

@@ -1,6 +1,12 @@
# remove rpm database
rm -rf /var/lib/rpm/*
#!/bin/sh
# dump what's here by this point
echo "** install2 packages before rpmdb purge:"
rpmquery -a --qf='%{NAME} %{VERSION}-%{RELEASE}\n'
# remove apt data files
rm -rf /var/cache/apt /var/lib*/apt
# not going to need them without rpmdb, it's not even rescue anymore
apt-get remove -f -y apt libapt
# remove rpm, apt databases and cache
find /var/lib/rpm /var/lib/apt /var/cache/apt -type f -delete
:

View File

View File

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

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

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

View File

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

View File

@@ -0,0 +1,4 @@
###
use/kernel:
@$(call add_feature)
@$(call set,KFLAVOURS,std-def)

View File

@@ -0,0 +1,4 @@
# step 4: build the distribution image
# take care for kernel bits
DOT_BASE += $(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))

View File

@@ -1,3 +1,4 @@
Эта фича дополняет базовый "живой" образ второй стадии
специфическими для полноценного LiveCD настройками
и скриптовыми хуками.
и скриптовыми хуками, а также создаёт файл index.html
с домашней страницей (редиректором) в корне образа.

View File

@@ -1,18 +1,40 @@
+live: use/live/desktop; @:
# copy stage2 as live
# NB: starts to preconfigure but doesn't use/cleanup yet
use/live: use/stage2 sub/stage2/live
@$(call add_feature)
@$(call add,CLEANUP_PACKAGES,'installer*')
use/live/base: use/live use/syslinux/ui-menu
use/live/base: use/live use/syslinux/ui/menu
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
# optimized out: use/x11/xorg
use/live/desktop: use/live/base use/x11/wacom use/live/sound +vmguest +power
@$(call add,LIVE_LISTS,$(call tags,desktop && (live || network)))
@$(call add,LIVE_LISTS,$(call tags,base l10n))
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu fonts-ttf-droid)
@$(call add,SYSLINUX_CFG,localboot)
# alterator-based permanent installation
use/live/install: use/metadata use/syslinux/localboot.cfg
@$(call add,LIVE_PACKAGES,livecd-install)
# text-based installation script
use/live/textinstall: use/syslinux/localboot.cfg
@$(call add,LIVE_PACKAGES,live-install)
# NB: there's an unconditional live/image-scripts.d/40-autologin script
# *but* it only configures some of the *existing* means; let's add one
use/live/autologin: use/live/base
# for the cases when there should be no display manager
use/live/autologin: use/live use/x11/xorg
@$(call add,LIVE_PACKAGES,autologin xinit)
use/live/icewm: use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || icewm)))
use/live/hooks: use/live
@$(call add,LIVE_PACKAGES,livecd-run-hooks)
# this is a manual installation script (text-based)
use/live/install: use/live/base
@$(call add,LIVE_PACKAGES,live-install)
use/live/ru: use/live
@$(call add,LIVE_PACKAGES,livecd-ru)
use/live/sound: use/live
@$(call add,LIVE_PACKAGES,amixer alsa-utils aplay udev-alsa)

View File

@@ -0,0 +1,37 @@
# set up livecd browser redirection page
ifdef BUILDDIR
include $(BUILDDIR)/distcfg.mk
ifndef HOMEPAGE
HOMEPAGE = http://www.altlinux.org/
endif
ifndef HOMENAME
HOMENAME = ALT Linux
endif
ifndef HOMEWAIT
HOMEWAIT = 3
endif
INDEXHTML := $(BUILDDIR)/stage1/files/index.html
all: debug
@if [ -s "$(INDEXHTML)" ]; then \
sed -i \
-e 's,@homepage@,$(HOMEPAGE),' \
-e 's,@homename@,$(HOMENAME),' \
-e 's,@homewait@,$(HOMEWAIT),' \
$(INDEXHTML); \
fi
debug:
@if [ -n "$(DEBUG)" ]; then \
echo "** HOMEPAGE: $(HOMEPAGE)"; \
echo "** HOMENAME: $(HOMENAME)"; \
echo "** HOMEWAIT: $(HOMEWAIT)"; \
fi
endif

View File

@@ -0,0 +1,42 @@
#!/bin/sh
# see also m-p-d::profiles/live/image-scripts.d/init3-services
[ -x /sbin/chkconfig ] || exit 0
ENABLE="
alteratord
livecd-evms
livecd-fstab
livecd-hostname
livecd-save-nfs
livecd-setauth
livecd-setlocale
network
NetworkManager
random
rpcbind
"
# NB: dnsmasq: https://bugzilla.altlinux.org/show_bug.cgi?id=18799
# NB: sshd might be needed for some particular cases
DISABLE="
anacron
bridge
clamd
crond
dhcpd
dnsmasq
mdadm
netfs
openvpn
rawdevices
slapd
smartd
sshd
update_wms
xinetd
"
for i in $ENABLE; do chkconfig $i on 2>/dev/null; done
for i in $DISABLE; do chkconfig $i off 2>/dev/null; done
:

View File

@@ -0,0 +1,5 @@
#!/bin/sh
# if we're configured for running live hooks,
# there should be a place for them either
chkconfig livecd-run-hooks on >&/dev/null && mkdir /live.hooks ||:

View File

@@ -2,6 +2,9 @@
# * reset password for root
# * add user `altlinux' (without password)
NPG="nopasswdlogin"
GRPLIST="users scanner audio radio proc cdrom cdwriter wheel fuse $NPG"
verbose()
{
if [ -n "$GLOBAL_VERBOSE" ]; then
@@ -12,8 +15,9 @@ verbose()
add_user()
{
verbose "Add $1 user"
groupadd -r "$NPG"
local groups=
for g in users scanner audio radio proc cdrom cdwriter wheel fuse; do
for g in $GRPLIST; do
if groupmod $g 2>/dev/null; then
if [ -n "$groups" ]; then
groups="$groups,$g"

View File

@@ -1,11 +1,17 @@
#!/bin/sh -ef
if [ ! -x /usr/bin/X ]; then
echo "SKIP autologin: X not installed" >&2
exit 0
fi
USER=altlinux
# setup runlevel
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
subst "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
# autologin^2
@@ -16,6 +22,15 @@ AUTOLOGIN=yes
E_O_F
fi
# lightdm autologin
LIGHTDM_CONF=/etc/lightdm/lightdm.conf
if [ -f "$LIGHTDM_CONF" ]; then
sed -i \
-e "s/^#\(autologin-user=\).*$/\1$USER/" \
-e "s/^#\(autologin-user-timeout=0\)/\1/" \
"$LIGHTDM_CONF"
fi
# gdm2 autologin
GDM_CONF=/etc/X11/gdm/custom.conf
if [ -f "$GDM_CONF" ]; then

View File

@@ -1,6 +1,13 @@
#!/bin/sh -efu
# attempt to autoconfigure ethernet
[ -x /sbin/dhcpcd -o -x /sbin/dhclient ] || {
echo "NOT configuring DHCP for eth0" >&2
exit 0
}
echo "configuring DHCP for eth0" >&2
mkdir -p /etc/net/ifaces/eth0 && {
echo TYPE=eth
echo BOOTPROTO=dhcp

View File

@@ -1,8 +1,18 @@
# 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_REGEXP = $(THE_PACKAGES_REGEXP) \
$(LIVE_PACKAGES_REGEXP)
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
debug::
@echo "** live: IMAGE_PACKAGES: $(IMAGE_PACKAGES)"
@echo "** live: IMAGE_PACKAGES_REGEXP: $(IMAGE_PACKAGES_REGEXP)"

View File

@@ -0,0 +1,10 @@
<html>
<head>
<meta http-equiv="refresh" content="@homewait@;url=@homepage@">
<title>Welcome to @homename@!</title>
</head>
<body>
<h1>Welcome to @homename@!</h1>
<p>You will be redirected to <a href="@homepage@">the home page</a> shortly.</p>
</body>
</html>

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

@@ -0,0 +1,5 @@
Эта фича обеспечивает добавление функций терминального сервера:
- загрузку бездисковых тонких клиентов по сети;
- предоставление им доступа к серверу приложений.
На данный момент является экспериментальной.

View File

@@ -0,0 +1,11 @@
+ltsp: use/ltsp/base; @:
use/ltsp:
@$(call add_feature)
@$(call add,INSTALL2_PACKAGES,installer-feature-ltsp-stage2)
@$(call add,MAIN_LISTS,ltsp-client ltsp-client.$(ARCH))
@$(call add,BASE_LISTS,ltsp)
use/ltsp/base: use/ltsp use/firmware
@$(call add,BASE_LISTS,$(call tags,base network))
@$(call add,BASE_PACKAGES,apt-repo firefox)

View File

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

View File

@@ -0,0 +1,2 @@
use/metadata:
@$(call add_feature)

View File

@@ -0,0 +1,37 @@
# step 4: build the distribution image
# package lists are needed for installer and live-install images
METADIR := files/Metadata
# preparation targets of ../../build-distro/lib/build-distro.mk
WHATEVER += metadata
# args: name, suffix, command
define dump-THEM
if [ -n "$($(1)_$(2))" ]; then echo -e "\n## $(1)_$(2)"; $(3) $($(1)_$(2)); fi;
endef
dump-PACKAGES = $(call dump-THEM,$(1),PACKAGES,echo)
dump-LISTS = $(call dump-THEM,$(1),LISTS,cat)
# BASE_PACKAGES, BASE_LISTS and whatever else goes into base install;
# thus construct requisite .base packagelist for alterator-pkg
metadata-.base:
@cd $(call list,/); \
{ \
echo "## generated by features.in/metadata/lib/metadata.mk"; \
$(foreach p,SYSTEM COMMON THE BASE,$(call dump-PACKAGES,$(p))) \
$(foreach l,THE BASE,$(call dump-LISTS,$(l))) \
if [ -n "$(DOT_BASE)" ]; then \
echo -e "\n## DOT_BASE\n$(DOT_BASE)"; \
fi; \
} | sed -re '/^[^[:space:]#]/ s/[[:space:]]+/\n/g' > .base
# see also alterator-pkg (backend3/pkg-install);
# we only tar up what's up to it
metadata: metadata-.base
@mkdir -p $(METADIR); \
tar -C $(PKGDIR) -cvf - \
$(call rlist,$(MAIN_GROUPS) .base) \
$(call rgroup,$(MAIN_GROUPS)) \
> $(METADIR)/pkg-groups.tar

View File

@@ -3,7 +3,9 @@ DISTRO_EXTS := .iso
use/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

View File

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

View File

@@ -0,0 +1 @@
Наборы пакетов для семейства дистрибутивов Simply Linux.

View File

@@ -0,0 +1,20 @@
use/slinux: use/x11/xfce use/x11/gdm2.20
@$(call add_feature)
@$(call set,BRANDING,simply-linux)
@$(call add,THE_BRANDING,menu xfce-settings)
@$(call add,THE_LISTS,gnome-p2p)
@$(call add,THE_LISTS,slinux/$(ARCH))
@$(call add,THE_LISTS,slinux/games)
@$(call add,THE_LISTS,slinux/graphics)
@$(call add,THE_LISTS,slinux/live)
@$(call add,THE_LISTS,slinux/misc)
@$(call add,THE_LISTS,slinux/misc-dvd)
@$(call add,THE_LISTS,slinux/multimedia)
@$(call add,THE_LISTS,slinux/network)
@$(call add,THE_LISTS,slinux/xfce)
@$(call add,THE_LISTS,$(call tags,base l10n))
use/slinux/full: use/isohybrid use/slinux use/systemd \
use/firmware/wireless use/branding/complete \
use/x11/drm use/x11/3d-proprietary
@$(call add,THE_PACKAGES,apt-conf-sisyphus)

View File

@@ -0,0 +1,29 @@
#!/bin/sh
# see also m-p-d::profiles/live/image-scripts.d/init3-services
#[ -x /bin/systemctl ] || exit 0
#[ -x /bin/systemctl ] || exit 0
ENABLE="
network
NetworkManager
lvm2-monitor
mdadm
"
# NB: dnsmasq: https://bugzilla.altlinux.org/show_bug.cgi?id=18799
# NB: sshd might be needed for some particular cases
DISABLE="
sshd
"
for i in $ENABLE; do
[ -x /bin/systemctl ] && /bin/systemctl enable ${i}.service
[ -x /sbin/chkconfig ] && /sbin/chkconfig $i on
done
for i in $DISABLE; do
[ -x /bin/systemctl ] && /bin/systemctl disable ${i}.service
[ -x /sbin/chkconfig ] && /sbin/chkconfig $i off
done
:

View File

@@ -1,22 +1,55 @@
#!/bin/sh
# NB: -f prohibited in this shebang
# check relevant kernel features availability
# test for installer-required filesystems support
for opt in CONFIG_SQUASHFS CONFIG_AUFS_FS; do
if grep -q "^$opt=[my]$" /boot/config-*; then
[ -n "$GLOBAL_VERBOSE" ] && echo "** $opt available"
CONFIGS=/boot/config-*
GZ_OPTS="-comp gzip -noI"
XZ_OPTS="-comp xz"
LZO_OPTS="-comp lzo -noI"
verbose() { [ -n "$GLOBAL_VERBOSE" ] && echo "** $@" >&2; }
fatal() { echo "** error: $@" >&2; exit 1; }
configured()
{
local option="CONFIG_$1"
if grep -q "^$option" $CONFIGS; then
verbose "${option%=*} available"
return 0
else
if [ "$?" = 1 ]; then # a file exists but lacks the pattern
echo "** error: stage1 kernel must have $opt support" >&2
exit 1
fi
return 1
fi
}
ls $CONFIGS >&/dev/null || fatal "no stage1 kernel config found in /boot"
# test for installer-required filesystems support
for opt in SQUASHFS AUFS_FS; do
configured "$opt=[my]" || fatal "stage1 kernel must have $opt support"
done
# squashfs options: not really neccessary but better than none
# NB: this config file should be carried over into install2
if grep -q '^CONFIG_SQUASHFS_XZ=y$' /boot/config-*; then
echo "PACK_SQUASHFS_OPTS=-comp xz -Xbcj x86" > /.image/squashcfg.mk
else
echo "PACK_SQUASHFS_OPTS=-comp gzip" >> /.image/squashcfg.mk
fi
verbose "GLOBAL_SQUASHFS: $GLOBAL_SQUASHFS"
options()
{
# squashfs options: not really neccessary but better than none
# NB: this config file should be carried over into install2
if [ "$GLOBAL_SQUASHFS" != "fast" ] && configured "SQUASHFS_XZ=y"; then
# NB: the decompression filter overhead might hurt
# NB: there are arm, powerpc and some other filters too
if [ "$GLOBAL_SQUASHFS" = "tight" ] && configured "X86"; then
XZ_OPTS="$XZ_OPTS -b 524288 -Xbcj x86"
else
XZ_OPTS="$XZ_OPTS -b 262144 -noI"
fi
echo "$XZ_OPTS"
else # go fast, or even faster if possible
if configured "SQUASHFS_LZO=y"; then
echo "$LZO_OPTS"
else # safe default
echo "$GZ_OPTS"
fi
fi
}
echo "PACK_SQUASHFS_OPTS=-no-recovery `options`" > /.image/squashcfg.mk

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,8 +2,9 @@
реализуется в рамках stage1.
Цели config.mk:
* use/syslinux/ui-% -- конфигурирование интерфейса (см. cfg.in/00*.cfg);
* use/syslinux/ui/% -- конфигурирование интерфейса (см. cfg.in/00*.cfg);
при использовании автоматически добавляют syslinux в FEATURES;
* use/syslinux/timeout/% -- задание таймаута автозагрузки (в десятых секунды);
* use/syslinux/%.com, use/syslinux/%.c32 -- подключение одноименных модулей
(копирование бинарников и включение кусочков конфигурации; экспериментальное);
* use/syslinux/%.cfg -- подключение кусочков конфигурации.

View File

@@ -0,0 +1,2 @@
timeout @timeout@
totaltimeout 3000

View File

@@ -1 +0,0 @@
timeout 200

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