Commit Graph

427 Commits

Author SHA1 Message Date
Will Woods
c4435b504a __init__ create_runtime fixup (correct paths) 2011-05-12 17:32:43 -04:00
Will Woods
cd59bbc1f3 drop efidisk.img from boot.iso on x86 2011-05-12 17:32:03 -04:00
Will Woods
1a9a83c393 img building fixup: show mksquashfs progress 2011-05-12 17:32:03 -04:00
Will Woods
72a3958a38 imgutils estimate_size fixups
count directories in estimate
msdos blocksize is 2048
round_to_blocksize rounds 0 -> blocksize
pass graft to estimate_size so we don't repeat overhead
2011-05-12 17:32:03 -04:00
Will Woods
8f45d48562 remove redundant treeinfo log message in __init__ 2011-05-12 17:32:03 -04:00
Will Woods
fa36b808d0 treebuilder fixup: remove unneeded log msg in runcmd 2011-05-12 17:32:03 -04:00
Will Woods
a66c877949 imgutils fixup: 512kb default overhead for vfat 2011-05-12 17:32:03 -04:00
Will Woods
18279ba4c5 fix EFI path 2011-05-12 17:32:03 -04:00
Will Woods
fab2a091bc treebuilder fixup: fix argument order in replace() 2011-05-12 17:32:03 -04:00
Will Woods
f4107c632d treebuilder fixup: outroot, not outputdir 2011-05-12 17:32:03 -04:00
Will Woods
ba8e7e6945 x86.tmpl/efi.tmpl fixups
fix initrd hardlink
splash.xml.gz should be splash.xpm.gz
fix mkisofs args
actually replace vars in isolinux.cfg
2011-05-12 17:31:20 -04:00
Will Woods
e77f142847 fix _glob and template glob() 2011-05-12 17:29:01 -04:00
Will Woods
b6a0b2351c fixup: make ArchData subclass of DataHolder 2011-05-12 17:29:01 -04:00
Will Woods
77f1ec738c treebuilder fix implantisomd5() 2011-05-12 17:29:01 -04:00
Will Woods
d4813816b7 treebuilder fixups: add _glob, use it in _exists, replace, install 2011-05-12 17:29:01 -04:00
Will Woods
d2203b348d fixup for hardlink() 2011-05-12 17:29:01 -04:00
Will Woods
4c91ef5f53 fixup: heh whoops, really fix replace 2011-05-12 17:29:01 -04:00
Will Woods
796659bb29 fixup for creating treeinfo from treebuilder 2011-05-12 17:29:01 -04:00
Will Woods
17c81d12d7 treebuilder fixups: fix replace, glob() for templates, etc.
"from glob import glob" instead of "import glob"
rename args to BaseBuilder.runtemplate
set up 'exists' and 'glob' in runtemplate rather than getdefaults
2011-05-12 17:29:01 -04:00
Will Woods
644e5f4b55 treeinfo fixup: fix treeinfo "instancemethod" error and hardlink() 2011-05-12 17:29:01 -04:00
Will Woods
9aa2e2c671 fixup: set templatedir for TreeBuilder in __init__ 2011-05-12 17:29:01 -04:00
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