Richard W.M. Jones [Thu, 6 Oct 2011 12:50:45 +0000 (13:50 +0100)]
helper: Improve error message when run on random files (thanks Alexey Torkhov).
Richard W.M. Jones [Fri, 23 Sep 2011 10:25:27 +0000 (11:25 +0100)]
Use ext2fs_close2 API if available to avoid unnecessary fsync.
This saves over 5 seconds during the slow path construction of the
appliance.
The ext2fs_close2 API is present in the e2fsprogs 'next' branch and
will be in a later e2fsprogs release (thanks Ted Ts'o).
Hilko Bengen [Mon, 12 Sep 2011 21:58:09 +0000 (23:58 +0200)]
febootstrap: Use contents of installed Debian packages instead of downloading and unpacking them.
This also adds --use-installed switch (which for now only works for
Debian).
Richard W.M. Jones [Fri, 23 Sep 2011 08:51:25 +0000 (09:51 +0100)]
Verbose message when adding kernel modules.
This step takes a considerable amount of time (about half of the total
construction time), so separately display a timestamped message for it.
Richard W.M. Jones [Wed, 14 Sep 2011 15:04:49 +0000 (16:04 +0100)]
yum-rpm: Add more debugging to the Python code.
Richard Jones [Mon, 12 Sep 2011 09:07:31 +0000 (10:07 +0100)]
Stable OCaml dependencies.
This technique copied from libguestfs/resize/Makefile.am and modified
so that it works with old ocamldep that used to add spaces at the end
of lines.
Richard Jones [Mon, 12 Sep 2011 09:00:14 +0000 (10:00 +0100)]
docs: Use multiple =item's instead of =item foo|bar
Richard W.M. Jones [Thu, 1 Sep 2011 13:08:57 +0000 (14:08 +0100)]
Version 3.10.
Richard W.M. Jones [Thu, 1 Sep 2011 13:08:50 +0000 (14:08 +0100)]
Move febootstrap into src/ subdirectory.
Now we have src/ for febootstrap and helper/ for
febootstrap-supermin-helper.
Richard W.M. Jones [Thu, 1 Sep 2011 12:57:19 +0000 (13:57 +0100)]
Fix previous commit for non-Debian case.
This updates commit
3ac623701e5fe5ce94b22b4f40f72ee0161d5184.
Richard W.M. Jones [Thu, 1 Sep 2011 09:43:46 +0000 (10:43 +0100)]
debian: Include workaround for broken apt-cache depends --recurse.
Ubuntu 10.04 LTS has a broken apt-cache depends --recurse command
which does not in fact recurse deeply enough to find all dependencies
(this is fixed in Ubuntu 11.04).
Include a workaround for this so we can use febootstrap on old Ubuntu
versions.
Richard W.M. Jones [Thu, 1 Sep 2011 09:24:21 +0000 (10:24 +0100)]
debian: Use configured aptitude program instead of just "aptitude".
Richard W.M. Jones [Thu, 1 Sep 2011 09:23:36 +0000 (10:23 +0100)]
debian: Detect apt-cache in configure.
Richard W.M. Jones [Fri, 26 Aug 2011 10:17:19 +0000 (11:17 +0100)]
Version 3.9.
Richard W.M. Jones [Fri, 26 Aug 2011 10:12:40 +0000 (11:12 +0100)]
Remove obsolete ELF_DEFAULT_ARCH, DEFAULT_ARCH rules from Makefile.
This updates commit
df569d49aa10af5995f771362ddc1400f16486e8.
Hilko Bengen [Thu, 25 Aug 2011 18:39:46 +0000 (19:39 +0100)]
febootstrap: Fix build on platforms where there is no native OCaml compiler.
Hilko Bengen [Wed, 24 Aug 2011 15:16:51 +0000 (17:16 +0200)]
febootstrap-supermin-helper: Replace objcopy call for embedding init binary
objcopy needs "output-target" and "binary-architecture" parameters
which makes it necessary to keep a list of known architectures.
The bin2s.pl script generates input for the GNU assembler which should
produce an object file that is equivalent to that produced by objcopy.
I have successfully tested the change on an amd64 Debian/unstable system.
RWMJ: Added bin2s.pl to EXTRA_DIST and updated .gitignore.
Richard W.M. Jones [Fri, 19 Aug 2011 09:06:00 +0000 (10:06 +0100)]
febootstrap: Add --save-temps option to save temporary files on exit.
Richard W.M. Jones [Fri, 19 Aug 2011 09:06:26 +0000 (10:06 +0100)]
Update copyright notices in manual pages.
Richard W.M. Jones [Fri, 12 Aug 2011 22:25:17 +0000 (23:25 +0100)]
Include ext4 module in the initrd.
Modern kernels allow you to use the ext4.ko module to support ext2 and
ext3 access.
On Fedora, this is the default (albeit not as a module, so this code
path would not be tested yet).
Richard W.M. Jones [Wed, 10 Aug 2011 19:26:51 +0000 (20:26 +0100)]
Download archives with permissive umask (thanks David Konerding).
https://www.redhat.com/archives/libguestfs/2011-August/msg00025.html
Richard W.M. Jones [Wed, 10 Aug 2011 19:28:08 +0000 (20:28 +0100)]
Version 3.8.
Richard W.M. Jones [Fri, 22 Jul 2011 14:18:36 +0000 (15:18 +0100)]
helper: Allow kernel and modpath to be selected from envvars (RHBZ#671082).
Richard W.M. Jones [Fri, 22 Jul 2011 14:18:18 +0000 (15:18 +0100)]
helper: create_kernel_archlinux should return const char *
Richard W.M. Jones [Fri, 22 Jul 2011 13:41:08 +0000 (14:41 +0100)]
helper: Move all_files down function.
This is just code tidy-up.
Richard W.M. Jones [Thu, 21 Jul 2011 07:32:54 +0000 (08:32 +0100)]
debian: Check for gawk.
Richard W.M. Jones [Fri, 15 Jul 2011 16:00:20 +0000 (17:00 +0100)]
Version 3.7.
Richard W.M. Jones [Fri, 15 Jul 2011 15:57:55 +0000 (16:57 +0100)]
De-duplicate directories with the same name, like "/etc" and "/etc/"
In Rawhide there are two patches which create /etc/pam.d and /etc/pam.d/
febootstrap was trying to treat these as two separate directories.
Add a de-duplication step so that these names are considered the same.
We could go further than this patch (eg. removing multiple //
characters), but this patch is sufficient to fix Fedora builds.
Nikita A Menkovich [Fri, 15 Jul 2011 13:18:45 +0000 (14:18 +0100)]
debian: Add missing build dependency on gawk.
Richard W.M. Jones [Mon, 6 Jun 2011 16:07:23 +0000 (17:07 +0100)]
helper: Fix error message when modules.dep is not found.
Richard W.M. Jones [Mon, 6 Jun 2011 13:18:55 +0000 (14:18 +0100)]
Remove trailing whitespace from one line.
Hilko Bengen [Sat, 4 Jun 2011 23:02:50 +0000 (01:02 +0200)]
febootstrap/helper: Major change to kernel module handling code
The previous implementation had two problems: (I) Not all needed
kernel modules were copied to the initrd. (II) If a kernel module
depended on more than one other module, only the first dependency was
considered for the load order. Using 2.6.39-1-amd64 (Debian/unstable)
ext2.ko was not loaded and therefore the root FS could not be mounted.
The use of tsort(1) has been replaced with a set of functions that
build a DAG in memory and use that to calculate the list of modules to
be copied into the initrd and the order in which to load them.
Hilko Bengen [Sat, 4 Jun 2011 23:02:49 +0000 (01:02 +0200)]
febootstrap/helper/init: Add translations for errno
Richard W.M. Jones [Wed, 1 Jun 2011 10:07:45 +0000 (11:07 +0100)]
Version 3.6.
Richard W.M. Jones [Wed, 1 Jun 2011 09:36:42 +0000 (10:36 +0100)]
Fix some printf format warnings when -Wall is enabled.
Hilko Bengen [Tue, 31 May 2011 22:43:12 +0000 (00:43 +0200)]
febootstrap/helper/init: Mount /proc if not already present.
Hilko Bengen [Tue, 31 May 2011 22:43:10 +0000 (00:43 +0200)]
Don't require external insmod.static.
Add module loading functionality into init.c, thus making
insmod.static unnecessary.
Hilko Bengen [Tue, 31 May 2011 22:43:09 +0000 (00:43 +0200)]
febootstrap: Look for insmod.static, mke2fs in /sbin
Hilko Bengen [Mon, 30 May 2011 22:14:11 +0000 (00:14 +0200)]
Force creation of /lib/modules directory.
After adding a line containing "/lib/modules" to hostfiles solved the
immediate problem for me -- febootstrap-supermin-helper finished its
run.
The attached patch makes sure that febootstrap-supermin-helper always
creates this directory.
Richard W.M. Jones [Fri, 27 May 2011 11:09:35 +0000 (12:09 +0100)]
Version 3.5.
Daniel Berrange [Fri, 27 May 2011 10:58:50 +0000 (11:58 +0100)]
Check lseek return type against (off_t) -1.
Richard W.M. Jones [Fri, 27 May 2011 10:56:21 +0000 (11:56 +0100)]
Increase appliance container to 4 GB.
The overhead is now 66 MB which is unfortunate. However 4 GB should
be enough for people who accidentally add kernel modules that are
hand-compiled with all the debuginfo information in them.
Richard W.M. Jones [Fri, 27 May 2011 10:54:54 +0000 (11:54 +0100)]
helper: Add better error messages if files too big for appliance root.
The appliance root was 1GB. However the error message you got
if you overran this space was very obscure:
febootstrap-supermin-helper: ext2fs_file_write:
Could not allocate block in ext2 filesystem
This adds the name of the file that is failing, and replaces the error
message with something more meaningful.
Richard W.M. Jones [Thu, 12 May 2011 13:56:11 +0000 (14:56 +0100)]
helper: When /init fails, print some debugging information.
Richard W.M. Jones [Thu, 12 May 2011 13:51:28 +0000 (14:51 +0100)]
Force mode +x on insmod.static binary (RHBZ#666880).
Richard W.M. Jones [Wed, 27 Apr 2011 09:39:24 +0000 (10:39 +0100)]
helper: Change to root directory before running find command.
Richard W.M. Jones [Wed, 20 Apr 2011 10:35:19 +0000 (11:35 +0100)]
helper: Don't fail if objects are created in a symlinked dir (RHBZ#698089).
Richard W.M. Jones [Fri, 18 Mar 2011 22:10:13 +0000 (22:10 +0000)]
Version 3.4.
Richard Jones [Fri, 18 Mar 2011 14:54:23 +0000 (14:54 +0000)]
Allow config files from different packages if both files have zero size.
Fairly recurrent bug in Fedora. It need not cause us to fail,
provided that both config files are empty.
Richard Jones [Fri, 18 Mar 2011 14:53:04 +0000 (14:53 +0000)]
Collect the size (ft_size) of files from package handlers.
Richard W.M. Jones [Mon, 14 Mar 2011 10:45:41 +0000 (10:45 +0000)]
Link init with '-static' instead of '-all-static'.
Latest gcc (4.6.0) does not recognize the -all-static
option; see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46410
Using -static still results in a static init binary:
$ file helper/init
helper/init: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, stripped
$ ldd helper/init
not a dynamic executable
(cherry picked from commit
42a6e60307b8116dd888e9dae4960f12d895f73f)
Richard W.M. Jones [Sun, 12 Dec 2010 10:40:57 +0000 (10:40 +0000)]
helper: Add support for ArchLinux kernels.
ArchLinux doesn't use the ordinary Linux kernel naming scheme.
(Thanks Thomas S Hatch for helping to diagnose the issue)
Thomas S Hatch [Sun, 12 Dec 2010 10:23:58 +0000 (10:23 +0000)]
pacman: Update ArchLinux module.
If package is not in the main repos, check AUR.
Download and unpack the package.
Richard W.M. Jones [Sat, 11 Dec 2010 17:17:57 +0000 (17:17 +0000)]
Version 3.3.
Richard W.M. Jones [Sat, 11 Dec 2010 17:12:30 +0000 (17:12 +0000)]
helper: Ignore times of special files when calculating checksum.
Variation in the times of /dev/ptmx was causing the
appliance to be rebuilt too frequently.
Richard W.M. Jones [Thu, 9 Dec 2010 15:23:33 +0000 (15:23 +0000)]
Add debian/ subdirectory (temporary).
This adds the debian/ subdirectory to make it easier for us
to build Debian packages.
When we get this into Debian, this directory can be removed.
Richard W.M. Jones [Thu, 9 Dec 2010 16:12:20 +0000 (16:12 +0000)]
debian, pacman: incorrect detection of config files.
Config files were being incorrectly detected, with the
effect that all /etc/ files were being added to hostfiles.
Richard W.M. Jones [Tue, 7 Dec 2010 22:10:03 +0000 (22:10 +0000)]
docs: Missing backslash.
Richard W.M. Jones [Tue, 7 Dec 2010 19:58:29 +0000 (19:58 +0000)]
Add pod.css to EXTRA_DIST.
Richard W.M. Jones [Tue, 7 Dec 2010 19:57:10 +0000 (19:57 +0000)]
Version 3.2
Richard W.M. Jones [Tue, 7 Dec 2010 19:49:08 +0000 (19:49 +0000)]
docs: Refresh documentation with explanation of supermin appliances.
Richard W.M. Jones [Tue, 7 Dec 2010 18:59:29 +0000 (18:59 +0000)]
helper: Remove refs in docs to old manual pages.
Richard W.M. Jones [Tue, 7 Dec 2010 18:56:45 +0000 (18:56 +0000)]
Add HTML documentation to the public website.
Richard W.M. Jones [Tue, 7 Dec 2010 16:26:55 +0000 (16:26 +0000)]
autobuild: Factor out HOSTNAME variable.
Richard W.M. Jones [Tue, 7 Dec 2010 10:17:47 +0000 (10:17 +0000)]
Add autobuild script.
This script is run on the builder(s) regularly.
Richard W.M. Jones [Tue, 7 Dec 2010 08:33:40 +0000 (08:33 +0000)]
Real fix for .*.hmac files (accidental reopening of RHBZ#654638).
Previous commit was broken.
Richard W.M. Jones [Mon, 6 Dec 2010 23:00:39 +0000 (23:00 +0000)]
Properly ignore .*.hmac files (accidental reopening of RHBZ#654638).
Richard W.M. Jones [Mon, 6 Dec 2010 17:20:07 +0000 (17:20 +0000)]
Version 3.1.
Richard W.M. Jones [Mon, 6 Dec 2010 17:14:03 +0000 (17:14 +0000)]
Add --yum-config option to set a yum configuration file.
Richard W.M. Jones [Mon, 6 Dec 2010 17:13:32 +0000 (17:13 +0000)]
Clean up some warnings and debug messages.
Richard W.M. Jones [Mon, 6 Dec 2010 16:46:52 +0000 (16:46 +0000)]
yum: Don't pass tmpdir as an explicit parameter.
Encode it directly in the script instead.
Richard W.M. Jones [Mon, 6 Dec 2010 16:45:57 +0000 (16:45 +0000)]
yum: Call setCacheDir so this works for non-root users.
Richard W.M. Jones [Mon, 6 Dec 2010 16:44:46 +0000 (16:44 +0000)]
Allow --verbose to control whether yum messages are verbose.
Without --verbose, yum will be quiet for once.
Thomas S Hatch [Mon, 6 Dec 2010 15:26:43 +0000 (15:26 +0000)]
Add support for Arch Linux (pacman package manager).
Richard W.M. Jones [Mon, 6 Dec 2010 12:31:19 +0000 (12:31 +0000)]
docs: Arrange required/optional packages more logically.
Richard W.M. Jones [Mon, 6 Dec 2010 12:31:06 +0000 (12:31 +0000)]
docs: Note that gawk (GNU awk) is required.
Richard W.M. Jones [Mon, 6 Dec 2010 12:22:58 +0000 (12:22 +0000)]
configure: Check for insmod.static and fail if not present.
This is not packaged on Debian/Ubuntu, but we require it. Fail
with a useful error message if it is not available.
Richard W.M. Jones [Mon, 6 Dec 2010 12:22:28 +0000 (12:22 +0000)]
docs: Note that libcom_err is required.
Richard W.M. Jones [Fri, 3 Dec 2010 13:17:00 +0000 (13:17 +0000)]
Rewrite febootstrap as a general supermin appliance building tool.
This complete rewrite of the building tools turns febootstrap
into a general purpose, cross-distro, supermin appliance only
build tool.
There is now only one program 'febootstrap' which is used to
build a supermin appliance from a list of packages.
Normal appliances are not supported.
The tools are incompatible with febootstrap 2.x (use the
febootstrap-2.x branch from git to get the old package).
Richard W.M. Jones [Thu, 25 Nov 2010 18:17:52 +0000 (18:17 +0000)]
Version 2.11.
Richard W.M. Jones [Thu, 25 Nov 2010 17:37:35 +0000 (17:37 +0000)]
ext2: Fix "ext2fs_mkdir .. No free space in directory".
We weren't expanding ext2 directories and as a result we could
hit a limit when the directory grows larger than one block.
Note that this fix only applies for creating subdirectories.
For creating files (ie. ext2fs_link) we were already doing the
right thing.
Richard W.M. Jones [Sat, 6 Nov 2010 10:46:17 +0000 (10:46 +0000)]
elf-default-arch should exit with an error if it fails.
Richard W.M. Jones [Sat, 6 Nov 2010 10:45:53 +0000 (10:45 +0000)]
Fix elf-default-arch for ppc and ppc64.
Richard W.M. Jones [Sat, 6 Nov 2010 10:23:24 +0000 (10:23 +0000)]
gnulib: Ignore another gnulib generated file.
Richard W.M. Jones [Sat, 6 Nov 2010 10:23:08 +0000 (10:23 +0000)]
main should return int
Richard W.M. Jones [Sat, 6 Nov 2010 10:22:41 +0000 (10:22 +0000)]
RHEL 5: Don't pass BLOCK_FLAG_READ_ONLY to ext2_block_iterate if not defined.
Richard W.M. Jones [Thu, 28 Oct 2010 15:54:43 +0000 (16:54 +0100)]
Version 2.10.
Matthew Booth [Thu, 28 Oct 2010 14:17:22 +0000 (15:17 +0100)]
Ignore cscope.out
Matthew Booth [Thu, 28 Oct 2010 14:17:21 +0000 (15:17 +0100)]
Add -u and -g options to febootstrap-supermin-helper
Bash automatically resets euid to uid when it executes. This means that the
effective user id of a program at the point it calls febootstrap-supermin-helper
will be lost if any part of execution chain involved bash. This in turn can
result in:
* the generation of an incorrect checksum, which contains the uid.
* the generation of supermin files with a mixture of owners
The -u and -g options allow the caller to pass in an explicit user and group to
run as. febootstrap-supermin-helper will set(u|g)id as appropriate.
Matthew Booth [Fri, 1 Oct 2010 16:23:11 +0000 (17:23 +0100)]
Send usage output to stdout or stderr depending on context.
If usage information is displayed because of an error, it should go to stderr.
If it is displayed because the -h option was given it should go to stdout.
Matthew Booth [Fri, 1 Oct 2010 16:00:11 +0000 (18:00 +0200)]
Add gnulib as a submodule.
(Thanks also to Jim Meyering for resolving the git submodule problems).
Richard W.M. Jones [Fri, 17 Sep 2010 13:17:57 +0000 (14:17 +0100)]
Update gnulib.
Dan Horák [Fri, 17 Sep 2010 13:13:27 +0000 (14:13 +0100)]
Fix elf-default-arch detection to work on secondary archs (RHBZ#634951)
Recent state of the elf-default-arch script and the hardcoded i386 arch doesn't
allow building on other arches than ix86 or x86_64. See attachment for a fix.
Can be easily extended to support additional secondary arches by adding new
patterns to the elf-default-arch script
Richard Jones [Fri, 27 Aug 2010 16:38:53 +0000 (17:38 +0100)]
Version 2.9
Richard Jones [Fri, 27 Aug 2010 16:04:53 +0000 (17:04 +0100)]
helper: Ignore editor backup (*~) files.
Richard Jones [Fri, 27 Aug 2010 16:03:57 +0000 (17:03 +0100)]
helper: Visit directory entries in order.
Previously in febootstrap-supermin-helper we would visit the
files in supermin.d in arbitrary (ie. readdir) order. This has
caused a series of heisenbugs where some implicit dependency
between these files has not been honoured. The latest one is
that '/etc/localtime' can be added to the appliance before '/etc'
has been created (and this operation fails).
Instead of continuing to chase these, this commit forces us to
visit the files in filename order by sorting them before visiting
them.
Note that in libguestfs, the current order is sufficient, because
the files are called:
base.img
daemon.img
hostfiles
Richard Jones [Sat, 21 Aug 2010 08:39:14 +0000 (09:39 +0100)]
Version 2.8.
Update gnulib.
Richard Jones [Fri, 20 Aug 2010 20:31:49 +0000 (21:31 +0100)]
Add -f checksum mode to allow caching of appliances.
Richard Jones [Fri, 20 Aug 2010 18:23:03 +0000 (19:23 +0100)]
Implement ext2 output module.
Richard Jones [Thu, 19 Aug 2010 15:11:44 +0000 (16:11 +0100)]
Remove bogus 'whitelist' parameter from usage.
Use the -k whitelist option to get a kernel whitelist.
This is a bug in current febootstrap-supermin-helper.