Commit Graph

205 Commits

Author SHA1 Message Date
Changcheng Liu
497b4d6f72 cmake: remove yasm since it's been replaced by nasm
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
2020-10-29 12:36:20 +08:00
Changcheng Liu
a944232ad4 install-deps.sh: install nasm for isa-l library
nasm support build isa-l:AVX512 algorithm implementation while yasm
doens't support it. Install nasm assembler to build isa-l
refer to: https://github.com/yasm/yasm/issues/101

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
2020-10-29 12:35:55 +08:00
Kefu Chai
6e673cad6d install-deps.sh: install libzbd-devel on RHEL/CentOS8 on demand
just like WITH_SEASTAR, WITH_ZBD is passed to install-deps.sh as an env
var, and it's disabled by default, as libzbd-devel is not yet packaged
in any distro supported by this script. we packaged and uploaded it
to http://apt-mirror.front.sepia.ceph.com/lab-extras/8/ for build test
the libzbd bluestore backend. so "with_zbd" is always false on non-el8
distros. and should only be enabled for upstream "make check" test.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-17 14:45:11 +08:00
Kefu Chai
c0802c98c4 alpine: remove stale Alpine build recipe
alpine build recipe is stale and does not work with the latest Ceph,
also the APKBUILD for Ceph can be found at alphine's aports repo, see
https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/ceph.

so instead keeping a stale version, let's drop it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-18 14:23:50 +08:00
Kefu Chai
10086983d9 install-deps.sh: add tchaikov's copr repo for crimson build on el8
we need it before the updated version of gcc-toolset9 addressing
https://bugzilla.redhat.com/show_bug.cgi?id=1853900 is available in
RHEL8/CentOS8.

see https://copr.fedorainfracloud.org/coprs/tchaikov/gcc-toolset-9

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-15 17:43:40 +08:00
Kefu Chai
1169dee259
Merge pull request #35787 from tchaikov/wip-46208
install-deps,cmake: use boost v1.73

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
2020-06-28 21:19:44 +08:00
Kefu Chai
a0c91f940b install-deps.sh: use ceph-libboost1.73
Fixes: https://tracker.ceph.com/issues/46208
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-26 17:20:05 +08:00
Kefu Chai
2d8da82b23 install-deps.sh: always use python3-sphinx to build the docs
python-sphinx creates a symlink pointing ../share/sphinx/scripts/python2/sphinx-build
to /usr/bin/sphinx-build even if python3-sphinx is already installed.
in that case, if python-sphinx is installed after python3-sphinx,
sphinx-build is in python2. and it breaks the build of master, as we are
using python3 syntax in conf.py since
e9e17b9cef.

and we are still using python2 as well as "python-sphinx" when building nautilus,
so if a build slave happen to compile nautilus before it is scheduled to
build master or a wip- branch, the doc build fails.

in this change, python-sphinx is uninstalled, if /usr/bin/sphinx-build
is found to be written in python2.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-25 19:59:41 +08:00
Kefu Chai
c70415b897 install-deps.sh: always use dnf on RHEL/CentOS
as we don't build master on el7 anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-25 19:59:41 +08:00
Kefu Chai
95f6f61534 install-deps.sh: drop bits enabling DTS repo
since GCC offered by RHEL8/CentOS8 is able to compile ceph, there is no
need to add repos providing devtoolset anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-25 19:59:41 +08:00
Deepika Upadhyay
66e81b8b08 install-deps.sh: drop devtoolset(DTS) check for centos
we needed DTS for ensuring centos 7 had decent GCC version, since we won't be
supporting el7 anymore this check becomes outdated.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-06-23 16:35:37 +05:30
Kefu Chai
e42f308782
Merge pull request #35569 from sungjunyoung/master
install_deps.sh: Add debian based elementary os

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-06-20 21:27:06 +08:00
Kefu Chai
55b8707097 install-deps.sh: do not enable unavailable repos
should be specific when enabling codeready-builder repos, there is
chance that some repos are just not available, while the required one
is. for instance, "codeready-builder-for-rhel-8-x86_64-eus-debug-rpms"
might not be available. and in that case, `install-deps.sh` just fails.

