Commit Graph

137 Commits

Author SHA1 Message Date
Anton Midyukov
822bcfc9fe stage2: do not remove cjk and legacy fonts
This has no effect on the size of the squashfs, but does create
unexpected problems.
2024-04-08 18:52:24 +07:00
Anton Midyukov
e7f047edf4 replace image-scripts.d/30-all-groups from build-distro to common rootfs
This is needed for all rootfs.
2024-02-14 09:44:29 +07:00
Anton Midyukov
29193f90ba Add support patches from image-paches.d/
Required mkimage 0.3.0-alt1
2024-02-09 22:52:06 +07:00
Anton Midyukov
3936529de5 stage1: Continue building when BOOTLOADER is not set and IMAGE_PACKTYPE=isodata
The mki-pack-isodata does not install the bootloader.
2023-08-07 10:48:00 +07:00
Anton Midyukov
29a679b702 sub.in: run 'dconf update' for rootfs, if available 2023-08-02 19:18:17 +07:00
Anton Midyukov
2fcfcf922a Initial feature live-install
This feature complements the live image of the second stage with installation
image-specific settings and scripted hooks.

It is recommended to connect using +live-installer to ensure that a typical set
of installer-related features is included.

Unlike the install2 feature, a separate image of the second stage of 'altinst'
is not built, but the live image is supplemented with installer packages in
order to reduce the total volume of the iso image.

Installation consists of two stages:
1. The live image is unpacked, as in livecd-install
2. Install additional packages BASE_PACKAGES and package groups THE_GROUPS as in install2.

Unlike install2, only those packages that are not in the live image are placed in the main repository. This is how the size of the iso image is reduced.
2023-02-27 16:48:03 +07:00
Anton Midyukov
4baa05a68f stage2: drop 50-udev
This script does what hasn't been needed for over 10 years.
2023-01-27 10:47:30 +07:00
Anton Midyukov
2d6e5ded75 stage2: drop 90-cleanup-drm script
If xorg-dri-* is not needed, just don't install it.
2023-01-27 10:47:23 +07:00
Anton Midyukov
41b065336f check conditions of make for equality of variables with an empty value
check conditions of  make  for equality of variables with an empty value
instead of check definition.
A defined but empty variable under all these conditions results errors.
2022-12-30 19:39:43 +07:00
Anton Midyukov
deaac1017f Save rpm and srpm lists for chroots of subprofiles and main repo
Chroot can be two or one, work or image.
Package lists of work chroot cannot take into account packages that
will be installed into it after run-scripts.
2022-09-02 23:26:48 +07:00
Anton Midyukov
cdcf4b0f75 Replace 'fgrep' to 'grep -F'
Fix 'warning: fgrep is obsolescent; using grep -F'
2022-06-03 21:48:09 +07:00
Anton Midyukov
7a2f65f959 stage2: stage1 modules list update
Use full PATH, because otherwise extra modules with the same
endings are packed.
Instead of listing modules from the same directory, the path
to the directory is used.
The 10-stage2 list has been cleaned up, but still has a lot
of redundancy. Need added some basic lists for all targets.
2022-03-02 11:04:46 +07:00
Anton Midyukov
f722e494fb add .work to .gitignore for profile and subprofiles 2022-03-02 11:04:45 +07:00
Anton Midyukov
accfdc64a3 sub.in/stage1: remove empty lines from kernel modules list
Empty lines in this file will cause initrd generation. As a result of
the failure, all modules are added to the initrd.
See also commit 62cd397fdd4c6dd08773bf198a5a51ac533153a1
2022-02-13 21:16:01 +07:00
Anton Midyukov
44c60e5ca7 rename empty .gitignore to .empty
When building the rpm package .gitignore is deleted. These files
are necessary in order for saved profiles when building the image
from git repository and from installed rpm package have been
identical.
2022-01-19 20:28:51 +07:00
Anton Midyukov
317a19f8af image.in, sub.in: remove .gitignore with --force 2021-12-30 23:31:15 +07:00
Anton Midyukov
c8322e069d image.in, sub.in: fix cleanup .gitignore from stage1, stage2 2021-12-10 20:50:33 +07:00
Anton Midyukov
f783d28dd9 Revert "Do not rsync .gitignore to build directories"
This reverts commit 366cb49dbe.
.gitignore is needed for packaging empty catalogs to the profile archive.
2021-12-10 20:50:33 +07:00
Anton Midyukov
59a0470b28 stage1: allow creating stage1 without stage2 2021-09-04 21:52:15 +07:00
Anton Midyukov
b16288bb90 Add COMMON_LISTS variable support by analogy COMMON_PACKAGES
The commit 9969571369 used this variable
even though it didn't exist yet. A good reason to add this variable.
2021-08-31 00:42:31 +07:00
Anton Midyukov
366cb49dbe Do not rsync .gitignore to build directories 2021-06-24 21:48:53 +07:00
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
Anton Midyukov
1f4db6c7fe stage1: build propagator and copy kernel in mkimage-profiles 2021-04-06 00:15:59 +07:00
Anton Midyukov
e447b4c7df stage1: Also add STAGE1_KMODULES
It is very strange that earlier in STAGE1 added kernel modules from
a variable STAGE1_KMODULES_REGEXP only.
This commit makes the drm feature work properly.
2020-11-23 15:15:31 +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
Michael Shigorin
f87cd0d3c3 stage1: document STAGE1_MODLISTS
This was highly inobvious, and should have been documented
within the very same commit adding the variable!

