Commit Graph

1412 Commits

Author SHA1 Message Date
Steve McIntyre 7531d32437 make_disc_trees.pl: Fix $disknum handling for incomplete sets 2024-02-28 00:49:31 +00:00
Steve McIntyre c7cc669655 Try again to fix the TOTALNUM issue
We can't do it in make_image, as that may end up running in
parallel. Instead, do the update of TOTALNUM at the end of
make_disc_trees.pl.
2024-02-23 00:57:00 +00:00
Steve McIntyre ae89572871 make_image: really fix the TOTANUM issue 2024-02-16 02:08:49 +00:00
Steve McIntyre 64c59791cf Fix counting of images at build time
Closes: #1063858
2024-02-15 01:42:12 +00:00
Arnaud Rebillout 88b3414bb0 Support a fonts directory, and make *.pf2 optional (grub, x86) 2024-02-01 21:31:15 +00:00
Arnaud Rebillout 3752fd161a Dont generate fw pattern file if DEP11 is set to 0 2024-02-01 21:21:35 +00:00
xiao sheng wen(肖盛文) 2603f4c537 tools/make_disc_trees.pl: filter info output of debootstrap 2024-01-08 10:52:25 +00:00
Steve McIntyre dd5d174eeb Fix find syntax 2024-01-02 21:34:40 +00:00
Steve McIntyre 4f8c844f81 Look for firmware in /usr/lib/firmware as well as /lib/firmware
Closes: #1059858
2024-01-02 15:55:46 +00:00
Samuel Thibault b1f66d7191 Add hurd-amd64 case 2023-11-13 00:23:48 +01:00
Steve McIntyre 2964b68565 Tweak image sizes for BD media
We used to have some arbitrary hard-coded sizes; tweak those to allow
for ~4% losses for spare sectors if people format media.
2023-07-12 17:56:35 +01:00
Steve McIntyre 25e6430341 *really* make runs of generate_firmware_task quieter 2023-07-06 16:06:47 +01:00
Steve McIntyre b4265d6078 Tweak ordering of firmware package checks
Let's minimise repeat logging of ignores
2023-07-04 18:11:38 +01:00
Steve McIntyre 00ea28267d Extend exclude-file handling
Now take a colon-separated list to allow for more than one to be
used. And refactor to reduce repetition.
2023-07-04 17:14:04 +01:00
Steve McIntyre 1824a66933 Add a way to exclude named firmware packages from media
So we can control which packages are included - see
tasks/$codename/firmware-exclude
2023-07-04 17:14:00 +01:00
Steve McIntyre b21326bc12 Remove old data and config for jessie and stretch 2023-06-12 08:39:56 +01:00
Steve McIntyre 2582ea9495 Start trixie development
Copy the bookworm dirs to trixie as a start
2023-06-12 08:37:20 +01:00
Cyril Brulebois 1bf32ce6a6 generate_firmware_patterns: refresh firmware-sof-signed metadata
There were no changes, but let's record this was checked right before
the release!
2023-06-07 16:01:51 +02:00
Cyril Brulebois b23ca3c198 tools/generate_di+k_list: Add zstd alongside initramfs-tools and busybox.
It's now getting installed by base-installer (starting with 1.212).
2023-04-27 18:25:41 +02:00
Steve McIntyre 5e2ad85ee7 Fix syntax error 2023-03-30 10:10:33 +01:00
Steve McIntyre ae8cf8b946 Kill loadlin and the /tools dir 2023-03-26 23:10:03 +01:00
Steve McIntyre def9376769 link.pl: make failures fatal
Don't just log things, we should stop hard...
2023-03-12 18:44:18 +00:00
James Addison d2d51c9179 firmware: use hard links rather than symlinks
When creating on-disc firmware links, use the same link creation logic as archive-area links