so in this change, only the required one is enabled. see also
https://fedoraproject.org/wiki/EPEL

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-17 16:03:04 +08:00
Junyoung, Sung
3e7495d863 install_deps.sh: Add debian based elementary os
Signed-off-by: Junyoung, Sung <junyoung.sung@navercorp.com>
2020-06-15 21:10:45 +09:00
Kefu Chai
030bce643f install-deps.sh: drop ktdreyer/ceph-el8 copr repo
as all python3-cherrypy and its deps are included by EPEL8 now

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-15 01:09:07 +08:00
Kefu Chai
e69ec07c71 install-deps.sh: remove the workaround to bootstrap a new venv
el7 now ships python36-virtualenv-15.1.0-4 which contains the fix of
https://github.com/pypa/virtualenv/issues/463

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-12 14:52:13 +08:00
Kefu Chai
1f8433f33c install-deps.sh: install additional repo for RHEL8
these home-brew repos are shared by CentOS8 and RHEL8

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2020-03-12 14:52:13 +08:00
Kefu Chai
25b47150f7 install-deps.sh: install rhel-7-server-optional-rpms on el7 only
RHEL8 uses appstream and supplementary repos for those optional-rpms.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-12 14:36:01 +08:00
Brad Hubbard
8ee9f47b9b install-deps.sh: Actually set gpgcheck to false
The current command appears to do nothing.

Fixes: https://tracker.ceph.com/issues/44344

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-02-28 12:20:18 +10:00
Kefu Chai
915fe2a7cb install-deps.sh: pass "-y" to "dnf copr enable"
otherwise the copr repo won't be enabled. and dnf will bail out with
following message:

Do you really want to enable copr.fedorainfracloud.org/ktdreyer/ceph-el8? [y/N]: Error: Safe and good
answer. Exiting.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-26 15:07:53 +08:00
Kefu Chai
f91adafa4b install-deps.sh: use "apt" for checking install status
as "dpkg -s <package-name>" always returns 0 even if the <package> is
removed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-24 01:22:07 +08:00
Kefu Chai
d560af7d5c install-deps.sh: install boost-1.72 for bionic
and uninstall boost-1.67 before installing boost-1.72

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-23 15:21:47 +08:00
Kefu Chai
a6f4234b04 install-deps.sh: drop trusty and xenial support
since we only build on bionic on ubuntu distros, there is no need
to build on trusty and xenial anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-23 00:02:17 +08:00
Kefu Chai
5c990ddd8e install-deps.sh: do not echo version of git
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 11:52:56 +08:00
Kefu Chai
e06b7bdd4f install-deps.sh: silence popd and pushd
otherwise they will echo the pushed/popped directory

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 11:52:56 +08:00
Kefu Chai
5d4c2c71bd install-deps.sh: revert a5a44cf4
we don't prepare wheels for python2 anymore, and we don't test for
python2. so no need to test for python2

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 11:52:56 +08:00
Kefu Chai
7fec5f7a67 install-deps.sh: stop preparing wheels for python2
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 11:52:56 +08:00
Kefu Chai
7f6e30d628 install-deps.sh: add ken's copr repo for el8 build
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-18 21:57:38 +08:00
Kefu Chai
6b009b49f2
Merge pull request #31144 from badone/wip-use-dnf-on-rhel-or-centos-8
install-deps.sh: Use dnf for rhel/centos 8

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-12-17 12:03:54 +08:00
Brad Hubbard
6065050022 install-deps.sh: Use dnf for rhel/centos 8
Also install the correct dnf-utils package rather than yum-utils.

Fixes: https://tracker.ceph.com/issues/42504

Co-Authored-By: Kefu Chai <tchaikov@gmail.com>
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2019-12-13 14:22:02 +10:00
Nathan Cutler
a5a44cf42e install-deps.sh: install python2-{virtualenv,devel} on SUSE if needed
Recent versions of openSUSE are fully Python 3 systems, but Python 2 can still
be installed on them. When Python 2 *and* Python 3 are installed, tox will try
to run unit tests ("make check" tests) on both. But the spec-file-based
mechanism used by install-deps.sh for determining "make check" dependencies only
installs python3-virtualenv and python3-devel.

Fixes: https://tracker.ceph.com/issues/23981
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-12-12 13:02:54 +01:00
Nathan Cutler
6378fa45ac rpm: add rpm-build to SUSE-specific make check deps
The binary /usr/bin/rpmspec was recently moved to rpm-build, breaking
install-deps.sh on openSUSE Tumbleweed. The package is not strictly
needed for SLE-15-SP* and openSUSE Leap 15.*, but it doesn't hurt to
have it, and will future-proof these distros from this regression.

Putting the dependency in the spec file does not address the issue,
because /usr/bin/rpmspec must be available before install-deps.sh runs it to
determine the dependencies, but it's nice to have it explicitly listed there,
since it *is* a dependency of "make check" on SUSE distros.

