Commit Graph

19 Commits

Author SHA1 Message Date
Avi Kivity
4bc5f1ba98 tools: toolchain: update container image first thing
Otherwise, rpm dependency resolution starts by installing an older
version of gcc (to satisfy an older preinstalled libgcc dependency),
then updates it. After the change, we install the updated gcc in
the first place.
2022-04-10 18:48:07 +03:00
Avi Kivity
3089558f8d tools: toolchain: update to Fedora 34 with clang 12 and libstdc++ 11.2 2021-07-31 15:25:13 +03:00
Avi Kivity
6df3139455 install-dependencies.sh: add gdb
gdb is used for testing scylla-gdb.py (since 3c2e852dd), so it needs
to be listed as a dependency. Add it there. It was listed as a
courtesy dependency in the frozen toolchain (which is why it still
worked), so it's removed from there.

Closes #9034
2021-07-14 10:15:54 +03:00
Takuya ASADA
0424a41e30 tools/toolchain: stop ignoring error on install-dependencies.sh, run jmx/java script correctly
We should run install-dependencies.sh with -e option to prevent ignoring
error in the script.
Also, need to add tools/jmx/install-dependencies.sh and
tools/java/install-dependencies.sh, to fix 'No such file or directory'
error on them.

Fixes #8293

Closes #8294

[avi: did not regenerate toolchain image, since no new packages are
      installed]
2021-03-18 11:24:18 +01:00
Avi Kivity
17226f2f6c tools: toolchain: update to Fedora 33 with clang 11
Update the toolchain to Fedora 33 with clang 11 (note the
build still uses gcc).

The image now creates a /root/.m2/repository directory; without
this the tools/jmx build fails on aarch64.

Add java-1.8.0-openjdk-devel since that is where javac lives now.
Add a JAVA8_HOME environment variable; wihtout this ant is not
able to find javac.

The toolchain is enabled for x86_64 and aarch64.
2020-10-28 20:21:44 +02:00
Avi Kivity
a61b3f2d78 tools: toolchain: rebase on Fedora 32
- base image changed from Fedora 31 to Fedora 32
 - disambiguate base image to use docker.io registry
 - pystache and python-casasndra-driver are no longer availble,
   so use pip3 to install them. Add pip3 to packages.
 - since pip3 installs commands to /usr/local/bin, update checks
   in build_deb to check for those too

Fedora 32 packages gcc 10, which has support for coroutines.
Message-Id: <20200521063138.1426400-1-avi@scylladb.com>
2020-05-21 18:27:50 +03:00
Avi Kivity
e5e0642f2a tools: toolchain: add dependencies for building debian and rpm packages
This reduces network traffic and eliminates time for installation when
building packages from the frozen toolchain, as well as isolating the
build from updates to those dependencies which may cause breakage.
2020-01-16 12:05:50 +02:00
Avi Kivity
1164ff5329 tools: toolchain: update to Fedora 31
This is a minor update as gcc and boost versions do not change.

glibc-langpack-en no longer gets pulled in by default. As it is required
by some locale use somewhere, it is added to the explicit dependencies.
2019-11-20 00:08:30 +02:00
Avi Kivity
e962beea20 toolchain: update to Fedora 30 and gcc 9.2
In Fedora 30 we have a new boost version, so we no longer need to
use our patched boost, so we also remove the scylladb/toolchain copr.
2019-09-01 12:05:26 +03:00
Pekka Enberg
79cece9f33 toolchain: Fix default command for dbuild Docker image
Running "dbuild" without a build command fails as follows:

  $ ./tools/toolchain/dbuild
  Error: This command has to be run under the root user.

Israel Fruchter discovered that the default command of our Docker image is this:

  "Cmd": [
    "bash",
    "-c",
    "dnf -y install python3-cassandra-driver && dnf clean all"
   ]

Let's make "/bin/bash" the default command instead, which will make
"dbuild" with no build command to return to the host shell.

