summaryrefslogtreecommitdiffstats
path: root/febootstrap-minimize.pod
blob: 4665d87f996a0d73838df05ab65d2eac185db40d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
=head1 NAME

febootstrap-minimize - Minimize an febootstrap image

=head1 SYNOPSIS

 febootstrap-minimize [--options] DIR

=head1 DESCRIPTION

I<febootstrap-minimize> minimizes an L<febootstrap(8)>-created
filesystem.  This means that unneeded files and cruft are removed from
the image.

If no options are given, the default is to minimize the image as much
as possible.  This means, for example, that locales are removed so the
image will only be usable in US-English, there will be no
documentation or manual pages, and the image will only work in a UTC
timezone.

Note that image minimization involves deleting files that have been
installed by RPM.  Thus after minimization, it is no longer guaranteed
that RPM will function correctly on the image.  You should only do
this as a final step for "throwaway" appliances that do not need to be
modified or upgraded in future.

=head1 OPTIONS

=over 4

=item B<--all>

Perform all minimization operations, to produce the smallest possible
image.  Note in particular that locales are discarded.

You can perform all minimization operations I<except> X, Y and Z by
doing:

 febootstrap-minimize --all --keep-X --keep-Y --keep-Z ...

(C<--all> can be omitted since it is the default).

=item B<--none>

Start with no minimization operations.  You can specify I<only>
minimization operations X, Y and Z like this:

 febootstrap-minimize --none --drop-X --drop-Y --drop-Z ...

=item B<--keep-locales>

=item B<--drop-locales>

Keep or drop locale support.

=item B<--keep-docs>

=item B<--drop-docs>

Keep or drop documentation, man pages and info files.

=item B<--keep-cracklib>

=item B<--drop-cracklib>

Keep or drop cracklib libraries.

=item B<--keep-i18n>

=item B<--drop-i18n>

Keep or drop C</usr/share/i18n>.

=item B<--keep-zoneinfo>

=item B<--drop-zoneinfo>

Keep or drop all timezones (except UTC which is never deleted).

=item B<--keep-rpmdb>

=item B<--drop-rpmdb>

Keep or drop the RPM and YUM package databases.  Obviously RPM and YUM will be
completely non-functional if you drop these.

=item B<--keep-yum-cache>

=item B<--drop-yum-cache>

Keep or drop the yum cache.  Note that L<febootstrap(8)> has already
deleted this directory unless you ran it with the C<--no-clean>
option.

=item B<--keep-services>

=item B<--drop-services>

Keep or drop the C</etc/services> file.  If dropped, this file is
replaced with a very minimal one which just lists the most common
services.  For less common services you will have to refer to them by
port number instead of name.

=item B<--keep-sln>

=item B<--drop-sln>

Keep or drop C</sbin/sln> (statically linked C<ln>).  This is not
really required in minimal appliances.

=item B<--keep-ldconfig>

=item B<--drop-ldconfig>

Keep or drop C</sbin/ldconfig>, C</etc/ld.so.cache> and
C</var/cache/ldconfig> (the dynamic linking cache).  This is not
needed.  Dynamic linking during program execution will be marginally
slower.

=item B<--pack-executables>

This option has been removed in febootstrap 2.5.  In previous versions
it was used to pack executables using the external C<upx> program.
However it was not enabled by default and never worked very
effectively.

=back

=head1 TODO

=over 4

=item *

Deduplicate files with the same content (by hardlinking them).
See the program L<hardlink(1)>.

=item *

Remove unused binaries.

=item *

Remove unused libraries.

=back

=head1 SEE ALSO

L<febootstrap(8)>.

=head1 AUTHORS

Richard W.M. Jones <rjones @ redhat . com>

=head1 COPYRIGHT

(C) Copyright 2009 Red Hat Inc.,
L<http://people.redhat.com/~rjones/febootstrap>.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.