Commit Graph

272 Commits

Author SHA1 Message Date
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
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
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
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
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
Martin Gracik
19f60aebc8 use reqs not regs for files to backup (dgilmore) 2011-04-15 15:46:06 +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
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
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
872d0d6ffa Generate ssh keys on s390 2011-03-28 13:14:37 +02:00
Martin Gracik
c47c9d5520 Do not check if we have all commands 2011-03-23 14:15:15 +01:00
Martin Gracik
c8a52d628a Change location of addrsize and mk-s390-cdboot 2011-03-23 14:07:58 +01:00
Martin Gracik
b50f1cb802 Shutdown is in another location 2011-03-23 14:07:26 +01:00
Martin Gracik
2a0dcf846f Do not skip broken packages 2011-03-23 14:06:33 +01:00
Martin Gracik
05fd600885 Wait for subprocess to finish 2011-03-23 09:22:39 +01:00