Message-Id: <20190807133955.4202-1-penberg@scylladb.com>
2019-08-08 14:11:35 +03:00
Tomasz Grabiec
fbeae4ffeb toolchain: Install gdb in the image
Scylla built using the frozen toolchain needs to be debugged
on a system with matching libraries. It's easiest if it's also done on the same image.
Install gdb in the image so that it's always out there when we need it.

Fixes #4329

Message-Id: <1553072393-9145-1-git-send-email-tgrabiec@scylladb.com>
2019-03-20 13:35:26 +02:00
Pekka Enberg
f7cf04ac4b tools/toolchain: Clean up DNF cache from Docker image
Make sure we call "dnf clean all" to remove the DNF cache, which reduces
Docker image size as per the following guidelines:

https://github.com/fedora-cloud/Fedora-Dockerfiles/wiki/Guidelines-for-Creating-Dockerfiles

A freshly built image is 250 MB smaller than the one on Docker Hub:

  <none>                                <none>               b8cafc8ff557        16 seconds ago      1.2 GB
  docker.io/scylladb/scylla-toolchain   fedora-29-20190212   d253d45a964c        3 days ago          1.45 GB

Message-Id: <20190215142322.12466-1-penberg@scylladb.com>
2019-02-16 17:12:10 +02:00
Takuya ASADA
3514b185fd tools: toolchain: allow sudo for all users
Non-privileged user may not belongs to "wheel" group, for example Debian
variants uses "sudo" group instead of "wheel".
To make sudo able to work on all environment we should allow sudo for
"ALL" instead of "wheel".

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190107173410.23140-1-syuu@scylladb.com>
2019-01-07 20:47:22 +02:00
Avi Kivity
11889f5ea9 tools: toolchain: defeat PAM
Prevent PAM from enforcing security and preventing sudo from working. This is
done by replacing the default configuration (designed for workstations) to
one that uses pam_permit for everything.
2019-01-03 16:16:47 +02:00
Avi Kivity
f79a300081 tools: toolchain: prepare sudoers file
Don't require a tty or passwords, since they won't be available in
continuous integration environments.
2019-01-03 16:16:47 +02:00
Avi Kivity
25040824cf tools: toolchain: install ccache
Not strictly necessary, but often useful to reduce rebuild times. The user
will need to bind-mount a populated cache.
2019-01-03 16:16:47 +02:00
Avi Kivity
feddf0b021 tools: toolchain: patch boost for use-after-free in Boost.Test XML output
The version of boost in Fedora 29 has a use-after-free bug that is only
exposed when ./test.py is run with the --jenkins flag.  To patch it,
use a fixed version from the copr repository scylladb/toolchain.
Message-Id: <20181228150419.29623-1-avi@scylladb.com>
2018-12-28 16:35:28 +01:00
Avi Kivity
2c4a732735 tools: toolchain: update baseline Fedora packages
Image fedora-29-20181219 was broken due to the followin chain of events:

 - we install gnutls, which currently is at version 3.6.5
 - gnutls 3.6.5 introduced a dependency on nettle 3.4.1
 - the gnutls rpm does not include a version requirement on nettle,
   so an already-installed nettle will not be upgraded when gnutls is
   installed
 - the fedora:29 image which we use as a baseline has nettle installed
 - docker does not pull the latest tag in FROM statements during
   "docker build"
 - my build machine already had a fedora:29 image, with nettle 3.4
   installed (the repository's image has 3.4.1, but docker doesn't
   automatically pull if an image with the required tag exists)

As a result, the image ended up hacing gnutls 3.6.5 and nettle 3.4, which
are incompatible.

To fix, update all packages after installation to attempt to have a self
consistent package set even if dependencies are not perfect, and regenerate
the image.
Message-Id: <20181226135711.24074-1-avi@scylladb.com>
2018-12-26 14:58:23 +00:00
Avi Kivity
224c4c0b81 tools: add frozen toolchain support
Add a reference to a docker image that contains an "official" toolchain
for building Scylla. In addition, add a script that allows easy usage of
the image, and some documentation.
Message-Id: <20181202120829.21218-1-avi@scylladb.com>
2018-12-02 18:32:34 +02:00