Compare commits

...

287 Commits

Author SHA1 Message Date
Michael Shigorin
939455e7a3 0.8.4-alt1
- worked around enhancements in current make-initrd-propagator
  (thus fixed live image boot, finally)
2012-10-16 12:17:28 +03:00
Michael Shigorin
aaddfb740c stage2: cope with current make-initrd-propagator
The issue that appeared pretty hard to diagnose occured
to be the enhancement made in make-initrd-propagator=0.8.1-alt1.2
(that didn't hit Sisyphus until merged into 0.10-alt1) which
drops propagator dependency.

And that was optimized out in m-p, of course.
2012-10-16 12:16:39 +03:00
Michael Shigorin
b8d711a005 gear-store-tags 2012-10-15 23:35:17 +03:00
Michael Shigorin
7a50acb5c4 0.8.3-alt1
- make-3.82 support
- fixed live image boot to some extent (see #27640, #27852)
2012-10-15 23:34:36 +03:00
Michael Shigorin
90b8fd49f4 80-make-initfs: fixed silly thinko
The added pdir check was a hillarious(tm) overlooked bug indeed:
I tried to put .../initfs/initfs instead of .../initfs as the result.

Duly spotted by torabora@, thanks a lot.

Still the kmod+propagator+kernel-image combo needed some tweaking too,
see #27640
2012-10-15 17:04:18 +03:00
Michael Shigorin
944e0341c5 stage2: brevity fix
A tiny bit less cut-n-paste. :)
2012-10-15 16:03:58 +03:00
Michael Shigorin
6f5be91827 make-3.82 adaptation
The issue actually hit image.in/Makefile: "metadata" target
in features.in/metadata/lib/50-metadata.mk wasn't reached
even if features.in/build-distro/lib/90-build-distro.mk
would ACK that the "whatever" actions included "metadata";
thus Metadata/pkg-groups.tar wasn't created and the installer
silently failed to install the .base system.

Let's armour the rest of the cases where the order of inclusion
might be important as well.
2012-10-10 16:18:35 +03:00
Michael Shigorin
718a50b9d0 relname: tweak the fix/diagnostics
The culprit would be that $RELNAME isn't really set there
($GLOBAL_RELNAME is), and sh -u will treat that as error.
2012-10-10 12:06:55 +03:00
Mike Radyuk
78684bfef3 fix RELNAME script and README 2012-10-10 12:00:17 +03:00
Mike Radyuk
cc623bc56b fix typo in RELNAME variable 2012-10-09 00:13:02 +03:00
Michael Shigorin
64536f62d1 bootloader README: a note on overriding
It's pretty ugly but dropping the current way
means losing the dependency tracking which is
critical to get the required alterator module
into install2.
2012-10-01 23:28:24 +03:00
Michael Shigorin
91053b9daf gear-store-tags 2012-09-24 21:52:10 +04:00
Michael Shigorin
b44705d25b 0.8.2-alt1
- fixed build with recent make-initrd-propagator
2012-09-24 21:21:49 +04:00
Michael Shigorin
12a2fc983c 80-make-initfs: fix for current make-initrd*
Thanks mithraen@ for spotting, boyarsh@ for explaining,
and legion@ for hearty support :)

The problem would manifest itself like this:

  /.host/script.sh: line 20: /usr/lib64/propagator/initfs: \
  No such file or directory
  mki-scripts: .../stage1/scripts.d/80-make-initfs: unable to run script.
2012-09-24 21:20:49 +04:00
Michael Shigorin
30d0340d56 install2: added convenient filesystems support
Thanks Serg Markov for bringing my attention to this:
http://www.opennet.ru/openforum/vsluhforumID3/86552.html#61

While the official distros might skip some filesystems for
support reasons there's no reason for community distros to
do so either.

Let's try that with icewm.iso...

