Commit Graph

73 Commits

Author SHA1 Message Date
Raphaël Hertzog c3a6e65438 Add updated directives to enable cryptsetup support in initrd
This fixes cryptsetup modules not being installed into initrd with warning:
> cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
>     nor crypto modules. If that's on purpose, you may want to uninstall the
>     'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
>     integration and avoid this warning.

Thanks-to: Marcel Partap
2020-04-23 17:47:12 +02:00
Raphaël Hertzog aa8f8323f7 Fix indentation 2020-04-23 17:46:47 +02:00
Luca Boccassi 015e6b65f3 Revert "Test for executables: replace 'which' with more robust 'command -v'"
This reverts commit 2d9ab1f7f8.

Causes test failure due to bashism.
2020-03-12 12:32:26 +00:00
johnraff 2d9ab1f7f8 Test for executables: replace 'which' with more robust 'command -v'
Instances of:
if [ $(which <command> ]
have been replaced with:
if command -v <command> >/dev/null
which is considered to be more robust in a range of environments.

scripts/build/chroot_archives: line 259:
	if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ]
has been left untouched because the chroot might require a more complex command
which would need more testing.

manpages/Makefile: line 42:
	@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
has been left untouched because I am not sufficiently familiar with makefiles.
2020-03-12 10:35:57 +00:00
Lyndon Brown 9faf9bcbed hooks: run bin without explicit path
this got lost in reworking 7ee59d408e

Gbp-Dch: Short
2020-03-10 13:59:01 +00:00
Lyndon Brown 7ee59d408e fix consistency in binary execution and existance checking
- prefer using `which` over hard coded paths
 - it is redundant to check that the bin pointed to the return of
   `which` exists and is executable, `which` already gives us
   assurance of that if it returns true!
 - the redirection of output (`2>/dev/null`) seems to be
   unnecessary from my testing.

the instances relatnig to fdisk and losetup in functions/defaults.sh have
been left as they are since they get executed by `lb config` which can run
without sudo elevation unlike `lb build` and in that case `which` would
fail to find these binaries resulting in error.

this also fixes a bug showing an error for missing debootstrap - this tool
requires sudo privileges to run and thus is not found via a none elevated
which search.

