Compare commits

...

69 Commits

Author SHA1 Message Date
Brian C. Lane
3958d2aa8b Automatic commit of package [lorax] release [36.9-1].
Created by command:

/usr/bin/tito tag
2022-02-28 14:33:58 -08:00
Vendula Poncova
fa47a11197 Don't move the restart-anaconda file
The file will be no longer provided by Anaconda.
2022-02-23 09:53:21 -08:00
Brian C. Lane
4d10a0ea0c Automatic commit of package [lorax] release [36.8-1].
Created by command:

/usr/bin/tito tag
2022-02-16 11:58:51 -08:00
Brian C. Lane
4e956ff173 runtime-cleanup: Remove ncurses package
Remove the ncurses package -- on ppc64le and s390x it was pulled in and
the library check would fail because the library files have been
removed.
2022-02-16 11:22:26 -08:00
Brian C. Lane
58e6ca5d7b Automatic commit of package [lorax] release [36.7-1].
Created by command:

/usr/bin/tito tag
2022-02-14 14:56:59 -08:00
Brian C. Lane
9536415907 postinstall: Restore reproducible build timestamps on /usr/share/fonts 2022-02-14 11:27:13 -08:00
Brian C. Lane
c9e90ec0b2 tests: Fix the image minimizer test dnf usage
If the host dnf repos contain $releasever then using --installroot will
fail because it tries to use a rpmdb in the installroot, which starts
out empty. Passing --releasever=/ will use the releasever from the host.
2022-02-14 10:07:37 -08:00
Adam Williamson
105e6891f6 runtime-cleanup: drop kernel drivers/iio
This is "industrial input/output". I'm *pretty* sure we don't
need to support industrial magnetometers and humidity sensors
during installation.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:41 -08:00
Adam Williamson
4581039da8 runtime-cleanup: drop gallium-pipe drivers from mesa-dri-drivers
per airlied, these are mainly intended for compute (OpenCL), they
may also be used by vaapi/vdpau (video playback acceleration),
but they're definitely not used for regular graphics.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:41 -08:00
Adam Williamson
ddbb68f61e runtime-cleanup: drop yelp's local MathJax library copy
It's not needed for displaying the anaconda help. It doesn't have
any math in it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:37 -08:00
Adam Williamson
57675826cd runtime-cleanup: drop eapol_test from wpa_supplicant
This appears to be intended for testing and should not be needed
for setting up wifi connections in the installer.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:06 -08:00
Adam Williamson
80ee534afc runtime-cleanup: drop /usr/bin/cyrusbdb2current
Never going to be used in the installer environment, and it's over
1M.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:06 -08:00
Adam Williamson
2cb1c84600 runtime-cleanup: drop systemd-analyze
It's over 1M and not really essential. We might occasionally
want to use it to analyze boot of an installer image, but we
could just spin an image that includes it when we want to do
this.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:06 -08:00
Adam Williamson
918cf2c29d runtime-cleanup: drop mtools and glibc-gconv-extra
AFAICS, this dep chain (syslinux->mtools->glibc-gconv-extra) is
the only reason glibc-gconv-extra is in the installer env. It's
quite large (8M). syslinux's dep on mtools seems to be due to
(one of) its installer(s) using mtools, but I don't think we
ever run that from the installer env; we only pull syslinux into
it to set up bootloader stuff for the installer image itself,
which happens in x86.tmpl and doesn't involve actually running
a syslinux installer, just copying files around.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:06 -08:00
Adam Williamson
7d45b51ad8 runtime-cleanup: drop guile22's ccache
As best I can tell, guile22 is only in the installer env because
we include gdb and gdb depends on the libraries from it. gdb's
dep is for guile scripting support, AIUI. I don't think any kind
of libreport or manual gdb debugging we'd do in the installer env
would need that support, and even if it does, the ccache does
seem to be a cache - docs say if the files are not present,
they'll be generated on the fly from the .scm format sources in
/usr/share/guile/2.2. So I think it should be safe to ditch this
cache, which is large (it takes up ~38M uncompressed).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-14 08:40:06 -08:00
Adam Williamson
94ef6ed036 runtime-cleanup: fix warnings from old or changed packages
This addresses most "no files matched!" and "no files to remove!"
errors in current F36/Rawhide. They mostly relate to packages
that are no longer pulled in at all, or whose layout has changed.
The entries for audit haven't been fixed for the /usr merge years
ago. In linux-firmware, all files have been xz-compressed at some
point, so the entries were not matching any more. The usbdux/
subdir contains only sources for the actual firmwares that are a
level above, and we don't include those in the package any more;
the actual firmwares are useless in the installer env, so this
removes them. util-linux was split into util-linux and
util-linux-core, so we have to add an entry for util-linux-core
and move the relevant excludes to that entry.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-10 17:26:57 -08:00
Adam Williamson
d39a5f625e runtime-cleanup: drop Italic from google-noto-sans-vf-fonts
Prior to bc46724, we dropped several variants of DejaVu to save
space, including DejaVuSans-Oblique.ttf, to which I think this
is the equivalent. I believe the idea is that it's not worth
half a megabyte just to get tuned rendering of italics in the
installer environment (where they're rarely used anyway); AIUI
in the absence of a specific oblique/italic font face, freetype
will produce one by slanting the regular face.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-10 17:26:08 -08:00
Adam Williamson
ea0c6c3b3a runtime-install: drop some unnecessary font packages
The dropped google-noto packages contain fonts of scripts for
languages that the installer is not translated into. Most are
obvious, but for the record, "lao" is for the script and
language also called Lao; "thaana" is for the script Thaana,
used for the language Maldivian.

sil-abyssinica-fonts was an older set of Ethiopic fonts used for
e.g. Amharic; we now prefer google-noto-sans-ethiopic-vf-fonts,
the installer environment does not need both.

Similarly, sil-scheherazade-fonts covers a similar range to
google-noto-sans-arabic-vf-fonts and paktype-naskh-basic-fonts,
which are now preferred.

xorg-x11-fonts-misc contains bitmap fonts for some non-Latin
scripts. I'm fairly sure nothing in the installer environment
should need bitmap fonts any more.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-10 17:26:08 -08:00
Brian C. Lane
03da17fb37 Automatic commit of package [lorax] release [36.6-1].
Created by command:

/usr/bin/tito tag
2022-02-04 08:41:25 -08:00
Brian C. Lane
d7a845c2d4 mkksiso: Fix check for unsupported arch error
An unsupported arch isn't an error, just skip running MdCdbootImg on
non-s390x systems.
2022-02-04 08:40:19 -08:00
Brian C. Lane
774e44060a Automatic commit of package [lorax] release [36.5-1].
Created by command:

/usr/bin/tito tag
2022-02-03 16:06:10 -08:00
Brian C. Lane
55eee7d22d mkksiso: Improve debug message about unsupported arch 2022-02-03 15:44:44 -08:00
Brian C. Lane
e1092c0ee9 mkksiso: Fix the order of the ppc mkisofs command 2022-02-03 15:43:53 -08:00
Brian C. Lane
eb4866c73d mkksiso: mkfsiso argument order matters
Fix the order on ppc64le so that the iso will boot properly.
2022-02-03 15:43:53 -08:00
Brian C. Lane
6b2c4d1a88 mkksiso: Add kickstart to s390x cdboot.prm
And regenerate the cdboot.img
2022-02-03 15:43:22 -08:00
Adam Williamson
3c66730d7e cleanup: handle RPM database move to /usr
In F36, the RPM database is being moved from /var/lib/rpm to
/usr/lib/sysimage/rpm:

https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr
https://bugzilla.redhat.com/show_bug.cgi?id=2042099

So we need to empty that location in runtime-cleanup. Seems fine
to just list both locations, for a while at least.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-03 15:41:39 -08:00
Akira TAGOH
8c61a4c5b3 Install the variable font of the Cantarell font
https://bugzilla.redhat.com/show_bug.cgi?id=2045012
2022-01-27 11:29:10 -08:00
Akira TAGOH
bc46724b1d Update the template for f36 Change proposal:
https://fedoraproject.org/wiki/Changes/DefaultToNotoFonts
2022-01-21 09:59:30 -08:00
Parag Nemade
2dde5eb55f Update Malayalam font to its new renamed package name rit-meera-new-fonts
Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
2022-01-21 09:03:29 -08:00
Brian C. Lane
000667fbf5 Enable sftp when using inst.sshd
scp in openssh 8.7 will change to use sftp protocol. See
https://github.com/openssh/openssh-portable/pull/194 for details.

This enables the sshd internal-sftp implementation so that newer scp
versions will continue to work as expected. Note that the sshd service
is only running during the installation if inst.sshd is passed on the
kernel cmdline.

Resolves: rhbz#2040770
2022-01-18 09:34:45 -08:00
Brian C. Lane
152b503042 Add inst.rngd cmdline option
rngd should no long be needed, recent kernels have enough entropy out of
the box. This leaves it in the boot.iso but only enables it if inst.rngd
is passed on the kernel cmdline.

Resolves: rhbz#2028720
2022-01-12 10:31:25 -08:00
Brian C. Lane
debfb498e3 docs: Update docs for image-minimizer 2021-12-21 13:23:33 -08:00
Brian C. Lane
cc90406a58 tests: Add tests for image-minimizer 2021-12-21 13:18:23 -08:00
Brian C. Lane
ab9068c2d0 image-minimizer: Check for missing root directory 2021-12-21 13:17:37 -08:00
Brian C. Lane
f8af828a80 image-minimizer: Fix utf8 error and add docs
rpm returns a header that is a string, no need to call decode() on it.

Also added documentation and a manpage for image-minimizer
2021-12-20 16:33:19 -08:00
Brian C. Lane
d692ce3662 Automatic commit of package [lorax] release [36.4-1].
Created by command:

/usr/bin/tito tag
2021-12-14 13:36:40 -08:00
Adam Williamson
22c3e76d6c cleanup: remove binaries from lilv
Since we're leaving pipewire-libs in, it'll still pull in liblilv
from 0.3.41 onwards. Currently liblilv is in the same package as
some binaries which we don't need, and one actually requires the
removed libsndfile, so we need to trim it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-12-13 13:57:31 -08:00
Adam Williamson
4a678d6670 runtime-cleanup: remove pipewire-related packages
We aim to remove all sound support from the installer root, but
this was never updated for Pipewire. This just started causing
compose failures because of a dep chain from pipewire to lilv.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-12-13 11:39:58 -08:00
Brian C. Lane
b9a3f8a788 New lorax documentation - 36.3 2021-12-10 16:02:04 -08:00
Brian C. Lane
7c6e3e6800 Automatic commit of package [lorax] release [36.3-1].
Created by command:

/usr/bin/tito tag
2021-12-09 09:57:16 -08:00
Brian C. Lane
a01f62def7 mkksiso: Check the length of the filenames
With -joliet-long it allows longer filenames, but silently drops the
ones longer than 253 characters. Check for this and raise an error.

Related: rhbz#2028048
2021-12-09 09:33:24 -08:00
Brian C. Lane
506c9a18ff mkksiso: Check the iso's arch against the host's
mkksiso cannot be run on an iso from another arch, some of the files and
tools are arch specific. Catch this problem and tell the user that the
iso doesn't match the host's architecture.

Related: rhbz#2028048
2021-12-09 09:33:24 -08:00
Brian C. Lane
f4e0adc090 mkksiso: Add missing implantisomd5 tool requirements
Related: rhbz#2028048
2021-12-07 11:19:48 -08:00
Brian C. Lane
8532b683a4 mkksiso: Raise error if no volume id is found
It is possible the source iso doesn't have an id, or there is an errorr
reading it. Raise an error when this happens to make it more clear what
the problem is.

Related: rhbz#2028048
2021-12-07 10:52:02 -08:00
Brian C. Lane
710e65fa6f mount: Add s390x support to IsoMountopoint
kernel and initrd are under images/ on the iso.

Resolves: rhbz#2028089
2021-12-07 10:33:11 -08:00
Brian C. Lane
223f1755ec mkksiso: Skip mkefiboot for non-UEFI isos
Resolves: rhbz#2028097
2021-12-06 16:13:27 -08:00
Brian C. Lane
b3876337c3 mkksiso: Add -joliet-long
DVD's or user content may use filenames > 64 characters. This increases
the limit to 103.

Resolves: rhbz#2028044
2021-12-06 15:48:37 -08:00
Brian C. Lane
ec0eafacd9 mkksiso: Return 1 on errors
Resolves: rhbz#2028048
2021-12-06 14:57:41 -08:00
Brian C. Lane
6160d340c4 Fix monitor problem with split UTF8 characters
Sometimes, depending on the buffering, or length of data being received,
the end of the data could be the 1st byte or so of a UTF8 character.
This would cause a crash when trying to decode the raw data buffer.

This switches it to only decode once a full line has been found.
It also adds tests for the LogMonitor class.
2021-11-17 15:37:59 -08:00
Brian C. Lane
74128fcd59 Automatic commit of package [lorax] release [36.2-1].
Created by command:

/usr/bin/tito tag
2021-11-10 15:44:04 -08:00
Brian C. Lane
e144c69535 Remove memtest86+ from example kickstarts 2021-11-10 08:52:58 -08:00
Brian C. Lane
f2ae286739 fedora-livemedia: Update example kickstart 2021-11-10 08:51:36 -08:00
Brian C. Lane
c4aba2e47f mount: Switch to using pycdio instead of pycdlib
Also add a root only test for IsoMountpoint.
2021-11-09 12:02:54 -08:00
Brian C. Lane
87f9f77e24 Move default releasever into pylorax DEFAULT_RELEASEVER
This makes it easier to update in one place, and hopefully not forget
for new releases.

Also update default platform id to f36.
2021-11-08 14:41:26 -08:00
Brian C. Lane
5d9830e88d runtime-postinstall: Drop raidstart/stop stub code
Anaconda hasn't included these since Fedora 10. Stop trying to install
them.
2021-11-08 14:41:26 -08:00
Brian C. Lane
7a1de81b09 runtime-install: Fix grub2 epoch, it is 1 not 0 2021-11-05 16:07:59 -07:00
Adam Williamson
5286e4d917 Update runtime-install/cleanup for Marvell Prestera fw split
Marvell Prestera firmware has been split into its own subpackage,
so instead of stripping the files from linux-firmware, exclude
the package from the globed install command.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-11-01 09:12:10 -07:00
Brian C. Lane
1e66ac669c Automatic commit of package [lorax] release [36.1-1].
Created by command:

/usr/bin/tito tag
2021-10-28 14:27:46 -07:00
Brian C. Lane
c811ba98d4 dnfbase: Handle defaults better 2021-10-28 14:19:50 -07:00
Brian C. Lane
1adbeef14c ltmpl: Add version compare support to installpkg
This adds support for enforcing version requirements on installed
packages. See the documentation in ltmpl.installpkg for details.
2021-10-28 14:19:50 -07:00
Brian C. Lane
96fca67621 Automatic commit of package [lorax] release [36.0-1].
Created by command:

/usr/bin/tito tag --keep-version
2021-10-11 15:42:24 -07:00
Brian C. Lane
a9451842eb New lorax documentation - 36.0 2021-10-11 15:40:42 -07:00
Brian C. Lane
6451060bda docs: Remove logging command from examples
Fixes #1171
2021-10-11 14:31:08 -07:00
Adam Williamson
69c15c9bbe runtime-install: exclude liquidio and netronome firmwares
As Peter Robinson explains here:
https://bugzilla.redhat.com/show_bug.cgi?id=2011615#c3
these are not useful, as the devices they're for do not support
netinst-style deployment.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-10-07 15:15:56 -07:00
Adam Williamson
fbb7c5aeef runtime-cleanup: drop Marvell Prestera firmware files
These add up to 26MB and they are for high-end switches, unlikely
targets for network installs.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-10-07 15:15:56 -07:00
Adam Williamson
6fc2648121 runtime-cleanup: drop some Qualcomm smartphone firmwares
These firmwares are for Qualcomm smartphone chipsets (SM845 and
SM8250). Don't think they're any use in network install images.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-10-07 15:15:56 -07:00
Brian C. Lane
f783ff77d4 Fix pylint warnings about string formatting
and one about unused exception value.
2021-09-27 09:08:37 -07:00
Brian C. Lane
49ff2c7d5c tests: Ignore new pylint warnings
Newer versions of pylint complain about u'' not being needed and using
open without setting encoding. These are valid warnings, but do not
effect the operation of lorax so they have been added to the
FalsePositive list in runpylint.py
2021-09-27 09:06:48 -07:00
Brian C. Lane
a3810024ac Add fstrim to disk and filesystem image creation
Tests show that it may reduce disk usage a bit vs. just doing the
fallocate --dig-holes.
2021-09-24 15:11:44 -07:00
109 changed files with 5293 additions and 4978 deletions

View File

@ -47,7 +47,7 @@ check:
test:
@echo "*** Running tests ***"
PYTHONPATH=$(PYTHONPATH):./src/ $(PYTHON) -X dev -m pytest -v --cov-branch \
--cov=pylorax ./tests/pylorax/
--cov=pylorax ./tests/pylorax/ ./tests/image-minimizer/
coverage3 report -m
[ -f "/usr/bin/coveralls" ] && [ -n "$(COVERALLS_REPO_TOKEN)" ] && coveralls || echo

View File

@ -266,6 +266,7 @@ man_pages = [
('lorax', 'lorax', u'Lorax Documentation', [u'Weldr Team'], 1),
('livemedia-creator', 'livemedia-creator', u'Live Media Creator Documentation', [u'Weldr Team'], 1),
('mkksiso', 'mkksiso', u'Make Kickstart ISO Utility Documentation', [u'Weldr Team'], 1),
('image-minimizer', 'image-minimizer', u'Utility script to remove files and packages', [u'Weldr Team'], 1),
]
# If true, show URL addresses after external links.

View File

@ -13,8 +13,6 @@ keyboard --xlayouts=us --vckeymap=us
lang en_US.UTF-8
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info
# Shutdown after installation
shutdown
# System timezone

View File

@ -18,7 +18,7 @@ network --bootproto=dhcp --device=link --activate
selinux --enforcing
# System services
services --disabled="network,sshd" --enabled="NetworkManager,ModemManager"
services --disabled="sshd" --enabled="NetworkManager,ModemManager"
# livemedia-creator modifications.
shutdown
@ -63,21 +63,14 @@ livedir="LiveOS"
for arg in \`cat /proc/cmdline\` ; do
if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then
livedir=\${arg##rd.live.dir=}
return
continue
fi
if [ "\${arg##live_dir=}" != "\${arg}" ]; then
livedir=\${arg##live_dir=}
return
fi
done
# enable swaps unless requested otherwise
swaps=\`blkid -t TYPE=swap -o device\`
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
for s in \$swaps ; do
action "Enabling swap partition \$s" swapon \$s
done
fi
# enable swapfile unless requested otherwise
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir}/swap.img ] ; then
action "Enabling swap file" swapon /run/initramfs/live/\${livedir}/swap.img
fi
@ -122,7 +115,6 @@ findPersistentHome() {
for arg in \`cat /proc/cmdline\` ; do
if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
homedev=\${arg##persistenthome=}
return
fi
done
}
@ -142,7 +134,7 @@ if [ -n "\$configdone" ]; then
exit 0
fi
# add fedora user with no passwd
# add liveuser user with no passwd
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
passwd -d liveuser > /dev/null
usermod -aG wheel liveuser > /dev/null
@ -186,9 +178,7 @@ sed -i 's/rtcsync//' /etc/chrony.conf
touch /.liveimg-configured
# add static hostname to work around xauth bug
# https://bugzilla.redhat.com/show_bug.cgi?id=679486
echo "localhost" > /etc/hostname
hostnamectl set-hostname "localhost-live"
EOF
# bah, hal starts way too late
@ -271,7 +261,7 @@ releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
basearch=$(uname -i)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Packages within this LiveCD"
rpm -qa
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
# Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db*
@ -281,18 +271,23 @@ rm -f /var/lib/rpm/__db*
# make sure there aren't core files lying around
rm -f /core*
# remove random seed, the newly installed instance should make it's own
rm -f /var/lib/systemd/random-seed
# convince readahead not to collect
# FIXME: for systemd
echo 'File created by kickstart. See systemd-update-done.service(8).' \
| tee /etc/.updated >/var/.updated
# Remove random-seed
rm /var/lib/systemd/random-seed
# Remove the rescue kernel and image to save space
# Installation will recreate these on the target
rm -f /boot/*-rescue*
# Remove machine-id on pre generated images
rm -f /etc/machine-id
touch /etc/machine-id
%end
%post
@ -318,6 +313,18 @@ FOE
mkdir ~liveuser/.config
touch ~liveuser/.config/gnome-initial-setup-done
# suppress anaconda spokes redundant with gnome-initial-setup
cat >> /etc/sysconfig/anaconda << FOE
[NetworkSpoke]
visited=1
[PasswordSpoke]
visited=1
[UserSpoke]
visited=1
FOE
# make the installer show up
if [ -f /usr/share/applications/liveinst.desktop ]; then
# Show harddisk install in shell dash
@ -327,7 +334,7 @@ if [ -f /usr/share/applications/liveinst.desktop ]; then
cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
[org.gnome.shell]
favorite-apps=['firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'anaconda.desktop']
favorite-apps=['firefox.desktop', 'org.gnome.Calendar.desktop', 'rhythmbox.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'anaconda.desktop']
FOE
# Make the welcome screen show up
@ -337,6 +344,11 @@ FOE
cp /usr/share/anaconda/gnome/fedora-welcome.desktop ~liveuser/.config/autostart/
fi
# Disable GNOME welcome tour so it doesn't overlap with Fedora welcome screen
cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
welcome-dialog-last-shown-version='4294967295'
FOE
# Copy Anaconda branding in place
if [ -d /usr/share/lorax/product/usr/share/anaconda ]; then
cp -a /usr/share/lorax/product/* /
@ -367,20 +379,11 @@ EOF
%end
%packages
@^workstation-product-environment
@anaconda-tools
@base-x
@core
@firefox
@fonts
@guest-desktop-agents
@hardware-support
@libreoffice
@multimedia
@networkmanager-submodules
@printing
@workstation-product
gnome-terminal
aajohan-comfortaa-fonts
anaconda
anaconda-install-env-deps
anaconda-live
dracut-config-generic
dracut-live
@ -389,13 +392,12 @@ kernel
# Make sure that DNF doesn't pull in debug kernel to satisfy kmod() requires
kernel-modules
kernel-modules-extra
memtest86+
syslinux
-@dial-up
-@input-methods
-@standard
-gfs2-utils
-reiserfs-utils
-gnome-boxes
# This package is needed to boot the iso on UEFI
shim

View File

@ -16,8 +16,6 @@ keyboard --xlayouts=us --vckeymap=us
lang en_US.UTF-8
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info
# Shutdown after installation
shutdown
# System timezone
@ -46,7 +44,6 @@ kernel
kernel-modules
kernel-modules-extra
memtest86+
grub2-efi
grub2
shim

View File

@ -16,8 +16,6 @@ keyboard --xlayouts=us --vckeymap=us
lang en_US.UTF-8
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info
# Shutdown after installation
shutdown
# System timezone
@ -45,7 +43,6 @@ kernel
kernel-modules
kernel-modules-extra
memtest86+
grub2-efi
grub2
shim

View File

@ -15,8 +15,6 @@ keyboard --xlayouts=us --vckeymap=us
lang en_US.UTF-8
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info
# Shutdown after installation
shutdown
# System timezone
@ -42,7 +40,6 @@ kernel
kernel-modules
kernel-modules-extra
memtest86+
grub2-efi
grub2
shim

View File

@ -21,8 +21,6 @@ keyboard --xlayouts=us --vckeymap=us
lang en_US.UTF-8
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info
# Shutdown after installation
shutdown
# System timezone
@ -54,7 +52,6 @@ kernel
kernel-modules
kernel-modules-extra
memtest86+
grub2-efi
grub2
shim

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 453cff3f00978a52ccb2e22f94955d00
config: 3dbb02a107cfe7acde05f2a0794f42a8
tags: 645f666f9bcd5a90fca523b33c5a78b7

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<title>Overview: module code &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../intro.html#before-lorax">Before Lorax</a></li>
@ -90,70 +41,33 @@
<li class="toctree-l1"><a class="reference internal" href="../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Overview: module code</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>All modules for which code is available</h1>
<ul><li><a href="pylorax.html">pylorax</a></li>
<ul><li><a href="pylorax/base.html">pylorax.base</a></li>
@ -176,46 +90,30 @@
</ul></ul>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<title>pylorax &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../intro.html#before-lorax">Before Lorax</a></li>
@ -93,69 +44,30 @@
<li class="toctree-l1"><a class="reference internal" href="../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Module code</a> &raquo;</li>
<li>pylorax</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># __init__.py</span>
@ -220,7 +132,8 @@
<span class="n">DRACUT_DEFAULT</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;--xz&quot;</span><span class="p">,</span> <span class="s2">&quot;--install&quot;</span><span class="p">,</span> <span class="s2">&quot;/.buildstamp&quot;</span><span class="p">,</span> <span class="s2">&quot;--no-early-microcode&quot;</span><span class="p">,</span> <span class="s2">&quot;--add&quot;</span><span class="p">,</span> <span class="s2">&quot;fips&quot;</span><span class="p">]</span>
<span class="c1"># Used for DNF conf.module_platform_id</span>
<span class="n">DEFAULT_PLATFORM_ID</span> <span class="o">=</span> <span class="s2">&quot;platform:f34&quot;</span>
<span class="n">DEFAULT_PLATFORM_ID</span> <span class="o">=</span> <span class="s2">&quot;platform:f36&quot;</span>
<span class="n">DEFAULT_RELEASEVER</span> <span class="o">=</span> <span class="s2">&quot;36&quot;</span>
<div class="viewcode-block" id="ArchData"><a class="viewcode-back" href="../pylorax.html#pylorax.ArchData">[docs]</a><span class="k">class</span> <span class="nc">ArchData</span><span class="p">(</span><span class="n">DataHolder</span><span class="p">):</span>
<span class="n">lib64_arches</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;x86_64&quot;</span><span class="p">,</span> <span class="s2">&quot;ppc64le&quot;</span><span class="p">,</span> <span class="s2">&quot;s390x&quot;</span><span class="p">,</span> <span class="s2">&quot;ia64&quot;</span><span class="p">,</span> <span class="s2">&quot;aarch64&quot;</span><span class="p">)</span>
@ -618,46 +531,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.buildstamp &mdash; Lorax 36.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.buildstamp &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.buildstamp</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.buildstamp</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># buildstamp.py</span>
@ -228,46 +139,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.cmdline &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.cmdline &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.cmdline</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.cmdline</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># cmdline.py</span>
@ -183,7 +94,7 @@
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">argparse</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">vernum</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">DEFAULT_RELEASEVER</span><span class="p">,</span> <span class="n">vernum</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{0}</span><span class="s2">-</span><span class="si">{1}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> <span class="n">vernum</span><span class="p">)</span>
@ -467,7 +378,7 @@
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--project&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s2">&quot;Linux&quot;</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;substituted for @PROJECT@ in bootloader config files&quot;</span><span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--releasever&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s2">&quot;34&quot;</span><span class="p">,</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--releasever&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="n">DEFAULT_RELEASEVER</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;substituted for @VERSION@ in bootloader config files&quot;</span><span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--volid&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s2">&quot;volume id&quot;</span><span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--squashfs-only&quot;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s2">&quot;store_true&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
@ -483,46 +394,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.creator &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.creator &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.creator</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.creator</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># Copyright (C) 2011-2018 Red Hat, Inc.</span>
@ -195,10 +106,10 @@
<span class="kn">from</span> <span class="nn">pykickstart.version</span> <span class="kn">import</span> <span class="n">makeVersion</span>
<span class="c1"># Use the Lorax treebuilder branch for iso creation</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">ArchData</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">DEFAULT_RELEASEVER</span><span class="p">,</span> <span class="n">ArchData</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">execWithRedirect</span><span class="p">,</span> <span class="n">runcmd</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">PartitionMount</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">execWithRedirect</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">DracutChroot</span><span class="p">,</span> <span class="n">PartitionMount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span><span class="p">,</span> <span class="n">Mount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mksquashfs</span><span class="p">,</span> <span class="n">mkrootfsimg</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">copytree</span>
@ -310,7 +221,7 @@
<div class="viewcode-block" id="make_appliance"><a class="viewcode-back" href="../../pylorax.html#pylorax.creator.make_appliance">[docs]</a><span class="k">def</span> <span class="nf">make_appliance</span><span class="p">(</span><span class="n">disk_img</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">template</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">networks</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">ram</span><span class="o">=</span><span class="mi">1024</span><span class="p">,</span>
<span class="n">vcpus</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">arch</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">title</span><span class="o">=</span><span class="s2">&quot;Linux&quot;</span><span class="p">,</span> <span class="n">project</span><span class="o">=</span><span class="s2">&quot;Linux&quot;</span><span class="p">,</span>
<span class="n">releasever</span><span class="o">=</span><span class="s2">&quot;34&quot;</span><span class="p">):</span>
<span class="n">releasever</span><span class="o">=</span><span class="n">DEFAULT_RELEASEVER</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate an appliance description file</span>
@ -324,7 +235,7 @@
<span class="sd"> :param str arch: CPU architecture. Default is &#39;x86_64&#39;</span>
<span class="sd"> :param str title: Title, passed to template. Default is &#39;Linux&#39;</span>
<span class="sd"> :param str project: Project, passed to template. Default is &#39;Linux&#39;</span>
<span class="sd"> :param str releasever: Release version, passed to template. Default is 34</span>
<span class="sd"> :param str releasever: Release version, passed to template.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">disk_img</span> <span class="ow">and</span> <span class="n">template</span> <span class="ow">and</span> <span class="n">outfile</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">None</span>
@ -379,7 +290,7 @@
<span class="n">product</span> <span class="o">=</span> <span class="n">DataHolder</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="n">opts</span><span class="o">.</span><span class="n">project</span><span class="p">,</span> <span class="n">version</span><span class="o">=</span><span class="n">opts</span><span class="o">.</span><span class="n">releasever</span><span class="p">,</span> <span class="n">release</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="n">variant</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">bugurl</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">isfinal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">rb</span> <span class="o">=</span> <span class="n">RuntimeBuilder</span><span class="p">(</span><span class="n">product</span><span class="p">,</span> <span class="n">arch</span><span class="p">,</span> <span class="n">fake_dbo</span><span class="p">)</span>
<span class="n">rb</span> <span class="o">=</span> <span class="n">RuntimeBuilder</span><span class="p">(</span><span class="n">product</span><span class="p">,</span> <span class="n">arch</span><span class="p">,</span> <span class="n">fake_dbo</span><span class="p">,</span> <span class="n">skip_branding</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span> <span class="o">=</span> <span class="n">squashfs_args</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span>
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">squashfs_only</span><span class="p">:</span>
@ -404,7 +315,7 @@
<span class="c1"># cmdline dracut args override the defaults, but need to be parsed</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;dracut args = </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">dracut_args</span><span class="p">(</span><span class="n">opts</span><span class="p">))</span>
<span class="n">dracut</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;dracut&quot;</span><span class="p">,</span> <span class="s2">&quot;--nomdadmconf&quot;</span><span class="p">,</span> <span class="s2">&quot;--nolvmconf&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">dracut_args</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span>
<span class="n">args</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;--nomdadmconf&quot;</span><span class="p">,</span> <span class="s2">&quot;--nolvmconf&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">dracut_args</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span>
<span class="n">kdir</span> <span class="o">=</span> <span class="s2">&quot;boot&quot;</span>
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">ostree</span><span class="p">:</span>
@ -433,25 +344,18 @@
<span class="c1"># Write the new initramfs directly to the results directory</span>
<span class="n">os</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;results&quot;</span><span class="p">))</span>
<span class="n">mount</span><span class="p">(</span><span class="n">results_dir</span><span class="p">,</span> <span class="n">opts</span><span class="o">=</span><span class="s2">&quot;bind&quot;</span><span class="p">,</span> <span class="n">mnt</span><span class="o">=</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;results&quot;</span><span class="p">))</span>
<span class="c1"># Dracut runs out of space inside the minimal rootfs image</span>
<span class="n">mount</span><span class="p">(</span><span class="s2">&quot;/var/tmp&quot;</span><span class="p">,</span> <span class="n">opts</span><span class="o">=</span><span class="s2">&quot;bind&quot;</span><span class="p">,</span> <span class="n">mnt</span><span class="o">=</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;var/tmp&quot;</span><span class="p">))</span>
<span class="k">for</span> <span class="n">kernel</span> <span class="ow">in</span> <span class="n">kernels</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">kernel</span><span class="p">,</span> <span class="s2">&quot;initrd&quot;</span><span class="p">):</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">initrd</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Construct an initrd from the kernel name</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;vmlinuz-&quot;</span><span class="p">,</span> <span class="s2">&quot;initrd-&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.img&quot;</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;rebuilding </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;dracut warnings about /proc are safe to ignore&quot;</span><span class="p">)</span>
<span class="k">with</span> <span class="n">DracutChroot</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="n">bind</span><span class="o">=</span><span class="p">[(</span><span class="n">results_dir</span><span class="p">,</span> <span class="s2">&quot;/results&quot;</span><span class="p">)])</span> <span class="k">as</span> <span class="n">dracut</span><span class="p">:</span>
<span class="k">for</span> <span class="n">kernel</span> <span class="ow">in</span> <span class="n">kernels</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">kernel</span><span class="p">,</span> <span class="s2">&quot;initrd&quot;</span><span class="p">):</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">initrd</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Construct an initrd from the kernel name</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;vmlinuz-&quot;</span><span class="p">,</span> <span class="s2">&quot;initrd-&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.img&quot;</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;rebuilding </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="n">kver</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">version</span>
<span class="n">cmd</span> <span class="o">=</span> <span class="n">dracut</span> <span class="o">+</span> <span class="p">[</span><span class="s2">&quot;/results/&quot;</span><span class="o">+</span><span class="n">outfile</span><span class="p">,</span> <span class="n">kver</span><span class="p">]</span>
<span class="n">runcmd</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">sys_root_dir</span><span class="p">)</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">copy2</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="p">),</span> <span class="n">results_dir</span><span class="p">)</span>
<span class="n">umount</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;var/tmp&quot;</span><span class="p">),</span> <span class="n">delete</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">umount</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;results&quot;</span><span class="p">),</span> <span class="n">delete</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span></div>
<span class="n">kver</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">version</span>
<span class="n">dracut</span><span class="o">.</span><span class="n">Run</span><span class="p">(</span><span class="n">args</span> <span class="o">+</span> <span class="p">[</span><span class="s2">&quot;/results/&quot;</span><span class="o">+</span><span class="n">outfile</span><span class="p">,</span> <span class="n">kver</span><span class="p">])</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">copy2</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="p">),</span> <span class="n">results_dir</span><span class="p">)</span></div>
<div class="viewcode-block" id="create_pxe_config"><a class="viewcode-back" href="../../pylorax.html#pylorax.creator.create_pxe_config">[docs]</a><span class="k">def</span> <span class="nf">create_pxe_config</span><span class="p">(</span><span class="n">template</span><span class="p">,</span> <span class="n">images_dir</span><span class="p">,</span> <span class="n">live_image_name</span><span class="p">,</span> <span class="n">add_args</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
@ -918,46 +822,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.discinfo &mdash; Lorax 36.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.discinfo &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.discinfo</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.discinfo</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># discinfo.py</span>
@ -207,46 +118,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.dnfbase &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.dnfbase &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.dnfbase</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.dnfbase</h1><div class="highlight"><pre>
<span></span><span class="c1"># Copyright (C) 2018 Red Hat, Inc.</span>
<span class="c1">#</span>
@ -181,12 +92,12 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">DEFAULT_PLATFORM_ID</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">DEFAULT_PLATFORM_ID</span><span class="p">,</span> <span class="n">DEFAULT_RELEASEVER</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">flatconfig</span>
<div class="viewcode-block" id="get_dnf_base_object"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfbase.get_dnf_base_object">[docs]</a><span class="k">def</span> <span class="nf">get_dnf_base_object</span><span class="p">(</span><span class="n">installroot</span><span class="p">,</span> <span class="n">sources</span><span class="p">,</span> <span class="n">mirrorlists</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">repos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">enablerepos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">disablerepos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">tempdir</span><span class="o">=</span><span class="s2">&quot;/var/tmp&quot;</span><span class="p">,</span> <span class="n">proxy</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">releasever</span><span class="o">=</span><span class="s2">&quot;34&quot;</span><span class="p">,</span>
<span class="n">tempdir</span><span class="o">=</span><span class="s2">&quot;/var/tmp&quot;</span><span class="p">,</span> <span class="n">proxy</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">releasever</span><span class="o">=</span><span class="n">DEFAULT_RELEASEVER</span><span class="p">,</span>
<span class="n">cachedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">logdir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">sslverify</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">dnfplugins</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot; Create a dnf Base object and setup the repositories and installroot</span>
@ -214,6 +125,8 @@
<span class="k">return</span> <span class="kc">None</span>
<span class="n">mirrorlists</span> <span class="o">=</span> <span class="n">mirrorlists</span> <span class="ow">or</span> <span class="p">[]</span>
<span class="n">enablerepos</span> <span class="o">=</span> <span class="n">enablerepos</span> <span class="ow">or</span> <span class="p">[]</span>
<span class="n">disablerepos</span> <span class="o">=</span> <span class="n">disablerepos</span> <span class="ow">or</span> <span class="p">[]</span>
<span class="c1"># sanitize the repositories</span>
<span class="n">sources</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">sanitize_repo</span><span class="p">(</span><span class="n">r</span><span class="p">)</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">sources</span><span class="p">)</span>
@ -349,46 +262,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.dnfhelper &mdash; Lorax 36.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.dnfhelper &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.dnfhelper</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.dnfhelper</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># dnfhelper.py</span>
@ -272,46 +183,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.executils &mdash; Lorax 36.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.executils &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.executils</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.executils</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># executil.py - subprocess execution utility functions</span>
@ -535,46 +446,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.imgutils &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.imgutils &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.imgutils</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.imgutils</h1><div class="highlight"><pre>
<span></span><span class="c1"># imgutils.py - utility functions/classes for building disk images</span>
<span class="c1">#</span>
@ -302,7 +213,7 @@
<div class="viewcode-block" id="mksparse"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mksparse">[docs]</a><span class="k">def</span> <span class="nf">mksparse</span><span class="p">(</span><span class="n">outfile</span><span class="p">,</span> <span class="n">size</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;use os.ftruncate to create a sparse file of the given size.&#39;&#39;&#39;</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">outfile</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">fobj</span><span class="p">:</span>
<span class="n">os</span><span class="o">.</span><span class="n">ftruncate</span><span class="p">(</span><span class="n">fobj</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">size</span><span class="p">)</span></div>
<span class="n">os</span><span class="o">.</span><span class="n">ftruncate</span><span class="p">(</span><span class="n">fobj</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="nb">int</span><span class="p">(</span><span class="n">size</span><span class="p">))</span></div>
<div class="viewcode-block" id="mkqcow2"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mkqcow2">[docs]</a><span class="k">def</span> <span class="nf">mkqcow2</span><span class="p">(</span><span class="n">outfile</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;use qemu-img to create a file of the given size.</span>
@ -634,6 +545,42 @@
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;kpartx&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-d&quot;</span><span class="p">,</span> <span class="s2">&quot;-s&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">disk_img</span><span class="p">])</span></div>
<div class="viewcode-block" id="DracutChroot"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.DracutChroot">[docs]</a><span class="k">class</span> <span class="nc">DracutChroot</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Setup the chroot for running dracut inside it, cleanup when done</span>
<span class="sd"> This mount /proc, /dev, and /var/tmp plus optional bind mounted directories</span>
<span class="sd"> as a list of (source, destination) tuples where destination is relative to the chroot.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">root</span><span class="p">,</span> <span class="n">bind</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">=</span> <span class="n">root</span>
<span class="bp">self</span><span class="o">.</span><span class="n">bind</span> <span class="o">=</span> <span class="p">[(</span><span class="s2">&quot;/var/tmp&quot;</span><span class="p">,</span> <span class="s2">&quot;/var/tmp&quot;</span><span class="p">)]</span> <span class="o">+</span> <span class="p">(</span><span class="n">bind</span> <span class="k">if</span> <span class="n">bind</span> <span class="k">else</span> <span class="p">[])</span>
<span class="k">def</span> <span class="fm">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">for</span> <span class="n">d</span> <span class="ow">in</span> <span class="p">[</span><span class="n">d</span> <span class="k">for</span> <span class="n">_</span><span class="p">,</span> <span class="n">d</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">bind</span><span class="p">]</span> <span class="o">+</span> <span class="p">[</span><span class="s2">&quot;/proc&quot;</span><span class="p">,</span> <span class="s2">&quot;/dev&quot;</span><span class="p">]:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="n">d</span><span class="p">):</span>
<span class="n">logger</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">&quot;Making missing dracut chroot directory: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">d</span><span class="p">)</span>
<span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="n">d</span><span class="p">)</span>
<span class="n">runcmd</span><span class="p">([</span><span class="s2">&quot;mount&quot;</span><span class="p">,</span> <span class="s2">&quot;-t&quot;</span><span class="p">,</span> <span class="s2">&quot;proc&quot;</span><span class="p">,</span> <span class="s2">&quot;-o&quot;</span><span class="p">,</span> <span class="s2">&quot;nosuid,noexec,nodev&quot;</span><span class="p">,</span> <span class="s2">&quot;proc&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="s2">&quot;/proc&quot;</span> <span class="p">])</span>
<span class="n">runcmd</span><span class="p">([</span><span class="s2">&quot;mount&quot;</span><span class="p">,</span> <span class="s2">&quot;-t&quot;</span><span class="p">,</span> <span class="s2">&quot;devtmpfs&quot;</span><span class="p">,</span> <span class="s2">&quot;-o&quot;</span><span class="p">,</span> <span class="s2">&quot;mode=0755,noexec,nosuid,strictatime&quot;</span><span class="p">,</span> <span class="s2">&quot;devtmpfs&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="s2">&quot;/dev&quot;</span> <span class="p">])</span>
<span class="k">for</span> <span class="n">s</span><span class="p">,</span> <span class="n">d</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">bind</span><span class="p">:</span>
<span class="n">runcmd</span><span class="p">([</span><span class="s2">&quot;mount&quot;</span><span class="p">,</span> <span class="s2">&quot;-o&quot;</span><span class="p">,</span> <span class="s2">&quot;bind&quot;</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="n">d</span><span class="p">])</span>
<span class="k">return</span> <span class="bp">self</span>
<span class="k">def</span> <span class="fm">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="n">runcmd</span><span class="p">([</span><span class="s2">&quot;umount&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="s2">&quot;/proc&quot;</span> <span class="p">])</span>
<span class="n">runcmd</span><span class="p">([</span><span class="s2">&quot;umount&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="s2">&quot;/dev&quot;</span> <span class="p">])</span>
<span class="c1"># cleanup bind mounts</span>
<span class="k">for</span> <span class="n">_</span><span class="p">,</span> <span class="n">d</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">bind</span><span class="p">:</span>
<span class="n">runcmd</span><span class="p">([</span><span class="s2">&quot;umount&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">root</span> <span class="o">+</span> <span class="n">d</span> <span class="p">])</span>
<div class="viewcode-block" id="DracutChroot.Run"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.DracutChroot.Run">[docs]</a> <span class="k">def</span> <span class="nf">Run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">args</span><span class="p">):</span>
<span class="n">runcmd</span><span class="p">([</span><span class="s2">&quot;dracut&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">args</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">root</span><span class="p">)</span></div></div>
<span class="c1">######## Functions for making filesystem images ##########################</span>
<div class="viewcode-block" id="mkfsimage"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mkfsimage">[docs]</a><span class="k">def</span> <span class="nf">mkfsimage</span><span class="p">(</span><span class="n">fstype</span><span class="p">,</span> <span class="n">rootdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">mkfsargs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">mountargs</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">graft</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
@ -727,46 +674,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.installer &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.installer &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.installer</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.installer</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># Copyright (C) 2011-2018 Red Hat, Inc.</span>
@ -369,7 +280,7 @@
<span class="c1"># Setup the cmdline args</span>
<span class="c1"># ======================</span>
<span class="n">cmdline_args</span> <span class="o">=</span> <span class="s2">&quot;ks=file:/</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">ks_paths</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">cmdline_args</span> <span class="o">=</span> <span class="s2">&quot;inst.ks=file:/</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">ks_paths</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">cmdline_args</span> <span class="o">+=</span> <span class="s2">&quot; inst.stage2=hd:LABEL=</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">udev_escape</span><span class="p">(</span><span class="n">iso</span><span class="o">.</span><span class="n">label</span><span class="p">)</span>
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">proxy</span><span class="p">:</span>
<span class="n">cmdline_args</span> <span class="o">+=</span> <span class="s2">&quot; inst.proxy=</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">opts</span><span class="o">.</span><span class="n">proxy</span>
@ -577,12 +488,17 @@
<span class="n">setfiles_args</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;-e&quot;</span><span class="p">,</span> <span class="s2">&quot;/proc&quot;</span><span class="p">,</span> <span class="s2">&quot;-e&quot;</span><span class="p">,</span> <span class="s2">&quot;/sys&quot;</span><span class="p">,</span>
<span class="s2">&quot;/etc/selinux/targeted/contexts/files/file_contexts&quot;</span><span class="p">,</span> <span class="s2">&quot;/&quot;</span><span class="p">]</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;sync&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-f&quot;</span><span class="p">,</span> <span class="n">dirinstall_path</span><span class="p">])</span>
<span class="k">if</span> <span class="s2">&quot;--dirinstall&quot;</span> <span class="ow">in</span> <span class="n">args</span><span class="p">:</span>
<span class="c1"># setfiles may not be available, warn instead of fail</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;setfiles&quot;</span><span class="p">,</span> <span class="n">setfiles_args</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">dirinstall_path</span><span class="p">)</span>
<span class="k">except</span> <span class="p">(</span><span class="n">subprocess</span><span class="o">.</span><span class="n">CalledProcessError</span><span class="p">,</span> <span class="ne">OSError</span><span class="p">)</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">&quot;Running setfiles on install tree failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">disk_img</span><span class="p">):</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;du&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-B&quot;</span><span class="p">,</span> <span class="s2">&quot;1&quot;</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">])</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;fstrim&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-v&quot;</span><span class="p">,</span> <span class="n">dirinstall_path</span><span class="p">])</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">with</span> <span class="n">PartitionMount</span><span class="p">(</span><span class="n">disk_img</span><span class="p">)</span> <span class="k">as</span> <span class="n">img_mount</span><span class="p">:</span>
<span class="k">if</span> <span class="n">img_mount</span> <span class="ow">and</span> <span class="n">img_mount</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">:</span>
@ -593,7 +509,10 @@
<span class="c1"># For image installs, run fstrim to discard unused blocks. This way</span>
<span class="c1"># unused blocks do not need to be allocated for sparse image types</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;fstrim&quot;</span><span class="p">,</span> <span class="p">[</span><span class="n">img_mount</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">])</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;du&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-B&quot;</span><span class="p">,</span> <span class="s2">&quot;1&quot;</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">])</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;fstrim&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-v&quot;</span><span class="p">,</span> <span class="n">img_mount</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">])</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">disk_img</span><span class="p">):</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;du&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-B&quot;</span><span class="p">,</span> <span class="s2">&quot;1&quot;</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">])</span>
<span class="k">except</span> <span class="p">(</span><span class="n">subprocess</span><span class="o">.</span><span class="n">CalledProcessError</span><span class="p">,</span> <span class="ne">OSError</span><span class="p">)</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Running anaconda failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
@ -685,8 +604,10 @@
<span class="k">if</span> <span class="n">rc</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">InstallError</span><span class="p">(</span><span class="s2">&quot;novirt_install mktar failed: rc=</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">rc</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># For raw disk images, use fallocate to deallocate unused space</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;fallocate&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;--dig-holes&quot;</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">],</span> <span class="n">raise_err</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="c1"># Examine the image for sections that can be made sparse</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;du&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-B&quot;</span><span class="p">,</span> <span class="s2">&quot;1&quot;</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">])</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;fallocate&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;--dig-holes&quot;</span><span class="p">,</span> <span class="s2">&quot;-v&quot;</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">],</span> <span class="n">raise_err</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">&quot;du&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;-B&quot;</span><span class="p">,</span> <span class="s2">&quot;1&quot;</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">])</span>
<span class="c1"># For make_tar_disk, wrap the result in a tar file, and remove the original disk image.</span>
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">make_tar_disk</span><span class="p">:</span>
@ -843,46 +764,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.ltmpl &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.ltmpl &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.ltmpl</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.ltmpl</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># ltmpl.py</span>
@ -346,8 +257,149 @@
<span class="k">raise</span></div>
<div class="viewcode-block" id="InstallpkgMixin"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.InstallpkgMixin">[docs]</a><span class="k">class</span> <span class="nc">InstallpkgMixin</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;Helper class used with *Runner classes&quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">_pkgver</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pkg_spec</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Helper to parse package version compare operators</span>
<span class="sd"> Returns a list of matching package objects or an empty list</span>
<span class="sd"> Examples:</span>
<span class="sd"> &quot;bash&gt;4.01&quot;</span>
<span class="sd"> &quot;tmux&gt;=3.1.4-5&quot;</span>
<span class="sd"> &quot;grub2&lt;2.06&quot;</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Always return the highest of the filtered results</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">any</span><span class="p">(</span><span class="n">g</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;=&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;!&#39;</span><span class="p">]</span> <span class="k">if</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">pkg_spec</span><span class="p">):</span>
<span class="n">query</span> <span class="o">=</span> <span class="n">dnf</span><span class="o">.</span><span class="n">subject</span><span class="o">.</span><span class="n">Subject</span><span class="p">(</span><span class="n">pkg_spec</span><span class="p">)</span><span class="o">.</span><span class="n">get_best_query</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">pcv</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="sa">r</span><span class="s1">&#39;([!&lt;&gt;=]+)&#39;</span><span class="p">,</span> <span class="n">pkg_spec</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Missing package name&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">pcv</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Missing version&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">pcv</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">3</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Too many comparisons&quot;</span><span class="p">)</span>
<span class="n">query</span> <span class="o">=</span> <span class="n">dnf</span><span class="o">.</span><span class="n">subject</span><span class="o">.</span><span class="n">Subject</span><span class="p">(</span><span class="n">pcv</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span><span class="o">.</span><span class="n">get_best_query</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="p">)</span>
<span class="c1"># Parse the comparison operators</span>
<span class="k">if</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;=&quot;</span> <span class="ow">or</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;==&quot;</span><span class="p">:</span>
<span class="n">query</span><span class="o">.</span><span class="n">filterm</span><span class="p">(</span><span class="n">evr__eq</span> <span class="o">=</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="k">elif</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;!=&quot;</span> <span class="ow">or</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;&lt;&gt;&quot;</span><span class="p">:</span>
<span class="n">query</span><span class="o">.</span><span class="n">filterm</span><span class="p">(</span><span class="n">evr__neq</span> <span class="o">=</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="k">elif</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;&gt;&quot;</span><span class="p">:</span>
<span class="n">query</span><span class="o">.</span><span class="n">filterm</span><span class="p">(</span><span class="n">evr__gt</span> <span class="o">=</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="k">elif</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;&gt;=&quot;</span> <span class="ow">or</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;=&gt;&quot;</span><span class="p">:</span>
<span class="n">query</span><span class="o">.</span><span class="n">filterm</span><span class="p">(</span><span class="n">evr__gte</span> <span class="o">=</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="k">elif</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;&lt;&quot;</span><span class="p">:</span>
<span class="n">query</span><span class="o">.</span><span class="n">filterm</span><span class="p">(</span><span class="n">evr__lt</span> <span class="o">=</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="k">elif</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;&lt;=&quot;</span> <span class="ow">or</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;=&lt;&quot;</span><span class="p">:</span>
<span class="n">query</span><span class="o">.</span><span class="n">filterm</span><span class="p">(</span><span class="n">evr__lte</span> <span class="o">=</span> <span class="n">pcv</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="c1"># MUST be added last. Otherwise it will only return the latest, not the latest of the</span>
<span class="c1"># filtered results.</span>
<span class="n">query</span><span class="o">.</span><span class="n">filterm</span><span class="p">(</span><span class="n">latest</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">return</span> <span class="p">[</span><span class="n">pkg</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">query</span><span class="o">.</span><span class="n">apply</span><span class="p">()]</span>
<div class="viewcode-block" id="InstallpkgMixin.installpkg"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.InstallpkgMixin.installpkg">[docs]</a> <span class="k">def</span> <span class="nf">installpkg</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">pkgs</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> installpkg [--required|--optional] [--except PKGGLOB [--except PKGGLOB ...]] PKGGLOB [PKGGLOB ...]</span>
<span class="sd"> Request installation of all packages matching the given globs.</span>
<span class="sd"> Note that this is just a *request* - nothing is *actually* installed</span>
<span class="sd"> until the &#39;run_pkg_transaction&#39; command is given.</span>
<span class="sd"> The non-except PKGGLOB can contain a version comparison. This should</span>
<span class="sd"> not be used as a substitute for package dependencies, it should be</span>
<span class="sd"> used to enforce installation of tools required by the templates. eg.</span>
<span class="sd"> grub2 changed the font location in 2.06-2 so the current templates</span>
<span class="sd"> require grub2 to be 2.06-2 or later.</span>
<span class="sd"> installpkg tmux&gt;=2.8 bash=5.0.0-1</span>
<span class="sd"> It supports the =,!=,&gt;,&gt;=,&lt;,&lt;= operators. == is an alias for =, and</span>
<span class="sd"> &lt;&gt; is an alias for !=</span>
<span class="sd"> There should be no spaces between the package name, the compare</span>
<span class="sd"> operator, and the version.</span>
<span class="sd"> NOTE: When testing for equality you must include the version AND</span>
<span class="sd"> release, otherwise it won&#39;t match anything.</span>
<span class="sd"> --required is now the default. If the PKGGLOB can be missing pass --optional</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">if</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;--optional&#39;</span><span class="p">:</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">elif</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;--required&#39;</span><span class="p">:</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">excludes</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">while</span> <span class="s1">&#39;--except&#39;</span> <span class="ow">in</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="n">idx</span> <span class="o">=</span> <span class="n">pkgs</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="s1">&#39;--except&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">pkgs</span><span class="p">)</span> <span class="o">==</span> <span class="n">idx</span><span class="o">+</span><span class="mi">1</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;installpkg needs an argument after --except&quot;</span><span class="p">)</span>
<span class="c1"># TODO: Check for bare version compare operators</span>
<span class="n">excludes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">pkgs</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">1</span><span class="p">])</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[:</span><span class="n">idx</span><span class="p">]</span> <span class="o">+</span> <span class="n">pkgs</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">2</span><span class="p">:]</span>
<span class="n">errors</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="c1"># Did a version compare operatore end up in the list?</span>
<span class="k">if</span> <span class="n">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;=&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;!&#39;</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Version compare operators cannot be surrounded by spaces&quot;</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># Start by using Subject to generate a package query, which will</span>
<span class="c1"># give us a query object similar to what dbo.install would select,</span>
<span class="c1"># minus the handling for multilib. This query may contain</span>
<span class="c1"># multiple arches. Pull the package names out of that, filter any</span>
<span class="c1"># that match the excludes patterns, and pass those names back to</span>
<span class="c1"># dbo.install to do the actual, arch and version and multilib</span>
<span class="c1"># aware, package selction.</span>
<span class="c1"># dnf queries don&#39;t have a concept of negative globs which is why</span>
<span class="c1"># the filtering is done the hard way.</span>
<span class="c1"># Get the latest package, or package matching the selected version</span>
<span class="n">pkgnames</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_pkgver</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">pkgnames</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">PackageNotFoundError</span><span class="p">(</span><span class="s2">&quot;no package matched&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
<span class="c1"># Apply excludes to the name only</span>
<span class="k">for</span> <span class="n">exclude</span> <span class="ow">in</span> <span class="n">excludes</span><span class="p">:</span>
<span class="n">pkgnames</span> <span class="o">=</span> <span class="p">[</span><span class="n">pkg</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">pkgnames</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">fnmatch</span><span class="o">.</span><span class="n">fnmatch</span><span class="p">(</span><span class="n">pkg</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">exclude</span><span class="p">)]</span>
<span class="c1"># Convert to a sorted NVR list for installation</span>
<span class="n">pkgnvrs</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">([</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">-</span><span class="si">{}</span><span class="s2">-</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">pkg</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">pkg</span><span class="o">.</span><span class="n">version</span><span class="p">,</span> <span class="n">pkg</span><span class="o">.</span><span class="n">release</span><span class="p">)</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">pkgnames</span><span class="p">])</span>
<span class="c1"># If the request is a glob, expand it in the log</span>
<span class="k">if</span> <span class="nb">any</span><span class="p">(</span><span class="n">g</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;*&#39;</span><span class="p">,</span><span class="s1">&#39;?&#39;</span><span class="p">,</span><span class="s1">&#39;.&#39;</span><span class="p">]</span> <span class="k">if</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">p</span><span class="p">):</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;installpkg: </span><span class="si">%s</span><span class="s2"> expands to </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">pkgnvrs</span><span class="p">))</span>
<span class="k">for</span> <span class="n">pkgnvr</span> <span class="ow">in</span> <span class="n">pkgnvrs</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">install</span><span class="p">(</span><span class="n">pkgnvr</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="c1"># pylint: disable=broad-except</span>
<span class="k">if</span> <span class="n">required</span><span class="p">:</span>
<span class="k">raise</span>
<span class="c1"># Not required, log it and continue processing pkgs</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;installpkg </span><span class="si">%s</span><span class="s2"> failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">pkgnvr</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="c1"># pylint: disable=broad-except</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;installpkg </span><span class="si">%s</span><span class="s2"> failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="n">errors</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">errors</span> <span class="ow">and</span> <span class="n">required</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Required installpkg failed.&quot;</span><span class="p">)</span></div></div>
<span class="c1"># TODO: operate inside an actual chroot for safety? Not that RPM bothers..</span>
<div class="viewcode-block" id="LoraxTemplateRunner"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner">[docs]</a><span class="k">class</span> <span class="nc">LoraxTemplateRunner</span><span class="p">(</span><span class="n">TemplateRunner</span><span class="p">):</span>
<div class="viewcode-block" id="LoraxTemplateRunner"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner">[docs]</a><span class="k">class</span> <span class="nc">LoraxTemplateRunner</span><span class="p">(</span><span class="n">TemplateRunner</span><span class="p">,</span> <span class="n">InstallpkgMixin</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> This class parses and executes Lorax templates. Sample usage:</span>
@ -692,77 +744,6 @@
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s1">&#39;command returned failure (</span><span class="si">%d</span><span class="s1">)&#39;</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">returncode</span><span class="p">)</span>
<span class="k">raise</span></div>
<div class="viewcode-block" id="LoraxTemplateRunner.installpkg"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.installpkg">[docs]</a> <span class="k">def</span> <span class="nf">installpkg</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">pkgs</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> installpkg [--required|--optional] [--except PKGGLOB [--except PKGGLOB ...]] PKGGLOB [PKGGLOB ...]</span>
<span class="sd"> Request installation of all packages matching the given globs.</span>
<span class="sd"> Note that this is just a *request* - nothing is *actually* installed</span>
<span class="sd"> until the &#39;run_pkg_transaction&#39; command is given.</span>
<span class="sd"> --required is now the default. If the PKGGLOB can be missing pass --optional</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">if</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;--optional&#39;</span><span class="p">:</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">elif</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;--required&#39;</span><span class="p">:</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">excludes</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">while</span> <span class="s1">&#39;--except&#39;</span> <span class="ow">in</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="n">idx</span> <span class="o">=</span> <span class="n">pkgs</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="s1">&#39;--except&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">pkgs</span><span class="p">)</span> <span class="o">==</span> <span class="n">idx</span><span class="o">+</span><span class="mi">1</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;installpkg needs an argument after --except&quot;</span><span class="p">)</span>
<span class="n">excludes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">pkgs</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">1</span><span class="p">])</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[:</span><span class="n">idx</span><span class="p">]</span> <span class="o">+</span> <span class="n">pkgs</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">2</span><span class="p">:]</span>
<span class="n">errors</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># Start by using Subject to generate a package query, which will</span>
<span class="c1"># give us a query object similar to what dbo.install would select,</span>
<span class="c1"># minus the handling for multilib. This query may contain</span>
<span class="c1"># multiple arches. Pull the package names out of that, filter any</span>
<span class="c1"># that match the excludes patterns, and pass those names back to</span>
<span class="c1"># dbo.install to do the actual, arch and version and multilib</span>
<span class="c1"># aware, package selction.</span>
<span class="c1"># dnf queries don&#39;t have a concept of negative globs which is why</span>
<span class="c1"># the filtering is done the hard way.</span>
<span class="n">pkgnames</span> <span class="o">=</span> <span class="p">[</span><span class="n">pkg</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">dnf</span><span class="o">.</span><span class="n">subject</span><span class="o">.</span><span class="n">Subject</span><span class="p">(</span><span class="n">p</span><span class="p">)</span><span class="o">.</span><span class="n">get_best_query</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">latest</span><span class="o">=</span><span class="kc">True</span><span class="p">)]</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">pkgnames</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">PackageNotFoundError</span><span class="p">(</span><span class="s2">&quot;no package matched&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
<span class="c1"># Apply excludes to the name only</span>
<span class="k">for</span> <span class="n">exclude</span> <span class="ow">in</span> <span class="n">excludes</span><span class="p">:</span>
<span class="n">pkgnames</span> <span class="o">=</span> <span class="p">[</span><span class="n">pkg</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">pkgnames</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">fnmatch</span><span class="o">.</span><span class="n">fnmatch</span><span class="p">(</span><span class="n">pkg</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">exclude</span><span class="p">)]</span>
<span class="c1"># Convert to a sorted NVR list for installation</span>
<span class="n">pkgnvrs</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">([</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">-</span><span class="si">{}</span><span class="s2">-</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">pkg</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">pkg</span><span class="o">.</span><span class="n">version</span><span class="p">,</span> <span class="n">pkg</span><span class="o">.</span><span class="n">release</span><span class="p">)</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">pkgnames</span><span class="p">])</span>
<span class="c1"># If the request is a glob, expand it in the log</span>
<span class="k">if</span> <span class="nb">any</span><span class="p">(</span><span class="n">g</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;*&#39;</span><span class="p">,</span><span class="s1">&#39;?&#39;</span><span class="p">,</span><span class="s1">&#39;.&#39;</span><span class="p">]</span> <span class="k">if</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">p</span><span class="p">):</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;installpkg: </span><span class="si">%s</span><span class="s2"> expands to </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">pkgnvrs</span><span class="p">))</span>
<span class="k">for</span> <span class="n">pkgnvr</span> <span class="ow">in</span> <span class="n">pkgnvrs</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">install</span><span class="p">(</span><span class="n">pkgnvr</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="c1"># pylint: disable=broad-except</span>
<span class="k">if</span> <span class="n">required</span><span class="p">:</span>
<span class="k">raise</span>
<span class="c1"># Not required, log it and continue processing pkgs</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;installpkg </span><span class="si">%s</span><span class="s2"> failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">pkgnvr</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="c1"># pylint: disable=broad-except</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;installpkg </span><span class="si">%s</span><span class="s2"> failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="n">errors</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">errors</span> <span class="ow">and</span> <span class="n">required</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Required installpkg failed.&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="LoraxTemplateRunner.removepkg"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removepkg">[docs]</a> <span class="k">def</span> <span class="nf">removepkg</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">pkgs</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> removepkg PKGGLOB [PKGGLOB...]</span>
@ -961,7 +942,7 @@
<span class="k">except</span> <span class="n">CalledProcessError</span><span class="p">:</span>
<span class="k">pass</span></div></div>
<div class="viewcode-block" id="LiveTemplateRunner"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LiveTemplateRunner">[docs]</a><span class="k">class</span> <span class="nc">LiveTemplateRunner</span><span class="p">(</span><span class="n">TemplateRunner</span><span class="p">):</span>
<div class="viewcode-block" id="LiveTemplateRunner"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LiveTemplateRunner">[docs]</a><span class="k">class</span> <span class="nc">LiveTemplateRunner</span><span class="p">(</span><span class="n">TemplateRunner</span><span class="p">,</span> <span class="n">InstallpkgMixin</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This class parses and executes a limited Lorax template. Sample usage:</span>
@ -977,115 +958,34 @@
<span class="bp">self</span><span class="o">.</span><span class="n">pkgs</span> <span class="o">=</span> <span class="p">[]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">pkgnames</span> <span class="o">=</span> <span class="p">[]</span>
<span class="nb">super</span><span class="p">(</span><span class="n">LiveTemplateRunner</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">fatalerrors</span><span class="p">,</span> <span class="n">templatedir</span><span class="p">,</span> <span class="n">defaults</span><span class="p">)</span>
<div class="viewcode-block" id="LiveTemplateRunner.installpkg"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LiveTemplateRunner.installpkg">[docs]</a> <span class="k">def</span> <span class="nf">installpkg</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">pkgs</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> installpkg [--required|--optional] [--except PKGGLOB [--except PKGGLOB ...]] PKGGLOB [PKGGLOB ...]</span>
<span class="sd"> Request installation of all packages matching the given globs.</span>
<span class="sd"> Note that this is just a *request* - nothing is *actually* installed</span>
<span class="sd"> until the &#39;run_pkg_transaction&#39; command is given.</span>
<span class="sd"> --required is now the default. If the PKGGLOB can be missing pass --optional</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">if</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;--optional&#39;</span><span class="p">:</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">elif</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;--required&#39;</span><span class="p">:</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">required</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">excludes</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">while</span> <span class="s1">&#39;--except&#39;</span> <span class="ow">in</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="n">idx</span> <span class="o">=</span> <span class="n">pkgs</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="s1">&#39;--except&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">pkgs</span><span class="p">)</span> <span class="o">==</span> <span class="n">idx</span><span class="o">+</span><span class="mi">1</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;installpkg needs an argument after --except&quot;</span><span class="p">)</span>
<span class="n">excludes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">pkgs</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">1</span><span class="p">])</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">pkgs</span><span class="p">[:</span><span class="n">idx</span><span class="p">]</span> <span class="o">+</span> <span class="n">pkgs</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">2</span><span class="p">:]</span>
<span class="n">errors</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># Start by using Subject to generate a package query, which will</span>
<span class="c1"># give us a query object similar to what dbo.install would select,</span>
<span class="c1"># minus the handling for multilib. This query may contain</span>
<span class="c1"># multiple arches. Pull the package names out of that, filter any</span>
<span class="c1"># that match the excludes patterns, and pass those names back to</span>
<span class="c1"># dbo.install to do the actual, arch and version and multilib</span>
<span class="c1"># aware, package selction.</span>
<span class="c1"># dnf queries don&#39;t have a concept of negative globs which is why</span>
<span class="c1"># the filtering is done the hard way.</span>
<span class="n">pkgnames</span> <span class="o">=</span> <span class="p">[</span><span class="n">pkg</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">dnf</span><span class="o">.</span><span class="n">subject</span><span class="o">.</span><span class="n">Subject</span><span class="p">(</span><span class="n">p</span><span class="p">)</span><span class="o">.</span><span class="n">get_best_query</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">latest</span><span class="o">=</span><span class="kc">True</span><span class="p">)]</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">pkgnames</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">PackageNotFoundError</span><span class="p">(</span><span class="s2">&quot;no package matched&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
<span class="c1"># Apply excludes to the name only</span>
<span class="k">for</span> <span class="n">exclude</span> <span class="ow">in</span> <span class="n">excludes</span><span class="p">:</span>
<span class="n">pkgnames</span> <span class="o">=</span> <span class="p">[</span><span class="n">pkg</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">pkgnames</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">fnmatch</span><span class="o">.</span><span class="n">fnmatch</span><span class="p">(</span><span class="n">pkg</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">exclude</span><span class="p">)]</span>
<span class="c1"># Convert to a sorted NVR list for installation</span>
<span class="n">pkgnvrs</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">([</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2">-</span><span class="si">{}</span><span class="s2">-</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">pkg</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">pkg</span><span class="o">.</span><span class="n">version</span><span class="p">,</span> <span class="n">pkg</span><span class="o">.</span><span class="n">release</span><span class="p">)</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">pkgnames</span><span class="p">])</span>
<span class="c1"># If the request is a glob, expand it in the log</span>
<span class="k">if</span> <span class="nb">any</span><span class="p">(</span><span class="n">g</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">&#39;*&#39;</span><span class="p">,</span><span class="s1">&#39;?&#39;</span><span class="p">,</span><span class="s1">&#39;.&#39;</span><span class="p">]</span> <span class="k">if</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">p</span><span class="p">):</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;installpkg: </span><span class="si">%s</span><span class="s2"> expands to </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">pkgnvrs</span><span class="p">))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">pkgs</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">pkgnvrs</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">pkgnames</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="n">pkg</span><span class="o">.</span><span class="n">name</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">pkgnames</span><span class="p">])</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="c1"># pylint: disable=broad-except</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;installpkg </span><span class="si">%s</span><span class="s2"> failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="n">errors</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">errors</span> <span class="ow">and</span> <span class="n">required</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Required installpkg failed.&quot;</span><span class="p">)</span></div></div>
<span class="nb">super</span><span class="p">(</span><span class="n">LiveTemplateRunner</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">fatalerrors</span><span class="p">,</span> <span class="n">templatedir</span><span class="p">,</span> <span class="n">defaults</span><span class="p">)</span></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.monitor &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.monitor &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.monitor</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.monitor</h1><div class="highlight"><pre>
<span></span><span class="c1"># monitor.py</span>
<span class="c1">#</span>
@ -235,30 +146,25 @@
<span class="sd"> Loops until self.server.kill is True</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Processing logs from </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">client_address</span><span class="p">)</span>
<span class="n">line</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="n">data</span> <span class="o">=</span> <span class="sa">b</span><span class="s2">&quot;&quot;</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">kill</span><span class="p">:</span>
<span class="k">break</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">data</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">recv</span><span class="p">(</span><span class="mi">4096</span><span class="p">),</span> <span class="s2">&quot;utf8&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="o">.</span><span class="n">flush</span><span class="p">()</span>
<span class="c1"># check the data for errors and set error flag</span>
<span class="c1"># need to assemble it into lines so we can test for the error</span>
<span class="c1"># string.</span>
<span class="k">while</span> <span class="n">data</span><span class="p">:</span>
<span class="n">more</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">line</span> <span class="o">+=</span> <span class="n">more</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">more</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">iserror</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
<span class="n">line</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">more</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">data</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">recv</span><span class="p">(</span><span class="mi">4096</span><span class="p">)</span>
<span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">data</span><span class="o">.</span><span class="n">splitlines</span><span class="p">(</span><span class="n">keepends</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="k">if</span> <span class="n">line</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="sa">b</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">):</span>
<span class="c1"># Ignore invalid UTF8 inside lines</span>
<span class="bp">self</span><span class="o">.</span><span class="n">iserror</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">line</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="s2">&quot;utf8&quot;</span><span class="p">,</span> <span class="s2">&quot;ignore&quot;</span><span class="p">))</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="s2">&quot;utf8&quot;</span><span class="p">,</span> <span class="s2">&quot;ignore&quot;</span><span class="p">))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="o">.</span><span class="n">flush</span><span class="p">()</span>
<span class="n">data</span> <span class="o">=</span> <span class="sa">b</span><span class="s2">&quot;&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">data</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># Not the end of the line, keep for later</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">line</span>
<span class="k">break</span>
<span class="k">except</span> <span class="n">socket</span><span class="o">.</span><span class="n">timeout</span><span class="p">:</span>
<span class="k">pass</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="c1"># pylint: disable=broad-except</span>
@ -267,7 +173,6 @@
<div class="viewcode-block" id="LogRequestHandler.finish"><a class="viewcode-back" href="../../pylorax.html#pylorax.monitor.LogRequestHandler.finish">[docs]</a> <span class="k">def</span> <span class="nf">finish</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Shutting down log processing&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="o">.</span><span class="n">close</span><span class="p">()</span></div>
@ -362,50 +267,35 @@
<div class="viewcode-block" id="LogMonitor.shutdown"><a class="viewcode-back" href="../../pylorax.html#pylorax.monitor.LogMonitor.shutdown">[docs]</a> <span class="k">def</span> <span class="nf">shutdown</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Force shutdown of the monitoring thread&quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">kill</span> <span class="o">=</span> <span class="kc">True</span>
<span class="bp">self</span><span class="o">.</span><span class="n">server_thread</span><span class="o">.</span><span class="n">join</span><span class="p">()</span></div></div>
<span class="bp">self</span><span class="o">.</span><span class="n">server_thread</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">server_close</span><span class="p">()</span></div></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.mount &mdash; Lorax 36.4 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.mount &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.mount</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.mount</h1><div class="highlight"><pre>
<span></span><span class="c1"># mount.py</span>
<span class="c1">#</span>
@ -182,8 +93,7 @@
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;livemedia-creator&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">pycdlib</span>
<span class="kn">from</span> <span class="nn">pycdlib.pycdlibexception</span> <span class="kn">import</span> <span class="n">PyCdlibException</span>
<span class="kn">import</span> <span class="nn">iso9660</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span>
@ -221,7 +131,8 @@
<span class="n">kernel_list</span> <span class="o">=</span> <span class="p">[(</span><span class="s2">&quot;/isolinux/vmlinuz&quot;</span><span class="p">,</span> <span class="s2">&quot;/isolinux/initrd.img&quot;</span><span class="p">),</span>
<span class="p">(</span><span class="s2">&quot;/ppc/ppc64/vmlinuz&quot;</span><span class="p">,</span> <span class="s2">&quot;/ppc/ppc64/initrd.img&quot;</span><span class="p">),</span>
<span class="p">(</span><span class="s2">&quot;/images/pxeboot/vmlinuz&quot;</span><span class="p">,</span> <span class="s2">&quot;/images/pxeboot/initrd.img&quot;</span><span class="p">)]</span>
<span class="p">(</span><span class="s2">&quot;/images/pxeboot/vmlinuz&quot;</span><span class="p">,</span> <span class="s2">&quot;/images/pxeboot/initrd.img&quot;</span><span class="p">),</span>
<span class="p">(</span><span class="s2">&quot;/images/kernel.img&quot;</span><span class="p">,</span> <span class="s2">&quot;/images/initrd.img&quot;</span><span class="p">)]</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isdir</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mount_dir</span><span class="o">+</span><span class="s2">&quot;/repodata&quot;</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">repo</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mount_dir</span>
@ -253,59 +164,48 @@
<div class="viewcode-block" id="IsoMountpoint.get_iso_label"><a class="viewcode-back" href="../../pylorax.html#pylorax.mount.IsoMountpoint.get_iso_label">[docs]</a> <span class="k">def</span> <span class="nf">get_iso_label</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the iso&#39;s label using isoinfo</span>
<span class="sd"> Get the iso&#39;s label using pycdio</span>
<span class="sd"> Sets self.label if one is found</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">iso</span> <span class="o">=</span> <span class="n">pycdlib</span><span class="o">.</span><span class="n">PyCdlib</span><span class="p">()</span>
<span class="n">iso</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">iso_path</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">label</span> <span class="o">=</span> <span class="n">iso</span><span class="o">.</span><span class="n">pvd</span><span class="o">.</span><span class="n">volume_identifier</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">&quot;UTF-8&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
<span class="k">except</span> <span class="n">PyCdlibException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">iso</span> <span class="o">=</span> <span class="n">iso9660</span><span class="o">.</span><span class="n">ISO9660</span><span class="o">.</span><span class="n">IFS</span><span class="p">(</span><span class="n">source</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">iso_path</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">iso</span><span class="o">.</span><span class="n">is_open</span><span class="p">():</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;error opening file&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">label</span> <span class="o">=</span> <span class="n">iso</span><span class="o">.</span><span class="n">get_volume_id</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">label</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">label</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;error reading volume id&quot;</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">RuntimeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Problem reading label from </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">iso_path</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span></div></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.sysutils &mdash; Lorax 36.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.sysutils &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.sysutils</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.sysutils</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># sysutils.py</span>
@ -322,46 +233,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.treebuilder &mdash; Lorax 36.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.treebuilder &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.treebuilder</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.treebuilder</h1><div class="highlight"><pre>
<span></span><span class="c1"># treebuilder.py - handle arch-specific tree building stuff using templates</span>
<span class="c1">#</span>
@ -192,6 +103,7 @@
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.ltmpl</span> <span class="kn">import</span> <span class="n">LoraxTemplateRunner</span>
<span class="kn">import</span> <span class="nn">pylorax.imgutils</span> <span class="k">as</span> <span class="nn">imgutils</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">DracutChroot</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span><span class="p">,</span> <span class="n">execWithCapture</span>
<span class="n">templatemap</span> <span class="o">=</span> <span class="p">{</span>
@ -235,11 +147,6 @@
<span class="n">add_template_vars</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">skip_branding</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="n">root</span> <span class="o">=</span> <span class="n">dbo</span><span class="o">.</span><span class="n">conf</span><span class="o">.</span><span class="n">installroot</span>
<span class="c1"># use a copy of product so we can modify it locally</span>
<span class="n">product</span> <span class="o">=</span> <span class="n">product</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="n">product</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">product</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">vars</span> <span class="o">=</span> <span class="n">DataHolder</span><span class="p">(</span><span class="n">arch</span><span class="o">=</span><span class="n">arch</span><span class="p">,</span> <span class="n">product</span><span class="o">=</span><span class="n">product</span><span class="p">,</span> <span class="n">dbo</span><span class="o">=</span><span class="n">dbo</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">root</span><span class="p">,</span>
<span class="n">basearch</span><span class="o">=</span><span class="n">arch</span><span class="o">.</span><span class="n">basearch</span><span class="p">,</span> <span class="n">libdir</span><span class="o">=</span><span class="n">arch</span><span class="o">.</span><span class="n">libdir</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span> <span class="o">=</span> <span class="n">dbo</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span> <span class="o">=</span> <span class="n">LoraxTemplateRunner</span><span class="p">(</span><span class="n">inroot</span><span class="o">=</span><span class="n">root</span><span class="p">,</span> <span class="n">outroot</span><span class="o">=</span><span class="n">root</span><span class="p">,</span>
<span class="n">dbo</span><span class="o">=</span><span class="n">dbo</span><span class="p">,</span> <span class="n">templatedir</span><span class="o">=</span><span class="n">templatedir</span><span class="p">)</span>
@ -247,20 +154,29 @@
<span class="bp">self</span><span class="o">.</span><span class="n">add_template_vars</span> <span class="o">=</span> <span class="n">add_template_vars</span> <span class="ow">or</span> <span class="p">{}</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_installpkgs</span> <span class="o">=</span> <span class="n">installpkgs</span> <span class="ow">or</span> <span class="p">[]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_excludepkgs</span> <span class="o">=</span> <span class="n">excludepkgs</span> <span class="ow">or</span> <span class="p">[]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">defaults</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vars</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_skip_branding</span> <span class="o">=</span> <span class="n">skip_branding</span>
<span class="k">def</span> <span class="nf">_install_branding</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="c1"># use a copy of product so we can modify it locally</span>
<span class="n">product</span> <span class="o">=</span> <span class="n">product</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="n">product</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">product</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_branding</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_branding</span><span class="p">(</span><span class="n">skip_branding</span><span class="p">,</span> <span class="n">product</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">vars</span> <span class="o">=</span> <span class="n">DataHolder</span><span class="p">(</span><span class="n">arch</span><span class="o">=</span><span class="n">arch</span><span class="p">,</span> <span class="n">product</span><span class="o">=</span><span class="n">product</span><span class="p">,</span> <span class="n">dbo</span><span class="o">=</span><span class="n">dbo</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">root</span><span class="p">,</span>
<span class="n">basearch</span><span class="o">=</span><span class="n">arch</span><span class="o">.</span><span class="n">basearch</span><span class="p">,</span> <span class="n">libdir</span><span class="o">=</span><span class="n">arch</span><span class="o">.</span><span class="n">libdir</span><span class="p">,</span>
<span class="n">branding</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_branding</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">defaults</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vars</span>
<div class="viewcode-block" id="RuntimeBuilder.get_branding"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.RuntimeBuilder.get_branding">[docs]</a> <span class="k">def</span> <span class="nf">get_branding</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">skip</span><span class="p">,</span> <span class="n">product</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Select the branding from the available &#39;system-release&#39; packages</span>
<span class="sd"> The *best* way to control this is to have a single package in the repo provide &#39;system-release&#39;</span>
<span class="sd"> When there are more than 1 package it will:</span>
<span class="sd"> - Make a list of the available packages</span>
<span class="sd"> - If variant is set look for a package ending with lower(variant) and use that</span>
<span class="sd"> - If there are one or more non-generic packages, use the first one after sorting</span>
<span class="sd"> Returns the package names of the system-release and release logos package</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_skip_branding</span><span class="p">:</span>
<span class="k">return</span>
<span class="k">if</span> <span class="n">skip</span><span class="p">:</span>
<span class="k">return</span> <span class="n">DataHolder</span><span class="p">(</span><span class="n">release</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">logos</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
<span class="n">release</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">q</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="o">.</span><span class="n">query</span><span class="p">()</span>
@ -269,11 +185,11 @@
<span class="k">if</span> <span class="ow">not</span> <span class="n">p</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">&quot;generic&quot;</span><span class="p">)])</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;No system-release packages found, could not get the release&quot;</span><span class="p">)</span>
<span class="k">return</span>
<span class="k">return</span> <span class="n">DataHolder</span><span class="p">(</span><span class="n">release</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">logos</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">&quot;system-release packages: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">pkgs</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">product</span><span class="o">.</span><span class="n">variant</span><span class="p">:</span>
<span class="n">variant</span> <span class="o">=</span> <span class="p">[</span><span class="n">p</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pkgs</span> <span class="k">if</span> <span class="n">p</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">&quot;-&quot;</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">product</span><span class="o">.</span><span class="n">variant</span><span class="o">.</span><span class="n">lower</span><span class="p">())]</span>
<span class="k">if</span> <span class="n">product</span><span class="o">.</span><span class="n">variant</span><span class="p">:</span>
<span class="n">variant</span> <span class="o">=</span> <span class="p">[</span><span class="n">p</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pkgs</span> <span class="k">if</span> <span class="n">p</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">&quot;-&quot;</span><span class="o">+</span><span class="n">product</span><span class="o">.</span><span class="n">variant</span><span class="o">.</span><span class="n">lower</span><span class="p">())]</span>
<span class="k">if</span> <span class="n">variant</span><span class="p">:</span>
<span class="n">release</span> <span class="o">=</span> <span class="n">variant</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">release</span><span class="p">:</span>
@ -281,20 +197,25 @@
<span class="c1"># release</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">&#39;got release: </span><span class="si">%s</span><span class="s1">&#39;</span><span class="p">,</span> <span class="n">release</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">installpkg</span><span class="p">(</span><span class="n">release</span><span class="p">)</span>
<span class="c1"># logos</span>
<span class="n">release</span><span class="p">,</span> <span class="n">_suffix</span> <span class="o">=</span> <span class="n">release</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;-&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">installpkg</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%s</span><span class="s1">-logos&#39;</span> <span class="o">%</span> <span class="n">release</span><span class="p">)</span>
<span class="c1"># logos uses the basename from release (fedora, redhat, centos, ...)</span>
<span class="n">logos</span><span class="p">,</span> <span class="n">_suffix</span> <span class="o">=</span> <span class="n">release</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;-&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="k">return</span> <span class="n">DataHolder</span><span class="p">(</span><span class="n">release</span><span class="o">=</span><span class="n">release</span><span class="p">,</span> <span class="n">logos</span><span class="o">=</span><span class="n">logos</span><span class="o">+</span><span class="s2">&quot;-logos&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="RuntimeBuilder.install"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.RuntimeBuilder.install">[docs]</a> <span class="k">def</span> <span class="nf">install</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Install packages and do initial setup with runtime-install.tmpl&#39;&#39;&#39;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_install_branding</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_branding</span><span class="o">.</span><span class="n">release</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">installpkg</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_branding</span><span class="o">.</span><span class="n">release</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_branding</span><span class="o">.</span><span class="n">logos</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">installpkg</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_branding</span><span class="o">.</span><span class="n">logos</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_installpkgs</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">installpkg</span><span class="p">(</span><span class="o">*</span><span class="bp">self</span><span class="o">.</span><span class="n">_installpkgs</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_excludepkgs</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">removepkg</span><span class="p">(</span><span class="o">*</span><span class="bp">self</span><span class="o">.</span><span class="n">_excludepkgs</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="s2">&quot;runtime-install.tmpl&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">tmpl</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">add_templates</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_runner</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">tmpl</span><span class="p">,</span> <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">add_template_vars</span><span class="p">)</span></div>
@ -462,32 +383,31 @@
<span class="sd"> name of the kernel.</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="n">add_args</span> <span class="o">=</span> <span class="n">add_args</span> <span class="ow">or</span> <span class="p">[]</span>
<span class="n">dracut</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;dracut&quot;</span><span class="p">,</span> <span class="s2">&quot;--nomdadmconf&quot;</span><span class="p">,</span> <span class="s2">&quot;--nolvmconf&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">add_args</span>
<span class="n">args</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;--nomdadmconf&quot;</span><span class="p">,</span> <span class="s2">&quot;--nolvmconf&quot;</span><span class="p">]</span> <span class="o">+</span> <span class="n">add_args</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">backup</span><span class="p">:</span>
<span class="n">dracut</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;--force&quot;</span><span class="p">)</span>
<span class="n">args</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;--force&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">kernels</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;No kernels found, cannot rebuild_initrds&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">kernel</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">kernels</span><span class="p">:</span>
<span class="k">if</span> <span class="n">prefix</span><span class="p">:</span>
<span class="n">idir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">idir</span><span class="p">,</span> <span class="n">prefix</span><span class="o">+</span><span class="s1">&#39;-&#39;</span><span class="o">+</span><span class="n">kernel</span><span class="o">.</span><span class="n">version</span><span class="o">+</span><span class="s1">&#39;.img&#39;</span><span class="p">)</span>
<span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">kernel</span><span class="p">,</span> <span class="s2">&quot;initrd&quot;</span><span class="p">):</span>
<span class="c1"># If there is an existing initrd, use that</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">initrd</span><span class="o">.</span><span class="n">path</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Construct an initrd from the kernel name</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;vmlinuz-&quot;</span><span class="p">,</span> <span class="s2">&quot;initrd-&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.img&quot;</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;rebuilding </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;dracut warnings about /proc are safe to ignore&quot;</span><span class="p">)</span>
<span class="k">with</span> <span class="n">DracutChroot</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">)</span> <span class="k">as</span> <span class="n">dracut</span><span class="p">:</span>
<span class="k">for</span> <span class="n">kernel</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">kernels</span><span class="p">:</span>
<span class="k">if</span> <span class="n">prefix</span><span class="p">:</span>
<span class="n">idir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">idir</span><span class="p">,</span> <span class="n">prefix</span><span class="o">+</span><span class="s1">&#39;-&#39;</span><span class="o">+</span><span class="n">kernel</span><span class="o">.</span><span class="n">version</span><span class="o">+</span><span class="s1">&#39;.img&#39;</span><span class="p">)</span>
<span class="k">elif</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">kernel</span><span class="p">,</span> <span class="s2">&quot;initrd&quot;</span><span class="p">):</span>
<span class="c1"># If there is an existing initrd, use that</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">initrd</span><span class="o">.</span><span class="n">path</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Construct an initrd from the kernel name</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;vmlinuz-&quot;</span><span class="p">,</span> <span class="s2">&quot;initrd-&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.img&quot;</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;rebuilding </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="k">if</span> <span class="n">backup</span><span class="p">:</span>
<span class="n">initrd</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">initrd</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">initrd</span><span class="p">,</span> <span class="n">initrd</span> <span class="o">+</span> <span class="n">backup</span><span class="p">)</span>
<span class="n">cmd</span> <span class="o">=</span> <span class="n">dracut</span> <span class="o">+</span> <span class="p">[</span><span class="n">outfile</span><span class="p">,</span> <span class="n">kernel</span><span class="o">.</span><span class="n">version</span><span class="p">]</span>
<span class="n">runcmd</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">)</span></div>
<span class="k">if</span> <span class="n">backup</span><span class="p">:</span>
<span class="n">initrd</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">initrd</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">initrd</span><span class="p">,</span> <span class="n">initrd</span> <span class="o">+</span> <span class="n">backup</span><span class="p">)</span>
<span class="n">dracut</span><span class="o">.</span><span class="n">Run</span><span class="p">(</span><span class="n">args</span> <span class="o">+</span> <span class="p">[</span><span class="n">outfile</span><span class="p">,</span> <span class="n">kernel</span><span class="o">.</span><span class="n">version</span><span class="p">])</span></div>
<div class="viewcode-block" id="TreeBuilder.build"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.TreeBuilder.build">[docs]</a> <span class="k">def</span> <span class="nf">build</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">templatefile</span> <span class="o">=</span> <span class="n">templatemap</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">arch</span><span class="o">.</span><span class="n">basearch</span><span class="p">]</span>
@ -585,46 +505,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylorax.treeinfo &mdash; Lorax 36.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<title>pylorax.treeinfo &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
@ -93,71 +44,31 @@
<li class="toctree-l1"><a class="reference internal" href="../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../index.html">Module code</a> &raquo;</li>
<li><a href="../pylorax.html">pylorax</a> &raquo;</li>
<li>pylorax.treeinfo</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pylorax.treeinfo</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># treeinfo.py</span>
@ -225,46 +136,30 @@
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -0,0 +1,99 @@
image-minimizer
===============
:Authors:
Brian C. Lane <bcl@redhat.com>
`image-minimizer` is a script used as an interpreter for kickstart `%post`
sections. It is used to remove rpm packages and individual files from the
system that Anaconda has just installed.
It processes a list of commands that tell it which files or rpms to remove, and
which to keep.
image-minimizer cmdline arguments
---------------------------------
`usage: image-minimizer [-h] [-i STRING] [--dryrun] [-v] STRING`
Optional arguments
^^^^^^^^^^^^^^^^^^
-h, --help show this help message and exit
-i STRING, --installroot STRING
Root path to prepend to all file patterns and
installation root for RPM operations. Defaults to
INSTALL_ROOT or /mnt/sysimage/
--dryrun If set, no filesystem changes are made.
-v, --verbose Display every action as it is performed.
Positional arguments
^^^^^^^^^^^^^^^^^^^^
:STRING: Filename to process
NOTES
-----
You cannot pass any arguments to `image-minimizer` when using it from the
kickstart `%post`.
When using this from a kickstart the image-minimizer package needs to be available.
It is not included on the standard boot.iso, so you will need to include `lorax` in
the `%package` section. You can use `image-minimizer` to remove lorax from the install.
If you are using this with `livemedia-creator` it can be installed on the host
system so that `lorax` isn't needed in the `%package` list, and it doesn't need
to be removed.
commands
--------
Commands are listed one per line, followed by a space, and then by the
package, file, or glob. The globs used are Unix style pathname patterns using
`*`, `?`, and `[]` character ranges. globbing is implemented using the python
glob module.
* drop <PATTERN>
This will remove files from the installation.
* keep <PATTERN>
This will keep files, and should follow any `drop` commands including globs.
* droprpm <PATTERN>
Remove matching rpm packages. Dependencies are not remove, just individual
packages matching the glob.
* keeprpm <PATTERN>
Do not remove matching rpm packages, it should follow any `droprpm` commands
that include globs.
example
-------
Example Anaconda `%post` usage::
%post --interpreter=image-minimizer --nochroot
drop /lib/modules/*/kernel/fs
keep /lib/modules/*/kernel/fs/ext*
keep /lib/modules/*/kernel/fs/mbcache*
keep /lib/modules/*/kernel/fs/squashfs
droprpm make
droprpm mtools
droprpm mysql-libs
droprpm perl
droprpm perl-Pod-*
droprpm syslinux
keeprpm perl-Pod-Simple
# Not needed after image-minimizer is done
droprpm lorax
%end

View File

@ -16,14 +16,15 @@ Contents:
livemedia-creator
mkksiso
product-images
image-minimizer
modules
Documentation for other Lorax Branches
======================================
* `Fedora 34 <f33-branch/>`_
* `Fedora 35 <f35-branch/>`_
* `Fedora 34 <f34-branch/>`_
* `Fedora 33 <f33-branch/>`_
* `Fedora 32 <f32-branch/>`_
* `RHEL8 lorax-composer <rhel8-branch/>`_
* `RHEL7 lorax-composer <lorax-composer/>`_

View File

@ -171,7 +171,6 @@ changes. Here are the steps I used to convert the Fedora XFCE spin.
dracut-live
-dracut-config-rescue
grub2-efi
memtest86+
syslinux
User created repositories

View File

@ -10,7 +10,9 @@ the iso is booted. If the original iso was created with EFI and Mac support the
kickstart boot.iso will include this support as well.
``mkksiso`` needs to be run as root, it depends on mounting the original iso
and you need to be root to be able to do that.
and you need to be root to be able to do that. The host system architecture
needs to match that of the iso. ``mkksiso`` will raise an error if it finds a
.discinfo on the iso with a mismatched arch.
mkksiso cmdline arguments

View File

@ -130,7 +130,7 @@ ul.search li a {
font-weight: bold;
}
ul.search li div.context {
ul.search li p.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
@ -277,25 +277,25 @@ p.rubric {
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, .figure.align-default {
img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@ -319,7 +319,8 @@ img.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
div.sidebar,
aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
@ -377,12 +378,14 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
aside.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
aside.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
@ -455,20 +458,22 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */
div.figure {
div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
div.figure p.caption, figcaption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
div.figure p.caption span.caption-number,
figcaption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
div.figure p.caption span.caption-text,
figcaption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
@ -503,6 +508,63 @@ table.hlist td {
vertical-align: top;
}
/* -- object description styles --------------------------------------------- */
.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}
.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}
.sig-name {
font-size: 1.1em;
}
code.descname {
font-size: 1.2em;
}
.sig-prename, code.descclassname {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.sig-param.n {
font-style: italic;
}
/* C++ specific styling */
.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}
.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}
.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}
.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
/* -- other body styles ----------------------------------------------------- */
@ -629,14 +691,6 @@ dl.glossary dt {
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@ -765,8 +819,12 @@ div.code-block-caption code {
table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
}
div.code-block-caption span.caption-number {
@ -781,16 +839,6 @@ div.literal-block-wrapper {
margin: 1em 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;

View File

@ -1 +1 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:local("fontawesome/FontAwesome") format("truetype")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:local("fontawesome/FontAwesome") format("truetype")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

File diff suppressed because one or more lines are too long

View File

@ -301,12 +301,14 @@ var Documentation = {
window.location.href = prevHref;
return false;
}
break;
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
break;
}
}
});

View File

@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '35.1',
VERSION: '36.5',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',

File diff suppressed because one or more lines are too long

View File

@ -282,7 +282,10 @@ var Search = {
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
var summary = Search.makeSearchSummary(data, searchterms, hlterms);
if (summary) {
listItem.append(summary);
}
}
Search.output.append(listItem);
setTimeout(function() {
@ -498,6 +501,9 @@ var Search = {
*/
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
if (text == "") {
return null;
}
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
@ -509,7 +515,7 @@ var Search = {
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
var rv = $('<p class="context"></p>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,69 +1,31 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>Index &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -71,18 +33,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
@ -90,72 +41,33 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Index</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1 id="index">Index</h1>
@ -277,17 +189,19 @@
</li>
<li><a href="pylorax.html#pylorax.imgutils.dm_attach">dm_attach() (in module pylorax.imgutils)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.imgutils.dm_detach">dm_detach() (in module pylorax.imgutils)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.imgutils.DMDev">DMDev (class in pylorax.imgutils)</a>
</li>
<li><a href="pylorax.html#pylorax.imgutils.do_grafts">do_grafts() (in module pylorax.imgutils)</a>
</li>
<li><a href="pylorax.html#pylorax.creator.dracut_args">dracut_args() (in module pylorax.creator)</a>
</li>
<li><a href="pylorax.html#pylorax.treebuilder.TreeBuilder.dracut_hooks_path">dracut_hooks_path() (pylorax.treebuilder.TreeBuilder property)</a>
<li><a href="pylorax.html#pylorax.treebuilder.TreeBuilder.dracut_hooks_path">dracut_hooks_path (pylorax.treebuilder.TreeBuilder property)</a>
</li>
<li><a href="pylorax.html#pylorax.imgutils.DracutChroot">DracutChroot (class in pylorax.imgutils)</a>
</li>
</ul></td>
</tr></table>
@ -344,6 +258,8 @@
<li><a href="pylorax.html#pylorax.treebuilder.generate_module_info">generate_module_info() (in module pylorax.treebuilder)</a>
</li>
<li><a href="pylorax.html#pylorax.creator.get_arch">get_arch() (in module pylorax.creator)</a>
</li>
<li><a href="pylorax.html#pylorax.treebuilder.RuntimeBuilder.get_branding">get_branding() (pylorax.treebuilder.RuntimeBuilder method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
@ -395,12 +311,10 @@
</li>
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.installkernel">installkernel() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
</li>
<li><a href="pylorax.html#pylorax.ltmpl.LiveTemplateRunner.installpkg">installpkg() (pylorax.ltmpl.LiveTemplateRunner method)</a>
<ul>
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.installpkg">(pylorax.ltmpl.LoraxTemplateRunner method)</a>
<li><a href="pylorax.html#pylorax.ltmpl.InstallpkgMixin.installpkg">installpkg() (pylorax.ltmpl.InstallpkgMixin method)</a>
</li>
<li><a href="pylorax.html#pylorax.ltmpl.InstallpkgMixin">InstallpkgMixin (class in pylorax.ltmpl)</a>
</li>
</ul></li>
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.installupgradeinitrd">installupgradeinitrd() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
</li>
<li><a href="pylorax.html#pylorax.creator.is_image_mounted">is_image_mounted() (in module pylorax.creator)</a>
@ -423,7 +337,7 @@
<h2 id="K">K</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.treebuilder.TreeBuilder.kernels">kernels() (pylorax.treebuilder.TreeBuilder property)</a>
<li><a href="pylorax.html#pylorax.treebuilder.TreeBuilder.kernels">kernels (pylorax.treebuilder.TreeBuilder property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
@ -800,6 +714,8 @@
<li><a href="pylorax.html#pylorax.ltmpl.rglob">rglob() (in module pylorax.ltmpl)</a>
</li>
<li><a href="pylorax.html#pylorax.imgutils.round_to_blocks">round_to_blocks() (in module pylorax.imgutils)</a>
</li>
<li><a href="pylorax.html#pylorax.imgutils.DracutChroot.Run">Run() (pylorax.imgutils.DracutChroot method)</a>
</li>
<li><a href="pylorax.html#pylorax.Lorax.run">run() (pylorax.Lorax method)</a>
@ -861,7 +777,7 @@
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.Lorax.templatedir">templatedir() (pylorax.Lorax property)</a>
<li><a href="pylorax.html#pylorax.Lorax.templatedir">templatedir (pylorax.Lorax property)</a>
</li>
<li><a href="pylorax.html#pylorax.ltmpl.TemplateRunner">TemplateRunner (class in pylorax.ltmpl)</a>
</li>
@ -933,46 +849,30 @@
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -0,0 +1,222 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>image-minimizer &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="src" href="modules.html" />
<link rel="prev" title="Product and Updates Images" href="product-images.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">image-minimizer</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#image-minimizer-cmdline-arguments">image-minimizer cmdline arguments</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#optional-arguments">Optional arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#positional-arguments">Positional arguments</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#notes">NOTES</a></li>
<li class="toctree-l2"><a class="reference internal" href="#commands">commands</a></li>
<li class="toctree-l2"><a class="reference internal" href="#example">example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>image-minimizer</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/image-minimizer.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="image-minimizer">
<h1>image-minimizer<a class="headerlink" href="#image-minimizer" title="Permalink to this headline"></a></h1>
<dl class="field-list simple">
<dt class="field-odd">Authors</dt>
<dd class="field-odd"><p>Brian C. Lane &lt;<a class="reference external" href="mailto:bcl&#37;&#52;&#48;redhat&#46;com">bcl<span>&#64;</span>redhat<span>&#46;</span>com</a>&gt;</p>
</dd>
</dl>
<p><cite>image-minimizer</cite> is a script used as an interpreter for kickstart <cite>%post</cite>
sections. It is used to remove rpm packages and individual files from the
system that Anaconda has just installed.</p>
<p>It processes a list of commands that tell it which files or rpms to remove, and
which to keep.</p>
<section id="image-minimizer-cmdline-arguments">
<h2>image-minimizer cmdline arguments<a class="headerlink" href="#image-minimizer-cmdline-arguments" title="Permalink to this headline"></a></h2>
<blockquote>
<div><p><cite>usage: image-minimizer [-h] [-i STRING] [--dryrun] [-v] STRING</cite></p>
</div></blockquote>
<section id="optional-arguments">
<h3>Optional arguments<a class="headerlink" href="#optional-arguments" title="Permalink to this headline"></a></h3>
<blockquote>
<div><dl class="option-list">
<dt><kbd><span class="option">-h</span>, <span class="option">--help</span></kbd></dt>
<dd><p>show this help message and exit</p>
</dd>
<dt><kbd><span class="option">-i <var>STRING</var></span>, <span class="option">--installroot <var>STRING</var></span></kbd></dt>
<dd><p>Root path to prepend to all file patterns and
installation root for RPM operations. Defaults to
INSTALL_ROOT or /mnt/sysimage/</p>
</dd>
<dt><kbd><span class="option">--dryrun</span></kbd></dt>
<dd><p>If set, no filesystem changes are made.</p>
</dd>
<dt><kbd><span class="option">-v</span>, <span class="option">--verbose</span></kbd></dt>
<dd><p>Display every action as it is performed.</p>
</dd>
</dl>
</div></blockquote>
</section>
<section id="positional-arguments">
<h3>Positional arguments<a class="headerlink" href="#positional-arguments" title="Permalink to this headline"></a></h3>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">STRING</dt>
<dd class="field-odd"><p>Filename to process</p>
</dd>
</dl>
</div></blockquote>
</section>
</section>
<section id="notes">
<h2>NOTES<a class="headerlink" href="#notes" title="Permalink to this headline"></a></h2>
<p>You cannot pass any arguments to <cite>image-minimizer</cite> when using it from the
kickstart <cite>%post</cite>.</p>
<p>When using this from a kickstart the image-minimizer package needs to be available.
It is not included on the standard boot.iso, so you will need to include <cite>lorax</cite> in
the <cite>%package</cite> section. You can use <cite>image-minimizer</cite> to remove lorax from the install.</p>
<p>If you are using this with <cite>livemedia-creator</cite> it can be installed on the host
system so that <cite>lorax</cite> isn't needed in the <cite>%package</cite> list, and it doesn't need
to be removed.</p>
</section>
<section id="commands">
<h2>commands<a class="headerlink" href="#commands" title="Permalink to this headline"></a></h2>
<p>Commands are listed one per line, followed by a space, and then by the
package, file, or glob. The globs used are Unix style pathname patterns using
<cite>*</cite>, <cite>?</cite>, and <cite>[]</cite> character ranges. globbing is implemented using the python
glob module.</p>
<ul class="simple">
<li><p>drop &lt;PATTERN&gt;
This will remove files from the installation.</p></li>
<li><p>keep &lt;PATTERN&gt;
This will keep files, and should follow any <cite>drop</cite> commands including globs.</p></li>
<li><p>droprpm &lt;PATTERN&gt;
Remove matching rpm packages. Dependencies are not remove, just individual
packages matching the glob.</p></li>
<li><p>keeprpm &lt;PATTERN&gt;
Do not remove matching rpm packages, it should follow any <cite>droprpm</cite> commands
that include globs.</p></li>
</ul>
</section>
<section id="example">
<h2>example<a class="headerlink" href="#example" title="Permalink to this headline"></a></h2>
<p>Example Anaconda <cite>%post</cite> usage:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span><span class="n">post</span> <span class="o">--</span><span class="n">interpreter</span><span class="o">=</span><span class="n">image</span><span class="o">-</span><span class="n">minimizer</span> <span class="o">--</span><span class="n">nochroot</span>
<span class="n">drop</span> <span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">modules</span><span class="o">/*/</span><span class="n">kernel</span><span class="o">/</span><span class="n">fs</span>
<span class="n">keep</span> <span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">modules</span><span class="o">/*/</span><span class="n">kernel</span><span class="o">/</span><span class="n">fs</span><span class="o">/</span><span class="n">ext</span><span class="o">*</span>
<span class="n">keep</span> <span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">modules</span><span class="o">/*/</span><span class="n">kernel</span><span class="o">/</span><span class="n">fs</span><span class="o">/</span><span class="n">mbcache</span><span class="o">*</span>
<span class="n">keep</span> <span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">modules</span><span class="o">/*/</span><span class="n">kernel</span><span class="o">/</span><span class="n">fs</span><span class="o">/</span><span class="n">squashfs</span>
<span class="n">droprpm</span> <span class="n">make</span>
<span class="n">droprpm</span> <span class="n">mtools</span>
<span class="n">droprpm</span> <span class="n">mysql</span><span class="o">-</span><span class="n">libs</span>
<span class="n">droprpm</span> <span class="n">perl</span>
<span class="n">droprpm</span> <span class="n">perl</span><span class="o">-</span><span class="n">Pod</span><span class="o">-*</span>
<span class="n">droprpm</span> <span class="n">syslinux</span>
<span class="n">keeprpm</span> <span class="n">perl</span><span class="o">-</span><span class="n">Pod</span><span class="o">-</span><span class="n">Simple</span>
<span class="c1"># Not needed after image-minimizer is done</span>
<span class="n">droprpm</span> <span class="n">lorax</span>
<span class="o">%</span><span class="n">end</span>
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="product-images.html" class="btn btn-neutral float-left" title="Product and Updates Images" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="modules.html" class="btn btn-neutral float-right" title="src" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@ -1,70 +1,33 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to Lorax&#39;s documentation! &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>Welcome to Lorax&#39;s documentation! &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Introduction to Lorax" href="intro.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="#" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -72,18 +35,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
@ -91,75 +43,35 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="#" class="icon icon-home"></a> &raquo;</li>
<li>Welcome to Lorax's documentation!</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="welcome-to-lorax-s-documentation">
<section id="welcome-to-lorax-s-documentation">
<h1>Welcome to Lorax's documentation!<a class="headerlink" href="#welcome-to-lorax-s-documentation" title="Permalink to this headline"></a></h1>
<p>Contents:</p>
<div class="toctree-wrapper compound">
@ -170,74 +82,58 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
<div class="section" id="documentation-for-other-lorax-branches">
</section>
<section id="documentation-for-other-lorax-branches">
<h1>Documentation for other Lorax Branches<a class="headerlink" href="#documentation-for-other-lorax-branches" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><p><a class="reference external" href="f33-branch/">Fedora 34</a></p></li>
<li><p><a class="reference external" href="f35-branch/">Fedora 35</a></p></li>
<li><p><a class="reference external" href="f34-branch/">Fedora 34</a></p></li>
<li><p><a class="reference external" href="f33-branch/">Fedora 33</a></p></li>
<li><p><a class="reference external" href="f32-branch/">Fedora 32</a></p></li>
<li><p><a class="reference external" href="rhel8-branch/">RHEL8 lorax-composer</a></p></li>
<li><p><a class="reference external" href="lorax-composer/">RHEL7 lorax-composer</a></p></li>
</ul>
</div>
<div class="section" id="indices-and-tables">
</section>
<section id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
</div>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="intro.html" class="btn btn-neutral float-right" title="Introduction to Lorax" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,71 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Introduction to Lorax &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>Introduction to Lorax &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Lorax" href="lorax.html" />
<link rel="prev" title="Welcome to Lorax&#39;s documentation!" href="index.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,18 +36,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="#before-lorax">Before Lorax</a></li>
@ -92,75 +44,35 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Introduction to Lorax</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/intro.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="introduction-to-lorax">
<section id="introduction-to-lorax">
<h1>Introduction to Lorax<a class="headerlink" href="#introduction-to-lorax" title="Permalink to this headline"></a></h1>
<p>I am the Lorax. I speak for the trees [and images].</p>
<p>Lorax is used to build the Anaconda Installer boot.iso, it consists of a
@ -168,8 +80,8 @@ library, pylorax, a set of templates, and the lorax script. Its operation
is driven by a customized set of Mako templates that lists the packages
to be installed, steps to execute to remove unneeded files, and creation
of the iso for all of the supported architectures.</p>
</div>
<div class="section" id="before-lorax">
</section>
<section id="before-lorax">
<h1>Before Lorax<a class="headerlink" href="#before-lorax" title="Permalink to this headline"></a></h1>
<p>Tree building tools such as pungi and revisor rely on 'buildinstall' in
anaconda/scripts/ to produce the boot images and other such control files
@ -209,54 +121,37 @@ it's not completely clear from reading the scripts.</p>
<p>Create a new central driver with all information living in Python modules.
Configuration files will provide the knowledge previously contained in the
upd-instroot and mk-images* scripts.</p>
</div>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="lorax.html" class="btn btn-neutral float-right" title="Lorax" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Welcome to Lorax&#39;s documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="lorax.html" class="btn btn-neutral float-right" title="Lorax" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,71 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>livemedia-creator &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>livemedia-creator &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="mkksiso" href="mkksiso.html" />
<link rel="prev" title="Lorax" href="lorax.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,25 +36,14 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax.html">Lorax</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">livemedia-creator</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#livemedia-creator-cmdline-arguments">livemedia-creator cmdline arguments</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#Named Arguments">Named Arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#options">options</a></li>
<li class="toctree-l3"><a class="reference internal" href="#disk/fs image arguments">disk/fs image arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#appliance arguments">appliance arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#qemu arguments">qemu arguments</a></li>
@ -128,75 +80,35 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>livemedia-creator</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/livemedia-creator.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="livemedia-creator">
<section id="livemedia-creator">
<h1>livemedia-creator<a class="headerlink" href="#livemedia-creator" title="Permalink to this headline"></a></h1>
<dl class="field-list simple">
<dt class="field-odd">Authors</dt>
@ -224,22 +136,36 @@ you have the anaconda-tui package installed.</p>
<p><code class="docutils literal notranslate"><span class="pre">lmc</span></code> is an abbreviation for livemedia-creator.</p>
<p><code class="docutils literal notranslate"><span class="pre">builder</span></code> is the system where livemedia-creator is being run</p>
<p><code class="docutils literal notranslate"><span class="pre">image</span></code> is the disk image being created by running livemedia-creator</p>
<div class="section" id="livemedia-creator-cmdline-arguments">
<section id="livemedia-creator-cmdline-arguments">
<h2>livemedia-creator cmdline arguments<a class="headerlink" href="#livemedia-creator-cmdline-arguments" title="Permalink to this headline"></a></h2>
<p><p>Create Live Install Media</p>
</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">livemedia</span><span class="o">-</span><span class="n">creator</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">(</span><span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">iso</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">disk</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">fsimage</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">appliance</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ami</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">tar</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">tar</span><span class="o">-</span><span class="n">disk</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">pxe</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ostree</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">oci</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">vagrant</span><span class="p">)</span>
<span class="p">[</span><span class="o">--</span><span class="n">iso</span> <span class="n">ISO</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">iso</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">iso</span><span class="o">-</span><span class="n">name</span> <span class="n">ISO_NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">ks</span> <span class="n">KS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">virt</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">proxy</span> <span class="n">PROXY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">anaconda</span><span class="o">-</span><span class="n">arg</span> <span class="n">ANACONDA_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">armplatform</span> <span class="n">ARMPLATFORM</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">location</span> <span class="n">LOCATION</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">logfile</span> <span class="n">LOGFILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">lorax</span><span class="o">-</span><span class="n">templates</span> <span class="n">LORAX_TEMPLATES</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">tmp</span> <span class="n">TMP</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">resultdir</span> <span class="n">RESULT_DIR</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">macboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">nomacboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">extra</span><span class="o">-</span><span class="n">boot</span><span class="o">-</span><span class="n">args</span> <span class="n">EXTRA_BOOT_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">disk</span><span class="o">-</span><span class="n">image</span> <span class="n">DISK_IMAGE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">keep</span><span class="o">-</span><span class="n">image</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fs</span><span class="o">-</span><span class="n">image</span> <span class="n">FS_IMAGE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">name</span> <span class="n">IMAGE_NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">tar</span><span class="o">-</span><span class="n">disk</span><span class="o">-</span><span class="n">name</span> <span class="n">TAR_DISK_NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fs</span><span class="o">-</span><span class="n">label</span> <span class="n">FS_LABEL</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">size</span><span class="o">-</span><span class="n">align</span> <span class="n">IMAGE_SIZE_ALIGN</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="nb">type</span> <span class="n">IMAGE_TYPE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">qemu</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">compression</span> <span class="n">COMPRESSION</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">compress</span><span class="o">-</span><span class="n">arg</span> <span class="n">COMPRESS_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">name</span> <span class="n">APP_NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">template</span> <span class="n">APP_TEMPLATE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">file</span> <span class="n">APP_FILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">ram</span> <span class="n">MEMORY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">vcpus</span> <span class="n">VCPUS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">vnc</span> <span class="n">VNC</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">arch</span> <span class="n">ARCH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">kernel</span><span class="o">-</span><span class="n">args</span> <span class="n">KERNEL_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">ovmf</span><span class="o">-</span><span class="n">path</span> <span class="n">OVMF_PATH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">virt</span><span class="o">-</span><span class="n">uefi</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">kvm</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="k">with</span><span class="o">-</span><span class="n">rng</span> <span class="n">WITH_RNG</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">conf</span> <span class="n">DRACUT_CONF</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">arg</span> <span class="n">DRACUT_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">live</span><span class="o">-</span><span class="n">rootfs</span><span class="o">-</span><span class="n">size</span> <span class="n">LIVE_ROOTFS_SIZE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">live</span><span class="o">-</span><span class="n">rootfs</span><span class="o">-</span><span class="n">keep</span><span class="o">-</span><span class="n">size</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">oci</span><span class="o">-</span><span class="n">config</span> <span class="n">OCI_CONFIG</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">oci</span><span class="o">-</span><span class="n">runtime</span> <span class="n">OCI_RUNTIME</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">vagrant</span><span class="o">-</span><span class="n">metadata</span> <span class="n">VAGRANT_METADATA</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">vagrantfile</span> <span class="n">VAGRANTFILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">project</span> <span class="n">PROJECT</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">releasever</span> <span class="n">RELEASEVER</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">volid</span> <span class="n">VOLID</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">squashfs</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">timeout</span> <span class="n">TIMEOUT</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">V</span><span class="p">]</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">livemedia</span><span class="o">-</span><span class="n">creator</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span>
<span class="p">(</span><span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">iso</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">disk</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">fsimage</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">appliance</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ami</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">tar</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">tar</span><span class="o">-</span><span class="n">disk</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">pxe</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ostree</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">oci</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">vagrant</span><span class="p">)</span>
<span class="p">[</span><span class="o">--</span><span class="n">iso</span> <span class="n">ISO</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">iso</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">iso</span><span class="o">-</span><span class="n">name</span> <span class="n">ISO_NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">ks</span> <span class="n">KS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">only</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">virt</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">proxy</span> <span class="n">PROXY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">anaconda</span><span class="o">-</span><span class="n">arg</span> <span class="n">ANACONDA_ARGS</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">armplatform</span> <span class="n">ARMPLATFORM</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">location</span> <span class="n">LOCATION</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">logfile</span> <span class="n">LOGFILE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">lorax</span><span class="o">-</span><span class="n">templates</span> <span class="n">LORAX_TEMPLATES</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">tmp</span> <span class="n">TMP</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">resultdir</span> <span class="n">RESULT_DIR</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">macboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">nomacboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">extra</span><span class="o">-</span><span class="n">boot</span><span class="o">-</span><span class="n">args</span> <span class="n">EXTRA_BOOT_ARGS</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">disk</span><span class="o">-</span><span class="n">image</span> <span class="n">DISK_IMAGE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">keep</span><span class="o">-</span><span class="n">image</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fs</span><span class="o">-</span><span class="n">image</span> <span class="n">FS_IMAGE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">name</span> <span class="n">IMAGE_NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">tar</span><span class="o">-</span><span class="n">disk</span><span class="o">-</span><span class="n">name</span> <span class="n">TAR_DISK_NAME</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">fs</span><span class="o">-</span><span class="n">label</span> <span class="n">FS_LABEL</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">size</span><span class="o">-</span><span class="n">align</span> <span class="n">IMAGE_SIZE_ALIGN</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="nb">type</span> <span class="n">IMAGE_TYPE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">qemu</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">compression</span> <span class="n">COMPRESSION</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">compress</span><span class="o">-</span><span class="n">arg</span> <span class="n">COMPRESS_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">name</span> <span class="n">APP_NAME</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">template</span> <span class="n">APP_TEMPLATE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">file</span> <span class="n">APP_FILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">ram</span> <span class="n">MEMORY</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">vcpus</span> <span class="n">VCPUS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">vnc</span> <span class="n">VNC</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">arch</span> <span class="n">ARCH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">kernel</span><span class="o">-</span><span class="n">args</span> <span class="n">KERNEL_ARGS</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">ovmf</span><span class="o">-</span><span class="n">path</span> <span class="n">OVMF_PATH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">virt</span><span class="o">-</span><span class="n">uefi</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">kvm</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="k">with</span><span class="o">-</span><span class="n">rng</span> <span class="n">WITH_RNG</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">conf</span> <span class="n">DRACUT_CONF</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">arg</span> <span class="n">DRACUT_ARGS</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">live</span><span class="o">-</span><span class="n">rootfs</span><span class="o">-</span><span class="n">size</span> <span class="n">LIVE_ROOTFS_SIZE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">live</span><span class="o">-</span><span class="n">rootfs</span><span class="o">-</span><span class="n">keep</span><span class="o">-</span><span class="n">size</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">oci</span><span class="o">-</span><span class="n">config</span> <span class="n">OCI_CONFIG</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">oci</span><span class="o">-</span><span class="n">runtime</span> <span class="n">OCI_RUNTIME</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">vagrant</span><span class="o">-</span><span class="n">metadata</span> <span class="n">VAGRANT_METADATA</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">vagrantfile</span> <span class="n">VAGRANTFILE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">project</span> <span class="n">PROJECT</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">releasever</span> <span class="n">RELEASEVER</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">volid</span> <span class="n">VOLID</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">squashfs</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">timeout</span> <span class="n">TIMEOUT</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">V</span><span class="p">]</span>
</pre></div>
</div>
<div class="section" id="Named Arguments">
<h3>Named Arguments<a class="headerlink" href="#Named Arguments" title="Permalink to this headline"></a></h3>
<section id="options">
<h3>options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--make-iso</kbd></dt>
<dd><p>Build a live iso</p>
@ -350,7 +276,7 @@ you have the anaconda-tui package installed.</p>
</dd>
<dt><kbd>--releasever</kbd></dt>
<dd><p>substituted for &#64;VERSION&#64; in bootloader config files</p>
<p>Default: &quot;34&quot;</p>
<p>Default: &quot;36&quot;</p>
</dd>
<dt><kbd>--volid</kbd></dt>
<dd><p>volume id</p>
@ -366,8 +292,8 @@ you have the anaconda-tui package installed.</p>
<dd><p>show program's version number and exit</p>
</dd>
</dl>
</div>
<div class="section" id="disk/fs image arguments">
</section>
<section id="disk/fs image arguments">
<h3>disk/fs image arguments<a class="headerlink" href="#disk/fs image arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--disk-image</kbd></dt>
@ -418,8 +344,8 @@ you have the anaconda-tui package installed.</p>
<p>Default: []</p>
</dd>
</dl>
</div>
<div class="section" id="appliance arguments">
</section>
<section id="appliance arguments">
<h3>appliance arguments<a class="headerlink" href="#appliance arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--app-name</kbd></dt>
@ -433,8 +359,8 @@ you have the anaconda-tui package installed.</p>
<p>Default: &quot;appliance.xml&quot;</p>
</dd>
</dl>
</div>
<div class="section" id="qemu arguments">
</section>
<section id="qemu arguments">
<h3>qemu arguments<a class="headerlink" href="#qemu arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--ram</kbd></dt>
@ -470,8 +396,8 @@ you have the anaconda-tui package installed.</p>
<p>Default: &quot;/dev/random&quot;</p>
</dd>
</dl>
</div>
<div class="section" id="dracut arguments: (default: )">
</section>
<section id="dracut arguments: (default: )">
<h3>dracut arguments: (default: )<a class="headerlink" href="#dracut arguments: (default: )" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--dracut-conf</kbd></dt>
@ -481,8 +407,8 @@ you have the anaconda-tui package installed.</p>
<dd><p>Argument to pass to dracut when rebuilding the initramfs. Pass this once for each argument. NOTE: this overrides the defaults.</p>
</dd>
</dl>
</div>
<div class="section" id="pxe to live arguments">
</section>
<section id="pxe to live arguments">
<h3>pxe to live arguments<a class="headerlink" href="#pxe to live arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--live-rootfs-size</kbd></dt>
@ -494,8 +420,8 @@ you have the anaconda-tui package installed.</p>
<p>Default: False</p>
</dd>
</dl>
</div>
<div class="section" id="OCI arguments">
</section>
<section id="OCI arguments">
<h3>OCI arguments<a class="headerlink" href="#OCI arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--oci-config</kbd></dt>
@ -505,8 +431,8 @@ you have the anaconda-tui package installed.</p>
<dd><p>runtime.json OCI configuration file</p>
</dd>
</dl>
</div>
<div class="section" id="Vagrant arguments">
</section>
<section id="Vagrant arguments">
<h3>Vagrant arguments<a class="headerlink" href="#Vagrant arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--vagrant-metadata</kbd></dt>
@ -516,9 +442,9 @@ you have the anaconda-tui package installed.</p>
<dd><p>optional vagrantfile</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="quickstart">
</section>
</section>
<section id="quickstart">
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline"></a></h2>
<p>Run this to create a bootable live iso:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">livemedia</span><span class="o">-</span><span class="n">creator</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">iso</span> \
@ -535,8 +461,8 @@ you have the anaconda-tui package installed.</p>
chosen, or you can use a specific port by passing it. eg. <code class="docutils literal notranslate"><span class="pre">--vnc</span> <span class="pre">vnc:127.0.0.1:5</span></code></p>
<p>This is usually a good idea when testing changes to the kickstart. lmc tries
to monitor the logs for fatal errors, but may not catch everything.</p>
</div>
<div class="section" id="how-iso-creation-works">
</section>
<section id="how-iso-creation-works">
<h2>How ISO creation works<a class="headerlink" href="#how-iso-creation-works" title="Permalink to this headline"></a></h2>
<p>There are 2 stages, the install stage which produces a disk or filesystem image
as its output, and the boot media creation which uses the image as its input.
@ -570,8 +496,8 @@ the kernel, initrd, the squashfs filesystem, etc. If you only want the
boot.iso you can pass <code class="docutils literal notranslate"><span class="pre">--iso-only</span></code> and the other files will be removed. You
can also name the iso by using <code class="docutils literal notranslate"><span class="pre">--iso-name</span> <span class="pre">my-live.iso</span></code>.</p>
</div>
</div>
<div class="section" id="kickstarts">
</section>
<section id="kickstarts">
<h2>Kickstarts<a class="headerlink" href="#kickstarts" title="Permalink to this headline"></a></h2>
<p>The docs/ directory includes several example kickstarts, one to create a live
desktop iso using GNOME, and another to create a minimal disk image. When
@ -622,16 +548,15 @@ dracut-config-generic
dracut-live
-dracut-config-rescue
grub2-efi
memtest86+
syslinux</p></li>
</ol>
<div class="section" id="user-created-repositories">
<section id="user-created-repositories">
<h3>User created repositories<a class="headerlink" href="#user-created-repositories" title="Permalink to this headline"></a></h3>
<p>If you are using your own repositories and installing groups (eg. &#64;core) make
sure you create the repodata with groups like this <code class="docutils literal notranslate"><span class="pre">createrepo</span> <span class="pre">-g</span>
<span class="pre">/path/to/groups.xml</span> <span class="pre">/path/to/rpms</span></code></p>
</div>
<div class="section" id="using-a-proxy-with-repos">
</section>
<section id="using-a-proxy-with-repos">
<h3>Using a Proxy with repos<a class="headerlink" href="#using-a-proxy-with-repos" title="Permalink to this headline"></a></h3>
<p>One drawback to using qemu is that it pulls the packages from the repo each
time you run it. To speed things up you either need a local mirror of the
@ -654,9 +579,9 @@ named <code class="docutils literal notranslate"><span class="pre">updates</span
<span class="n">repo</span> <span class="o">--</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;repo2&quot;</span> <span class="o">--</span><span class="n">baseurl</span><span class="o">=</span><span class="n">SECOND</span><span class="o">-</span><span class="n">REPO_URL</span> <span class="o">--</span><span class="n">proxy</span><span class="o">=</span><span class="n">PROXY</span><span class="o">-</span><span class="n">URL</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="anaconda-image-install-no-virt">
</section>
</section>
<section id="anaconda-image-install-no-virt">
<h2>Anaconda image install (no-virt)<a class="headerlink" href="#anaconda-image-install-no-virt" title="Permalink to this headline"></a></h2>
<p>You can create images without using qemu by passing <code class="docutils literal notranslate"><span class="pre">--no-virt</span></code> on the
cmdline. This will use Anaconda's directory install feature to handle the
@ -688,8 +613,8 @@ virt.</p>
logged for debugging purposes and if there are SELinux denials they should
be reported as a bug.</p>
</div>
</div>
<div class="section" id="ami-images">
</section>
<section id="ami-images">
<h2>AMI Images<a class="headerlink" href="#ami-images" title="Permalink to this headline"></a></h2>
<p>Amazon EC2 images can be created by using the --make-ami switch and an appropriate
kickstart file. All of the work to customize the image is handled by the kickstart.
@ -699,8 +624,8 @@ that it would work with livemedia-creator.</p>
<p><code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">livemedia-creator</span> <span class="pre">--make-ami</span> <span class="pre">--iso=/path/to/boot.iso</span> <span class="pre">--ks=./docs/fedora-livemedia-ec2.ks</span></code></p>
<p>This will produce an ami-root.img file in the working directory.</p>
<p>At this time I have not tested the image with EC2. Feedback would be welcome.</p>
</div>
<div class="section" id="appliance-creation">
</section>
<section id="appliance-creation">
<h2>Appliance Creation<a class="headerlink" href="#appliance-creation" title="Permalink to this headline"></a></h2>
<p>livemedia-creator can now replace appliance-tools by using the --make-appliance
switch. This will create the partitioned disk image and an XML file that can be
@ -752,8 +677,8 @@ from <code class="docutils literal notranslate"><span class="pre">--releasever</
<span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="nb">type</span><span class="o">=</span><span class="n">qcow2</span> <span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">file</span><span class="o">=</span><span class="n">minimal</span><span class="o">-</span><span class="n">test</span><span class="o">.</span><span class="n">xml</span> <span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">name</span><span class="o">=</span><span class="n">minimal</span><span class="o">-</span><span class="n">test</span><span class="o">.</span><span class="n">img</span>
</pre></div>
</div>
</div>
<div class="section" id="filesystem-image-creation">
</section>
<section id="filesystem-image-creation">
<h2>Filesystem Image Creation<a class="headerlink" href="#filesystem-image-creation" title="Permalink to this headline"></a></h2>
<p>livemedia-creator can be used to create un-partitined filesystem images using
the <code class="docutils literal notranslate"><span class="pre">--make-fsimage</span></code> option. As of version 21.8 this works with both qemu and
@ -763,8 +688,8 @@ no-virt modes of operation. Previously it was only available with no-virt.</p>
<div><p><code class="docutils literal notranslate"><span class="pre">livemedia-creator</span> <span class="pre">--make-fsimage</span> <span class="pre">--iso=/path/to/boot.iso</span> <span class="pre">--ks=./docs/fedora-minimal.ks</span></code></p>
</div></blockquote>
<p>You can name the output image with <code class="docutils literal notranslate"><span class="pre">--image-name</span></code> and set a label on the filesystem with <code class="docutils literal notranslate"><span class="pre">--fs-label</span></code></p>
</div>
<div class="section" id="tar-file-creation">
</section>
<section id="tar-file-creation">
<h2>TAR File Creation<a class="headerlink" href="#tar-file-creation" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">--make-tar</span></code> command can be used to create a tar of the root filesystem. By
default it is compressed using xz, but this can be changed using the
@ -776,15 +701,15 @@ no-virt install methods.</p>
<span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">name</span><span class="o">=</span><span class="n">fedora</span><span class="o">-</span><span class="n">root</span><span class="o">.</span><span class="n">tar</span><span class="o">.</span><span class="n">xz</span>
</pre></div>
</div>
</div>
<div class="section" id="live-image-for-pxe-boot">
</section>
<section id="live-image-for-pxe-boot">
<h2>Live Image for PXE Boot<a class="headerlink" href="#live-image-for-pxe-boot" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">--make-pxe-live</span></code> command will produce squashfs image containing live root
filesystem that can be used for pxe boot. Directory with results will contain
the live image, kernel image, initrd image and template of pxe configuration
for the images.</p>
</div>
<div class="section" id="atomic-live-image-for-pxe-boot">
</section>
<section id="atomic-live-image-for-pxe-boot">
<h2>Atomic Live Image for PXE Boot<a class="headerlink" href="#atomic-live-image-for-pxe-boot" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">--make-ostree-live</span></code> command will produce the same result as <code class="docutils literal notranslate"><span class="pre">--make-pxe-live</span></code>
for installations of Atomic Host. Example kickstart for such an installation
@ -793,8 +718,8 @@ in docs/rhel-atomic-pxe-live.ks.</p>
<p>The PXE images can also be created with <code class="docutils literal notranslate"><span class="pre">--no-virt</span></code> by using the example
kickstart in docs/fedora-atomic-pxe-live-novirt.ks. This also works inside the
mock environment.</p>
</div>
<div class="section" id="using-mock-and-no-virt-to-create-images">
</section>
<section id="using-mock-and-no-virt-to-create-images">
<h2>Using Mock and --no-virt to Create Images<a class="headerlink" href="#using-mock-and-no-virt-to-create-images" title="Permalink to this headline"></a></h2>
<p>As of lorax version 22.2 you can use livemedia-creator and anaconda version
22.15 inside of a mock chroot with --make-iso and --make-fsimage.</p>
@ -850,8 +775,8 @@ group.</p>
including anaconda logs and livemedia-creator logs. The new iso will be
located at ~/results/try-1/images/boot.iso, and the ~/results/try-1/
directory tree will also contain the vmlinuz, initrd, etc.</p>
</div>
<div class="section" id="using-mock-and-qemu-to-create-images">
</section>
<section id="using-mock-and-qemu-to-create-images">
<h2>Using Mock and qemu to Create Images<a class="headerlink" href="#using-mock-and-qemu-to-create-images" title="Permalink to this headline"></a></h2>
<p>Version 25.0 of livemedia-creator switches to using qemu for virtualization.
This allows creation of all image types, and use of the KVM on the host if
@ -901,8 +826,8 @@ located at ~/results/try-1/images/boot.iso, and the ~/results/try-1/
directory tree will also contain the vmlinuz, initrd, etc.</p>
<p>This will run qemu without kvm support, which is going to be very slow. You can
add <code class="docutils literal notranslate"><span class="pre">mknod</span> <span class="pre">/dev/kvm</span> <span class="pre">c</span> <span class="pre">10</span> <span class="pre">232;</span></code> to create the device node before running lmc.</p>
</div>
<div class="section" id="openstack-image-creation">
</section>
<section id="openstack-image-creation">
<h2>OpenStack Image Creation<a class="headerlink" href="#openstack-image-creation" title="Permalink to this headline"></a></h2>
<p>OpenStack supports partitioned disk images so <code class="docutils literal notranslate"><span class="pre">--make-disk</span></code> can be used to
create images for importing into glance, OpenStack's image storage component.
@ -926,8 +851,8 @@ cloud-utils-growpart will grow the image to fit the instance's disk size.</p>
</pre></div>
</div>
<p>If qcow2 wasn't used then <code class="docutils literal notranslate"><span class="pre">--disk-format</span></code> should be set to raw.</p>
</div>
<div class="section" id="docker-image-creation">
</section>
<section id="docker-image-creation">
<h2>Docker Image Creation<a class="headerlink" href="#docker-image-creation" title="Permalink to this headline"></a></h2>
<p>Use lmc to create a tarfile as described in the <a class="reference internal" href="#tar-file-creation">TAR File Creation</a> section, but substitute the
fedora-docker.ks example kickstart which removes the requirement for core files and the kernel.</p>
@ -939,8 +864,8 @@ fedora-docker.ks example kickstart which removes the requirement for core files
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">docker</span> <span class="pre">run</span> <span class="pre">-i</span> <span class="pre">-t</span> <span class="pre">fedora-root</span> <span class="pre">/bin/bash</span></code></p>
</div></blockquote>
</div>
<div class="section" id="open-container-initiative-image-creation">
</section>
<section id="open-container-initiative-image-creation">
<h2>Open Container Initiative Image Creation<a class="headerlink" href="#open-container-initiative-image-creation" title="Permalink to this headline"></a></h2>
<p>The OCI is a new specification that is still being worked on. You can read more about it at
<a class="reference external" href="https://www.opencontainers.org/">the Open Container Initiative website</a>. You can create
@ -954,8 +879,8 @@ their specifications can be found <a class="reference external" href="https://gi
output will be in the results directory with a default name of bundle.tar.xz</p>
<p>This will work with <code class="docutils literal notranslate"><span class="pre">--no-virt</span></code> and inside a mock since it doesn't use any
partitioned disk images.</p>
</div>
<div class="section" id="vagrant-image-creation">
</section>
<section id="vagrant-image-creation">
<h2>Vagrant Image Creation<a class="headerlink" href="#vagrant-image-creation" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="https://www.vagrantup.com/">Vagrant</a> images can be created using the following command:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">livemedia</span><span class="o">-</span><span class="n">creator</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">vagrant</span> <span class="o">--</span><span class="n">vagrant</span><span class="o">-</span><span class="n">metadata</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">metadata</span><span class="o">.</span><span class="n">json</span> \
@ -973,8 +898,8 @@ the vagrant user with the default insecure SSH pubkey and a few useful
utilities.</p>
<p>This also works with <code class="docutils literal notranslate"><span class="pre">--no-virt</span></code>, but will not work inside a mock due to its
use of partitioned disk images and qcow2.</p>
</div>
<div class="section" id="creating-uefi-disk-images-with-virt">
</section>
<section id="creating-uefi-disk-images-with-virt">
<h2>Creating UEFI disk images with virt<a class="headerlink" href="#creating-uefi-disk-images-with-virt" title="Permalink to this headline"></a></h2>
<p>Partitioned disk images can only be created for the same platform as the host system (BIOS or
UEFI). You can use virt to create BIOS images on UEFI systems, and it is also possible
@ -995,8 +920,8 @@ firmware files.</p>
<p class="admonition-title">Note</p>
<p>The --virt-uefi method is currently only supported on the x86_64 architecture.</p>
</div>
</div>
<div class="section" id="debugging-problems">
</section>
<section id="debugging-problems">
<h2>Debugging problems<a class="headerlink" href="#debugging-problems" title="Permalink to this headline"></a></h2>
<p>Sometimes an installation will get stuck. When using qemu the logs will
be written to ./virt-install.log and most of the time any problems that happen
@ -1033,62 +958,45 @@ running the <code class="docutils literal notranslate"><span class="pre">anacond
multi-threaded and it can sometimes become stuck and refuse to exit. When this
happens you can usually clean up by first killing the anaconda process then
running <code class="docutils literal notranslate"><span class="pre">anaconda-cleanup</span></code>.</p>
</div>
<div class="section" id="hacking">
</section>
<section id="hacking">
<h2>Hacking<a class="headerlink" href="#hacking" title="Permalink to this headline"></a></h2>
<p>Development on this will take place as part of the lorax project, and on the
anaconda-devel-list mailing list, and <a class="reference external" href="https://github.com/rhinstaller/lorax">on github</a></p>
<p>Feedback, enhancements and bugs are welcome. You can use <a class="reference external" href="https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&amp;component=lorax">bugzilla</a> to
report bugs against the lorax component.</p>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="mkksiso.html" class="btn btn-neutral float-right" title="mkksiso" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="lorax.html" class="btn btn-neutral float-left" title="Lorax" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="mkksiso.html" class="btn btn-neutral float-right" title="mkksiso" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,71 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lorax &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>Lorax &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="livemedia-creator" href="livemedia-creator.html" />
<link rel="prev" title="Introduction to Lorax" href="intro.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,27 +36,16 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Lorax</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#lorax-cmdline-arguments">lorax cmdline arguments</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#Positional Arguments">Positional Arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Named Arguments">Named Arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#options">options</a></li>
<li class="toctree-l3"><a class="reference internal" href="#required arguments">required arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Named Arguments_repeat1">Named Arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Named Arguments">Named Arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#dracut arguments: (default: )">dracut arguments: (default: )</a></li>
</ul>
</li>
@ -118,75 +70,35 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Lorax</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/lorax.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="lorax">
<section id="lorax">
<h1>Lorax<a class="headerlink" href="#lorax" title="Permalink to this headline"></a></h1>
<dl class="field-list simple">
<dt class="field-odd">Authors</dt>
@ -202,34 +114,39 @@ environment. It is best to run lorax from the same release as is being targeted
because the templates may have release specific logic in them. eg. Use the
rawhide version to build the boot.iso for rawhide, along with the rawhide
repositories.</p>
<div class="section" id="lorax-cmdline-arguments">
<section id="lorax-cmdline-arguments">
<h2>lorax cmdline arguments<a class="headerlink" href="#lorax-cmdline-arguments" title="Permalink to this headline"></a></h2>
<p><p>Create the Anaconda boot.iso</p>
</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">lorax</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="o">-</span><span class="n">p</span> <span class="n">PRODUCT</span> <span class="o">-</span><span class="n">v</span> <span class="n">VERSION</span> <span class="o">-</span><span class="n">r</span> <span class="n">RELEASE</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">REPOSITORY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">repo</span> <span class="n">REPOSITORY</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">m</span> <span class="n">REPOSITORY</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">t</span> <span class="n">VARIANT</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">b</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">isfinal</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">c</span> <span class="n">CONFIGFILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">proxy</span> <span class="n">HOST</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">i</span> <span class="n">PACKAGE</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">PACKAGE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">buildarch</span> <span class="n">ARCH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">volid</span> <span class="n">VOLID</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">macboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">nomacboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">noupgrade</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">logfile</span> <span class="n">LOGFILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">tmp</span> <span class="n">TMP</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">cachedir</span> <span class="n">CACHEDIR</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">workdir</span> <span class="n">WORKDIR</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">force</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">template</span> <span class="n">ADD_TEMPLATES</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">template</span><span class="o">-</span><span class="n">var</span> <span class="n">ADD_TEMPLATE_VARS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">arch</span><span class="o">-</span><span class="n">template</span> <span class="n">ADD_ARCH_TEMPLATES</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">arch</span><span class="o">-</span><span class="n">template</span><span class="o">-</span><span class="n">var</span> <span class="n">ADD_ARCH_TEMPLATE_VARS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">noverify</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">sharedir</span> <span class="n">SHAREDIR</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">enablerepo</span> <span class="p">[</span><span class="n">repo</span><span class="p">]]</span>
<span class="p">[</span><span class="o">--</span><span class="n">disablerepo</span> <span class="p">[</span><span class="n">repo</span><span class="p">]]</span> <span class="p">[</span><span class="o">--</span><span class="n">rootfs</span><span class="o">-</span><span class="n">size</span> <span class="n">ROOTFS_SIZE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">noverifyssl</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dnfplugin</span> <span class="n">DNFPLUGINS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">squashfs</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">skip</span><span class="o">-</span><span class="n">branding</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">conf</span> <span class="n">DRACUT_CONF</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">arg</span> <span class="n">DRACUT_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">V</span><span class="p">]</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">lorax</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="o">-</span><span class="n">p</span> <span class="n">PRODUCT</span> <span class="o">-</span><span class="n">v</span> <span class="n">VERSION</span> <span class="o">-</span><span class="n">r</span> <span class="n">RELEASE</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">REPOSITORY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">repo</span> <span class="n">REPOSITORY</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">m</span> <span class="n">REPOSITORY</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">t</span> <span class="n">VARIANT</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">b</span> <span class="n">URL</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">isfinal</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">c</span> <span class="n">CONFIGFILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">proxy</span> <span class="n">HOST</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">i</span> <span class="n">PACKAGE</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">e</span> <span class="n">PACKAGE</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">buildarch</span> <span class="n">ARCH</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">volid</span> <span class="n">VOLID</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">macboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">nomacboot</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">noupgrade</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">logfile</span> <span class="n">LOGFILE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">tmp</span> <span class="n">TMP</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">cachedir</span> <span class="n">CACHEDIR</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">workdir</span> <span class="n">WORKDIR</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">force</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">template</span> <span class="n">ADD_TEMPLATES</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">template</span><span class="o">-</span><span class="n">var</span> <span class="n">ADD_TEMPLATE_VARS</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">arch</span><span class="o">-</span><span class="n">template</span> <span class="n">ADD_ARCH_TEMPLATES</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">add</span><span class="o">-</span><span class="n">arch</span><span class="o">-</span><span class="n">template</span><span class="o">-</span><span class="n">var</span> <span class="n">ADD_ARCH_TEMPLATE_VARS</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">noverify</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">sharedir</span> <span class="n">SHAREDIR</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">enablerepo</span> <span class="p">[</span><span class="n">repo</span><span class="p">]]</span> <span class="p">[</span><span class="o">--</span><span class="n">disablerepo</span> <span class="p">[</span><span class="n">repo</span><span class="p">]]</span>
<span class="p">[</span><span class="o">--</span><span class="n">rootfs</span><span class="o">-</span><span class="n">size</span> <span class="n">ROOTFS_SIZE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">noverifyssl</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dnfplugin</span> <span class="n">DNFPLUGINS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">squashfs</span><span class="o">-</span><span class="n">only</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">skip</span><span class="o">-</span><span class="n">branding</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">conf</span> <span class="n">DRACUT_CONF</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dracut</span><span class="o">-</span><span class="n">arg</span> <span class="n">DRACUT_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">V</span><span class="p">]</span>
<span class="n">OUTPUTDIR</span>
</pre></div>
</div>
<div class="section" id="Positional Arguments">
<section id="Positional Arguments">
<h3>Positional Arguments<a class="headerlink" href="#Positional Arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>OUTPUTDIR</kbd></dt>
<dd><p>Output directory</p>
</dd>
</dl>
</div>
<div class="section" id="Named Arguments">
<h3>Named Arguments<a class="headerlink" href="#Named Arguments" title="Permalink to this headline"></a></h3>
</section>
<section id="options">
<h3>options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>-V</kbd></dt>
<dd><p>show program's version number and exit</p>
</dd>
</dl>
</div>
<div class="section" id="required arguments">
</section>
<section id="required arguments">
<h3>required arguments<a class="headerlink" href="#required arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>-p, --product</kbd></dt>
@ -250,9 +167,9 @@ repositories.</p>
<p>Default: []</p>
</dd>
</dl>
</div>
<div class="section" id="Named Arguments_repeat1">
<h3>Named Arguments<a class="headerlink" href="#Named Arguments_repeat1" title="Permalink to this headline"></a></h3>
</section>
<section id="Named Arguments">
<h3>Named Arguments<a class="headerlink" href="#Named Arguments" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>-m, --mirrorlist</kbd></dt>
<dd><p>mirrorlist repository (may be listed multiple times)</p>
@ -371,8 +288,8 @@ repositories.</p>
<p>Default: False</p>
</dd>
</dl>
</div>
<div class="section" id="dracut arguments: (default: )">
</section>
<section id="dracut arguments: (default: )">
<h3>dracut arguments: (default: )<a class="headerlink" href="#dracut arguments: (default: )" title="Permalink to this headline"></a></h3>
<dl class="option-list">
<dt><kbd>--dracut-conf</kbd></dt>
@ -382,9 +299,9 @@ repositories.</p>
<dd><p>Argument to pass to dracut when rebuilding the initramfs. Pass this once for each argument. NOTE: this overrides the defaults.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="quickstart">
</section>
</section>
<section id="quickstart">
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline"></a></h2>
<p>Run this as root to create a boot.iso in <code class="docutils literal notranslate"><span class="pre">./results/</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dnf</span> <span class="n">install</span> <span class="n">lorax</span>
@ -400,14 +317,14 @@ repositories.</p>
override the ones in the distribution repositories.</p>
<p>Under <code class="docutils literal notranslate"><span class="pre">./results/</span></code> will be the release tree files: .discinfo, .treeinfo, everything that
goes onto the boot.iso, the pxeboot directory, and the boot.iso under <code class="docutils literal notranslate"><span class="pre">./results/images/</span></code>.</p>
</div>
<div class="section" id="branding">
</section>
<section id="branding">
<h2>Branding<a class="headerlink" href="#branding" title="Permalink to this headline"></a></h2>
<p>By default lorax will search for the first package that provides <code class="docutils literal notranslate"><span class="pre">system-release</span></code>
that doesn't start with <code class="docutils literal notranslate"><span class="pre">generic-</span></code> and will install it. It then selects a
corresponding logo package by using the first part of the system-release package and
appending <code class="docutils literal notranslate"><span class="pre">-logos</span></code> to it. eg. fedora-release and fedora-logos.</p>
<div class="section" id="variants">
<section id="variants">
<h3>Variants<a class="headerlink" href="#variants" title="Permalink to this headline"></a></h3>
<p>If a <code class="docutils literal notranslate"><span class="pre">variant</span></code> is passed to lorax it will select a <code class="docutils literal notranslate"><span class="pre">system-release</span></code> package that
ends with the variant name. eg. Passing <code class="docutils literal notranslate"><span class="pre">--variant</span> <span class="pre">workstation</span></code> will select the
@ -415,8 +332,8 @@ ends with the variant name. eg. Passing <code class="docutils literal notranslat
the same way it does for non-variants. eg. <code class="docutils literal notranslate"><span class="pre">fedora-logos</span></code>.</p>
<p>If there is no package ending with the variant name it will fall back to using the
first non-generic package providing <code class="docutils literal notranslate"><span class="pre">system-release</span></code>.</p>
</div>
<div class="section" id="custom-branding">
</section>
<section id="custom-branding">
<h3>Custom Branding<a class="headerlink" href="#custom-branding" title="Permalink to this headline"></a></h3>
<p>If <code class="docutils literal notranslate"><span class="pre">--skip-branding</span></code> is passed to lorax it will skip selecting the
<code class="docutils literal notranslate"><span class="pre">system-release</span></code>, and logos packages and leave it up to the user to pass any
@ -427,9 +344,9 @@ and <code class="docutils literal notranslate"><span class="pre">fedora-logos</s
<p>Note that this does not prevent something else in the dependency tree from
causing these packages to be included. Using <code class="docutils literal notranslate"><span class="pre">--excludepkgs</span></code> may help if they
are unexpectedly included.</p>
</div>
</div>
<div class="section" id="running-inside-of-mock">
</section>
</section>
<section id="running-inside-of-mock">
<h2>Running inside of mock<a class="headerlink" href="#running-inside-of-mock" title="Permalink to this headline"></a></h2>
<p>As of mock version 2.0 you no longer need to pass <code class="docutils literal notranslate"><span class="pre">--old-chroot</span></code>. You will,
however, need to pass <code class="docutils literal notranslate"><span class="pre">--enable-network</span></code> so that the mock container can download
@ -438,8 +355,8 @@ packages.</p>
to mock. These versions of mock default to using systemd-nspawn which cannot
create the needed loop device nodes. Passing <code class="docutils literal notranslate"><span class="pre">--old-chroot</span></code> will use the old
system where <code class="docutils literal notranslate"><span class="pre">/dev/loop*</span></code> is setup for you.</p>
</div>
<div class="section" id="how-it-works">
</section>
<section id="how-it-works">
<h2>How it works<a class="headerlink" href="#how-it-works" title="Permalink to this headline"></a></h2>
<p>Lorax uses <a class="reference external" href="https://github.com/rpm-software-management/dnf">dnf</a> to install
packages into a temporary directory, sets up configuration files, it then
@ -453,14 +370,14 @@ supports <code class="docutils literal notranslate"><span class="pre">%if/%endif
<span class="pre">%&gt;</span></code> tags and variable substitution with <code class="docutils literal notranslate"><span class="pre">${}</span></code>. The default templates are
shipped with lorax in <code class="docutils literal notranslate"><span class="pre">/usr/share/lorax/templates.d/99-generic/</span></code> and use the
<code class="docutils literal notranslate"><span class="pre">.tmpl</span></code> extension.</p>
<div class="section" id="runtime-install-tmpl">
<section id="runtime-install-tmpl">
<h3>runtime-install.tmpl<a class="headerlink" href="#runtime-install-tmpl" title="Permalink to this headline"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">runtime-install.tmpl</span></code> template lists packages to be installed using the
<code class="docutils literal notranslate"><span class="pre">installpkg</span></code> command. This template is fairly simple, installing common packages and
architecture specific packages. It must end with the <code class="docutils literal notranslate"><span class="pre">run_pkg_transaction</span></code>
command which tells dnf to download and install the packages.</p>
</div>
<div class="section" id="runtime-postinstall-tmpl">
</section>
<section id="runtime-postinstall-tmpl">
<h3>runtime-postinstall.tmpl<a class="headerlink" href="#runtime-postinstall-tmpl" title="Permalink to this headline"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">runtime-postinstall.tmpl</span></code> template is where the system configuration
happens. The installer environment is similar to a normal running system, but
@ -480,8 +397,8 @@ installation. A number of template commands are used here:</p>
<li><p><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.symlink" title="pylorax.ltmpl.LoraxTemplateRunner.symlink"><code class="xref py py-func docutils literal notranslate"><span class="pre">symlink</span></code></a> creates a symlink</p></li>
<li><p><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.systemctl" title="pylorax.ltmpl.LoraxTemplateRunner.systemctl"><code class="xref py py-func docutils literal notranslate"><span class="pre">systemctl</span></code></a> runs systemctl in the installroot</p></li>
</ul>
</div>
<div class="section" id="runtime-cleanup-tmpl">
</section>
<section id="runtime-cleanup-tmpl">
<h3>runtime-cleanup.tmpl<a class="headerlink" href="#runtime-cleanup-tmpl" title="Permalink to this headline"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">runtime-cleanup.tmpl</span></code> template is used to remove files that aren't strictly needed
by the installation environment. In addition to the <code class="docutils literal notranslate"><span class="pre">remove</span></code> template command it uses:</p>
@ -495,15 +412,15 @@ remove everything except a select few.</p></li>
<li><p><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removekmod" title="pylorax.ltmpl.LoraxTemplateRunner.removekmod"><code class="xref py py-func docutils literal notranslate"><span class="pre">removekmod</span></code></a>
Removes kernel modules</p></li>
</ul>
</div>
<div class="section" id="the-squashfs-filesystem">
</section>
<section id="the-squashfs-filesystem">
<h3>The squashfs filesystem<a class="headerlink" href="#the-squashfs-filesystem" title="Permalink to this headline"></a></h3>
<p>After <code class="docutils literal notranslate"><span class="pre">runtime-*.tmpl</span></code> templates have finished their work lorax creates an
empty ext4 filesystem, copies the remaining files to it, and makes a squashfs
filesystem of it. This file is the / of the boot.iso's installer environment
and is what is in the LiveOS/squashfs.img file on the iso.</p>
</div>
<div class="section" id="iso-creation">
</section>
<section id="iso-creation">
<h3>iso creation<a class="headerlink" href="#iso-creation" title="Permalink to this headline"></a></h3>
<p>The iso creation is handled by another set of templates. The one used depends
on the architecture that the iso is being created for. They are also stored in
@ -513,9 +430,9 @@ configuration template files, configuration variable substitution, treeinfo
metadata (via the <a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.treeinfo" title="pylorax.ltmpl.LoraxTemplateRunner.treeinfo"><code class="xref py py-func docutils literal notranslate"><span class="pre">treeinfo</span></code></a>
template command). Kernel and initrd are copied from the installroot to their
final locations and then xorrisofs is run to create the boot.iso</p>
</div>
</div>
<div class="section" id="custom-templates">
</section>
</section>
<section id="custom-templates">
<h2>Custom Templates<a class="headerlink" href="#custom-templates" title="Permalink to this headline"></a></h2>
<p>The default set of templates and configuration files from the lorax-generic-templates package
are shipped in the <code class="docutils literal notranslate"><span class="pre">/usr/share/lorax/templates.d/99-generic/</span></code> directory. You can
@ -523,55 +440,38 @@ make a copy of them and place them into another directory under <code class="doc
and they will be used instead if their sort order is below all other directories. This
allows multiple packages to ship lorax templates without conflict. You can (and probably
should) select the specific template directory by passing <code class="docutils literal notranslate"><span class="pre">--sharedir</span></code> to lorax.</p>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="livemedia-creator.html" class="btn btn-neutral float-right" title="livemedia-creator" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="intro.html" class="btn btn-neutral float-left" title="Introduction to Lorax" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="livemedia-creator.html" class="btn btn-neutral float-right" title="livemedia-creator" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,71 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>mkksiso &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>mkksiso &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Product and Updates Images" href="product-images.html" />
<link rel="prev" title="livemedia-creator" href="livemedia-creator.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,18 +36,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
@ -103,75 +55,35 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>mkksiso</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/mkksiso.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="mkksiso">
<section id="mkksiso">
<h1>mkksiso<a class="headerlink" href="#mkksiso" title="Permalink to this headline"></a></h1>
<dl class="field-list simple">
<dt class="field-odd">Authors</dt>
@ -183,14 +95,16 @@ you can add a kickstart to a boot.iso and the kickstart will be executed when
the iso is booted. If the original iso was created with EFI and Mac support the
kickstart boot.iso will include this support as well.</p>
<p><code class="docutils literal notranslate"><span class="pre">mkksiso</span></code> needs to be run as root, it depends on mounting the original iso
and you need to be root to be able to do that.</p>
<div class="section" id="mkksiso-cmdline-arguments">
and you need to be root to be able to do that. The host system architecture
needs to match that of the iso. <code class="docutils literal notranslate"><span class="pre">mkksiso</span></code> will raise an error if it finds a
.discinfo on the iso with a mismatched arch.</p>
<section id="mkksiso-cmdline-arguments">
<h2>mkksiso cmdline arguments<a class="headerlink" href="#mkksiso-cmdline-arguments" title="Permalink to this headline"></a></h2>
<p>Add a kickstart and files to an iso</p>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">usage:</span> <span class="pre">mkksiso</span> <span class="pre">[-h]</span> <span class="pre">[-a</span> <span class="pre">ADD_PATHS]</span> <span class="pre">[-c</span> <span class="pre">CMDLINE]</span> <span class="pre">[--debug]</span> <span class="pre">ks</span> <span class="pre">input_iso</span> <span class="pre">output_iso</span></code></p>
</div></blockquote>
<div class="section" id="optional-arguments">
<section id="optional-arguments">
<h3>Optional arguments<a class="headerlink" href="#optional-arguments" title="Permalink to this headline"></a></h3>
<blockquote>
<div><dl class="option-list">
@ -212,8 +126,8 @@ times)</p>
</dd>
</dl>
</div></blockquote>
</div>
<div class="section" id="positional-arguments">
</section>
<section id="positional-arguments">
<h3>Positional arguments<a class="headerlink" href="#positional-arguments" title="Permalink to this headline"></a></h3>
<blockquote>
<div><dl class="field-list simple">
@ -228,9 +142,9 @@ times)</p>
</dd>
</dl>
</div></blockquote>
</div>
</div>
<div class="section" id="create-a-kickstart-boot-iso-or-dvd">
</section>
</section>
<section id="create-a-kickstart-boot-iso-or-dvd">
<h2>Create a kickstart boot.iso or DVD<a class="headerlink" href="#create-a-kickstart-boot-iso-or-dvd" title="Permalink to this headline"></a></h2>
<p>Create a kickstart like you normally would, kickstart documentation can be
<a class="reference external" href="https://pykickstart.readthedocs.io/en/latest/">found here</a>, including the
@ -250,8 +164,8 @@ eg.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkksiso</span> <span class="o">-</span><span class="n">V</span> <span class="s2">&quot;Test Only&quot;</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">KICKSTART</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">ISO</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">NEW</span><span class="o">-</span><span class="n">ISO</span>
</pre></div>
</div>
</div>
<div class="section" id="adding-package-repos-to-a-boot-iso">
</section>
<section id="adding-package-repos-to-a-boot-iso">
<h2>Adding package repos to a boot.iso<a class="headerlink" href="#adding-package-repos-to-a-boot-iso" title="Permalink to this headline"></a></h2>
<p>You can add repo directories to the iso using <code class="docutils literal notranslate"><span class="pre">--add</span> <span class="pre">/PATH/TO/REPO/</span></code>, make
sure it contains the <code class="docutils literal notranslate"><span class="pre">repodata</span></code> directory by running <code class="docutils literal notranslate"><span class="pre">createrepo_c</span></code> on it
@ -265,8 +179,8 @@ the kickstart like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkksiso</span> <span class="o">--</span><span class="n">add</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">REPO</span><span class="o">/</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">KICKSTART</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">ISO</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">NEW</span><span class="o">-</span><span class="n">ISO</span>
</pre></div>
</div>
</div>
<div class="section" id="create-a-liveimg-boot-iso">
</section>
<section id="create-a-liveimg-boot-iso">
<h2>Create a liveimg boot.iso<a class="headerlink" href="#create-a-liveimg-boot-iso" title="Permalink to this headline"></a></h2>
<p>You can use the kickstart <a class="reference external" href="https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#liveimg">liveimg command</a>,
to install a pre-generated disk image or tar to the system the iso is booting
@ -289,8 +203,8 @@ sure the file hasn't been corrupted:</p>
</div>
<p>When this iso is booted it will execute the kickstart and install the liveimg
contents to the system without any prompting.</p>
</div>
<div class="section" id="how-it-works">
</section>
<section id="how-it-works">
<h2>How it works<a class="headerlink" href="#how-it-works" title="Permalink to this headline"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">mkksiso</span></code> first examines the system to make sure the tools it needs are installed,
it will work with <code class="docutils literal notranslate"><span class="pre">xorrisofs</span></code> or <code class="docutils literal notranslate"><span class="pre">mkisofs</span></code> installed. It mounts the source iso,
@ -303,55 +217,38 @@ tool to add the new files and directories to the new iso. If the architecture is
stick (hybridiso).</p>
<p>The last step is to update the iso checksums so that booting with test enabled
will pass.</p>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="product-images.html" class="btn btn-neutral float-right" title="Product and Updates Images" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="livemedia-creator.html" class="btn btn-neutral float-left" title="livemedia-creator" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="product-images.html" class="btn btn-neutral float-right" title="Product and Updates Images" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,71 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>src &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>src &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="pylorax package" href="pylorax.html" />
<link rel="prev" title="Product and Updates Images" href="product-images.html" />
<link rel="prev" title="image-minimizer" href="image-minimizer.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,18 +36,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
@ -92,78 +44,38 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">src</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pylorax.html">pylorax package</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>src</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/modules.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="src">
<section id="src">
<h1>src<a class="headerlink" href="#src" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
@ -192,54 +104,37 @@
</li>
</ul>
</div>
</div>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="image-minimizer.html" class="btn btn-neutral float-left" title="image-minimizer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="pylorax.html" class="btn btn-neutral float-right" title="pylorax package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="product-images.html" class="btn btn-neutral float-left" title="Product and Updates Images" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Binary file not shown.

View File

@ -1,71 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Product and Updates Images &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>Product and Updates Images &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="src" href="modules.html" />
<link rel="next" title="image-minimizer" href="image-minimizer.html" />
<link rel="prev" title="mkksiso" href="mkksiso.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -73,18 +36,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
@ -92,75 +44,35 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Product and Updates Images</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/product-images.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="product-and-updates-images">
<section id="product-and-updates-images">
<h1>Product and Updates Images<a class="headerlink" href="#product-and-updates-images" title="Permalink to this headline"></a></h1>
<p>Lorax now supports creation of product.img and updates.img as part of the build
process. This is implemented using the installimg template command which will
@ -182,54 +94,37 @@ you would put your custom class here:</p>
<p>If the packages containing the product/updates files are not included as part
of normal dependencies you can add specific packages with the <code class="docutils literal notranslate"><span class="pre">--installpkgs</span></code>
command or the installpkgs paramater of <a class="reference internal" href="pylorax.html#pylorax.treebuilder.RuntimeBuilder" title="pylorax.treebuilder.RuntimeBuilder"><code class="xref py py-class docutils literal notranslate"><span class="pre">pylorax.treebuilder.RuntimeBuilder</span></code></a></p>
</div>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="modules.html" class="btn btn-neutral float-right" title="src" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="mkksiso.html" class="btn btn-neutral float-left" title="mkksiso" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="image-minimizer.html" class="btn btn-neutral float-right" title="image-minimizer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@ -1,38 +1,17 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<title>Python Module Index &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -40,33 +19,16 @@
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -74,18 +36,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
@ -93,70 +44,33 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Python Module Index</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Python Module Index</h1>
@ -268,46 +182,30 @@
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,72 +1,34 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; Lorax 35.1 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<title>Search &mdash; Lorax 36.5 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
35.1
36.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
<input type="text" name="q" placeholder="Search docs" />
@ -74,18 +36,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
@ -93,70 +44,33 @@
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="image-minimizer.html">image-minimizer</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Search</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<noscript>
<div id="fallback" class="admonition warning">
<p class="last">
@ -171,51 +85,35 @@
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2018, Red Hat, Inc..
</p>
<p>&#169; Copyright 2018, Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script type="text/javascript">
<script>
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
<script id="searchindexloader"></script>

File diff suppressed because one or more lines are too long

99
docs/image-minimizer.rst Normal file
View File

@ -0,0 +1,99 @@
image-minimizer
===============
:Authors:
Brian C. Lane <bcl@redhat.com>
`image-minimizer` is a script used as an interpreter for kickstart `%post`
sections. It is used to remove rpm packages and individual files from the
system that Anaconda has just installed.
It processes a list of commands that tell it which files or rpms to remove, and
which to keep.
image-minimizer cmdline arguments
---------------------------------
`usage: image-minimizer [-h] [-i STRING] [--dryrun] [-v] STRING`
Optional arguments
^^^^^^^^^^^^^^^^^^
-h, --help show this help message and exit
-i STRING, --installroot STRING
Root path to prepend to all file patterns and
installation root for RPM operations. Defaults to
INSTALL_ROOT or /mnt/sysimage/
--dryrun If set, no filesystem changes are made.
-v, --verbose Display every action as it is performed.
Positional arguments
^^^^^^^^^^^^^^^^^^^^
:STRING: Filename to process
NOTES
-----
You cannot pass any arguments to `image-minimizer` when using it from the
kickstart `%post`.
When using this from a kickstart the image-minimizer package needs to be available.
It is not included on the standard boot.iso, so you will need to include `lorax` in
the `%package` section. You can use `image-minimizer` to remove lorax from the install.
If you are using this with `livemedia-creator` it can be installed on the host
system so that `lorax` isn't needed in the `%package` list, and it doesn't need
to be removed.
commands
--------
Commands are listed one per line, followed by a space, and then by the
package, file, or glob. The globs used are Unix style pathname patterns using
`*`, `?`, and `[]` character ranges. globbing is implemented using the python
glob module.
* drop <PATTERN>
This will remove files from the installation.
* keep <PATTERN>
This will keep files, and should follow any `drop` commands including globs.
* droprpm <PATTERN>
Remove matching rpm packages. Dependencies are not remove, just individual
packages matching the glob.
* keeprpm <PATTERN>
Do not remove matching rpm packages, it should follow any `droprpm` commands
that include globs.
example
-------
Example Anaconda `%post` usage::
%post --interpreter=image-minimizer --nochroot
drop /lib/modules/*/kernel/fs
keep /lib/modules/*/kernel/fs/ext*
keep /lib/modules/*/kernel/fs/mbcache*
keep /lib/modules/*/kernel/fs/squashfs
droprpm make
droprpm mtools
droprpm mysql-libs
droprpm perl
droprpm perl-Pod-*
droprpm syslinux
keeprpm perl-Pod-Simple
# Not needed after image-minimizer is done
droprpm lorax
%end

View File

@ -16,14 +16,15 @@ Contents:
livemedia-creator
mkksiso
product-images
image-minimizer
modules
Documentation for other Lorax Branches
======================================
* `Fedora 34 <f33-branch/>`_
* `Fedora 35 <f35-branch/>`_
* `Fedora 34 <f34-branch/>`_
* `Fedora 33 <f33-branch/>`_
* `Fedora 32 <f32-branch/>`_
* `RHEL8 lorax-composer <rhel8-branch/>`_
* `RHEL7 lorax-composer <lorax-composer/>`_

View File

@ -171,7 +171,6 @@ changes. Here are the steps I used to convert the Fedora XFCE spin.
dracut-live
-dracut-config-rescue
grub2-efi
memtest86+
syslinux
User created repositories

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

152
docs/man/image-minimizer.1 Normal file
View File

@ -0,0 +1,152 @@
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "IMAGE-MINIMIZER" "1" "Dec 21, 2021" "36.5" "Lorax"
.SH NAME
image-minimizer \- Utility script to remove files and packages
.INDENT 0.0
.TP
.B Authors
Brian C. Lane <\fI\%bcl@redhat.com\fP>
.UNINDENT
.sp
\fIimage\-minimizer\fP is a script used as an interpreter for kickstart \fI%post\fP
sections. It is used to remove rpm packages and individual files from the
system that Anaconda has just installed.
.sp
It processes a list of commands that tell it which files or rpms to remove, and
which to keep.
.SH IMAGE-MINIMIZER CMDLINE ARGUMENTS
.INDENT 0.0
.INDENT 3.5
\fIusage: image\-minimizer [\-h] [\-i STRING] [\-\-dryrun] [\-v] STRING\fP
.UNINDENT
.UNINDENT
.SS Optional arguments
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.TP
.B \-h\fP,\fB \-\-help
show this help message and exit
.TP
.BI \-i \ STRING\fR,\fB \ \-\-installroot \ STRING
Root path to prepend to all file patterns and
installation root for RPM operations. Defaults to
INSTALL_ROOT or /mnt/sysimage/
.TP
.B \-\-dryrun
If set, no filesystem changes are made.
.TP
.B \-v\fP,\fB \-\-verbose
Display every action as it is performed.
.UNINDENT
.UNINDENT
.UNINDENT
.SS Positional arguments
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.TP
.B STRING
Filename to process
.UNINDENT
.UNINDENT
.UNINDENT
.SH NOTES
.sp
You cannot pass any arguments to \fIimage\-minimizer\fP when using it from the
kickstart \fI%post\fP\&.
.sp
When using this from a kickstart the image\-minimizer package needs to be available.
It is not included on the standard boot.iso, so you will need to include \fIlorax\fP in
the \fI%package\fP section. You can use \fIimage\-minimizer\fP to remove lorax from the install.
.sp
If you are using this with \fIlivemedia\-creator\fP it can be installed on the host
system so that \fIlorax\fP isn\(aqt needed in the \fI%package\fP list, and it doesn\(aqt need
to be removed.
.SH COMMANDS
.sp
Commands are listed one per line, followed by a space, and then by the
package, file, or glob. The globs used are Unix style pathname patterns using
\fI*\fP, \fI?\fP, and \fI[]\fP character ranges. globbing is implemented using the python
glob module.
.INDENT 0.0
.IP \(bu 2
drop <PATTERN>
This will remove files from the installation.
.IP \(bu 2
keep <PATTERN>
This will keep files, and should follow any \fIdrop\fP commands including globs.
.IP \(bu 2
droprpm <PATTERN>
Remove matching rpm packages. Dependencies are not remove, just individual
packages matching the glob.
.IP \(bu 2
keeprpm <PATTERN>
Do not remove matching rpm packages, it should follow any \fIdroprpm\fP commands
that include globs.
.UNINDENT
.SH EXAMPLE
.sp
Example Anaconda \fI%post\fP usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
%post \-\-interpreter=image\-minimizer \-\-nochroot
drop /lib/modules/*/kernel/fs
keep /lib/modules/*/kernel/fs/ext*
keep /lib/modules/*/kernel/fs/mbcache*
keep /lib/modules/*/kernel/fs/squashfs
droprpm make
droprpm mtools
droprpm mysql\-libs
droprpm perl
droprpm perl\-Pod\-*
droprpm syslinux
keeprpm perl\-Pod\-Simple
# Not needed after image\-minimizer is done
droprpm lorax
%end
.ft P
.fi
.UNINDENT
.UNINDENT
.SH AUTHOR
Weldr Team
.SH COPYRIGHT
2018, Red Hat, Inc.
.\" Generated by docutils manpage writer.
.

View File

@ -1,8 +1,5 @@
.\" Man page generated from reStructuredText.
.
.TH "LIVEMEDIA-CREATOR" "1" "Apr 23, 2021" "35.1" "Lorax"
.SH NAME
livemedia-creator \- Live Media Creator Documentation
.
.nr rst2man-indent-level 0
.
@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "LIVEMEDIA-CREATOR" "1" "Dec 21, 2021" "36.5" "Lorax"
.SH NAME
livemedia-creator \- Live Media Creator Documentation
.INDENT 0.0
.TP
.B Authors
@ -77,221 +77,235 @@ Create Live Install Media
.sp
.nf
.ft C
usage: livemedia\-creator [\-h] (\-\-make\-iso | \-\-make\-disk | \-\-make\-fsimage | \-\-make\-appliance | \-\-make\-ami | \-\-make\-tar | \-\-make\-tar\-disk | \-\-make\-pxe\-live | \-\-make\-ostree\-live | \-\-make\-oci | \-\-make\-vagrant)
[\-\-iso ISO] [\-\-iso\-only] [\-\-iso\-name ISO_NAME] [\-\-ks KS] [\-\-image\-only] [\-\-no\-virt] [\-\-proxy PROXY] [\-\-anaconda\-arg ANACONDA_ARGS] [\-\-armplatform ARMPLATFORM] [\-\-location LOCATION]
[\-\-logfile LOGFILE] [\-\-lorax\-templates LORAX_TEMPLATES] [\-\-tmp TMP] [\-\-resultdir RESULT_DIR] [\-\-macboot] [\-\-nomacboot] [\-\-extra\-boot\-args EXTRA_BOOT_ARGS] [\-\-disk\-image DISK_IMAGE]
[\-\-keep\-image] [\-\-fs\-image FS_IMAGE] [\-\-image\-name IMAGE_NAME] [\-\-tar\-disk\-name TAR_DISK_NAME] [\-\-fs\-label FS_LABEL] [\-\-image\-size\-align IMAGE_SIZE_ALIGN] [\-\-image\-type IMAGE_TYPE]
[\-\-qemu\-arg QEMU_ARGS] [\-\-qcow2] [\-\-qcow2\-arg QEMU_ARGS] [\-\-compression COMPRESSION] [\-\-compress\-arg COMPRESS_ARGS] [\-\-app\-name APP_NAME] [\-\-app\-template APP_TEMPLATE]
[\-\-app\-file APP_FILE] [\-\-ram MEMORY] [\-\-vcpus VCPUS] [\-\-vnc VNC] [\-\-arch ARCH] [\-\-kernel\-args KERNEL_ARGS] [\-\-ovmf\-path OVMF_PATH] [\-\-virt\-uefi] [\-\-no\-kvm] [\-\-with\-rng WITH_RNG]
[\-\-dracut\-conf DRACUT_CONF] [\-\-dracut\-arg DRACUT_ARGS] [\-\-live\-rootfs\-size LIVE_ROOTFS_SIZE] [\-\-live\-rootfs\-keep\-size] [\-\-oci\-config OCI_CONFIG] [\-\-oci\-runtime OCI_RUNTIME]
[\-\-vagrant\-metadata VAGRANT_METADATA] [\-\-vagrantfile VAGRANTFILE] [\-\-project PROJECT] [\-\-releasever RELEASEVER] [\-\-volid VOLID] [\-\-squashfs\-only] [\-\-timeout TIMEOUT] [\-V]
usage: livemedia\-creator [\-h]
(\-\-make\-iso | \-\-make\-disk | \-\-make\-fsimage | \-\-make\-appliance | \-\-make\-ami | \-\-make\-tar | \-\-make\-tar\-disk | \-\-make\-pxe\-live | \-\-make\-ostree\-live | \-\-make\-oci | \-\-make\-vagrant)
[\-\-iso ISO] [\-\-iso\-only] [\-\-iso\-name ISO_NAME] [\-\-ks KS] [\-\-image\-only]
[\-\-no\-virt] [\-\-proxy PROXY] [\-\-anaconda\-arg ANACONDA_ARGS]
[\-\-armplatform ARMPLATFORM] [\-\-location LOCATION] [\-\-logfile LOGFILE]
[\-\-lorax\-templates LORAX_TEMPLATES] [\-\-tmp TMP] [\-\-resultdir RESULT_DIR]
[\-\-macboot] [\-\-nomacboot] [\-\-extra\-boot\-args EXTRA_BOOT_ARGS]
[\-\-disk\-image DISK_IMAGE] [\-\-keep\-image] [\-\-fs\-image FS_IMAGE]
[\-\-image\-name IMAGE_NAME] [\-\-tar\-disk\-name TAR_DISK_NAME]
[\-\-fs\-label FS_LABEL] [\-\-image\-size\-align IMAGE_SIZE_ALIGN]
[\-\-image\-type IMAGE_TYPE] [\-\-qemu\-arg QEMU_ARGS] [\-\-qcow2]
[\-\-qcow2\-arg QEMU_ARGS] [\-\-compression COMPRESSION]
[\-\-compress\-arg COMPRESS_ARGS] [\-\-app\-name APP_NAME]
[\-\-app\-template APP_TEMPLATE] [\-\-app\-file APP_FILE] [\-\-ram MEMORY]
[\-\-vcpus VCPUS] [\-\-vnc VNC] [\-\-arch ARCH] [\-\-kernel\-args KERNEL_ARGS]
[\-\-ovmf\-path OVMF_PATH] [\-\-virt\-uefi] [\-\-no\-kvm] [\-\-with\-rng WITH_RNG]
[\-\-dracut\-conf DRACUT_CONF] [\-\-dracut\-arg DRACUT_ARGS]
[\-\-live\-rootfs\-size LIVE_ROOTFS_SIZE] [\-\-live\-rootfs\-keep\-size]
[\-\-oci\-config OCI_CONFIG] [\-\-oci\-runtime OCI_RUNTIME]
[\-\-vagrant\-metadata VAGRANT_METADATA] [\-\-vagrantfile VAGRANTFILE]
[\-\-project PROJECT] [\-\-releasever RELEASEVER] [\-\-volid VOLID]
[\-\-squashfs\-only] [\-\-timeout TIMEOUT] [\-V]
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Named Arguments
.SS options
.INDENT 0.0
.TP
.B\-\-make\-iso
.B \-\-make\-iso
Build a live iso
.sp
Default: False
.TP
.B\-\-make\-disk
.B \-\-make\-disk
Build a partitioned disk image
.sp
Default: False
.TP
.B\-\-make\-fsimage
.B \-\-make\-fsimage
Build a filesystem image
.sp
Default: False
.TP
.B\-\-make\-appliance
.B \-\-make\-appliance
Build an appliance image and XML description
.sp
Default: False
.TP
.B\-\-make\-ami
.B \-\-make\-ami
Build an ami image
.sp
Default: False
.TP
.B\-\-make\-tar
.B \-\-make\-tar
Build a tar of the root filesystem
.sp
Default: False
.TP
.B\-\-make\-tar\-disk
.B \-\-make\-tar\-disk
Build a tar of a partitioned disk image
.sp
Default: False
.TP
.B\-\-make\-pxe\-live
.B \-\-make\-pxe\-live
Build a live pxe boot squashfs image
.sp
Default: False
.TP
.B\-\-make\-ostree\-live
.B \-\-make\-ostree\-live
Build a live pxe boot squashfs image of Atomic Host
.sp
Default: False
.TP
.B\-\-make\-oci
.B \-\-make\-oci
Build an Open Container Initiative image
.sp
Default: False
.TP
.B\-\-make\-vagrant
.B \-\-make\-vagrant
Build a Vagrant Box image
.sp
Default: False
.TP
.B\-\-iso
.B \-\-iso
Anaconda installation .iso path to use for qemu
.TP
.B\-\-iso\-only
.B \-\-iso\-only
Remove all iso creation artifacts except the boot.iso, combine with \-\-iso\-name to rename the boot.iso
.sp
Default: False
.TP
.B\-\-iso\-name
.B \-\-iso\-name
Name of output iso file for \-\-iso\-only. Default is boot.iso
.TP
.B\-\-ks
.B \-\-ks
Kickstart file defining the install.
.TP
.B\-\-image\-only
.B \-\-image\-only
Exit after creating fs/disk image.
.sp
Default: False
.TP
.B\-\-no\-virt
.B \-\-no\-virt
Run anaconda directly on host instead of using qemu
.sp
Default: False
.TP
.B\-\-proxy
.B \-\-proxy
proxy URL to use for the install
.TP
.B\-\-anaconda\-arg
.B \-\-anaconda\-arg
Additional argument to pass to anaconda (no\-virt mode). Pass once for each argument
.TP
.B\-\-armplatform
.B \-\-armplatform
the platform to use when creating images for ARM, i.e., highbank, mvebu, omap, tegra, etc.
.TP
.B\-\-location
.B \-\-location
location of iso directory tree with initrd.img and vmlinuz. Used to run qemu with a newer initrd than the iso.
.TP
.B\-\-logfile
.B \-\-logfile
Name and path for primary logfile, other logs will be created in the same directory.
.sp
Default: ./livemedia.log
.TP
.B\-\-lorax\-templates
.B \-\-lorax\-templates
Path to mako templates for lorax
.TP
.B\-\-tmp
.B \-\-tmp
Top level temporary directory
.sp
Default: /var/tmp
.TP
.B\-\-resultdir
.B \-\-resultdir
Directory to copy the resulting images and iso into. Defaults to the temporary working directory
.TP
.B\-\-macboot
.B \-\-macboot
Make the iso bootable on UEFI based Mac systems
.sp
Default: True
.TP
.B\-\-nomacboot
.B \-\-nomacboot
Do not create a Mac bootable iso
.sp
Default: False
.TP
.B\-\-extra\-boot\-args
.B \-\-extra\-boot\-args
Extra arguments to add to the bootloader kernel cmdline in the templates
.sp
Default: ""
.TP
.B\-\-project
.B \-\-project
substituted for @PROJECT@ in bootloader config files
.sp
Default: "Linux"
.TP
.B\-\-releasever
.B \-\-releasever
substituted for @VERSION@ in bootloader config files
.sp
Default: "34"
Default: "36"
.TP
.B\-\-volid
.B \-\-volid
volume id
.TP
.B\-\-squashfs\-only
.B \-\-squashfs\-only
Use a plain squashfs filesystem for the runtime.
.sp
Default: False
.TP
.B\-\-timeout
.B \-\-timeout
Cancel installer after X minutes
.TP
.B\-V
.B \-V
show program\(aqs version number and exit
.UNINDENT
.SS disk/fs image arguments
.INDENT 0.0
.TP
.B\-\-disk\-image
.B \-\-disk\-image
Path to existing disk image to use for creating final image.
.TP
.B\-\-keep\-image
.B \-\-keep\-image
Keep raw disk image after .iso creation
.sp
Default: False
.TP
.B\-\-fs\-image
.B \-\-fs\-image
Path to existing filesystem image to use for creating final image.
.TP
.B\-\-image\-name
.B \-\-image\-name
Name of output file to create. Used for tar, fs and disk image. Default is a random name.
.TP
.B\-\-tar\-disk\-name
.B \-\-tar\-disk\-name
Name of the archive member for make\-tar\-disk.
.TP
.B\-\-fs\-label
.B \-\-fs\-label
Label to set on fsimage, default is \(aqAnaconda\(aq
.sp
Default: "Anaconda"
.TP
.B\-\-image\-size\-align
.B \-\-image\-size\-align
Create a disk image with a size that is a multiple of this value in MiB.
.sp
Default: 0
.TP
.B\-\-image\-type
.B \-\-image\-type
Create an image with qemu\-img. See qemu\-img \-\-help for supported formats.
.TP
.B\-\-qemu\-arg
.B \-\-qemu\-arg
Arguments to pass to qemu\-img. Pass once for each argument, they will be used for ALL calls to qemu\-img.
.sp
Default: []
.TP
.B\-\-qcow2
.B \-\-qcow2
Create qcow2 image instead of raw sparse image when making disk images.
.sp
Default: False
.TP
.B\-\-qcow2\-arg
.B \-\-qcow2\-arg
Arguments to pass to qemu\-img. Pass once for each argument, they will be used for ALL calls to qemu\-img.
.sp
Default: []
.TP
.B\-\-compression
.B \-\-compression
Compression binary for make\-tar. xz, lzma, gzip, and bzip2 are supported. xz is the default.
.sp
Default: "xz"
.TP
.B\-\-compress\-arg
.B \-\-compress\-arg
Arguments to pass to compression. Pass once for each argument
.sp
Default: []
@ -299,13 +313,13 @@ Default: []
.SS appliance arguments
.INDENT 0.0
.TP
.B\-\-app\-name
.B \-\-app\-name
Name of appliance to pass to template
.TP
.B\-\-app\-template
.B \-\-app\-template
Path to template to use for appliance data.
.TP
.B\-\-app\-file
.B \-\-app\-file
Appliance template results file.
.sp
Default: "appliance.xml"
@ -313,39 +327,39 @@ Default: "appliance.xml"
.SS qemu arguments
.INDENT 0.0
.TP
.B\-\-ram
.B \-\-ram
Memory to allocate for installer in megabytes.
.sp
Default: 2048
.TP
.B\-\-vcpus
.B \-\-vcpus
Passed to qemu \-smp command
.TP
.B\-\-vnc
.B \-\-vnc
Passed to qemu \-display command. eg. vnc=127.0.0.1:5, default is to choose the first unused vnc port.
.TP
.B\-\-arch
.B \-\-arch
System arch to build for. Used to select qemu\-system\-* command. Defaults to qemu\-system\-<arch>
.TP
.B\-\-kernel\-args
.B \-\-kernel\-args
Additional argument to pass to the installation kernel
.TP
.B\-\-ovmf\-path
.B \-\-ovmf\-path
Path to OVMF firmware
.sp
Default: "/usr/share/edk2/ovmf/"
.TP
.B\-\-virt\-uefi
.B \-\-virt\-uefi
Use OVMF firmware to boot the VM in UEFI mode
.sp
Default: False
.TP
.B\-\-no\-kvm
.B \-\-no\-kvm
Skip using kvm with qemu even if it is available.
.sp
Default: False
.TP
.B\-\-with\-rng
.B \-\-with\-rng
RNG device for QEMU (none for no RNG)
.sp
Default: "/dev/random"
@ -353,21 +367,21 @@ Default: "/dev/random"
.SS dracut arguments: (default: )
.INDENT 0.0
.TP
.B\-\-dracut\-conf
.B \-\-dracut\-conf
Path to a dracut.conf file to use instead of the default arguments. See the dracut.conf(5) manpage.
.TP
.B\-\-dracut\-arg
.B \-\-dracut\-arg
Argument to pass to dracut when rebuilding the initramfs. Pass this once for each argument. NOTE: this overrides the defaults.
.UNINDENT
.SS pxe to live arguments
.INDENT 0.0
.TP
.B\-\-live\-rootfs\-size
.B \-\-live\-rootfs\-size
Size of root filesystem of live image in GiB
.sp
Default: 0
.TP
.B\-\-live\-rootfs\-keep\-size
.B \-\-live\-rootfs\-keep\-size
Keep the original size of root filesystem in live image
.sp
Default: False
@ -375,19 +389,19 @@ Default: False
.SS OCI arguments
.INDENT 0.0
.TP
.B\-\-oci\-config
.B \-\-oci\-config
config.json OCI configuration file
.TP
.B\-\-oci\-runtime
.B \-\-oci\-runtime
runtime.json OCI configuration file
.UNINDENT
.SS Vagrant arguments
.INDENT 0.0
.TP
.B\-\-vagrant\-metadata
.B \-\-vagrant\-metadata
optional metadata.json file
.TP
.B\-\-vagrantfile
.B \-\-vagrantfile
optional vagrantfile
.UNINDENT
.SH QUICKSTART
@ -539,7 +553,6 @@ dracut\-config\-generic
dracut\-live
\-dracut\-config\-rescue
grub2\-efi
memtest86+
syslinux
.UNINDENT
.SS User created repositories

View File

@ -1,8 +1,5 @@
.\" Man page generated from reStructuredText.
.
.TH "LORAX" "1" "Apr 23, 2021" "35.1" "Lorax"
.SH NAME
lorax \- Lorax Documentation
.
.nr rst2man-indent-level 0
.
@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "LORAX" "1" "Dec 21, 2021" "36.5" "Lorax"
.SH NAME
lorax \- Lorax Documentation
.INDENT 0.0
.TP
.B Authors
@ -55,10 +55,15 @@ Create the Anaconda boot.iso
.sp
.nf
.ft C
usage: lorax [\-h] \-p PRODUCT \-v VERSION \-r RELEASE [\-s REPOSITORY] [\-\-repo REPOSITORY] [\-m REPOSITORY] [\-t VARIANT] [\-b URL] [\-\-isfinal] [\-c CONFIGFILE] [\-\-proxy HOST] [\-i PACKAGE] [\-e PACKAGE]
[\-\-buildarch ARCH] [\-\-volid VOLID] [\-\-macboot] [\-\-nomacboot] [\-\-noupgrade] [\-\-logfile LOGFILE] [\-\-tmp TMP] [\-\-cachedir CACHEDIR] [\-\-workdir WORKDIR] [\-\-force] [\-\-add\-template ADD_TEMPLATES]
[\-\-add\-template\-var ADD_TEMPLATE_VARS] [\-\-add\-arch\-template ADD_ARCH_TEMPLATES] [\-\-add\-arch\-template\-var ADD_ARCH_TEMPLATE_VARS] [\-\-noverify] [\-\-sharedir SHAREDIR] [\-\-enablerepo [repo]]
[\-\-disablerepo [repo]] [\-\-rootfs\-size ROOTFS_SIZE] [\-\-noverifyssl] [\-\-dnfplugin DNFPLUGINS] [\-\-squashfs\-only] [\-\-skip\-branding] [\-\-dracut\-conf DRACUT_CONF] [\-\-dracut\-arg DRACUT_ARGS] [\-V]
usage: lorax [\-h] \-p PRODUCT \-v VERSION \-r RELEASE [\-s REPOSITORY] [\-\-repo REPOSITORY] [\-m REPOSITORY]
[\-t VARIANT] [\-b URL] [\-\-isfinal] [\-c CONFIGFILE] [\-\-proxy HOST] [\-i PACKAGE] [\-e PACKAGE]
[\-\-buildarch ARCH] [\-\-volid VOLID] [\-\-macboot] [\-\-nomacboot] [\-\-noupgrade]
[\-\-logfile LOGFILE] [\-\-tmp TMP] [\-\-cachedir CACHEDIR] [\-\-workdir WORKDIR] [\-\-force]
[\-\-add\-template ADD_TEMPLATES] [\-\-add\-template\-var ADD_TEMPLATE_VARS]
[\-\-add\-arch\-template ADD_ARCH_TEMPLATES] [\-\-add\-arch\-template\-var ADD_ARCH_TEMPLATE_VARS]
[\-\-noverify] [\-\-sharedir SHAREDIR] [\-\-enablerepo [repo]] [\-\-disablerepo [repo]]
[\-\-rootfs\-size ROOTFS_SIZE] [\-\-noverifyssl] [\-\-dnfplugin DNFPLUGINS] [\-\-squashfs\-only]
[\-\-skip\-branding] [\-\-dracut\-conf DRACUT_CONF] [\-\-dracut\-arg DRACUT_ARGS] [\-V]
OUTPUTDIR
.ft P
.fi
@ -67,33 +72,33 @@ usage: lorax [\-h] \-p PRODUCT \-v VERSION \-r RELEASE [\-s REPOSITORY] [\-\-rep
.SS Positional Arguments
.INDENT 0.0
.TP
.BOUTPUTDIR
.B OUTPUTDIR
Output directory
.UNINDENT
.SS Named Arguments
.SS options
.INDENT 0.0
.TP
.B\-V
.B \-V
show program\(aqs version number and exit
.UNINDENT
.SS required arguments
.INDENT 0.0
.TP
.B\-p, \-\-product
.B \-p, \-\-product
product name
.TP
.B\-v, \-\-version
.B \-v, \-\-version
version identifier
.TP
.B\-r, \-\-release
.B \-r, \-\-release
release information
.TP
.B\-s, \-\-source
.B \-s, \-\-source
source repository (may be listed multiple times)
.sp
Default: []
.TP
.B\-\-repo
.B \-\-repo
source dnf repository file
.sp
Default: []
@ -101,141 +106,141 @@ Default: []
.SS Named Arguments
.INDENT 0.0
.TP
.B\-m, \-\-mirrorlist
.B \-m, \-\-mirrorlist
mirrorlist repository (may be listed multiple times)
.sp
Default: []
.TP
.B\-t, \-\-variant
.B \-t, \-\-variant
variant name
.sp
Default: ""
.TP
.B\-b, \-\-bugurl
.B \-b, \-\-bugurl
bug reporting URL for the product
.sp
Default: "your distribution provided bug reporting tool"
.TP
.B\-\-isfinal
.B \-\-isfinal
Default: False
.TP
.B\-c, \-\-config
.B \-c, \-\-config
config file
.sp
Default: "/etc/lorax/lorax.conf"
.TP
.B\-\-proxy
.B \-\-proxy
repo proxy url:port
.TP
.B\-i, \-\-installpkgs
.B \-i, \-\-installpkgs
package glob to install before runtime\-install.tmpl runs. (may be listed multiple times)
.sp
Default: []
.TP
.B\-e, \-\-excludepkgs
.B \-e, \-\-excludepkgs
package glob to remove before runtime\-install.tmpl runs. (may be listed multiple times)
.sp
Default: []
.TP
.B\-\-buildarch
.B \-\-buildarch
build architecture
.TP
.B\-\-volid
.B \-\-volid
volume id
.TP
.B\-\-macboot
.B \-\-macboot
Make the iso bootable on UEFI based Mac systems
.sp
Default: True
.TP
.B\-\-nomacboot
.B \-\-nomacboot
Do not create a Mac bootable iso
.sp
Default: False
.TP
.B\-\-noupgrade
.B \-\-noupgrade
Default: True
.TP
.B\-\-logfile
.B \-\-logfile
Path to logfile
.sp
Default: ./lorax.log
.TP
.B\-\-tmp
.B \-\-tmp
Top level temporary directory
.sp
Default: "/var/tmp/lorax"
.TP
.B\-\-cachedir
.B \-\-cachedir
DNF cache directory. Default is a temporary dir.
.TP
.B\-\-workdir
.B \-\-workdir
Work directory, overrides \-\-tmp. Default is a temporary dir under /var/tmp/lorax
.TP
.B\-\-force
.B \-\-force
Run even when the destination directory exists
.sp
Default: False
.TP
.B\-\-add\-template
.B \-\-add\-template
Additional template for runtime image
.sp
Default: []
.TP
.B\-\-add\-template\-var
.B \-\-add\-template\-var
Set variable for runtime image template
.sp
Default: []
.TP
.B\-\-add\-arch\-template
.B \-\-add\-arch\-template
Additional template for architecture\-specific image
.sp
Default: []
.TP
.B\-\-add\-arch\-template\-var
.B \-\-add\-arch\-template\-var
Set variable for architecture\-specific image
.sp
Default: []
.TP
.B\-\-noverify
.B \-\-noverify
Do not verify the install root
.sp
Default: True
.TP
.B\-\-sharedir
.B \-\-sharedir
Directory containing all the templates. Overrides config file sharedir
.TP
.B\-\-enablerepo
.B \-\-enablerepo
Names of repos to enable
.sp
Default: []
.TP
.B\-\-disablerepo
.B \-\-disablerepo
Names of repos to disable
.sp
Default: []
.TP
.B\-\-rootfs\-size
.B \-\-rootfs\-size
Size of root filesystem in GiB. Defaults to 2.
.sp
Default: 2
.TP
.B\-\-noverifyssl
.B \-\-noverifyssl
Do not verify SSL certificates
.sp
Default: False
.TP
.B\-\-dnfplugin
.B \-\-dnfplugin
Enable a DNF plugin by name/glob, or * to enable all of them.
.sp
Default: []
.TP
.B\-\-squashfs\-only
.B \-\-squashfs\-only
Use a plain squashfs filesystem for the runtime.
.sp
Default: False
.TP
.B\-\-skip\-branding
.B \-\-skip\-branding
Disable automatic branding package selection. Use \-\-installpkgs to add custom branding.
.sp
Default: False
@ -243,10 +248,10 @@ Default: False
.SS dracut arguments: (default: )
.INDENT 0.0
.TP
.B\-\-dracut\-conf
.B \-\-dracut\-conf
Path to a dracut.conf file to use instead of the default arguments. See the dracut.conf(5) manpage.
.TP
.B\-\-dracut\-arg
.B \-\-dracut\-arg
Argument to pass to dracut when rebuilding the initramfs. Pass this once for each argument. NOTE: this overrides the defaults.
.UNINDENT
.SH QUICKSTART

View File

@ -1,8 +1,5 @@
.\" Man page generated from reStructuredText.
.
.TH "MKKSISO" "1" "Apr 23, 2021" "35.1" "Lorax"
.SH NAME
mkksiso \- Make Kickstart ISO Utility Documentation
.
.nr rst2man-indent-level 0
.
@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "MKKSISO" "1" "Dec 21, 2021" "36.5" "Lorax"
.SH NAME
mkksiso \- Make Kickstart ISO Utility Documentation
.INDENT 0.0
.TP
.B Authors
@ -42,7 +42,9 @@ the iso is booted. If the original iso was created with EFI and Mac support the
kickstart boot.iso will include this support as well.
.sp
\fBmkksiso\fP needs to be run as root, it depends on mounting the original iso
and you need to be root to be able to do that.
and you need to be root to be able to do that. The host system architecture
needs to match that of the iso. \fBmkksiso\fP will raise an error if it finds a
\&.discinfo on the iso with a mismatched arch.
.SH MKKSISO CMDLINE ARGUMENTS
.sp
Add a kickstart and files to an iso
@ -56,7 +58,7 @@ Add a kickstart and files to an iso
.INDENT 3.5
.INDENT 0.0
.TP
.B \-h\fP,\fB \-\-help
.B \-h\fP,\fB \-\-help
show this help message and exit
.TP
.BI \-a \ ADD_PATHS\fR,\fB \ \-\-add \ ADD_PATHS
@ -66,7 +68,7 @@ times)
.BI \-c \ CMDLINE\fR,\fB \ \-\-cmdline \ CMDLINE
Arguments to add to kernel cmdline
.TP
.B \-\-debug
.B \-\-debug
print debugging info
.TP
.BI \-V \ VOLID\fR,\fB \ \-\-volid \ VOLID

View File

@ -10,7 +10,9 @@ the iso is booted. If the original iso was created with EFI and Mac support the
kickstart boot.iso will include this support as well.
``mkksiso`` needs to be run as root, it depends on mounting the original iso
and you need to be root to be able to do that.
and you need to be root to be able to do that. The host system architecture
needs to match that of the iso. ``mkksiso`` will raise an error if it finds a
.discinfo on the iso with a mismatched arch.
mkksiso cmdline arguments

View File

@ -3,7 +3,7 @@
%define debug_package %{nil}
Name: lorax
Version: 35.7
Version: 36.9
Release: 1%{?dist}
Summary: Tool for creating the anaconda install images
@ -51,7 +51,7 @@ Requires: python3-mako
Requires: python3-kickstart >= 3.19
Requires: python3-dnf >= 3.2.0
Requires: python3-librepo
Requires: python3-pycdlib
Requires: python3-pycdio
%if 0%{?fedora}
# Fedora specific deps
@ -161,6 +161,7 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
%{_mandir}/man1/lorax.1*
%{_mandir}/man1/livemedia-creator.1*
%{_mandir}/man1/mkksiso.1*
%{_mandir}/man1/image-minimizer.1*
%{_tmpfilesdir}/lorax.conf
%files docs
@ -175,6 +176,86 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
%{_datadir}/lorax/templates.d/*
%changelog
* Mon Feb 28 2022 Brian C. Lane <bcl@redhat.com> 36.9-1
- Don't move the restart-anaconda file (vponcova@redhat.com)
* Wed Feb 16 2022 Brian C. Lane <bcl@redhat.com> 36.8-1
- runtime-cleanup: Remove ncurses package (bcl@redhat.com)
* Mon Feb 14 2022 Brian C. Lane <bcl@redhat.com> 36.7-1
- postinstall: Restore reproducible build timestamps on /usr/share/fonts (bcl@redhat.com)
- tests: Fix the image minimizer test dnf usage (bcl@redhat.com)
- runtime-cleanup: drop kernel drivers/iio (awilliam@redhat.com)
- runtime-cleanup: drop gallium-pipe drivers from mesa-dri-drivers (awilliam@redhat.com)
- runtime-cleanup: drop yelp's local MathJax library copy (awilliam@redhat.com)
- runtime-cleanup: drop eapol_test from wpa_supplicant (awilliam@redhat.com)
- runtime-cleanup: drop /usr/bin/cyrusbdb2current (awilliam@redhat.com)
- runtime-cleanup: drop systemd-analyze (awilliam@redhat.com)
- runtime-cleanup: drop mtools and glibc-gconv-extra (awilliam@redhat.com)
- runtime-cleanup: drop guile22's ccache (awilliam@redhat.com)
- runtime-cleanup: fix warnings from old or changed packages (awilliam@redhat.com)
- runtime-cleanup: drop Italic from google-noto-sans-vf-fonts (awilliam@redhat.com)
- runtime-install: drop some unnecessary font packages (awilliam@redhat.com)
* Fri Feb 04 2022 Brian C. Lane <bcl@redhat.com> 36.6-1
- mkksiso: Fix check for unsupported arch error (bcl@redhat.com)
* Thu Feb 03 2022 Brian C. Lane <bcl@redhat.com> 36.5-1
- mkksiso: Improve debug message about unsupported arch (bcl@redhat.com)
- mkksiso: Fix the order of the ppc mkisofs command (bcl@redhat.com)
- mkksiso: mkfsiso argument order matters (bcl@redhat.com)
- mkksiso: Add kickstart to s390x cdboot.prm (bcl@redhat.com)
- cleanup: handle RPM database move to /usr (awilliam@redhat.com)
- Install the variable font of the Cantarell font (akira@tagoh.org)
- Update the template for f36 Change proposal:
https://fedoraproject.org/wiki/Changes/DefaultToNotoFonts (akira@tagoh.org)
- Update Malayalam font to its new renamed package name rit-meera-new-fonts (pnemade@fedoraproject.org)
- Enable sftp when using inst.sshd (bcl@redhat.com)
- Add inst.rngd cmdline option (bcl@redhat.com)
- docs: Update docs for image-minimizer (bcl@redhat.com)
- tests: Add tests for image-minimizer (bcl@redhat.com)
- image-minimizer: Check for missing root directory (bcl@redhat.com)
- image-minimizer: Fix utf8 error and add docs (bcl@redhat.com)
* Tue Dec 14 2021 Brian C. Lane <bcl@redhat.com> 36.4-1
- cleanup: remove binaries from lilv (awilliam@redhat.com)
- runtime-cleanup: remove pipewire-related packages (awilliam@redhat.com)
- New lorax documentation - 36.3 (bcl@redhat.com)
* Thu Dec 09 2021 Brian C. Lane <bcl@redhat.com> 36.3-1
- mkksiso: Check the length of the filenames (bcl@redhat.com)
- mkksiso: Check the iso's arch against the host's (bcl@redhat.com)
- mkksiso: Add missing implantisomd5 tool requirements (bcl@redhat.com)
- mkksiso: Raise error if no volume id is found (bcl@redhat.com)
- mount: Add s390x support to IsoMountopoint (bcl@redhat.com)
- mkksiso: Skip mkefiboot for non-UEFI isos (bcl@redhat.com)
- mkksiso: Add -joliet-long (bcl@redhat.com)
- mkksiso: Return 1 on errors (bcl@redhat.com)
- Fix monitor problem with split UTF8 characters (bcl@redhat.com)
* Wed Nov 10 2021 Brian C. Lane <bcl@redhat.com> 36.2-1
- Remove memtest86+ from example kickstarts (bcl@redhat.com)
- fedora-livemedia: Update example kickstart (bcl@redhat.com)
- mount: Switch to using pycdio instead of pycdlib (bcl@redhat.com)
- Move default releasever into pylorax DEFAULT_RELEASEVER (bcl@redhat.com)
- runtime-postinstall: Drop raidstart/stop stub code (bcl@redhat.com)
- runtime-install: Fix grub2 epoch, it is 1 not 0 (bcl@redhat.com)
- Update runtime-install/cleanup for Marvell Prestera fw split (awilliam@redhat.com)
* Thu Oct 28 2021 Brian C. Lane <bcl@redhat.com> 36.1-1
- dnfbase: Handle defaults better (bcl@redhat.com)
- ltmpl: Add version compare support to installpkg (bcl@redhat.com)
* Mon Oct 11 2021 Brian C. Lane <bcl@redhat.com> 36.0-1
- New lorax documentation - 36.0 (bcl@redhat.com)
- docs: Remove logging command from examples (bcl@redhat.com)
- runtime-install: exclude liquidio and netronome firmwares (awilliam@redhat.com)
- runtime-cleanup: drop Marvell Prestera firmware files (awilliam@redhat.com)
- runtime-cleanup: drop some Qualcomm smartphone firmwares (awilliam@redhat.com)
- Fix pylint warnings about string formatting (bcl@redhat.com)
- tests: Ignore new pylint warnings (bcl@redhat.com)
- Add fstrim to disk and filesystem image creation (bcl@redhat.com)
* Tue Sep 07 2021 Brian C. Lane <bcl@redhat.com> 35.7-1
- templates: Remove memtest86+ (bcl@redhat.com)

View File

@ -1 +1 @@
35.7-1 ./
36.9-1 ./

View File

@ -0,0 +1,11 @@
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon
ConditionVirtualization=!container
ConditionKernelCommandLine=|inst.rngd
ConditionKernelCommandLine=!inst.rngd=0
# The "-f" option is required for the systemd service rngd to work with Type=simple
[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/rngd
ExecStart=/usr/sbin/rngd -f $RNGD_ARGS

View File

@ -4,3 +4,4 @@ SyslogFacility AUTHPRIV
PasswordAuthentication yes
PermitEmptyPasswords yes
PermitUserEnvironment yes
Subsystem sftp internal-sftp

View File

@ -10,7 +10,7 @@ remove usr/share/i18n
## perl is needed by /usr/bin/rxe_cfg from libibverbs
## no sound support, thanks
removepkg flac-libs libsndfile pulseaudio* sound-theme-freedesktop
removepkg flac-libs libsndfile pipewire pulseaudio* rtkit sound-theme-freedesktop wireplumber*
## we don't create new initramfs/bootloader conf inside anaconda
## (that happens inside the target system after we install dracut/grubby)
removepkg dracut-network grubby anaconda-dracut
@ -27,8 +27,6 @@ removepkg selinux-policy libselinux-utils
## The removepkg above removes it, create an empty one. See rhbz#1243168
append etc/selinux/config ""
removepkg fedora-release-rawhide
## keep enough of shadow-utils to create accounts
removefrom shadow-utils --allbut /usr/bin/chage /usr/sbin/chpasswd \
/usr/sbin/groupadd /usr/sbin/useradd
@ -37,29 +35,32 @@ removefrom shadow-utils --allbut /usr/bin/chage /usr/sbin/chpasswd \
removefrom initscripts /usr/sbin/* /usr/share/locale/* /usr/share/doc/* /usr/share/man/*
## no storage device monitoring
removepkg device-mapper-event dmraid-events sgpio
removepkg device-mapper-event
## logrotate isn't useful in anaconda
removepkg logrotate
remove /etc/logrotate.d
## anaconda needs this to do media check
removefrom isomd5sum --allbut /usr/bin/checkisomd5
## systemd-nspawn isn't very useful and doesn't link anyway without iptables,
## and there's no need for a bunch of zsh files without zsh
removefrom systemd /usr/share/zsh/site-functions/*
## there's no need for a bunch of zsh files without zsh,
## systemd-analyze is quite large and not essential
removefrom systemd /usr/bin/systemd-analyze /usr/share/zsh/site-functions/*
## we only need syslinux to make the installer image bootable, we don't
## run anything from it that uses mtools, and that's the only thing
## that pulls in glibc-gconv-extra
removepkg mtools glibc-gconv-extra
## various other things we remove to save space
removepkg diffutils file
removepkg jasper-libs
removepkg libasyncns
removepkg libmcpp libtiff
removepkg lvm2-libs mcpp
removepkg libtiff
removepkg lvm2-libs
removepkg mobile-broadband-provider-info
removepkg pkgconf pkgconf-m4 pkgconf-pkg-config ppp pth
removepkg rmt rpcbind squashfs-tools system-config-firewall-base
removepkg rmt rpcbind squashfs-tools
removepkg tigervnc-license xml-common
removepkg xorg-x11-font-utils bdftopcf mkfontscale fonttosfnt
removepkg mkfontscale fonttosfnt
removepkg xorg-x11-server-common
# do not remove this, required for ppc64le and s390x !!!
removepkg ncurses
## other removals
@ -72,7 +73,7 @@ remove /usr/share/mime/multipart /usr/share/mime/packages /usr/share/mime/text
remove /usr/share/mime/video /usr/share/mime/x-content /usr/share/mime/x-epoc
remove /var/db /var/games /var/tmp /var/yp /var/nis /var/opt /var/local
remove /var/mail /var/spool /var/preserve /var/report
remove /var/lib/rpm/* /var/lib/yum /var/lib/dnf
remove /usr/lib/sysimage/rpm/* /var/lib/rpm/* /var/lib/yum /var/lib/dnf
## clean up the files created by various '> /dev/null's
remove /dev/*
@ -80,7 +81,7 @@ remove /dev/*
remove /usr/share/icons/*/icon-theme.cache
## clean up kernel modules
removekmod sound drivers/media drivers/hwmon \
removekmod sound drivers/media drivers/hwmon drivers/iio \
net/atm net/bluetooth net/sched net/sctp \
net/rds net/l2tp net/decnet net/netfilter net/ipv4 net/ipv6 \
drivers/watchdog drivers/rtc drivers/input/joystick \
@ -102,11 +103,8 @@ remove lib/modules/*/{build,source,*.map}
## NOTE: depmod gets re-run after cleanup finishes
## remove unused themes, theme engines, icons, etc.
removefrom gtk2 /usr/${libdir}/gtk-2.0/*/{engines,printbackends}/*
removefrom gtk2 /usr/share/themes/*
removefrom gtk3 /usr/${libdir}/gtk-3.0/*/printbackends/*
removefrom gtk3 /usr/share/themes/*
removefrom metacity --allbut /usr/bin/* /usr/${libdir}/*
## filesystem tools
removefrom e2fsprogs /usr/share/locale/*
@ -118,15 +116,14 @@ removefrom gsettings-desktop-schemas /usr/share/locale/*
removefrom NetworkManager-libnm /usr/share/locale/*/NetworkManager.mo
removefrom nm-connection-editor /usr/share/applications/*
removefrom atk /usr/share/locale/*
removefrom audit /etc/* /sbin/auditctl /sbin/aureport
removefrom audit /sbin/ausearch /sbin/autrace /usr/bin/*
removefrom audit-libs /etc/* /${libdir}/libauparse*
removefrom audit /etc/* /usr/sbin/auditctl /usr/sbin/aureport
removefrom audit /usr/sbin/ausearch /usr/sbin/autrace /usr/bin/*
removefrom audit-libs /etc/* /usr/${libdir}/libauparse*
removefrom bash /etc/* /usr/bin/bashbug* /usr/share/*
removefrom bind-utils /usr/bin/host /usr/bin/nsupdate
removefrom bitmap-fangsongti-fonts /usr/share/fonts/*
removefrom ca-certificates /etc/pki/java/*
removefrom ca-certificates /etc/pki/tls/certs/ca-bundle.trust.crt
removefrom cairo /usr/${libdir}/libcairo-script* /usr/bin/cairo-sphinx
removefrom coreutils /usr/bin/link /usr/bin/nice /usr/bin/stty /usr/bin/unlink
removefrom coreutils /usr/bin/[ /usr/bin/base64 /usr/bin/chcon
removefrom coreutils /usr/bin/cksum /usr/bin/csplit
@ -150,10 +147,8 @@ removefrom cracklib /usr/sbin/*
removefrom cracklib-dicts /usr/${libdir}/* /usr/sbin/*
removefrom cryptsetup /usr/share/*
removefrom cryptsetup-libs /usr/share/locale/*
removefrom cyrus-sasl-lib /usr/sbin/*
removefrom cyrus-sasl-lib /usr/sbin/* /usr/bin/*
removefrom dbus-x11 /etc/X11/*
removefrom dejavu-sans-fonts --allbut *.conf */DejaVuSans{,-Bold}.ttf
removefrom dejavu-sans-mono-fonts --allbut *.conf */DejaVuSansMono.ttf
removefrom dnf /usr/share/locale/*
removefrom dump /etc/*
removefrom elfutils-libelf /usr/share/locale/*
@ -173,11 +168,11 @@ removefrom gdk-pixbuf2 /usr/share/locale*
removefrom glib2 /usr/bin/* /usr/share/locale/*
removefrom glibc /etc/gai.conf /etc/rpc
removefrom glibc /${libdir}/libBrokenLocale*
removefrom glibc /${libdir}/libSegFault* /${libdir}/libanl*
removefrom glibc /${libdir}/libanl*
removefrom glibc /${libdir}/libnss_compat*
# python-pyudev uses ctypes.util.find_library, which uses /sbin/ldconfig
removefrom glibc /usr/libexec/* /usr/sbin/*
removefrom glibc-common /usr/bin/catchsegv /usr/bin/gencat
removefrom glibc-common /usr/bin/gencat
removefrom glibc-common /usr/bin/getent
removefrom glibc-common /usr/bin/locale /usr/bin/sprof
# NB: we keep /usr/bin/localedef so anaconda can inspect payload locale info
@ -185,14 +180,14 @@ removefrom glibc-common /usr/bin/tzselect
removefrom glibc-common /usr/sbin/*
removefrom gnutls /usr/share/locale/*
removefrom google-noto-sans-cjk-ttc-fonts /usr/share/fonts/google-noto-cjk/NotoSansCJK-{Black,Bold,*Light,Medium,Thin}.ttc
removefrom google-noto-sans-vf-fonts /usr/share/fonts/google-noto-vf/NotoSans-Italic-VF.ttf
removefrom grep /etc/* /usr/share/locale/*
removefrom gtk2 /usr/bin/update-gtk-immodules
removefrom gtk3 /usr/${libdir}/gtk-3.0/*
removefrom guile22 /usr/${libdir}/guile/2.2/ccache*
removefrom gzip /usr/bin/{gzexe,zcmp,zdiff,zegrep,zfgrep,zforce,zgrep,zless,zmore,znew}
removefrom hwdata /usr/share/hwdata/oui.txt /usr/share/hwdata/pnp.ids
removefrom iproute --allbut /usr/sbin/{ip,routef,routel,rtpr}
removefrom kbd --allbut */bin/{dumpkeys,kbd_mode,loadkeys,setfont,unicode_*,chvt}
removefrom kmod /usr/sbin/weak-modules
removefrom less /etc/*
removefrom libX11-common /usr/share/X11/XErrorDB
removefrom libcanberra /usr/${libdir}/libcanberra-*
@ -211,7 +206,7 @@ removefrom linux-firmware /usr/lib/firmware/dvb*
removefrom linux-firmware /usr/lib/firmware/*_12mhz*
removefrom linux-firmware /usr/lib/firmware/v4l*
removefrom linux-firmware /usr/lib/firmware/brcm/BCM-*
removefrom linux-firmware /usr/lib/firmware/ttusb-budget/dspbootcode.bin
removefrom linux-firmware /usr/lib/firmware/ttusb-budget/dspbootcode.bin*
removefrom linux-firmware /usr/lib/firmware/emi26/*
removefrom linux-firmware /usr/lib/firmware/emi62/*
removefrom linux-firmware /usr/lib/firmware/cpia2/*
@ -220,17 +215,19 @@ removefrom linux-firmware /usr/lib/firmware/vicam/*
removefrom linux-firmware /usr/lib/firmware/dsp56k/*
removefrom linux-firmware /usr/lib/firmware/sun/*
removefrom linux-firmware /usr/lib/firmware/av7110/*
removefrom linux-firmware /usr/lib/firmware/usbdux/*
removefrom linux-firmware /usr/lib/firmware/f2255usb.bin
removefrom linux-firmware /usr/lib/firmware/lgs8g75.fw
removefrom linux-firmware /usr/lib/firmware/usbdux*
removefrom linux-firmware /usr/lib/firmware/f2255usb.bin*
removefrom linux-firmware /usr/lib/firmware/lgs8g75.fw*
removefrom linux-firmware /usr/lib/firmware/TDA7706*
removefrom linux-firmware /usr/lib/firmware/tlg2300_firmware.bin
removefrom linux-firmware /usr/lib/firmware/tlg2300_firmware.bin*
removefrom linux-firmware /usr/lib/firmware/s5p-mfc*
removefrom linux-firmware /usr/lib/firmware/go7007/*
removefrom linux-firmware /usr/lib/firmware/intel/IntcSST2.bin
removefrom linux-firmware /usr/lib/firmware/intel/IntcSST2.bin*
removefrom linux-firmware /usr/lib/firmware/intel/fw_sst*
removefrom linux-firmware /usr/lib/firmware/intel/dsp*
removefrom linux-firmware /usr/lib/firmware/as102*
removefrom linux-firmware /usr/lib/firmware/qcom/sdm845/*
removefrom linux-firmware /usr/lib/firmware/qcom/sm8250/*
removefrom linux-firmware /usr/lib/firmware/qcom/venus*/*
removefrom linux-firmware /usr/lib/firmware/meson/vdec/*
removefrom linux-firmware /usr/lib/firmware/mellanox/mlxsw_spectrum*
@ -239,7 +236,8 @@ removefrom linux-firmware /usr/lib/firmware/mellanox/mlxsw_spectrum*
%endif
removefrom lldpad /etc/*
removefrom mdadm /etc/* /usr/lib/systemd/system/mdmonitor*
removefrom mesa-dri-drivers /usr/${libdir}/dri/*_video.so
## gallium-pipe stuff is for compute (opencl), not needed for video
removefrom mesa-dri-drivers /usr/${libdir}/dri/*_video.so /usr/lib64/gallium-pipe/*
removefrom mt-st /usr/sbin/*
removefrom mtools /etc/*
removefrom ncurses-libs /usr/${libdir}/libform*
@ -268,7 +266,6 @@ removefrom openssh /usr/libexec/*
removefrom openssh-clients /etc/ssh/* /usr/bin/ssh-*
removefrom openssh-clients /usr/libexec/*
removefrom openssh-server /etc/ssh/* /usr/libexec/openssh/sftp-server
removefrom openssl /usr/bin/*
removefrom pam /usr/sbin/* /usr/share/locale/*
removefrom policycoreutils /etc/* /usr/bin/* /usr/share/locale/*
removefrom polkit /usr/bin/*
@ -291,23 +288,25 @@ removefrom smartmontools /usr/share/smartmontools/*
removefrom tar /usr/share/locale/*
removefrom usbutils /usr/bin/*
removefrom util-linux --allbut \
/usr/bin/{dmesg,eject,getopt,kill,login,lsblk,more,mount,umount,mountpoint,findmnt} \
/etc/mtab /etc/pam.d/login /etc/pam.d/remote \
/usr/sbin/{agetty,blkid,blockdev,clock,fdisk,fsck,fstrim,hwclock,losetup,zramctl} \
/usr/sbin/{mkswap,swaplabel,nologin,sfdisk,swapoff,swapon,wipefs,partx,fsfreeze} \
/usr/bin/{logger,hexdump,flock,chmem,lsmem,lscpu}
/usr/bin/{chmem,eject,getopt,hexdump,login,lscpu,lsmem,lsblk} \
/etc/pam.d/login /etc/pam.d/remote \
/usr/sbin/{clock,fdisk,fsfreeze,fstrim,hwclock,nologin,sfdisk,swaplabel,wipefs,zramctl}
removefrom util-linux-core --allbut \
/usr/bin/{dmesg,findmnt,flock,kill,logger,more,mount,mountpoint,umount} \
/etc/mtab \
/usr/sbin/{agetty,blkid,blockdev,fsck,losetup,mkswap,partx,swapoff,swapon}
removefrom volume_key-libs /usr/share/locale/*
removefrom wget /etc/* /usr/share/locale/*
removefrom wpa_supplicant /usr/sbin/eapol_test
removefrom xorg-x11-drv-intel /usr/${libdir}/libI*
removefrom xorg-x11-drv-openchrome /usr/${libdir}/libchrome*
removefrom xorg-x11-drv-wacom /usr/bin/*
removefrom xorg-x11-fonts-misc --allbut /usr/share/X11/fonts/misc/{6x13,encodings,fonts,*cursor}*
removefrom yelp /usr/share/yelp/mathjax*
%if branding.release:
removefrom ${branding.logos} /usr/share/plymouth/*
removefrom ${branding.logos} /etc/*
removefrom ${branding.logos} /usr/share/icons/{Bluecurve,oxygen}/*
removefrom ${branding.logos} /usr/share/{firstboot,kde4,pixmaps}/*
removefrom ${branding.logos} /usr/share/{kde4,pixmaps}/*
%endif
## cleanup /boot/ leaving vmlinuz, and .*hmac files

View File

@ -1,5 +1,9 @@
## lorax template file: populate the ramdisk (runtime image)
<%page args="basearch, product"/>
<%
# This version of grub2 moves the font directory and is needed to keep the efi template from failing.
GRUB2VER="1:2.06-3"
%>
## anaconda package
installpkg anaconda anaconda-widgets kexec-tools-anaconda-addon anaconda-install-img-deps
@ -17,12 +21,17 @@ installpkg grubby
%if basearch != "s390x":
## skip the firmware for sound, video, and scanners, none of which will
## do much good for the installer. Also skip uhd-firmware which is not
## even a kernel firmware package.
## even a kernel firmware package. liquidio and netronome firmwares are
## for enterprise switch devices, netinst deployment does not work on
## these so there is no point shipping them - see
## https://bugzilla.redhat.com/show_bug.cgi?id=2011615
installpkg --optional *-firmware --except alsa* --except midisport-firmware \
--except crystalhd-firmware --except ivtv-firmware \
--except cx18-firmware --except iscan-firmware \
--except uhd-firmware --except lulzbot-marlin-firmware \
--except gnome-firmware --except sigrok-firmware
--except gnome-firmware --except sigrok-firmware \
--except liquidio-firmware --except netronome-firmware \
--except mrvlprestera-firmware
installpkg b43-openfwwf
%endif
@ -32,12 +41,13 @@ installpkg glibc-all-langpacks
## arch-specific packages (bootloaders etc.)
%if basearch == "aarch64":
installpkg efibootmgr
installpkg grub2-efi-aa64-cdboot shim-aa64
installpkg grub2-efi-aa64-cdboot>=${GRUB2VER}
installpkg shim-aa64
installpkg uboot-tools
%endif
%if basearch in ("arm", "armhfp"):
installpkg efibootmgr
installpkg grub2-efi-arm-cdboot
installpkg grub2-efi-arm-cdboot>=${GRUB2VER}
installpkg grubby-deprecated
installpkg kernel-lpae
installpkg uboot-tools
@ -46,19 +56,22 @@ installpkg glibc-all-langpacks
installpkg gpart
%endif
%if basearch == "x86_64":
installpkg grub2-tools-efi
installpkg grub2-tools-efi>=${GRUB2VER}
installpkg efibootmgr
installpkg shim-x64 grub2-efi-x64-cdboot
installpkg shim-ia32 grub2-efi-ia32-cdboot
installpkg shim-x64
installpkg grub2-efi-x64-cdboot>=${GRUB2VER}
installpkg shim-ia32
installpkg grub2-efi-ia32-cdboot>=${GRUB2VER}
%endif
%if basearch in ("i386", "x86_64"):
installpkg biosdevname syslinux
installpkg grub2-tools grub2-tools-minimal grub2-tools-extra
installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
installpkg grub2-tools-extra>=${GRUB2VER}
%endif
%if basearch == "ppc64le":
installpkg powerpc-utils lsvpd ppc64-diag
installpkg grub2-tools grub2-tools-minimal grub2-tools-extra
installpkg grub2-${basearch}
installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
installpkg grub2-tools-extra>=${GRUB2VER} grub2-${basearch}>=${GRUB2VER}
%endif
%if basearch == "s390x":
installpkg lsscsi s390utils-base s390utils-cmsfs-fuse s390utils-hmcdrvfs
@ -138,11 +151,13 @@ installpkg dmidecode
## fonts & themes
installpkg abattis-cantarell-fonts
installpkg abattis-cantarell-vf-fonts
installpkg bitmap-fangsongti-fonts
installpkg dejavu-sans-fonts dejavu-sans-mono-fonts
installpkg google-noto-sans-vf-fonts google-noto-sans-mono-vf-fonts
installpkg google-noto-sans-arabic-vf-fonts
installpkg google-noto-sans-cjk-ttc-fonts
installpkg google-noto-sans-gurmukhi-fonts
installpkg google-noto-sans-ethiopic-vf-fonts google-noto-sans-georgian-vf-fonts
installpkg google-noto-sans-gurmukhi-vf-fonts google-noto-sans-hebrew-vf-fonts
installpkg google-noto-sans-sinhala-vf-fonts
installpkg jomolhari-fonts
installpkg khmer-os-system-fonts
@ -156,12 +171,9 @@ installpkg lohit-odia-fonts
installpkg lohit-tamil-fonts
installpkg lohit-telugu-fonts
installpkg paktype-naskh-basic-fonts
installpkg sil-abyssinica-fonts
installpkg sil-padauk-fonts
installpkg sil-scheherazade-fonts
installpkg smc-meera-fonts
installpkg rit-meera-new-fonts
installpkg thai-scalable-waree-fonts
installpkg xorg-x11-fonts-misc
## debugging/bug reporting tools
installpkg gdb-gdbserver

View File

@ -3,17 +3,13 @@
<%page args="root, basearch, libdir, configdir"/>
<%
stubs = ("list-harddrives", "raidstart", "raidstop")
configdir = configdir + "/common"
import os, time
SOURCE_DATE_EPOCH = os.environ.get('SOURCE_DATE_EPOCH', str(int(time.time())))
%>
## move_stubs()
move usr/share/anaconda/restart-anaconda usr/bin
%for stub in stubs:
-move usr/share/anaconda/${stub}-stub usr/bin/${stub}
%endfor
move usr/share/anaconda/list-harddrives-stub usr/bin/list-harddrives
## move_repos()
move etc/yum.repos.d etc/anaconda.repos.d
@ -30,10 +26,6 @@ symlink /lib/systemd/system/anaconda.target etc/systemd/system/default.target
mkdir etc/systemd/system/local-fs.target.wants/
symlink /lib/systemd/system/tmp.mount etc/systemd/system/local-fs.target.wants/tmp.mount
## Start rngd
mkdir etc/systemd/system/basic.target.wants/
symlink /lib/systemd/system/rngd.service etc/systemd/system/basic.target.wants/rngd.service
## Disable unwanted systemd services
systemctl disable systemd-readahead-collect.service \
systemd-readahead-replay.service \
@ -46,6 +38,7 @@ systemctl mask fedora-configure.service fedora-loadmodules.service \
fedora-wait-storage.service media.mount \
systemd-tmpfiles-clean.service systemd-tmpfiles-clean.timer \
ldconfig.service
remove usr/lib/systemd/system/rngd.service
## remove because it cannot be disabled
remove usr/lib/systemd/system-generators/lvm2-activation-generator
@ -83,6 +76,11 @@ install ${configdir}/pam.sshd etc/pam.d/sshd
install ${configdir}/pam.sshd etc/pam.d/login
install ${configdir}/pam.sshd etc/pam.d/remote
## set up inst.rngd support
install ${configdir}/inst.rngd.service etc/systemd/system/inst.rngd.service
mkdir etc/systemd/system/basic.target.wants/
symlink /etc/systemd/system/inst.rngd.service etc/systemd/system/basic.target.wants/inst.rngd.service
## set up "install" user account
append etc/passwd "install:x:0:0:root:/root:/usr/libexec/anaconda/run-anaconda"
append etc/shadow "install::14438:0:99999:7:::"
@ -120,6 +118,6 @@ append etc/lvm/lvm.conf "global {\n\tuse_lvmetad = 1\n}\n"
## TODO: we could run prelink here if we wanted?
## fix fonconfig cache containing timestamps
runcmd chroot ${root} /usr/bin/find /usr/share/fonts /usr/share/X11/fonts -newermt "@${SOURCE_DATE_EPOCH}" -exec \
runcmd chroot ${root} /usr/bin/find /usr/share/fonts -newermt "@${SOURCE_DATE_EPOCH}" -exec \
touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" {} +
runcmd chroot ${root} /usr/bin/fc-cache -f

View File

@ -70,7 +70,7 @@ class ImageMinimizer:
not_found = True
for hdr in mi:
not_found = False
rpms.add(hdr['name'].decode("utf8"))
rpms.add(hdr['name'])
if self.verbose and not_found:
print("%s package not found" % pattern)
@ -145,8 +145,13 @@ class ImageMinimizer:
self.ts.run(runCallback, "erase")
def filter(self):
for line in (open(self.filename).readlines()):
self.parse_line(line.strip())
if not os.path.isdir(self.prefix):
raise FileNotFoundError(f"No such directory: '{self.prefix}")
with open(self.filename) as f:
for line in f:
self.parse_line(line.strip())
self.remove()
self.remove_rpm()
@ -179,7 +184,7 @@ def main():
minimizer.filter()
except SystemExit as e:
sys.exit(e.code)
except KeyboardInterrupt as e:
except KeyboardInterrupt:
print("Aborted at user request")
if __name__ == "__main__":

View File

@ -61,7 +61,8 @@ else:
DRACUT_DEFAULT = ["--xz", "--install", "/.buildstamp", "--no-early-microcode", "--add", "fips"]
# Used for DNF conf.module_platform_id
DEFAULT_PLATFORM_ID = "platform:f34"
DEFAULT_PLATFORM_ID = "platform:f36"
DEFAULT_RELEASEVER = "36"
class ArchData(DataHolder):
lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64")

View File

@ -22,7 +22,7 @@ import os
import sys
import argparse
from pylorax import vernum
from pylorax import DEFAULT_RELEASEVER, vernum
version = "{0}-{1}".format(os.path.basename(sys.argv[0]), vernum)
@ -306,7 +306,7 @@ def lmc_parser(dracut_default=""):
parser.add_argument("--project", default="Linux",
help="substituted for @PROJECT@ in bootloader config files")
parser.add_argument("--releasever", default="34",
parser.add_argument("--releasever", default=DEFAULT_RELEASEVER,
help="substituted for @VERSION@ in bootloader config files")
parser.add_argument("--volid", default=None, help="volume id")
parser.add_argument("--squashfs-only", action="store_true", default=False,

View File

@ -34,7 +34,7 @@ from pykickstart.constants import KS_SHUTDOWN
from pykickstart.version import makeVersion
# Use the Lorax treebuilder branch for iso creation
from pylorax import ArchData
from pylorax import DEFAULT_RELEASEVER, ArchData
from pylorax.base import DataHolder
from pylorax.executils import execWithRedirect
from pylorax.imgutils import DracutChroot, PartitionMount
@ -149,7 +149,7 @@ def dracut_args(opts):
def make_appliance(disk_img, name, template, outfile, networks=None, ram=1024,
vcpus=1, arch=None, title="Linux", project="Linux",
releasever="34"):
releasever=DEFAULT_RELEASEVER):
"""
Generate an appliance description file
@ -163,7 +163,7 @@ def make_appliance(disk_img, name, template, outfile, networks=None, ram=1024,
:param str arch: CPU architecture. Default is 'x86_64'
:param str title: Title, passed to template. Default is 'Linux'
:param str project: Project, passed to template. Default is 'Linux'
:param str releasever: Release version, passed to template. Default is 34
:param str releasever: Release version, passed to template.
"""
if not (disk_img and template and outfile):
return None

View File

@ -20,12 +20,12 @@ import dnf
import os
import shutil
from pylorax import DEFAULT_PLATFORM_ID
from pylorax import DEFAULT_PLATFORM_ID, DEFAULT_RELEASEVER
from pylorax.sysutils import flatconfig
def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
enablerepos=None, disablerepos=None,
tempdir="/var/tmp", proxy=None, releasever="34",
tempdir="/var/tmp", proxy=None, releasever=DEFAULT_RELEASEVER,
cachedir=None, logdir=None, sslverify=True, dnfplugins=None):
""" Create a dnf Base object and setup the repositories and installroot
@ -53,6 +53,8 @@ def get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None,
return None
mirrorlists = mirrorlists or []
enablerepos = enablerepos or []
disablerepos = disablerepos or []
# sanitize the repositories
sources = list(sanitize_repo(r) for r in sources)

View File

@ -416,12 +416,17 @@ def novirt_install(opts, disk_img, disk_size, cancel_func=None, tar_img=None):
setfiles_args = ["-e", "/proc", "-e", "/sys",
"/etc/selinux/targeted/contexts/files/file_contexts", "/"]
execWithRedirect("sync", ["-f", dirinstall_path])
if "--dirinstall" in args:
# setfiles may not be available, warn instead of fail
try:
execWithRedirect("setfiles", setfiles_args, root=dirinstall_path)
except (subprocess.CalledProcessError, OSError) as e:
log.warning("Running setfiles on install tree failed: %s", str(e))
if os.path.exists(disk_img):
execWithRedirect("du", ["-B", "1", disk_img])
execWithRedirect("fstrim", ["-v", dirinstall_path])
else:
with PartitionMount(disk_img) as img_mount:
if img_mount and img_mount.mount_dir:
@ -432,7 +437,10 @@ def novirt_install(opts, disk_img, disk_size, cancel_func=None, tar_img=None):
# For image installs, run fstrim to discard unused blocks. This way
# unused blocks do not need to be allocated for sparse image types
execWithRedirect("fstrim", [img_mount.mount_dir])
execWithRedirect("du", ["-B", "1", disk_img])
execWithRedirect("fstrim", ["-v", img_mount.mount_dir])
if os.path.exists(disk_img):
execWithRedirect("du", ["-B", "1", disk_img])
except (subprocess.CalledProcessError, OSError) as e:
log.error("Running anaconda failed: %s", e)
@ -524,8 +532,10 @@ def novirt_install(opts, disk_img, disk_size, cancel_func=None, tar_img=None):
if rc:
raise InstallError("novirt_install mktar failed: rc=%s" % rc)
else:
# For raw disk images, use fallocate to deallocate unused space
execWithRedirect("fallocate", ["--dig-holes", disk_img], raise_err=True)
# Examine the image for sections that can be made sparse
execWithRedirect("du", ["-B", "1", disk_img])
execWithRedirect("fallocate", ["--dig-holes", "-v", disk_img], raise_err=True)
execWithRedirect("du", ["-B", "1", disk_img])
# For make_tar_disk, wrap the result in a tar file, and remove the original disk image.
if opts.make_tar_disk:

View File

@ -185,8 +185,149 @@ class TemplateRunner(object):
raise
class InstallpkgMixin:
"""Helper class used with *Runner classes"""
def _pkgver(self, pkg_spec):
"""
Helper to parse package version compare operators
Returns a list of matching package objects or an empty list
Examples:
"bash>4.01"
"tmux>=3.1.4-5"
"grub2<2.06"
"""
# Always return the highest of the filtered results
if not any(g for g in ['=', '<', '>', '!'] if g in pkg_spec):
query = dnf.subject.Subject(pkg_spec).get_best_query(self.dbo.sack)
else:
pcv = re.split(r'([!<>=]+)', pkg_spec)
if not pcv[0]:
raise RuntimeError("Missing package name")
if not pcv[-1]:
raise RuntimeError("Missing version")
if len(pcv) != 3:
raise RuntimeError("Too many comparisons")
query = dnf.subject.Subject(pcv[0]).get_best_query(self.dbo.sack)
# Parse the comparison operators
if pcv[1] == "=" or pcv[1] == "==":
query.filterm(evr__eq = pcv[2])
elif pcv[1] == "!=" or pcv[1] == "<>":
query.filterm(evr__neq = pcv[2])
elif pcv[1] == ">":
query.filterm(evr__gt = pcv[2])
elif pcv[1] == ">=" or pcv[1] == "=>":
query.filterm(evr__gte = pcv[2])
elif pcv[1] == "<":
query.filterm(evr__lt = pcv[2])
elif pcv[1] == "<=" or pcv[1] == "=<":
query.filterm(evr__lte = pcv[2])
# MUST be added last. Otherwise it will only return the latest, not the latest of the
# filtered results.
query.filterm(latest=True)
return [pkg for pkg in query.apply()]
def installpkg(self, *pkgs):
'''
installpkg [--required|--optional] [--except PKGGLOB [--except PKGGLOB ...]] PKGGLOB [PKGGLOB ...]
Request installation of all packages matching the given globs.
Note that this is just a *request* - nothing is *actually* installed
until the 'run_pkg_transaction' command is given.
The non-except PKGGLOB can contain a version comparison. This should
not be used as a substitute for package dependencies, it should be
used to enforce installation of tools required by the templates. eg.
grub2 changed the font location in 2.06-2 so the current templates
require grub2 to be 2.06-2 or later.
installpkg tmux>=2.8 bash=5.0.0-1
It supports the =,!=,>,>=,<,<= operators. == is an alias for =, and
<> is an alias for !=
There should be no spaces between the package name, the compare
operator, and the version.
NOTE: When testing for equality you must include the version AND
release, otherwise it won't match anything.
--required is now the default. If the PKGGLOB can be missing pass --optional
'''
if pkgs[0] == '--optional':
pkgs = pkgs[1:]
required = False
elif pkgs[0] == '--required':
pkgs = pkgs[1:]
required = True
else:
required = True
excludes = []
while '--except' in pkgs:
idx = pkgs.index('--except')
if len(pkgs) == idx+1:
raise ValueError("installpkg needs an argument after --except")
# TODO: Check for bare version compare operators
excludes.append(pkgs[idx+1])
pkgs = pkgs[:idx] + pkgs[idx+2:]
errors = False
for p in pkgs:
# Did a version compare operatore end up in the list?
if p[0] in ['=', '<', '>', '!']:
raise RuntimeError("Version compare operators cannot be surrounded by spaces")
try:
# Start by using Subject to generate a package query, which will
# give us a query object similar to what dbo.install would select,
# minus the handling for multilib. This query may contain
# multiple arches. Pull the package names out of that, filter any
# that match the excludes patterns, and pass those names back to
# dbo.install to do the actual, arch and version and multilib
# aware, package selction.
# dnf queries don't have a concept of negative globs which is why
# the filtering is done the hard way.
# Get the latest package, or package matching the selected version
pkgnames = self._pkgver(p)
if not pkgnames:
raise dnf.exceptions.PackageNotFoundError("no package matched", p)
# Apply excludes to the name only
for exclude in excludes:
pkgnames = [pkg for pkg in pkgnames if not fnmatch.fnmatch(pkg.name, exclude)]
# Convert to a sorted NVR list for installation
pkgnvrs = sorted(["{}-{}-{}".format(pkg.name, pkg.version, pkg.release) for pkg in pkgnames])
# If the request is a glob, expand it in the log
if any(g for g in ['*','?','.'] if g in p):
logger.info("installpkg: %s expands to %s", p, ",".join(pkgnvrs))
for pkgnvr in pkgnvrs:
try:
self.dbo.install(pkgnvr)
except Exception as e: # pylint: disable=broad-except
if required:
raise
# Not required, log it and continue processing pkgs
logger.error("installpkg %s failed: %s", pkgnvr, str(e))
except Exception as e: # pylint: disable=broad-except
logger.error("installpkg %s failed: %s", p, str(e))
errors = True
if errors and required:
raise Exception("Required installpkg failed.")
# TODO: operate inside an actual chroot for safety? Not that RPM bothers..
class LoraxTemplateRunner(TemplateRunner):
class LoraxTemplateRunner(TemplateRunner, InstallpkgMixin):
'''
This class parses and executes Lorax templates. Sample usage:
@ -531,77 +672,6 @@ class LoraxTemplateRunner(TemplateRunner):
logger.error('command returned failure (%d)', e.returncode)
raise
def installpkg(self, *pkgs):
'''
installpkg [--required|--optional] [--except PKGGLOB [--except PKGGLOB ...]] PKGGLOB [PKGGLOB ...]
Request installation of all packages matching the given globs.
Note that this is just a *request* - nothing is *actually* installed
until the 'run_pkg_transaction' command is given.
--required is now the default. If the PKGGLOB can be missing pass --optional
'''
if pkgs[0] == '--optional':
pkgs = pkgs[1:]
required = False
elif pkgs[0] == '--required':
pkgs = pkgs[1:]
required = True
else:
required = True
excludes = []
while '--except' in pkgs:
idx = pkgs.index('--except')
if len(pkgs) == idx+1:
raise ValueError("installpkg needs an argument after --except")
excludes.append(pkgs[idx+1])
pkgs = pkgs[:idx] + pkgs[idx+2:]
errors = False
for p in pkgs:
try:
# Start by using Subject to generate a package query, which will
# give us a query object similar to what dbo.install would select,
# minus the handling for multilib. This query may contain
# multiple arches. Pull the package names out of that, filter any
# that match the excludes patterns, and pass those names back to
# dbo.install to do the actual, arch and version and multilib
# aware, package selction.
# dnf queries don't have a concept of negative globs which is why
# the filtering is done the hard way.
pkgnames = [pkg for pkg in dnf.subject.Subject(p).get_best_query(self.dbo.sack).filter(latest=True)]
if not pkgnames:
raise dnf.exceptions.PackageNotFoundError("no package matched", p)
# Apply excludes to the name only
for exclude in excludes:
pkgnames = [pkg for pkg in pkgnames if not fnmatch.fnmatch(pkg.name, exclude)]
# Convert to a sorted NVR list for installation
pkgnvrs = sorted(["{}-{}-{}".format(pkg.name, pkg.version, pkg.release) for pkg in pkgnames])
# If the request is a glob, expand it in the log
if any(g for g in ['*','?','.'] if g in p):
logger.info("installpkg: %s expands to %s", p, ",".join(pkgnvrs))
for pkgnvr in pkgnvrs:
try:
self.dbo.install(pkgnvr)
except Exception as e: # pylint: disable=broad-except
if required:
raise
# Not required, log it and continue processing pkgs
logger.error("installpkg %s failed: %s", pkgnvr, str(e))
except Exception as e: # pylint: disable=broad-except
logger.error("installpkg %s failed: %s", p, str(e))
errors = True
if errors and required:
raise Exception("Required installpkg failed.")
def removepkg(self, *pkgs):
'''
removepkg PKGGLOB [PKGGLOB...]
@ -800,7 +870,7 @@ class LoraxTemplateRunner(TemplateRunner):
except CalledProcessError:
pass
class LiveTemplateRunner(TemplateRunner):
class LiveTemplateRunner(TemplateRunner, InstallpkgMixin):
"""
This class parses and executes a limited Lorax template. Sample usage:
@ -817,68 +887,3 @@ class LiveTemplateRunner(TemplateRunner):
self.pkgnames = []
super(LiveTemplateRunner, self).__init__(fatalerrors, templatedir, defaults)
def installpkg(self, *pkgs):
'''
installpkg [--required|--optional] [--except PKGGLOB [--except PKGGLOB ...]] PKGGLOB [PKGGLOB ...]
Request installation of all packages matching the given globs.
Note that this is just a *request* - nothing is *actually* installed
until the 'run_pkg_transaction' command is given.
--required is now the default. If the PKGGLOB can be missing pass --optional
'''
if pkgs[0] == '--optional':
pkgs = pkgs[1:]
required = False
elif pkgs[0] == '--required':
pkgs = pkgs[1:]
required = True
else:
required = True
excludes = []
while '--except' in pkgs:
idx = pkgs.index('--except')
if len(pkgs) == idx+1:
raise ValueError("installpkg needs an argument after --except")
excludes.append(pkgs[idx+1])
pkgs = pkgs[:idx] + pkgs[idx+2:]
errors = False
for p in pkgs:
try:
# Start by using Subject to generate a package query, which will
# give us a query object similar to what dbo.install would select,
# minus the handling for multilib. This query may contain
# multiple arches. Pull the package names out of that, filter any
# that match the excludes patterns, and pass those names back to
# dbo.install to do the actual, arch and version and multilib
# aware, package selction.
# dnf queries don't have a concept of negative globs which is why
# the filtering is done the hard way.
pkgnames = [pkg for pkg in dnf.subject.Subject(p).get_best_query(self.dbo.sack).filter(latest=True)]
if not pkgnames:
raise dnf.exceptions.PackageNotFoundError("no package matched", p)
# Apply excludes to the name only
for exclude in excludes:
pkgnames = [pkg for pkg in pkgnames if not fnmatch.fnmatch(pkg.name, exclude)]
# Convert to a sorted NVR list for installation
pkgnvrs = sorted(["{}-{}-{}".format(pkg.name, pkg.version, pkg.release) for pkg in pkgnames])
# If the request is a glob, expand it in the log
if any(g for g in ['*','?','.'] if g in p):
logger.info("installpkg: %s expands to %s", p, ",".join(pkgnvrs))
self.pkgs.extend(pkgnvrs)
self.pkgnames.extend([pkg.name for pkg in pkgnames])
except Exception as e: # pylint: disable=broad-except
logger.error("installpkg %s failed: %s", p, str(e))
errors = True
if errors and required:
raise Exception("Required installpkg failed.")

View File

@ -74,30 +74,25 @@ class LogRequestHandler(socketserver.BaseRequestHandler):
Loops until self.server.kill is True
"""
log.info("Processing logs from %s", self.client_address)
line = ""
data = b""
while True:
if self.server.kill:
break
try:
data = str(self.request.recv(4096), "utf8")
if self.fp:
self.fp.write(data)
self.fp.flush()
# check the data for errors and set error flag
# need to assemble it into lines so we can test for the error
# string.
while data:
more = data.split("\n", 1)
line += more[0]
if len(more) > 1:
self.iserror(line)
line = ""
data = more[1]
data += self.request.recv(4096)
for line in data.splitlines(keepends=True):
if line.endswith(b"\n"):
# Ignore invalid UTF8 inside lines
self.iserror(str(line[:-1], "utf8", "ignore"))
if self.fp:
self.fp.write(str(line, "utf8", "ignore"))
self.fp.flush()
data = b""
else:
data = None
# Not the end of the line, keep for later
data = line
break
except socket.timeout:
pass
except Exception as e: # pylint: disable=broad-except
@ -106,7 +101,6 @@ class LogRequestHandler(socketserver.BaseRequestHandler):
def finish(self):
log.info("Shutting down log processing")
self.request.close()
if self.fp:
self.fp.close()
@ -202,3 +196,4 @@ class LogMonitor(object):
"""Force shutdown of the monitoring thread"""
self.server.kill = True
self.server_thread.join()
self.server.server_close()

View File

@ -21,8 +21,7 @@ import logging
log = logging.getLogger("livemedia-creator")
import os
import pycdlib
from pycdlib.pycdlibexception import PyCdlibException
import iso9660
from pylorax.imgutils import mount, umount
@ -60,7 +59,8 @@ class IsoMountpoint(object):
kernel_list = [("/isolinux/vmlinuz", "/isolinux/initrd.img"),
("/ppc/ppc64/vmlinuz", "/ppc/ppc64/initrd.img"),
("/images/pxeboot/vmlinuz", "/images/pxeboot/initrd.img")]
("/images/pxeboot/vmlinuz", "/images/pxeboot/initrd.img"),
("/images/kernel.img", "/images/initrd.img")]
if os.path.isdir(self.mount_dir+"/repodata"):
self.repo = self.mount_dir
@ -92,13 +92,18 @@ class IsoMountpoint(object):
def get_iso_label(self):
"""
Get the iso's label using pycdlib
Get the iso's label using pycdio
Sets self.label if one is found
"""
try:
iso = pycdlib.PyCdlib()
iso.open(self.iso_path)
self.label = iso.pvd.volume_identifier.decode("UTF-8").strip()
except PyCdlibException as e:
iso = iso9660.ISO9660.IFS(source=self.iso_path)
if not iso.is_open():
raise RuntimeError("error opening file")
self.label = iso.get_volume_id()
if self.label is None:
self.label = ""
raise RuntimeError("error reading volume id")
except RuntimeError as e:
log.error("Problem reading label from %s: %s", self.iso_path, e)

View File

@ -115,7 +115,7 @@ def main():
opts.image_type = "qcow2"
if opts.image_type and not os.path.exists("/usr/bin/qemu-img"):
errors.append("image-type requires the qemu-img utility to be installed." % opts.image_type)
errors.append("image-type option requires the qemu-img utility to be installed.")
if opts.image_type and opts.make_iso:
errors.append("image-type cannot be used to make a bootable iso.")

View File

@ -170,14 +170,14 @@ def main():
for kv in opts.add_template_vars:
k, t, v = kv.partition('=')
if t == '':
raise ValueError("Missing '=' for key=value in " % kv)
raise ValueError("Missing '=' for key=value in %s" % kv)
parsed_add_template_vars[k] = v
parsed_add_arch_template_vars = {}
for kv in opts.add_arch_template_vars:
k, t, v = kv.partition('=')
if t == '':
raise ValueError("Missing '=' for key=value in " % kv)
raise ValueError("Missing '=' for key=value in %s" % kv)
parsed_add_arch_template_vars[k] = v
if 'SOURCE_DATE_EPOCH' in os.environ:

View File

@ -31,6 +31,9 @@ NO_EFI = 0
EFIBOOT = 1
MACBOOT = 2
# Maximum filename length
MAX_FNAME = 253
class Tool():
"""A class to check for executables and required files"""
tools = []
@ -41,8 +44,9 @@ class Tool():
def __init__(self):
# If there are arches listed it must be running on one of them
if self.arches and os.uname().machine not in self.arches:
log.debug("%s is not supported by this tool", os.uname().machine)
raise RuntimeError("%s not supported" % os.uname().machine)
msg = "%s class does not support %s arch" % (self.__class__.__name__, os.uname().machine)
log.debug(msg)
raise RuntimeError(msg)
# Check the system to see if the tools are available and record their paths
for e in self.tools:
@ -101,21 +105,60 @@ class MkmacbootTool(MkefibootTool):
return []
class MkCdbootImg(Tool):
"""Create the s390x cdboot.img"""
tools = ["mk-s390image"]
arches = ["s390x"]
def run(self, isodir, tmpdir, product="Fedora"):
def tf(f):
return os.path.join(tmpdir, f)
# First check for the needed files
for f in ["images/kernel.img", "images/initrd.img", "images/cdboot.prm"]:
if not os.path.exists(tf(f)):
log.debug("Missing file %s", f)
raise RuntimeError("Missing requirement %s" % f)
cmd = ["mk-s390image", tf("images/kernel.img"), tf("images/cdboot.img"),
"-r", tf("images/initrd.img"),
"-p", tf("images/cdboot.prm")]
log.debug(" ".join(cmd))
try:
subprocess.check_output(cmd)
except subprocess.CalledProcessError as e:
log.error(str(e))
raise RuntimeError("Running mk-s390image")
# images/cdboot.img always exists, already in grafts list
return []
class MakeISOTool(Tool):
"""Class to hold details for specific iso creation tools"""
def check_file_sizes(self, grafts):
"""Return True any file exceeds 4GiB"""
def check_files(self, grafts):
"""Check file size and filename length for problems
Returns True if any file exceeds 4GiB
Raises a RuntimeError if any filename is longer than MAX_FNAME
This examines all the files included, so may take some time.
"""
big_file = False
for src, _ in grafts:
if os.path.isdir(src):
for top, dirs, files in os.walk(src):
for f in files + dirs:
if os.stat(os.path.join(top,f)).st_size >= 4*1024**3:
return True
big_file = True
if len(f) > MAX_FNAME:
raise RuntimeError("iso contains filenames that are too long: %s" % f)
else:
if os.stat(src).st_size >= 4*1024**3:
return True
big_file = True
if len(src) > MAX_FNAME:
raise RuntimeError("iso contains filenames that are too long: %s" % f)
return False
return big_file
def _exec(self, cmd, grafts, output_iso, efimode=NO_EFI, implantmd5=True):
"""Add the grafts and run the command and then implant the md5 checksums"""
@ -165,7 +208,7 @@ class Mkisofs_aarch64(MakeISOTool):
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["mkisofs", "-o", output_iso, "-R", "-J", "-V", volume_name,
"-T"]
"-joliet-long", "-T"]
if log.root.level < log.INFO:
cmd.append("--verbose")
if efimode > NO_EFI:
@ -173,7 +216,7 @@ class Mkisofs_aarch64(MakeISOTool):
if efimode > EFIBOOT:
cmd.extend(["-eltorito-alt-boot", "-e", "images/macboot.img", "-no-emul-boot"])
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.append("-allow-limited-size")
# Create the iso and implant the md5 checksums
@ -182,19 +225,20 @@ class Mkisofs_aarch64(MakeISOTool):
class Mkisofs_ppc(MakeISOTool):
"""Use the mkisofs tool to create the final iso (ppc)"""
tools = ["mkisofs"]
tools = ["mkisofs", "implantisomd5"]
requirements = ["/usr/share/lorax/templates.d/99-generic/config_files/ppc/mapping"]
arches = ["ppc"]
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["mkisofs", "-o", output_iso, "-R", "-J", "-V", volume_name,
"-U", "-T", "-part", "-hfs", "-r", "-l", "-sysid", "PPC",
"-chrp-boot", "-no-desktop", "-allow-multidot",
"-map", self.requirements[0], "-hfs-bless", "boot/grub/powerpc-ieee1275"]
cmd = ["mkisofs", "-joliet-long", "-U", "-J", "-R", "-T",
"-o", output_iso, "-part", "-hfs", "-r", "-l",
"-sysid", "PPC", "-V", volume_name, "-chrp-boot",
"-hfs-bless", "boot/grub/powerpc-ieee1275",
"-map", self.requirements[0], "-no-desktop", "-allow-multidot"]
if log.root.level < log.INFO:
cmd.append("--verbose")
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.append("-allow-limited-size")
# Create the iso and implant the md5 checksums
@ -203,19 +247,19 @@ class Mkisofs_ppc(MakeISOTool):
class Mkisofs_ppc64le(MakeISOTool):
"""Use the mkisofs tool to create the final iso (ppc64le)"""
tools = ["mkisofs"]
tools = ["mkisofs", "implantisomd5"]
requirements = ["/usr/share/lorax/templates.d/99-generic/config_files/ppc/mapping"]
arches = ["ppc64le"]
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["mkisofs", "-o", output_iso, "-R", "-J", "-V", volume_name,
"-T", "-part", "-hfs", "-r", "-l", "-sysid", "PPC",
"-chrp-boot", "-no-desktop", "-allow-multidot",
"-map", self.requirements[0]]
cmd = ["mkisofs", "-joliet-long", "-U", "-J", "-R", "-T",
"-o", output_iso, "-part", "-hfs", "-r", "-l",
"-sysid", "PPC", "-V", volume_name, "-chrp-boot",
"-map", self.requirements[0], "-no-desktop", "-allow-multidot"]
if log.root.level < log.INFO:
cmd.append("--verbose")
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.append("-allow-limited-size")
# Create the iso and implant the md5 checksums
@ -224,19 +268,20 @@ class Mkisofs_ppc64le(MakeISOTool):
class Mkisofs_s390(MakeISOTool):
"""Use the mkisofs tool to create the final iso (s390)"""
tools = ["mkisofs"]
tools = ["mkisofs", "implantisomd5"]
requirements = []
arches = ["s390", "s390x"]
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["mkisofs", "-o", output_iso, "-R", "-J", "-V", volume_name,
"-joliet-long",
"-b", "images/cdboot.img",
"-c", "images/boot.cat",
"-boot-load-size", "4", "-no-emul-boot"]
if log.root.level < log.INFO:
cmd.append("--verbose")
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.append("-allow-limited-size")
# Create the iso and implant the md5 checksums
@ -245,12 +290,13 @@ class Mkisofs_s390(MakeISOTool):
class Mkisofs_x86_64(MakeISOTool):
"""Use the mkisofs tool to create the final iso (x86_64)"""
tools = ["mkisofs", "isohybrid"]
tools = ["mkisofs", "isohybrid", "implantisomd5"]
requirements = []
arches = ["x86_64", "i386"]
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["mkisofs", "-o", output_iso, "-R", "-J", "-V", volume_name,
"-joliet-long",
"-b", "isolinux/isolinux.bin",
"-c", "isolinux/boot.cat",
"-boot-load-size", "4", "-boot-info-table", "-no-emul-boot"]
@ -261,7 +307,7 @@ class Mkisofs_x86_64(MakeISOTool):
if efimode > EFIBOOT:
cmd.extend(["-eltorito-alt-boot", "-e", "images/macboot.img", "-no-emul-boot"])
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.append("-allow-limited-size")
# Create the iso, implant the md5 checksums, and create hybrid iso
@ -276,7 +322,7 @@ class Xorrisofs_aarch64(MakeISOTool):
def run(self, tmpdir, grafts, volume_name, output_iso, efimode):
cmd = ["xorrisofs", "-o", output_iso,
"-R", "-J", "-V", volume_name]
"-R", "-J", "-V", volume_name, "-joliet-long"]
if log.root.level < log.INFO:
cmd.append("--verbose")
if efimode >= EFIBOOT:
@ -284,7 +330,7 @@ class Xorrisofs_aarch64(MakeISOTool):
if efimode == MACBOOT:
cmd.extend(["-eltorito-alt-boot", "-e", "images/macboot.img", "-no-emul-boot"])
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.extend(["-iso-level", "3"])
# Create the iso and implant the md5 checksums
@ -299,13 +345,13 @@ class Xorrisofs_ppc64le(MakeISOTool):
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["xorrisofs", "-o", output_iso,
"-R", "-J", "-V", volume_name,
"-R", "-J", "-V", volume_name, "-joliet-long",
"-U", "-r", "-l", "-sysid", "PPC",
"-A", volume_name, "-chrp-boot"]
if log.root.level < log.INFO:
cmd.append("--verbose")
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.extend(["-iso-level", "3"])
# Create the iso and implant the md5 checksums
@ -320,13 +366,13 @@ class Xorrisofs_s390(MakeISOTool):
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["xorrisofs", "-o", output_iso,
"-R", "-J", "-V", volume_name,
"-R", "-J", "-V", volume_name, "-joliet-long",
"-b", "images/cdboot.img", "-c", "images/boot.cat",
"-boot-load-size", "4", "-no-emul-boot"]
if log.root.level < log.INFO:
cmd.append("--verbose")
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.extend(["-iso-level", "3"])
# Create the iso and implant the md5 checksums
@ -341,7 +387,7 @@ class Xorrisofs_x86_64(MakeISOTool):
def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI):
cmd = ["xorrisofs", "-o", output_iso,
"-R", "-J", "-V", volume_name,
"-R", "-J", "-V", volume_name, "-joliet-long",
"-isohybrid-mbr", self.requirements[0],
"-b", "isolinux/isolinux.bin",
"-c", "isolinux/boot.cat",
@ -353,7 +399,7 @@ class Xorrisofs_x86_64(MakeISOTool):
if efimode == MACBOOT:
cmd.extend(["-eltorito-alt-boot", "-e", "images/macboot.img", "-no-emul-boot", "-isohybrid-gpt-hfsplus"])
if self.check_file_sizes(grafts):
if self.check_files(grafts):
cmd.extend(["-iso-level", "3"])
# Create the iso and implant the md5 checksums
@ -394,6 +440,18 @@ class MakeKickstartISO():
try:
self.iso = IsoMountpoint(self.input_iso)
self.label = self.iso.label if volid is None else volid
if not self.label:
raise RuntimeError("No volume id found, cannot create iso.")
# If the iso contains a .discinfo file check the arch against the host's
if os.path.exists(os.path.join(self.iso.mount_dir, ".discinfo")):
with open(os.path.join(self.iso.mount_dir, ".discinfo")) as f:
discinfo = [l.strip() for l in f.readlines()]
log.info("iso arch = %s", discinfo[2])
if os.uname().machine != discinfo[2]:
raise RuntimeError("iso arch does not match the host arch.")
log.info("Volume Id = %s", self.label)
if os.path.exists(os.path.join(self.iso.mount_dir, "images/efiboot.img")):
@ -443,10 +501,25 @@ class MakeKickstartISO():
os.unlink(os.path.join(src, f))
def run_mkefiboot(self, isodir, tmpdir):
if self.efimode == NO_EFI:
return
self.mkefiboot.run(isodir, tmpdir)
if self.efimode == MACBOOT:
self.mkmacboot.run(isodir, tmpdir)
def run_mkcdbootimg(self, isodir, tmpdir):
"""Rebuild the cdboot.img if this is running on s390x
"""
try:
t = MkCdbootImg()
except RuntimeError as e:
# This is expected on everything except s390x
if "does not support" in str(e):
return
raise
t.run(isodir, tmpdir)
def edit_configs(self, isodir, tmpdir):
"""Find and edit any configuration files
@ -532,15 +605,18 @@ class MakeKickstartISO():
out_fp.write("\n")
def _edit_s390(self, isodir, tmpdir):
"""Edit the images/generic.prm file, adding the kickstart and extra arguments"""
orig_cfg = os.path.join(isodir, "images/generic.prm")
if not os.path.exists(orig_cfg):
log.warning("No images/generic.prm file found")
return []
"""Edit the generic.prm and cdboot.prm files, adding the kickstart
and extra arguments
"""
for cfg in ["images/generic.prm", "images/cdboot.prm"]:
orig_cfg = os.path.join(isodir, cfg)
if not os.path.exists(orig_cfg):
log.warning("No %s file found", cfg)
continue
# Append to the config file
with open(os.path.join(tmpdir, "images/generic.prm"), "a") as out_fp:
out_fp.write(self.add_args+"\n")
# Append to the config file
with open(os.path.join(tmpdir, cfg), "a") as out_fp:
out_fp.write(self.add_args+"\n")
def run(self):
"""Modify the ISO"""
@ -559,6 +635,9 @@ class MakeKickstartISO():
# Copy and edit the configuration files
self.edit_configs(self.iso.mount_dir, tmpdir)
# Recreate the cdboot.img on s390x
self.run_mkcdbootimg(self.iso.mount_dir, tmpdir)
# Run the mkefiboot tool on the edited EFI directory, add the new files to the grafts
self.run_mkefiboot(self.iso.mount_dir, tmpdir)
@ -605,7 +684,7 @@ def main():
if os.getuid() != 0:
log.error("You must run this as root, it needs to mount the iso and run mkefiboot")
sys.exit(-1)
return 1
try:
app = MakeKickstartISO(args.ks, args.input_iso, args.output_iso,
@ -613,6 +692,10 @@ def main():
app.run()
except RuntimeError as e:
log.error(str(e))
return 1
return 0
if __name__ == '__main__':
main()
sys.exit(main())

Some files were not shown because too many files have changed in this diff Show More