NB: installer has a misfeature of dropping jfs/reiserfs
    support in runtime unless "expertmode" magic word
    is on the kernel bootargs string (#27763, #17368).
2012-09-24 11:07:49 +04:00
Michael Shigorin
2f357e44d6 clean.mk: skip if REPORT requested either
The problem would manifest itself like this:

..:..:.. cleaning up after build
sed: can't read .../build.log: No such file or directory
2012-09-24 11:07:45 +04:00
Michael Shigorin
a2b89e6647 ovz-server: add vzquota
Asked for by torabora@; indeed.
2012-09-23 11:46:52 +04:00
Michael Shigorin
56b3147eac README: minor readability fixes
Should be a tiny bit better this way.
2012-09-22 17:37:14 +04:00
Michael Shigorin
d5cf1ff3eb renamed menuitem-grub feature to relname
Its immediate purpose was influencing the GRUB boot menu
*but* the implemented mechanism is actually a part of the
long planned text branding and might be further merged
into branding when hierarchical features finally chime in.

So let's get the naming straight before it breeds.
2012-09-12 20:12:41 +03:00
Michael Shigorin
f44908ca78 proofreading of the merged commits
File contents should be correct.
2012-09-12 19:39:42 +03:00
Mike Radyuk
8233aa8424 added menuitem-grub feature 2012-09-12 19:23:55 +03:00
Mike Radyuk
a35b5fbc21 added MENUITEM variable 2012-09-12 19:19:37 +03:00
Michael Shigorin
c3a1b4a934 gear-store-tags 2012-09-03 20:22:54 +03:00
Michael Shigorin
061f299fa1 0.8.1-alt1
- misc fixes
2012-09-03 20:22:16 +03:00
Michael Shigorin
e52e21781f actually useful vm/icewm
See http://www.opennet.ru/openforum/vsluhforumID3/86239.html#1
for a query that has led to this one; in particular,
- xdm dropped (won't log in root and there are no users yet);
- network is brought up and configured via DHCP by default;
- apt-get works out-of-box;
- default image size is twice the chroot size.
2012-09-03 19:16:50 +03:00
Michael Shigorin
0e8871e7b4 use un-def kernel by default
3.5.2-std-def-alt2 brings boot problems which were absent
with 3.4.x-std-def and are absent with 3.5.x-un-def;
seems like it's better to stay with known good variant
at the moment instead of having to fall back to it.
2012-09-03 19:16:50 +03:00
Michael Shigorin
e064954e93 rescue += ipmitool
It was missing indeed; suggested by ildar@.
2012-09-03 19:16:50 +03:00
Michael Shigorin
83fa2544bc fix root directory permissions
hsh-initroot leaves the chroot's root directory permissions
as 1775 while these should really be 755 at most; let's fix it
(important for both VE and VM images, useful for rescue/livecd
ones as well -- especially those with an installer onboard).
2012-09-03 19:16:50 +03:00
Michael Shigorin
d0cb988897 desktop+live += su
Thanks aen@ for finally mentioning it
as I just used to cope without su. :)
2012-09-03 19:16:50 +03:00
Michael Shigorin
84591991cb no more *silent* aliases
The missing "; @:" at the end of the otherwise recipeless rule
resulted in target graph being broken; I should have checked this
when introducing these aliases (the intent was to reduce noise).
2012-09-03 19:16:50 +03:00
Michael Shigorin
d2581522d9 systemd += chkconfig
It appears that chkconfig wasn't getting pulled in
by now if not told so explicitly.  Still in need.
2012-09-03 19:16:50 +03:00
Michael Shigorin
705a20938a conf.d/test.mk: live-mate-systemd
Not even alpha quality yet but at least debuggable:
- X session doesn't autostart but service dm start works;
- keyboard layout indicator is missing until started by hand.
2012-09-03 19:16:50 +03:00
Michael Shigorin
f54a5660d1 MATE: current crop of packages
There's a bunch of additions to the MATE package list:
thanks viy@ for pulling extras into autoimports,
several more tweaks done due to hints by dek@,
and openssh packages added for debugging convenience.

The kernel's been changed for the latest one (un-def).
2012-09-03 19:16:50 +03:00
Michael Shigorin
e0a849e974 initial live-gns3
Someone over the internets suggested that such a LiveCD exist:
http://www.opennet.ru/openforum/vsluhforumID3/85817.html#24
...but then disappeared in the thin air, sigh.
2012-09-03 19:15:42 +03:00
Michael Shigorin
b5e5d4f223 gear-store-tags 2012-08-13 22:04:57 +03:00
Michael Shigorin
d1bbbbc10b 0.8.0-alt1
- stage2@live
2012-08-13 22:03:32 +03:00
Michael Shigorin
3a3893b664 rescue += firmware (server, wireless)
There's no use of a rescue image when it has no firmware
for the controller in the system being worked on...
so added some.
2012-08-13 15:51:53 +04:00
Michael Shigorin
23175f0020 merged experimental support for opensuse
This isn't ready for general consumption (just as centos one)
but the notion of REPO is floating around along with apt-conf
thoughts, and it might still be useful to someone poking around
conf.d/test.mk.

Request hasher-pkg-init.spec from mike@ or led@ if interested;
the experiments were carried out using openSUSE 11.4 repository
and slightly patched hasher (cpio blacklist for devices).
2012-08-11 23:24:23 +03:00
Michael Shigorin
eb3df648a2 minor documentation facelift
A few more items were asking for some attention.

In particular, build examples should start with
the most basic, error-proof and quick targets.
2012-08-11 22:56:41 +03:00
Michael Shigorin
d646e71906 doc/qemu.txt: mostly automated
This part of docs was pleading to put it into a small shell
script; it was done to facilitate kas@' debugging efforts
so that qemu-system-ppc might eventually get fixed, thus
livecd-qemu-arch package now "obsoletes" this file.
2012-08-11 22:56:24 +03:00
Michael Shigorin
c08e86afc5 features: hopefully better README
Thanks both drool@ for his mild frustration with the current
documentation as well as Greg Kroah-Hartman, Heikki Orsila
and Neil Brown for http://lwn.net/Articles/504814/ -- the docs
should really emphasize *why* something is done, not *how*,
as the "how" part is better documented with the code itself
(that doesn't mean that "the big picture" isn't needed).
2012-08-11 21:45:26 +03:00
Michael Shigorin
b21353a00c complex subprofile delimiter changed ("/" -> "@")
That sub/stage2/install2 was somewhat clumsy actually as it looked
like a hierarchical thing while being a substitution thing:
generic stage2 would get put in place renamed as install2.

This could only get worse with hierarchical features which have
already been both requested and considered for quite a time,
and "stage2 at install2" reads much more naturally.
2012-08-11 20:11:17 +03:00
Michael Shigorin
912dbcfd10 features: drop dirtags
Finishes what 3dd020338b
has essentially done... the path seems to be elsewhere.
2012-08-11 20:06:00 +03:00
Michael Shigorin
e6f13defcd razorqt += qps
Don't remember who exactly recommended this nice and elegant
system monitor but it fits just fine.
2012-08-10 19:48:04 +04:00
Michael Shigorin
c4311108ea git usage refactoring
There were heaps of "if type -t git" there already;
it wasn't an unintentional mishap but rather a moderate
copy-paste to get the use cases, and now these seem to
have essentially settled.

So time to scrap some dups.

NB: the scripts in the generated profile can't rely on
the contents of the metaprofile (these need to be able
to work in standalone case either), so a bit of crap
still lurks there.
2012-08-10 00:12:46 +03:00
Michael Shigorin
a3779231cb rescue += zerofree, wipefreespace
This kind of tools can be badly missing at times.
2012-08-09 23:40:25 +03:00
Michael Shigorin
9c16a9e6ff rescue += boot off sda/sdb
There's no (convenient) "eject" at times, so it's better to provide
extra ways of booting right away.
2012-08-08 20:39:26 +04:00
Michael Shigorin
70793436c7 rescue += openssh
Found myself pretty silly while sittin' at the rescue console
and bein' unable to leave the cool server room for a way
more comfortable armchair and a laptop's keyboard...

(yes, it was that disk array needing GPT tools)
2012-08-08 20:27:59 +04:00
Michael Shigorin
1cf14cda95 lists/tagged/rescue*: minor update
Several GPT-related packages added along with
a few more rescue related ones.
2012-08-08 16:38:12 +04:00
Michael Shigorin
05b3c65cd0 gear-store-tags 2012-08-07 00:04:47 +04:00
Michael Shigorin
55fda1a044 0.7.6-alt1
- minor improvements
2012-08-07 00:03:41 +04:00
Michael Shigorin
0d859e70fc image.in/Makefile: support image STATUS
Another feature suggested by Michael Radyuk (torabora):
some images are known alpha/beta quality, it's more handy
to just state this at the build time than to rename by hand.
2012-08-06 23:58:26 +04:00
Michael Shigorin
cbfc3db882 syslinux: honour META_VOL_SET for boot menu
This trots along the TODO item on text branding
and hopefully helps Michael Radyuk (torabora)
with his feature request to tweak the installer's
"Install ALT Linux" label; as an example, Simply
will now offer to "Install Simply Linux".
2012-08-06 23:58:26 +04:00
Michael Shigorin
43d62dd9bb live-builder.iso += livecd-qemu-arch
The package actually passed the test and just got uploaded
to Sisyphus proper; its aim is to help set up the cross-arch
QEMU build environment.

NB: there are known issues with PPC32-on-x86_64 (which were
the cause for this package and commit to be created in the
first place).
2012-08-06 23:56:32 +04:00
Michael Shigorin
307fb51f15 conf.d/test.mk: experimental stuff went here
Some images were unbuildable (at least without special setup,
like ve/centos), unusable or just not useful in any meaningful way
(like distro/live-isomd5sum); as these tend to get any attention
during experiments, I decided to put them together in a separate
configuration file that would be effectively skipped if DEBUG
is not requested.
2012-07-31 21:28:44 +04:00
Michael Shigorin
46e3c94707 syslinux: no ui, no escape
This one was suggested by enp@ for industrial use where
some extra protection for the boot process might be quite
desirable.

If no syslinux ui was specified (the stock configuration paths
ensure there is one) or if it was set to "none" explicitly,
then there's no boot: prompt (let alone any menu).

If there's a need to ensure that the boot process is not
interruptable by Ctrl/Shift/Caps Lock/Scroll Lock.
2012-07-31 13:51:34 +04:00
Michael Shigorin
78a660aed6 live-builder: added qemu-user-binfmt_misc
This provides the means to cross-build at least ARM chroots,
there are known problems with PowerPC for me so far:
http://lists.altlinux.org/pipermail/devel/2012-July/194855.html

See also http://www.altlinux.org/Ports/arm/chroot for /proc magic.
2012-07-30 23:15:36 +04:00
Michael Shigorin
d8f64c0c89 gear-store-tags 2012-07-30 20:15:24 +04:00
Michael Shigorin
2a437c4d22 0.7.5-alt1
- a bunch of fixups and cleanups
2012-07-30 20:14:48 +04:00
Michael Shigorin
3a8af6b55d lib/clean.mk: post-build cleanup revisited
The prerequisites for a cleanup after a successful build
were somewhat weird at this point; now the rules are:
- if DEBUG level is more than 1 or CHECK is set, don't do it;
- otherwise if at least one of the following conditions is true:
  + there's more than one target being built in a row;
  + the build was run by e.g. alterator-mkimage;
  + metaprofile directory is read only
  ...then do a distclean.

If these are still weird or feel unsuitable for profile hacking,
drop me a note (or a patch).
2012-07-30 19:59:41 +04:00
Michael Shigorin
ea1f039c02 server-nano += +power
Essentially all the relevant server images got cpufreq setup
and a power button handler; feel free to ask for revert if
this causes any harm in any situation.
2012-07-28 14:26:27 +04:00
Michael Shigorin
8fd4b396f3 branding: clarify README
It wasn't obvious at all what BRANDING variable is for
(at least until the source code and existing configurarion
has been examined).
2012-07-28 13:32:01 +04:00
Michael Shigorin
a680ea2862 Makefile: fix default target to provide help again
`help' used to be the default target described at the very top
of the toplevel makefile but that got broken with g2f307ff;
spotted while discussing m-p with enp@.
2012-07-28 13:26:08 +04:00
Michael Shigorin
57747b22a5 initial live-testserver.iso
Also pulled the pkglist/kmodule part out of distro/server-mini's
recipe and started off a standalone feature based on it.

NB: el-smp kernel now contains aufs as a module but propagator
doesn't try to modprobe it.
2012-07-28 13:22:59 +04:00
Michael Shigorin
7eaa868525 conf.d/live.mk: ugly thinko fix, thx enp@
"textinst" != "textinstall", so let's just stick to the latter form.
2012-07-28 00:42:16 +04:00
Michael Shigorin
cb6a71d97f lib/ve.mk: whoops, ve/bare misses /sbin/init
Actually the templates pretending to be usable missed the whole
interactivesystem (sysvinit would get pulled in by services as well).

Fixed somewhat but time and practice will tell.
2012-07-21 19:15:24 +03:00
Michael Shigorin
ceffac4035 x11: ensure kdm3 installation for tde
TDE distros don't really need kdm4 which was proposed as
a replacement by zerg@ (for all the valid reasons but kdm3
wasn't maintained at that point, this has changed since).
2012-07-19 15:39:30 +03:00
Michael Shigorin
6c00e10b31 live, rescue: fix stage2cfg.mk LISTS/PACKAGES order
The reason is that package lists and individual packages
are processed in different dependency resolution "transactions"
by mkimage; thus if packages (the more precise form of specifying
the contents) come first they can't override the lists appearing
later, and that's wrong: we should be able to specify the more
generic things and then pinpoint the specifics.

This became apparent while authoring [[Mkimage/Profiles/m-p/howto]]
asked for by drool@.
2012-07-19 13:32:53 +03:00
Michael Shigorin
cb764516eb build-vm: standalone build is a must, too
The problem was spotted by Alexander Bandura:
bin/tar2vm wasn't present in the generated profile.

I considered extending features.in/Makefile to include
bin/ alongside lib/ but that would make the helper's location
unpredictable (unless BUILDDIR is specified explicitly) so
restricting sudoers would be harder; worse yet, the copied file
would come with write access for the user building an image.

The implications in restricted case are complex enough anyways
so the recommended implementation would only include a fixed
readonly location like /usr/share/mkimage-profiles/bin/tar2vm
as laid out in doc/vm.txt, and that means it's in the metaprofile
not a generated profile.
2012-07-18 16:06:15 +03:00
Michael Shigorin
5f479eb80f conf.d/README: updated reference
Argh, is it overdocumentation already?
The temporary name bites once again...
2012-07-18 12:34:47 +03:00
Michael Shigorin
f3e923ad61 Makefile: drop extra >&2
say() redirects to stderr already.
2012-07-17 20:43:06 +03:00
Michael Shigorin
4ea5959f79 bin/mktmpdir: hasher might be unconfigured yet
No need to just go ahead and source files in potentially
unavailable directories, really.
2012-07-17 15:53:42 +03:00
Michael Shigorin
1b62f94bf3 gear-store-tags 2012-07-16 21:37:34 +03:00
Michael Shigorin
0a3aaf15c2 0.7.4-alt1
- ppc builds
2012-07-16 21:33:00 +03:00
Michael Shigorin
1ee997e832 initial PowerPC support
As it happens, adding another architecture required almost no changes;
native 32-bit ppc build took only ARCH and a repo, qemu-ppc one still
has problems (/.host/entry hangs while unpacking setup for fakedata).

Proof of concept on a QS22:

  $ make ve/bare.tar.gz
  ** ARCH: ppc
  /bin/sh: rpmvercmp: command not found
  21:41:01 cleaning up
  21:41:03 initializing BUILDDIR: build/
  21:41:03 preparing distro config
  21:41:05 starting image build (coffee time)
  21:42:48 done (1:42)
  ** image: $TMP/out/bare-20120716-ppc.tar.gz [21M]
2012-07-16 21:20:12 +03:00
Michael Shigorin
18f1a6360a bin/mktmpdir: grok NFS root
"df -l" is going to hurt (or at least spam) if it's a diskless node;
"df -P" helps maintain output parseability.  So be it.
2012-07-16 21:19:06 +03:00
Michael Shigorin
809ae4d9e8 live-builder: minor fixes
su wasn't making it into the image breaking ~/.git setup,
and there's no reason for a full default boot timeout either.
2012-07-16 18:24:18 +03:00
Michael Shigorin
24edc620d8 prep optimization
There was some extra duplication, just clean it up.
2012-07-16 18:24:18 +03:00
Michael Shigorin
d31a2555bd non-native ARM support via qemu
mkimage and hasher can make use of qemu to run
non-native binaries while working on the chroots;
thanks kas@, manowar@ and sbolshakov@ for implementing
this functionality as well as providing nice examples
through mkimage-profiles-arm and mkimage-profile-armrootfs.

This required the architecture check to be added since baking
a tarball with "arm" as its specified arch and x86_64 inside
isn't particularly good thing to let slip through; however
the implementation is quite fragile, bugreports and patches
are seriously welcome.

NB: APTCONF evaluation order between lazy make and nimble shell
turned out to be quite a delicate issue in this particular case.
2012-07-16 18:20:55 +03:00
Michael Shigorin
03ba4631f6 gear-store-tags 2012-07-09 23:47:49 +03:00
Michael Shigorin
49eb551fef 0.7.3-alt1
- arm builds
2012-07-09 23:46:49 +03:00
Michael Shigorin
3c26cc869d initial native ARM support
The only thing to be fixed was setarch(8) symlinks assumption
that is correct for x86 but not for ARM.

There's also some hasher(7) setup to be done:

  mkdir -p ~/.hasher
  echo >> ~/.hasher/config <<-EOF
  def_target=arm
  #cache_dir=$HOME/tmp	# depends on RAM/storage configuration
  EOF

...and of course apt(8) should be properly set up too.

An example PoC build on a CM-A510 board (tmpfs):

  $ make BRANDING=altlinux-centaurus ve/bare.tar.gz
  ** ARCH: arm
  18:10:45 initializing BUILDDIR: build/
  18:10:45 preparing distro config: build/distcfg.mk
  18:10:46 starting image build: tail -f build/build.log
  18:14:49 done (4:02)
  ** image: $TMP/out/bare-20120706-arm.tar.gz [23M]
2012-07-09 21:32:54 +03:00
Michael Shigorin
698c5e314a Makefile: drop noise when no config is found
~/.mkimage/profiles.mk is useful but not requisite by any margin;
no need to make noise trying to make it either.
2012-07-09 21:31:37 +03:00
Michael Shigorin
7683532ea2 lib/kernel.mk: single byte bugfix
Whoops, an overlooked character didn't bring too many
things down but was a BUG indeed :-/
2012-07-06 18:52:46 +03:00
Michael Shigorin
cf21fd4298 gear-store-tags 2012-07-02 16:19:06 +03:00
Michael Shigorin
b4560c7aee 0.7.2-alt1
- simply fixes
2012-07-02 16:17:22 +03:00
Michael Shigorin
bdb2ac05f8 50-setup-network: spelling fixes
It's not DHCP we're configuring but rather eth0.
(no need for trailing space either)
2012-07-02 16:14:34 +03:00
Michael Shigorin
cb55a89365 desktop.mk: use Croscore Arimo for most installers
The very basic bitmap fonts that were left in back a year ago
aren't particularly modern (even if they are somewhat elegant
and resource sparing which was the goal at that time).

So let's allow for something slightly prettier,
like Croscore Arimo kindly prepared by Steve Matteson,
provided by Google, packaged by Fedora and imported by
Igor Vlasenko.

Here's the news item behind this commit:
http://lwn.net/Articles/502371/
2012-07-02 16:14:34 +03:00
Michael Shigorin
ee3bdb2954 README: whoops, temporary name persisted
As they say there's nothing more permanent
than a temporary... params.txt and pkglists.txt
were known as vars-build.txt and vars-conf.mk
in the midst of reworking, and part of that
tried to stick.
2012-07-02 16:14:34 +03:00
Michael Shigorin
e36792ac90 lib/functions.mk: initial xport()
A few too many downstream makefiles employed the pattern
of "export GLOBAL_VAR := $(VAR)"; macroize that.
2012-07-02 16:14:34 +03:00
Michael Shigorin
fcf41f2201 proxy CLEANUP_PACKAGES down
mkimage implementation requires that the variables
to be passed to the scripts are to be prefixed with
GLOBAL_ or INFO_ tags as appropriate; in this case
the upstream makefile didn't care to.
2012-07-02 16:14:23 +03:00
Michael Shigorin
0e9a873608 build-vm: avoid dummy raw2raw conversion
It's better to rather just move the raw image instead
of specifically converting it into the same, and there's
no need for qemu-img altogether then.

Let's drop the intermediate raw image after successful
conversion as well.
2012-06-30 13:21:28 +03:00
Mikhail Efremov
bf5fd3f54e features.in/live: Don't use nopasswdlogin group in all cases.
Use it only for gdm and lightdm and only if it is used
in a PAM config.
2012-06-29 16:54:32 +04:00
Mikhail Efremov
87847ba744 slinux: Use installer-distro-simply-linux. 2012-06-28 19:41:37 +04:00
Mikhail Efremov
52ee4a826c live: Replace etcnet-dhcp hook with setup-network.
Setup network settings:
1. Init /etc/hosts with "127.0.0.1 localhost"
2. Set hostname, domainname
3. Set defaults for NetworkManager or
   attempt to autoconfigure eth0 by etcnet.

Based on init3-network script from m-p-d.
2012-06-27 20:00:53 +04:00
Mikhail Efremov
b8ece7f7be slinux/xfce: Added local-time hook.
Set system time to local time.
2012-06-26 20:24:27 +04:00
Mikhail Efremov
42d7025a7f slinux/xfce: gnome-screensaver -> xscreensaver. 2012-06-26 18:48:03 +04:00
Michael Shigorin
bb811eeae8 gear-store-tags 2012-06-25 20:29:59 +03:00
Michael Shigorin
5c4cedb873 0.7.1-alt1
- vm improvements and assorted tweaks/fixes
2012-06-25 20:29:06 +03:00
Michael Shigorin
9ba93dff2d 35-xdg-user-dirs: cope with missing control
There's no reason to bail out if xdg-user-dirs control
facility is not available within the branch used.
2012-06-25 19:29:38 +03:00
Michael Shigorin
f8af1c9243 docs updated
Minor tweaks to toplevel docs as well as some doc/*.txt,
doc/variables.txt renamed to doc/params.txt, and a brand new
doc/pkglists.txt is added (thanks manowar@ for his considerations).
2012-06-25 19:29:38 +03:00
Michael Shigorin
aa0f5c94e4 05live.cfg: drop "splash" by default
It's configured by plymouth feature when needed;
install2 bootargs support is generalized a bit
to become stage2 one as was intended anyways.
2012-06-25 19:29:38 +03:00
Michael Shigorin
83b7ca6982 live.mk: added live-webkiosk-flash
This one was requested by Andrew Churashev; please note
that the image in use must contain recent flash plugin
so that at least the already known vulnerabilities are
more or less plugged in it... and Sun Java plugin isn't
going to get secure either.
2012-06-25 19:29:38 +03:00
Michael Shigorin
09be84beee initial vm-{net,ssh} features
A virtual machine isn't very useful if there are no means
to access it; let's bring up the basic networking and provide
root SSH access via pre-existing public key.

As the remote access with known default credentials is roughly
equivalent to just lending one's VMs to anyone with network
access to it, the fallback root password is now exterminated;
you have to provide one (or a long enough random string
if you plan to use keys only, see e.g. apg utility).
2012-06-25 19:29:38 +03:00
Michael Shigorin
3f21b6b01c factor out openssh packages
There's no need to repeat the typical openssh-* triade
all over the place; those who need server and client
are better off pulling in "openssh" pkglist, and those
needing a particular package should specify it.
2012-06-25 19:29:38 +03:00
Michael Shigorin
b24bd31f45 build-vm: 06syslog should differ from VE's one
There's no need to disable console as it's emulated too,
and it still can be helpful or just convenient.
2012-06-25 19:29:38 +03:00
Michael Shigorin
11d4f4062e vm feature renamed to vmguest
The "vm" name became a bit confusing with the introduction
of build-vm feature; let's call this one "vmguest" until we do
hierarchical (sub)features.
2012-06-25 19:29:38 +03:00
Michael Shigorin
e355bd7ce9 bashize tar2vm
Finally tired of expr(1) quirks,
and even ash(1) does $((arithmetic-expansion))!
2012-06-25 19:29:38 +03:00
Michael Shigorin
0a5f164d65 cleanup, build-vm: mutual support
It appears that reusing installer-feature-*-stage3 packages
is perfectly fine with VM images; these just need to be removed
after the package scripts they carry have worked out.
2012-06-25 19:29:38 +03:00
Michael Shigorin
8a04d9b656 initial specific VM formats support
Raw disk images are convenient and universal
but there are custom formats like Qemu's qcow2
providing additional features, e.g. copy-on-write
or space savings.  All of this ultimately belongs
to mkimage but in the mean time has been implemented
here as well.
2012-06-25 19:29:38 +03:00
Michael Shigorin
90be07fbf8 initial conf.d/vm.mk
After we have built a bare virtual machine image successfully
some variations are due, and these are to be described here.
2012-06-25 19:29:38 +03:00
Michael Shigorin
72fc74d142 x11: use stage3 variations for THE_PACKAGES
installer-feature-no-xconsole depends on stage2 bits and is
NOT intended for installed/live systems at all; let's move
to the proper stage3 based one.
2012-06-25 19:29:38 +03:00
Michael Shigorin
f6462700ca README: single-byte bugfix
Was mentioning REPORTS while the variable name is REPORT.
2012-06-25 19:29:38 +03:00
Mikhail Efremov
bc4277ffe1 systemd: Add 20-systemd-locale hook on live.
Don't allow systemd to set LANG for all processes.
See ALT#27408 for details.
2012-06-22 15:38:00 +04:00
Mikhail Efremov
6c018082d6 live: Add 35-xdg-user-dirs hook.
Turn on xdg-user-dirs by default.
2012-06-21 20:55:02 +04:00
Mikhail Efremov
9addba0c9d live: Fixed 30-users hook.
Workaround for ALT#13213.
2012-06-21 20:06:22 +04:00
Mikhail Efremov
1a7940c86f Change link to the image format.
$(IMAGE_NAME).$(IMAGE_TYPE) -> $(IMAGE_NAME)-latest-$(ARCH).$(IMAGE_TYPE)
2012-06-21 17:12:27 +04:00
Mikhail Efremov
9bd853e88c Add LIBDIR variable.
Allow to put the log files and reports in a custom directory instead
of IMIGEDIR.
2012-06-21 17:11:02 +04:00
Michael Shigorin
fc716ec048 gear-store-tags 2012-06-18 21:58:42 +03:00
Michael Shigorin
4de50be84c 0.7.0-alt1
- new features:
  + initial build-vm
  + plymouth
2012-06-18 21:56:46 +03:00
Michael Shigorin
75f7c62bd1 initial build-vm feature
Yes, mkimage-profiles is now able to build VM disk images.
So far the support is pretty basic:

- a single hard drive image with a single partition/FS
- only stock root password is configurable
- LILO is hardwired as a bootloader

The resulting images tend to boot under qemu/kvm though.

Please see doc/vm.txt for the warning regarding additional
privileges and setup required.  This was started back in
February but I still hoped to avoid sudo/privileged helper
(and libguestfs is almost as undistributable as can be)...

Thanks:

- http://blog.quinthar.com/2008/07/building-1gb-bootable-qemu-image-using.html
- Alexey Morarash who reworked that as https://github.com/tuxofil/linsygen
- led@, legion@, vitty@, aen@ for providing advice and inspiration
2012-06-18 21:56:46 +03:00
Michael Shigorin
6ab9a3550b live-mate.iso: move to nodm
autologin won't register a consolekit session, and gnomes
are too greedy regarding sessions to let us go unmolested...

This particular image isn't production ready when built on
current Sisyphus yet due to unresolved NM/dbus problems
but I decided to at least archive the reached state.
2012-06-18 20:58:11 +03:00
Michael Shigorin
59c1bf9705 initial nodm autologin support
This one is contributed by Max Kosmach and somewhat
streamlined/tweaked by me; a part of it rather belongs to
nodm and xinitrc packages but is not exactly trivial to get it
there due to the looming systemd-logind/consolekit disaster;
see also #27449.

Several hacks to make NetworkManager usable in a LiveCD environment
are there too (but it resists so far).
2012-06-18 20:57:46 +03:00
Michael Shigorin
743bc279b1 initial live-mate
The second shot at an image worked out;
MATE packages are not in Sisyphus yet, use

rpm http://autoimports.altlinux.org/pub/ALTLinux/autoimports/Sisyphus $ARCH autoimports
rpm http://autoimports.altlinux.org/pub/ALTLinux/autoimports/Sisyphus noarch autoimports
2012-06-18 20:55:53 +03:00
Michael Shigorin
d565196878 live-tde += plymouth, use/live/install
These tweaks were suggested by rom_as@
based on his continued m-p-d work.

distro/.live-desktop also changed to depend
on use/plymouth/live
2012-06-18 20:55:52 +03:00
62d2353c3e update server-systemd
(mike@: actually no sense to set both
KFLAVOURS and STAGE1_KFLAVOUR to the same value
since the latter is derived from the former)
2012-06-18 20:55:52 +03:00
Michael Shigorin
2935c44dbb syslinux: get rid of ^s with gfxboot
Keyboard accelerators rather make sense
with menu/vesamenu UI.
2012-06-18 20:55:52 +03:00
Michael Shigorin
07d812d7ff 99cleanupdb: drop silly apt purge attempt
Why would anyone try to remove apt when it's needed
for package dependency tracking for the installation,
it only takes a less cursory look at the build.log
to figure out it didn't actually happen anyways...
2012-06-18 20:55:38 +03:00
Michael Shigorin
8989fc2771 added plymouth feature
An initial draft of it was done half a year ago but several tricky
thingies had kept the code from showing up as it was rather brittle
and incomplete.

This implementation involves quite a few changes all over the place
but finally works good enough for live and installer images.

Please pay attention to the versions of these packages:
- installer-feature-setup-plymouth (0.3.2-alt1+)
- branding-altlinux-sisyphus (20110706-alt2+ if used)
- plymouth (0.8.3-alt20.git20110406+)

See also:
- http://www.altlinux.org/Branding
- http://www.altlinux.org/Plymouth
2012-06-14 17:15:24 +03:00
Michael Shigorin
804daaa16b gear-store-tags 2012-05-28 22:15:59 +03:00
Michael Shigorin
ebeb52b5da 0.6.8-alt1
- minor bugfixes
2012-05-28 22:13:50 +03:00
Michael Shigorin
5c3d58b8e4 desktop: add glibc-locales, essentially
The more or less basic desktop appeared to lack
base locale support (starting with glibc-locales).
2012-05-26 15:10:20 +03:00
Michael Shigorin
860e20c62d lib/common.mk: avoid using uninitialized variables
It somehow managed to evade me that $(TMP) might be uninitialized;
definitely should be checked before stuffing into sed substitution
command.

NB: this could be done in pure make but my take was less readable.

Thanks shadowsbrother/gmail for hitting and reporting this.
2012-05-26 14:08:19 +03:00
Michael Shigorin
74e5734eae 80-make-initfs: optimize for newer make-initrd
legion@ implemented skipping depmod call, and that's several more
seconds for most of the images; let's shave these off if possible.
2012-05-25 16:55:54 +03:00
Michael Shigorin
3e7346f4e2 gear-store-tags 2012-05-21 21:30:37 +03:00
Michael Shigorin
128fc9d44d 0.6.7-alt1
- docs updates
2012-05-21 21:29:58 +03:00
Michael Shigorin
5dc8001a8a doc/features.txt: clarified the convention
It might be spottable but not immediately obvious that a feature
lives entirely in features.in/FEATURE and every target it provides
is described in the corresponding config.mk; thanks dkr@ for asking.
2012-05-21 21:04:00 +03:00
Michael Shigorin
8cc8d5ff36 doc/variables.txt: tweak CHECK description
It wasn't exactly obvious that the actual image build
isn't started with CHECK=1.
2012-05-21 21:04:00 +03:00
Michael Shigorin
d190e6ef1c Makefile: include ~/.mkimage/profile.mk as well
It appears that while splitting off main.mk we've lost
the ability to pass e.g. ARCHES via custom configuration;
thanks dkr@ for spotting this.
2012-05-21 21:04:00 +03:00
Michael Shigorin
9414bde4f5 added sub.in/{main,stage2}/lib/.gitignore
Whoops, forgot to feed placeholders for git to grok
the empty directories that are needed later...
2012-05-21 21:04:00 +03:00
Michael Shigorin
dc93c137d9 docs: more hints on features
It wasn't articulated clearly enough that features are strictly
incremental (while variables can be overridden).
2012-05-21 21:04:00 +03:00
Michael Shigorin
88481ecc81 live-razorqt: lightdm tweaks
lightdm-1.1+ handling had to be corrected
regarding the separate greeters.
2012-05-21 21:03:08 +03:00
Michael Shigorin
a304469699 vm: tweak virtualbox modules
virtualbox-addition modules need drm (see also #27344).
2012-05-16 15:17:57 +03:00
Michael Shigorin
695648f8b4 lib/check.mk: catch missing READMEs for features
`make check' is a bit more convenient than relying on my head...
2012-05-16 13:48:12 +03:00
Michael Shigorin
c42d635b55 features.in/{kernel,vm}: added READMEs
Shame on me, these shouldn't get forgotten in the first place.
2012-05-16 13:47:30 +03:00
Michael Shigorin
03f99d9ff2 gear-store-tags 2012-05-14 21:37:32 +03:00
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
256 changed files with 3261 additions and 668 deletions

View File

@@ -1,5 +1,5 @@
Name: mkimage-profiles
Version: 0.5.4
Version: 0.8.4
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,86 @@ cp -a * %buildroot%mpdir
%doc README QUICKSTART
%changelog
* Tue Oct 16 2012 Michael Shigorin <mike@altlinux.org> 0.8.4-alt1
- worked around enhancements in current make-initrd-propagator
(thus fixed live image boot, finally)
* Mon Oct 15 2012 Michael Shigorin <mike@altlinux.org> 0.8.3-alt1
- make-3.82 support
- fixed live image boot to some extent (see #27640, #27852)
* Mon Sep 24 2012 Michael Shigorin <mike@altlinux.org> 0.8.2-alt1
- fixed build with recent make-initrd-propagator
* Mon Sep 03 2012 Michael Shigorin <mike@altlinux.org> 0.8.1-alt1
- misc fixes
* Mon Aug 13 2012 Michael Shigorin <mike@altlinux.org> 0.8.0-alt1
- stage2@live
* Mon Aug 06 2012 Michael Shigorin <mike@altlinux.org> 0.7.6-alt1
- minor improvements
* Mon Jul 30 2012 Michael Shigorin <mike@altlinux.org> 0.7.5-alt1
- a bunch of fixups and cleanups
* Mon Jul 16 2012 Michael Shigorin <mike@altlinux.org> 0.7.4-alt1
- ppc builds
* Mon Jul 09 2012 Michael Shigorin <mike@altlinux.org> 0.7.3-alt1
- arm builds
* Mon Jul 02 2012 Michael Shigorin <mike@altlinux.org> 0.7.2-alt1
- simply fixes
* Mon Jun 25 2012 Michael Shigorin <mike@altlinux.org> 0.7.1-alt1
- vm improvements and assorted tweaks/fixes
* Mon Jun 18 2012 Michael Shigorin <mike@altlinux.org> 0.7.0-alt1
- new features:
+ initial build-vm
+ plymouth
* Mon May 28 2012 Michael Shigorin <mike@altlinux.org> 0.6.8-alt1
- minor bugfixes
* Mon May 21 2012 Michael Shigorin <mike@altlinux.org> 0.6.7-alt1
- docs updates
* 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

View File

@@ -1,6 +0,0 @@
object 672125b9e588b0a0bc6587680faf164da9f25af7
type commit
tag v0.5.3
tagger Michael Shigorin <mike@altlinux.org> 1325530888 +0200
main.mk

View File

@@ -0,0 +1,6 @@
object 7a50acb5c486ff08daad4ef93743d98ff37cfb9a
type commit
tag v0.8.3
tagger Michael Shigorin <mike@altlinux.org> 1350333297 +0300
make-3.82

View File

@@ -1 +1 @@
4d92978230ee015e53f81c2f29f4ec40d8bcc822 v0.5.3
d98aa48ec72b43a4a8ebe0b58524f19f046c9cad v0.8.3

View File

@@ -1,38 +1,63 @@
# umbrella mkimage-profiles makefile:
# iterate over multiple goals/arches
# iterate over multiple goals/arches,
# collect proceedings
# immediate assignment
# preferences
-include $(HOME)/.mkimage/profiles.mk
# for immediate assignment
ifndef ARCHES
ifdef ARCH
ARCHES := $(ARCH)
else
ARCHES := $(shell arch | sed 's/i686/i586/')
ARCHES := $(shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/')
endif
endif
export ARCHES
# recursive make considered useful for m-p
MAKE += --no-print-directory
export PATH := $(CURDIR)/bin:$(PATH)
.PHONY: clean distclean help
clean distclean help:
# 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 := help help/distro help/ve help/vm clean distclean check
.PHONY: $(DIRECT_TARGETS)
$(DIRECT_TARGETS):
@$(MAKE) -f main.mk $@
export NUM_TARGETS := $(words $(MAKECMDGOALS))
# for pipefail
SHELL = /bin/bash
# don't even consider remaking a configuration file
.PHONY: $(HOME)/.mkimage/profiles.mk
# 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`"; \
echo "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
say "** goal: $@ [$$n/$(NUM_TARGETS)]"; \
fi; \
for ARCH in $(ARCHES); do \
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then echo; fi; \
echo "** ARCH: $$ARCH"; \
$(MAKE) -f main.mk ARCH=$$ARCH $@; \
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then say; fi; \
say "** ARCH: $$ARCH"; \
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 echo; fi
if [ "$$n" -lt "$(NUM_TARGETS)" ]; then say; fi

View File

@@ -1,3 +1,6 @@
English quickstart: make syslinux.iso (after setting up
http://en.altlinux.org/Hasher; large tmpfs helps a lot).
требуется
~~~~~~~~~
- ALT Linux 6.0 или выше (возможна адаптация "вниз")
@@ -18,17 +21,17 @@
# 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
- тестовая сборка (см. тж. lib/distro.mk, doc/params.txt):
$ make syslinux.iso
ссылки
~~~~~~
- http://www.altlinux.org/tmpfs
- http://www.altlinux.org/hasher
- http://www.altlinux.org/mkimage
- http://www.altlinux.org/Mkimage/Profiles/m-p
- http://www.altlinux.org/m-p

31
README
View File

@@ -1,15 +1,11 @@
Welcome to mkimage-profiles!
English quickstart: make distro/server-base.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/params.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
Задача:
- конфигурирование и создание образов на базе ALT Linux
@@ -32,9 +28,9 @@ Most docs are in Russian, welcome to learn it or ask for English.
- сборка образа
Объекты:
- дистрибутивы и виртуальные окружения:
+ описываются в conf.d/*.mk или соответственно lib/{distro,ve}.mk
+ могут основываться одно на другом
- дистрибутивы и виртуальные среды/машины:
+ описываются в conf.d/*.mk или соответственно lib/{distro,ve,vm}.mk
+ могут основываться на предшественниках, расширяя их
+ дистрибутивы также:
- включают один или более субпрофилей по надобности
+ желательно избегать множественного наследования, см. тж. фичи
@@ -43,13 +39,13 @@ Most docs are in Russian, welcome to learn it or ask for English.
+ базовые комплекты помещены в подкаталогах под sub.in/;
их наборы скриптов могут расширяться фичами
- фичи:
+ список собирается в $(FEATURES)
+ законченные блоки функциональности (или наборы таковых)
+ описываются в индивидуальных features.in/*/config.mk
+ могут требовать другие фичи, а также субпрофили
+ накопительный список собирается в $(FEATURES)
+ при сборке $(BUILDDIR) содержимое фич добавляется в профиль
- списки пакетов (*_LISTS):
+ просьба по возможности избегать дублирования
+ просьба по возможности избегать дублирования (см. bin/pkgdups)
- индивидуальные пакеты (*_PACKAGES): см. тж. conf.d/README
Результат:
@@ -58,3 +54,16 @@ Most docs are in Russian, welcome to learn it or ask for English.
+ указанный явно,
+ либо ~/out/ (если возможно),
+ или $(BUILDDIR)/out/ иначе
- формируются отчёты, если запрошены (REPORT)
См. тж.:
- http://altlinux.org/m-p
- doc/:
+ params.txt: переменные, указываемые при запуске сборки
+ pkglists.txt: формирование состава образа
+ features.txt: обзор подключаемых особенностей
Удачи; что не так -- пишите.
--
Michael Shigorin <mike@altlinux.org>

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

@@ -12,7 +12,7 @@ try_source() { [ -f "$1" ] && . "$1"; }
# hasher accepted ones
get_prefices()
{
try_source /etc/hasher-priv/system
try_source /etc/hasher-priv/system || exit 1
try_source `/usr/libexec/hasher-priv/getconf.sh`
echo "$prefix" | tr ':' '\n' | while read i; do realpath "$i"; done
}
@@ -43,7 +43,7 @@ choose_tmpdir() {
for i in "$@"; do
[ -d "$i" -a -w "$i" ] || continue
echo -n "$i "
df -Tl "$i" | tail -1
df -PT "$i" | tail -1
done \
| sort -unk6 \
| while read dir dev fstype size used free percent mnt; do
@@ -61,19 +61,19 @@ choose_tmpdir() {
# 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
echo "error: no suitable directories found;"
echo "please check QUICKSTART, filesystem and hasher setup"
echo "(mount enough tmpfs into /tmp or fix hasher-priv prefix?)"
exit 1
fi
fi >&2
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
echo "error: no suitable directories found;"
echo "please check hasher docs and filesystem setup"
echo "(nodev and/or noexec on an otherwise suitable filesystem?)"
exit 1
fi
fi >&2
DIR="$TEMP/`dirname "$1"`"
NAME="`basename "${1:-tmpdir}"`"

21
bin/mp-commit Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
# commit the directory ($1) with a message ($2) to git
. shell-error
[ -d "$1" ] || fatal "$1 is not an existing directory"
if type -t git >&/dev/null && pushd "$1" >/dev/null; then
if [ -z "$(git config --global user.name)" ]; then
exit 0
fi
if [ ! -d .git ]; then
git init -q || fatal "git init failed"
fi
if [ -n "$(git status -s)" ]; then
git add . \
&& git commit -qam "$2" \
|| fatal "git add/commit failed"
fi
popd >/dev/null
fi

11
bin/mp-showref Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
# report on git repo in the current directory
if type -t git >&/dev/null; then
if pushd "$1" >/dev/null && [ -d .git ]; then
git show-ref --head -ds -- HEAD
git status -s
echo
popd >/dev/null
fi
fi

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 "}"

133
bin/tar2vm Executable file
View File

@@ -0,0 +1,133 @@
#!/bin/bash -e
# usage:
# tar2vm chroot.tar image.raw [size_in_bytes]
. shell-error
if [ $# -lt 2 ]; then
fatal "error: tar2vm needs at least two arguments"
fi
# this needs env_keep sudo setup to actually work
if [ -n "$GLOBAL_BUILDDIR" ]; then
WORKDIR="$GLOBAL_BUILDDIR/vmroot"
else
WORKDIR="$(mktemp --tmpdir -d vmroot-XXXXX)"
fi
[ -n "$WORKDIR" ] || fatal "couldn't come up with suitable WORKDIR"
[ -n "$GLOBAL_DEBUG" ] || message "WORKDIR: $WORKDIR"
# a tarball containing chroot with a kernel
TAR="$1"
[ -s "$TAR" ] || fatal "source tarball doesn't really exist"
# a path to the image to be generated
IMG="$2"
[ -d "$(dirname "$IMG")" ] || fatal "target directory doesn't exist"
# image size in bytes (256M is a fallback)
TARSIZE="$(stat -Lc %s "$TAR")"
DEFSIZE="$((2 * $TARSIZE))"
DISKSIZE="${3:-${DEFSIZE:-268435456}}"
# ...and in megabytes
DISKSIZEM="$(($DISKSIZE / 1048576))"
# tested to work: ext[234], jfs
ROOTFSTYPE="${4:-ext4}"
# single root partition hardwired so far,
# add another image for swap if needed
ROOTDEV="/dev/sda1"
# last preparations...
for i in losetup parted kpartx mkfs."$ROOTFSTYPE"; do
if ! type -t "$i" >&/dev/null; then
fatal "$i required but not found"
fi
done
LOOPDEV="$(losetup --find)"
ROOTFS="$WORKDIR/chroot"
exit_handler()
{
rc=$?
if [ -n "$ROOTFS" ]; then
umount "$ROOTFS"{/dev,/proc,/sys,}
if [ -n "$LOOPDEV" ]; then
kpartx -d "$LOOPDEV"
losetup --detach "$LOOPDEV"
fi
rm -r -- "$ROOTFS"
rmdir -- "$WORKDIR"
fi
exit $rc
}
trap exit_handler EXIT
# prepare disk image and a filesystem inside it
rm -f -- "$IMG"
dd if=/dev/zero of="$IMG" conv=notrunc \
bs=1 count=1 seek="$(($DISKSIZE - 1))"
losetup "$LOOPDEV" "$IMG"
parted --script "$LOOPDEV" mklabel msdos
parted --script "$LOOPDEV" mkpart primary ext2 1 "$DISKSIZEM"
kpartx -a "$LOOPDEV"
LOOPDEV1="/dev/mapper/$(basename "$LOOPDEV")p1"
mkfs."$ROOTFSTYPE" "$LOOPDEV1"
# mount and populate it
mkdir -pm755 "$ROOTFS"
mount "$LOOPDEV1" "$ROOTFS"
tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
for i in /dev /proc /sys; do mount --bind "$i" "$ROOTFS$i"; done
# NB: different storage modules might be needed for non-kvm
echo "$LOOPDEV1 / $ROOTFSTYPE defaults 1 1" >> "$ROOTFS/etc/fstab"
echo "MODULES_PRELOAD=sd_mod ata_piix $ROOTFSTYPE" >> "$ROOTFS/etc/initrd.mk"
KERNEL="$(readlink $ROOTFS/boot/vmlinuz | sed 's,vmlinuz-,,')"
chroot "$ROOTFS" make-initrd -k "$KERNEL"
sed -i "s,$LOOPDEV1,$ROOTDEV," "$ROOTFS/etc/fstab"
# configure and install bootloader
REGEXP='^([0-9]+) heads, ([0-9]+) sectors/track, ([0-9]+) cylinders.*$'
set -- $(fdisk -l "$LOOPDEV" | grep -E "$REGEXP" | sed -r "s@$REGEXP@\1 \2 \3@")
LILO_COMMON="lba32
delay=1
vga=0
image=/boot/vmlinuz
initrd=/boot/initrd.img
append=\"root=$ROOTDEV rootdelay=3\"
label=linux"
cat > "$ROOTFS"/etc/lilo-loop.conf << EOF
boot=$LOOPDEV
disk=$LOOPDEV
bios=0x80
heads=$1
sectors=$2
cylinders=$3
partition=$LOOPDEV1
start=63
$LILO_COMMON
EOF
chroot "$ROOTFS" lilo -C /etc/lilo-loop.conf
cat > "$ROOTFS"/etc/lilo.conf << EOF
boot=${ROOTDEV%[0-9]*}
$LILO_COMMON
EOF
if [ -n "$SUDO_USER" ]; then
chown "$SUDO_USER" "$IMG" "$ROOTFS" "$WORKDIR"
fi

View File

@@ -10,25 +10,49 @@
Попросту говоря, copy-paste -- тревожный признак.
По переменным:
По переменным (см. тж. ../doc/pkglists.txt):
- для пользовательского окружения (live, main) предназначены
THE_PACKAGES, THE_LISTS, THE_GROUPS, THE_PACKAGES_REGEXP
- для "обычного общего" (live, main, rescue) есть COMMON_PACKAGES
(NB: тоже попадают в базовую установку)
- SYSTEM_PACKAGES стоит применять крайне осторожно -- эти пакеты попадут
во все стадии, в том числе в образ чувствительной к объёму install2
(в stage1 -- только в инструментальный чрут); применяйте для того,
что обязано быть и в инсталяторе, и в готовой системе
- для "обычного общего" (live, main, rescue) есть COMMON_PACKAGES
(NB: попадают в базовую систему)
- для "пользовательского" (live, main) есть THE_GROUPS, THE_LISTS
и THE_PACKAGES
- для направленного действия служат:
+ STAGE1_PACKAGES, STAGE1_PACKAGES_REGEXP (первая стадия загрузки)
+ STAGE2_PACKAGES (инсталятор и спасательная/"живая" система)
+ 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
+ THE_KMODULES попадут в "пользовательские" окружения
(live и установленную систему)
Не стоит бояться такого разнообразия, для большинства задач достаточно THE_*.
По подстановкам:
- $(VAR) подставляются перед их записью в $(CONFIG), который distcfg.mk
- $$(VAR) раскрываются позже, при включении $(CONFIG) и востребовании
значений; в этом случае их значения могут изменяться до окончания
конфигурации, а также зависеть от значений других переменных
По спискам пакетов:
- на этапе экспериментирования можно забивать прямо в описание образа
- при фиксации состояния стоит воспользоваться существующими списками,
а дополнительные оформить как можно более чётко обособленными по тем
задачам, для решения которых они и подобраны
- повторяющиеся логически связанные группы списков может иметь смысл
выделить в фичу (см., например, power или x11)
- если явной фичи не наблюдается, но у группы дистрибутивов намечается
заметная общая часть -- её можно выделить в промежуточную цель вида
distro/.name, не являющуюся самостоятельно собираемой

View File

@@ -1,17 +1,19 @@
# 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/desktop-mini: distro/desktop-base \
use/lowmem use/x11/xdm use/bootloader/lilo \
use/power/acpi/button use/cleanup/alterator
distro/.desktop-mini: distro/.desktop-base use/x11/xdm +power; @:
distro/icewm: distro/desktop-mini
@$(call add,BASE_LISTS,$(call tags,icewm desktop))
distro/.desktop-network: distro/.desktop-mini +vmguest
@$(call add,SYSTEM_PACKAGES,fonts-ttf-google-croscore-arimo)
@$(call add,BASE_LISTS, \
$(call tags,(base || desktop) && (l10n || network)))
distro/desktop-systemd: distro/icewm use/systemd
distro/icewm: distro/.desktop-network use/lowmem use/install2/fs +icewm; @:
distro/tde: distro/.desktop-mini +tde; @:
distro/ltsp-tde: distro/tde +ltsp; @:
distro/ltsp-icewm: distro/icewm +ltsp; @:
endif

View File

@@ -1,40 +1,74 @@
# 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/dos: distro/.init use/dos use/syslinux/ui/menu; @:
distro/rescue: distro/.base use/rescue use/syslinux/ui/menu; @:
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
distro/.live-desktop: distro/.base +live use/plymouth/live; @:
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-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 \
use/syslinux/timeout/30
@$(call set,KFLAVOURS,$(BIGRAM))
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
@$(call add,LIVE_PACKAGES,livecd-qemu-arch strace)
@$(call add,LIVE_PACKAGES,qemu-user-binfmt_misc)
@$(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/.base use/live/base use/syslinux/localboot.cfg
@$(call add,LIVE_PACKAGES,live-install)
distro/live-install: distro/.live-base use/live/textinstall; @:
distro/.livecd-install: distro/.live-base use/live/install; @:
distro/live-icewm: distro/live use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || icewm)))
distro/live-razorqt: distro/live use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || razorqt)))
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
distro/live-razorqt: distro/.live-desktop use/live/autologin +razorqt; @:
distro/live-tde: distro/.live-desktop use/live/ru use/live/install +tde; @:
distro/live-rescue: distro/live-icewm
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
@$(call add,LIVE_LISTS, \
@$(call add,LIVE_LISTS,openssh \
$(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*')
# NB: flash/java plugins are predictable security holes
distro/live-webkiosk-flash: distro/live-webkiosk-mini use/plymouth/live +vmguest
@$(call add,LIVE_PACKAGES,mozilla-plugin-adobe-flash)
@$(call add,LIVE_PACKAGES,mozilla-plugin-java-1.6.0-sun)
@$(call add,LIVE_PACKAGES,alsa-utils udev-alsa)
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-mate: distro/.live-desktop use/live/nodm use/live/ru use/x11/3d-free
@$(call add,LIVE_LISTS,openssh $(call tags,(desktop || mobile) && mate))
@$(call set,KFLAVOURS,un-def) # the newest one
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,38 +1,27 @@
# server distributions
ifeq (distro,$(IMAGE_CLASS))
distro/server-base: distro/installer use/repo/main \
use/syslinux/ui-menu use/memtest use/bootloader/grub
@$(call add,BASE_LISTS,server-base)
distro/.server-base: distro/.installer use/syslinux/ui/menu use/memtest
@$(call add,BASE_LISTS,server-base openssh)
distro/server-mini: distro/server-base use/cleanup/x11-alterator
distro/server-nano: distro/.server-base \
use/cleanup/x11-alterator use/bootloader/lilo +power
@$(call add,BASE_LISTS,$(call tags,server network))
@$(call add,BASE_PACKAGES,dhcpcd cpio)
distro/server-mini: distro/.server-base use/server/mini use/cleanup/x11-alterator
@$(call set,KFLAVOURS,el-smp)
@$(call add,THE_KMODULES,e1000e igb)
@$(call add,STAGE1_KMODULES,e1000e igb)
@$(call add,BASE_LISTS,\
$(call tags,base && (server || network || security || pkg)))
@$(call add,BASE_LISTS,$(call tags,extra network))
distro/server-systemd: distro/server-mini use/systemd
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,BASE_KMODULES,rtl8168 rtl8192)
@$(call add,MAIN_KMODULES,bcmwl ndiswrapper)
@$(call add,MAIN_KMODULES,ipset ipt-netflow opendpi pf_ring xtables-addons)
@$(call add,MAIN_KMODULES,drbd83 kvm)
@$(call add,INSTALL2_PACKAGES,curl) ### should become curl-mini
@$(call add,BASE_LISTS,ovz-server)
@$(call add,MAIN_LISTS,kernel-wifi)
@$(call add,MAIN_GROUPS,dns-server http-server ftp-server kvm-server)
@$(call add,MAIN_GROUPS,ipmi mysql-server dhcp-server mail-server)
@$(call add,MAIN_GROUPS,monitoring diag-tools)
# tiny network-only server-ovz installer (stage2 comes over net too)
distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
use/syslinux/ui-menu use/syslinux/localboot.cfg use/memtest
@$(call add,SYSLINUX_CFG,netinstall2)
endif

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,simply-linux)
endif

72
conf.d/test.mk Normal file
View File

@@ -0,0 +1,72 @@
# debug/test/experimental images
ifneq (,$(DEBUG))
ifeq (distro,$(IMAGE_CLASS))
distro/syslinux: distro/.init \
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @:
distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @:
distro/live-systemd: distro/.base use/live/base use/systemd; @:
distro/live-plymouth: distro/.live-base use/plymouth/live; @:
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
distro/live-testserver: distro/live-install use/server/mini
@$(call set,KFLAVOURS,std-def el-smp)
distro/live-gns3: distro/live-icewm
@$(call add,LIVE_LISTS,gns3)
@$(call add,LIVE_KMODULES,kvm virtualbox)
distro/server-systemd: distro/server-mini use/systemd
@$(call set,KFLAVOURS,std-def)
distro/server-test: distro/server-mini use/relname
@$(call set,RELNAME,Test-Server)
# tiny network-only server-ovz installer (stage2 comes over net too)
distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
use/syslinux/ui/menu use/syslinux/localboot.cfg use/memtest
@$(call add,SYSLINUX_CFG,netinstall2)
distro/desktop-systemd: distro/icewm use/systemd; @:
distro/desktop-plymouth: distro/icewm +plymouth; @:
distro/live-mate-systemd: distro/live-mate use/systemd use/live/install; @:
endif # IMAGE_CLASS: distro
ifeq (ve,$(IMAGE_CLASS))
ifeq (centos,$(REPO))
ve/.centos-base: ve/.bare
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
ve/centos: ve/.centos-base
@$(call add,BASE_PACKAGES,openssh-server)
endif # REPO: centos
ifeq (opensuse,$(REPO))
ve/.opensuse-base: ve/.bare
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
@$(call add,BASE_PACKAGES,aaa_base)
endif # REPO: opensuse
endif # IMAGE_CLASS: ve
ifeq (vm,$(IMAGE_CLASS))
vm/net-static: vm/bare use/vm-net/static use/vm-ssh
@$(call set,VM_NET_IPV4ADDR,10.0.2.16/24)
@$(call set,VM_NET_IPV4GW,10.0.2.2)
endif # IMAGE_CLASS: vm
endif

9
conf.d/vm.mk Normal file
View File

@@ -0,0 +1,9 @@
# virtual machines
ifeq (vm,$(IMAGE_CLASS))
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh; @:
# NB: use/x11 employs some installer-feature packages
vm/icewm: vm/net use/cleanup/installer use/repo +icewm; @:
endif

View File

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

View File

@@ -10,7 +10,7 @@
- build/build.log
+ подробность зависит от значения переменной DEBUG,
которую можно передать при запуске make (см. variables.txt);
которую можно передать при запуске make (см. params.txt);
+ содержит коммит, из которого происходит сборка, и признак
"грязности" рабочего каталога при наличии модификаций после
этого коммита;

View File

@@ -1,8 +1,9 @@
фичи
~~~~
Особенности дистрибутива, не учитываемые в пакетной базе
или зависящие от переменных времени сборки/установки образа,
могут быть оформлены несколькими образами:
или зависящие от переменных времени сборки/установки образа;
по необходимости влияют на конфигурацию, приносят с собой
или запрашивают скрипты, которые могут быть оформлены как:
* scripts.d/ или image-scripts.d/ различных стадий;
* пакеты installer-feature-*
@@ -10,7 +11,7 @@
В большинстве случаев можно рекомендовать создание feature
средствами метапрофиля, поскольку при этом дерево кода более
удобно для анализа и обновления (и в отличие от m-p-d, нет
удобно для анализа и обновления (и в отличие от m-p-d -- нет
вынужденной необходимости либо контролировать включение нужных
фич "вручную" в скриптах по косвенным признакам, либо выносить
их в пакеты installer-feature-*).
@@ -27,3 +28,12 @@
Стоит избегать изменения пакетных умолчаний в случае, когда их
представляется осмысленным и возможным скорректировать в пакете:
таким образом они станут более дистрибутивными.
Обратите внимание, что фичи включаются в комплект инкрементально:
что добавили, то уже не убрать; поэтому при необходимости следует
выделять промежуточные цели сборки, собирающие необходимые фичи
и оставляющие те, по которым есть расхождения, на включение ближе
к конечной дистрибутивной цели.
Соглашение по именованию таково, что цели use/ФИЧА и use/ФИЧА/...
определяются в файле features.in/ФИЧА/config.mk и только в нём.

116
doc/params.txt Normal file
View File

@@ -0,0 +1,116 @@
переменные make
~~~~~~~~~~~~~~~
При запуске на сборку принимается ряд переменных
(см. тж. profiles.mk.sample):
- APTCONF
+ задаёт путь к требуемому apt.conf
+ значение: пусто (по умолчанию системный) либо строка
+ см. ../image.in/Makefile, apt.conf.sample
- ARCH
+ задаёт целевую архитектуру образов
+ значение: пусто (по умолчанию авто), i586, x86_64, arm, ppc
+ см. ../lib/build.mk
- ARCHES
+ задаёт набор целевых архитектур при параметрическом задании APTCONF
+ значение: пусто (по умолчанию авто) либо список через пробел
+ см. ../Makefile, profiles.mk.sample
- BELL
+ подаёт сигнал после завершения сборки
+ значение: пусто (по умолчанию нет) либо любая строка
+ см. ../lib/build.mk
- BUILDDIR
+ задаёт каталог генерируемого профиля и сборки
+ значение: пусто (по умолчанию авто) либо строка
+ см. ../lib/profile.mk
- BUILDDIR_PREFIX
+ задаёт префикс каталога генерируемого профиля и сборки
+ значение: строка; по умолчанию выбирается алгоритмически
+ см. ../main.mk
- BUILDLOG
+ задаёт путь к файлу журнала сборки/очистки
+ значение: по умолчанию $(BUILDDIR)/build.log либо строка
+ см. ../lib/log.mk
- CHECK
+ включает режим проверки сборки конфигурации (без сборки образа)
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../lib/build.mk, ../lib/clean.mk
- CLEAN
+ экономия RAM+swap при сборке в tmpfs, иначе места на диске
+ очистка рабочего каталога после успешной сборки очередной стадии
+ может помешать использовать некоторые варианты отладки
+ значение: любая строка; по умолчанию пусто при DEBUG, иначе 1
+ см. ../lib/clean.mk
- DEBUG
+ включает средства отладки, может отключить зачистку после сборки
+ значение: пусто (по умолчанию), 1 или 2
+ см. ../lib/log.mk, ../lib/clean.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
- ROOTPW
+ устанавливает пароль root по умолчанию для образов виртуальных машин
+ значение: пусто (по умолчанию root) либо строка
+ см. ../features.in/build-vm/image-scripts.d/00root
- SAVE_PROFILE
+ сохраняет архив сгенерированного профиля в .disk/
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../image.in/Makefile
- SORTDIR
+ дополнительно структурирует каталог собранных образов
+ значение: пусто (по умолчанию) либо строка
- например, '$(IMAGE_NAME)/$(DATE)'
+ см. ../image.in/Makefile
- SQUASHFS
+ определяет характер сжатия squashfs для stage2
+ значение:
- пусто (по умолчанию) либо normal: xz
- tight: xz с -Xbcj по платформе (лучше, но дольше -- подбор в два прохода)
- fast: gzip/lzo (быстрее запаковывается и распаковывается, меньше степень)
+ см. ../features.in/stage2/stage1/scripts.d/03-test-kernel
- STATUS
+ добавляет в имя образа указанный префикс
+ значение:
- пусто (по умолчанию) либо строка (например, "alpha", "beta")
+ см. ../image.in/Makefile
- VM_SIZE
+ задаёт размер несжатого образа виртуальной машины в байтах
+ значение: пусто (по умолчанию двойной размер чрута) или целое
+ см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2vm
пример
~~~~~~
make DEBUG=1 CLEAN=1 distro/syslinux.iso

50
doc/pkglists.txt Normal file
View File

@@ -0,0 +1,50 @@
списки пакетов
~~~~~~~~~~~~~~
Состав пакетной базы субпрофилей определяется значенями
следующих переменных профиля (см. тж. ../conf.d/README):
- main: пакетная база для установки
+ sub.in/main/Makefile, features.in/*/main/lib/*.mk
+ THE_LISTS, BASE_LISTS, MAIN_LISTS
+ THE_GROUPS, MAIN_GROUPS
+ THE_PACKAGES, BASE_PACKAGES, MAIN_PACKAGES,
SYSTEM_PACKAGES, COMMON_PACKAGES
+ THE_PACKAGES_REGEXP, BASE_PACKAGES_REGEXP, MAIN_PACKAGES_REGEXP
+ THE_KMODULES, BASE_KMODULES, MAIN_KMODULES, BASE_KMODULES_REGEXP
- KFLAVOURS
- stage2: общая часть installer, live, rescue
+ sub.in/stage2/Makefile, features.in/*/stage2/lib/*.mk
+ SYSTEM_PACKAGES, STAGE2_PACKAGES
+ STAGE1_KMODULES, STAGE1_KMODULES_REGEXP,
STAGE2_KMODULES, STAGE2_KMODULES_REGEXP
- STAGE1_KFLAVOUR или последний из KFLAVOURS
- installer: компактная "живая" система, содержащая только инсталятор
+ см. stage2
+ features.in/install2/install2/stage2cfg.mk,
features.in/*/install2/lib/*.mk
+ INSTALL2_PACKAGES
- live: пользовательский LiveCD (может содержать также инсталятор)
+ см. stage2
+ features.in/live/live/stage2cfg.mk,
features.in/*/live/lib/*.mk
+ THE_LISTS, LIVE_LISTS
+ THE_GROUPS, LIVE_GROUPS
+ THE_PACKAGES, LIVE_PACKAGES, COMMON_PACKAGES
+ THE_PACKAGES_REGEXP, LIVE_PACKAGES_REGEXP
+ THE_KMODULES, LIVE_KMODULES
- rescue: спасательный LiveCD
+ см. stage2
+ features.in/rescue/rescue/stage2cfg.mk
+ RESCUE_PACKAGES, COMMON_PACKAGES
+ RESCUE_LISTS
- stage1: ядро и загрузчик второй стадии
+ sub.in/stage1/Makefile, features.in/*/stage1/lib/*.mk
+ STAGE1_PACKAGES, SYSTEM_PACKAGES
+ STAGE1_PACKAGES_REGEXP
+ STAGE1_KMODULES_REGEXP
- STAGE1_KFLAVOUR или последний из KFLAVOURS

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)

9
doc/qemu.txt Normal file
View File

@@ -0,0 +1,9 @@
Для сборки на "неродной" архитектуре с применением трансляции
посредством QEMU установите пакет livecd-qemu-arch и выполните
команду register-qemu-arm от имени root (также предоставляется
register-qemu-ppc, но как минимум при сборке под ppc32 на x86_64
известны проблемы эмуляции).
Пример запуска:
make ARCH=arm APTCONF=/etc/apt/apt.conf.sisyphus.arm ve/bare.tar

View File

@@ -2,7 +2,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* постарайтесь не вносить без обсуждения разнобой стилей,
если есть предметные пожелания по коррекции текущего --
пишите в devel-distro@, обсудим;
пишите в devel-distro@ или мне (mike@), обсудим;
* перед тем, как делать существенные переработки уже имеющегося
кода -- опять же опишите проблему, идею и предполагаемый результат,

View File

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

27
doc/vm.txt Normal file
View File

@@ -0,0 +1,27 @@
сборка образов виртуальных машин
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ВНИМАНИЕ: заключительная операция создания образа жёсткого диска
из архива с содержимым корневой файловой системы требует доступа
к sudo и разрешения на выполнение скрипта bin/tar2vm в корневом
каталоге метапрофиля при установке mkimage-profiles из пакета
(это в планах исправить, но подход к libguestfs пока успехом
не увенчался).
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2vm
При работе с локальной копией mkimage-profiles.git следует иметь
в виду, что предоставлять недоверенному пользователю право выполнять
от имени root доступный ему по записи скрипт равнозначно предоставлению
полных привилегий root.
Для работы с более специфичными форматами, чем raw ("буквальный"
образ диска), потребуется утилита qemu-img из одноименного пакета;
см. тж. вывод команды make help/vm
Также потребуется пакет multipath-tools (/sbin/kpartx).
Пример сборки и запуска VM:
$ make ROOTPW=reallysecret1 vm/bare.img && kvm -hda ~/out/bare.img

View File

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

View File

@@ -2,17 +2,36 @@
# (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
export BUILDDIR
include $(BUILDDIR)/distcfg.mk
# first rsync what's static, and make backups (*~) --
@@ -46,23 +65,18 @@ $(FEATURES):
fi; \
pushd "$$feat" >/dev/null && \
for sub in / $(SUBPROFILES); do \
dirtags=; \
if [ "$$sub" = / ]; then \
parts=lib; \
srcdirs="."; \
dst="."; \
else \
parts=; \
src="$${sub%/*}"; \
dst="$${sub#*/}"; \
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)"; \
srcdirs="$${srcdirs:+$$srcdirs }$$dst"; \
fi; \
for srcdir in $$srcdirs; do \
rsync -qab --exclude tagged \
@@ -75,45 +89,25 @@ $(FEATURES):
for srcdir in $$srcdirs; do \
[ -d "$$srcdir" ] || continue; \
pushd "$$srcdir" >&/dev/null; \
for part in $$parts {image-,}scripts.d; do \
for part in lib {image-,}scripts.d; do \
destdir="$(BUILDDIR)/$$dst/$$part"; \
[ -d "$$destdir" ] || continue; \
if [ "$$sub" = / -a -d "$$part" ]; then \
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; \
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"; \
popd >/dev/null; \
if [ -n "$$dst" ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \
fi; \
mp-commit "$(BUILDDIR)/$$dst/" "$$feat feature: $$the part added"; \
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; \
fi; \
mp-commit "$(BUILDDIR)" "$$feat feature generation complete"; \
popd >/dev/null
finalize:

View File

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

View File

@@ -5,4 +5,13 @@
систему (он НЕ должен требоваться пакету installer-distro-*)
и требует пакет выбранного загрузчика.
Обратите внимание: в процессе конфигурирования дистрибутива
"переключение" загрузчика может происходить только в одну сторону
-- если выставлен grub, произведено переключение на lilo и затем
произведена ещё одна попытка переключения на grub, то в конфигурации
останется lilo как последняя "новая" цель с точки зрения make.
При необходимости всё-таки "пересилить" последнее изменение можно
@$(call set,BASE_BOOTLOADER,grub_или_lilo)
Реализация экспериментальная (нужно модуляризовать 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,26 @@
Эта фича врезается в makefile субпрофилей и обеспечивает
добавление задающих внешний вид и сообщения дистрибутива
пакетов; см. тж. http://www.altlinux.org/Branding
Реализация "двумерная" -- отдельно задаётся BRANDING
(см. пакеты branding-*-%version-%release.src.rpm),
затем отдельно указывается, какие и куда помещать
компоненты заданного брендинга.
Назначение и возможные значения (если требуются):
- STAGE1_BRANDING
+ относится к загрузке со сгенерированного образа (например, ISO)
+ bootloader bootsplash (при старте)
- STAGE2_BRANDING
+ общая часть для всех вариантов stage2
+ bootsplash (при выключении)
- INSTALL2_BRANDING
+ специфические пакеты брендирования инсталятора
+ notes slideshow
- THE_BRANDING
+ общий список для использования в установленной системе и LiveCD
+ alterator bootsplash graphics indexhtml notes slideshow

View File

@@ -0,0 +1,11 @@
# NB: release part of branding goes to install2 feature
use/branding:
@$(call add_feature)
# 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 use/plymouth/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

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

View File

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

View File

@@ -0,0 +1,36 @@
# step 4: build the distribution image
# take the latter part for complex-specified subprofiles like stage2@live
SUBDIRS = $(SUBPROFILE_DIRS)
# 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)
# can't use mp-showref which belongs to the metaprofile
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,46 +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
### see also .../pkg.in/lists/Makefile
ifneq (,$(findstring install2,$(FEATURES)))
METADATA = metadata
endif
# see also ../scripts.d/01-isosort; needs mkimage-0.2.2+
MKI_SORTFILE := /tmp/isosort
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: $(GLOBAL_DEBUG) dot-disk $(METADATA) imagedir
metadata: dot-base
@mkdir -p files/Metadata
@rm -f files/Metadata/pkg-groups.tar
# see also alterator-pkg (backend3/pkg-install); we only tar up what's up to it
@tar -cvf files/Metadata/pkg-groups.tar -C $(PKGDIR) \
$$(echo $(call list,$(MAIN_GROUPS) .base) \
$(call group,$(MAIN_GROUPS)) \
| sed 's,$(PKGDIR)/*,,g')
dot-base:
@p="$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))"; \
echo -e "\n## added by build-distro.mk\n$$p" >> $(call list,.base)
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,3 +1,4 @@
Эта фича конфигурирует создание образа виртуального окружения (VE).
Дополняет финальную стадию сборки (lib/, image-scripts.d/).
Дополняет финальную стадию сборки (lib/, image-scripts.d/)
и тесно с ней связана.

View File

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

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

@@ -15,5 +15,3 @@ IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: imagedir

View File

@@ -0,0 +1,3 @@
Эта фича конфигурирует создание образа виртуальной машины (VM).
Дополняет финальную стадию сборки (lib/, image-scripts.d/).
Требует для работы sudo(8) -- см. тж. ../../doc/vm.txt .

View File

@@ -0,0 +1,4 @@
# hooked from ../../lib/sugar.mk
use/build-vm:
@$(call add_feature)
@$(call xport,ROOTPW)

View File

@@ -0,0 +1,4 @@
# copy tar2vm helper into generated profile to enable standalone builds
all:
@install -pD $(MKIMAGE_PROFILES)/bin/tar2vm $(BUILDDIR)/bin/tar2vm

View File

@@ -0,0 +1,11 @@
#!/bin/sh
if [ -n "$GLOBAL_ROOTPW" ]; then
if type -t chpasswd >&/dev/null; then
echo "root:$GLOBAL_ROOTPW" | chpasswd
else
echo "** warning: chpasswd binary missing" >&2
fi
else
echo "** warning: no root password provided, you're on your own" >&2
fi

View File

@@ -0,0 +1,9 @@
#!/bin/sh
# VMs might have no means to communicate with the outer
# world except for networking
[ -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

@@ -0,0 +1,4 @@
#!/bin/sh -e
# we don't need no extra gettys in VMs
[ -s /etc/inittab ] || exit 0
sed -i 's,^[3-9]\+:[0-9]\+:respawn:/sbin/mingetty.*,#&,' /etc/inittab

View File

@@ -0,0 +1,12 @@
#!/bin/sh -e
# tweak syslog configuration to avoid hard sync logging (one is better off
# doing remote syslog if you do care for reliable data anyways)
# credits: vvk@, thresh@ (2010)
CONFIG=/etc/syslog.conf
[ ! -f "$CONFIG" ] || \
sed -i \
-e 's,-/var/log/,/var/log/,g' \
-e 's,/var/log/,-/var/log/,g' \
"$CONFIG"

View File

@@ -0,0 +1,13 @@
#!/bin/sh
# predictable file locations make bootloader configuration simple;
# this script relates to .../features.in/stage2/stage1/scripts.d/80-make-initfs
kver="$(rpm -qa 'kernel-image*' \
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
| sort -n \
| tail -n 1 \
| cut -f 2 -d ' ' \
| sed 's/kernel-image-//')"
ln -s vmlinuz-$kver /boot/vmlinuz
ln -s initrd-$kver.img /boot/initrd.img

View File

@@ -0,0 +1,52 @@
# step 4: build the virtual machine image
IMAGE_PACKAGES = $(SYSTEM_PACKAGES) \
$(COMMON_PACKAGES) \
$(BASE_PACKAGES) \
$(THE_PACKAGES) \
$(call list,$(BASE_LISTS) $(THE_LISTS)) \
$(call kpackages,$(THE_KMODULES) $(BASE_KMODULES),$(KFLAVOURS))
# intermediate chroot archive
VM_TARBALL := $(IMAGE_OUTDIR)/$(IMAGE_NAME).tar
VM_RAWDISK := $(IMAGE_OUTDIR)/$(IMAGE_NAME).raw
ifeq (,$(ROOTPW))
$(error please provide root password via ROOTPW)
endif
check-sudo:
@if ! type -t sudo >&/dev/null; then \
echo "** error: sudo not available, see doc/vm.txt" >&2; \
exit 1; \
fi
prepare-image: check-sudo
@if ! sudo $(TOPDIR)/bin/tar2vm \
"$(VM_TARBALL)" "$(VM_RAWDISK)" $$VM_SIZE; then \
echo "** error: sudo tar2vm failed, see also doc/vm.txt" >&2; \
exit 1; \
fi
convert-image: prepare-image
@case "$(IMAGE_TYPE)" in \
"img") mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; exit 0;; \
"vhd") VM_FORMAT="vpc";; \
*) VM_FORMAT="$(IMAGE_TYPE)"; \
esac; \
if ! type -t qemu-img >&/dev/null; then \
echo "** warning: qemu-img not available" >&2; \
else \
qemu-img convert -O "$$VM_FORMAT" \
"$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; \
rm "$(VM_RAWDISK)"; \
fi
run-image-scripts: GLOBAL_CLEANUP_PACKAGES := $(CLEANUP_PACKAGES)
run-image-scripts: GLOBAL_ROOTPW := $(ROOTPW)
# override
pack-image: MKI_PACK_RESULTS := tar:$(VM_TARBALL)
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
convert-image postprocess $(GLOBAL_CLEAN_WORKDIR)

View File

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

View File

@@ -0,0 +1,7 @@
#!/bin/sh -efu
# remove temporary packages from the installed system
[ -n "$GLOBAL_CLEANUP_PACKAGES" ] || exit 0
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "$list" ] || apt-get remove -f -y -- $list