SUSE versions < 15 are of no interest in master/octopus+.

Fixes: https://tracker.ceph.com/issues/42612
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-12-10 18:31:16 +01:00
Kefu Chai
06a004b932 install-deps.sh: remove the cleanup for kitware repo
it was used for removing the kitware repo, and in
7265b55d09, we switched to a rebuilt
version hosted in chacra, and it was more than two months ago,
presumably, none builder has kitware repo anymore. so, let's remove
the cleanup code.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-14 00:12:16 +08:00
Kefu Chai
edc93babf7 install-deps.sh: install binutils 2.28 for xenial
ld 2.26 segment faults when linking librados.so in
https://github.com/ceph/ceph/pull/16715 .

while ld 2.28 always survives.
binutils 2.28 is rebuilt and uploaded to chacra
binutils/master/7fa393306ed8b93019d225548474c0540b8928f7/ubuntu/xenial,

so let's use it instead.

the source deb package comes from
http://ppa.launchpad.net/jonathonf/binutils/ubuntu

i tried to use the binutils 2.30 source package from bionic,
but it has build dependency of dpkg-dev (>= 1.19.0.5) which cannot be
fulfilled on xenial. so without more changes, we cannot get
binutils 2.30 built on xenial using this source package.

Fixes: https://tracker.ceph.com/issues/42596
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-14 00:12:06 +08:00
Kefu Chai
32aaa44904 install-deps.sh: use sepia/lab-extra/8
some build dependencies are still missing in PowerTools and EPEL8, so we
built and pushed them to sepia so it can be used before they are ready
in these repos.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-30 12:55:52 +08:00
Kefu Chai
7a93cb2ba0 install-deps.sh: install python3-devel for python related rpm macros
python3-devel depends on python-rpm-macros, which in turn depends on
python-srpm-macros. the latter offers `python3_pkgversion` macro, which
is necessary for prepare the build dependencies of rpm packages.

this change avoids the unnecessary `$yumdnf` calls, and to simplify the
code.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-10 11:00:52 +08:00
Kefu Chai
73ee20ea26
Merge pull request #30656 from tchaikov/wip-install-deps-for-el8
install-deps.sh: enable PowerTool repo for EL8

Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-10-07 16:06:30 +08:00
Kefu Chai
d301137bb1 install-deps.sh: enable CRB/PowerTool repo for RHEL/CentOS 8
see also https://fedoraproject.org/wiki/EPEL

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-01 18:28:16 +08:00
Kefu Chai
80ec43792b install-deps.sh: only install python-srpm-macros for required macros
the reason why we need to install these macros is to solve the
egg-chicken problem -- to set `_python_buildid` and `python3_pkgversion`
so that we can prepare the build dependencies and install them. in which,
`_python_buildid` is defined using `python3_pkgversion`. this macro is
offered by python-srpm-macros.

the other macros, like `python3_sitelib` and `__python3` are offered by
`python3-rpm-macros`.

this change also avoid the issue if we install `*rpm-macros` on CentOS8:

Error:
 Problem: package R-rpm-macros-1.1.0-2.el8.noarch requires /usr/bin/Rscript, but none of the providers can be installed
  - package R-rpm-macros-1.1.0-2.el8.noarch requires R-core, but none of the providers can be installed
  - conflicting requests
  - nothing provides libRblas.so()(64bit) needed by R-core-3.6.1-1.el8.x86_64
  - nothing provides openblas-Rblas needed by R-core-3.6.1-1.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-28 22:20:35 +08:00
Kefu Chai
45a4173bcf install-deps: do not install if rpm already installed
there is chance that the system already have epel-release-latest-7.noarch.rpm
installed, in that case, install-deps.sh should not fail.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-27 11:07:30 +08:00
Nathan Cutler
49d740118f install-deps.sh: add EPEL repo for non-x86_64 archs as well
Fixes: https://tracker.ceph.com/issues/42023
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-09-25 10:58:33 +02:00
Kefu Chai
e7287257ef
Merge pull request #30405 from p-se/wip-pna-ubuntu-disco-deps
install-deps.sh: add support for Ubuntu Disco Dingo

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-09-19 10:01:07 +08:00
Patrick Seidensal
95283a60de install-deps.sh: add support for Ubuntu Disco Dingo
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
2019-09-17 08:35:34 +02:00
Kefu Chai
0b2be2b671 install-deps.sh: install python*-devel for python*rpm-macros
in 087ea813, we installed '*rpm-macros' for the macros, so we can have
access to the latest python packaging related macros for preparing the
build dependencies.

