Commit Graph

36 Commits

Author SHA1 Message Date
Anton Midyukov
d9dca6cb1a doc, grub, stage1, stage2: Add support multiple kernels for grub only
At the moment, the ability to select the kernel with which to boot is
implemented only for grub (grub-pc, grub-efi, ieee1275boot).
note that renamed STAGE1_KFLAVOUR to STAGE1_KFLAVOURS, as multiple
kernels can now be added.
2021-04-12 23:13:47 +07:00
Michael Shigorin
31f280c018 stage2: include targets.mk once
Partially reverts commit e8f6335734
which has added an overlooked second `include targets.mk' which
began spamming build.log immediately:

  /usr/share/mkimage/targets.mk:23: warning:
    overriding recipe for target `__profile_internal_rule'
  /usr/share/mkimage/targets.mk:23: warning:
    ignoring old recipe for target `__profile_internal_rule'

*sigh*
2020-09-26 17:39:22 +03:00
Anton Midyukov
01a1581b71 Revert "stage1, stage2: allow multiple kernels"
This reverts commit 02a5231ba5.
Upstream mkimage has not yet take patches to support packaging
multiple kernels to ISO image. In order to avoid problems, have
to revert this commit.
2020-08-17 23:43:40 +07:00
Anton Midyukov
02a5231ba5 stage1, stage2: allow multiple kernels 2020-05-22 13:34:34 +07:00
Konstantin A. Lepikhov
e8f6335734 sub.in/stage2: Added copy-tree to stage2
stage2 only allows to run certain scripts and install packages, but
sometimes one need just to copy something to stage2 (like stage1 does).

How to use:

put files under ./files directory with the same structure as on
resulting image.
2016-05-23 17:30:19 +03:00
Michael Shigorin
37e77285cd stage2: tweak 99-cleanup-boot for efficiency
Thanks glebfm@ for noticing that Simply (an m-p-d product)
takes no kernel inside squashfs but relies on livecd-install's
50-restore-kernel.sh hook to copy the kernel from iso9660
and regenerate initrd (which is a must anyways but requires
System.map to be still around).

This saves about 3 Mb in ISO size for a LiveCD using
kernel-image-std-def-4.1.15-alt1.x86_64.rpm.
2016-01-12 20:10:37 +03:00
Michael Shigorin
457c00b823 stage2, lowmem: update cleanup hooks for qt5
There's /usr/share/qt5/translations/ now too, handle that.

OTOH we've got some CJK support already, time to split up
those "cleanups" into some target locale set dependent form.
2015-12-04 20:58:32 +03:00
Michael Shigorin
5427f3afdc image.in, stage2: reworked TCB fixup hook
The issue at hand is that:

/etc/tcb/USER/shadow gets USER:auth ownership (OK);
/etc/tcb/USER/shadow- backup file is root:root (broken);
/etc/tcb/USER/shadow.lock file is also root:root (broken).

This is observed for all pseudousers created by package installation
process within working chroots as well as for users created by deflogin
feature; the problem is that e.g. echo USER:PASS | chpasswd will break.

Looks like the cuplrit might be fakeroot/faked.
2015-11-16 20:24:25 +03:00
Michael Shigorin
a277a6cce3 stage2: no kernels no go
The flexible KFLAVOURS handling has a downside:
if no packages match the regexp it's silently OK
until too late, and the error is incomprehensible.
Let's fix the latter at least.
2015-07-11 14:03:16 +03:00
Michael Shigorin
7cb477c38a stage2, install2: oops, narrow the cleanup back
The former install2-only "bloated binary" purge script
happened to hit stage2 (which is a lot more than just
install2); a kind of safety net has been stuck into it
to guard installable LiveCDs against this particular
cleanup but seems it was not enought for ildar@ who
reported this problem almost three years after it was
introduced.

This change re-places the script back into install2
section; the binaries in question amount for ca. 8 Mb
(except openssl ildar@ asked about); if these are deemed
unneccessary within any other stage2-based subprofiles,
please step up with details.
2015-03-10 00:00:09 +03:00
Michael Shigorin
6f452182fd fix kpackages() API
This function's got its argument order chosen for "aesthetical"
reason of $(2) following $(1) in the macros but the logical order
is exactly the opposite: we care for kernel flavour much more than
for module set (which is dependent upon it).

So while silent dropout of kernel-image if KFLAVOURS is set
but KMODULES is empty could be fixed by testing for $(2) only,
it looks like a good time to fix this discrepancy altogether.
2014-09-19 20:53:25 +04:00
Michael Shigorin
3f547e2504 documentation: use paths relative to toplevel dir
This change is done to reduce ambiguity in some cases;
the previous intention has been to ease navigation when
staying in a particular directory, now it's been changed
in favour of convenient toplevel `git grep' in fact.

Both variants have their pros and cons, I just find myself
leaning to this one by now hence the commit.  Feel free to
provide constructive criticism :)

