Commit Graph

406 Commits

Author SHA1 Message Date
Will Woods
411bea7d4e treebuilder fixup: use directories param for LoraxTemplate 2011-05-12 17:29:01 -04:00
Will Woods
a15c5ded9c Add "directories=[]" param to LoraxTemplate 2011-05-12 17:29:01 -04:00
Will Woods
4343b12fc0 mkefiboot fixups (fix imports, mkdosimg, add to setup.py) 2011-05-12 17:28:53 -04:00
Will Woods
10a91e5c85 fix runtemplate invocation of getdefaults() 2011-05-12 17:28:53 -04:00
Will Woods
96ce44708d fixup: correct argument signature for initrd_append 2011-05-12 17:28:53 -04:00
Will Woods
c7c01667d6 fixup: add xz to ramdisk.tmpl for treebuilder 2011-05-12 17:28:53 -04:00
Will Woods
e7a89f6eeb __init__ cleanup: remove unneeded imports (subprocess, glob, math) 2011-05-12 17:28:53 -04:00
Will Woods
79f2a8e663 __init__ treebuilder fixup: yes, we need to backup installtree 2011-05-12 17:28:53 -04:00
Will Woods
b436479f97 Add linktree(src, dst) to sysutils 2011-05-12 17:28:53 -04:00
Will Woods
5e242925ec treebuilder fixup: update comments, import re 2011-05-12 17:28:53 -04:00
Will Woods
0a2df6bda9 fixup: instantiate TreeBuilder correctly 2011-05-12 17:28:53 -04:00
Will Woods
4cc05f995b fixup: import Treebuilder in __init__.py 2011-05-12 17:28:53 -04:00
Will Woods
cd684d2b3d fixup: add remove to sysutils.__all__ 2011-05-12 17:28:53 -04:00
Will Woods
984185be0c WIP: port ramdisk.ltmpl and installtree to TemplateRunner 2011-05-12 17:28:52 -04:00
Will Woods
1fe66c1d06 WIP: add TODO 2011-05-09 15:33:55 -04:00
Will Woods
bd1fd1e139 Create runtime using imgutils and merge it with initramfs 2011-05-09 15:33:55 -04:00
Will Woods
3d5a3edb67 Replace images with treebuilder 2011-05-09 15:33:55 -04:00
Will Woods
a5b7ac5e6e installtree: remove workdir and kernels
Since we want all the modules in the runtime image, there's no need
to deal with the individual kernels. And workdir was only being used
to mess with the modules, so we don't need that either.
2011-05-09 15:33:55 -04:00
Will Woods
756b44948e Remove workdir/path from BuildStamp, DiscInfo, TreeInfo
This allows us to create these objects without needing workdir,
which means we can use them outside of __init__.py.

We can also write them directly to their final destination
instead of writing them to the workdir and then copying them in.
2011-05-09 15:33:55 -04:00
Will Woods
9b9f021caf Move arch-specific logic out of installtree
Any decisions about arch-specific stuff should happen in the Lorax class
or the arch-specific templates/code. Move that logic up to Lorax.run()
and remove installtree.basearch.
2011-05-09 15:33:55 -04:00
Will Woods
051af505ae refactor: move big code chunks from Lorax.run to installtree
Move package removal code to installtree.remove_package and
the module install loop to installtree.install_kernel_modules.
2011-05-09 15:33:55 -04:00
Will Woods
a82da40015 Add "getdata" method to LoraxTemplate
getdata(cmd) will return a generator that yields every token on every
line that starts with the token "cmd". getdata(cmd, mode="lines") will
yield a list for each line rather than every individual token.

this simplifies some things in __init__.py.
2011-05-09 15:33:55 -04:00
Will Woods
b186317213 Make Lorax.arch and Lorax.product into objects
arch has three attributes: .buildarch, .basearch, and .libdir
product has six: .name, .version, .release, .variant, .bugurl, and
is_beta