Gbp-Dch: Short
Closes: #952927
2020-03-09 10:51:11 +00:00
Raphaël Hertzog 2fe6afe460 Initialize /etc/default/locale with LANG=C.UTF-8
That way we always have a valid UTF-8 locale even when we don't have
the "locales" (or "locales-all") package installed.
2017-08-29 12:26:33 +02:00
Daniel Baumann 50794b1de1 Splitting non-live specific hooks into their own subdirectory within hooks. 2015-05-20 08:19:56 +02:00
Daniel Baumann d18cb12cc1 Moving hooks to hooks/live, both in live-build sources and live-build configs.
Really soon live-build will support building non-live images out-of-the-box.
Therefore moving hooks into a live specific subdirectory.
2015-05-02 15:42:00 +02:00
Daniel Baumann 1a5fda595f Adding hook to disable tmpfs on /tmp when using sysvinit, previously done by live-config. 2015-05-02 13:58:47 +02:00
Daniel Baumann ca758f9cb4 Adding hook to create locales files. 2015-02-23 22:41:52 +01:00
Daniel Baumann ef03f67f81 Adding hook to enable cryptsetup (Closes: #767195). 2014-11-10 19:57:33 +01:00
Daniel Baumann 7312ca2d2d Correcting wrong target for /etc/mtab symlink in create-mtab-symlink hook, thanks to Ben Armstrong <synrg@sanctuary.nslug.ns.ca>. 2014-08-22 17:11:30 +02:00
Simon McVittie 114a778b7a If /etc/mtab exists as a file, replace it with a symlink (Closes: #746570). 2014-06-25 20:52:08 +02:00
Daniel Baumann e84476a7e5 Adding hook to create /etc/mtab as a symlink to /proc/mtab if not already existing (Closes: #746570). 2014-05-01 17:40:11 +02:00
Simon McVittie eeb4680557 Truncate /etc/machine-id instead of deleting it.
If /etc/machine-id exists but is empty, systemd will do tricks
with bind-mounts to ensure that a valid transient UUID is bind-mounted
over it, which is exactly what we want for a live system.

If /etc/machine-id does not exist, systemd-journald
will just fail, which is undesirable.
2014-04-28 19:45:52 +02:00
Daniel Baumann e9701039f7 Updating configuration path in update-apt-file-cache.hook.chroot. 2013-11-03 21:20:33 +01:00
Daniel Baumann 037066598a Updating file suffixes of the internal default hooks. 2013-11-03 21:17:13 +01:00
Daniel Baumann 24cfdfc6a3 Adding hook to remove ssl-cert-snakeoil by default. 2013-06-19 08:01:03 +02:00
Daniel Baumann b82c1349f2 Renumbering hook scripts. 2013-05-06 20:08:10 +02:00
Daniel Baumann 01e91f9c21 Adding hook to disable 70-persistent-cd.rules udev rule to prevent udev remember the cd device name both the one of the build system and the one of the live system (Closes: #706926). 2013-05-06 20:07:09 +02:00
Daniel Baumann 45f1f9f0a0 Renaming remove-udev-persistent-rules.chroot hook to remove-udev-persistent-net-rules.chroot for future additional udev hooks. 2013-05-06 19:40:42 +02:00
Daniel Baumann e5e62f66a1 Renumbering hooks. 2013-05-06 14:50:05 +02:00
Daniel Baumann 772af17699 Adding hook to remove systemd machine-id. 2013-05-06 14:50:05 +02:00
Daniel Baumann a189319b43 Renumbering hooks. 2013-05-06 14:50:03 +02:00
Daniel Baumann 0cdbf60bc1 Moving removal of actual backup files for apt sources into correct hook. 2013-05-06 14:50:03 +02:00
Daniel Baumann 5e07604353 Removing kubuntu mode, it's not different anymore to standard ubuntu mode. 2013-05-06 14:50:02 +02:00
Daniel Baumann 0eb6a7bdae Renumbering hooks. 2013-05-06 14:50:02 +02:00
Daniel Baumann 798e68096a Merging remove-linux-image-backups into remove-backup-files hook. 2013-05-06 14:50:02 +02:00
Daniel Baumann 4908d4d6c1 Adding default hook to use mesa glx renderer. 2013-05-06 14:50:02 +02:00
Daniel Baumann 7ce3113f44 Using consistent naming for default hooks. 2013-05-06 14:50:02 +02:00
Daniel Baumann af54c6b82c Adding default hook to use newest nvidia version. 2013-05-06 14:50:02 +02:00
Daniel Baumann cee58d8779 Also removing man chache in remove-temporary-files hook. 2013-05-06 14:50:02 +02:00
Daniel Baumann d6a30e84eb Adding default hook to truncate log files. 2013-05-06 14:50:02 +02:00
Daniel Baumann fae7a1ce27 Moving removal of backup and temporary files to their own hook script. 2013-05-06 14:50:02 +02:00
Daniel Baumann cf1de1682b Moving kexec-tools default preseeding into its own hook script. 2013-05-06 14:50:02 +02:00
Daniel Baumann bd22f9c864 Updating removal of adjtime in a split out hook for wheezy. 2013-05-06 14:50:02 +02:00
Daniel Baumann 0ad3b01c96 Adding default hook to remove mdadm configuration.
mdadm creates a /etc/mdadm/mdadm.conf configuration file
on package installation which contains array information
from the build system.
2013-05-06 14:50:02 +02:00
Daniel Baumann d1047e809a Adding debian version 4.0~a1-1. 2013-05-06 14:48:46 +02:00
Daniel Baumann f4b264d474 Renumbering hooks. 2013-02-08 21:40:28 +01:00
Daniel Baumann 4da218e858 Adding hook to remove systemd machine-id. 2013-02-08 21:40:28 +01:00
Daniel Baumann 54fee83777 Renumbering hooks. 2012-12-19 06:44:52 +01:00
Daniel Baumann 9a72741066 Moving removal of actual backup files for apt sources into correct hook. 2012-12-19 05:54:16 +01:00
Daniel Baumann 7e8240cd5e Removing kubuntu mode, it's not different anymore to standard ubuntu mode. 2012-12-17 13:51:44 +01:00
Daniel Baumann a46350d7b3 Renumbering hooks. 2012-12-17 00:22:28 +01:00
Daniel Baumann 9d9e343f95 Merging remove-linux-image-backups into remove-backup-files hook. 2012-12-17 00:15:38 +01:00
Daniel Baumann 50c2839b1b Adding default hook to use mesa glx renderer. 2012-12-17 00:10:39 +01:00
Daniel Baumann 995031ed72 Using consistent naming for default hooks. 2012-12-17 00:08:41 +01:00
Daniel Baumann f8ac7662a7 Adding default hook to use newest nvidia version. 2012-12-17 00:06:33 +01:00
Daniel Baumann 1426c7780e Also removing man chache in remove-temporary-files hook. 2012-12-17 00:00:11 +01:00