Commit Graph

68 Commits

Author SHA1 Message Date
Roland Clobus 30d39f812e
lb config: --distribution defaults to testing 2024-11-06 11:30:41 +01:00
Roland Clobus 111a6c2c65
Installer: use the http proxy 2024-10-31 17:59:15 +01:00
Roland Clobus 567e03034b
Add support for dracut
Mini case:
`lb config --distribution sid --debian-installer none --cache-packages false --archive-areas "main" --initramfs dracut-live`

Support includes debian-installer and Calamares

Closes: #1031903
2024-10-25 11:39:28 +02:00
Nick Brown 9ae2c0105c Add support for proposed-update archives
Can be selected in much the same vain as backports, updates and security
archive sources. Defaults to false like backports.

Closes: #1069045
2024-10-11 14:30:16 +00:00
Roland Clobus 2ceebabfa4
Change default for zsync to false
* zsync was orphaned 2021-09-19 #994648
* zsync FTBFS with GCC-14 #1075710
* zsync was only available for iso and iso-hybrid
* zsync output is ignored by the live-setup package which generates the
  official live images
2024-08-14 10:35:04 +02:00
Roland Clobus 2f1acabc41 Cross-build: arm64 support
Work together with Emanuele Rocca during MiniDebCamp Hamburg 2024
* rebuild: New command line option: --architecture
* installer: Enable the GTK installer
* bootloader: Set a default bootloader
* no qemu-binary in chroot
2024-04-29 16:27:41 +00:00
Roland Clobus 39b343fe0c
Remove 'nolapic' from the safe boot options.
This is a work around for #1068515
2024-04-28 22:28:26 +02:00
Roland Clobus 6908dfd6df
Drop win32-loader for the images with an installer.
See https://lists.debian.org/debian-boot/2022/08/msg00035.html
2022-08-10 08:00:08 +02:00
Roland Clobus 17cb77ab82
Removes 'nomodeset' from fail-safe boot.
After more tests on openQA, it was shown that 'nomodeset' not only for
UEFI makes the image non-bootable (see
8c65231ad1), but for BIOS as well.
2022-06-01 09:12:01 +02:00
Roland Clobus ac0cde14e6
Synchronise all --parent-distribution options.
This makes the default value of --parent-debian-installer-distribution
the same as --debian-installer-distribution, like the other
--parent-distribution-* options.
2022-05-16 11:32:36 +02:00
Roland Clobus 2a7bb73bf7
Check the actual length of the ISO fields. 2022-04-20 10:24:51 +02:00
Roland Clobus cb912308c7
Bugfix: The values for '--cache-stages' were not matching the implementation. 2022-01-22 17:56:29 +01:00
Roland Clobus 06ee64b16a
Reactivate '--chroot-filesystem plain'.
This previously undocumented value for '--chroot-filesystem' creates the
uncompressed folder 'live/filesystem.dir'.
This will speed up the generation of live images a lot, because the
squashfs compression is skipped.

Example command line:
  lb config -b hdd --chroot-filesystem plain --binary-filesystem ext4
2022-01-22 17:53:38 +01:00
Ryan Finnie 7944adc6a5
Fix missing variable quoting in proxy handling
Fixes:
[2021-11-14 11:08:03] lb config noauto --apt-http-proxy http://proxy.example.com:8000
scripts/build/config: 868: local: Acquire::http::Proxy-Auto-Detect: bad variable name
2021-11-14 11:12:25 -08:00
Ryan Finnie 5da4ff53be
Add initial riscv64 support
Notes:
- No bootloader is configured; images must be booted via direct kernel
  - Tested via qemu + opensbi fw_jump.elf + kernel/initrd
- As riscv64 is currently in ports, the following options are required:
    --distribution unstable
    --mirror-bootstrap http://ftp.ports.debian.org/debian-ports/
    --security false
    --debootstrap-options --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg
- Normally ports require stacking two dists, unstable and unreleased.
  debootstrap does not support doing this, but as of this writing, there
  is nothing in riscv64 unreleased which is required to bootstrap.
  However, this would not have been possible a year ago.
2021-11-14 09:22:41 -08:00
Roland Clobus d6a5a1f3cf
Simpler handling of http proxies
There are two main scenarios:
1) The host with live-build is configured to use a proxy
   This proxy will automatically be used by live-build
2) The user of live-build explicitly specifies a proxy
2A) With the environment variable 'http_proxy' (preferred)
2B) With the command line option --apt-http-proxy

Any inconsistency in the setting of a proxy results in an error message of 'lb config'
All internal tools (apt/apt-get/aptitude, wget and debootstrap) use the environment variables 'http_proxy' and 'no_proxy', which are passed along to the chroot where needed.

Test scenario:
- A virtual machine with all out-going traffic blocked, except for the proxy.
2021-09-23 13:53:49 +02:00
Roland Clobus 7264a752bb
The support for FTP proxies has ended 2021-09-08 13:40:53 +02:00
Nick Brown df79eeafaf Export variables for hooks
MR !173 removed the export of several variables moving/renaming them.
Continue to export both the new name and older compatibility name.

Closes: #992572
2021-08-24 20:14:03 +01:00
Roland Clobus 745b2be876
Fixed handling of checksums in combination with the d-i installer.
1) lb config rejected multiple checksum types
2) When using the installer, cdrom-checker requires a md5 checksum file,
   use 'Check the integrity of the installation media' in the installer
3) The comments in the first lines of the checksum files caused
   cdrom-checker to fail the integrity of the image
2021-03-21 12:32:54 +01:00
Roland Clobus 95cd662f4e Ensure that SOURCE_DATE_EPOCH is always set in all sub scripts.
When SOURCE_DATE_EPOCH was already set before 'lb config', also enable
UTC timestamps.
2021-01-15 09:22:29 +00:00
Unit 193 f943fa9209 Add 'unstable' as a valid distribution and link to sid. 2021-01-08 04:32:01 -05:00
Roland Clobus 3f7dd00fcb Delay resolving the timestamp for the ISO volume to the moment the ISO-image is created 2020-12-13 20:33:24 +00:00
Roland Clobus fac389a51b
A second invocation of 'lb config' will result in an identical settings file 2020-12-13 19:23:20 +01:00
Roland Clobus c4b239caf5 Bugfix: Live installer can run without LB_CACHE_PACKAGES 2020-11-18 16:37:43 +00:00
Raphaël Hertzog 9ebddbe9f7
Use bullseye as default release in preparation of the next stable release 2020-09-25 11:32:34 +02:00
Raphaël Hertzog b14a9e5c79
Tell APT to retry downloads a few times before giving up
We want to be resilient to small network hiccups and when you download
a large number of packages, the probability of a network hiccup are
increasing... as are the chances of hitting one of the apt bugs
(cf "Undetermined error"...).
2020-09-25 11:08:40 +02:00
Ryan Finnie 13cf0e9ebe
Add initial ppc64el support
Note that this does not include grub-ieee1275 support so the images will
not be bootable, but it's a first step and produces ISOs without error.
2020-05-30 14:11:45 -07:00
Lyndon Brown d7883ec32b config: improve BIOS/EFI bootloader selection handling
the design choice from when EFI support was introduced was to change
`--bootloader` to `--bootloaders`, with users specifying their selection
of BIOS and EFI bootloaders together. at this time there were not even any
decent validation checks being performed, and invalid combinations could
cause some chaos.

since then proper validation was put in place, including checking that
only a single instance of each of BIOS and EFI bootloaders exists in the
selection.

here we tweak things such that we stick with the same option, but we split
the selection up such that we store the BIOS and EFI selections separately
within the saved config file, and offer it up to scripts to help simplify
those scripts.

we must however retain support for splitting from the combined option,
both because we still use it in the combined option, and for backwards
compatibility with older saved configs.

