Commit Graph

166 Commits

Author SHA1 Message Date
Kefu Chai
c3d2f0cd81 script: add base36-uuid.py
this script provides a tool to decode a base36 encoded timeuuid
to the underlying msb and lsb bits, and to encode msb and lsb
to a string with base36.

Both scylla and Cassandra 4.x support this new SSTable identifier used
in SSTable names. like "nb-3fw2_0tj4_46w3k2cpidnirvjy7k-big-Data.db".
Since this is a new way to print timeuuid, and unlike the representation
defined by RFC4122, it is not straightforward to connect the the
in-memory representation (0x6636ac00da8411ec9abaf56e1443def0) to its
string representation of SSTable identifiers, like
"3fw2_0tj4_46w3k2cpidnirvjy7k". It would be handy to have this
tool to encode/decode the number/string for debugging purpose.

For more context on the new SSTable identifier, please
see
https://cassandra.apache.org/_/blog/Apache-Cassandra-4.1-New-SSTable-Identifiers.html
and https://issues.apache.org/jira/browse/CASSANDRA-17048

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #14374
2023-06-27 16:56:31 +03:00
Nadav Har'El
59f331c4e1 Merge 'create-relocatable-package.py: package build/node_export only for stripped version' from Kefu Chai
because we build stripped package and non-stripped package in parallel
using ninja. there are chances that the non-stripped build job could
be adding build/node_exporter directory to the tarball while the job
building stripped package is using objcopy to extract the symbols from
the build/node_exporter/node_exporter executable. but objcopy creates
temporary files when processing the executables. and the temporary
files can be spotted by the non-stripped build job. there are two
consequences:

1. non-stripped build job includes the temporary files in its tarball,
   even they are not supposed to be distributed
2. non-stripped build job fails to include the temporary file(s), as
   they are removed after objcopy finishes its job. but the job did spot
   them when preparing the tarball. so when the tarfile python module
   tries to include the previous found temporary file(s), it throws.

neither of these consequences is expected. but fortunately, this only
happens when packaging the non-stripped package. when packaging the
stripped package, the build/node_exported directory is not in flux
anymore. as ninja ensures the dependencies between the jobs.

so, in this change, we do not add the whole directory when packaging
the non-stripped version. as all its ingredients have been added
separately as regular files. and when packaing the stripped version,
we still use the existing step, as we don't have to list all the
files created by strip.sh:

node_exporter{,.debug,.dynsyms,.funcsyms,.keep_symbols,.minidebug.xz}

we could do so in this script, but the repeatings is unnecessary and
error-prune. so, let's keep including the whole directory recursively,
so all the debug symbols are included.

Fixes https://github.com/scylladb/scylladb/issues/14079

Closes #14081

* github.com:scylladb/scylladb:
  create-relocatable-package.py: package build/node_export only for stripped version
  create-relocatable-package.py: use positive condition when possible
2023-06-12 10:39:10 +03:00
Pavel Emelyanov
577cd96da8 scripts: Fix options iteration in open-coredump.sh
When run like 'open-coredump.sh --help' the options parsing loop doesn't
run because $# == 1 and [ $# -gt 1 ] evaluates to false.

The simplest fix is to parse -h|--help on its own as the options parsing
loop assumes that there's core-file argument present.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes #14075
2023-05-30 12:25:01 +03:00
Kefu Chai
024b96a211 create-relocatable-package.py: package build/node_export only for stripped version
because we build stripped package and non-stripped package in parallel
using ninja. there are chances that the non-stripped build job could
be adding build/node_exporter directory to the tarball while the job
building stripped package is using objcopy to extract the symbols from
the build/node_exporter/node_exporter executable. but objcopy creates
temporary files when processing the executables. and the temporary
files can be spotted by the non-stripped build job. there are two
consequences:

1. non-stripped build job includes the temporary files in its tarball,
   even they are not supposed to be distributed
