summaryrefslogtreecommitdiff
path: root/scripts/build
AgeCommit message (Collapse)Author
2021-01-15Set timestamp embedded in EFI filesRoland Clobus
2021-01-15Use SOURCE_DATE_EPOCH for the partition-id of /boot/grub/efi.imgRoland Clobus
2021-01-15Use SOURCE_DATE_EPOCH for the partition-id of /efi.imgRoland Clobus
2021-01-15Use SOURCE_DATE_EPOCH for 'now' in .disk/infoRoland Clobus
2021-01-15Use SOURCE_DATE_EPOCH for 'now' in the boot splash imageRoland Clobus
2021-01-15SOURCE_DATE_EPOCH is always setRoland Clobus
2021-01-13bootstrap_debootstrap: change debootstrap path to /usr/sbin/debootstrapJan Kot
As we're checking if debootstrap is present on the host machine, we should look for it in /usr/sbin and not ./bin
2021-01-12Don't fail if one of the package lists expands to an empty listRaphaël Hertzog
When a package lists contains only packages protected by a test that doesn't match for the current run, then Expand_package_list outputs nothing and the following "grep -v" fails because it has not filtered anything. Avoid this by protecting the "grep -v" call with "|| true".
2021-01-11Preserve timestampsRoland Clobus
2021-01-01Preserve timestampsRoland Clobus
2020-12-13Delay resolving the timestamp for the ISO volume to the moment the ISO-image ↵Roland Clobus
is created
2020-12-13Bugfix: use minutes instead of month in the time of the modification date fieldRoland Clobus
2020-12-07Bugfix: use minutes instead of month in the time of the modification date fieldRoland Clobus
2020-11-24binary_iso: Execute mkdir binary/.disk before writing to itMatthijs Kooijman
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-18Bugfix: LB_DERIVATIVE was used the wrong way aroundRoland 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-10-12Option for using systemd-nspawn instead of chroot for hooks.Thore Sommer
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-12Add option to change compression algorithm and level for squashfs.Thore Sommer
2020-10-12For 32bit UEFI secure boot, the package name is grub-efi-ia32-signedMarcel Partap
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-08The sed -e ‘d’ commands with ‘#’ will not work, a slash is needed, ↵Roland Clobus
fix for 7ffd2288d944840937f556bd56703ba381f4edcc (2015-01-15) and 578dbee516a370935e1b2e49205c524370e1f8d0 (2015-01-29)
2020-09-14chroot_apt: fixed adding Pin-Priority (broken in da1fab11)Victor Gavro
Fixes !201
2020-06-01Enable arm64 for binary_grub_cfgRyan Finnie
Without modification, this produces a usable config for arm64 grub-efi iso-hybrid. Tested on qemu arm64 + serial console.
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-15clean: handle all common optionsLyndon Brown
support for options like `--debug` was missing. Gbp-Dch: Short
2020-05-15clean: refactorLyndon Brown
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-05Revert "config: catch and report unexpected arguments"Lyndon Brown
This reverts commit 665372c19d7f54b5cfb92aaf313b7df9570f6191. 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-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-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-05config: catch and report unexpected argumentsLyndon Brown
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-05debootstrap: fix wrong param for Check_package callLyndon Brown
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-04rename binary_loopback_cfg to binary_grub_cfgLyndon Brown
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-04binary_iso: properly handle multiple bootloadersLyndon Brown
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-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-04binary_hdd: remove incorrect local scopeLyndon Brown
the "FIXME" function wrapper is just to temporarily disable the code. Gbp-Dch: Ignore
2020-05-04indentation fixLyndon Brown
Gbp-Dch: Ignore
2020-05-04fix redundant and incorrect source selectionsLyndon Brown
"grub" presumably was what is now called "grub-legacy" removed both because there is already a proper piece of code adding bootloader packages. Gbp-Dch: Ignore
2020-05-04fix another overlooked "grub" -> "grub-legacy" instanceLyndon 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-04get rid of a couple of useless variablesLyndon Brown
Gbp-Dch: Ignore
2020-05-04clean: tweak initLyndon Brown
`Init_config_data` is more suited to build scripts than here. note that it's not used in `config` either. this deliberately does not pass along arguments to it because `Arguments()` can only handle the basic common options, not the `clean` set. this is somewhat confusing and causes a pointless execution of `getopt`. furthermore the function is expanding slightly further beyond it's original scope, with yet more change coming that's unsuitable for `clean`, so it makes sense to avoid using the function here just for the couple of function calls needed. validation of the config is disabled, as it is not performed currently. it is not clear if it should be enabled or not for `clean`. it may be useful to not validate, if we wish to be able to provide users with an option to be able to delete the config. Gbp-Dch: Ignore
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-03disk_info: obey new UTC timestamp controlLyndon Brown
2020-05-03source_disk: de-duplicate date constructionLyndon Brown
Gbp-Dch: Ignore
2020-05-03syslinux: obey new UTC timestamp controlLyndon 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-03syslinux: support timezone date componentLyndon Brown
since date is not obtained as UTC, timezone is an important detail of understanding the given time, which users may want to make use of. Gbp-Dch: Short
2020-05-03syslinux: fix date construction accuracy issueLyndon Brown
don't construct each part from a fresh "now", which can result in inaccuracies in the overall date due to "now" drifting over the individual date calls. instead feed the full date that was obtained back into it when extracting the component parts. Gbp-Dch: Ignore
2020-05-03config: fix storage of --jffs2-eraseblock valueLyndon Brown
broken since it's introduction in 9ffb223d703a4bbb76e5278e59b3cc183f2f1aca Gbp-Dch: Short