DISCUSSION
I’m installing Spacewalk (1.5) along with postgreSQL (8.4) on a fresh installation of CentOS 6. This would be pretty straight forward except the CentOS team did not release updates for the selinux-policy and that leaves you with the error below. I’m guessing that if youa re reading this you encountered this error while running your yum command to install spacewalk. If so this should guide you through things:
Finished Dependency Resolution
Error: Package: spacewalk-common-1.5.1-1.el6.noarch (spacewalk)
Requires: selinux-policy-base >= 3.7.19-93
Installed: selinux-policy-targeted-3.7.19-54.el6_0.5.noarch (@updates)
selinux-policy-base = 3.7.19-54.el6_0.5
Available: selinux-policy-minimum-3.7.19-54.el6.noarch (base)
selinux-policy-base = 3.7.19-54.el6
Available: selinux-policy-minimum-3.7.19-54.el6_0.3.noarch (updates)
selinux-policy-base = 3.7.19-54.el6_0.3
Available: selinux-policy-minimum-3.7.19-54.el6_0.5.noarch (updates)
selinux-policy-base = 3.7.19-54.el6_0.5
Available: selinux-policy-mls-3.7.19-54.el6.noarch (base)
selinux-policy-base = 3.7.19-54.el6
Available: selinux-policy-mls-3.7.19-54.el6_0.3.noarch (updates)
selinux-policy-base = 3.7.19-54.el6_0.3
Available: selinux-policy-mls-3.7.19-54.el6_0.5.noarch (updates)
selinux-policy-base = 3.7.19-54.el6_0.5
Available: selinux-policy-targeted-3.7.19-54.el6.noarch (base)
selinux-policy-base = 3.7.19-54.el6
Available: selinux-policy-targeted-3.7.19-54.el6_0.3.noarch (updates)
selinux-policy-base = 3.7.19-54.el6_0.3
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
HOW DID I GET THE ERROR
Frankly, the instructions for install spacewalk on fedorahosted.org are awesome. I followed those for the basic install along with the notes for setting up postgresql. They are repeated here pulling out all of the notes for other OSes and leaving just CentOS 6. Finally, I found the source code while reading a post from a nice fellow here.
PROCEDURE
Configure you prerequisites, I’m using 120GB for disk space and 4GB of RAM for the buildout, then I’ll reduce the RAM to 2GB for operation. I have a virtual environment so this is very simple for me. I installed CentOS-6 as a minimal install setting up a DNS record for the system name. After that I just start up upgrading the system. The rest is just the facts.
yum upgrade -y
# Install some repos that make the install much easier
rpm -Uvh http://spacewalk.redhat.com/yum/1.5/RHEL/6/x86_64/spacewalk-repo-1.5-1.el6.noarch.rpm
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
rpm -ihv http://spacewalk.redhat.com/yum/1.5-client/RHEL/6/x86_64/spacewalk-client-repo-1.5-1.el6.noarch.rpm
# Get your GPG keys for redhat
yum install -y wget
wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release http://www.redhat.com/security/37017186.txt
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# Setup to use available java packages (paste into the command line)
cat > /etc/yum.repos.d/jpackage-generic.repo << EOF
[jpackage-generic]
name=JPackage generic
baseurl=http://mirrors.dotsrc.org/jpackage/5.0/generic/free/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
# Work on PostgreSQL 8.4 or better
yum install -y 'postgresql-server > 8.4'
chkconfig postgresql on
service postgresql initdb
service postgresql start
# Setup the PostgreSQL DB
su - postgres -c 'PGPASSWORD=spacepw; createdb spaceschema ; createlang plpgsql spaceschema ; yes $PGPASSWORD | createuser -P -sDR spaceuser'
#Setup the security in the file below adding the lines show _before_ the lines that mention 'all' users
vi /var/lib/pgsql/data/pg_hba.conf
# TYPE DATABASE USER CIDR-ADDRESS METHOD
local spaceschema spaceuser md5
host spaceschema spaceuser 127.0.0.1/8 md5
host spaceschema spaceuser ::1/128 md5
# Reload the server
service postgresql reload
# Test the connection (exit with \q)
PGPASSWORD=spacepw psql -a -U spaceuser spaceschema
PGPASSWORD=spacepw psql -h localhost -a -U spaceuser spaceschema
# Make sure you don't have any conflicting packages
yum remove cobbler-web
vi /etc/yum.conf and make sure you exclude=cobbler-web
# Build the RPM that is missing from CentOS
# This means we need some tools for the build environment and
# specifically, some tools for the RPM (policycoreutils-python)
yum install rpm-build redhat-rpm-config make gcc policycoreutils-python
wget ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/selinux-policy-3.7.19-93.el6.src.rpm
rpm -ivv selinux-policy-3.7.19-93.el6.src.rpm
cd ~/rpmbuild
rpmbuild --rebuild ../selinux-policy-3.7.19-93.el6.src.rpm
yum localinstall --nogpgcheck /root/rpmbuild/RPMS/noarch/*.rpm
# Install Spacewalk
yum install spacewalk-postgresql
I have some other notes about setting up Spacewalk on this site. I found that more complicated than working through the above steps and hope they may be useful to you.
NOTE BENE:
If you upgrade cobbler above version 2.0 and you are running Spacewalk 1.5 (and probably 1.6) then you can expect it to break. You should probably disable the epel-testing repo and exclude cobbler from the peel repo “exclude=cobbler*, jabberpy”
About Jay Farschman - Jay currently works as a Senior Systems Administrator for an asset management company in Colorado where he works with companies that produce hardware, telecommunications software and financial services. Jay previously owned a consulting company and provided training and consulting services for three Fortune 500 companies and numerous small businesses where he leveraged Linux to provided exceptional value.
Share on Facebook