2. non-stripped build job fails to include the temporary file(s), as
   they are removed after objcopy finishes its job. but the job did spot
   them when preparing the tarball. so when the tarfile python module
   tries to include the previous found temporary file(s), it throws.

neither of these consequences is expected. but fortunately, this only
happens when packaging the non-stripped package. when packaging the
stripped package, the build/node_exported directory is not in flux
anymore. as ninja ensures the dependencies between the jobs.

so, in this change, we do not add the whole directory when packaging
the non-stripped version. as all its ingredients have been added
separately as regular files. and when packaing the stripped version,
we still use the existing step, as we don't have to list all the
files created by strip.sh:

node_exporter{,.debug,.dynsyms,.funcsyms,.keep_symbols,.minidebug.xz}

we could do so in this script, but the repeatings is unnecessary and
error-prune. so, let's keep including the whole directory recursively,
so all the debug symbols are included.

Fixes #14079
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-05-30 14:00:02 +08:00
Kefu Chai
665a747fab create-relocatable-package.py: use positive condition when possible
to reduce the programmer's cognitive load.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-05-30 14:00:02 +08:00
Kefu Chai
a0b8aa9b13 create-relocatable-package.py: raise if rmtree fails
occasionally, we are observing build failures like:
```
17:20:54  FAILED: build/release/dist/tar/scylla-debuginfo-5.4.0~dev-0.20230522.5b2687e11800.x86_64.tar.gz
17:20:54  dist/debuginfo/scripts/create-relocatable-package.py --mode release 'build/release/dist/tar/scylla-debuginfo-5.4.0~dev-0.20230522.5b2687e11800.x86_64.tar.gz'
17:20:54  Traceback (most recent call last):
17:20:54    File "/jenkins/workspace/scylla-master/scylla-ci/scylla/dist/debuginfo/scripts/create-relocatable-package.py", line 60, in <module>
17:20:54      os.makedirs(f'build/{SCYLLA_DIR}')
17:20:54    File "<frozen os>", line 225, in makedirs
17:20:54  FileExistsError: [Errno 17] File exists: 'build/scylla-debuginfo-package'
```

to understand the root cause better, instead of swallowing the error,
let's raise the exception it is not caused by non-existing directory.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13978
2023-05-29 23:03:24 +03:00
Kefu Chai
8d79811c6a scripts/refresh-submodules.sh: use the correct sha1 in title
0d4ffe1d69 introduced a regression where
it used the sha1 of the local "master" branch instead of the remote's
"master" branch in the title of the commit message.

in this change, let's use the origin/${branch}'s sha1 in the title.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13974
2023-05-22 12:10:03 +03:00
Michał Sala
3b44ecd1e7 scripts: open-coredump.sh: suggest solib-search-path
Loading cores from Scylla executables installed in a non-standard
location can cause gdb to fail reading required libraries.

This is an example of a warning I've got after trying to load core
generated by dtest jenkins job (using ./scripts/open-coredump.sh):
> warning: Can't open file /jenkins/workspace/scylla-master/dtest-daily-debug/scylla/.ccm/scylla-repository/0d64f327e1af9bcbb711ee217eda6df16e517c42/libreloc/libboost_system.so.1.78.0 during file-backed mapping note processing

Invocations of `scylla threads` command ended with an error:
> (gdb) scylla threads
> Python Exception <class 'gdb.error'>: Cannot find thread-local storage for LWP 2758, executable file (...)/scylla-debug-unstripped-5.3.0~dev-0.20230121.0d64f327e1af.x86_64/scylla/libexec/scylla:
> Cannot find thread-local variables on this target
> Error occurred in Python: Cannot find thread-local storage for LWP 2758, executable file (...)/scylla-debug-unstripped-5.3.0~dev-0.20230121.0d64f327e1af.x86_64/scylla/libexec/scylla:
> Cannot find thread-local variables on this target

An easy fix for this is to set solib-search-path to
/opt/scylladb/libreloc/.