but we could run into https://bugs.centos.org/view.php?id=16379, if
we already have an old version of python-devel installed. as the newer
version of python-rpm-macros conflicts with it.

it was a chicken-and-egg problem, as we don't know the exact name of
*rpm-macros packages. that's why we chose to install all of them. but
we have to upgrade the existing python-devel package to resolve the
conflict. but the since there is no python3-devel in RHEL7/CentOS7,
what they have is python36-devel. so we have to hardwire the
`%{python3_pkgversion}` to "36" even before we have access to this
macro, and upgrade the python36-devel package beforehand. but this
renders installing the rpm-macro package less useful -- we intend to
use the macro offered by the package to figure out "36".

as a workaround, we pretend that we know the "main" version of python3
in current RHEL/CentOS. and always install python36-devel for
python-rpm-macros. as the former requires the latter.

once all python3*-devel on all builders are upgraded, we will be safe
to install '*rpm-macros' again without installing python36-devel first.
by then, we could revert this change, or continue installing
python36-devel until the distro bumps up the "main" python version to 3.7

Fixes: https://tracker.ceph.com/issues/41603
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-07 02:15:00 +08:00
Kefu Chai
dfa6c5fcba install-deps: revert 47d4351d
this change reverts 47d4351d3a

see also 33dfffc8

Fixes: https://tracker.ceph.com/issues/40646
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-04 09:17:13 +08:00
Kefu Chai
ff631a19b4 install-deps.sh: only prepare wheels for "make check"
* move `for_make_check` to the beginning of script, as FreeBSD will also
  use this variable
* extract `preload_wheels_for_tox()` function out to improve readability
* call `preload_wheels_for_tox()` only if `for_make_check` is true

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-27 17:53:28 +08:00
Kefu Chai
f3d3e37c7e
Merge pull request #29903 from tchaikov/wip-pip-download
install-deps.sh: download wheel using 'pip wheel'

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2019-08-27 00:44:28 +08:00
Kefu Chai
3562504afd install-deps.sh: download wheel using 'pip wheel'
otherwise we will fail to install the build dependencies of
`lazy-object-proxy` from the wheelhouse. as `lazy-object-proxy` does not
add `setuptools_scm` in its `setup.py`, instead it lists
`setuptools_scm` in `setup.cfg` and `pyproject.toml` as a `build-system`
requires. but unfortunately, `pip download` only downloads the
install/run-time dependencies at this moment. and `lazy-object-proxy`
does not offer binary package for at least python2.7.

ideally, `pip download` should collects its dependencies like

Collecting setuptools_scm>=3.3.1 (from lazy-object-proxy->astroid<3,>=2.2.0->pylint->-r requirements-lint.txt (line 1))

so we need to use `pip wheel` do download build-time dependencies

see also https://github.com/pypa/pip/issues/6222

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-26 23:06:39 +08:00
Kefu Chai
5d6d770e2f install-deps.sh,deb,rpm: move python-saml deps into debian/control and ceph.spec.in
these dependencies are only used for building python-saml which is in
turn used for the SAML support. this feature is tested using
`test_sso.py` while performing dashboard tests. we do not package or
ship python-saml along with other Ceph packages. so let's move these
dependencies to the "make check" sections in ceph.spec.in and
debian/control for simplifying install-deps.sh.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-24 02:11:51 +08:00
Ernesto Puerta
1e07237d92
mgr/dashboard: clean-up tox and unit tests
Refactor CMake add_tox_test to automatically add py27 and/or py3 to
provided toxenvs.

Refactor tox.ini:
- Remove requirements-{py27,py3}.txt, as python release dependant
packages can be handled with PEP 508 syntax.
- Remove develepment dependencies from requirements.
- Move pycodestyle settings to separate section.
- Add flake8 check and other checkers (rst, naming, etc). Some of them
are commented out for future clean-ups (Ceph trackers have been opened)
- Pycodestyle removed, as flake8 is a wrapper for pycodestyle.
- Add instafail plugin to report failures immediately
- Add timeout plugin to limit max run time (sometimes test_tasks hangs)
- Remove unused dependencies (lru_cache, pluggy)

Test and code linting fixes:
- Unused imports
- Fixes to HACKING.rst

Doc:
- Update HACKING.rst

Add conftest.py to mock imported modules (rados, rbd, cephfs), and mock
also rados Error and OSError Exceptions.

Fixes: https://tracker.ceph.com/issues/40487
Fixes: https://tracker.ceph.com/issues/41152
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2019-08-16 19:17:27 +02:00