diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-07-09 12:58:14 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-07-09 16:45:24 +1000 |
commit | 167a78da4e2d9239c70222e010c9ebff30ca4575 (patch) | |
tree | 939a1cdaa8fcd22ce68076df594076855c115b82 /scripts | |
parent | 373ee9e07646145c19451d55fb69e08ec3720769 (diff) |
Add script to prep a RHEL install
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/rhel6-setup | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/scripts/rhel6-setup b/scripts/rhel6-setup new file mode 100755 index 0000000..c60e717 --- /dev/null +++ b/scripts/rhel6-setup @@ -0,0 +1,56 @@ +#!/bin/bash +# +# Grab a bunch of rhel6 yum repos, install them, update the box to some basic +# set of packages that we'll need +# +echo "This scrip will install a whole bunch of packages so that you" +echo "can build the X server tree." +echo + +if [ `whoami` != "root" ]; then + echo "Run me as root." + exit 1 +fi + +echo "Installing internal RHEL6 yum repos" +baseurl=http://yum.engineering.redhat.com/pub/yum/repo_files/ +repos="rhel6-base rhel6-debuginfo rhel6-supplementary rhel6-updates rhel6-optional" + +pushd /etc/yum.repos.d/ +for repo in $repos; do + if ! test -e $repo.repo; then + curl $baseurl/$repo.repo > $repo.repo + fi +done +popd + +# install source repo. read this and weep: https://gist.github.com/870043 +# https://bugzilla.redhat.com/show_bug.cgi?id=652783 and +# https://bugzilla.redhat.com/show_bug.cgi?id=710469 +echo "Installing source repo" +cat > /etc/yum.repos.d/rhel-source-repo-working.repo << EOF +[rhel-src] +name=Red Hat Enterprise Linux \$releasever - \$basearch - Src +baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/\$releasever/en/os/SRPMS/ +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +EOF + +echo "Installing some base packages" +packages="vim python libX* xorg-x11-* gdb automake autoconf git rsync rpmdevtools make bzr screen svn expat-devel imake" +yum install -y $packages + +# install build deps for X packages. yum-builddep is broken, even with the +# fixed repo up there so do it manually +src_packages="xorg-x11-drv-evdev xorg-x11-drv-intel xorg-x11-drv-synaptics xorg-x11-drv-wacom xorg-x11-server mesa-libGL mesa-dri-drivers" +tmp_dir=/tmp/yum-builddep-sources +mkdir -p $tmp_dir +pushd $tmp_dir > /dev/null +yumdownloader --disablerepo="*" --enablerepo=rhel-src --source $src_packages +for file in `ls *.src.rpm`; do + yum-builddep -y $file +done +popd > /dev/null +rm -rf $tmp_dir + |