See-also: https://bugzilla.altlinux.org/30239
See-also: https://bugzilla.altlinux.org/32171
2019-09-16 21:21:42 +03:00
Michael Shigorin
19e21d0910 rootfs: upgrade to /etc/firsttime.flag
Just missed this change somehow...

See-also: http://git.altlinux.org/people/shaba/packages/?p=startup.git;a=commitdiff;h=2441f9438b7956fabdb353400b9df4abace1d7a0

Suggested-by: Anton Midyukov <antohami@altlinux.org>
2018-11-05 21:34:50 +03:00
Michael Shigorin
98e889830e main, repo: introduced suffix support
This is to make building addon images possible;
those carrying packages but lacking any stage2.
2018-08-06 20:33:10 +03:00
Michael Shigorin
77908d8a08 main, live, rescue: reorder package list variables
The places of the terms *do* affect the sum in apt's case;
start with lowlevel items like SYSTEM_PACKAGES and end with
high-level ones like THE_LISTS to reduce the chance of getting
hit by premature virtual dependency expansion/fixation.

Adapt live and rescue features accordingly.

See-also: https://bugzilla.altlinux.org/show_bug.cgi?id=30806#c5
Suggested-by: Leonid Krivoshein <klark@altlinux.org>
2018-06-11 15:58:41 +03:00
Michael Shigorin
26cf322550 stage1, stage2: move af_packet to 50-stage2-net
af_packet rather belongs to networking stack
than to common module library indeed.

Suggested-by: Alexey Gladkov <legion@altlinux.org>
2018-05-23 09:44:35 +03:00
Michael Shigorin
9441c1ce70 rootfs: minor README fixup
There's no "arm" entity, what could I mean?..
2018-02-15 13:03:02 +03:00
Michael Shigorin
31ecda7272 docs update
Another minor facelift:
- s/ALT Linux/ALT/gc (where applicable);
- s/7.0/8.0/g;
- 2017;
- e2k;
- links.
2017-06-09 19:31:42 +03:00
Michael Shigorin
137e738cf7 main, metadata, lists: switch to groups2lists()
Now that we don't ignore X-Alterator-PackageList
in pkggroup files these few places referencing
group names as list names have broke; bring 'em
in line through this new and shiny function.
2016-06-27 13:50:10 +03: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
Konstantin A. Lepikhov
9f72780d17 Experimental overlayfs support
If aufs not available/broken we could try to use overlayfs.
NB: changes below doesn't work without modified make-initrd-propagator!
2016-05-23 17:30:14 +03:00
Michael Shigorin
0d9c1d9110 main: README tweak
...regarding THE_* use.
2016-04-01 14:22:53 +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
f9f1437bfe stage1: added ext4.ko to modules
It's been found out that live_rw isn't going to work
without ext4 module being available; let's ensure that.
2015-04-20 22:34:46 +03:00
Michael Shigorin
559f80adf3 a few modules.d test drives
These are aimed to test the modules.d/ and auto-pickup
implementation as well as to present an example.