Gbp-Dch: Short
2020-05-04 21:40:13 +01:00
Lyndon Brown 3f840aeeba fully validate BIOS/EFI bootloader combinations
thus far, config bootloader validation only did the basic check that each
bootloader specified was a known and supported bootloader, it did not check
combinations.

it now checks combinations, and strips out the previous "bootloader role"
stuff.

the no-bootloaders warning is duplicated, covering two slightly different
situations (empty string, and whitespace string). this is anticipated to
be just temporary, with this just being the first step in better handling
bootloader selections.

Gbp-Dch: Short
2020-05-04 21:40:13 +01:00
Lyndon Brown 9d7393bbdb config: add note
The core purpose of `Prepare_config()` is to prepare the config by setting
defaults where not specified. It should not be involved itself in
validation of user options.

This can be an important distinction, for instance in `clean` where we
use this function, but avoid validation to potentially allow for an option
that deletes the config, that should work even in the face of an invalid
config.

Gbp-Dch: Ignore
2020-05-04 16:16:00 +01:00
Lyndon Brown 89ed6a54a1 config: fix inadequate validation check
Gbp-Dch: Ignore
2020-05-04 14:39:55 +01:00
Lyndon Brown 9bc35759aa config: fix stale live-build version in iso-preparer
using `$VERSION` as part of the default `$LB_ISO_PREPARER` means that when
you simply run `lb config` once, this variable is stored as a part of the
string, and replaced on use, but if you run `lb config` twice, it gets
replaced with a fixed version, that is then used in all subsequent builds.

let's replace with a placeholder (`@LB_VERSION@`) that can be used both in
the default, or in user strings, and will be replaced on use only.

this means that subsequent builds will always reflect the actual version
of live-build used.

Gbp-Dch: Ignore
2020-05-03 23:20:39 +01:00
Lyndon Brown 31cc121c3d config: obey new UTC timestamp control for default ISO volume label 2020-05-03 22:19:49 +01:00
Lyndon Brown 6cf3321d84 config: provide UTC timestamp control
`DATE_UTC_OPTION` is set in `Prepare_config()` for use by scripts, even
though only a few scripts will actually use it, since it allows those
scripts to be cleaner. we may want to possibly extend this as a
`DATE_OPTIONS` variable perhaps as part of enabling proper reproduciblity.

Gbp-Dch: Short
2020-05-03 22:19:43 +01:00
Lyndon Brown 1c74927fe5 config: simplify mode default
all roads lead to debian

i was waiting to get to the work on properly tackling the mode stuff, but
let's just tidy this now...

Gbp-Dch: Ignore
2020-05-02 12:41:35 +01:00
johnraff 0e5d0483e5 Replace 'which' with 'command -v' to test for the existance of an executable
This is considered to be more robust.

Two instances remain:

scripts/build/chroot_archives, line 257:
if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ]
The command is run inside a chroot where the environment might be special,
and would need further testing.

manpages/Makefile, line 42:
@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
I am insufficiently familiar with makefile syntax to edit this.
2020-05-01 09:59:11 +00:00
Lyndon Brown 997a7f73f9 config: remove redundant validation check
this is already covered by the check above it

Gbp-Dch: Ignore
2020-04-26 12:55:18 +00:00
Lyndon Brown 500f205073 config: s/LIVE_IMAGE_TYPE/LB_IMAGE_TYPE/
no backwards compatibility hack for reading the old var from existing
saved config used because this was previously stored in the alternate
format config/build file.

Gbp-Dch: Short
2020-04-23 16:54:31 +00:00
Lyndon Brown 83d9145257 config: s/LIVE_IMAGE_NAME/LB_IMAGE_NAME/
no backwards compatibility hack for reading the old var from existing
saved config used because this was previously stored in the alternate
format config/build file.