This commit adds that set command to suggested command line gdb
arguments. I guess it's a good idea to always suggest setting
solib-search-path to that path, as it can save other people from wasting
their time on looking why does coredump opening does not work.

Closes #13696
2023-04-28 08:11:01 +03:00
Pavel Emelyanov
4e7f4b9303 Merge 'scripts/open-coredump.sh: allow user to plug in scylla package' from Botond Dénes
Lately we have observed that some builds are missing the package_url in the build metadata. This is usually caused by changes in how build metadata is stored on the servers and the s3 reloc server failing to dig them out of the metadata files. A user can usually still obtain the package url but currently there is no way to plug in user-obtained scylla package into the script's workflow.
This PR fixes this by allowing the user to provide the package as `$ARTIFACT_DIR/scylla.package` (in unpacked form).

Closes #13519

* github.com:scylladb/scylladb:
  scripts/open-coredump.sh: allow bypassing the package downloading
  scripts/open-coredump.sh: check presence of mandatory field in build json object
  scripts/open-coredump.sh: more consistent error messaging
2023-04-14 20:35:06 +03:00
Botond Dénes
cae79ef2c3 scripts/open-coredump.sh: allow bypassing the package downloading
By allowing the user to plug a manually downloaded package. Consequently
the "package_url" field of the build metadata is checked only if there
is no user-provided extracted package.
This allows working around builds for which the metadata server returns
no "package_url", by allowing the user to locate and download the
package themselves, providing it to the script by simply extracting it
as $ARTIFACT_DIR/scylla.package.
2023-04-14 07:48:21 -04:00
Botond Dénes
45fbdbe5f7 scripts/open-coredump.sh: check presence of mandatory field in build json object
Mandatory fields missing in the build json object lead to obscure,
unrelated error messages down the road. Avoid this by checking that all
required fields all present and print an error message if any is
missing.
2023-04-14 07:33:46 -04:00
Botond Dénes
4df5ec4080 scripts/open-coredump.sh: more consistent error messaging
Start all erro messages with "error: ..." and log them to stderr.
2023-04-14 07:24:14 -04:00
Kefu Chai
60ff230d54 create-relocatable-package.py: use f-string
in dcce0c96a9, we should have used
f-string for printing the return code of gzip subprocess. but the
"f" prefix was missed. so, in this change, it is added.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13500
2023-04-14 08:29:33 +03:00
Kefu Chai
dcce0c96a9 create-relocatable-package.py: error out if pigz fails
before this change, we don't error out even if pigz fails. but
there is chance that pigz fails to create the gzip'ed relocatable
tarball either due to environmental issues or some other problems,
and we are not aware of this until packaging scripts like
`reloc/build_rpm.sh` tries to ungzip this corrupted gzip file.

in this change, if pigz's status code is not 0, the status code
is printed, and create-relocatable-package.py will return 1.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13459
2023-04-11 14:29:25 +03:00
Kefu Chai
0d4ffe1d69 scripts/refresh-submodules.sh: include all commits in summary
before this change, we suse `git submodule summary ${submodule}`
for collecting the titles of commits in between current HEAD and
origin/master. normally, this works just fine. but it fails to
collect all commits if the origin/master happens to reference
a merge commit. for instance, if we have following history like:

1. merge foo
2. bar
3. foo
4. baz  <--- submodule is pointing here.

`git submodule summary` would just print out the titles of commits
of 1 and 3.

so, in this change, instead of relying on `git submodule summary`,
we just collect the commits using `git log`. but we preserve the
output format used by `git submodule summary` to be consistent with
the previous commits bumping up the submodules. please note, in
this change instead of matching the output of `git submodule summary`,
we use `git merge-base --is-ancestor HEAD origin/master` to check
if we are going to create a fastforward change, this is less fragile.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13366
2023-04-06 11:27:14 +03:00
Kefu Chai
4670ba90e5 scripts: remove git-archive-all
since we don't build the rpm/deb packages from source tarball anymore,
instead we build the rpm/deb packages from precompiled relocatable
package. there is no need to keep git-archive-all in the repo. in this
change, the git-archive-all script and its license file are removed.
they were added for building rpm packages from source tarball in
f87add31a7.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13372
2023-03-29 18:59:23 +03:00
Takuya ASADA
497dd7380f create-relocatable-package.py: stop using filter function on tools
We introduced exclude_submodules at 19da4a5b8f
to exclude tools/java and tools/jmx since they have their own
relocatable packages, so we don't want to package same files twice.

