Commit Graph

51 Commits

Author SHA1 Message Date
Nitin A Kamble
266f4d4f20 install-deps.sh: allow building on SLES systems
Avoids this error on SLES systems:

> ./install-deps.sh
sles is unknown, dependencies will have to be installed manually.

Signed-off-by: Nitin A Kamble <Nitin.Kamble@Teradata.com>
2016-10-31 11:48:22 -07:00
Kefu Chai
78f298df05 Merge pull request #11512 from wjwithagen/wip-wjw-freebsd-depends
FreeBSD: update require packages

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-19 11:32:59 +08:00
Willem Jan Withagen
3c8cd0ffd8 tools/ceph-monstore-update-crush.sh: FreeBSD getopt is not compatible, use the one from packages
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-10-18 11:40:28 +02:00
Willem Jan Withagen
30c0e4cbf5 FreeBSD: update require packages
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-10-16 22:10:03 +02:00
Brad Hubbard
07a5a98982 build scripts: Enable dnf for Fedora >= 22
The use of yum triggers a warning and reference to yum2dnf on Fedora >= 22.
Use either yum or dnf based on the Fedora version.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2016-09-16 18:59:59 +10:00
Gregory Meno
01eb1327ae install-deps: exit non-zero when we cannot match distro
Signed-off-by: Gregory Meno <gmeno@redhat.com>
2016-09-09 21:15:52 +00:00
Nathan Cutler
fd37e87f6d build/ops: fix /etc/os-release parsing in install-deps.sh
85a370e35f introduced the DISTRO variable whose
value was obtained by parsing /etc/os-release like this:

DISTRO=$(grep  "^ID=" /etc/os-release | sed "s/ID=//")

This unfortunately picks up the double-quotes, so on a CentOS system DISTRO
will be equal to '"centos"'.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2016-09-05 16:20:49 +02:00
Nathan Cutler
3c5e021c35 Merge pull request #10017 from jan--f/os-release-based-install-deps
build/ops: install-deps.sh based on /etc/os-release

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2016-08-30 11:41:29 +02:00
Jan Fajerski
85a370e35f install-deps.sh: initial distro detection based on /etc/os-release
This avoids initial distribution detection (before lsb_release is available)
based on the presence of a specific package manager. This caused an
issue with openSUSE Tumbleweed before since both zypper and apt-get are
available.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2016-08-29 16:38:51 +02:00
Oleh Prypin
2699b6d89b install-deps: Get the latest virtualenv in a temporary folder
to work around a bug in old virtualenv

Signed-off-by: Oleh Prypin <oleh@pryp.in>
2016-07-13 16:35:07 -07:00
Dan Mick
99bca09b8d install-deps.sh: use mk-build-deps instead of processing control
mk-build-deps is designed to handle installing build dependencies;
use that instead, so '|' indications are handled properly.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2016-06-21 16:36:56 -07:00
Willem Jan Withagen
8b6307cdd9 install-deps.sh: Add the required packages to build on FreeBSD
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-05-10 23:41:17 +02:00
Loic Dachary
dad2e195ce Merge pull request #8782 from SUSE/wip-15627
install-deps.sh: systemd-rpm-macros must be installed on SUSE

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-05-03 10:10:07 +02:00
Nathan Cutler
a7f5ad5f6f install-deps.sh: systemd-rpm-macros must be installed on SUSE
Otherwise the script breaks.

Fixes: http://tracker.ceph.com/issues/15627
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2016-04-27 11:13:06 +02:00
Erwan Velu
bbcda5a2c2 install-deps: Adding gcc for debian based systems
When running install-deps on a minimalistic system, we reach that situation :

dpkg-checkbuilddeps --admindir=/tmp/install-deps.5526 debian/control
    sh: 1: gcc: not found
    dpkg-checkbuilddeps: warning: Couldn't determine gcc system type, falling back to default (native compilation)
    dpkg-checkbuilddeps: error: cannot open /tmp/install-deps.5526/status: No such file or directory

This means that we shall install gcc before calling dpkg-checkbuilddeps.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-25 17:11:45 +02:00
Alfredo Deza
64f14d43a8 install-deps: remove distribute requirement
Because it was meant for Ubuntu 12.04 and it is installing directly
from PyPI on newer releases that aren't being built for 12.04

Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-04-20 16:23:55 -04:00
Loic Dachary
247ee6084b build/ops: enable CR in CentOS 7
To get libunwind from the CR repositories until CentOS 7.2.1511 is released.

