Add --with-febootstrap-yum-config.
[libguestfs.git] / appliance / make.sh.in
1 #!/bin/bash -
2 # @configure_input@
3 # Copyright (C) 2009-2010 Red Hat Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 unset CDPATH
20
21 set -e
22
23 # XXX Distro-dependent in future.
24 excludes="--exclude '^perl' --exclude '^python' --exclude '^fedora-logos' --exclude '^redhat-logos' --exclude '^dracut' --exclude '^upstart' --exclude '^plymouth' --exclude '^systemd' --exclude '^linux-firmware' --exclude '^kbd-misc'"
25
26 # Run febootstrap on the package list.
27 if [ "x@FEBOOTSTRAP_YUM_CONFIG@" != "xno" ]; then
28     extra="--yum-config @FEBOOTSTRAP_YUM_CONFIG@"
29 fi
30
31 echo @FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra
32 @FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra
33
34 # Remove some things that we don't want in the appliance.  This is
35 # copied from the old febootstrap-minimize.  However minimization is
36 # not so important now that we are caching the appliance.
37 < supermin.d/hostfiles \
38 grep -v '^/usr/lib/locale' |
39 grep -v '^/usr/share/locale' |
40 grep -v '^/usr/lib/gconv' |
41 grep -v '^/usr/lib64/gconv' |
42 grep -v '^/usr/bin/localedef' |
43 grep -v '^/usr/sbin/build-locale-archive' |
44 grep -v '^/usr/share/man/' |
45 grep -v '^/usr/share/doc/' |
46 grep -v '^/usr/share/info/' |
47 grep -v '^/usr/share/gnome/help/' |
48 grep -v '^/usr/share/cracklib/' |
49 grep -v '^/usr/share/i18n/' > supermin.d/hostfiles-t
50
51 # XXX resolv.conf?  The old script had:
52 # echo nameserver 169.254.2.3 > resolv.conf
53 if ! grep -q /etc/resolv.conf supermin.d/hostfiles-t; then
54     echo /etc/resolv.conf >> supermin.d/hostfiles-t
55 fi
56
57 # Include any Augeas lenses from the host.
58 if grep -q /usr/share/augeas/lenses supermin.d/hostfiles-t; then
59     echo "/usr/share/augeas/lenses/*.aug" >> supermin.d/hostfiles-t
60 fi
61
62 mv supermin.d/hostfiles-t supermin.d/hostfiles