Commit Graph

407 Commits

Author SHA1 Message Date
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
Will Woods
ad25ae85cb mkefiboot: clarify construction of dm partition dev 2011-08-30 13:10:58 -04:00
Will Woods
df3bc79574 tweak umask for imgutils' mkdosimg 2011-08-29 17:10:58 -04:00
Will Woods
8a8ec59b75 add mkhfsimg to imgutils 2011-08-29 17:10:20 -04:00
Will Woods
e756e57b5d add "livenet" module to initramfs 2011-08-29 15:08:06 -04:00
Will Woods
ea31f4f23b add --noprefix to dracut invocation
--noprefix is the default, but fedora ships an /etc/dracut.conf that
changes the prefix. Set --noprefix to override this.

Discussed here:
https://www.redhat.com/archives/anaconda-devel-list/2011-August/msg00234.html
2011-08-29 13:23:20 -04:00
Will Woods
a6ea3d3747 add pkgsizes listings, and move debugging data to logdir 2011-08-09 20:01:31 -04:00
Will Woods
4f7584fe09 move pkglists to RuntimeBuilder and disable if not debugging 2011-08-09 17:59:57 -04:00
Will Woods
3153bdfa8a save debug setting as self.debug 2011-08-09 17:59:04 -04:00
Will Woods
76a7c2008a rb.postinstall(): don't allow configdir override
Since the templates need to match the contents of the configdir, it
doesn't really make sense to allow configdir to be different from
templatedir.
2011-08-08 19:03:53 -04:00
Will Woods
916402b023 handle templatedir more cleanly in ltmpl/treebuilder
make sure that runner.templatedir gets set to a useful default if
initialized with None, and and make sure we pass templatedir to
LoraxTemplateRunner.__init__ (so it'll get initialized properly)
2011-08-08 19:01:38 -04:00
Will Woods
297a572069 copy config_dir into root, rather than linking
workdir might be on a different device, and then hardlinks fail
2011-08-05 17:25:08 -04:00
Will Woods
9f6393c58e better logging for removepkg/removefrom
emit a useful log message if we attempt to removepkg something that
isn't installed, or if a glob used in a removefrom line matches no
files.

this will help us keep the templates cleaner.
2011-08-01 17:24:20 -04:00
Will Woods
52f7c5d37f fixup for bcj NameError 2011-07-22 16:59:56 -04:00
Will Woods
3099c0a44d Configurable compression type/speed/bcj use
* add bcj arch dict to ArchData
* add "compression" settings back to __init__.py
* pass them to treebuilder.create_runtime
* pass them through to imgutils.mksquashfs
2011-07-20 16:51:27 -04:00
Will Woods
7f087ead73 imgutils: allow mksquashfs to use its default compression 2011-07-20 16:42:06 -04:00
Will Woods
8f9f9944fe Use pungi's installroot rather than making our own (#722481)
Apparently messing with the installroot causes some serious problems
with yum, so.. don't do that.
2011-07-19 12:26:13 -04:00
Will Woods
6c7709e592 Don't install/start plymouth in the initramfs 2011-07-07 19:10:12 -04:00
Will Woods
497f63a041 debugging: write out dirnames as well as filenames in pkglist/ 2011-07-06 19:36:42 -04:00
Will Woods
f5164d6460 ltmpl: do brace expansion on the entire template
Handle brace expansion while parsing the template rather than
individually per-command. This is closer to how bash does things anyway.
2011-07-06 18:02:20 -04:00
Will Woods
d61ae8c1e6 fixup - correctly detect F15 builds
Yeah, for F16 you need to do "version > 15", not ">= 15". Oops.
Also, check product.version before using anaconda_dracut_hack().
2011-07-06 17:17:40 -04:00
Will Woods
ba686350ef Revive code/hacks for building F15 images
To build F15 images we need to remove systemd and set up loader as init
(see runtime-cleanup and runtime-postinstall).

We also need to add a hack to dracut so loader won't freak out when it
gets started by anaconda - see the file we're adding to the initramfs in
treebuilder.py.

(There's also an extra bonus hack for working around a bug in dracut if
/proc/cmdline is empty - SEE IF YOU CAN SPOT IT!!!)
2011-07-06 13:07:21 -04:00
Will Woods
51060f07f6 hacklet to hush dracut warnings about /proc/modules
We just touch ${inroot}/proc/modules before the chroot, and remove it
afterward.
2011-07-06 12:22:49 -04:00
Will Woods
5c0095cdc8 fixup: self.basearch, not basearch 2011-07-05 13:40:48 -04:00
Will Woods
fc6030edaa Fix libdir to match basearch (not buildarch), use getBaseArch
Let's let yum handle the magic of figuring out what basearch is. And
since basearch will match userspace, libdir should match basearch.

This fixes stuff on pre-F16 ppc64 (where basearch is ppc and thus has a
different libdir).
2011-07-05 13:32:48 -04:00
Will Woods
59b33150aa generate_module_data needs to happen before cleanup 2011-07-01 16:30:07 -04:00
Will Woods
d636b82783 Move generate_module_data before create_runtime
module-info and the updated depmod stuff need to be inside the runtime
image, so this needs to happen before create_runtime. Accordingly,
generate_module_data gets moved to RuntimeBuilder.
2011-07-01 15:44:11 -04:00
Will Woods
a8f627faab module-info fix: first line must be "Version 0" 2011-07-01 14:41:13 -04:00
Will Woods
446c45c8e5 fix path for module-info (should be /lib/modules/module-info) 2011-07-01 14:07:06 -04:00
Will Woods
41ca62d30b fixup: runner->_runner 2011-06-30 18:13:24 -04:00
Will Woods
416b7eef57 make glob() in templates return a list 2011-06-30 17:54:02 -04:00
Will Woods
2e8d5c78b8 move template 'exists' and 'glob' to self.builtins
otherwise, assigning to runner.defaults clobbers them. oops.
2011-06-30 16:59:55 -04:00
Will Woods
5cb7371cdf treebuilder refactor: rearrange functions to be easier to read 2011-06-30 13:40:26 -04:00
Will Woods
b39d90c688 Move LoraxTemplateRunner (and helpers) to ltmpl 2011-06-30 13:24:07 -04:00