Skip to content

Commit 7bd7472

Browse files
committed
Fix ZooKeeper dist path
Currently the ZooKeeper jar and the rest of the ZK dist files are installed to the wrong path: ``` test@debian:~/vitess$ ls -l dist/vt-zookeeper-3.8.0/vt-zookeeper-3.8.0/lib/ total 15876 -rw-r--r-- 1 test test 16255350 Aug 3 14:39 zookeeper-3.8.0-fatjar.jar ``` The jar should install to `dist/vt-zookeeper-3.8.0/lib/`. This patch fixes. With patch applied: ``` test@debian:~/vitess$ ls -l dist/vt-zookeeper-3.8.0/lib/ total 15876 -rw-r--r-- 1 test test 16255350 Aug 3 14:41 zookeeper-3.8.0-fatjar.jar ``` Signed-off-by: Adam Saponara <[email protected]>
1 parent 6be5cdd commit 7bd7472

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

bootstrap.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,15 @@ install_zookeeper() {
127127
local version="$1"
128128
local dist="$2"
129129
zk="zookeeper-$version"
130-
vtzk="vt-zookeeper-$version"
131130
# This is how we'd download directly from source:
132131
# wget "https://dlcdn.apache.org/zookeeper/$zk/apache-$zk.tar.gz"
133132
$VTROOT/tools/wget-retry "${VITESS_RESOURCES_DOWNLOAD_URL}/apache-${zk}.tar.gz"
134-
tar -xzf "$dist/apache-$zk.tar.gz"
135-
mv $dist/apache-$zk $dist/$vtzk
136-
mvn -f $dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests
137-
mkdir -p $dist/$vtzk/lib
138-
cp "$dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "$dist/$vtzk/lib/$zk-fatjar.jar"
139-
rm -rf "$zk.tar.gz"
133+
# Note we are already pushd'd into "$dist" by install_dep
134+
tar --strip-components=1 -xzf "apache-${zk}.tar.gz"
135+
mvn -f zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests
136+
mkdir -vp lib
137+
cp -v "zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "lib/$zk-fatjar.jar"
138+
rm -f "apache-$zk.tar.gz"
140139
}
141140

142141

0 commit comments

Comments
 (0)