lorax/docs/man/image-minimizer.1

153 lines
3.8 KiB
Groff
Raw Normal View History

2021-12-21 21:21:11 +00:00
.\" 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.
.