However, most of the files under tools/ are not needed for installation,
we just need tools/scyllatop.
So what we really need to do is "ar.reloc_add('tools/scyllatop')", not
excluding files from tools/.

related with #13183

Closes #13215
2023-03-29 16:23:43 +03:00
Kefu Chai
c307c60d04 scripts: correct a typo in comment
s/refreh/refresh/

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13357
2023-03-29 13:44:47 +03:00
Kefu Chai
fcee7f7ac9 reloc: silence warning from readelf
we've been seeing errors like

```
10:39:36  gdb-add-index: [Was there no debuginfo? Was there already an index?]
10:39:36  readelf: /jenkins/workspace/scylla-master/next/scylla/build/dist/debug/redhat/BUILDROOT/scylla-5.3.0~dev-0.20230321.0f97d464d32b.x86_64/usr/lib/debug/opt/scylladb/libreloc/libc.so.6-5.3.0~dev-0.20230321.0f97d464d32b.x86_64.debug: Error: Unable to find program interpreter name
```

when strip.sh is processing *.debug elf images. this is caused by a
known issue, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012107 . and this
error is not fatal. but it is very distracting when we are trying to
find errors in jenkins logging messages.

so, in this change, the stderr output from readelf is muted for higher
signal-noise ratio in the build logging message.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13267
2023-03-28 08:29:37 +03:00
Kefu Chai
96ba88f621 dist/debian: add libexec/scylla to source/include-binaries
* scripts/create-relocatable-package.py: add a command to print out
  executables under libexec
* dist/debian/debian_files_gen.py: call create-relocatable-package.py
  for a list of files under libexec and create source/include-binaries
  with the list.

we repackage the precompiled binaries in the relocatable package into a debian source package using `./scylla/install.sh`, which edits the executable to use the specified dynamic library loader. but dpkg-source does not like this, as it wants to ensure that the files in original tarball (*.orig.tar.gz) is identical to the files in the source package created by dpkg-source.

so we have following failure when running reloc/build_deb.sh

```
dpkg-source: error: cannot represent change to scylla/libexec/scylla: binary file contents changed
dpkg-source: error: add scylla/libexec/scylla in debian/source/include-binaries if you want to store the modified binary in the debian tarball
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 1
debuild: fatal error at line 1182:
dpkg-buildpackage -rfakeroot -us -uc -ui failed
```

in this change, to address the build failure, as proposed by dpkg, the
path to the patched/edited executable is added to
`debian/source/include-binaries`. see the "Building" section in https://manpages.debian.org/bullseye/dpkg-dev/dpkg-source.1.en.html for more details.
please search `adjust_bin()` in `scylladb/install.sh` for more details.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #12722
2023-03-27 10:10:12 +03:00
Avi Kivity
a7099132cc scripts/pull_github_pr.sh: optionally authenticate
This helps overcome rate limits for unauthenticated requests,
preventing maintainers from getting much-needed rest.

Closes #13210
2023-03-19 15:16:02 +02:00
Takuya ASADA
a79604b0d6 create-relocatable-package.py: exclude tools/cqlsh
We should exclude tools/cqlsh for relocatable package.

fixes #13181

Closes #13183
2023-03-16 13:37:16 +02:00
Botond Dénes
ab8171ffd5 open-coredump.sh: handle dev versions
Like: 5.2.0~dev, which really means master. Don't try to checkout
branch-5.2 in this case, it doesn't exist yet, checkout master instead.

