Skip to content

Commit

Permalink
dist: merge product name parameter on single place
Browse files Browse the repository at this point in the history
When we add product name customization, we mistakenly defined the
parameter on each package build script.
Number of script is increasing since we recently added relocatable
python3 package, we should merge it in single place.

Also we should save the parameter on relocatable package, just like
version-release parameters.

So move the definition to SCYLLA-VERSION-GEN, save it to
build/SCYLLA-PRODUCT-FILE then archive it to relocatable package.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190417163335.10191-1-syuu@scylladb.com>
  • Loading branch information
syuu1228 authored and avikivity committed Apr 19, 2019
1 parent d47ea66 commit 214c74a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions SCYLLA-VERSION-GEN
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

PRODUCT=scylla
VERSION=666.development

if test -f version
Expand All @@ -22,3 +23,4 @@ echo "$SCYLLA_VERSION-$SCYLLA_RELEASE"
mkdir -p build
echo "$SCYLLA_VERSION" > build/SCYLLA-VERSION-FILE
echo "$SCYLLA_RELEASE" > build/SCYLLA-RELEASE-FILE
echo "$PRODUCT" > build/SCYLLA-PRODUCT-FILE
2 changes: 1 addition & 1 deletion dist/ami/build_ami.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

PRODUCT=scylla
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)

if [ ! -e dist/ami/build_ami.sh ]; then
echo "run build_ami.sh in top of scylla dir"
Expand Down
2 changes: 1 addition & 1 deletion dist/debian/build_deb.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

PRODUCT=scylla
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)

. /etc/os-release
print_usage() {
Expand Down
2 changes: 1 addition & 1 deletion dist/redhat/build_rpm.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

PRODUCT=scylla
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)

. /etc/os-release
print_usage() {
Expand Down
2 changes: 1 addition & 1 deletion dist/redhat/python3/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# along with Scylla. If not, see <http://www.gnu.org/licenses/>.
#

PRODUCT=scylla
PRODUCT=$(cat SCYLLA-PRODUCT-FILE)

print_usage() {
echo "${0} --reloc-pkg build/release/scylla-python3-package.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion reloc/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ if [[ ! $OPTS =~ --reloc-pkg ]]; then
OPTS="$OPTS --reloc-pkg $RELOC_PKG"
fi
mkdir -p $BUILDDIR/scylla-package
tar -C $BUILDDIR/scylla-package -xpf $RELOC_PKG SCYLLA-RELOCATABLE-FILE SCYLLA-RELEASE-FILE SCYLLA-VERSION-FILE dist/redhat
tar -C $BUILDDIR/scylla-package -xpf $RELOC_PKG SCYLLA-RELOCATABLE-FILE SCYLLA-RELEASE-FILE SCYLLA-VERSION-FILE SCYLLA-PRODUCT-FILE dist/redhat
cd $BUILDDIR/scylla-package
exec ./dist/redhat/build_rpm.sh $OPTS
2 changes: 1 addition & 1 deletion reloc/python3/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ if [[ ! $OPTS =~ --reloc-pkg ]]; then
OPTS="$OPTS --reloc-pkg $RELOC_PKG"
fi
mkdir -p $BUILDDIR/scylla-python3-package
tar -C $BUILDDIR/scylla-python3-package -xpf $RELOC_PKG SCYLLA-*-FILE dist/redhat/python3
tar -C $BUILDDIR/scylla-python3-package -xpf $RELOC_PKG SCYLLA-RELOCATABLE-FILE SCYLLA-RELEASE-FILE SCYLLA-VERSION-FILE SCYLLA-PRODUCT-FILE dist/redhat/python3
cd $BUILDDIR/scylla-python3-package
exec ./dist/redhat/python3/build_rpm.sh $OPTS
1 change: 1 addition & 0 deletions scripts/create-relocatable-package.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def ldd(executable):
ar.add('dist')
ar.add('build/SCYLLA-RELEASE-FILE', arcname='SCYLLA-RELEASE-FILE')
ar.add('build/SCYLLA-VERSION-FILE', arcname='SCYLLA-VERSION-FILE')
ar.add('build/SCYLLA-PRODUCT-FILE', arcname='SCYLLA-PRODUCT-FILE')
ar.add('seastar/scripts')
ar.add('seastar/dpdk/usertools')
ar.add('install.sh')
Expand Down

0 comments on commit 214c74a

Please sign in to comment.