http://tracker.ceph.com/issues/13997 Fixes: #13997

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-12-08 08:25:24 +01:00
Nathan Cutler
3217803700 Revert "install-deps.sh: use %bcond_with selinux on SLE/openSUSE"
This reverts commit 1df2cc2bf6.
2015-10-06 14:40:41 +02:00
Loic Dachary
392c56c10e Merge pull request #6137 from SUSE/wip-13324-infernalis
install-deps.sh: use %bcond_with selinux on SLE/openSUSE 

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-10-02 00:34:53 +02:00
Nathan Cutler
1df2cc2bf6 install-deps.sh: use %bcond_with selinux on SLE/openSUSE
http://tracker.ceph.com/issues/13324 Fixes: #13324

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-10-01 21:47:49 +02:00
Nathan Cutler
0f9dca458b install-deps.sh: openSUSE-release/sles-release/sled-release are always present
http://tracker.ceph.com/issues/13318 Fixes: #13318

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-10-01 16:04:26 +02:00
Loic Dachary
4da6793d8d install-deps: enable python3
The upstream regression has been fixed, we can re-enable python3
support.

http://tracker.ceph.com/issues/13136 Fixes: #13136

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-09-20 13:18:40 +02:00
Loic Dachary
7182499ca3 install-deps.sh: disable python3
Disable python3 support until
https://bugs.launchpad.net/ubuntu/+source/python-coverage/+bug/1496715
is fixed.

Nothing in the build process depends on python3 right now, there is no
harm disabling it.

http://tracker.ceph.com/issues/13136 Fixes: #13136

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-09-17 09:35:11 +02:00
Loic Dachary
739ef0f9a3 install-deps.sh: detect yum-builddep errors
yum-builddep does not exit on error when an error happens: grep the
output for the error: string instead.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-06 12:31:56 +02:00
Kefu Chai
17a74ed292 install-deps.sh: s/get_pip_and_wheel/populate_wheelhouse/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-06-04 16:01:17 +08:00
Kefu Chai
b23fd403bd install-deps.sh: create virtualenv only if necessary
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-06-04 16:01:17 +08:00
Kefu Chai
f81f651663 install-deps.sh: do not create "wheelhouse" unless it's ready
* only create "wheelhouse" directory for tox when it is populated
  with all packages in *requiresments.txt. before than, the wheels
  are put in "wheelhouse-wip"

Fixes: #11869
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-06-04 16:00:56 +08:00
Kefu Chai
0d845255c7 install-deps.sh: refactor pip install a little bit
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-06-04 13:52:04 +08:00
Sage Weil
db2d83cb3e install-deps.sh: clean up after ourselves
Signed-off-by: Sage Weil <sage@redhat.com>
2015-06-03 10:05:28 -04:00
Loic Dachary
8199e0064b install-deps.sh: do not store pip cache outside of the tree
Signed-off-by: Loic Dachary <ldachary@redhat.org>
2015-05-30 11:00:56 +02:00
Loic Dachary
bbf75f811c install-deps.sh: keep debian alternatives
Instead of removing the | when an alternative is found in the control
file such as

     cryptsetup-bin | cryptsetup

remove the surrounding spaces so that it is treated as a regular
expression that matches either one.

Replace the form

    sudo bash -c "FOO=bar ..."

with

    sudo env FOO=bar ...

to reduce the levels of shell escaping.

Reported-by: http://dyweni.com/
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-29 23:55:01 +02:00
Loic Dachary
cbc96a08d0 install-deps.sh: robust pip and wheel installation
The wheel and pip module must not only be installed in each wheelhouse
directory for tox to find. They must also be installed in the virtual
environment that populates the wheelhouse directory. Otherwise older pip
modules such as the one found by default on Ubuntu 12.04 will fail.

Python 2.7.3 on Ubuntu 12.04 also requires that distribute >= 0.7.3 is
installed although it is redundant with setuptools, otherwise it will
fail to run the wheel module.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-29 23:43:06 +02:00
Loic Dachary
78c73c512a install-deps.sh: only pip install after make clean
Do not re-install all python dependencies if there already exists a
wheelhouse directory. It makes it so running install-deps.sh twice will
only access the network the first time. The directories where the python
dependencies are installed are removed by make clean. Refreshing the
python dependencies cache can be done via make clean ; install-deps.sh

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-13 08:35:53 +02:00
Loic Dachary
dc863fb75e install-deps.sh: increase pip install timeout
It is not uncommon for pip install to timeout with:

   Cannot fetch index base URL https://pypi.python.org/simple

because the default timeout is 15 seconds. When running from a CI, it
translates into bursts of false negatives when the network is saturated.

Increase the timeout to 10 minutes which is hopefully large enough to
only happen when there is a serious network problem.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-08 17:06:25 +02:00
Loic Dachary
c255e809fa install-deps.sh: exit on error if dependencies cannot be installed
Now that pre-installing pip dependencies is done at the end of the
script, the last command to run is no longer the installation
command. Therefore the status of the script is no longer the status of
the install command and no longer reflect success or failure to install
the dependencies. Add explicit || exit 1 to commands that are to be
treated as fatal errors.

