1 %include common-install.ks
5 %packages --excludedocs --nobase
6 %include common-pkgs.ks
11 # cleanup rpmdb to allow non-matching host and chroot RPM versions
12 rm -f /var/lib/rpm/__db*
13 %include common-post.ks
17 # prepare for STATE_MOUNT in rc.sysinit
19 set /files/etc/sysconfig/readonly-root/TEMPORARY_STATE NOT_OVIRT_FIRSTBOOT
20 set /files/etc/sysconfig/readonly-root/STATE_LABEL CONFIG
21 set /files/etc/sysconfig/readonly-root/STATE_MOUNT /config
24 # use persistent state unless firstboot is forced
25 # XXX auges shellvars lens does not accept this value
26 sed -i 's@NOT_OVIRT_FIRSTBOOT@$(if cat /proc/cmdline|grep -qv ovirt_firstboot; then printf "yes"; else printf "no"; fi)@' /etc/sysconfig/readonly-root
27 # prepare mount points for local storage
32 echo "/dev/HostVG/Config /config ext3 defaults,noauto 0 0" >> /etc/fstab
36 # Create initial manifests
37 manifests=/tmp/manifests
39 rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
40 > $manifests/rpm-manifest.txt
41 rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest.txt
42 du -akx --exclude=/var/cache/yum / > $manifests/file-manifest.txt
43 du -x --exclude=/var/cache/yum / > $manifests/dir-manifest.txt
46 %include common-blacklist.ks
49 if [ -f "ovirt-authorized_keys" ]; then
50 echo "Adding authorized_keys to Image"
51 mkdir -p $INSTALL_ROOT/root/.ssh
52 cp -v ovirt-authorized_keys $INSTALL_ROOT/root/.ssh/authorized_keys
53 chown -R root:root $INSTALL_ROOT/root/.ssh
54 chmod 755 $INSTALL_ROOT/root/.ssh
55 chmod 644 $INSTALL_ROOT/root/.ssh/authorized_keys
58 echo "Fixing boot menu"
59 # remove quiet from Node bootparams, added by livecd-creator
60 sed -i -e 's/ quiet//' $LIVE_ROOT/isolinux/isolinux.cfg
62 # add stand-alone boot entry
65 # append additional default boot parameters
66 add_boot_params="check rootfstype=iso9660"
68 /^label linux0/ { linux0=1 }
69 linux0==1 && $1=="append" {
70 $0=$0 " " add_boot_params
73 linux0==1 && $1=="label" && $2!="linux0" {
75 print "label stand-alone"
76 print " menu label Boot in stand-alone mode"
77 print " kernel vmlinuz0"
78 gsub("console=tty0", "", append0)
79 print append0" ovirt_standalone console=tty0"
82 ' $LIVE_ROOT/isolinux/isolinux.cfg > $LIVE_ROOT/isolinux/isolinux.cfg.standalone
83 mv $LIVE_ROOT/isolinux/isolinux.cfg.standalone $LIVE_ROOT/isolinux/isolinux.cfg
88 # Create post-image processing manifests
89 manifests=/tmp/manifests
91 rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
92 > $manifests/rpm-manifest-post.txt
93 rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest-post.txt
94 du -akx --exclude=/var/cache/yum / > $manifests/file-manifest-post.txt
95 du -x --exclude=/var/cache/yum / > $manifests/dir-manifest-post.txt
97 ver=$(rpm -q --qf '%{version}' ovirt-node)
98 rel=$(rpm -q --qf '%{release}' ovirt-node)
99 arch=$(rpm -q --qf '%{arch}' ovirt-node)
100 echo "oVirt Node release $ver-$rel-$arch" > $manifests/ovirt-release
101 tar -cvf ovirt-node-image-manifests-$ver-$rel.$arch.tar -C /tmp manifests
102 ln -nf ovirt-node-image-manifests-$ver-$rel.$arch.tar ovirt-node-image-manifests.tar
107 # Move manifest tar to build directory
108 mv $INSTALL_ROOT/ovirt-node-image-manifests*.tar .