Commit Graph

4086 Commits

Author SHA1 Message Date
Unit 193 f943fa9209 Add 'unstable' as a valid distribution and link to sid. 2021-01-08 04:32:01 -05:00
Ryan Finnie b8279ed4a1
Bugfix: Fix grub.cfg pc/ENABLE_MEMTEST check
Grub [ uses "-a", not "&&".
2021-01-01 22:54:47 -08:00
Roland Clobus 037e93fe37 Preserve timestamps 2021-01-01 16:51:02 +00: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 edb12253eb
Bugfix: use minutes instead of month in the time of the modification date field 2020-12-13 11:11:55 +01:00
Roland Clobus 4eae44d13d
Bugfix: use minutes instead of month in the time of the modification date field 2020-12-07 08:36:42 +01:00
Matthijs Kooijman e772dfd6d2 binary_iso: Execute mkdir binary/.disk before writing to it
Before commit 9f3e5fe8d (Fix the way the .disk/mkisofs file is created)
all these commands (`mkdir`, write to `binary/.disk/mkisofs` and
`xorriso`) were in the same `binary.sh` script. Since that commit, the
write was extracted, to prevent issues with quoting, but the related
mkdir was left in `binary.sh`. This means that the write is now executed
first, and the `mkdir` only afterwards, making the `mkdir` quite pointless.

In practice, this did not break becaue binary_disk also does the same
`mkdir` and runs before `binary_iso`, but if one runs commands manually
and skips `binary_iso`, then this does break.

Even though this is not really a supported usecase, just move the mkdir
outside of `binary.sh`, so it runs *before* the write again as intended.
2020-11-24 12:24:14 +01:00
Roland Clobus c4b239caf5 Bugfix: Live installer can run without LB_CACHE_PACKAGES 2020-11-18 16:37:43 +00:00
Roland Clobus 6e4e10f071 Bugfix: LB_DERIVATIVE was used the wrong way around 2020-11-18 17:11:59 +01:00
Thore Sommer 7360d50fa6 Added the option to include files before and after package installation
Moved includes.chroot to includes.chroot_after_packages and added
includes.chroot_before_packages. includes.chroot does still work as before.

We also now use rsync for copying files if it is installed.
This improves runtime and space consumption for large includes.

Gbp-Dch: Short
Closes: #927128
2020-10-27 15:07:11 +00:00
Thore Sommer 7b19209aae Option for using systemd-nspawn instead of chroot for hooks.
Installation of flatpaks doesn't work with normal chroots.
This patch enables support for using systemd-nspawn in hooks.

Gbp-Dch: Short
Closes: #965953
2020-10-12 18:26:16 +00:00
Luca Boccassi 59380dddf0 Autopkgtest: disable updates/security repositories, not available for Bullseye 2020-10-12 16:13:59 +01:00
Thore Sommer 9a26533a06 Add option to change compression algorithm and level for squashfs. 2020-10-12 13:35:16 +00:00
Marcel Partap ce39f3e507 For 32bit UEFI secure boot, the package name is grub-efi-ia32-signed
avoids spitting out warning
> [2020-06-07 22:30:32] lb binary_grub-efi
> P: Begin preparing Grub based EFI support...
> Reading package lists...
> Building dependency tree...
> Reading state information...
> Package grub-efi-amd64-signed is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
>
> E: Package 'grub-efi-amd64-signed' has no installation candidate
> W: UEFI Secure Boot disabled due to missing signed Grub/Shim.
2020-10-12 12:41:58 +00:00
Ryan Finnie 169645b478 grub-efi: Show fwsetup, do not show incompatible memtest even if enabled 2020-10-12 11:34:52 +00:00
Roland Clobus 9536a37af0 The sed -e ‘d’ commands with ‘#’ will not work, a slash is needed, fix for 7ffd2288d9 (2015-01-15) and 578dbee516 (2015-01-29) 2020-10-08 19:21:33 +00:00
Raphaël Hertzog f323c93b73 Update renamed lintian tag names in lintian overrides.
Changes-By: lintian-brush
Fixes: lintian: renamed-tag
See-also: https://lintian.debian.org/tags/renamed-tag.html
2020-09-25 12:04:05 +02:00
Raphaël Hertzog 4977733e98
Document our autopkgtest tests as needing internet access 2020-09-25 11:49:13 +02:00
Raphaël Hertzog c3968cf1c6
Use truncate --no-create --size=0 to truncate files
This avoids the permission error due to /proc/sys/fs/protected_regular = 2
setting which is now enabled by default in bullseye.
2020-09-25 11:49:03 +02:00
Raphaël Hertzog d2bc6e278d
Another try to fix the CI 2020-09-25 11:40:06 +02: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 e1c3990648
Try to fix CI to cope with latest salsa-ci changes 2020-09-25 11:28:39 +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
Victor Gavro 990dcf2eed chroot_apt: fixed adding Pin-Priority (broken in da1fab11)
Fixes !201
2020-09-14 11:02:51 +02:00
Ryan Finnie 56186add3c
architectures.sh: armhf/armel can be built on arm64 2020-06-01 07:49:56 -07:00
Ryan Finnie 6b0cc5529b Enable arm64 for binary_grub_cfg
Without modification, this produces a usable config for arm64
grub-efi iso-hybrid. Tested on qemu arm64 + serial console.
2020-06-01 08:02:28 +00: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 263f84fe80 clean: handle all common options
support for options like `--debug` was missing.

Gbp-Dch: Short
2020-05-15 19:36:51 +00:00
Lyndon Brown fca1283147 clean: refactor
this simplifies things to avoid the messy recursion.

it is also a necessary step to implementing handling of common options
like --debug. we need to process all options to decide how to approach
doing things (e.g. with debug messages to be output or not) before actually
performing any work, in order for options like --debug to be reacted to
properly.

also, as things were, options like `--debug` were not being passed along
in the recursive executions, while now that is no longer an issue.

the order of file/folder deletions for `--all`|`--purge`|`--remove`
actions is slightly changed here, but i don't see any issue with that and
it's cleaner to not preserve that.

Gbp-Dch: Short
2020-05-15 19:36:51 +00:00
Lyndon Brown 0afd3625ed bootloaders: reorganise installer menu entries
per layout from MR #199 discussion.

under "Advanced install options" we have:
  - Graphical installer
  - Text installer
  - Graphical installer with dark theme
  - Text installer with dark theme
  - Installer with speech synthesis

under each of these we have a set of:
  - Install
  - Expert install
  - Automated install
  - Rescue mode

note that the 'automated' entries are moved up before the 'rescue' entries.

for hotkeys, the four entries above have hotkeys of 'i', 'x', 'a', and 'r'
respectively. ('x' is used instead of 'e' to avoid clash with standard
grub hotkey). this means that some entries that previous had no hotkeys
due to the flat list now have them. the other big difference is the main
graphical install entry going from 'g' to 'i' for consistency and the main
speech synth entry going from 's' to 'i' for the same reason.

furthermore, in the level above we have 'g' for normal graphical, 't' for
normal text install, 's' for speech synth, 'd' for graphical dark mode,
and 'k' for text dark mode.

the text-only sets are identical to the graphical ones except only for
dropping the graphical groups, simplifying maintenance, bringing clarity
to users of images (who may not have even made the image) that the set is
text-only, and keeping consistent hotkeys between graphical and text-only.

a 'start installer with speech synthesis' entry shortcut has been placed
at the top menu level alongside the 'start installer' shortcut.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown ab2e8a91f5 bootloaders: add accessible dark contrast installer menu options
following official install discs.

i've not bothered to update grub-legacy this time.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown 9b2564a3ff bootloaders: add advanced speech synth install entries
following the presence of them in the official install discs.

also drops unnecessary word "graphical" from existing speech
synth entry, following official Debian install discs.

i've not bothered to update grub-legacy this time.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown 180207d711 Revert "config: catch and report unexpected arguments"
This reverts commit 665372c19d.

the kali test failed due to their script using a hack of passing along a
custom option after an early terminator through to their auto/config file.
the change implemented here was valuable, but i'll have to look into
revising things to work with what Kali is doing.

Gbp-Dch: Ignore
2020-05-05 21:57:57 +01:00
Lyndon Brown 18eefdd6f3 s/Remove_package/Remove_packages/
it removes one or more, so should be plural for clarity

Gbp-Dch: Short
2020-05-05 19:55:28 +01:00
Lyndon Brown 919a464b64 s/Install_package/Install_packages/
it installs one or more, so should be plural for clarity

Gbp-Dch: Short
2020-05-05 19:55:28 +01:00
Lyndon Brown 9c8d26c97f packages: avoid unnecessary nesting
Gbp-Dch: Ignore
2020-05-05 19:55:28 +01:00
Lyndon Brown f27d13de08 make temporary state of installed tools recoverable
some scripts temporarily install packages to accomplish some work before
then removing them. the list of packages installed is kept in memory in a
variable.

a weakness of this design is that if a failure occurs or the user cancels,
and then following this the user re-runs `lb build`, letting it try to
pick up and recover from where it left off, that list of packages that had
been installed is lost, resulting in those packages that were installed
then being a permanent part of the chroot.

here we fix this weakness by backing up the list to a file, which is always
read from on removal. thus in a recovery situation, any packages still
installed from a situation like that just described, will be removed upon
the next use of `Remove_package()`.

this is not perfect, since we are having to wait for opportunistic
execution of the remove function. we need to find a suitable place for the
`Cleanup_temp_packages()` function to be used.

 - doing so in `Init_config_data()` would not be suitable because we don't
   hold the lock when that's run, even if we ignored the hijacking of that
   function for taking such action...
 - doing it in `Exit()` doesn't seem a good fit either.
 - putting it explicitly in every build script just seems a little messy...

perhaps a local exit trap like for removing the lock...?

note that `binary_rootfs` skips running the remove function after installing
tooling, since it just throws the wrapper chroot away, which then leaves the
file around with stale data for the next remove instance to pick up, which
then does not actually remove it because it's not installed. this is not
ideal either... perhaps the optimisation should be removed from that script?

Gbp-Dch: Short
2020-05-05 19:43:15 +01:00
Lyndon Brown a065e60043 manpages: clarify UTC timestamps wrt. build log
Gbp-Dch: Ignore
2020-05-05 19:04:35 +01:00
Lyndon Brown 665372c19d config: catch and report unexpected arguments
after handling arguments, catch and report any remaining "non-option"
arguments.

for instance users could make the basic mistake of using
`lb config --bootloaders syslinux grub-efi`, i.e. failing to quote the
multiple bootloaders (i actually encountered a user doing this who swore
that "it just worked"). catching and reporting such mistakes could be
valuable to users.

previous behaviour:
```
$ lb config --bootloaders syslinux grub-efi
P: Updating config tree for a debian/buster/amd64 system
P: Symlinking hooks...
```

new behaviour:
```
$ lb config --bootloaders syslinux grub-efi
[2020-05-05 18:56:07] lb config --bootloaders syslinux grub-efi
E: Unexpected argument found: grub-efi
```

Gbp-Dch: Short
2020-05-05 19:02:35 +01:00
Lyndon Brown d68290058e debootstrap: fix wrong param for Check_package call
debootstrap must obviously exist in the host. we thus must pass 'host'
not 'chroot' such that a warning about needing to install it on your host
system is output, rather than it being added to a list of packages to be
installed, which never occurs in this script.

Gbp-Dch: Ignore
2020-05-05 00:52:13 +01:00
Lyndon Brown 7cf7f74bc0 arches: fix Check_crossarchitectures param passing
Gbp-Dch: Ignore
2020-05-04 23:22:10 +01:00
Lyndon Brown 8a1bbe0841 arches: tidy
Gbp-Dch: Ignore
2020-05-04 23:22:10 +01:00
Lyndon Brown 08c86dc8ac arches: fix some Check_architectures() mess
- the comparison with LB_ARCHITECTURE seems to be based upon an old idea
   of it potentially being intended in the past to hold more than one
   arch (when it's name as also plural), but it in fact only holds one.
 - similarly LB_BOOTSTRAP_QEMU_ARCHITECTURE is singular, so the comparison
   with the set of params is bad.
 - storing $@ in a variable before then looping is not a good idea
 - script name was not being passed to the warnings
 - can simplify by just returning in the valid case

i'm very suspicious about the correctness of the qemu bits, but that
can wait for now.

Gbp-Dch: Short
2020-05-04 23:21:44 +01:00
Lyndon Brown a542d52141 rename binary_loopback_cfg to binary_grub_cfg
when loopback support was introduced, it initially duplicated the code
for generating a grub2 config, before the duplicated code was removed from
the grub-pc script, effectively thus moving grub config generation to the
loopback feature script.

grub-efi support was added after this.

this results in a misleading filename, since the `binary_loopback_cfg`
script is essential for use of grub-pc|grub-efi, and actually only has a
single line of code on top that's needed for adding actual loopback
support on top. (when grub-pc and grub-efi are not used, the entire script
is still needed for loopback support to work).

so here we rename it to make better sense, and correct/clarify bits of
documentation.

Gbp-Dch: Short
2020-05-04 22:15:09 +01:00
Lyndon Brown 3a523c3fc1 binary_iso: properly handle multiple bootloaders
with LB_BOOTLOADER_BIOS and LB_BOOTLOADER_EFI introduced, we can simplify
and correct things here.

previously it was possible for more than one of each type to be added.

Gbp-Dch: Short
2020-05-04 21:48:03 +01: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 f3a818da9a binary_hdd: remove incorrect local scope
the "FIXME" function wrapper is just to temporarily disable the code.

Gbp-Dch: Ignore
2020-05-04 21:40:08 +01:00
Lyndon Brown 976be9f44b indentation fix
Gbp-Dch: Ignore
2020-05-04 17:40:23 +01:00