Also set -e so that another error has a better chance to be caught.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-08 09:46:02 +02:00
Loic Dachary
7b28a6fd87 tests: pip must not log in $HOME/.pip
Because it may not have permission to when running in a container and
scripts run from source are not expected to modify anything outside of
the source tree anyway.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-05-08 08:59:34 +02:00
Loic Dachary
8b7953affc install-deps.sh: pip wheel for python dependencies
For all tox.ini in the source tree which also have requirement.txt
files, create a wheelhouse with the dependencies. This allows tox to
setup test environment with no access to the network with something
like (in tox.ini):

        deps =
          --use-wheel
          --find-links={toxinidir}/wheelhouse
          -r{toxinidir}/requirements.txt
          -r{toxinidir}/test-requirements.txt

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-05 19:16:50 +02:00
Loic Dachary
3ab13e6451 install-deps.sh: Debian GNU/Linux wheezy needs backports
It is not enough for the backports to be available, they also need to be
explicitly allowed to take precedence whenever a package is installed
indirectly. This is causing problems with libp11-kit-dev pulled by
libcurl4-gnutls-dev.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-04-10 23:51:45 +02:00
Loic Dachary
b99c714955 install-deps: support OpenSUSE
OpenSUSE must be separated as it uses zypper and does not have a
functional yum-builddep

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-24 14:11:47 +01:00
Ken Dreyer
51f5feccac Merge pull request #3871 from dachary/wip-install-deps
tests: install-deps.sh install EPEL and RHEL Optional

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-03-10 10:42:16 -06:00
Loic Dachary
830a4a1b6b tests: install-deps.sh install EPEL and RHEL Optional
On CentOS and RHEL, some dependencies come from EPEL.

Always enable RHEL Optional repository for RHEL as packages such as
packages such as libatomic_ops-devel or libedit-devel are only found
there in RHEL 6.5.

http://tracker.ceph.com/issues/11061 Refs: #11061

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 11:39:52 +01:00
Loic Dachary
657844ac89 tests: DEBIAN_FRONTEND=noninteractive apt-get install
Go into non interactive mode when installing the compilation
dependencies, in case a package has a different default mode.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-07 02:40:13 +01:00
Loic Dachary
4add63c92e install-deps.sh: strip | in the list of packages
Alternatives were introduced lately and the | needs to be stripped from
the list of packages to install otherwise apt-get will try to install
all packages.

Signed-off-by: Yann Dupont <yann@objoo.org>
2015-03-07 02:40:13 +01:00
Loic Dachary
3cf7fcc6cb install-deps.sh: check for debian/control existence
If the debian/control file does not exist the error is cryptic.
Improve the situation by checking before running dpkg-checkbuilddeps.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-05 14:46:41 +01:00
Loic Dachary
19d5de92bf install-deps.sh: babeltrace is not on wheezy
The babeltrace package is not found on wheezy, not just squeeze.
Fix the regular expression that incorrectly replaced
libbabeltrace-ctf-dev with -ctf-dev leading to a strange error

E: Opening configuration file tf-dev - ifstream::ifstream (2: No such file or directory)

when running apt-get install.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-03 17:40:41 +01:00
Loic Dachary
4e791f3a83 install-deps.sh: get lsb_release if needed
Debian does not have lsb_release installed by default.

http://tracker.ceph.com/issues/10729 Fixes: #10729

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-03 17:18:09 +01:00
Loic Dachary
f4d65150d0 install-deps.sh: get lsb_release if needed
Fedora does not have lsb_release installed by default.

http://tracker.ceph.com/issues/10729 Fixes: #10729

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-03 16:35:13 +01:00
Noah Watkins
ca1d21e392 install-deps: fix LC_ALL setting
On my box LC_ALL=C# includes the '#' in the value without
a space between C and '#' and things go completely bonkers.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2015-01-25 11:45:48 -08:00
delco225
3347e0daec bug: error when installing ceph dependencies with install-deps.sh
The parsing is sensitive to i18n and will fail if, for instance, it is set to French.
Workaround the problem by always setting the language to C so the script
can safely assume all output will be in english.

http://tracker.ceph.comm/issues/10596 Fixes: #10596

Signed-off-by: Ahoussi Armand <ahoussi.say@telecom-bretagne.eu>
2015-01-24 01:35:27 +01:00
Loic Dachary
2de2c4b035 install-deps.sh: do not require sudo when root
If the user is root, do not use sudo. The sudo package is not installed
by default on centos by default and when building from script it may be
that root is running install-deps.sh on a freshly install distribution.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-21 17:52:18 +01:00