View File

@@ -14,7 +14,7 @@ cat > "$SCRIPT" << EOF
# don't override the script start message on the same line
echo "removing $GLOBAL_CLEANUP_PACKAGES"
# remove extra packages from installed system
# remove temporary packages from the installed system
list="\$(exec_chroot rpmquery -a --qf='%{NAME}\\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "\$list" ] || exec_chroot apt-get remove -f -y -- \$list
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 su)
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

@@ -13,10 +13,10 @@ HOME="/home/$USER"
install -dm750 -o "$USER" -g "$USER" "$HOME"
# we honestly don't know much more
if type -t git >&/dev/null; then
if type -t git && type -t su; then
su - -c "git config --global user.email $USER@localhost" "$USER"
su - -c "git config --global user.name 'live builder'" "$USER"
fi
fi >&/dev/null
# developer should feel comfortable, eh? ;-)
ZSHELL="/bin/zsh"

View File

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

View File

@@ -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_REGEXP,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,31 @@
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,BASE_PACKAGES,branding-$$(BRANDING)-release)
@$(call add,BASE_LISTS,$(call tags,basesystem))
@$(call xport,BASE_BOOTLOADER)
use/install2/net: use/install2
@$(call add,INSTALL2_PACKAGES,curl)
# modern free xorg drivers for mainstream hardware requires KMS support
use/install2/kms: use/stage2/kms
@$(call add,BASE_KMODULES_REGEXP,drm.*)
# see also use/vmguest/kvm; qxl included in xorg pkglist
use/install2/kvm:
@$(call add,INSTALL2_PACKAGES,spice-vdagent xorg-drv-qxl)
# filesystems handling
use/install2/fs: use/install2/xfs use/install2/jfs use/install2/reiserfs; @:
use/install2/xfs:
@$(call add,INSTALL2_PACKAGES,xfsprogs)
use/install2/jfs:
@$(call add,INSTALL2_PACKAGES,jfsutils)
use/install2/reiserfs:
@$(call add,INSTALL2_PACKAGES,reiserfsprogs)

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,9 @@
# 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
# remove rpm, apt databases and cache
find /var/lib/rpm /var/lib/apt /var/cache/apt -type f -delete
:

