summaryrefslogtreecommitdiff
path: root/functions
AgeCommit message (Collapse)Author
2021-08-02add items for grub setup and enable persistenceKim Hagen
2021-07-29create loop partitions with mknod instead of bind mounting /devKim Hagen
2021-07-28create vyos hdd imageKim Hagen
2021-04-02Firmware download: skip architecture if not foundLuca Boccassi
Contents-all.gz does not seem to exist on Buster, so don't fail if wget doesn't find the file. Closes: #986278
2021-03-30security: do not append /updates from bullseye onwardLuca Boccassi
No longer required. Closes: #986148
2021-03-21Fixed handling of checksums in combination with the d-i installer.Roland Clobus
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-11Support security for bullseye. See https://wiki.debian.org/NewInBullseye. ↵Roland Clobus
Closes #964914
2021-02-22firmwarelists.sh: Search Contents-all for firmware too.Unit 193
2021-02-04Restore_package_cache: Handle existing but empty packages directoryRyan Finnie
2021-01-15Ensure that SOURCE_DATE_EPOCH is always set in all sub scripts.Roland Clobus
When SOURCE_DATE_EPOCH was already set before 'lb config', also enable UTC timestamps.
2021-01-14exit.sh: fix selinux mountpointJan Kot
2021-01-13packages.sh: check for /etc/debian_version existance rather than dpkg-query ↵Jan Kot
aviability
2021-01-08Add 'unstable' as a valid distribution and link to sid.Unit 193
2020-12-13Delay resolving the timestamp for the ISO volume to the moment the ISO-image ↵Roland Clobus
is created
2020-12-13A second invocation of 'lb config' will result in an identical settings fileRoland Clobus
2020-11-18Bugfix: Live installer can run without LB_CACHE_PACKAGESRoland Clobus
2020-10-27Added the option to include files before and after package installationThore Sommer
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-09-25Use bullseye as default release in preparation of the next stable releaseRaphaël Hertzog
2020-09-25Tell APT to retry downloads a few times before giving upRaphaël Hertzog
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-06-01architectures.sh: armhf/armel can be built on arm64Ryan Finnie
2020-05-30Add initial ppc64el supportRyan Finnie
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-05s/Remove_package/Remove_packages/Lyndon Brown
it removes one or more, so should be plural for clarity Gbp-Dch: Short
2020-05-05s/Install_package/Install_packages/Lyndon Brown
it installs one or more, so should be plural for clarity Gbp-Dch: Short
2020-05-05packages: avoid unnecessary nestingLyndon Brown
Gbp-Dch: Ignore
2020-05-05make temporary state of installed tools recoverableLyndon Brown
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-04arches: fix Check_crossarchitectures param passingLyndon Brown
Gbp-Dch: Ignore
2020-05-04arches: tidyLyndon Brown
Gbp-Dch: Ignore
2020-05-04arches: fix some Check_architectures() messLyndon Brown
- 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-04config: improve BIOS/EFI bootloader selection handlingLyndon Brown
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-04fully validate BIOS/EFI bootloader combinationsLyndon Brown
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-04config: add noteLyndon Brown
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-04config: fix inadequate validation checkLyndon Brown
Gbp-Dch: Ignore
2020-05-04extend config validation to all build componentsLyndon Brown
while `lb build` ran the config validation check, spotting invalid configs and stopping with an error, the major build stages if executed directly did not, nor did the component stages. here we move execution of the validation function into the common init function, with an exported variable used to indicate that validation has been performed. thus validation is performed no matter what part of the build system you execute, but only once. Gbp-Dch: Short
2020-05-03config: fix stale live-build version in iso-preparerLyndon Brown
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-03config: obey new UTC timestamp control for default ISO volume labelLyndon Brown
2020-05-03config: provide UTC timestamp controlLyndon Brown
`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-03fix usage/help/man bugsLyndon Brown
- the definition of $PROGRAM as used in $USAGE strings defined in each script has been broken for a long time, being simply "lb" when it needs to be "lb COMMAND". - `config` changed $PROGRAM to "lb config" thus its output was correct in this regard unlike everything else, but with the switch to a more "intelligent" `Man()` function recently, it means that instead of `man lb config`, what was actually run was `man lb config config`, which displayed the manpage, then on exiting with `q`, it showed some sort of index line todo with a "config" search (no exact manpage match?), for which you had to enter `ctrl+c` to get rid of. this revises things to fix the issues, minimising change by changing $PROGRAM to "lb COMMAND", with the frontend overriding this. Gbp-Dch: Ignore
2020-05-03args: restore a little tidyingLyndon Brown
lost in a reversion Gbp-Dch: Ignore
2020-05-02config: tweak config file loading orderLyndon Brown
load the base set of files first, then any user arch/dist specific override files second. this is important since whenever config items get moved in the base files, this can break the override files, if an option specified in one was moved to a different common file that it loaded after. Gbp-Dch: Ignore
2020-05-02options: de-duplicate common option handlingLyndon Brown
2020-05-02improve stagefiles encapsulationLyndon Brown
- added and used Stagefiles_dir() - added and used Stagefile_exists() pretty self explanatory. Gbp-Dch: Short
2020-05-02tidy up Echo_breakage()Lyndon Brown
- it's only used by the debootstrap script after alternatives were dropped long ago, so let's move it, avoiding it being loaded for everything else. - there's no need to pass printing another message through it. - there's little point in making the sid distinction if you happen to decide to build sid, it's a given that it's less stable than stable. really, is there any need for this at all? Gbp-Dch: Ignore
2020-05-02config: simplify mode defaultLyndon Brown
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-02move and rename Common_config_files()Lyndon Brown
for better encapsulation, and for consistency with other config file handling functions in the new location. Gbp-Dch: Ignore
2020-05-01Replace 'which' with 'command -v' to test for the existance of an executablejohnraff
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-01config: fix wrong variable nameLyndon Brown
Gbp-Dch: Ignore
2020-05-01config: only try to load FILE.ARCH and FILE.DIST if non-empty stringsLyndon Brown
to thus avoid trying to load `FILE.` Gbp-Dch: Ignore
2020-05-01config: remove junk config loading codeLyndon Brown
support for this has not existed since v2.0~a24-1 !! until 4d22ca948ad3def3f98fd89d32bf2ba8209460fd (v2.0~a24-1), `PROGRAM` was defined as `PROGRAM="$(basename ${0})"`. then this commit simply got rid of the definition. it then flipped back and forth a bit in a few ways, but always sticking to a simple fixed "live-build" type string after that commit, as it has been ever since. the code removed here has thus been junk since then, and the documentation corrected here out of date since then. the checking of `LB_CONFIG` is also possibly junk, but i know too little about it. it was introduced in v1.0~a43-1 in commit 705a4178e75ffc190acf2fa914a6cd1519fdae87 with a changelog entry of "Centraly evaluate LH_CONFIG for custom configuration file." Gbp-Dch: Short
2020-04-30init: warn if auto script exists but is not executableLyndon Brown
2020-04-29a couple tiny doc fixesLyndon Brown
Gbp-Dch: Ignore