Closes #12510
2023-01-12 19:28:58 +02:00
Botond Dénes
d44c5f5548 scripts: add open-coredump.sh
Script for "one-click" opening of coredumps.
It extracts the build-id from the coredump, retrieves metadata for that
build, downloads the binary package, the source code and finally
launches the dbuild container, with everything ready to load the
coredump.
The script is idempotent: running it after the prepartory steps will
re-use what is already donwloaded.

The script is not trying to provide a debugging environment that caters
to all the different ways and preferences of debugging. Instead, it just
sets up a minimalistic environment for debugging, while providing
opportunities for the user to customization according to their
preferred.

I'm not entirely sure, coredumps from master branch will work, but we
can address this later when we confirm they don't.

Example:

    $ ~/ScyllaDB/scylla/worktree0/scripts/open-coredump.sh ./core.scylla.113.bac3650b616f4f09a4d1ab160574b6a5.4349.1669185225000000000000
    Build id: 5009658b834aaf68970135bfc84f964b66ea4dee
    Matching build is scylla-5.0.5 0.20221009.5a97a1060 release-x86_64
    Downloading relocatable package from http://downloads.scylladb.com/downloads/scylla/relocatable/scylladb-5.0/scylla-x86_64-package-5.0.5.0.20221009.5a97a1060.tar.gz
    Extracting package scylla-x86_64-package-5.0.5.0.20221009.5a97a1060.tar.gz
    Cloning scylla.git
    Downloading scylla-gdb.py
    Copying scylla-gdb.py from /home/bdenes/ScyllaDB/storage/11961/open-coredump.sh.dir/scylla.repo
    Launching dbuild container.

    To examine the coredump with gdb:

        $ gdb -x scylla-gdb.py -ex 'set directories /src/scylla' --core ./core.scylla.113.bac3650b616f4f09a4d1ab160574b6a5.4349.1669185225000000000000 /opt/scylladb/libexec/scylla

    See https://github.com/scylladb/scylladb/blob/master/docs/dev/debugging.md for more information on how to debug scylla.

    Good luck!
    [root@fedora workdir]#

Closes #12223
2022-12-12 12:55:28 +02:00
Avi Kivity
46690bcb32 build: harden create-relocatable-package.py against changes in libthread-db.so name
create-relocatable-package.py collects shared libraries used by
executables for packaging. It also adds libthread-db.so to make
debugging possible. However, the name it uses has changed in glibc,
so packaging fails in Fedora 37.

Switch to the version-agnostic names, libthread-db.so. This happens
to be a symlink, so resolve it.

Closes #11917
2022-11-08 08:41:22 +02:00
Takuya ASADA
1a11a38add unified: move unified package contents to sub-directory
On most of the software distribution tar.gz, it has sub-directory to contain
everything, to prevent extract contents to current directory.
We should follow this style on our unified package too.

To do this we need to increment relocatable package version to '3.0'.

Fixes #8349

Closes #8867
2022-10-25 08:58:15 +03:00
Takuya ASADA
49d5e51d76 reloc: add support stripped binary installation for relocatable package
This add support stripped binary installation for relocatable package.
After this change, scylla and unified packages only contain stripped binary,
and introduce "scylla-debuginfo" package for debug symbol.
On scylla-debuginfo package, install.sh script will extract debug symbol
at /opt/scylladb/<dir>/.debug.

Note that we need to keep unstripped version of relocatable package for rpm/deb,
otherwise rpmbuild/debuild fails to create debug symbol package.
This version is renamed to scylla-unstripped-$version-$release.$arch.tar.gz.

See #8918

Signed-off-by: Takuya ASADA <syuu@scylladb.com>

Closes #9005
2022-10-13 15:11:32 +02:00
Takuya ASADA
cd5320fe60 install.sh: add --without-systemd option
Since we fail to write files to $USER/.config on Jenkins jobs, we need
an option to skip installing systemd units.
Let's add --without-systemd to do that.

Also, to detect the option availability, we need to increment
relocatable package version.

