Require fixed ocaml-libvirt 0.4.1.1-1.
[virt-p2v.git] / p2v.ks.in
1 # LiveCD kickstart file for virt-p2v
2 # @configure_input@
3 #
4 # Copyright (C) 2007-2008 Red Hat Inc.
5 # Written by Richard W.M. Jones <rjones@redhat.com>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21 lang @CD_LANG@
22 keyboard @CD_KEYBOARD@
23 timezone @CD_TIMEZONE@
24 auth --useshadow --enablemd5
25 selinux --enforcing
26 firewall --disabled
27
28 repo --name=released --baseurl=@CD_BASE_URL@
29 #repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-@CD_BASE@&arch=@CD_ARCH@
30 @LOCALREPO@
31
32 %packages
33 bash
34 kernel
35 syslinux
36 passwd
37 policycoreutils
38 chkconfig
39 authconfig
40 rootfiles
41
42 # dd, sleep, sync, etc.
43 coreutils
44
45 # For device mapping
46 device-mapper
47 util-linux-ng
48 module-init-tools
49 gzip
50 kpartx
51
52 # For remote communications
53 openssh-clients
54 nc
55
56 # For the shell script
57 grep
58 sed
59 gawk
60 findutils
61
62 # For IP configuration
63 iproute
64 net-tools
65
66 # For OCaml
67 ocaml
68 ocaml-runtime
69 ocaml-pcre
70 ocaml-extlib
71 ocaml-xml-light
72 # REQUIRED: ocaml-libvirt >= 0.4.1.1
73 ocaml-libvirt
74 # REQUIRED: ocaml-newt >= 0.9
75 ocaml-newt
76
77 # For network configuration
78 # dhclient >= 4.0.0 fixes the cwd-holds-filesystem-open problem.
79 # REQUIRED: dhclient >= 4.0.0
80 dhclient
81
82 # Some other generally useful packages
83 which
84 perl
85 rpm
86 lsof
87 strace
88 vim-minimal
89 vim-enhanced
90 bind-utils
91 file
92
93
94 %post --nochroot
95
96 # These files have to be copied from the build directory into the
97 # squashfs.  See also:
98 # http://www.mail-archive.com/fedora-livecd-list@redhat.com/msg01470.html
99
100 # Just check everything exists, because kickstart will not give
101 # an error if files or paths are missing.
102 if test "x$INSTALL_ROOT" = "x"; then ERROR=1; fi
103 if ! test -d "$INSTALL_ROOT/usr/bin"; then ERROR=1; fi
104 if ! test -d "@abs_top_srcdir@"; then ERROR=1; fi
105 if ! test -d "@abs_top_srcdir@/extras"; then ERROR=1; fi
106 if ! test -f "@abs_top_srcdir@/virt-p2v"; then ERROR=1; fi
107
108 if test "x$ERROR" = "x1"; then
109     echo "**************************************************"
110     echo "**************************************************"
111     echo "**************************************************"
112     echo "Missing files or directories found.  This ISO will be bad."
113     echo "**************************************************"
114     echo "**************************************************"
115     echo "**************************************************"
116     # Exit 1 won't stop anything, but it makes me feel better.
117     exit 1
118 fi
119
120 install -m 0755 -o root -g root \
121         @abs_top_srcdir@/virt-p2v \
122         @abs_top_srcdir@/virt-p2v-update-wrapper \
123         @abs_top_srcdir@/iso-attach \
124         $INSTALL_ROOT/usr/bin
125
126 install -m 0644 -o root -g root @abs_top_srcdir@/inittab \
127         $INSTALL_ROOT/etc
128
129 cp -a $INSTALL_ROOT/etc/lvm $INSTALL_ROOT/etc/lvm.new
130 install -m 0644 -o root -g root @abs_top_srcdir@/lvm.conf \
131         $INSTALL_ROOT/etc/lvm.new
132
133 # Copy everything under extras to the squashfs /extras.
134 cp -a @abs_top_srcdir@/extras $INSTALL_ROOT/extras
135
136 %end
137
138 %post
139
140 # Restore SELinux permissions on installed binaries.
141 /sbin/restorecon /usr/bin/virt-p2v
142 /sbin/restorecon /usr/bin/virt-p2v-update-wrapper
143 /sbin/restorecon /usr/bin/iso-attach
144
145 # Turn off firstboot for livecd boots.
146 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
147
148 # Don't start yum-updatesd for livecd boots.
149 /sbin/chkconfig --level 345 yum-updatesd off
150
151 # Don't start cron/at as they tend to spawn things which are
152 # disk intensive that are painful on a live image.
153 /sbin/chkconfig --level 345 crond off
154 /sbin/chkconfig --level 345 atd off
155 /sbin/chkconfig --level 345 anacron off
156 /sbin/chkconfig --level 345 readahead_early off
157 /sbin/chkconfig --level 345 readahead_later off
158
159 # Stopgap fix for RH #217966; should be fixed in HAL instead
160 touch /media/.hal-mtab
161
162 # Make some mountpoints.
163 mkdir /mnt/root
164
165 # Remove some unused files.
166 rm -rf /usr/share/man           ;# 20 MB
167 rm -rf /usr/share/doc           ;# 44 MB
168 rm -rf /usr/share/locale        ;# 60 MB
169
170 %end