View File

@@ -8,9 +8,6 @@ MKI_PACK_RESULTS = squash:altinst
# also removed in a cleanup hook but to spare a few cycles...
HSH_EXCLUDE_DOCS = 1
# pass downstream
GLOBAL_BASE_BOOTLOADER := $(BASE_BOOTLOADER)
debug::
@echo "** install2: IMAGE_PACKAGES: $(IMAGE_PACKAGES)"
@echo "** install2: IMAGE_PACKAGES_REGEXP: $(IMAGE_PACKAGES_REGEXP)"

View File

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,13 +1,47 @@
# copy stage2 as live
use/live: use/stage2 sub/stage2/live
@$(call add_feature)
+live: use/live/desktop; @:
use/live/base: use/live use/syslinux/ui-menu
# 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
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
use/live/x11: use/live/base use/x11/xorg use/x11/wacom use/virtualbox/guest
# a very simplistic one
use/live/x11: use/live use/x11/xorg
@$(call add,LIVE_PACKAGES,xinit)
# 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
# or another for the cases when there should be no display manager
use/live/autologin: use/live/x11
@$(call add,LIVE_PACKAGES,autologin xinit)
@$(call add,LIVE_PACKAGES,autologin)
use/live/nodm: use/live/x11
@$(call add,LIVE_PACKAGES,nodm)
use/live/hooks: use/live
@$(call add,LIVE_PACKAGES,livecd-run-hooks)
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,8 @@
# * reset password for root
# * add user `altlinux' (without password)
GRPLIST="users scanner audio radio proc cdrom cdwriter wheel fuse"
verbose()
{
if [ -n "$GLOBAL_VERBOSE" ]; then
@@ -13,7 +15,7 @@ add_user()
{
verbose "Add $1 user"
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"
@@ -24,6 +26,8 @@ add_user()
done
useradd -p "" -G "$groups" "$1" ||:
# Workaround for ALT#13213
chown -R "$1:auth" "/etc/tcb/$1"
chown -R "$1:$1" /home/$1
if [ -n "$GLOBAL_CRYPT_HOMES" ]; then

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# Turn on xdg-user-dirs.
# NB: not yet available on t6/p6 hence the warning
control xdg-user-dirs enabled ||
echo "** warning: control xdg-user-dirs failed" >&2

View File

@@ -1,20 +1,28 @@
#!/bin/sh -ef
#!/bin/sh -e
if [ ! -x /usr/bin/X ]; then
echo "warning: autologin feature requested but X not installed" >&2
echo "SKIP autologin: X not installed" >&2
exit 0
fi
USER=altlinux
# setup runlevel
add_nopasswdlogin_group()
{
[ -f "/etc/pam.d/$1" ] &&
egrep -qs '^auth.+user[[:blank:]]+ingroup[[:blank:]]+nopasswdlogin' "/etc/pam.d/$1" &&
groupadd -r nopasswdlogin &&
gpasswd -a "$USER" nopasswdlogin
}
## setup runlevel
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
# autologin^2
## autologin^2
if [ -x /usr/sbin/autologin ]; then
cat << E_O_F >> /etc/sysconfig/autologin
USER=$USER
@@ -22,14 +30,25 @@ AUTOLOGIN=yes
E_O_F
fi
# gdm2 autologin
## 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"
add_nopasswdlogin_group lightdm ||:
fi
## gdm2 autologin
GDM_CONF=/etc/X11/gdm/custom.conf
if [ -f "$GDM_CONF" ]; then
sed -i -e '/\[daemon\]/aAutomaticLoginEnable=true\nAutomaticLogin='$USER \
"$GDM_CONF"
add_nopasswdlogin_group gdm ||:
fi
# kdm3 autologin
## kdm3 autologin
# TODO: iterate over kdm{,4} if feasible
KDMRC=/etc/X11/kdm/kdmrc
if [ -f "$KDMRC" ]; then
@@ -38,3 +57,66 @@ if [ -f "$KDMRC" ]; then
-e '/AutoLoginUser/ s,^.*$,AutoLoginUser='$USER',' \
"$KDMRC"
fi
## nodm autologin (the last since the most intrusive)
# FIXME nodm and xinitrc should be modified (also in p6)
NODM_RC=/etc/sysconfig/nodm
NODM_EXE=/usr/sbin/nodm
if [ -x "$NODM_EXE" ]; then
cat << E_O_F >> "$NODM_RC"
export NODM_USER=$USER
E_O_F
else
exit 0
fi
# FIXME: drop when #27449 is fixed
PREFDM=/etc/X11/prefdm
if [ -f "$PREFDM" ] && ! grep -q nodm "$PREFDM"; then
sed -i \
-e '/AUTOLOGIN_EXE=/ s,^.*$,AUTOLOGIN_EXE='$NODM_EXE',' \
-e '/AUTOLOGIN_CFG=/ s,^.*$,AUTOLOGIN_CFG='$NODM_RC',' \
"$PREFDM"
fi
# FIXME: drop when #27451 is fixed
NODM_PAM=/etc/pam.d/nodm
for module in pam_console.so pam_ck_connector.so; do
if [ -f /lib*/security/$module ]; then
str="-session optional $module"
grep -q "^$str$" "$NODM_PAM" || echo -e "$str" >> "$NODM_PAM"
fi
done
NODM_POLKIT_CONFDIR=/etc/polkit-1/localauthority/50-local.d
NODM_POLKIT_CONF=org.freedesktop.NetworkManager.pkla
if [ -d "$NODM_POLKIT_CONFDIR" ]; then
cat > "$NODM_POLKIT_CONFDIR/$NODM_POLKIT_CONF" << _EOF_
[nm-applet]
Identity=unix-group:users
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
_EOF_
fi
NODM_DBUS_NM_CONF=/etc/dbus-1/system.d/nm-applet.conf
if [ -f "$NODM_DBUS_NM_CONF" ]; then
sed -i "s/at_console=\"true\"/user=\"$USER\"/" "$NODM_DBUS_NM_CONF"
fi
NODM_G2KR_DIR=/etc/skel/.gnome2/keyrings
mkdir -p "$NODM_G2KR_DIR"
echo -n login > "$NODM_G2KR_DIR"/default
cat > "$NODM_G2KR_DIR"/login.keyring << _EOF_
[keyring]
display-name=login
ctime=0
mtime=0
lock-on-idle=false
lock-after=false
_EOF_
:

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