TODO file added with some ideas.
[febootstrap.git] / febootstrap-minimize.pod
1 =head1 NAME
2
3 febootstrap-minimize - Minimize an febootstrap image
4
5 =head1 SYNOPSIS
6
7  febootstrap-minimize [--options] DIR
8
9 =head1 DESCRIPTION
10
11 I<febootstrap-minimize> minimizes an L<febootstrap(8)>-created
12 filesystem.  This means that unneeded files and cruft are removed from
13 the image.
14
15 If no options are given, the default is to minimize the image as much
16 as possible.  This means, for example, that locales are removed so the
17 image will only be usable in US-English, there will be no
18 documentation or manual pages, and the image will only work in a UTC
19 timezone.
20
21 Note that image minimization involves deleting files that have been
22 installed by RPM.  Thus after minimization, it is no longer guaranteed
23 that RPM will function correctly on the image.  You should only do
24 this as a final step for "throwaway" appliances that do not need to be
25 modified or upgraded in future.
26
27 =head1 OPTIONS
28
29 =over 4
30
31 =item B<--all>
32
33 Perform all minimization operations, to produce the smallest possible
34 image.  Note in particular that locales are discarded.
35
36 You can perform all minimization operations I<except> X, Y and Z by
37 doing:
38
39  febootstrap-minimize --all --keep-X --keep-Y --keep-Z ...
40
41 (C<--all> can be omitted since it is the default).
42
43 =item B<--none>
44
45 Start with no minimization operations.  You can specify I<only>
46 minimization operations X, Y and Z like this:
47
48  febootstrap-minimize --none --drop-X --drop-Y --drop-Z ...
49
50 =item B<--keep-locales>
51
52 =item B<--drop-locales>
53
54 Keep or drop locale support.
55
56 =item B<--keep-docs>
57
58 =item B<--drop-docs>
59
60 Keep or drop documentation, man pages and info files.
61
62 =item B<--keep-cracklib>
63
64 =item B<--drop-cracklib>
65
66 Keep or drop cracklib libraries.
67
68 =item B<--keep-i18n>
69
70 =item B<--drop-i18n>
71
72 Keep or drop C</usr/share/i18n>.
73
74 =item B<--keep-zoneinfo>
75
76 =item B<--drop-zoneinfo>
77
78 Keep or drop all timezones (except UTC which is never deleted).
79
80 =item B<--keep-rpmdb>
81
82 =item B<--drop-rpmdb>
83
84 Keep or drop the RPM package database.  Obviously RPM will be
85 completely non-functional if you drop this.
86
87 =item B<--keep-yum-cache>
88
89 =item B<--drop-yum-cache>
90
91 Keep or drop the yum cache.  Note that L<febootstrap(8)> has already
92 deleted this directory unless you ran it with the C<--no-clean>
93 option.
94
95 =item B<--keep-services>
96
97 =item B<--drop-services>
98
99 Keep or drop the C</etc/services> file.  If dropped, this file is
100 replaced with a very minimal one which just lists the most common
101 services.  For less common services you will have to refer to them by
102 port number instead of name.
103
104 =item B<--keep-sln>
105
106 =item B<--drop-sln>
107
108 Keep or drop C</sbin/sln> (statically linked C<ln>).  This is not
109 really required in minimal appliances.
110
111 =item B<--keep-ldconfig>
112
113 =item B<--drop-ldconfig>
114
115 Keep or drop C</sbin/ldconfig>, C</etc/ld.so.cache> and
116 C</var/cache/ldconfig> (the dynamic linking cache).  This is not
117 needed.  Dynamic linking during program execution will be marginally
118 slower.
119
120 =item B<--no-pack-executables>
121
122 =item B<--pack-executables>
123
124 Pack executables and shell scripts using L<upx(1)>.
125
126 This is not done by default because although it can reduce the image
127 size, it increases the amount of memory used since those executables
128 cannot be shared.
129
130 =back
131
132 =head1 TODO
133
134 =over 4
135
136 =item *
137
138 Deduplicate files with the same content (by hardlinking them).
139 See the program L<hardlink(1)>.
140
141 =item *
142
143 Remove unused binaries.
144
145 =item *
146
147 Remove unused libraries.
148
149 =back
150
151 =head1 SEE ALSO
152
153 L<febootstrap(8)>.
154
155 =head1 AUTHORS
156
157 Richard W.M. Jones <rjones @ redhat . com>
158
159 =head1 COPYRIGHT
160
161 (C) Copyright 2009 Red Hat Inc.,
162 L<http://et.redhat.com/~rjones/febootstrap>.
163
164 This program is free software; you can redistribute it and/or modify
165 it under the terms of the GNU General Public License as published by
166 the Free Software Foundation; either version 2 of the License, or
167 (at your option) any later version.
168
169 This program is distributed in the hope that it will be useful,
170 but WITHOUT ANY WARRANTY; without even the implied warranty of
171 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
172 GNU General Public License for more details.
173
174 You should have received a copy of the GNU General Public License
175 along with this program; if not, write to the Free Software
176 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.