summaryrefslogtreecommitdiffstats
path: root/helper
Commit message (Collapse)AuthorAgeFilesLines
* helper: fix no-op add_link functionJim Meyering2012-01-101-1/+3
| | | | | * helper/ext2cpio.c (add_link): Don't leak just-allocated buffer. Instead, link it into links_head list.
* helper: plug two small leaksJim Meyering2012-01-102-2/+5
| | | | | | * helper/ext2initrd.c (read_module_deps): Don't leak filename. (ext2_make_initrd): Don't leak "outfile". * helper/utils.c (load_file): Don't leak a file pointer.
* helper: Print /modules when verbose >= 2Richard W.M. Jones2011-12-171-0/+3
|
* helper/init: Display version and zlib support.Richard W.M. Jones2011-10-141-2/+7
|
* Replace ArchLinux module detection with generic method.Erik Nolte2011-10-141-60/+96
| | | | | | | | | ArchLinux used to keep its kernel in /boot/vmlinuz26 but, with Linux 3.0, now uses /boot/vmlinuz-linux. Instead of just changing the kernel filename and module directory, this change removes the ArchLinux specific code, lets febootstrap find a kernel, and then computes the module directory from the version string extracted from the actual kernel file.
* helper/init: Handle compressed modules transparently.Erik Nolte2011-10-142-20/+61
| | | | | | | | | | | | | | | | | | | | Detect libz and, if present, define HAS_LIBZ and add -lz to Makefile's LIBS variable. Add entry on optional zlib package requirement. Detect both uncompressed and gzipped kernel modules. Some Linux distros (like ArchLinux) use gzipped kernel modules with filenames like ext2.ko.gz. This change modifies the filename pattern from (e.g.) "ext2.ko" to "ext2.ko*". When available, use libz to read the module. The init_module system call requires uncompressed kernel module bytes. On some systems (e.g. ArchLinux) the modules are gzipped on disk. Libz is used to read and uncompress gzipped disk files (*.ko.gz) or transparently read uncompressed modules (*.ko).
* helper: Improve error message when run on random files (thanks Alexey Torkhov).Richard W.M. Jones2011-10-061-1/+3
|
* Use ext2fs_close2 API if available to avoid unnecessary fsync.Richard W.M. Jones2011-09-241-1/+9
| | | | | | | | 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).
* Verbose message when adding kernel modules.Richard W.M. Jones2011-09-231-0/+3
| | | | | This step takes a considerable amount of time (about half of the total construction time), so separately display a timestamped message for it.
* docs: Use multiple =item's instead of =item foo|barRichard Jones2011-09-121-3/+13
|
* Remove obsolete ELF_DEFAULT_ARCH, DEFAULT_ARCH rules from Makefile.Richard W.M. Jones2011-08-261-4/+0
| | | | This updates commit df569d49aa10af5995f771362ddc1400f16486e8.
* febootstrap-supermin-helper: Replace objcopy call for embedding init binaryHilko Bengen2011-08-253-35/+54
| | | | | | | | | | | | 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.
* Update copyright notices in manual pages.Richard W.M. Jones2011-08-191-1/+1
|
* Include ext4 module in the initrd.Richard W.M. Jones2011-08-121-1/+2
| | | | | | | | 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).
* helper: Allow kernel and modpath to be selected from envvars (RHBZ#671082).Richard W.M. Jones2011-07-224-0/+112
|
* helper: create_kernel_archlinux should return const char *Richard W.M. Jones2011-07-221-2/+2
|
* helper: Move all_files down function.Richard W.M. Jones2011-07-221-2/+1
| | | | This is just code tidy-up.
* helper: Fix error message when modules.dep is not found.Richard W.M. Jones2011-06-061-1/+1
|
* febootstrap/helper: Major change to kernel module handling codeHilko Bengen2011-06-061-108/+112
| | | | | | | | | | | | 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.
* febootstrap/helper/init: Add translations for errnoHilko Bengen2011-06-061-1/+18
|
* Fix some printf format warnings when -Wall is enabled.Richard W.M. Jones2011-06-011-2/+2
|
* febootstrap/helper/init: Mount /proc if not already present.Hilko Bengen2011-06-011-0/+20
|
* Don't require external insmod.static.Hilko Bengen2011-06-012-34/+42
| | | | | Add module loading functionality into init.c, thus making insmod.static unnecessary.
* Force creation of /lib/modules directory.Hilko Bengen2011-06-011-0/+1
| | | | | | | | | 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.
* Check lseek return type against (off_t) -1.Daniel Berrange2011-05-271-1/+1
|
* Increase appliance container to 4 GB.Richard W.M. Jones2011-05-271-3/+3
| | | | | | 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.
* helper: Add better error messages if files too big for appliance root.Richard W.M. Jones2011-05-273-15/+26
| | | | | | | | | | | 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.
* helper: When /init fails, print some debugging information.Richard W.M. Jones2011-05-121-0/+74
|
* Force mode +x on insmod.static binary (RHBZ#666880).Richard W.M. Jones2011-05-121-0/+6
|
* helper: Change to root directory before running find command.Richard W.M. Jones2011-04-271-1/+13
|
* helper: Don't fail if objects are created in a symlinked dir (RHBZ#698089).Richard W.M. Jones2011-04-201-0/+14
|
* Link init with '-static' instead of '-all-static'.Richard W.M. Jones2011-03-141-1/+1
| | | | | | | | | | | | 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)
* helper: Add support for ArchLinux kernels.Richard W.M. Jones2010-12-121-0/+60
| | | | | ArchLinux doesn't use the ordinary Linux kernel naming scheme. (Thanks Thomas S Hatch for helping to diagnose the issue)
* helper: Ignore times of special files when calculating checksum.Richard W.M. Jones2010-12-111-4/+5
| | | | | Variation in the times of /dev/ptmx was causing the appliance to be rebuilt too frequently.
* helper: Remove refs in docs to old manual pages.Richard W.M. Jones2010-12-071-9/+2
|
* Add HTML documentation to the public website.Richard W.M. Jones2010-12-071-0/+11
|
* configure: Check for insmod.static and fail if not present.Richard W.M. Jones2010-12-061-2/+2
| | | | | This is not packaged on Debian/Ubuntu, but we require it. Fail with a useful error message if it is not available.
* Rewrite febootstrap as a general supermin appliance building tool.3.0Richard W.M. Jones2010-12-051-6/+3
| | | | | | | | | | | | | | 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).
* ext2: Fix "ext2fs_mkdir .. No free space in directory".Richard W.M. Jones2010-11-251-3/+13
| | | | | | | | | 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.
* elf-default-arch should exit with an error if it fails.Richard W.M. Jones2010-11-061-0/+1
|
* Fix elf-default-arch for ppc and ppc64.Richard W.M. Jones2010-11-061-0/+2
|
* main should return intRichard W.M. Jones2010-11-061-1/+1
|
* RHEL 5: Don't pass BLOCK_FLAG_READ_ONLY to ext2_block_iterate if not defined.Richard W.M. Jones2010-11-061-2/+12
|
* Add -u and -g options to febootstrap-supermin-helperMatthew Booth2010-10-282-3/+126
| | | | | | | | | | | | | 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.
* Send usage output to stdout or stderr depending on context.Matthew Booth2010-10-011-4/+5
| | | | | 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.
* Fix elf-default-arch detection to work on secondary archs (RHBZ#634951)Dan HorĂ¡k2010-09-172-4/+7
| | | | | | | 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
* helper: Ignore editor backup (*~) files.Richard Jones2010-08-271-0/+5
|
* helper: Visit directory entries in order.Richard Jones2010-08-271-9/+31
| | | | | | | | | | | | | | | | | | | | 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
* Add -f checksum mode to allow caching of appliances.Richard Jones2010-08-249-30/+178
|
* Implement ext2 output module.Richard Jones2010-08-248-10/+1352
|