Closes #1031696
2023-03-12 18:39:40 +00:00
Steve McIntyre feb344b3c2 Add iucode-tool to the list of base packages wanted for amd64/i386
so we will have it available for installing CPU microcode.
2023-02-23 23:51:28 +00:00
Steve McIntyre 7131e37390 Add new config option DISABLE_UEFI_32 to control mixed-mode EFI
on x86 builds. Closes: #1031424
2023-02-23 21:46:37 +00:00
Steve McIntyre dcbf4ea088 make-firmware-image: Add a list file
to show what's included in the firmware archives
2023-02-20 12:29:05 +00:00
Cyril Brulebois 7eea34f26f make-firmware-image: fix missing Contents-firmware index (Closes: #1031598) 2023-02-19 03:56:45 +01:00
Steve McIntyre aebf4f0556 make_disc_trees.pl: fix generation of Contents-firmware
The regexp didn't match symlinks in .deb files, let's fix that
2023-02-18 23:33:02 +00:00
Steve McIntyre c5ff679857 Fix noisy error in make_disc_trees.pl
firmware/dep11 only exists on the first image, so don't run
md5_files_for_md5sum on it if doesn't exist
2023-02-18 22:12:42 +00:00
Steve McIntyre ecb6ec4a0a Tweak firmware-image build scripts
Add more debug to generate_firmware_patterns when called with -v
Make make-firmware-image more robust, I hope?
2023-02-09 17:44:28 +00:00
Steve McIntyre 80f7fa39ff Don't break on CD 2 onwards
The $base_components file only matters on disc 1, so check it exists
before trying to do stuff with it.
2023-02-09 01:40:33 +00:00
Cyril Brulebois 6118a758fd make-firmware-image: remove non-free from FIRMWARE_COMPONENTS
See previous commit for rationale.
2023-01-30 02:07:12 +01:00
Samuel Thibault d94e9eb5b7 Fix missing %install% replacements
E.g. the ontimeout line of spkgtk.cfg includes both the kernel and initrd
paths on the same line, so need several %install% replacements.
2023-01-29 22:05:56 +01:00
Cyril Brulebois 492b085305 make_disc_trees.pl: move local vs. base_components safeguard
We have two safeguards related to the local component now, one if it's
present, one if it's absent: group them via if-then-else.
2023-01-27 07:38:40 +01:00
Cyril Brulebois 2e61e76d86 generate_firmware_task: prettify output
Use a format string to align both columns (Package and Filename fields).
2023-01-27 07:38:40 +01:00
Cyril Brulebois d415c60a12 generate_firmware_patterns: prettify output
Use format strings to align all entries (%4d entries).

Use standard double-space indentation found almost everywhere else.
2023-01-27 07:38:40 +01:00
Cyril Brulebois 59978789f0 apt-selection: order contrib before non-free*
Components are ordered “main contrib non-free” almost everywhere, let's
use the standard order here too. There should be no functional changes.

Note: This controls the sources.list file used during the build, but
doesn't control “deb cdrom:” lines in sources.list during or after
installation, which are the result of running apt-cdrom (which sorts
components alphabetically, see its pkgCdrom::ReduceSourcelist function).
2023-01-27 07:38:40 +01:00
Cyril Brulebois 7ce8d0c28f start_new_disc: remove /dists/local commodity symlink
When local packages are enabled (LOCAL=1), various things happen in the
target /dists directory. One of them is the creation of a /dists/local
symlink, pointing to (/dists/)<CODENAME>. This leads to a very confusing
situation, where “local” is initially about a component, but effectively
ends up looking like a distribution.

It is theoretically possible that cleaning this up might require some
follow-up fixes in other tools, but even that would be better than
keeping bear traps around.
2023-01-27 05:24:03 +01:00
Cyril Brulebois ae8490ba70 make_disc_trees.pl: rewrite base_components if needed
It's possible to set LOCAL=1 to enable support for local packages, which
automatically results in “local” being listed in /.disk/base_components,
which is used to build the --components parameter for debootstrap.

Users might have various sets of *.deb and/or *.udebs, be it over time,
or for various codenames, and it's possible for /dists/<CODENAME>/local
to be entirely missing in the generated image.

In this case, /.disk/base_components must not contain “local”, as that
would break debootstrap; this commit detects and fixes this possible
inconsistency.
2023-01-27 05:24:03 +01:00
Cyril Brulebois c24949141b Packages-gen: write compressed Packages indices again
This is a regression introduced while trying to catch up with apt's
expectations, in 2183089968c04c4765d2119d176e021431b26353: iterating over
Packages files is done by running the “zcat” utility on Packages.gz and
Packages.xz; replacing Packages.gz with an uncompressed Packages broke
iterating over Packages files referencing udebs.
2023-01-27 05:24:03 +01:00
Cyril Brulebois bfebeded70 make_disc_trees.pl: merge “local” udebs into “main” explicitly
This might have worked by accident depending on the exact layout under the
LOCALDEBS directory (see previous commit for the big picture).

Let's focus on where input files for d-i should be stored:

    <LOCALDEBS>/dists/<CODENAME>/local/debian-installer/binary-amd64/*.udeb

Those *.udeb end up being stored under the “local” component[1] (making it
clear they're not from usual components on a Debian mirror), but they are
referenced in Packages for the “main” component[2], possibly replacing a
different version found in the archive.

    /dists/<CODENAME>/local/debian-installer/binary-<ARCH>/*.udeb  [1]
    /dists/<CODENAME>/main/debian-installer/binary-<ARCH>/Packages [2]

This makes it possible for d-i to find those *.udeb automatically, as it
uses a single Packages file.
2023-01-27 05:24:03 +01:00
Cyril Brulebois 8bba3df865 make_disc_trees.pl: fix block calculation for --rollback
Per-package metadata files ($p.patterns and $p.component) go together,
and both needed to be accounted for.
2023-01-27 00:37:06 +01:00
Cyril Brulebois 5e39a81adb make_disc_trees.pl: fix block calculation for multi-arch
Per-package metadata files ($p.patterns and $p.component) go together,
and both needed to be accounted for.
2023-01-27 00:37:06 +01:00
Cyril Brulebois 95df8ab524 make-firmware-image: implement firmware/dep11 generation for bookworm and above
Mimic what make_disc_trees.pl does, making it possible for hw-detect to
spot not only the /firmware/dep11 directory in netinst images, but also
on installation images with firmware added manually.

Rename pseudo-option to clarify it returns filenames and indices.

Keep generation disabled for bullseye (as an extra safeguard, even if we
have separate, per-release branches anyway): That's helpful information
but bullseye is a stable release, and changing even unofficial material
might not be the best idea. Be cautious by default, it's easy enough to
enable if desired.
2023-01-26 23:22:40 +01:00
Cyril Brulebois 45db7e1582 generate_firmware_task: build lists of Packages files and iterate on them
The next step for make-firmware-image is to use generate_firmware_patterns
for each firmware package that was detected. That command requires DEP-11
metadata, so needs to know which Packages file each firmware package comes
from.

Instead of building long $pkgfiles and $bp_pkgfiles strings, and passing
them to catz, build lists instead and iterate over them. This means a few
more catz calls, but that also means being able to derive the DEP-11
directory from Packages paths.

There should be no functional changes.
2023-01-26 23:22:40 +01:00
Cyril Brulebois a2c722b735 make-firmware-image: use generate_firmware_task to find firmware
Since that tool might be used without a caller that sources CONF.sh,
be explicit about the components in which firmware packages must be
searched:
 - use "main contrib non-free" for bullseye;
 - use "main non-free non-free-firmware" for bookworm and above.

non-free can go away once we have all we need in non-free-firmware.

Export some environment variables for generate_firmware_task (also
renaming SUITE to CODENAME).
2023-01-26 23:22:40 +01:00
Cyril Brulebois bd13392570 generate_firmware_task: implement support for --list-filenames
Treat the output file argument specifically when it's “--list-filenames”:
instead of actually generating a task file with a list of packages (and a
few comments), output the Filename field for each firmware package
matching our criteria.

Move some status messages to STDERR accordingly.

This makes the “find suitable firmware packages” reusable, e.g. by
make-firmware-image.
2023-01-26 23:22:40 +01:00
Cyril Brulebois 90739b8cde generate_firmware_task: move code around
This is a preparatory step for the following commit, there should be no
functional changes.
2023-01-26 23:22:40 +01:00
Cyril Brulebois 14d2664459 generate_firmware_task: pick and choose components
We have a few fully-free firmware packages in main, and a few downloaders
(e.g. b43-installer and b43legacy-installer) in contrib; the latter might
not be really interesting without an alternative connectivity during the
installation process.

Regarding non-free vs. non-free-firmware, we started moving packages[1] from
the former to the latter so that we could build official installation images
based on main and non-free-firmware only.

 1. https://lists.debian.org/debian-boot/2023/01/msg00150.html

At the moment, NON_FREE_COMPONENTS still lists both, but the plan is to move
to non-free-firmware only once all the packages we want are available there.

The relevant variables regarding components include:
 - CONTRIB
 - NONFREE
 - EXTRANONFREE
 - FORCE_FIRMWARE

This commit implements:
 - using main all the time;
 - using contrib if CONTRIB=1;
 - using NONFREE_COMPONENTS if NONFREE=1 or EXTRANONFREE=1 or FORCE_FIRMWARE=1.

At the moment it seems the only existing caller is the top-level Makefile,
only when FORCE_FIRMWARE is set. But it seems to make sense to match what
tools/apt-selection does, to avoid any surprises.
2023-01-26 23:22:40 +01:00
Cyril Brulebois 4a31c04b81 make_disc_trees.pl: remove workaround for missing bookworm/non-free-firmware/dep11
This directory appeared in the archive earlier today.
2023-01-26 22:24:51 +01:00