Skip to content

Commit

Permalink
[dist] use obs packages for travis
Browse files Browse the repository at this point in the history
instead of compiling deps on every travis runperl(BSSolv) on every travis run, install it from obs
  • Loading branch information
coolo committed Dec 6, 2012
1 parent a51a3cb commit d997a12
Showing 1 changed file with 9 additions and 58 deletions.
67 changes: 9 additions & 58 deletions dist/ci/obs_testsuite_travis_before.sh
Expand Up @@ -15,17 +15,21 @@ set -xe
mysql -e 'create database ci_api_test;'
sed -e 's,password:.*,password:,' -i src/api/config/database.yml.example

sudo chmod a+w /etc/apt/sources.list.d
echo 'deb http://download.opensuse.org/repositories/openSUSE:/Tools:/Unstable/xUbuntu_12.04 /' >> /etc/apt/sources.list.d/opensuse.list
#sudo apt-get update
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/opensuse.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"

# dependencies of backend
sudo apt-get install --force-yes travis-deps libxml-parser-perl libfile-sync-perl python-rpm python-urlgrabber python-sqlitecachec python-libxml2

pushd src/api
if test "$REMOVEGEMLOCK" = true; then
rm Gemfile.lock
fi
fi
bundle install
popd

# dependencies of backend
#sudo apt-get update
sudo apt-get install liblzma-dev librpm-dev libxml-parser-perl libfile-sync-perl python-rpm python-urlgrabber python-sqlitecachec python-libxml2

case "$SUBTEST" in
webui*)
sudo apt-cache show firefox
Expand All @@ -44,59 +48,6 @@ case "$SUBTEST" in
;;
esac

pushd `mktemp -d`

wget https://api.opensuse.org/public/source/openSUSE:Factory/perl-BSSolv/libsolv-0.2.0.tar.bz2
tar xf libsolv-0.2.0.tar.bz2
mv libsolv-0.2.0 libsolv
pushd libsolv
cmake -DFEDORA=1 \
-DDISABLE_SHARED=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=1 \
-DENABLE_RPMDB=1 \
-DENABLE_DEBIAN=1 \
-DENABLE_ARCHREPO=1 \
-DENABLE_LZMA_COMPRESSION=1 \
-DMULTI_SEMANTICS=1
pushd src; make ; popd
pushd ext; make ; popd
popd
for f in Makefile.PL BSSolv.pm BSSolv.xs typemap; do
wget https://api.opensuse.org/public/source/openSUSE:Factory/perl-BSSolv/$f
done
perl Makefile.PL
make
sudo make install_vendor

wget https://api.opensuse.org/public/source/openSUSE:Factory/perl-Socket-MsgHdr/Socket-MsgHdr-0.04.tar.gz
tar xvf Socket-MsgHdr-0.04.tar.gz
pushd Socket-MsgHdr-0.04
perl Makefile.PL
make
sudo make install_vendor
popd

wget https://api.opensuse.org/public/source/openSUSE:Factory/yum/yum-3.4.3.tar.gz
tar xf yum-3.4.3.tar.gz
pushd yum-3.4.3
make
sudo make install
cd yum
sudo make install 'PKGDIR=$(PYLIBDIR)/$(PACKAGE)'
cd ../rpmUtils
sudo make install 'PKGDIR=$(PYLIBDIR)/$(PACKAGE)'
popd

wget https://api.opensuse.org/public/source/openSUSE:Factory/createrepo/createrepo-0.9.9.tar.gz
tar xf createrepo-0.9.9.tar.gz
cd createrepo-0.9.9
sed -i -e 's,import deltarpms,#no delta', createrepo/__init__.py
# ubuntu doesn't seem to have site-packages in their python
sudo make install 'PKGDIR=$(PYLIBDIR)/$(PKGNAME)'

popd

. `dirname $0`/obs_testsuite_common.sh

setup_git
Expand Down

0 comments on commit d997a12

Please sign in to comment.