From a156df66af864233f9328f7121f09b0e4b786490 Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Nov 19 2011 01:23:23 +0000 Subject: knock up a script to clean up a c5 vm post test run --- diff --git a/utils/README b/utils/README new file mode 100644 index 0000000..4cbee78 --- /dev/null +++ b/utils/README @@ -0,0 +1,3 @@ +the utils dir contains helper scripts and metadata not actually used by the tests themselves. + +this includes scripts needed by the CI infrastructure etc diff --git a/utils/c5_cleanup_vm.sh b/utils/c5_cleanup_vm.sh new file mode 100644 index 0000000..f26486e --- /dev/null +++ b/utils/c5_cleanup_vm.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# you will almost never want to run this script. + +echo -n 'erase ' > /tmp/yum-cleanup +for f in `rpm -qa`; do + pn=$(rpm --qf "%{name}\n" -q $f) + if [ `grep $pn c5_req_list | wc -l ` -lt 1 ] ; then + echo -n $f ' ' >> /tmp/yum-cleanup + fi +done +echo >> /tmp/yum-cleanup +echo 'install ' >> /tmp/cleanp +cat req_list | tr '\n' ' ' >> /tmp/yum-cleanup + +yum -y shell /tmp/yum-cleanup +yum -y reinstall \* +if [ `uname -m` = 'x86_64' ]; then + yum -y erase *.i?86 +fi + +cd /etc +for x in `find . -maxdepth=2 -type f -name \*.rpmnew`; do + a=$( echo $x | sed -e 's/.rpmnew//' ) + rm -f $a + mv $x $a +done diff --git a/utils/c5_req_list b/utils/c5_req_list new file mode 100644 index 0000000..5ac5810 --- /dev/null +++ b/utils/c5_req_list @@ -0,0 +1,192 @@ +atk +audit-libs +audit-libs-python +authconfig +basesystem +bash +binutils +bitstream-vera-fonts +bzip2-libs +cairo +centos-release +centos-release-notes +checkpolicy +chkconfig +coreutils +cpio +cracklib +cracklib-dicts +crontabs +cryptsetup-luks +cups-libs +cyrus-sasl-lib +db4 +dbus +dbus-glib +dbus-libs +device-mapper +device-mapper-event +device-mapper-multipath +dhclient +dhcpv6-client +diffutils +dmidecode +dmraid +dmraid-events +e2fsprogs +e2fsprogs-libs +ecryptfs-utils +ed +elfutils-libelf +ethtool +expat +file +filesystem +findutils +fipscheck +fipscheck-lib +fontconfig +freetype +gawk +gdbm +glib2 +glibc +glibc-common +gnutls +grep +grub +gtk2 +gzip +hal +hdparm +hicolor-icon-theme +hmaccalc +hwdata +info +initscripts +iproute +iptables +iptables-ipv6 +iputils +iscsi-initiator-utils +kbd +kernel +keyutils +keyutils-libs +kpartx +krb5-libs +kudzu +less +libacl +libattr +libcap +libgcc +libgcrypt +libgpg-error +libhugetlbfs +libjpeg +libpng +libselinux +libselinux-python +libselinux-utils +libsemanage +libsepol +libstdc++ +libsysfs +libtermcap +libtiff +libusb +libuser +libutempter +libvolume_id +libX11 +libXau +libXcursor +libXdmcp +libXext +libXfixes +libXft +libXi +libXinerama +libxml2 +libXrandr +libXrender +logrotate +lvm2 +m2crypto +MAKEDEV +mcstrans +mingetty +mkinitrd +mktemp +module-init-tools +nash +ncurses +net-tools +newt +nspr +nss +openldap +openssh +openssh-clients +openssh-server +openssl +pam +pango +passwd +pciutils +pcre +pm-utils +policycoreutils +popt +prelink +procps +psmisc +python +python-elementtree +python-iniparse +python-libs +python-sqlite +python-urlgrabber +readline +redhat-logos +rhpl +rootfiles +rpm +rpm-libs +rpm-python +sed +selinux-policy +selinux-policy-targeted +setools +setserial +setup +sgpio +shadow-utils +slang +sqlite +sysfsutils +sysklogd +system-config-securitylevel-tui +SysVinit +tar +tcl +tcp_wrappers +termcap +trousers +tzdata +udev +udftools +usermode +util-linux +vim-minimal +wireless-tools +xorg-x11-filesystem +yum +yum-fastestmirror +yum-metadata-parser +zlib +kernel-xen +redhat-menus +desktop-file-utils +gpg-pubkey