Skip to content

Commit

Permalink
Fix ZooKeeper dist path
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
adsr committed Aug 3, 2023
1 parent 6be5cdd commit 7bd7472
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,15 @@ install_zookeeper() {
local version="$1"
local dist="$2"
zk="zookeeper-$version"
vtzk="vt-zookeeper-$version"
# This is how we'd download directly from source:
# wget "https://dlcdn.apache.org/zookeeper/$zk/apache-$zk.tar.gz"
$VTROOT/tools/wget-retry "${VITESS_RESOURCES_DOWNLOAD_URL}/apache-${zk}.tar.gz"
tar -xzf "$dist/apache-$zk.tar.gz"
mv $dist/apache-$zk $dist/$vtzk
mvn -f $dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests
mkdir -p $dist/$vtzk/lib
cp "$dist/$vtzk/zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "$dist/$vtzk/lib/$zk-fatjar.jar"
rm -rf "$zk.tar.gz"
# Note we are already pushd'd into "$dist" by install_dep
tar --strip-components=1 -xzf "apache-${zk}.tar.gz"
mvn -f zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml clean install -P fatjar -DskipTests
mkdir -vp lib
cp -v "zookeeper-contrib/zookeeper-contrib-fatjar/target/$zk-fatjar.jar" "lib/$zk-fatjar.jar"
rm -f "apache-$zk.tar.gz"
}


Expand Down

0 comments on commit 7bd7472

Please sign in to comment.