In the latest method for booting the rootfs is in the LiveOS
directory of the media, not appended to the initrd. Detect this
and mount the iso and pass the CDLABEL to virt-install.
This doesn't get rid of the gtk2 stuff yet, though. The intention here is
that you can use this lorax to generate an image containing either the old
anaconda or the newui branch, simply by including a different repo in your
tree composition kickstart file.
Also, it appears that some things in the tree still require gtk2 so we may
be stuck with both for the forseeable future.
Some repos may contain anaconda packages for more architectures,
so it's not possible to get the right buildarch.
This patch allows optional specifying of the buildarch on the
command line when running lorax.
If the buildarch is not specified manually, lorax tries to get
it from the anaconda package as before.
If there's no anaconda package in the repository, don't fallback
to the system architecture and continue, because this is pointless.
We need the anaconda package.
When considering a package's filelist (e.g. for things like removefrom
--allbut), we might need to also include the %ghost files, so make
_filelist() add them to its returned list.
This runs anaconda directly, using the --image install feature. The host
system should be the same release as the target system in order to avoid
unexpected problems.
livemedia-creator uses an anaconda install media iso to install to a
file image. virt-install is used to execute the kickstart. lorax is used
to post-process the image file and create a bootable .iso from it.
Future additions will allow creation of EC2 images and output xml
details about the install.
The anaconda execWithRedirect and execWithCapture functions are too
useful not to include. They also allow you to log all the execuatable's
output to a logfile. Added them under executils.py module which uses
the pylorax and a new program logger.
Allow passing of size to create_runtime, add PartitionMount context
to use kpartx to mount partitioned file images. Add resetting the
selinux context on the newly created rootfs.
If yaboot so much as catches a whiff of a backslash in yaboot.conf, it
will reject the entire file. No bootloader config means no booting.
So as long as we're still using yaboot on PPC, we need to use ISO volume
labels it can handle. So: filter the isolabel, replacing any non-ASCII
characters with underscores.
So there's actually two copies of yaboot on a PPC image, and they each
use different config files:
ppc/chrp/yaboot --> /etc/yaboot.conf
ppc/mac/yaboot --> /ppc/ppc{32,64}/yaboot.conf
So we need two copies of yaboot.conf - one in each place - to
boot properly (or all three if we're making hybrid images). Whee!
The comments should now make this more clear for future reference.
We were appending to /etc/shadow when previous versions of lorax
overwrote it, so we ended up with two conflicting entries for "root".
Instead:
- keep existing /etc/shadow and /etc/passwd contents
- add new entries for "install" user
- remove password from existing "root" entry in /etc/shadow
Also, we don't need to create the 'sshd' user, because the
openssh-server %post script does that for us.
Actual content changes:
- {High,Low}Contrast themes moved to gnome-themes-standard, so remove
them from there. Also remove HighContrastInverse theme.
- Removed metacity 'Atlanta' theme - 'Adwaita' is the default metacity
theme these days.
ntfsresize is currently living in the ntfsprogs package, which (for
whatever reason) isn't getting automatically pulled into the runtime
environment anymore.
So: install ntfsprogs in runtime-install, and remove everything but
ntfsresize in runtime-cleanup.
This means that any (non-ignored) command error will cause lorax to
exit.
Do note, however, that some commands (e.g. remove, installpkg) don't
raise exceptions and therefore will not cause lorax to exit.
Makefile-style "-cmd" syntax lets us run a command and ignore any
resulting errors. This is a more general version of what copyif/moveif
were trying to accomplish, so we can drop those commands.