mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 01:20:39 +00:00
To make unified relocatable package easily, we may want to merge tarballs to single tarball like this: zcat *.tar.gz | gzip -c > scylla-unified.tar.xz But it's not possible with current relocatable package format, since there are multiple files conflicts, install.sh, SCYLLA-*-FILE, dist/, README.md, etc.. To support this, we need to archive everything in the directory when building relocatable package. This is modifying relocatable package format, we need to provide a way to detect the format version. To do this, we added a new file ".relocatable_package_version" on the top of the archive, and set version number "2" to the file. Fixes #6315
38 lines
953 B
Bash
Executable File
38 lines
953 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
. /etc/os-release
|
|
print_usage() {
|
|
echo "build_deb.sh --reloc-pkg build/release/scylla-python3-package.tar.gz"
|
|
echo " --reloc-pkg specify relocatable package path"
|
|
exit 1
|
|
}
|
|
|
|
RELOC_PKG=build/release/scylla-python3-package.tar.gz
|
|
OPTS=""
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
"--reloc-pkg")
|
|
OPTS="$OPTS $1 $(readlink -f $2)"
|
|
RELOC_PKG=$2
|
|
shift 2
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [ ! -e $RELOC_PKG ]; then
|
|
echo "$RELOC_PKG does not exist."
|
|
echo "Run ./reloc/python3/build_reloc.sh first."
|
|
exit 1
|
|
fi
|
|
RELOC_PKG=$(readlink -f $RELOC_PKG)
|
|
if [[ ! $OPTS =~ --reloc-pkg ]]; then
|
|
OPTS="$OPTS --reloc-pkg $RELOC_PKG"
|
|
fi
|
|
mkdir -p build/debian/scylla-python3-package
|
|
tar -C build/debian/scylla-python3-package -xpf $RELOC_PKG
|
|
cd build/debian/scylla-python3-package
|
|
exec ./scylla-python3/dist/debian/python3/build_deb.sh $OPTS
|