Commit Graph

440 Commits

Author SHA1 Message Date
Brian C. Lane
607bd49ed7 livemedia-creator: update TreeBuilder use for isolabel
TreeBuilder class changed its __init__ so add --volid switch,
length check and isolabel.
2012-03-08 10:01:18 -08:00
Brian C. Lane
3a5fb1415c livemedia-creator: console=ttyS0 not /dev/ttyS0 2012-03-02 16:41:27 -08:00
Brian C. Lane
69c14b8f84 livemedia-creator: Add support for making ami images
AMI images are un-partitioned filesystem images with a grub.conf that
is read by the pv-grub bootloader used by EC2. Most of the actual work
making the AMI is done in the kickstart. This just creates the image
file.
2012-03-02 16:41:27 -08:00
Martin Gracik
524dfa28db Check if the volume id is not longer than 32 chars (#786832)
This is a requirement of mkisofs.
Try to check it as soon as possible.
2012-02-28 12:50:34 +01:00
Martin Gracik
20fa29b32b Add option to specify volume id on command line (#786834) 2012-02-28 12:50:34 +01:00
Martin Gracik
84c56294bf Change the locale to C (#786833) 2012-02-28 12:50:34 +01:00
Will Woods
dcc6a41a31 use --prefix=/run/initramfs when building initramfs
Having the initramfs at /run/initramfs means that it will be retained at
/run/initramfs once we switch to the root image. We want that.
2012-02-20 14:16:52 -08:00
Brian C. Lane
ac6512a531 Fix missing CalledProcessError import 2012-02-17 08:32:00 -08:00
Martin Gracik
d26c41fee6 Add runtime basename variable to the template
Related: rhbz#782108
2012-02-09 16:27:51 +01:00
Dan Horák
17179f2120 use internal implementation of the addrsize utility
Anaconda dropped the addrsize utility in F-16, so we need to implement
it directly in lorax.
2012-02-09 14:08:56 +01:00
Brian C. Lane
a09806f607 Add dracut convertfs module (#787893)
Fedora 17 changes top level directories like /bin, /lib, etc. to
symlinks to the corresponding dirs in /usr/

dracut can convert old systems to the new layout using its convertfs
module.
2012-02-08 14:55:40 -08:00
Tim Flink
504cc236b1 changing hfs to hfsplus so that the correct mkfs binary is called 2012-02-07 17:27:27 -05:00
Brian C. Lane
0ba566aebe update lorax and livemedia_creator to use isfinal 2012-01-30 11:02:56 -08:00
Brian C. Lane
2af864c438 lorax: copy kickstarts into sysroot (#743135)
The installer no longer has access to the initrd's root. We need to
copy any needed files over to /sysroot before switching root. This
copies *.cfg and *.ks files.

It also adds the ability to add dracut hook scripts to the initramfs
from /usr/share/lorax/dracut_hooks/

This re-adds commit af6d4e2c50 which was
lost during the switch to the treebuilder branch.
2012-01-25 21:59:48 -08:00
Brian C. Lane
befdc218ac livemedia-creator: Mount iso if rootfs is LiveOS
In the latest method for booting the rootfs is in the LiveOS
directory of the media, not appended to the initrd. Detect this
and mount the iso and pass the CDLABEL to virt-install.
2012-01-25 17:23:25 -08:00
Martin Gracik
681f67f954 Log output of failed command
If we run a command from template with runcmd,
log it's output if it exits with non-zero return code.
2012-01-19 18:13:03 +01:00
Martin Gracik
1bbc546147 Allow specifying buildarch on the command line (#771382)
Some repos may contain anaconda packages for more architectures,
so it's not possible to get the right buildarch.
This patch allows optional specifying of the buildarch on the
command line when running lorax.
If the buildarch is not specified manually, lorax tries to get
it from the anaconda package as before.
If there's no anaconda package in the repository, don't fallback
to the system architecture and continue, because this is pointless.
We need the anaconda package.
2012-01-10 09:34:01 +01:00
Will Woods
5e411b09c0 consider %ghost files part of the filelists in templates
When considering a package's filelist (e.g. for things like removefrom
--allbut), we might need to also include the %ghost files, so make
_filelist() add them to its returned list.
2012-01-05 16:15:54 -05:00
Brian C. Lane
b41ab87427 lorax: Add option to exclude packages
Sometimes the repos you are using have broken deps. Now you
can exclude packages with -e or --excludepkgs
2012-01-04 13:39:12 -08:00
root
dc815d10fb better debug, handle relative output paths 2012-01-03 16:32:50 -08:00
Brian C. Lane
a98134b316 lorax: check for output directory early and quit 2011-12-20 17:48:45 -08:00
Brian C. Lane
10acb5e5b9 lorax: Add --proxy command 2011-12-20 17:48:44 -08:00
Brian C. Lane
0434b7d47a lorax: add --config option 2011-12-20 17:48:44 -08:00
Brian C. Lane
7149adee25 Add no-virt mode to livemedia-creator
This runs anaconda directly, using the --image install feature. The host
system should be the same release as the target system in order to avoid
unexpected problems.
2011-12-20 14:59:58 -08:00
Brian C. Lane
f65849d87c Add livemedia-creator
livemedia-creator uses an anaconda install media iso to install to a
file image. virt-install is used to execute the kickstart. lorax is used
to post-process the image file and create a bootable .iso from it.

Future additions will allow creation of EC2 images and output xml
details about the install.
2011-12-20 14:59:57 -08:00
Brian C. Lane
7d1b7b4cc8 Allow a None to be passed as size to create_runtime
This is so that imgutils.mkext4img can dynamically calculate the size of
the image.
2011-12-20 14:59:57 -08:00
Brian C. Lane
035d49628c Add execWith utils from anaconda
The anaconda execWithRedirect and execWithCapture functions are too
useful not to include. They also allow you to log all the execuatable's
output to a logfile. Added them under executils.py module which uses
the pylorax and a new program logger.
2011-12-20 14:59:57 -08:00
Brian C. Lane
d6280b9cf0 Changes needed for livecd creation
Allow passing of size to create_runtime, add PartitionMount context
to use kpartx to mount partitioned file images. Add resetting the
selinux context on the newly created rootfs.
2011-12-20 14:59:57 -08:00
Brian C. Lane
c089b479f1 dracut has moved to /usr/bin 2011-12-20 15:01:52 -05:00
Will Woods
c8f06bd8ff ltmpl: be more careful about checking command names 2011-11-04 13:41:10 -04:00
Will Woods
bcc6f91f73 imgutils: reduce default overhead to 128 blocks
generally we don't need ~4MB extra space.
2011-11-01 15:58:09 -04:00
Will Woods
7ea8baeae3 fix mkmacboot truncating the output file
Use open(imgfile, 'r+b'), not 'wb'. Duh.
2011-11-01 13:35:24 -04:00
Will Woods
417fdf93cc mkefiboot: add comment about where the number 17408 comes from 2011-10-31 15:02:02 -04:00
Will Woods
dfa7742a6d default to fatalerrors=True in LoraxTemplateRunner
This means that any (non-ignored) command error will cause lorax to
exit.

Do note, however, that some commands (e.g. remove, installpkg) don't
raise exceptions and therefore will not cause lorax to exit.
2011-10-26 13:09:50 -04:00
Will Woods
0e64f08ff8 Add '-cmd' syntax to ignore errors, drop copyif/moveif
Makefile-style "-cmd" syntax lets us run a command and ignore any
resulting errors. This is a more general version of what copyif/moveif
were trying to accomplish, so we can drop those commands.
2011-10-26 13:08:39 -04:00
Will Woods
0fd48ba936 fix typo in mkefiboot's macbless() 2011-10-25 17:23:24 -04:00
Will Woods
305476eefe add comment about symlink root-escape problem 2011-10-25 16:19:23 -04:00
Will Woods
87eef3ff00 mkefiboot: use argparse, improve --help output 2011-10-25 16:04:09 -04:00
Will Woods
cd1225c5fb minor comment cleanups 2011-10-24 16:27:36 -04:00
Martin Gracik
73fc20b165 Write the lorax verion in the .buildstamp (#689697)
(cherry picked from commit 4271e0fc02)

Conflicts:
	src/pylorax/buildstamp.py

Signed-off-by: Will Woods <wwoods@redhat.com>
2011-10-24 16:07:25 -04:00
Will Woods
55b4b06268 treebuilder cleanup: remove hack for Fedora <= 15 2011-10-12 20:24:21 -04:00
Will Woods
f640a2faab Use a predictable ISO Volume Label (#732298)
New images find their root device by looking at the CDLABEL. Since pungi
is building ISO images separately from lorax, if it uses a different ISO
Volume Label we'll end up with unbootable images.

This changes the volume labels to match what pungi uses, so both should
boot OK.
2011-10-12 20:21:06 -04:00
Will Woods
b7269da23a Fix is_beta -> isfinal and add [Compose] to .buildstamp 2011-09-21 23:46:48 -04:00
Will Woods
262a05e539 ltmpl: continue loop if installpkg can't find something
Otherwise, something like:
  installpkg missing-thingy kernel kernel-firmware
will leave you without a kernel.
2011-09-15 19:27:31 -04:00
Will Woods
318c843e37 ltmpl: improve exception handling/reporting
- Log the error message (and the line causing the error) to console
- Log the whole exception (with some excess junk removed) to debuglog
- don't immediately SystemExit if the template won't parse
- clean up some comments
2011-09-15 19:24:35 -04:00
Will Woods
473f01c696 Add docstrings for the ltmpl commands in LoraxTemplateRunner 2011-09-14 18:33:30 -04:00
Will Woods
9699e25045 imgutils: make do_graft work for files too
This is needed to make --icon work in mkefiboot
2011-09-07 12:06:48 -04:00
Will Woods
3ec9a12bf6 fixups for Apple EFI support in mkefiboot
- actually import glob
- forgot quotes on 'if opt.imgtype == "apple"'
2011-09-07 12:05:29 -04:00
Will Woods
8aba809aa7 Add --apple and --icon to mkefiboot
This adds support for Apple EFI images to mkefiboot. Ported from work on
the master branch by Matthew Garrett <mjg59@srcf.ucam.org>.
2011-09-06 12:46:41 -04:00
Will Woods
faafd04dcb add '--allbut' flag to 'removefrom'
This lets us easily do whitelisting instead of blacklisting during
runtime cleanup. For example:
 removefrom xfsprogs --allbut /sbin/* /usr/sbin/xfs_admin
would remove everything from the xfsprogs package except files in /sbin
and /usr/sbin/xfs_admin.

A few things in runtime-cleanup have been converted to use --allbut. The
only difference in the created runtime image is that we're deleting
/usr/share/kde4 from fedora-logos.
2011-08-31 19:40:20 -04:00