Commit Graph

369 Commits

Author SHA1 Message Date
Daniel Baumann 80e59fb472 Only using hardlinks for local-packages when hardlinks are possible. 2008-08-07 19:45:24 +02:00
Daniel Baumann d27f5152d3 Removing make-live legacy helper. 2008-08-07 19:39:45 +02:00
Daniel Baumann 01f8269eb3 Making check for local-patches silent. 2008-08-07 17:57:28 +02:00
Daniel Baumann 0a1a5f6da7 Making check for local-includes silent. 2008-08-06 23:28:27 +02:00
Tiago Bortoletto Vaz 5f87b22971 Improving message when using default values in /etc/default/live-helper. 2008-08-06 23:01:47 +02:00
Chris Lamb 04b0737087 Add lh_chroot_local-patches helper to apply local patches against chroot.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-31 17:12:06 +01:00
Chris Lamb 3199a409fa Don't duplicate gtk and non-gtk kernels if they are identical.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-29 00:48:31 +01:00
Chris Lamb 2435bee4ac Fix cache poisoning issue in lh_binary_debian-installer with 404 downloads
When wget 404's, an target file is created - this poisons the cache as the
file is apparently downloaded but in actuality is simply empty. We fix this
by unconditionally deleting the cache file if wget fails and emitting an
error.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-26 00:27:29 +01:00
Chris Lamb 364ed4e362 Don't attempt to use live-installer on Etch; it would simply result in no bootstrap method.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-26 00:21:25 +01:00
Chris Lamb db756ce6c6 Cache d-i kernel, initrd and mini.iso downloads (Closes: #492085)
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-24 05:48:47 +01:00
Chris Lamb 1b0a6b7420 Wrap most calls to wget in lh_binary_debian-installer.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-24 05:47:08 +01:00
Daniel Baumann 5d2cdbe5c6 Using rfc2606 invalid tld instead of dummy. 2008-07-15 09:33:27 +02:00
Daniel Baumann e8f45391ba Using better suited variable name for live-helpers local key. 2008-07-15 09:32:30 +02:00
Chris Lamb 16a45783e1 Additionally clean md5sum.txt temporary file.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-13 02:43:58 +01:00
Chris Lamb ee29509120 Remove pointless whitespace.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-13 02:42:55 +01:00
Chris Lamb bb897a80a5 Temporarily replace /dev/urandom with /dev/random when creating local packages key.
This avoids blocking automated mage builds; we don't care about the
security of this key anyway.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-13 02:42:46 +01:00
Chris Lamb 03ad96281e Correct d-i kernel and initrd locations in grub entries. Thanks to Jun NOGATA <nogajun@gmail.com> for the patch. (Closes: #490245)
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-11 00:37:51 +01:00
Chris Lamb 3aa34e3461 Fix a bug where a /etc/apt/preferences supplied in chroot_local-includes was always being deleted when used in conjunction with config/chroot_apt/preferences.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-10 21:54:02 +01:00
Chris Lamb 04841d46ad Abort build if working directory contains spaces - not supported by (at least) debootstrap and cdebootstrap.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-10 05:13:57 +01:00
Chris Lamb 78d346e90c Replace spaces in LH_BOOTSTRAP_{IN,EX}CLUDE variables with commas on use. Thanks to Cyril Brulebois <cyril.brulebois@kerlabs.com>. (Closes: #490114)
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-10 00:24:07 +01:00
Chris Lamb e0160b3eaf Fix syntax error in --ignore-system-defaults handling.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-09 15:40:57 +01:00
Chris Lamb 77e3602fa4 Ensure ~/.gnupg exists (required for gnupg >= ~1.4.9)
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-09 15:40:39 +01:00
Chris Lamb 9f96103510 Fix bug where command-line argument --ignore-system-default was not seen before it was required.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-09 04:59:23 +01:00
Chris Lamb 0b38353a81 Fix formatting error with --ignore-system-defaults in "lh_config --help"
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-09 04:55:10 +01:00
Chris Lamb 2de3396734 Add --ignore-system-defaults option to not source /etc/default/live-helper.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-09 00:13:09 +01:00
Chris Lamb 3205bb9409 Use a temporary apt key when installing local packages (Closes: #488257)
This patch also allows preferring locally provided packages by preferencing
repositories with the label 'local-packages' in chroot_apt/preferences.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-05 00:40:20 +01:00
Chris Lamb 3b540b4c4f Fix caching of APT indices (Closes: #478744)
I've tested this the cross-product of LH_APT={apt,aptitude} and
LH_APT_SECURE={enabled,disabled} with no problems.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-04 22:29:43 +01:00
Chris Lamb 3feafc9a70 Refactor d-i GTK image selection, ensuring the GTK installer is only chosen on the netboot variant when building on powerpc.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-04 22:28:20 +01:00
Chris Lamb 6c11528829 Only consider linux-image-2.6-prep powerpc kernel image on Etch.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-04 22:26:35 +01:00
Chris Lamb 70925408b6 Refactor remote d-i location handling and ensure correct locations for powerpc.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-07-04 22:25:47 +01:00
Chris Lamb 627de6d41e Re-order a case statement for consistency.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 11:37:02 +01:00
Chris Lamb d0f57376eb Fix incorrect test for sparc architecture in binary include handling.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 11:36:15 +01:00
Chris Lamb bcd8472821 Add support for generation of sparc netboot images.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 01:38:21 +01:00
Chris Lamb 6d9de44806 Add support for sparc "tar" binary image type.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 01:37:47 +01:00
Chris Lamb 21d51d04f9 Add support for sparc install includes.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 01:35:18 +01:00
Chris Lamb ec998961a8 Refactor destination setting in lh_binary_silo to check arguments at beginning of the script.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 01:35:07 +01:00
Chris Lamb 5bee701f29 Abort build if building from the root directory (/) as this causes misc build failures.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 01:33:49 +01:00
Chris Lamb 8fed454c06 Emit a warning when running lh_build without a config/ directory.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 01:33:15 +01:00
Chris Lamb c05c115684 Migrate a few uses of grep to In_list.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-20 01:31:21 +01:00
Chris Lamb da4672b5d5 Remove a useless space
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-19 22:02:37 +01:00
Chris Lamb daec955a09 Consolidate grep text searching predicates to use "grep -qs"
If this is deemed not portable enough in the future, it should be easy
enough to find/replace.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-19 19:49:16 +01:00
Chris Lamb 30bafdae57 Revert aborting live d-i installation if minimal/stripped is selected and instead attempt to not break the chroot too much in this case
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-19 19:03:10 +01:00
Chris Lamb 3ddecb18c8 Replace another unweildy "if P1 || P2" statement with its "case" equivalent.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-19 18:58:09 +01:00
Chris Lamb 6143328e16 Remove more imported whitespaces.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-19 18:56:11 +01:00
Chris Lamb 191746a476 Adjust "lh_config --help" and lh_config(1) so that the -m option corresponds with --mirror-bootstrap isntead of --mirror-binary-security.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-19 18:41:26 +01:00
Daniel Baumann b7f5a3af97 Removing imported whitespaces. 2008-06-17 07:08:24 +02:00
Chris Lamb 64d2e53e07 Only deference symlinks on usb-hdd filesystems that do not support symlinks.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 16:51:49 +01:00
Chris Lamb 0c46e9185b Add support for ext2 and ext3 to lh_source_usb-hdd.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 16:48:47 +01:00
Chris Lamb be0f6ae8a4 Add support for usb-hdd on sparc (requires parted 1.8 from experimental).
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 16:27:35 +01:00
Chris Lamb 343497ad98 Refactor mkfs handling.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 16:25:34 +01:00
Chris Lamb d522b02fc1 Refactor partition table type handling.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 16:20:55 +01:00
Chris Lamb 802c604984 Refactor partition type handling.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 16:17:42 +01:00
Chris Lamb 5093b27576 Prefix mount and unmount in lh_binary_debian-installer with LH_ROOT_COMMAND.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 16:07:05 +01:00
Chris Lamb 2b77ec6b5d Add support for sparc to lh_binary_debian-installer.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 04:47:23 +01:00
Chris Lamb 766cd2670c Add support for the sparc architecture.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 04:46:51 +01:00
Chris Lamb 49a4ffc061 Add lh_binary_silo and associated templates to support the SILO bootloader.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 04:46:25 +01:00
Chris Lamb 0cfbc69eb0 Ensure apt-utils is installed in the helpers it is required.
This allows us to remove a hacky test from hooks/minimal to see whether
we need the package.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 02:55:33 +01:00
Chris Lamb 28db987a8e Abort if "live" d-i installation is attempted with minimal or stripped LH_PACKAGES_LISTS
This is required because lh_binary_rootfs removes /boot if minimal or
stripped is the only packages list.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 02:45:50 +01:00
Chris Lamb 1520c59356 Fix d-i locations in yaboot entries.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 01:57:50 +01:00
Chris Lamb cd7689e4ce Fix trivial typographic error ("flavor" => "flavour")
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-15 00:36:20 +01:00
Chris Lamb 5d70e02dd1 Only deference symlinks on FAT{16,32} partitions on usb-hdd.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 18:36:22 +01:00
Chris Lamb 0800980534 Revert always deferencing symlinks when installing some binary includes.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 18:27:38 +01:00
Chris Lamb 0371778301 Add Echo_breakage for messages preceeding often-breaking stages and use before {c,}debootstrap calls
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 18:25:05 +01:00
Chris Lamb 250529183f Replace a few unweildy "if" statements with their "case" equivalents
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 17:35:11 +01:00
Chris Lamb 0d1122d0ab Move Etch syslinux workaround closer to the original definitions
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 17:30:32 +01:00
Chris Lamb efa3d98166 Use correct location of powerpc d-i images.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 17:27:42 +01:00
Chris Lamb 6ada2b7bd4 Set correct d-i image type on usb-hdd and tar image types
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 17:22:57 +01:00
Chris Lamb 9690d108b2 Remove pointless "echo" statements pre- and post- cdebootstrap
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 17:19:29 +01:00
Chris Lamb cfd2990dc3 Allow LH_APT_SECURE to disable package cdebootstrap package authentication
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 17:18:54 +01:00
Chris Lamb 7918534bc5 Rename USE_NETBOOT_DI to DI_IMAGE_TYPE
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 16:41:58 +01:00
Chris Lamb 88c9e3f922 Always deference symlinks when installing some binary includes to fix breakage on amd64.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-14 05:25:36 +01:00
Chris Lamb f0d589d6a4 Ensure "Using system defaults" message appears when calling lh_config without --verbose
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-13 16:08:42 +01:00
Chris Lamb ef26b6ea78 Don't skip single dot-files in the root directory of binary and chroot local includes
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-13 15:53:19 +01:00
Chris Lamb 36035832fb Don't exclude live-installer when LH_DEBIAN_INSTALLER=live
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-13 15:52:16 +01:00
Chris Lamb 51670fa564 Fix a few bogus guards in lh_binary_debian-installer
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-06-13 14:28:27 +01:00
Daniel Baumann 3dfe5d30fe Parsing local arguments to lh_config last. 2008-06-11 15:30:37 +02:00
Daniel Baumann 0c15f64d5b Correcting order where system-wide lh_config defaults file is read, thanks to Juergen Fiedler <juergen.fiedler@gmail.com>. 2008-06-10 19:04:23 +02:00
Daniel Baumann d59d511813 Only saving source indices to indices cache if source indices are actually existing, thanks to Thanatermesis <thanatermesis.ecvs@elivecd.net>. 2008-06-09 10:04:44 +02:00
Daniel Baumann 3dd793055a Correcting path for system-wide lh_config defaults file. 2008-06-09 09:09:14 +02:00
Marco Amadori 4e18008ecb Added support for /etc/live-helper.
* lh_config system-wide configuration file, like an implicit specification
  of '--conffile=/etc/live-helper' to each lh_config call.

Signed-off-by: Marco Amadori <marco.amadori@gmail.com>
2008-06-09 08:52:45 +02:00
Marco Amadori 60c755e508 Removed a useless space.
Signed-off-by: Marco Amadori <marco.amadori@gmail.com>
2008-06-09 00:29:56 +02:00
Chris Lamb 070a72846b Create chroot_local-preseed/ directory when building config/ in lh_config
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-05-15 03:06:35 +01:00
Daniel Baumann 705cb6cec1 Producing rsyncable tarballs where possible. 2008-04-22 23:32:30 +02:00
Chris Lamb ef8df9bcad Allow fallback to chroot_package-lists inside binary lists
Without this, a modified version of the (say) "gnome" list inside
chroot_package-lists would be completely ignored when installing binary
packagelists.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-19 17:32:25 +02:00
Chris Lamb ac3563b3ca Remove temporary binary package list files
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-19 17:32:10 +02:00
Chris Lamb f8c8aaa99a Tidy calls to new Expand_packagelist
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-19 17:32:02 +02:00
Daniel Baumann 734762fcf1 Some formating and style cleanups. 2008-04-17 10:42:34 +02:00
Daniel Baumann dd470ea575 Using one single packages cache directory for all chroot packages. 2008-04-17 10:39:47 +02:00
Daniel Baumann bd76f9940b Using hardlinks to copy local packages into chroot. 2008-04-17 06:51:40 +02:00
Daniel Baumann bb6b5e1249 Moving lh_chroot_packages call in lh_chroot to old place. 2008-04-17 06:51:31 +02:00
Chris Lamb 478331c4e1 Install most chroot packages in one ${LH_APT} call (Closes: #475739)
This patch installs (almost) all chroot packages by queueing the package
names into a single file and then installing that. It depends on my
previous patch to install local packages by using an APT mirror.

This speeds up image build causes even greater speedups once more packages
adopt triggers.

(Packages installed by debconf preseeding are not touched, nor are packages
installed by tasks.)

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-17 06:51:22 +02:00
Chris Lamb 1086ec4784 Install local packages using a local APT repo instead of using "dpkg -i"
This patch modifies chroot_sources to build a small APT repo of the
local-packages and use that for local package installation instead of
"dpkg -i". This has a few advantages:

 * Removes the true ugliness that is "dpkg -i *.deb && apt-get install -f".
   This not only is slow and brittle, it causes scary "dpkg dependency
   error" messages to appear in build logs.

 * We can (ie. not implemented here) move to installing all the packages
   from:

    - lh_chroot_packages (ie. ${LH_PACKAGES})
    - lh_chroot_local-packages (ie. config/chroot_local-packages/*.deb)
    - lh_chroot_local-packageslists
    - lh_chroot_packages-lists
    - lh_chroot_linux-image

   .. in one shot. This would primarily improve speed as we would not keep
   invoking ${LH_APT}, and package installations can share triggers and
   suchlike -- installing a custom live-initramfs via local packages
   currently costs an additional "update-initramfs -u" call.

   It would also fix a number of obscure dependency cases, such as the one
   documented in #475739, and--if the user is using aptitude--may even
   result in better resolution choices.

 * Removes some messy and somewhat brittle code in lh_chroot_linux-image
   that edgecases a local live-initramfs.

The disadvantages are:

 * If local packages are being used and we are building in a chroot, we
   must refresh the sources list and rebuild the repo before building the
   binary images. (However, before this patch, we had to do this anyway if
   the binary mirrors were different from the chroot ones.)

 * We must add a little hack to the minimal hook to detect whether we are
   using local packages and not remove apt-utils (which creates the
   repository in lh_chroot_sources) if that is the case -- we cannot simply
   use "Install_package" inside lh_chroot_sources as we are not guaranteed
   to have working APT data because the minimal hook deliberately removes
   them!

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-16 13:50:24 +01:00
Tiago Bortoletto Vaz 76edb7835d lh_chroot_local-preseed: fix minor typo 2008-04-16 11:04:24 +02:00
Chris Lamb fe152b4d0c lh_binary_debian-installer: Add dependency on 'wget'
The 'minimal' hook removes wget, which is used extensively by the Debian
Installer hook.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-16 06:19:10 +01:00
Chris Lamb 9e272993cc Fix a number of issues with Syslinux templates (Closes: #476204)
This fixes:

 * The ugly "toboot" and "to\nboot" problems
 * Mistitled F4 page
 * Ugly line-breaking of Debian Live URL

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-16 03:34:21 +01:00
Chris Lamb 24200e1a2c Use "find -path" for matching "path/to/file" files (Closes: #476206)
This means that /isolinux/isolinux.bin and /boot/grub/stage2_eltorito are
not included in md5sum files anymore as intended. It also prevents a
strange and verbose warning from appearing in build logs.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-16 00:54:08 +01:00
Chris Lamb 8f39f474b7 Fix quoting when installing local packages (Closes: #470683)
This was causing problems when building a package and there were binary
packages in the directory above 'config/'. See [0] and [1] for more info.

 [0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463406
 [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476294

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-15 18:34:34 +01:00
Chris Lamb 84612231f6 Fix typo in policy-rc.d
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-15 18:34:34 +01:00
Daniel Baumann ece0f9b574 Sorting image file lists. 2008-04-15 17:38:03 +02:00
Daniel Baumann 214ad680d3 Creating binary and source file lists in build directory. 2008-04-15 13:59:53 +02:00