Martin Gracik
4d3393b152
Remove old install.img if it already exists
2010-02-26 10:51:58 +01:00
Martin Gracik
1b6e55d528
Don't create our own yum cache dir
2010-02-26 10:49:51 +01:00
Martin Gracik
438d73b51a
Fix an error when creating the lib directory
2010-02-25 20:43:06 +01:00
Martin Gracik
d13f13e92f
Make sure we create the usr/lib directory
2010-02-25 20:26:54 +01:00
Martin Gracik
1a3d76fc5b
Create the libdir in the initrd tree
...
Make sure we have the libdir created before we copy
the files to the initrd tree.
2010-02-25 20:05:13 +01:00
Martin Gracik
ad726c68ec
Fix a bug in SmartCopy when printing an error message
2010-02-25 19:36:20 +01:00
Martin Gracik
18ad481067
Improve the error messages in SmartCopy
2010-02-25 19:14:24 +01:00
Martin Gracik
0accac20a7
Don't use our own yum cache
2010-02-25 18:54:43 +01:00
Martin Gracik
a3d550952a
Fix the regexp for matching the ld_linux executable.
...
Remove the double quotes from the resulting match object,
if there is more than one ld_linux file specified.
2010-02-25 18:09:56 +01:00
Martin Gracik
79222bab6c
Fix searching for ld_linux executable on 64 bit machines
...
On some machines we can have more ld_linux executables specified
in /usr/bin/ldd file. This patch fixes how we search for the file.
2010-02-25 17:59:49 +01:00
Martin Gracik
4c34d98661
Changed the regexpt to match kernel files containing "_"
2010-02-25 17:06:28 +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
d8e07aeac0
Check if the anaconda stub file exists before we try to copy it
2010-02-24 20:48:46 +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
88969ae0db
Don't print the template filename and line number in error messages.
...
The template filename and line number do not correspond to the filename
and line number of the actual template files, because they are
representing the dynamically rendered template, not the text files
on the disk, so printing it out, when an error occurs, may be misleading.
2010-02-24 09:19:53 +01:00
Martin Gracik
a4c638f132
New version
2010-02-23 14:20:05 +01:00
Martin Gracik
492037c54b
Fixed filename changes
2010-01-15 13:30:23 +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
2c6d450c58
Added some scrubs in the tree scrubs template
2009-10-21 16:57:27 +02:00
Martin Gracik
054bdbf929
Added some directories to remove to scrubs template file
2009-10-21 14:24:34 +02:00
Martin Gracik
32c635c387
Remove unnecessary code
2009-10-21 13:59:49 +02:00
Martin Gracik
b028a210a5
Use a template system for tree scrubbing
2009-10-21 13:56:46 +02:00
Martin Gracik
69c69d0e13
Fix broken links after moving the bin and sbin directories
2009-10-21 12:56:05 +02:00
Martin Gracik
551647a017
Move bin and sbin to usr
2009-10-21 10:11:42 +02:00
Martin Gracik
609a57c491
Added code for alpha images
2009-10-13 13:22:44 +02:00
Martin Gracik
2742bd1897
Fixed the stage2 line in isolinux config for RHEL
2009-10-02 15:48:14 +02:00
Martin Gracik
56de80c38a
Added code for creating s390 images
2009-09-30 13:02:40 +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
6a6be7ef01
Added an output class, which will be used for output control and
...
formatting
2009-09-09 15:20:17 +02:00
Martin Gracik
7f28c28e6f
Some small fixes
2009-09-09 12:43:00 +02:00
Martin Gracik
44ce6ea3e0
Fixed the including of firmware files in the initrd image
2009-09-08 14:01:27 +02:00
Martin Gracik
b0b61b17a0
Corrected the automatic getting of dynamic libraries
2009-09-08 10:11:06 +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
3325611694
Added modules and their dependencies to initrd.img
2009-07-23 15:10:55 +02:00
Martin Gracik
8fd23eca0b
Added support for including files in templates.
...
Also added support for breaking lines with \ at the end.
2009-06-11 14:26:54 +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
010f7e5f88
destdir -> self.destdir in InstRoot.__scrubInstRoot()
2008-10-09 22:09:41 -10:00
David Cantrell
f558cfa7f0
Call run() method once we create InstRoot.
2008-10-09 21:56:56 -10:00
David Cantrell
c39d130b60
Create a run() method for InstRoot and call private methods correctly.
2008-10-09 21:56:23 -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
291bf4492a
More fixes for importing Lorax.
2008-10-09 21:48:46 -10:00
David Cantrell
3377bc22e4
Reference the conf has in Lorax rather than globally.
2008-10-09 21:46:41 -10:00
David Cantrell
1df9b5beaa
Receive the conf hash as a parameter, do not import pylorax.
2008-10-09 21:44:34 -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
62b02037a0
Import glob in instroot.py
2008-10-08 15:28:47 -10:00
David Cantrell
e5383426f8
Only make directories if they don't exist.
2008-10-08 15:22:39 -10:00
David Cantrell
5f64fd8fd1
Do not make symlinks if dest files exist.
2008-10-08 14:58:56 -10:00
David Cantrell
6ec042a9ab
Do not print out locale names.
2008-10-08 14:45:57 -10:00
David Cantrell
7b75b130c7
Pass arch to scrubInstRoot().
2008-10-08 14:34:33 -10:00
David Cantrell
7d513f07ed
This isn't shell.
2008-10-08 14:06:23 -10:00
David Cantrell
9cbe781122
Expand scrubInstRoot() to copy boot loader files and prune locales.
...
Remove locales not used in anaconda. Copy boot loader files from
/boot to /usr/lib/anaconda-runtime/boot so they can be used by
anaconda. Also copy over anaconda stub programs to /usr/bin and
do a few other housekeeping tasks.
2008-10-08 13:47:36 -10:00
David Cantrell
0b0872c296
More debugging output in instroot.
2008-10-06 21:48:19 -10:00
David Cantrell
b7ef76ef53
Fix gtk-icon-theme-name loop and add debugging messages.
...
Correctly collect gtk-icon-theme-names for saving. Add some debug
output to scrubInstRoot() so we can see the different steps.
2008-10-06 20:50:51 -10:00
David Cantrell
77684f0271
Remove extra space in output.
2008-10-05 15:43:09 -10:00
David Cantrell
e666948409
Pass libdir scrubInstRoot().
2008-10-05 15:42:26 -10:00
David Cantrell
3c1d9ebf37
ignore_error -> ignore_errors
2008-10-05 15:34:27 -10:00
David Cantrell
82649959a4
Add missing close paren.
2008-10-05 15:17:21 -10:00
David Cantrell
6883d1114f
import shutil
2008-10-05 15:10:41 -10:00
David Cantrell
230bcee79b
Add some more signal output.
2008-10-05 15:08:38 -10:00
David Cantrell
90e58c56ab
Started the scrubInstRoot() function in instroot.py.
...
The scrubInstRoot() function will do a large part of the work
previously done by upd-instroot.
2008-10-05 14:32:41 -10:00
David Cantrell
21ff7ce04b
Define default datadir location as /usr/share/lorax.
2008-10-05 13:08:10 -10:00
David Cantrell
5ef8b9eafb
Add some banner messages explaining the major steps of lorax.
2008-10-04 21:53:13 -10:00
David Cantrell
57c97b576c
Do prep work before letting yum lay down packages.
...
Create some directories and symlinks like upd-instroot does before
calling yum.
2008-10-04 21:48:18 -10:00
David Cantrell
e39a759cf1
Return True after yummain runs.
...
Capture the errcode returned, but don't do anything for now. It's
probably likely that yummain will always fail according to it
because our instroot won't have everything in place that scriplets
need to run. But scriptlets are supposed to always exit with
success, so I dunno.
2008-10-04 21:38:20 -10:00
David Cantrell
6bac20bb66
Make cleanup optional.
2008-10-04 21:35:03 -10:00
David Cantrell
8c9f73974e
anaconda -> lorax
2008-10-04 21:33:03 -10:00
David Cantrell
508e074126
Do not automatically pass '-v' to yummain.
2008-10-04 21:31:41 -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
e6aebb1c3d
sort() is an inplace operation on lists, correct other errors in instroot.py.
...
sort() is inplace for lists, so it doesn't return the sorted list.
Make sure to strip each line read from the packages* files. In the
installPackages() function, concat the packages list on to the
arglist because that's what yummain is expecting.
2008-10-04 20:52:17 -10:00
David Cantrell
725305dd9c
Correct typo and use os.path.join() in instroot.py.
...
It's packages_files, not packages_file.
2008-10-04 20:34:37 -10:00
David Cantrell
1ad8929ba8
'import os' in instroot.py.
2008-10-04 20:32:03 -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
649e87ae5f
Use correct parameter initializers in installPackages()
...
Init named parameters to None rather than other variables (copy and
paste gets me again).
2008-10-04 20:22:12 -10:00
David Cantrell
e85f18bb5b
Rename lorax.py to lorax.
2008-10-04 19:50:56 -10:00
David Cantrell
9c3e0a79af
Move code in to the src/ subdirectory.
2008-10-04 19:45:34 -10:00