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 yes
20 set /files/etc/sysconfig/readonly-root/STATE_LABEL CONFIG
21 set /files/etc/sysconfig/readonly-root/STATE_MOUNT /config
25 # prepare mount points for local storage
30 echo "/dev/HostVG/Config /config ext3 defaults,noauto 0 0" >> /etc/fstab
34 # Create initial manifests
35 manifests=/tmp/manifests
37 rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
38 > $manifests/rpm-manifest.txt
39 rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest.txt
40 du -akx --exclude=/var/cache/yum / > $manifests/file-manifest.txt
41 du -x --exclude=/var/cache/yum / > $manifests/dir-manifest.txt
44 %include common-blacklist.ks
47 if [ -f "ovirt-authorized_keys" ]; then
48 echo "Adding authorized_keys to Image"
49 mkdir -p $INSTALL_ROOT/root/.ssh
50 cp -v ovirt-authorized_keys $INSTALL_ROOT/root/.ssh/authorized_keys
51 chown -R root:root $INSTALL_ROOT/root/.ssh
52 chmod 755 $INSTALL_ROOT/root/.ssh
53 chmod 644 $INSTALL_ROOT/root/.ssh/authorized_keys
56 echo "Fixing boot menu"
57 # remove quiet from Node bootparams, added by livecd-creator
58 sed -i -e 's/ quiet//' $LIVE_ROOT/isolinux/isolinux.cfg
60 # add stand-alone boot entry
63 # append additional default boot parameters
64 add_boot_params="check rootfstype=iso9660"
66 /^label linux0/ { linux0=1 }
67 linux0==1 && $1=="append" {
68 $0=$0 " " add_boot_params
71 linux0==1 && $1=="label" && $2!="linux0" {
73 print "label stand-alone"
74 print " menu label Boot in stand-alone mode"
75 print " kernel vmlinuz0"
76 gsub("console=tty0", "", append0)
77 print append0" ovirt_standalone console=tty0"
80 ' $LIVE_ROOT/isolinux/isolinux.cfg > $LIVE_ROOT/isolinux/isolinux.cfg.standalone
81 mv $LIVE_ROOT/isolinux/isolinux.cfg.standalone $LIVE_ROOT/isolinux/isolinux.cfg
86 # Create post-image processing manifests
87 manifests=/tmp/manifests
89 rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
90 > $manifests/rpm-manifest-post.txt
91 rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest-post.txt
92 du -akx --exclude=/var/cache/yum / > $manifests/file-manifest-post.txt
93 du -x --exclude=/var/cache/yum / > $manifests/dir-manifest-post.txt
95 ver=$(rpm -q --qf '%{version}' ovirt-node)
96 rel=$(rpm -q --qf '%{release}' ovirt-node)
97 arch=$(rpm -q --qf '%{arch}' ovirt-node)
98 echo "oVirt Node release $ver-$rel-$arch" > $manifests/ovirt-release
99 tar -cvf ovirt-node-image-manifests-$ver-$rel.$arch.tar -C /tmp manifests
100 ln -nf ovirt-node-image-manifests-$ver-$rel.$arch.tar ovirt-node-image-manifests.tar
105 # Move manifest tar to build directory
106 mv $INSTALL_ROOT/ovirt-node-image-manifests*.tar .