Some path-related bitrot has also been fixed while at that.
2014-03-05 21:36:30 +04:00
Michael Pozhidaev
99a7a97284 stage2: extend /boot cleaner stoplist
Minor fix: /boot directory is not cleaned for livecd if there are
homeros-install or luwrain-install files (in addition to live-install
and livecd-install being already checked).
2013-08-12 20:53:01 +04:00
Denis Smirnov
7f805cdf79 Rename all scripts in */image-scripts.d to format \d\d-scriptname 2013-01-06 12:05:32 +04:00
Mike Radyuk
85217cd11d added asciidoc support 2012-10-31 21:22:06 +02: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
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
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
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
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
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
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
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
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
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
d6972a39bf introduced THE_{KMODULES,PACKAGES,LISTS,GROUPS}
As too many things started duplicating between distros proper
and (e.g. corresponding) LiveCDs, it became apparent that a class
of entities which end up working for THE_USER (not a sysadmin,
and not a developer, just a Linux user) is in need.

So THE_KMODULES will power installed basesystem and live image,
while THE_PACKAGES, THE_LISTS and THE_GROUPS will participate
in building those.
2011-12-19 22:32:59 +02:00
Michael Shigorin
ddf0c5b7c7 full-view docs update
- toplevel README received some long-needed refactoring
  + lowlevel detail moved, well, to lowlevel READMEs
- reflected more thoroughly that m-p is not about distros anymore
- dropped features.in/00example/README.en: it's already out-of-date
  a bit, and there's no perceived need in thorough English docs so far
- wiki article got split into parts and somewhat rewritten, links updated
- mv doc/{CodingStyle,style.txt}
2011-11-07 00:01:36 +02:00
Michael Shigorin
83392012d4 live-builder distro: your self-hosted livecd
If you make distro/live-builder.iso, the result is an image
containing almost everything (short of actual full enough
repository) to rebuild itself.  It will attempt to configure
eth0 with DHCP and reach http://ftp.altlinux.org for packages.

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

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

(some due fixups all over the place too)
2011-11-06 17:36:09 +02:00
Michael Shigorin
6a280d758d stage2-based debug fixup
Employed double colon targets to eliminate
  warning: ignoring old commands for target `debug'
2011-11-04 16:54:41 +02:00
Michael Shigorin
d5a5941f96 official {distro,ve}/* support
This is quite a large-scale change since mkimage-profiles got used to
baking distributions over the last year, and virtual environments are
quite different, so e.g. image.in/Makefile had to be split in two with
the main part of it moved into features.in/iso/lib/.

Short overview:

- features.in/Makefile: lib/ support
  (supporting VE images requires dynamic modifications
  to image.in/Makefile before starting the build;
  the most natural way to achieve that seems to use
  features mechanism along with makefile include dir)

- packaging format related part moved into features.in/pack
  (should be better prepared for diversity either)
- features.in/iso renamed to features.in/build-distro
- features.in/ve  renamed to features.in/build-ve
  + NB: these could not be merged as e.g. features.in/build
    due to completely different script hooks

- lib/image.mk renamed to lib/build.mk
- image, config, log postprocessing moved downstream
- added a sort of a topping in the form of lib/sugar.mk
- assorted style fixups (like ifeq usage)

- clean.mk: reliability fix (the problem was observed by Oleg Ivanov
  and me too but finally it did get the attention quantum)

- reviewed, updated and extended docs
  + QUICKSTART: should be[come] a step-by-step guide
    (thanks Leo-sp50 for prodiving feedback)
2011-11-04 16:54:41 +02:00
Michael Shigorin
c5bf0529bc initial features.in/cleanup
This is a sort of anti-feature which removes and not builds;
still with mkimage-profiles' approach we can at least build
up the removal procedures as well.

It's what triggered the tagged scripts, BTW.
2011-11-04 16:15:30 +02:00
Michael Shigorin
774169c6cd COMMON_PACKAGES and SYSTEM_PACKAGES
It was clear that "common" isn't very apt for packages that
will get *everywhere*, and became apparent when the need for
a "base+live packages" variable arrived with powerbutton feature.

So:
- the former COMMON_PACKAGES are now SYSTEM_PACKAGES;
- COMMON_PACKAGES act as "BASE+LIVE_PACKAGES".

Note that SYSTEM_PACKAGES also got factored out from stage2 based
features into stage2 subprofile itself; cleanups were due as well.
2011-11-04 16:15:30 +02:00
Michael Shigorin
fba30e0675 docs update
Rather minor fixups for things changed in the meanwhile and not
yet (re)documented properly; and a change for memtest feature
to require syslinux feature (the code's been changed to fit
the updated description, actually, and the change is purely
formal as no syslinux alternative is being used/planned so far).
2011-11-04 16:15:30 +02:00
Michael Shigorin
cf81cc6785 live, rescue, and use tags
It's still very immature -- base lists should be really base,
and functionality should be sorted out in more consistent way.
So far moved to tagged lists (which need some more experimentation
anyways to get both lists and their use more elegant).

- fixed live.iso (now actually useful):
  + extra cleanup was being done (coming from install2 case)
  + root user was password blocked
  + there was no unprivileged user (added "altlinux" w/o password)
  + added xdm setup hook for future X-based livecd flavours
  + several picks for a less slim "base" list
  + xdm login
- tweaked rescue.iso (added ext3grep)
2011-11-04 16:15:30 +02:00
Michael Shigorin
f5a8b89381 stage2 based live subprofiles, updated docs
- introduced generic stage2 subprofile (non-standalone)
- ported installer and rescue over to stage2/{install2,rescue}
- initial stage2/live (needs more work for sure)
- use make-initrd-propagator
- updated and somewhat extended doc/

NB: mind #26133, #26134
2011-11-04 16:15:30 +02:00