Skip to content

Commit b53615c

Browse files
authored
Merge pull request #226 from DavidVujic/zookeeper_3_5_6
Zookeeper 3.5.6 and rollback for Windows client (3.4.14)
2 parents 5a8f20f + 6147cd8 commit b53615c

12 files changed

+74
-146
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js:
3-
- "8"
43
- "10"
54
- "12"
65
os:

Dockerfile.node

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:10
1+
FROM node:12
22

33
WORKDIR /app
44

deps/apache-zookeeper-3.5.5.tar.gz

-3.08 MB
Binary file not shown.

deps/apache-zookeeper-3.5.6.tar.gz

2.99 MB
Binary file not shown.

example.js

-38
This file was deleted.

patches/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ set(zookeeper_sources
5151
src/recordio.c
5252
generated/zookeeper.jute.c
5353
src/zk_log.c
54-
src/zk_hashtable.c
55-
src/addrvec.c)
54+
src/zk_hashtable.c)
5655

5756
list(APPEND zookeeper_sources src/st_adaptor.c)
5857

patches/ZOOKEEPER-3078.patch

-40
This file was deleted.

scripts/build.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,14 @@ if (env.isVerbose) {
3333
shell.cd(`${env.sourceFolder}`);
3434

3535
if (env.isWindows) {
36-
let flags = '-DWANT_SYNCAPI=OFF ';
37-
let output = '';
38-
39-
if (!env.isVerbose) {
40-
flags = '';
41-
output = ' > NUL';
42-
}
43-
exec(`cmake ${flags}-DCMAKE_GENERATOR_PLATFORM=${process.arch} .${output}`);
36+
const output = env.isVerbose ? '' : ' > NUL';
37+
exec(`cmake -DWANT_SYNCAPI=OFF -DCMAKE_GENERATOR_PLATFORM=${process.arch} .${output}`);
4438
exec(`cmake --build .${output}`);
4539
} else {
4640
const flags = '-w';
4741
let configureCmd = `./configure CFLAGS='${flags}' --without-syncapi --disable-shared --with-pic --without-cppunit`;
4842
let makeCmd = 'make';
43+
4944
if (!env.isVerbose) {
5045
configureCmd += ' --enable-silent-rules --quiet';
5146
makeCmd += ' --no-print-directory --quiet';

scripts/env.js

+16-7
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,23 @@ const isWindows = process.platform.toLowerCase().includes('win32');
2222
const isSunOs = process.platform.toLowerCase().includes('sunos');
2323
const rootFolder = setRoot({ isWindows });
2424

25-
// Don't forget to also update the sha1sum variable when upgrading the Zookeeper version
26-
const zookeeperVersion = '3.5.5';
27-
const downloadedFolderName = `apache-zookeeper-${zookeeperVersion}`;
25+
let zookeeperVersion;
26+
let downloadedFolderName;
27+
let sha512sum;
2828
const suffix = '.tar.gz';
29-
const downloadedFileName = `${downloadedFolderName}${suffix}`;
30-
31-
// Update the checksum when upgrading the Zookeeper version
32-
const sha512sum = `4e22df899a83ca3cc15f6d94daadb1a8631fb4108e67b4f56d1f4fcf95f10f89c8ff1fb8a7c84799a3856d8803a8db1e1f2f3fe1b7dc0d6cedf485ef90fd212d ${downloadedFileName}`;
29+
let downloadedFileName;
30+
31+
if (isWindows) {
32+
zookeeperVersion = '3.4.14';
33+
downloadedFolderName = `zookeeper-${zookeeperVersion}`;
34+
downloadedFileName = `${downloadedFolderName}${suffix}`;
35+
sha512sum = `b2e03d95f8cf18b97a46e2f53871cef5a5da9d5d80b97009375aed7fb35368c440ca944c7e8b64efabbc065f6fb98bb86239f7c1491f0490efc71876d5a7f424 ${downloadedFileName}`;
36+
} else {
37+
zookeeperVersion = '3.5.6';
38+
downloadedFolderName = `apache-zookeeper-${zookeeperVersion}`;
39+
downloadedFileName = `${downloadedFolderName}${suffix}`;
40+
sha512sum = `7f45817cbbc42aec5a7817fa2ae99656128e666dc58ace23d86bcfc5ca0dc49e418d1a7d1f082ad80ccb916f9f1b490167d16f836886af1a56fbcf720ad3b9d0 ${downloadedFileName}`;
41+
}
3342

3443
const variables = {
3544
rootFolder,

scripts/prepublish.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function validateFile(fileName) {
5353
}
5454

5555
if (res !== env.sha512sum) {
56-
throw new Error(`Wrong sha512 for ${fileName}! Expected "${env.sha512sum}", got "${res}".`);
56+
throw new Error(`Wrong sha for ${fileName}! Expected "${env.sha512sum}", got "${res}".`);
5757
}
5858
}
5959

@@ -89,8 +89,6 @@ function applyPatches() {
8989
shell.cp(`${env.patchesFolder}/${cmakeFile}`, `${env.sourceFolder}/${cmakeFile}`);
9090
}
9191
} else {
92-
exec(`patch -p0 < ${env.patchesFolder}/ZOOKEEPER-3078.patch`);
93-
9492
decompress(`${env.patchesFolder}/autoreconf.tar.gz`, `${env.patchesFolder}`, {
9593
plugins: [
9694
decompressTargz(),

0 commit comments

Comments
 (0)