This makes it easier to pass this data into functions/templates.
2011-05-09 15:33:54 -04:00
Will Woods
17c9c8bfaf Remove dead/commented code from __init__ and outputroot
Remove commented-out code, EFI-building code, some redundant comments,
and outputroot.
2011-05-09 15:33:54 -04:00
Will Woods
1350cd028f treebuilder.py: uses templates to create trees/images
TreeBuilder uses templates full of commands (like ramdisk.ltmpl) to
create the output tree and boot images. There are 4 arch-specific
templates, plus a bonus EFI template which can handle EFI image creation
for any arch that implements EFI.
2011-05-09 15:33:54 -04:00
Will Woods
6a5851d53b mkefiboot: make efi boot images using imgutils
This adds the new "mkefiboot" cmd, which creates an efiboot img in the
magical way that EFI requires. There doesn't seem to be a good tool for
this (unlike the existing tools for all the other weirdo boot image
types) so it was necessary to create one.
2011-05-09 15:33:54 -04:00
Will Woods
b2b1c36167 imgutils.py: utilities for creating disk images
This contains simple functions for creating disk images:
  mkcpio, mksquashfs, mkdosimg, mkext4img, mkbtrfsimg

And the helper functions they use:
  truncate, loop_{attach,detach}, dm_{attach,detach},
  mount/umount, estimate_size, roundup, cpio_copytree
2011-05-09 10:49:09 -04:00
Will Woods
1e550f8227 Add remove() to sysutils
This adds the remove() function, which works a lot like rm -rf - if you
remove() a file, it uses os.unlink, and if you remove() a directory it
uses shutils.rmtree().
2011-05-09 10:29:00 -04:00
Martin Gracik
421e4c3a00 Allow compression type be specified in lorax.conf 2011-04-22 10:57:51 +02:00
Martin Gracik
79b6e5bfa1 Use xz and gzip commands instead of libraries
We're already using find and cpio subprocesses, so using
one more subprocess is not a problem. With this approach
we can pipe cpio to the xz/gzip command, which should
help with the memory issues.
2011-04-22 10:57:51 +02:00
Chris Lumens
97d7db6780 Add the udf module to the image. 2011-04-21 10:23:21 -04:00
Ales Kozumplik
640820d90c Preserve anaconda's /usr/bin so anaconda-cleanup is in the image.
We depend on the script with restart-anaconda now.
2011-04-19 16:27:11 +02:00
Martin Gracik
f6fdb614bf Use arch macros in the lorax.spec 2011-04-15 16:01:56 +02:00
Martin Gracik
19f60aebc8 use reqs not regs for files to backup (dgilmore) 2011-04-15 15:46:06 +02:00
Martin Gracik
0ee4cc539a Reflect changes made in ntfs-3g and ntfsprogs packages (#696706) 2011-04-15 10:10:40 +02:00
Martin Gracik
713d6f94e7 getkeymaps resides in /usr/libexec/anaconda 2011-04-15 09:47:53 +02:00
Martin Gracik
4c25044020 workdir is a local variable, not a class attribute 2011-04-15 09:42:44 +02:00
Martin Gracik
06ac5762af Add sparcv9 to arch map 2011-04-13 16:14:32 +02:00
Martin Gracik
031e6bab10 Change the location of *.b files on sparc 2011-04-13 16:14:21 +02:00
Martin Gracik
747c393599 Change BuildRequires to python2-devel 2011-04-13 14:03:54 +02:00
Martin Gracik
bbd01f9e9c New version 2011-04-13 13:28:00 +02:00
Martin Gracik
62c3cfdc92 Remove pungi patch 2011-04-13 13:23:51 +02:00
Martin Gracik
0a091838d0 Remove pseudo code 2011-04-13 13:23:25 +02:00
Chris Lumens
706ac6a55c Add a /bin/login shim for use only in the installation environment. 2011-04-12 10:36:16 -04:00
Chris Lumens
7abab358a4 Set the hostname from a config file, not programmatically. 2011-04-12 10:36:15 -04:00
Chris Lumens
b58190d660 Add systemd and agetty to the installation environment.
Also, set up anaconda.target to be the default systemd unit.
2011-04-12 10:36:04 -04:00
Chris Lumens
51addbb7b4 Specify "cpio -H newc" instead of "cpio -c".
The latter does not always work with every version of cpio, so it's too
unreliable to use.
2011-04-12 10:35:02 -04:00
Martin Gracik
1009ef9df0 Provide shutdown on s390x (#694518) 2011-04-12 12:31:32 +02:00
Martin Gracik
0fa7b20ef2 Fix arch specific requires in spec file 2011-04-12 12:31:32 +02:00
Martin Gracik
f8872b78ea Add s390 modules and do some cleanup of the template 2011-03-31 10:39:44 +02:00