Gbp-Dch: Short
2020-04-23 16:54:31 +00:00
Lyndon Brown 41738b1932 config: s/LIVE_CONFIGURATION_VERSION/LB_CONFIGURATION_VERSION/ 2020-04-23 16:54:31 +00:00
Lyndon Brown c441c39efe config: revert partial format conversion
back in v4.0~a6-1 a transition process was started to move the live-build
config to a new format. the new format was INI style, and required
parsing functions to read/write values, compared to the existing format
which was just shell script code setting variables.

this partial transition is the explanation for the existence of the
`New_configuration()` function, and understanding this is important to
understanding the purpose of it - it is not in fact intended for creating
a new configuration, it is just related to the new config format
transition.

the positives of the new format were that it was somewhat cleaner looking,
while the negative was the terrible relative efficiency.

the file `config/build` was created to hold options in this new format.

the transition was only ever completed for a handful of config options:
 - architecture
 - archive areas and parent archive areas
 - live image name
 - live image type

a 'configuration version' attribute was also saved, which is not used by
anything.

the bootstrap-mirror and parent-bootstrap-mirror attributes are pointlessly
stored in it seemingly resulting from work done in v4.0~a17-1. (they are
also stored in another config file from which the value is actually used).

it in fact seems to have been a source of confusion for Raphaël in
authoring 44b9b0a650, since the new
`[parent]-distribution-{chroot|binary}` options it introduced were stored
both in `config/bootstrap` and in `config/build`, while only used from the
former. i expect, understandably, that he thought that `config/build` was
just an information file.

Gbp-Dch: Short
2020-04-23 16:54:31 +00:00
Lyndon Brown 8ffe48d8f3 rename LB_BOOTSTRAP_QEMU_ARCHITECTURES to LB_BOOTSTRAP_QEMU_ARCHITECTURE 2020-04-23 16:00:34 +02:00
Raphaël Hertzog 047885bf7e Keep LB_ARCHITECTURES environment variable for backwards compatibility
Custom hook scripts may use the variable. And conditional package lists
can also rely on this variable.
2020-04-23 15:58:59 +02:00
Lyndon Brown 6cc7250954 rename LB_ARCHITECTURES to LB_ARCHITECTURE
this was previously not done in 8b109ffb96
to keep the renaming simple, but leaving the variable plural is a cause
for confusion.

since this property is stored in the INI style config/build config file
rather than a shell script based one, at the property there is already
singular, there was no need for a backwards compatibility hack.

Gbp-Dch: Short
2020-04-23 15:54:19 +02:00
Lyndon Brown f4c8a28a21 config: move control of apt colour
being done in Prepare_config() meant that it would get saved into the
config stored on disk which is not what was intended.

being saved on disk is not a big problem, since the injection of the
dynamically determined option is always done on top of the value read
from the saved config anyway, so you'd always end up with two copies of
the option given to apt, the first being from the saved config, the second
being the more correct dynamically determined one, overriding the first.

so there is no functional change here, just better achieving what was
intended.

Gbp-Dch: Ignore
2020-04-23 15:52:32 +02:00
Lyndon Brown faa51b83c5 config: fix mistake in mirror url tidying
Gbp-Dch: Ignore
2020-04-23 15:51:53 +02:00
Lyndon Brown 9a91ca9fde config: obsolete old --tasksel option
note that the bit of code removed from source_debian relies upon a
variable LB_TASKS which itself is an old leftover artefact from before
v4.0.

Gbp-Dch: Short
2020-04-23 15:46:06 +02:00
Raphaël Hertzog d414b8fcdb config: obsolete --net-root-path 2020-04-23 15:44:17 +02:00
Lyndon Brown 1ca53bff52 config: obsolete --net-root-* options (except one)
--net-root-path probably needs to go too, but it is being used for
something i don't fully understand currently.

Gbp-Dch: Short
2020-04-23 15:30:41 +02:00
Lyndon Brown 1eee15e852 config: obsolete unused --net-cow-* options 2020-04-23 15:24:50 +02:00