[CI] Remove utils.source in the Vagrant provisioning scripts

=> we no longer need the shared volume, which is broken on Alpine Linux

(cherry picked from commit 07cb39bb06ef9d5cfb4100a6c8da66f509d067f5)
This commit is contained in:
Dan Čermák
2019-01-06 23:47:08 +01:00
parent 892d39e3bf
commit e9975c1457
5 changed files with 17 additions and 48 deletions
+15 -20
View File
@@ -2,27 +2,22 @@
set -e
# this script expects one parameter, which is the path to utils.source
# if the parameter is omitted, it defaults to the relative path in the
# repository, but it can be provided manually (e.g. for vagrant VMs)
# Debian & derivatives don't provide binary packages of googletest
# => have to build them ourselves
#
# This script builds a shared library of googletest (not googlemock!) inside
# gtest_build and copies it to /usr/lib/
function debian_build_gtest() {
pushd .
[ -d gtest_build ] || mkdir gtest_build
cd gtest_build
cmake -DBUILD_SHARED_LIBS=1 /usr/src/googletest/googletest
make
cp libgtest* /usr/lib/
popd
}
if [ $# -eq 0 ]; then
source $(dirname "${BASH_SOURCE[0]}")/../contrib/vms/utils.source
elif [ $# -gt 1 ]; then
cat << EOF
usage: install_dependencies.sh [path/to/utils.source]
Installs the dependencies required to build & test exiv2 on some Linux
distributions.
The optional parameter is the path to the utils.source file, which can be set to
an alternative location (currently used for vagrant builds)
EOF
exit 1
else
source "$1"
fi
distro_id=$(get_distro_id)
distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')
case "$distro_id" in
'fedora')
-1
View File
@@ -36,7 +36,6 @@ Vagrant.configure("2") do |config|
# use the CI script from gitlab to setup all dependencies
config.vm.provision "install_dependencies", type: "shell" do |shell|
shell.path = "../../ci/install_dependencies.sh"
shell.args = "/vagrant/utils.source"
end
# install additional dependencies for development
+1 -3
View File
@@ -2,9 +2,7 @@
set -e
source /vagrant/utils.source
distro_id=$(get_distro_id)
distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')
case "$distro_id" in
'fedora')
+1 -3
View File
@@ -2,8 +2,6 @@
set -e
source /vagrant/utils.source
function clone_exiv2() {
git clone https://github.com/Exiv2/exiv2.git
@@ -12,7 +10,7 @@ function clone_exiv2() {
cd ..
}
distro_id=$(get_distro_id)
distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')
case "$distro_id" in
'debian' | 'ubuntu' | 'fedora' | 'opensuse' | 'opensuse-tumbleweed')
-21
View File
@@ -1,21 +0,0 @@
#!/bin/sh
function get_distro_id() {
local distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')
echo "$distro_id"
}
# Debian & derivatives don't provide binary packages of googletest
# => have to build them ourselves
#
# This script builds a shared library of googletest (not googlemock!) inside
# gtest_build and copies it to /usr/lib/
function debian_build_gtest() {
pushd .
[ -d gtest_build ] || mkdir gtest_build
cd gtest_build
cmake -DBUILD_SHARED_LIBS=1 /usr/src/googletest/googletest
make
cp libgtest* /usr/lib/
popd
}