Commit Graph

315 Commits

Author SHA1 Message Date
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
Daniel Baumann 72a7e46e00 Also copying binary package list to build directory. 2008-04-15 13:54:32 +02:00
Daniel Baumann 9d4ea53717 Also adding a packages.txt when building etch images, although there is a casper/filesystem.manifest already. 2008-04-11 18:18:04 +02:00
Chris Lamb 49d27a086d lh_chroot_linux-image: Catch missing case in local live-initramfs handling
This patch catches the case when LH_APT is "apt", its default value. This
was causing build failures when using a local live-initramfs .deb.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-10 22:36:22 +01:00
Chris Lamb 37666ee1bb helpers/lh_config, functions/defaults.sh: Correct "boostrap" -> "bootstrap"
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-04-10 22:31:17 +01:00
Daniel Baumann d5ac81a8e3 Sort md5sum.txt files again after filename. 2008-04-09 13:31:46 +02:00
Daniel Baumann 123e5477ec Updating help output of lh_config. 2008-04-08 12:18:42 +02:00
Daniel Baumann 2e25016815 Applied patch from Erwan Le Gall <elegall@linagora.com> to give a warning when installing local packages with wrong naming scheme. 2008-04-07 12:25:03 +02:00
Daniel Baumann 07a3c54d46 Using new Read_conffile(); now. 2008-04-07 12:10:21 +02:00
Daniel Baumann e79e733e49 Adding 'all' configuration file. 2008-04-07 11:58:50 +02:00
Daniel Baumann b211016196 Fixing md5sum.txt creation to not fail on filenames with whitespaces, thanks to Bas Wijnen <wijnen@debian.org> (Closes: #469085). 2008-03-25 09:48:34 +01:00
Chris Lamb 71503807d8 lh_chroot_hacks: Ensure initrds are group- and world- readable
The loop-aes-utils sets a umask in its update-initramfs configuration,
causing initrds to have "0600" permissions which causes boot failures
when offering the files over netboot or similar.

The justification given by loop-aes is that, as it supports encrypting
against embedded GPG keyrings, the keys would be compromised if the files
were group- or world- readable. However, as live-helper does not support
this feature, it is safe to simply correct the permissions.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-23 04:27:21 +00:00
Chris Lamb 1ca0b58aac Allow LH_ENCRYPTION="disabled" to disable encryption
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-23 04:21:47 +00:00
Chris Lamb ea375828e9 lh_binary_encryption: Rework and fix broken AES encryption routines
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-23 04:20:31 +00:00
Chris Lamb 31dca28f67 lh_binary_rootfs: Remove
mksquashfs has a nasty habit of segfaulting when creating an image where
an image already exists. This can happen, for example, if you are
performing multiple runs of lh_binary and the build breaks for some reason.

This is almost certainly a bug in mksquashfs; I will look into finding a
suitable testcase.
2008-03-23 04:08:46 +00:00
Chris Lamb 32f6dcd3a3 lh_binary_debian-installer: Preseed by repacking initrd in some situations
This patch repacks the initrd when using the d-i netboot images in order
to incorporate a preseed.cfg if it exists. Before this patch, preseeding
of d-i netboot images was not possible.

Repacking the initrd has the additional advantage of being able to preseed
the first few questions of the installation process.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-22 18:13:03 +00:00
Chris Lamb 3e5f888a19 lh_binary_debian-installer: Merge pool/netboot determining logic
The code which determined whether to use the netboot d-i images was the
inverse of the code which determined whether to create a local package
pool: this patch merges the two.

This patch additionally ensures that setting "businesscard" whilst building
an ISO image will install the d-i netboot images; this was causing d-i
failures when it couldn't find its (non-existent) package pool.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-22 18:09:46 +00:00
Chris Lamb c70412bcfa lh_binary_debian-installer: Remove "local"-oriented bashisms
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-22 18:05:42 +00:00
Chris Lamb 9e6c04702f lh_chroot_linux-image: Install dependencies differently when using aptitude
We must use "aptitude install <pkgname>" to install dependencies of a
dpkg-installed <pkgname>, or aptitude's resolver will remove it. apt-get
does not have this "feature".

This was causing a problem when using a custom versions of live-initramfs
as they would be removed, causing a boot failure.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-22 02:44:18 +00:00
Chris Lamb 9321c45188 lh_binary_debian-installer: Don't use --no-clobber for downloading files
Using --no-clobber at the same time as -O<file> results in <file> being
created with no contents, which was resulting in (broken) zero-byte d-i
kernels and initrds.

The patch is simple -- simply remove --no-clobber: wget -O<file> <url> will always download <url> to <file>, regardless of how
many times it is run.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-22 01:32:11 +00:00
Chris Lamb cf25064250 lh_binary_debian-installer: Only create package pools when necessary
There is no need to create a package pool when creating a netboot Debian
Live image or when the LH_DEBIAN_INSTALLER is set to "businesscard".

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-22 01:31:42 +00:00
Chris Lamb 762613f277 lh_binary_debian-installer: Re-enable d-i on netboot images
This patch also modifies the configuration logic to ensure that setting
LH_DEBIAN_INSTALLER="enabled" whilst creating a netboot image will install
the netboot variety of d-i.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-22 01:30:55 +00:00
Daniel Baumann e994ff8771 Correcting wrong logic on handling secure apt. 2008-03-11 17:32:03 +01:00
Daniel Baumann a955c29e10 Fixing wrong debian-installer auto target configuration. 2008-03-09 13:34:41 +01:00
Daniel Baumann 92a0b19dc8 Re-adding quiet on all d-i install targets in post-etch, except expert (and keeping Chris fixed quiet handling). 2008-03-09 09:58:44 +01:00
Chris Lamb 206f3b3f21 Don't append 'quiet' kernel parameter in rescue modes
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-09 09:56:19 +01:00
Chris Lamb 8a19cbfff1 Ensure syslinux entry names match templates and standard d-i names
This patch alters the syslinux labels to follow the "expert" and
"expertgui" style in favour of "TextExpert" and "GUIExpert".

This makes the names match Live Helper's syslinux templates, as well as the
more typical d-i installations and numerious sources that claim that one
should "just type 'expert' at the syslinux prompt", etc.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-09 09:56:10 +01:00
Daniel Baumann ab336ba97e Updating copyright years to 2008. 2008-03-06 16:43:00 +01:00
Daniel Baumann cc2cf994d4 Also handling ext3 in lh_binary_rootfs, thanks to Bas Wijnen <wijnen@debian.org> (Closes: #468902). 2008-03-02 11:12:02 +01:00
Bas Wijnen dd6a5d408b Making usb-hdd images large enough (Closes: #468855).
When building a very minimal live system on a usb-hdd target, the generated
image is too small. A very minimal system is smaller than 50MB, and so this is
the same as DU_DIM for such a system. This is too small. Unconditionally adding
one solves the problem.
2008-03-02 08:24:59 +01:00
Chris Lamb 931881f27a Use ${*} instead of ${@} for checking for no arguments in lh_clean.
${@} expands to "<arg1>" "<arg2>" ... etc., which causes the -z test to
encounter too many arguments and thus fail with an error.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2008-03-02 01:00:38 +00:00
Daniel Baumann 522c2455bc Adding temporary hack to remove fstab when using live-installer. 2008-03-01 14:43:47 +01:00
Daniel Baumann 2e50db26fd Adding --jffs2-eraseblock parameter.
Marco sais, that flash devices often need a different erase size than mkfs.jffs2
defaults to. Hence, this parameter passes the blocksize to the mkfs.jffs2 call
through --eraseblock option.
2008-03-01 13:19:54 +01:00
Daniel Baumann ccb76dc4a4 It's actually enough to just truncate kernel-img.conf and also less invasive than including a default configuration. 2008-02-29 17:29:00 +01:00
Daniel Baumann 6244123de2 Including default kernel-img.conf in live-systems. 2008-02-29 16:40:02 +01:00
Daniel Baumann 179b86ab64 Using wildcards to support more than one preseeding file. 2008-02-29 13:32:16 +01:00
Daniel Baumann d104e3f6e7 Honor local preseeding file for debian-installer. 2008-02-29 13:27:56 +01:00
Daniel Baumann 5ce8ab768b Fixing typo in sed call to set isolinux splash file. 2008-02-29 12:47:03 +01:00
Daniel Baumann 88ecda55c3 Added forgotten getopts arguments for chroot mirror. 2008-02-27 21:06:11 +01:00
Daniel Baumann 0472269ef8 When a wrong argument is passed, that argument should be listed (Closes: #468201). 2008-02-27 19:05:35 +01:00
Daniel Baumann 2d88de5ab6 Adding option to set binary-net compression (or disable it). 2008-02-26 19:57:41 +01:00
Daniel Baumann 7d67f78ddf Re-adding additional indices updated, otherwise we wouldn't honor thirdparty repositories (anymore). 2008-02-24 16:30:58 +01:00
Daniel Baumann c6fa0ca042 Renaming LH_MIRROR_BOOTSTRAP* to LH_MIRROR_CHROOT and introducing dedicated LH_MIRROR_BOOTSTRAP for debootstrap/cdebootstrap only. 2008-02-21 20:52:37 +01:00
Daniel Baumann fd315529e0 Renaming extra bootstrap indices to chroot. 2008-02-21 20:46:49 +01:00
Daniel Baumann fa3c63f5dc Adding apt/aptitude options.
By using APT_OPTIONS and APTITUDE_OPTIONS in config/common,
one can manipulate the default options wich is made to each
and every apt and aptitude call.
2008-02-21 20:03:57 +01:00
Otavio Salvador 20ffe176ed lh_binary_rootfs: add support to generate jffs2 filesystem 2008-02-20 21:15:50 -03:00
Otavio Salvador 774aebab84 lh_binary_encryption: add jffs2 as not supported filesystem 2008-02-20 21:15:50 -03:00
Otavio Salvador 5cdd8df091 lh_config: add jffs2 in supported filesystems 2008-02-20 21:15:50 -03:00
Otavio Salvador b6149744e3 lh_source_debian: add mtd-tools since it provides mkfs.jffs2 application 2008-02-20 21:15:49 -03:00
Otavio Salvador ff9eb4e41f chroot: don't fail if /dev/pts is already mounted 2008-02-20 10:11:22 -03:00
Otavio Salvador 92cd4a1daa binary: do not fail if parameters.txt isn't available 2008-02-15 16:14:30 -02:00
Daniel Baumann 03783def4b Fixing typo. 2008-02-13 10:20:42 +01:00
Otavio Salvador 7d2d532f70 bootstrap: use minbase flavour when LH_PACKAGES_LISTS is set to minimal
Since debootstrap 1.0.8 there's a variant called minbase that installs
just essentials packages so base's size is greatly reduced. Use this
variant when producing reduced images.
2008-02-07 18:34:25 -02:00
Otavio Salvador c7cbfa0754 bootstrap: adds support to debootstrap 1.0.7
New debootstrap has change the scripts to /usr/share since they're
architecture independent code. The support for it has been added
however it fallback to /usr/lib to keep backward compatibility.
2008-02-07 15:13:45 -02:00
Daniel Baumann a8998d70d9 Removing unintendet set -x. 2008-01-18 09:52:04 +01:00