See scylladb/scylla-dtest#2819

Closes #11345
2022-09-12 13:04:00 +03:00
Avi Kivity
a9a230afbe scripts: introduce script to apply email, working around google groups brokeness
Google Groups recently started rewriting the From: header, garbaging
our git log. This script rewrites it back, using the Reply-To header
as a still working source.

Closes #11416
2022-08-31 14:47:24 +03:00
Avi Kivity
719724e4df scripts: pull_github_pr.sh: support recovering from a failed cherry-pick
If a single-patch pull request fails cherry-picking, it's still possible
to recover it (if it's a simple conflict). Give the maintainer the option
by opening a subshell and instructing them to either complete the cherry-pick
or abort it.

Closes #10949
2022-07-04 09:26:45 +03:00
Michael Livshin
43f2c55c5d configure.py: speed up and simplify compdb generation
The most time-consuming part is invoking "ninja -t compdb", and there
is no need to repeat that for every mode.

Signed-off-by: Michael Livshin <michael.livshin@scylladb.com>

Closes #10733
2022-06-15 16:40:52 +03:00
Piotr Sarna
ddf83f6ddc scripts: make pull_github_pr.sh more universally usable
After 93b765f655, our pull_github_pr.sh script tries to detect
a non-orthodox remote repo name, but it also adds an assumption
which breaks on some configurations (by some I mean mine).
Namely, the script tries to parse the repo name from the upstream
branch, assuming that current HEAD actually points to a branch,
which is not the way some users (by some I mean me) work with
remote repositories. Therefore, to make the script also work
with detached HEAD, it now has two fallback mechanisms:
1. If parsing @{upstream} failed, the script tries to parse
   master@{upstream}, under the assumption that the master branch
   was at least once used to track the remote repo.
2. If that fails, `origin/master` is used as last resort solution.

This patch allows some users (guess who) to get back to using
scripts/pull_github_pr.sh again without using a custom patched version.

Closes #10773
2022-06-13 08:15:40 +03:00
Beni Peled
3abe4a2696 Adjust scripts/pull_github_pr.sh to check tests status
Closes #10263

Closes #10264
2022-05-11 14:46:30 +02:00
Nadav Har'El
ca700bf417 scripts/pull_github_pr.sh: clean up after failed cherry-pick
When pull_github_pr.sh uses git cherry-pick to merge a single-patch
pull request, this cherry-pick can fail. A typical example is trying
to merge a patch that has actually already been merged in the past,
so cherry-pick reports that the patch, after conflict resolution,
is empty.

When cherry-pick fails, it leaves the working directory in an annoying
mid-cherry-pick state, and today the user needs to manually call
"git cherry-pick --abort" to return to the normal state. The script
should it automatically - so this is what we do in this patch.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
2022-05-09 17:23:34 +03:00
Pavel Emelyanov
cb4fe65a78 scripts: Allow specifying submodule branch to refresh from
There's a script to automate fetching submodule changes. However, this
script alays fetches remote master branch, which's not always the case.
For example, for branch-5.0/next-5.0 pair the correct scylla-seastar
branch would be the branch-5.0 one, not master.

With this change updating a submodule from a custom branch would be like

   refresh-submodules.sh <submodule>:<branch>

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Message-Id: <20220322093623.15748-1-xemul@scylladb.com>
2022-03-22 15:18:25 +02:00
Pavel Emelyanov
22d131d40a Revert "scripts: Detect remote branch to fetch submodules from"
This reverts commit 87df37792c.

Scylla branches are not mapped to seastar branches 1-1, so getting
the upstream scylla branch doesn't point to the correct seastar one.
2022-03-22 15:18:25 +02:00
Pavel Emelyanov
87df37792c scripts: Detect remote branch to fetch submodules from
There's a script to automate fetching submodule changes. However, this
script alays fetches remote master branch, which's not always the case.
The correct branch can be detected by checking the current remote
tracking scylla branch which should coincide with the submodule one.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Message-Id: <20220317085018.11529-1-xemul@scylladb.com>
2022-03-17 12:21:29 +02:00
Avi Kivity
fcb8d040e8 treewide: use Software Package Data Exchange (SPDX) license identifiers
Instead of lengthy blurbs, switch to single-line, machine-readable
standardized (https://spdx.dev) license identifiers. The Linux kernel
switched long ago, so there is strong precedent.

Three cases are handled: AGPL-only, Apache-only, and dual licensed.
For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0),
reasoning that our changes are extensive enough to apply our license.

The changes we applied mechanically with a script, except to
licenses/README.md.

Closes #9937
2022-01-18 12:15:18 +01:00
Takuya ASADA
76519751bc install.sh: add fix_system_distributed_tables.py to the package
Related with #4601

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2021-11-08 08:07:49 +02:00
Michael Livshin
60f76155a7 build: have configure.py create compile_commands.json
compile_commands.json (a.k.a. "compdb",
https://clang.llvm.org/docs/JSONCompilationDatabase.html) is intended
to help stand-alone C-family LSP servers index the codebase as
precisely as possible.

The actively maintained LSP servers with good C++ support are:
- Clangd (https://clangd.llvm.org/)
- CCLS (https://github.com/MaskRay/ccls)

This change causes a successful invocation of configure.py to create a
unified Scylla+Seastar+Abseil compdb for every selected build mode,
and to leave a valid symlink in the source root (if a valid symlink
already exists, it will be left alone).

Signed-off-by: Michael Livshin <michael.livshin@scylladb.com>

Closes #9558
2021-11-05 11:28:37 +02:00
Avi Kivity
93b765f655 scripts/pull_github_pr.sh: don't guess git remote name
The script assumes the remote name is "origin", a fair
assumption, but not universally true. Read it from configuration
instead of guessing it.

Closes #9423
2021-10-04 12:32:39 +03:00
Pavel Emelyanov
85d86cc85f scripts: Fix origin repo URL parsing
It assumes that the origin URL is git@ one while it can be
the https:// one as well.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Message-Id: <20211001082116.7214-1-xemul@scylladb.com>
2021-10-01 13:22:06 +02:00
Avi Kivity
a55b434a2b treewide: extent copyright statements to present day 2021-06-06 19:18:49 +03:00
Nadav Har'El
cee0340c89 scripts/pull_github_pr.sh: do not hard-code project name
The current pull_github_pr.sh hard-codes the project name "scylladb/scylla".
Let's determine it automaticaly, from the git origin url.

This will allow using exactly the same script in other Scylla subprojects,
e.g., Seastar.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Message-Id: <20210318142624.1794419-1-nyh@scylladb.com>
2021-06-06 19:18:49 +03:00
Botond Dénes
438391b4cc scripts/coverage.py: check that --path is a directory
To detect a bad --path that would fail coverage generation early.
2021-06-06 09:21:23 +03:00
Botond Dénes
ca91fd0e34 scripts/coverage.py: update main()'s docstring with new --run modifiers
And fix a typo while there.
2021-06-06 09:21:23 +03:00
Botond Dénes
2ba3fc2e11 scripts/coverage.py: add --distinct-id parameter
Yet another modifier for `--run`, allowing running the same executable
multiple times and then generating a coverage report across all runs.
This will also be used by test.py for those test suites (cql test) which
run the same executable multiple times, with different inputs.
2021-06-06 09:21:23 +03:00
Botond Dénes
b1f46b3693 scripts/coverage.py: add --executable parameter
Another modifier for `--run`, allowing to override the test executable
path. This is useful when the real test is ran through a run-script,
like in the case of cql-pytest.
2021-06-06 09:21:23 +03:00
Botond Dénes
cd17932b96 scripts/coverage.py: document intended uses-cases 2021-05-21 11:50:39 +03:00
Botond Dénes
4647472fee scripts/coverage.py: add --verbose parameter 2021-05-21 11:50:39 +03:00