Will Woods
b6a0b2351c
fixup: make ArchData subclass of DataHolder
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
9aa2e2c671
fixup: set templatedir for TreeBuilder in __init__
2011-05-12 17:29:01 -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
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
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
Martin Gracik
421e4c3a00
Allow compression type be specified in lorax.conf
2011-04-22 10:57:51 +02:00
Martin Gracik
06ac5762af
Add sparcv9 to arch map
2011-04-13 16:14:32 +02:00
Martin Gracik
c47c9d5520
Do not check if we have all commands
2011-03-23 14:15:15 +01:00
Martin Gracik
84f00068e3
images dir already exists, we just need to set it
2011-03-21 09:23:01 +01:00
Martin Gracik
4486889792
Create images directory in outputtree
2011-03-17 13:04:11 +01:00
Martin Gracik
8ed6ac4d7b
Create efibootdir if doing efi images
2011-03-17 11:03:22 +01:00
Ales Kozumplik
f851fc4636
Get rid of create_gconf().
...
We do what create_gconf is trying to achieve in get_config_files(). What's
more, the files in crete_gconf() end up in the root directory where
nothing can possibly use them because the root user's home is now /root.
2011-03-16 09:14:31 +01:00
Martin Gracik
5878db3e81
Use factory to get the image classes
2011-03-15 13:51:43 +01:00
Martin Gracik
98d695f9a2
Add support for ppc
...
The way we create the images had to be changed a little.
Some code had to be moved to other places, so we can create
images for other architectures too.
2011-03-14 14:01:00 +01:00
Martin Gracik
6e14df3478
Add the images-xen section to treeinfo on x86_64
2011-03-14 09:51:19 +01:00
Martin Gracik
cdff835357
Add mkdir support to template
...
Allow mkdir command in initrd template,
so we can specify directories we need
to create in install tree.
2011-01-31 20:57:07 +01:00
Martin Gracik
58d5ecf2a7
Fix file logging
2011-01-19 15:37:44 +01:00
Martin Gracik
b00b0a77c9
Use [images-xen] section for PAE and xen kernels
2011-01-17 16:29:46 +01:00
Martin Gracik
cd339589cc
Add the initd and kernel lines to .treeinfo
2011-01-09 12:50:39 +01:00
Martin Gracik
ea3df8ad20
Do not create efi images for 32 bit archs
2010-12-08 17:21:10 +01:00
Martin Gracik
f85fa1d1ed
Copy main kernel to isolinux and only others to pxeboot directory
2010-12-07 14:08:30 +01:00
Martin Gracik
bdb9b700f4
Split initrd for multiple kernels
2010-12-06 15:05:47 +01:00
Martin Gracik
688b4aa5ae
Add buildarch variable to template
2010-12-06 10:52:39 +01:00
Martin Gracik
070fbdab10
Use constant value from constants.py for fs overhead
2010-12-02 13:00:31 +01:00
Martin Gracik
55f6acb620
Fix pylint errors in __init__.py
2010-12-02 12:59:08 +01:00
Martin Gracik
d995d82ed6
Break get_isolinux() in more separate methods
2010-11-23 16:43:39 +01:00
Martin Gracik
330217e721
Add subprocess module to __init__.py
...
It got lost somewhere during the imports cleanup
2010-11-23 15:05:23 +01:00
Martin Gracik
413fc84cb3
Use kernel in outputtree when creating efi images
2010-11-23 14:38:06 +01:00
Martin Gracik
3ce70b9e49
Move kernel constants to constants.py
2010-11-23 14:25:39 +01:00
Martin Gracik
6dcc1b8666
Don't copy kernels to workdir, copy them straight to outputdir
2010-11-23 14:20:42 +01:00
Martin Gracik
4ff7d533b6
Use DataHolder instead of namedtuple for holding initrd info
2010-11-23 13:29:11 +01:00
Martin Gracik
0224cdf660
Use DataHolder instead of namedtuple for holding kernel info
2010-11-23 13:27:07 +01:00
Martin Gracik
bee1743163
Remove unneeded import from __init__.py
2010-11-23 13:12:21 +01:00
Martin Gracik
3413733661
Break up __init__.py into more modules
2010-11-23 11:14:25 +01:00
Martin Gracik
cf8fb74155
Change permissions on shadow file
2010-11-16 09:36:46 +01:00
Martin Gracik
1fd86d4a0c
Fix copying of other kernels
2010-11-12 14:24:56 +01:00
Martin Gracik
87ad91c475
Fix cleaning up of modules if we have more kernels
2010-11-12 13:00:05 +01:00
Martin Gracik
ac3d16d170
Change the way we make the gconf config
2010-11-11 13:51:04 +01:00
Martin Gracik
9a0dac3277
Add at-spi-corba entry to gconf
...
Needed for dogtail.
2010-11-11 13:37:36 +01:00
Martin Gracik
98b49cdacd
Create a separate pylorax.log file
2010-11-10 18:21:24 +01:00
Martin Gracik
e56dbed280
Don't use ConfigParser for .buildstamp
...
Anaconda is case sensitive when parsing the .buildstamp
and ConfigParser makes all the keys lowercase.
2010-11-09 16:07:44 +01:00
Martin Gracik
b1ce740a18
Setup PATH
...
Add /sbin and /usr/sbin to PATH, because when used with cron,
cron does not include it in PATH.
2010-11-09 09:46:58 +01:00
Martin Gracik
c7b4ec9df5
Add implantisomd5 execution
2010-11-08 16:50:59 +01:00
Martin Gracik
85c91cf6b2
Skip the src arch
...
Pungi returns also src packages,
so we can get a src build architecture,
which is not a usable build arch.
2010-11-08 16:09:04 +01:00
Martin Gracik
08a752551a
Print out the buildarch right after we get it
2010-11-08 15:59:38 +01:00
Martin Gracik
6925e4d3b3
Don't use quotes for gconftool arguments
2010-11-08 15:02:58 +01:00
Martin Gracik
a1d0a53aa1
Initrd tree modifications
2010-11-08 13:52:11 +01:00
Martin Gracik
3c7ad7d9ea
Write treeinfo and discinfo
2010-11-03 14:11:08 +01:00
Martin Gracik
d09c2980ec
Save list of installed packages
2010-11-03 13:40:03 +01:00
Martin Gracik
be8c2859af
Create kernel symlink
...
Don't copy kernel to isolinx and pxeboot directory.
Create hard link instead.
2010-11-02 14:11:50 +01:00
Martin Gracik
4dcdd835b0
Make initrd hard link
...
Don't copy initrd to both isolinux anx pxeboot
directory. Create a hard link in isolinux instead.
2010-11-02 14:06:55 +01:00
Martin Gracik
1a5a636e24
Remove code for creating stage2 image
2010-10-27 11:23:47 +02:00
Martin Gracik
d6998bd841
Initrd image updates
2010-10-22 16:02:53 +02:00
Martin Gracik
e22457b09a
Various initrd updates
2010-10-19 17:35:50 +02:00
Martin Gracik
45c5ef566c
Experimental single initrd image
2010-10-12 18:32:35 +02:00
Martin Gracik
8034dd06bb
Minor changes
2010-08-17 14:14:36 +02:00
Martin Gracik
15988fd5b2
Allow specifying a mask when removing package files
2010-08-12 16:27:35 +02:00
Martin Gracik
5036ff6bd8
Add support for removing whole packages
...
Remove all files from a package if removepkg <pkg>
is specified in install image template.
2010-07-29 19:04:30 +02:00
Martin Gracik
86d7b2f804
Added package methods to yum helper class
2010-07-29 14:34:30 +02:00
Martin Gracik
93d3b4e386
Fixed a typo
2010-04-07 09:40:37 +02:00
Martin Gracik
68f52749ba
Remove old boot.iso if it exists
2010-02-26 11:08:30 +01:00
Martin Gracik
4d3393b152
Remove old install.img if it already exists
2010-02-26 10:51:58 +01:00
Martin Gracik
6efaa3365c
Make sure we always have the images-xen section for x86.
...
The x86 architecture requires that we have the images-xen section
in .treeinfo even if we have no xen kernel.
2010-02-25 15:17:39 +01:00
Martin Gracik
38b6fce4e5
Make sure we have at least one kernel
...
If the only kernel we have is a PAE or xen kernel,
make sure we copy it to the isolinux directory, and create the
efi images.
2010-02-25 10:54:02 +01:00
Martin Gracik
8c147979ce
Remove the check if the output directory exists when starting lorax.
...
Pungi creates the output directory before invoking the buildinstall,
so we don't want to require that the directory does not exist.
2010-02-24 18:22:44 +01:00
Martin Gracik
a4c638f132
New version
2010-02-23 14:20:05 +01:00
Martin Gracik
9867c805d0
Added specific code for ppc images
2010-01-14 14:26:55 +01:00
Martin Gracik
7eecf20703
Added the license
2010-01-12 12:45:54 +01:00
Martin Gracik
b92113c801
Fixed the hybrid iso creation
2009-12-17 17:53:47 +01:00
Martin Gracik
b672d9936e
New version
...
Added support for Mako templates.
Changed the Lorax class to require an yumbase object as a parameter.
Changed a lot of unnecessary system calls to native python code.
Moved most of the file paths into a separate object.
The output and config objects are now singletons.
Also done a lot of code cleanup.
2009-12-15 15:26:01 +01:00
Martin Gracik
2742bd1897
Fixed the stage2 line in isolinux config for RHEL
2009-10-02 15:48:14 +02:00
Martin Gracik
d58f206122
Added some tree scrubs to the code;
2009-09-29 14:41:39 +02:00
Martin Gracik
272ec190c7
New version
...
I fixed a lot of bugs with copying files to the initrd, and getting the symlinks.
Also I moved some of the code around, to get a clearer flow.
2009-09-23 12:21:33 +02:00
Martin Gracik
7f28c28e6f
Some small fixes
2009-09-09 12:43:00 +02:00
Martin Gracik
14f98446ea
Added the nolink option to the copy command
2009-09-07 13:06:24 +02:00
Martin Gracik
3a013f56c4
Rewrote the copy function to copy also symlinks targets;
2009-09-04 13:34:04 +02:00
Martin Gracik
0301ace495
Added the GPL license to all files
2009-08-27 09:19:49 +02:00
Martin Gracik
4910deac71
Redirected the error messages output from yum; Improved the links copy
...
function;
2009-08-26 17:16:46 +02:00
Martin Gracik
1324551367
Added the functionality to create efi images and boot.iso
2009-08-25 18:26:52 +02:00
Martin Gracik
87f9575d8f
Huge commit; moved a lot of stuff around; added code for install.img
2009-08-19 16:51:32 +02:00
Martin Gracik
032438ddbc
Made some code and file cleanup.
2009-06-09 16:11:11 +02:00
Martin Gracik
1da93076b4
Moved and renamed some of the source files.
...
Improved the LDD class to search both lib and lib64 directories for libraries.
Made some small changes to fileutils and fileactions.
2009-06-08 16:54:20 +02:00
Martin Gracik
2908d5a3c4
Fixed variable replacements in template.
...
Reordered some functions calls to call yum.install() only once.
2009-06-04 17:49:49 +02:00
Martin Gracik
b0b696d66d
Wrote a templating system for initrd creation.
...
A lot of stuff got changed and rewritten. Using a different approach now, so no point of tracking changes to the older commits.
2009-06-04 15:36:56 +02:00
Martin Gracik
d3fd188841
Rewrote some parts of the source.
...
Added all functionality from upd-instroot and scrubtree.
Rewrote most of the old utils/ scripts.
2009-04-29 15:24:23 +02:00
David Cantrell
bdbf05ecd5
Move __collectRepos() call to Lorax.run()
2008-10-09 22:11:13 -10:00
David Cantrell
f558cfa7f0
Call run() method once we create InstRoot.
2008-10-09 21:56:56 -10:00
David Cantrell
2af6716ed6
Call the private methods correctly.
2008-10-09 21:54:29 -10:00
David Cantrell
4b59f9593e
Hidden methods start with two underscores.
...
Mark all private/hidden methods with two underscores at the
beginning of the name.
2008-10-09 21:52:41 -10:00
David Cantrell
979f553056
Move run() code from __init__() to run().
...
Also, the conf hash needs to referenced from self and not as a
global.
2008-10-09 21:51:45 -10:00
David Cantrell
3bd5fd4d93
Move conf hash inside Lorax and import InstRoot.
2008-10-09 21:44:06 -10:00
David Cantrell
206fee2e70
Make _writeYumConf() take the self argument.
2008-10-09 17:06:56 -10:00
David Cantrell
acbe7037d6
initializeDirs -> _initializeDirs
2008-10-09 17:05:54 -10:00
David Cantrell
81e7702393
Introduce class Lorax and class InstRoot.
...
The lorax driver program will instantiate the Lorax class, which
drives the creation of the install images. The InstRoot class is
the main object that represents the contents of the instroot
image (the tree that boot and stage2 images are made from).
2008-10-09 17:04:13 -10:00
David Cantrell
77684f0271
Remove extra space in output.
2008-10-05 15:43:09 -10:00
David Cantrell
82649959a4
Add missing close paren.
2008-10-05 15:17:21 -10:00
David Cantrell
230bcee79b
Add some more signal output.
2008-10-05 15:08:38 -10:00
David Cantrell
21ff7ce04b
Define default datadir location as /usr/share/lorax.
2008-10-05 13:08:10 -10:00
David Cantrell
8c9f73974e
anaconda -> lorax
2008-10-04 21:33:03 -10:00
David Cantrell
3ec372e546
Make the cleanup() function just remove the tmpdir location.
2008-10-04 20:59:46 -10:00
David Cantrell
fe8b541620
Make sure the yum.conf file goes to the lorax temp directory.
2008-10-04 20:57:22 -10:00
David Cantrell
eda4c740fa
Put all temp files in to the same subdirectory.
...
Use the system default temp directory (can override with TMPDIR env
var), but make a lorax subdirectory in that directory for all of the
lorax trees.
2008-10-04 20:55:42 -10:00
David Cantrell
9b1a7f2e4f
Do not try to close a file descriptor, which is an int.
2008-10-04 20:31:13 -10:00
David Cantrell
fcb8d0f1ab
Open the file descriptor returned from mkstemp().
...
We get a file descriptor as returned by os.open() when calling
tempfile.mkstemp(), so we need to pass that value to os.fdopen()
before we can write text to it (easily, anyway).
2008-10-04 20:29:59 -10:00
David Cantrell
9c3e0a79af
Move code in to the src/ subdirectory.
2008-10-04 19:45:34 -10:00