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 # enable newrole for initscripts
19 ins 0 before /files/etc/pam.d/newrole/1
20 set /files/etc/pam.d/newrole/0/type auth
21 set /files/etc/pam.d/newrole/0/control sufficient
22 set /files/etc/pam.d/newrole/0/module pam_rootok.so
29 # Create initial manifests
30 manifests=/tmp/manifests
32 rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
33 > $manifests/rpm-manifest.txt
34 rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest.txt
35 du -akx --exclude=/var/cache/yum / > $manifests/file-manifest.txt
36 du -x --exclude=/var/cache/yum / > $manifests/dir-manifest.txt
39 %include common-blacklist.ks
42 if [ -f "ovirt-authorized_keys" ]; then
43 echo "Adding authorized_keys to Image"
44 mkdir -p $INSTALL_ROOT/root/.ssh
45 cp -v ovirt-authorized_keys $INSTALL_ROOT/root/.ssh/authorized_keys
46 chown -R root:root $INSTALL_ROOT/root/.ssh
47 chmod 755 $INSTALL_ROOT/root/.ssh
48 chmod 644 $INSTALL_ROOT/root/.ssh/authorized_keys
51 echo "Fixing boot menu"
52 # remove quiet from Node bootparams, added by livecd-creator
53 sed -i -e 's/ quiet//' $LIVE_ROOT/isolinux/isolinux.cfg
55 # add standalone boot entry
57 /label linux0/ { linux0=1 }
58 linux0=1 && /append / { append0=$0 }
60 print "label standalone0"
61 print " menu label Boot in standalone mode"
62 print " kernel vmlinuz0"
63 print append0" ovirt_standalone"
66 ' $LIVE_ROOT/isolinux/isolinux.cfg > $LIVE_ROOT/isolinux/isolinux.cfg.standalone
67 mv $LIVE_ROOT/isolinux/isolinux.cfg.standalone $LIVE_ROOT/isolinux/isolinux.cfg
72 # Create post-image processing manifests
73 manifests=/tmp/manifests
75 rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
76 > $manifests/rpm-manifest-post.txt
77 rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest-post.txt
78 du -akx --exclude=/var/cache/yum / > $manifests/file-manifest-post.txt
79 du -x --exclude=/var/cache/yum / > $manifests/dir-manifest-post.txt
81 ver=$(rpm -q --qf '%{version}' ovirt-node)
82 rel=$(rpm -q --qf '%{release}' ovirt-node)
83 arch=$(rpm -q --qf '%{arch}' ovirt-node)
84 echo "oVirt Node release $ver-$rel-$arch" > $manifests/ovirt-release
85 tar -cvf ovirt-node-image-manifests-$ver-$rel.$arch.tar -C /tmp manifests
90 # Move manifest tar to build directory
91 mv $INSTALL_ROOT/ovirt-node-image-manifests-*.tar .