At least 50-net might change (or just get renamed to avoid
auto-pickup) some day as the "net" feature's meaning is
to provide networking upon bootup and these modules are
only needed within stage1 if we're going to netboot;
and that's quite different thing.

armh-cubox bits are prone to get renamed/generalized too
since e.g. ArmadaXP based server images are going to need
this as well.
2015-04-20 13:35:28 +03:00
Michael Shigorin
e139a5e091 stage2: added broken-down module lists
These were produced off the single sub.in/stage1/modules
file using this scriptlet to prefix/annotate the names:

  grep '\.ko$' modules \
  | grep -v / \
  | while read m; do \
  	echo "$(find /lib/modules/$(uname -r)/kernel/{drivers,fs} \
		-name "$m" -printf %P $m $(modinfo -d "${m%.ko}" 2>&1)"; \
    done

...with subsequent sorting and manual separation.

This is meant to be the second stage in monolithic modules
file split, so the lists themselves are largely unmolested
otherwise.  The plan is to further split those into prefix-
and module-specific ones.

Add a note clarifying 10-stage2's status, by the way.
2015-04-20 13:35:28 +03:00
Michael Shigorin
1ee01498d5 stage1, stage2: moved propagator modules file
What was a static sub.in/stage1/modules (and the only one)
is now features.in/stage2/stage1/modules.d/10-stage2
(basically a compatibility file that might go some day).

It will be auto-picked as its name corresponds to the
NN-SUFFIX pattern specified in stage1 subprofile now
with $(FEATURES) going into default STAGE1_MODLISTS.
2015-04-20 13:35:27 +03:00
Michael Shigorin
a36d0236a4 stage1, stage2: initial modlists support
stage1's got prepare-modules target collecting
modules file snippets all over stage1/modules.d/
subdirectories within individual features.

stage2 now adds names of all the features going into
a particular image as snippet file suffix list so that
individual features don't have to register themselves
twice (as a feature and as a propagator modules.d
snippet carrier).

This is going to allow both "uncommon" modules getting
included with no problem (sin@ has wanted cifs ones
for quite some time, for example, and some want e.g.
infiniband modules) *and* to reduce the actual list
below the common mark as well (which is the case with
live-privacy image, for one).

And stage1 memory consumption does matter in some cases
as it's highly critical with no chance to use swap yet.
2015-04-20 13:35:24 +03:00
Michael Shigorin
08d802ab0d stage1: drop dummy.ko
Looks like it's been dumped in along with the rest but not
actually used in {make-initrd-,}propagator; the problem with it
is that snd-dummy.ko matches and pulls a bunch of unrelated
modules where these don't belong (grep -w wouldn't match
snd_dummy.ko though).
2015-03-29 20:41:29 +03:00
Michael Shigorin
bc0f8a45ee stage1: re-add a few modules
These can be found in (semi-)supported branches still:

- loop.ko:
  + 3.0.101-std-def-alt0.M60P.1
  + 3.4.96-led-ws-alt0.M70P.1
- aufs.ko:
  + 2.6.32-el-smp-alt31
  + 3.4.96-led-ws-alt0.M70P.1

ehci_marvell.ko isn't found in contemporary sisyphus/armh
kernels but let's purge it later during archdep rewrite.

NB: libusual.ko has been renamed to usb-libusual.ko as of p6
    (not to be found in p7 anymore), and nls_base.ko was in
    2.6.32 kernels as of p6 but not there in p7; purge these
    somewhere down the road.
2015-03-29 20:41:29 +03:00
Michael Shigorin
09a9255f2f stage1: purge nonexistent modules
This file has been floating around for quite some time,
and some of its contents are pure bit rot by now...

Drop the modules that don't exist as of 3.19.2-un-def-alt1
upon manual diff examination.
2015-03-29 20:41:29 +03:00