Will Woods
cd1225c5fb
minor comment cleanups
2011-10-24 16:27:36 -04:00
Martin Gracik
73fc20b165
Write the lorax verion in the .buildstamp ( #689697 )
...
(cherry picked from commit 4271e0fc02
)
Conflicts:
src/pylorax/buildstamp.py
Signed-off-by: Will Woods <wwoods@redhat.com>
2011-10-24 16:07:25 -04:00
Will Woods
55b4b06268
treebuilder cleanup: remove hack for Fedora <= 15
2011-10-12 20:24:21 -04:00
Will Woods
f640a2faab
Use a predictable ISO Volume Label ( #732298 )
...
New images find their root device by looking at the CDLABEL. Since pungi
is building ISO images separately from lorax, if it uses a different ISO
Volume Label we'll end up with unbootable images.
This changes the volume labels to match what pungi uses, so both should
boot OK.
2011-10-12 20:21:06 -04:00
Will Woods
b7269da23a
Fix is_beta -> isfinal and add [Compose] to .buildstamp
2011-09-21 23:46:48 -04:00
Will Woods
262a05e539
ltmpl: continue loop if installpkg can't find something
...
Otherwise, something like:
installpkg missing-thingy kernel kernel-firmware
will leave you without a kernel.
2011-09-15 19:27:31 -04:00
Will Woods
318c843e37
ltmpl: improve exception handling/reporting
...
- Log the error message (and the line causing the error) to console
- Log the whole exception (with some excess junk removed) to debuglog
- don't immediately SystemExit if the template won't parse
- clean up some comments
2011-09-15 19:24:35 -04:00
Will Woods
473f01c696
Add docstrings for the ltmpl commands in LoraxTemplateRunner
2011-09-14 18:33:30 -04:00
Will Woods
9699e25045
imgutils: make do_graft work for files too
...
This is needed to make --icon work in mkefiboot
2011-09-07 12:06:48 -04:00
Will Woods
3ec9a12bf6
fixups for Apple EFI support in mkefiboot
...
- actually import glob
- forgot quotes on 'if opt.imgtype == "apple"'
2011-09-07 12:05:29 -04:00
Will Woods
8aba809aa7
Add --apple and --icon to mkefiboot
...
This adds support for Apple EFI images to mkefiboot. Ported from work on
the master branch by Matthew Garrett <mjg59@srcf.ucam.org>.
2011-09-06 12:46:41 -04:00
Will Woods
faafd04dcb
add '--allbut' flag to 'removefrom'
...
This lets us easily do whitelisting instead of blacklisting during
runtime cleanup. For example:
removefrom xfsprogs --allbut /sbin/* /usr/sbin/xfs_admin
would remove everything from the xfsprogs package except files in /sbin
and /usr/sbin/xfs_admin.
A few things in runtime-cleanup have been converted to use --allbut. The
only difference in the created runtime image is that we're deleting
/usr/share/kde4 from fedora-logos.
2011-08-31 19:40:20 -04:00
Will Woods
ad25ae85cb
mkefiboot: clarify construction of dm partition dev
2011-08-30 13:10:58 -04:00
Will Woods
df3bc79574
tweak umask for imgutils' mkdosimg
2011-08-29 17:10:58 -04:00
Will Woods
8a8ec59b75
add mkhfsimg to imgutils
2011-08-29 17:10:20 -04:00
Will Woods
e756e57b5d
add "livenet" module to initramfs
2011-08-29 15:08:06 -04:00
Will Woods
ea31f4f23b
add --noprefix to dracut invocation
...
--noprefix is the default, but fedora ships an /etc/dracut.conf that
changes the prefix. Set --noprefix to override this.
Discussed here:
https://www.redhat.com/archives/anaconda-devel-list/2011-August/msg00234.html
2011-08-29 13:23:20 -04:00
Will Woods
a6ea3d3747
add pkgsizes listings, and move debugging data to logdir
2011-08-09 20:01:31 -04:00
Will Woods
4f7584fe09
move pkglists to RuntimeBuilder and disable if not debugging
2011-08-09 17:59:57 -04:00
Will Woods
3153bdfa8a
save debug setting as self.debug
2011-08-09 17:59:04 -04:00
Will Woods
76a7c2008a
rb.postinstall(): don't allow configdir override
...
Since the templates need to match the contents of the configdir, it
doesn't really make sense to allow configdir to be different from
templatedir.
2011-08-08 19:03:53 -04:00
Will Woods
916402b023
handle templatedir more cleanly in ltmpl/treebuilder
...
make sure that runner.templatedir gets set to a useful default if
initialized with None, and and make sure we pass templatedir to
LoraxTemplateRunner.__init__ (so it'll get initialized properly)
2011-08-08 19:01:38 -04:00
Will Woods
297a572069
copy config_dir into root, rather than linking
...
workdir might be on a different device, and then hardlinks fail
2011-08-05 17:25:08 -04:00
Will Woods
9f6393c58e
better logging for removepkg/removefrom
...
emit a useful log message if we attempt to removepkg something that
isn't installed, or if a glob used in a removefrom line matches no
files.
this will help us keep the templates cleaner.
2011-08-01 17:24:20 -04:00
Will Woods
52f7c5d37f
fixup for bcj NameError
2011-07-22 16:59:56 -04:00
Will Woods
3099c0a44d
Configurable compression type/speed/bcj use
...
* add bcj arch dict to ArchData
* add "compression" settings back to __init__.py
* pass them to treebuilder.create_runtime
* pass them through to imgutils.mksquashfs
2011-07-20 16:51:27 -04:00
Will Woods
7f087ead73
imgutils: allow mksquashfs to use its default compression
2011-07-20 16:42:06 -04:00
Will Woods
8f9f9944fe
Use pungi's installroot rather than making our own ( #722481 )
...
Apparently messing with the installroot causes some serious problems
with yum, so.. don't do that.
2011-07-19 12:26:13 -04:00
Will Woods
6c7709e592
Don't install/start plymouth in the initramfs
2011-07-07 19:10:12 -04:00
Will Woods
497f63a041
debugging: write out dirnames as well as filenames in pkglist/
2011-07-06 19:36:42 -04:00
Will Woods
f5164d6460
ltmpl: do brace expansion on the entire template
...
Handle brace expansion while parsing the template rather than
individually per-command. This is closer to how bash does things anyway.
2011-07-06 18:02:20 -04:00
Will Woods
d61ae8c1e6
fixup - correctly detect F15 builds
...
Yeah, for F16 you need to do "version > 15", not ">= 15". Oops.
Also, check product.version before using anaconda_dracut_hack().
2011-07-06 17:17:40 -04:00
Will Woods
ba686350ef
Revive code/hacks for building F15 images
...
To build F15 images we need to remove systemd and set up loader as init
(see runtime-cleanup and runtime-postinstall).
We also need to add a hack to dracut so loader won't freak out when it
gets started by anaconda - see the file we're adding to the initramfs in
treebuilder.py.
(There's also an extra bonus hack for working around a bug in dracut if
/proc/cmdline is empty - SEE IF YOU CAN SPOT IT!!!)
2011-07-06 13:07:21 -04:00
Will Woods
51060f07f6
hacklet to hush dracut warnings about /proc/modules
...
We just touch ${inroot}/proc/modules before the chroot, and remove it
afterward.
2011-07-06 12:22:49 -04:00
Will Woods
5c0095cdc8
fixup: self.basearch, not basearch
2011-07-05 13:40:48 -04:00
Will Woods
fc6030edaa
Fix libdir to match basearch (not buildarch), use getBaseArch
...
Let's let yum handle the magic of figuring out what basearch is. And
since basearch will match userspace, libdir should match basearch.
This fixes stuff on pre-F16 ppc64 (where basearch is ppc and thus has a
different libdir).
2011-07-05 13:32:48 -04:00
Will Woods
59b33150aa
generate_module_data needs to happen before cleanup
2011-07-01 16:30:07 -04:00
Will Woods
d636b82783
Move generate_module_data before create_runtime
...
module-info and the updated depmod stuff need to be inside the runtime
image, so this needs to happen before create_runtime. Accordingly,
generate_module_data gets moved to RuntimeBuilder.
2011-07-01 15:44:11 -04:00
Will Woods
a8f627faab
module-info fix: first line must be "Version 0"
2011-07-01 14:41:13 -04:00
Will Woods
446c45c8e5
fix path for module-info (should be /lib/modules/module-info)
2011-07-01 14:07:06 -04:00
Will Woods
41ca62d30b
fixup: runner->_runner
2011-06-30 18:13:24 -04:00
Will Woods
416b7eef57
make glob() in templates return a list
2011-06-30 17:54:02 -04:00
Will Woods
2e8d5c78b8
move template 'exists' and 'glob' to self.builtins
...
otherwise, assigning to runner.defaults clobbers them. oops.
2011-06-30 16:59:55 -04:00
Will Woods
5cb7371cdf
treebuilder refactor: rearrange functions to be easier to read
2011-06-30 13:40:26 -04:00
Will Woods
b39d90c688
Move LoraxTemplateRunner (and helpers) to ltmpl
2011-06-30 13:24:07 -04:00
Will Woods
be45950bd3
_glob/_exists -> rglob/rexists, rglob(fatal=False)
...
Also fix incorrect argument to _glob in LoraxTemplateRunner.defaults
2011-06-30 13:24:07 -04:00
Will Woods
75d1b6562b
make _glob an iterator, and remove it from RuntimeBuilder.cleanup()
2011-06-30 13:24:07 -04:00
Will Woods
da2b53d91f
Fix x86 "root=..." quoting problem and add udev_escape()
...
udev_escape gets passed to the arch templates so they can properly
escape the root=live:CDLABEL=... argument.
2011-06-30 13:24:07 -04:00
Will Woods
45c8f234ac
Refactor: Merge TemplateParser+TemplateRunner into LoraxTemplateRunner
...
Also move 'glob' and 'exists' into the default args held by the template
runner.
2011-06-29 12:43:12 -04:00
Will Woods
9cd0ac09d1
treebuilder: decode escape sequences in the 'append' command
...
Note that this might not work in python3 (we might need to encode the
data to utf8 before we can decode the escape sequences).
2011-06-27 19:24:05 -04:00
Will Woods
e1a0e40ffa
log message cleanup
2011-06-27 17:54:09 -04:00
Will Woods
3388c1c529
fix use of brace_expand in removefrom
2011-06-27 16:03:40 -04:00
Will Woods
741fbc7b43
fixup: import check_output for generate_module_info
2011-06-27 16:02:51 -04:00
Will Woods
6b218437c8
generate_module_info fixup: "join" should be "joindir"
2011-06-27 15:18:16 -04:00
Will Woods
c2631bd8e3
remove unused 'constants' module
2011-06-27 14:51:54 -04:00
Will Woods
9ac7db8cb1
Add TreeBuilder.generate_module_data() for depmod/module-info
...
generate_module_data() runs depmod for each kernel module in the install
root, then generates the (anaconda-specific) module-info files.
2011-06-27 14:46:47 -04:00
Will Woods
f8da53ac51
remove get_missing from LoraxRequiredCommands
2011-06-27 12:57:50 -04:00
Will Woods
2100445ad1
Expand braces (e.g. /usr/share/{doc,man,info}) in globs
...
The braces will be expanded as in the shell, before globbing. Note that
the output may include duplicates.
2011-06-24 18:12:59 -04:00
Will Woods
0fc63effd6
Remove TODO - doesn't need to be in git
2011-06-24 18:12:11 -04:00
Will Woods
ef8e0b4538
add DataHolder.copy()
...
Returns a DataHolder rather than a dict, so copy() works as expected.
2011-06-24 17:42:53 -04:00
Will Woods
8122690ab9
runtime is images/install.img, or LiveOS/squashfs.img on boot.iso
...
rename the runtime image in the tree and on the ISO.
2011-06-24 17:26:01 -04:00
Will Woods
30ac2e9aa5
Fix product.name.lower() in RuntimeBuilder changing TreeBuilder
...
Let RuntimeBuilder use a copy of the 'product' object instead.
2011-06-24 13:11:15 -04:00
Will Woods
99a612fb0a
TreeBuilder: fix removelocales
2011-06-23 17:30:42 -04:00
Will Woods
5ebaccef4d
fix create_runtime workdir path thinko
...
I used basename when I meant dirname. Duh.
2011-06-23 12:12:37 -04:00
Will Woods
b73132af75
rename "runtime" template arg to "runtime_img"
...
Mako uses "runtime" internally for things, and if you clobber it stuff
will just break in weird ways. So don't do that.
2011-06-23 10:46:28 -04:00
Will Woods
eda011a49c
rename runtime "anaconda-squashfs.img", pass path to Treebuilder
...
dracut's dmsquash-live-root won't recognize the image as a squashfs live
image unless its name matches "*squashfs.img", so choose the filename
accordingly. Then pass the name to the TreeBuilder so it can move it
into place.
2011-06-22 20:07:08 -04:00
Will Woods
d322180dce
instantiate RuntimeBuilder/TreeBuilder with keyword args
2011-06-22 19:22:33 -04:00
Will Woods
7ed705bf09
pass configdir to postinstall()
2011-06-22 17:20:00 -04:00
Will Woods
996208f1c8
make create_runtime() just build the image; remove initrd_append
...
create_runtime should just create the runtime image. We'll worry about
making the big combined boot image in the arch-specific templates.
2011-06-22 17:12:56 -04:00
Will Woods
f2814d5c90
treebuilder: add _filelist(*pkgs), use it in removepkg/removefrom
2011-06-22 17:12:56 -04:00
Will Woods
f724051499
whitespace cleanup
2011-06-22 17:12:56 -04:00
Will Woods
2096ebc551
remove unused LoraxTemplate.getdata()
2011-06-08 17:32:38 -04:00
Will Woods
f6b8893fd6
Fix passing kernels to template in TreeBuilder
2011-05-31 14:36:59 -04:00
Will Woods
303db540f1
bugfix for replace() globbing in _in
2011-05-31 12:24:17 -04:00
Will Woods
44583cd581
tb: make remove() and chmod() use globs (also fixes errors with missing files)
2011-05-31 12:24:17 -04:00
Will Woods
bdb35b7822
fix remove() on symlink-to-dir
2011-05-31 12:24:17 -04:00
Will Woods
dde2b9ae62
Remove comments (lines starting with '#') from templates
2011-05-31 12:24:17 -04:00
Will Woods
07695dff71
fix missing self.root in create_runtime()
2011-05-31 12:24:17 -04:00
Will Woods
bfc8dcdd7a
add missing imports to treebuilder (imgutils, fnmatch)
2011-05-31 12:24:17 -04:00
Will Woods
f1963a2102
make treebuilder._glob return relative paths when using root=
2011-05-31 12:24:17 -04:00
Will Woods
0598b13ad1
tb: join->joinpaths. I learned my lesson.
2011-05-27 18:38:25 -04:00
Will Woods
76ecff7bf9
Revert "add --noscripts to run_pkg_transaction, use it in cleanup"
...
Doesn't help. Less code is better.
This reverts commit c9e23b8941
.
2011-05-27 15:24:07 -04:00
Will Woods
acff5093b0
tb: Remove packages by removing their contents
2011-05-27 15:23:48 -04:00
Will Woods
c9e23b8941
add --noscripts to run_pkg_transaction, use it in cleanup
2011-05-27 12:57:31 -04:00
Will Woods
9f47eae26b
another pkglists fixup
2011-05-26 18:53:51 -04:00
Will Woods
e1677432a3
tb: joinpaths->join
2011-05-26 18:28:08 -04:00
Will Woods
2121b03a0a
treebuilder: use mvfile(), fix postinstall, product.name.lower()
2011-05-26 18:15:07 -04:00
Will Woods
7be79ceba2
Add mvfile() to sysutils
...
This adds mvfile(), which works basically like cpfile().
2011-05-26 18:14:10 -04:00
Will Woods
c4337815db
treebuilder: use os.rename() for move(), make symlink clobber files
2011-05-26 16:49:39 -04:00
Will Woods
c1b3ed3c1f
fix two typos in __init__
2011-05-26 16:49:11 -04:00
Will Woods
87546a1f12
treebuilder typo fixup: Fatal->fatal
2011-05-26 14:11:03 -04:00
Will Woods
1d0155f3d2
__init__: fix get_buildarch to not pop() empty list
2011-05-26 14:09:46 -04:00
Will Woods
f13a5153e0
__init__: fix pkglists with --force
2011-05-26 14:09:23 -04:00
Will Woods
954af31c76
fixup rb.postinstall linktree for use with --force
2011-05-26 14:09:00 -04:00
Will Woods
17e5f9e19a
Better tracebacks for LoraxTemplate
2011-05-26 14:08:01 -04:00
Will Woods
bf9ca1ddc7
treebuilder fixups: fix rb.postinstall(), inroot/root confusion
2011-05-26 13:35:28 -04:00
Will Woods
7feb3d4572
treebuilder fixups: correct args for parse() and RuntimeBuilder, add rb.yum
2011-05-26 13:07:30 -04:00
Will Woods
bbf3d23513
run() fix: inroot could exist if we're running with --force
2011-05-26 13:06:45 -04:00
Will Woods
eec6073ef0
move create_runtime into RuntimeBuilder
2011-05-18 13:53:54 -04:00
Will Woods
456492e0ee
fixup: invoke RuntimeBuilder properly
2011-05-17 18:57:03 -04:00
Will Woods
398b3b0922
Remove module command from treebuilder and templates
...
Module whitelisting is silly. Let's blacklist the stuff we don't need.
2011-05-17 18:16:06 -04:00
Will Woods
e59e291725
LoraxYumHelper/installtree removal fixup: create self.inroot
2011-05-17 18:14:05 -04:00
Will Woods
d26c014279
RuntimeBuilder fixup
2011-05-17 15:29:23 -04:00
Will Woods
729511f06a
Dracut hack for F15 image building in __init__
...
add lib/dracut/hooks/pre-pivot/99anaconda-umount.sh to unmount things
before starting anaconda (because loader explodes if /{dev,sys,proc}
are mounted when it starts)
2011-05-17 13:30:36 -04:00
Will Woods
905e05159d
crazytime: replace installtree with runtimebuilder
2011-05-14 03:28:41 -04:00
Will Woods
46e18c3781
more treebuilder WIP
2011-05-14 03:27:25 -04:00
Will Woods
2293a7d569
treebuilder WIP: add commands for installtree
2011-05-13 23:58:46 -04:00
Will Woods
9be6dd2864
Revert "Add systemd and agetty to the installation environment."
...
Add setup_init() and setup_s390_init() to installtree.py to handle
init setup, and stop using systemd so we can make F15 images.
This reverts commit b58190d660
.
2011-05-13 13:03:54 -04:00
Will Woods
3d1155f946
TODO updates
2011-05-12 17:32:44 -04:00
Will Woods
3faac26a93
treebuilder fixup: handle treeinfo_data as runner.results
2011-05-12 17:32:43 -04:00
Will Woods
7323749706
treebuilder fixup: pass template vars to runner
2011-05-12 17:32:43 -04:00
Will Woods
9b5ccc764b
WIP: RuntimeBuilder
2011-05-12 17:32:43 -04:00
Will Woods
c4435b504a
__init__ create_runtime fixup (correct paths)
2011-05-12 17:32:43 -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
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
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
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
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
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
Martin Gracik
1de4bb132c
Have to call os.makedirs
2011-03-22 17:36:46 +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
69214fd47a
The biarch is a function not an attribute
2011-03-17 13:26:24 +01:00
Martin Gracik
4486889792
Create images directory in outputtree
2011-03-17 13:04:11 +01:00
Martin Gracik
dc7b2e28dc
Use gzip on ppc initrd
2011-03-17 11:03:22 +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
Ales Kozumplik
8565998511
gconf/metacity: have only one workspace.
...
Related: rhbz#683548
2011-03-16 09:06:21 +01:00
Martin Gracik
70cfd01f00
Replace variables in yaboot.conf
2011-03-15 16:38:08 +01:00
Martin Gracik
4af2c865c9
Skip keymap creation on s390
2011-03-15 14:29:29 +01:00
Martin Gracik
a21be14937
Copy shutdown and linuxrc.s390 on s390
2011-03-15 14:27:31 +01:00
Martin Gracik
4d1795a091
Add support for sparc
2011-03-15 14:14:51 +01:00
Martin Gracik
5878db3e81
Use factory to get the image classes
2011-03-15 13:51:43 +01:00
Martin Gracik
c922ae64a9
treeinfo has to be addressed as self.treeinfo
2011-03-15 10:54:25 +01:00
Martin Gracik
3c8ccf997a
Add support for s390
2011-03-15 10:53:52 +01:00
Martin Gracik
566c992653
Add the xen section to treeinfo on x86_64
2011-03-14 14:07:32 +01:00
Martin Gracik
55fd24ea86
Fix magic and mapping paths
2011-03-14 14:01:01 +01:00
Martin Gracik
fdbf53227e
Fix passing of prepboot and macboot arguments
2011-03-14 14:01:01 +01:00
Martin Gracik
ab515eff64
Small ppc fixes
2011-03-14 14:01:01 +01:00
Martin Gracik
201116ac31
Check if the file we want to remove exists
...
If we have directory symlinks, some files could have already
been removed and we get a traceback. This prevents the traceback.
2011-03-14 14:01:01 +01:00
Martin Gracik
b7912a22b3
Change the location of zImage.lds
2011-03-14 14:01:00 +01:00
Martin Gracik
3e965f5a30
memtest and efika.forth are in /boot
2011-03-14 14:01:00 +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
213125199d
Print a message when no arguments given ( #684463 )
2011-03-14 09:43:12 +01:00
Martin Gracik
0a7f221bd5
Mako template returns unicode strings ( #681003 )
...
New mako template returns unicode strings, which are
a problem for shlex. We need to encode them to ascii.
2011-03-10 10:53:55 +01:00
Martin Gracik
8e9f96c12a
The check option in options causes ValueError
...
The crc32 check we want is the default anyway,
so we don't need to specify it.
2011-02-22 18:20:13 +01:00
Ales Kozumplik
0ce2dc14e4
Disable all ctrl-alt-arrow metacity shortcuts.
...
No need for desktop switching, just makes the users confused.
Resolves: rhbz#678892
2011-02-21 15:26:30 +01:00
Martin Gracik
a9e52a70f4
Use xz when compressing the initrd
...
This makes the image a lot smaller.
2011-02-18 10:25:53 +01:00
Martin Sivak
ee955f3ad1
Keep the source files for locales and get rid of the binary form.
...
Anaconda prepares locale as needed during runtime. This saves space.
2011-02-14 20:11:43 +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
d264eb3ed8
Don't create mtab symlink, already exists
...
Resolves : #671155
2011-01-21 11:18:47 +01:00
Martin Gracik
f5ac972e92
Exit with error if we have no lang-table
2011-01-20 09:00:00 +01:00
Martin Gracik
58d5ecf2a7
Fix file logging
2011-01-19 15:37:44 +01:00
Martin Gracik
47cf65df19
Overwrite the /etc/shadow file
2011-01-19 13:54:50 +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
d0f2c1a936
Move lorax executable to sbin
2010-12-17 16:46:44 +01:00
Martin Gracik
5b3fdf6936
Remove mksquashfs command
...
Not used anywhere
2010-12-17 15:59:26 +01:00
Martin Gracik
a7bcc9188d
Use losetup from util-linux-ng
...
losetup-stub was removed from anaconda runtime,
we want to use the one from util-linux-ng
2010-12-13 09:03:15 +01:00
Martin Gracik
ea3df8ad20
Do not create efi images for 32 bit archs
2010-12-08 17:21:10 +01:00
Martin Gracik
ce25d50495
Add a new line after version in buildstamp
2010-12-08 15:53:41 +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
826e580cd8
Change the XEN kernel constant value
2010-12-06 13:53:06 +01:00
Martin Gracik
688b4aa5ae
Add buildarch variable to template
2010-12-06 10:52:39 +01:00
Martin Gracik
c062a954f7
Fixed pylint errors in yumhelper.py
2010-12-02 13:34:29 +01:00
Martin Gracik
ea6139f125
Fixed pylint errors in sysutils.py
2010-12-02 13:29:55 +01:00
Martin Gracik
5a3ff79726
Fixed pylint errors in outputtree.py
2010-12-02 13:27:08 +01:00
Martin Gracik
007ed0dc76
Fixed pylint errors in output.py
2010-12-02 13:24:15 +01:00
Martin Gracik
b7504823e0
Fixed pylint errors in ltmpl.py
2010-12-02 13:20:41 +01:00
Martin Gracik
98fab0f389
Fix pylint errors in installtree.py
2010-12-02 13:16:11 +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
449df91699
Add FS_OVERHEAD constant to constats.py
2010-12-02 12:57:13 +01:00
Martin Gracik
fc72557eb1
Fixed pylint errors in constants.py
2010-12-02 12:44:16 +01:00
Martin Gracik
995e6d7e13
Fixed pylint errors in base.py
2010-12-02 12:41:14 +01:00
Martin Gracik
a265f459bf
Change isolinux local variable to instance variable
2010-11-29 10:22:52 +01:00
Martin Gracik
bde6e5c516
Enable at-spi-corba in gconf
2010-11-24 13:48:59 +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
c8b1f5f5ea
Create the outputtree kernels holder after copying the kernels
2010-11-23 14:20:42 +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
9b73b764b8
Don't change the kernels object inside get_kernels()
2010-11-23 13:42:27 +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
e9eea0f3ea
Allow DataHolder to have initial values
2010-11-23 13:19:36 +01:00
Martin Gracik
33286629b5
Remove unneeded imports from installtree.py
2010-11-23 13:17:05 +01:00
Martin Gracik
bee1743163
Remove unneeded import from __init__.py
2010-11-23 13:12:21 +01:00
Martin Gracik
ab6af2dc04
Remove not needed imports from outputtree.py
2010-11-23 13:04:38 +01:00
Martin Gracik
485fad16e5
Add the DataHolder class
2010-11-23 12:49:02 +01:00
Martin Gracik
60740ae505
Minor buildstamp changes
2010-11-23 12:41:30 +01:00
Martin Gracik
e12c282820
Remove support for writing disc number in discinfo and treeinfo
2010-11-23 12:37:28 +01:00
Martin Gracik
555dacacc3
Enable at-spi-corba in gconf
2010-11-23 11:15:33 +01:00
Martin Gracik
3413733661
Break up __init__.py into more modules
2010-11-23 11:14:25 +01:00
Martin Gracik
1084413b6b
Create and use separate installroot directory
...
The one provided by pungi may be poluted already,
and we don't want this to be left in the initrd.img.
2010-11-16 13:33:50 +01:00
Martin Gracik
d888225dd7
Export chown and chmod functions
2010-11-16 12:25:05 +01:00
Martin Gracik
cf8fb74155
Change permissions on shadow file
2010-11-16 09:36:46 +01:00
Martin Gracik
9ec28c1a49
Add chown and chmod functions to sysutils
2010-11-16 09:36:07 +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
e5ef6300c3
Log PATH variable we have
2010-11-09 09:37:49 +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
d9f1f30944
Fix the yum download messages
2010-11-08 15:31:18 +01:00
Martin Gracik
6925e4d3b3
Don't use quotes for gconftool arguments
2010-11-08 15:02:58 +01:00
Martin Gracik
27b8b56431
Print a nice yum download output
2010-11-08 15:02:49 +01:00
Martin Gracik
a1d0a53aa1
Initrd tree modifications
2010-11-08 13:52:11 +01:00
Martin Gracik
d70189dffc
Skip broken packages
2010-11-08 13:51:09 +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
5f6c661d28
Remove also broken symlinks
2010-10-29 14:41:42 +02:00
Martin Gracik
2fc71cc74e
Catch template exceptions
2010-10-29 14:41:23 +02: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
f96f015593
Fix error when removing a symbolic link to a dir
2010-10-12 18:56:08 +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
f277852f7a
Don't run ld_config from within the insttree class
2010-07-29 14:38:38 +02:00
Martin Gracik
86d7b2f804
Added package methods to yum helper class
2010-07-29 14:34:30 +02:00
Martin Gracik
aaef55c007
Fix file trees copying
...
Create the directories in advance to copying files,
not later, becase this caused some destination path
problems, like not appending the filename to the
destination directory, because it didn't exist.
2010-07-14 15:57:19 +02:00
Martin Gracik
01a1f80b79
Add the pedantic option
...
By default copy file errors are ignored,
when pedantic is set to True, they result in an exception.
2010-05-21 09:40:30 +02:00
Martin Gracik
4db8d27a22
Fixed some incorrect file paths
2010-04-22 13:04:17 +02:00
Martin Gracik
20b1ddd4b2
Changed some pathes to work with new anaconda
...
In recent anaconda version, some paths were changed
from usr/lib/anaconda-runtime to usr/share/anaconda
so we had to change this paths also in lorax
2010-04-09 13:54:02 +02:00
Martin Gracik
93d3b4e386
Fixed a typo
2010-04-07 09:40:37 +02:00
Martin Gracik
1ab4a60bc7
Added some packages and config files
...
Also fixed the modules symlink
2010-04-02 14:20:05 +02:00
Martin Gracik
36104bc143
Fix the modules and firmware symlinks
...
On architectures which have libdir other than lib,
we have to create the lib directory in the initrd
prior to copying modules and firmware
2010-03-31 17:28:29 +02:00
Martin Gracik
dfbedd6f0e
Changed the path where we copy modules and firmware
2010-03-31 14:34:57 +02:00
Martin Gracik
945714a9fb
Accept also repositories specified by file://
2010-03-31 09:45:50 +02:00
Martin Gracik
3a914eab34
Changed the modules and firmware symlinks
2010-03-31 09:40:38 +02:00
Martin Gracik
6a4d4a4a56
Don't run modlist on module-info
...
Running modlist is not needed anymore, because the module-info
we create does not contain any modules, that are not scsi or eth,
so modlist does not make any changes to it.
2010-03-30 14:44:19 +02:00
Martin Gracik
a8f4de6070
Fix some incorrect variable names
2010-03-30 14:40:06 +02:00
Martin Gracik
32c7ffd2eb
Sort modules in module-info by modname, not modtype
2010-03-30 13:59:13 +02:00
Martin Gracik
7dbf40fdad
Remove the *map files in modules directory
2010-03-30 13:54:19 +02:00
Martin Gracik
68247d2d77
Removed the print of depmod output
...
Was there only for debugging
2010-03-30 13:15:23 +02:00
Martin Gracik
0645d2ade3
Fixed the generating of modules.dep
...
Also added some missing directories to initrd image
2010-03-30 13:08:32 +02:00
Martin Gracik
bcea8cdcdd
Run the depmod after compressing the modules
...
Also create the etc/modprobe.d directory in the initrd image
2010-03-26 08:49:58 +01: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
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