Merge pull request #3882 from dachary/wip-install-deps-alternatives

install-deps.sh: strip | in the list of packages

Reviewed-by: Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Loic Dachary 2015-03-09 13:53:25 +01:00
commit 387887893f
6 changed files with 40 additions and 2 deletions

View File

@ -38,6 +38,7 @@ Ubuntu|Debian|Devuan)
packages=$(dpkg-checkbuilddeps --admindir=$DIR debian/control 2>&1 | \
perl -p -e 's/.*Unmet build dependencies: *//;' \
-e 's/build-essential:native/build-essential/;' \
-e 's/\|//g;' \
-e 's/\(.*?\)//g;' \
-e 's/ +/\n/g;' | sort)
case $(lsb_release -sc) in
@ -45,7 +46,8 @@ Ubuntu|Debian|Devuan)
packages=$(echo $packages | perl -pe 's/[-\w]*babeltrace[-\w]*//g')
;;
esac
$SUDO apt-get install -y $packages
packages=$(echo $packages) # change newlines into spaces
$SUDO bash -c "DEBIAN_FRONTEND=noninteractive apt-get install -y $packages"
;;
CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
case $(lsb_release -si) in

View File

@ -265,6 +265,9 @@ check_SCRIPTS += test/ceph-disk.sh
endif
EXTRA_DIST += \
$(srcdir)/test/debian-jessie/Dockerfile.in \
$(srcdir)/test/debian-jessie/install-deps.sh \
$(srcdir)/test/debian-jessie/debian \
$(srcdir)/test/ubuntu-12.04/Dockerfile.in \
$(srcdir)/test/ubuntu-12.04/install-deps.sh \
$(srcdir)/test/ubuntu-12.04/debian \

View File

@ -0,0 +1,31 @@
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library Public License for more details.
#
# Environment variables are substituted via envsubst(1)
#
# user_id=$(id -u)
# os_version= the desired REPOSITORY TAG
#
FROM debian:%%os_version%%
COPY install-deps.sh /root/
RUN mkdir /root/debian
COPY debian /root/debian/
RUN apt-get update
# build dependencies
RUN cd /root ; ./install-deps.sh
# development tools
RUN apt-get install -y ccache valgrind gdb python-virtualenv gdisk kpartx hdparm jq xmlstarlet
RUN useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

View File

@ -0,0 +1 @@
../../../debian

View File

@ -0,0 +1 @@
../../../install-deps.sh

View File

@ -27,5 +27,5 @@ RUN apt-get update
# build dependencies
RUN cd /root ; ./install-deps.sh
# development tools
RUN apt-get install -y ccache valgrind gdb python-virtualenv gdisk kpartx hdparm jq xmlstarlet
RUN apt-get install -y ccache valgrind gdb python-virtualenv gdisk kpartx hdparm xmlstarlet
RUN useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers