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