Skip to content

Commit 1c30fbd

Browse files
committed
chore(clouseau): bump to 3.0.0
Chase the release of the brand new 3.0.0 version of Clouseau aka. ZIOSE (ZIO "Search Engine") and make it the default onwards. While this is a drop-in replacement for 2.x, note that it is based on completely different foundation, libraries and build system, as well as Java 21 and G1 as the default garbage collector -- update the `dev/run` script to make it work with both 2.x and 3.x in response to that. This warrants that Clouseau 2.x will keep working from both binary and source, albeit it has now been deprecated.
1 parent 8de56e7 commit 1c30fbd

5 files changed

Lines changed: 233 additions & 111 deletions

File tree

README-DEV.rst

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -278,31 +278,32 @@ suites, and let Clouseau automatically manage them.
278278
Although the ``./configure`` and the ``./dev/run`` scripts try to take
279279
care of the details of the Clouseau deployment, it is still the
280280
responsibility of the user to provide a suitable Java environment for
281-
running. Clouseau can run with JRE 1.7 and 1.8 only. Also, when
282-
Nouveau is in use, which uses a more recent Java environment, the old
283-
JDK has to be installed separately and the ``CLOUSEAU_JAVA_HOME``
284-
environment variable has to be set to point its location.
281+
running. Depending on the version, Clouseau can run with either JRE
282+
1.7 and 1.8 only, when 2.x is selected, or JRE 21 for 3.x. Also, when
283+
Nouveau is installed, which might require a different Java
284+
environment, the one specific for Clouseau has to be installed
285+
separately and the ``CLOUSEAU_JAVA_HOME`` environment variable has to
286+
be set to point its location.
285287

286288
Fortunately, the ```asdf`` tool <https://asdf-vm.com/>` provides a
287-
convenient way to install old versions of JDK through its ```java``
288-
plugin <https://github.com/halcyon/asdf-java>`::
289+
convenient way to install different versions of JDK through its
290+
```java`` plugin <https://github.com/halcyon/asdf-java>`::
289291

290292
asdf plugin add java
291293

292-
Then use ``asdf`` to install it::
294+
Then use ``asdf`` to install it, for example::
293295

294-
asdf install java zulu-jre-8.74.0.17
296+
asdf install java openjdk-21
295297

296298
Finally, use ``asdf`` to set the ``CLOUSEAU_JAVA_HOME`` environment
297299
variable::
298300

299-
export CLOUSEAU_JAVA_HOME=$(asdf where java zulu-jre-8.74.0.17)
301+
export CLOUSEAU_JAVA_HOME=$(asdf where java openjdk-21)
300302

301-
If the use of ``asdf`` is not an option, `the Zulu site
302-
<https://cdn.azul.com/zulu/bin/>` could be used directly to get the
303-
distribution package for the appropriate JRE version. But this is
304-
just one of the possibilities to access installers for old Java
305-
environments.
303+
If the use of ``asdf`` is not an option, any standard Java installer
304+
would do it, and the Zulu site <https://cdn.azul.com/zulu/bin/>` could
305+
be used directly to get the distribution package for the older JRE and
306+
JDK versions, for example.
306307

307308
Once both Clouseau and the corresponding Java environment are set,
308309
they are not put in use automatically. In order to do so, the
@@ -333,15 +334,16 @@ respective test targets, e.g. ``mango-test``::
333334
This can even be done if there was no local Clouseau deployment
334335
configured previously. Mind that this will require building Clouseau
335336
from source, which causes the nodes start up somewhat slower. It also
336-
requires JDK 1.7 and Apache Maven 3.8 to be present, that is why it is
337-
important the set the ``CLOUSEAU_JAVA_HOME`` and the
338-
``CLOUSEAU_M2_HOME`` environment variables accordingly, for instance::
339-
340-
asdf install java zulu-7.56.0.11
341-
asdf plugin add maven
342-
asdf install maven 3.8.8
343-
export CLOUSEAU_JAVA_HOME=$(asdf where java zulu-7.56.0.11)
344-
export CLOUSEAU_M2_HOME=$(asdf where maven 3.8.8)
337+
requires JDK 11 (or later) and SBT 1.10 (or later) to be present.
338+
That is why it is important the set the ``CLOUSEAU_JAVA_HOME`` and the
339+
``CLOUSEAU_SBT_HOME`` environment variables accordingly, for
340+
instance::
341+
342+
asdf install java openjdk-21
343+
asdf plugin add sbt
344+
asdf install sbt 1.11.7
345+
export CLOUSEAU_JAVA_HOME=$(asdf where java openjdk-21)
346+
export CLOUSEAU_SBT_HOME=$(asdf where sbt 1.11.7)
345347

346348
Static Code Analysis
347349
~~~~~~~~~~~~~~~~~~~~

build-aux/Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ meta = [
173173
name: 'FreeBSD x86_64',
174174
spidermonkey_vsn: '91',
175175
with_clouseau: true,
176-
clouseau_java_home: '/usr/local/openjdk8-jre',
176+
clouseau_java_home: '/usr/local/openjdk21',
177177
quickjs_test262: false,
178178
gnu_make: 'gmake'
179179
],
@@ -184,7 +184,7 @@ meta = [
184184
name: 'FreeBSD ARM64 QuickJS',
185185
disable_spidermonkey: true,
186186
with_clouseau: true,
187-
clouseau_java_home: '/usr/local/openjdk8-jre',
187+
clouseau_java_home: '/usr/local/openjdk21',
188188
quickjs_test262: false,
189189
gnu_make: 'gmake'
190190
],

configure

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ WITH_FAUXTON="true"
3030
WITH_DOCS="true"
3131
WITH_NOUVEAU="false"
3232
WITH_CLOUSEAU="false"
33+
WITH_ZIOSE="true"
3334
ERLANG_MD5="false"
3435
SKIP_DEPS="false"
3536
WITH_SPIDERMONKEY="true"
@@ -43,7 +44,7 @@ JS_ENGINE=${JS_ENGINE:-"spidermonkey"}
4344
SM_VSN=${SM_VSN:-"91"}
4445
CLOUSEAU_MTH=${CLOUSEAU_MTH:-"dist"}
4546
CLOUSEAU_URI=${CLOUSEAU_URI:-"https://github.com/cloudant-labs/clouseau/releases/download/%s/clouseau-%s-dist.zip"}
46-
CLOUSEAU_VSN=${CLOUSEAU_VSN:-"2.25.0"}
47+
CLOUSEAU_VSN=${CLOUSEAU_VSN:-"3.0.0"}
4748
CLOUSEAU_DIR="$(pwd)"/clouseau
4849
ARCH="$(uname -m)"
4950
MULTIARCH_NAME="$(command -v dpkg-architecture > /dev/null && dpkg-architecture -q DEB_HOST_MULTIARCH || true)"
@@ -314,6 +315,10 @@ parse_opts() {
314315

315316
parse_opts $@
316317

318+
if [ "$(echo "$CLOUSEAU_VSN" | cut -d '.' -f 1)" -lt "3" ]; then
319+
WITH_ZIOSE="false"
320+
fi
321+
317322
if [ "${WITH_SPIDERMONKEY}" = "true" ] && [ "${ARCH}" = "aarch64" ] && [ "${SM_VSN}" = "60" ]; then
318323
echo "ERROR: SpiderMonkey 60 is known broken on ARM 64 (aarch64). Use another version instead."
319324
exit 1
@@ -488,14 +493,17 @@ install_local_clouseau() {
488493
case "$CLOUSEAU_MTH" in
489494
dist)
490495
_DIST_URL=$(printf "$CLOUSEAU_URI" "$CLOUSEAU_VSN" "$CLOUSEAU_VSN")
491-
_MAVEN_BASE_URI=https://repo1.maven.org/maven2
492-
_LOGBACK_DIST_URL="$_MAVEN_BASE_URI"/ch/qos/logback
493496

494-
: "${LOGBACK_VERSION:=1.2.13}"
495-
_LOGBACK_CORE_JAR=logback-core-"$LOGBACK_VERSION".jar
496-
_LOGBACK_CORE_URL="$_LOGBACK_DIST_URL"/logback-core/"$LOGBACK_VERSION"/"$_LOGBACK_CORE_JAR"
497-
_LOGBACK_CLASSIC_JAR=logback-classic-"$LOGBACK_VERSION".jar
498-
_LOGBACK_CLASSIC_URL="$_LOGBACK_DIST_URL"/logback-classic/"$LOGBACK_VERSION"/"$_LOGBACK_CLASSIC_JAR"
497+
if [ "${WITH_ZIOSE}" = "false" ]; then
498+
_MAVEN_BASE_URI=https://repo1.maven.org/maven2
499+
_LOGBACK_DIST_URL="$_MAVEN_BASE_URI"/ch/qos/logback
500+
501+
: "${LOGBACK_VERSION:=1.2.13}"
502+
_LOGBACK_CORE_JAR=logback-core-"$LOGBACK_VERSION".jar
503+
_LOGBACK_CORE_URL="$_LOGBACK_DIST_URL"/logback-core/"$LOGBACK_VERSION"/"$_LOGBACK_CORE_JAR"
504+
_LOGBACK_CLASSIC_JAR=logback-classic-"$LOGBACK_VERSION".jar
505+
_LOGBACK_CLASSIC_URL="$_LOGBACK_DIST_URL"/logback-classic/"$LOGBACK_VERSION"/"$_LOGBACK_CLASSIC_JAR"
506+
fi
499507

500508
check_local_clouseau_dir "$CLOUSEAU_DIR"
501509
mkdir -p "$CLOUSEAU_DIR"
@@ -511,10 +519,16 @@ install_local_clouseau() {
511519

512520
rm clouseau.zip
513521

514-
echo "Fetching Logback $LOGBACK_VERSION from $_LOGBACK_DIST_URL..."
522+
if [ "${WITH_ZIOSE}" = "false" ]; then
523+
echo "Fetching Logback $LOGBACK_VERSION from $_LOGBACK_DIST_URL..."
515524

516-
fetch_file "$CLOUSEAU_DIR"/"$_LOGBACK_CORE_JAR" "$_LOGBACK_CORE_URL"
517-
fetch_file "$CLOUSEAU_DIR"/"$_LOGBACK_CLASSIC_JAR" "$_LOGBACK_CLASSIC_URL"
525+
fetch_file "$CLOUSEAU_DIR"/"$_LOGBACK_CORE_JAR" "$_LOGBACK_CORE_URL"
526+
fetch_file "$CLOUSEAU_DIR"/"$_LOGBACK_CLASSIC_JAR" "$_LOGBACK_CLASSIC_URL"
527+
fi
528+
529+
if [ "${WITH_ZIOSE}" = "true" ]; then
530+
touch "$CLOUSEAU_DIR"/.ziose
531+
fi
518532
;;
519533

520534
git)

configure.ps1

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Param(
6666
[ValidateNotNullOrEmpty()]
6767
[string]$ClouseauMethod = "dist", # method for Clouseau to deploy: git or dist (default dist)
6868
[ValidateNotNullOrEmpty()]
69-
[string]$ClouseauVersion = "2.25.0", # select the version of Clouseau to use (default 2.25.0)
69+
[string]$ClouseauVersion = "3.0.0", # select the version of Clouseau to use (default 3.0.0)
7070
[ValidateNotNullOrEmpty()]
7171
[string]$ClouseauUri = "https://github.com/cloudant-labs/clouseau/releases/download/{0}/clouseau-{0}-dist.zip", # location for retrieving Clouseau (default https://github.com/cloudant-labs/clouseau/releases/download/2.25.0/clouseau-2.25.0-dist.zip)
7272
[ValidateNotNullOrEmpty()]
@@ -150,6 +150,7 @@ $BuildDocs = (-not $DisableDocs).ToString().ToLower()
150150
$WithProper = (-not $DisableProper).ToString().ToLower()
151151
$ErlangMD5 = ($EnableErlangMD5).ToString().ToLower()
152152
$WithSpiderMonkey = (-not $DisableSpiderMonkey).ToString().ToLower()
153+
$WithZIOSE = [int]($ClouseauVersion.Split('.')[0]) -ge 3
153154

154155
if ($JSEngine -eq "quickjs") {
155156
$WithSpiderMonkey = "false"
@@ -333,12 +334,15 @@ if ($WithClouseau)
333334

334335
New-Item -Path $ClouseauDir -ItemType Directory | Out-Null
335336

336-
$LogbackVersion = "1.2.13"
337337
$ClouseauDistUrl = $ClouseauUri -f $ClouseauVersion
338-
$LogbackCoreJar = "logback-core-$LogbackVersion.jar"
339-
$LogbackCoreJarUrl = "https://repo1.maven.org/maven2/ch/qos/logback/logback-core/$LogbackVersion/$LogbackCoreJar"
340-
$LogbackClassicJar = "logback-classic-$LogbackVersion.jar"
341-
$LogbackClassicJarUrl = "https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/$LogbackVersion/$LogbackClassicJar"
338+
339+
If (-not $WithZIOSE) {
340+
$LogbackVersion = "1.2.13"
341+
$LogbackCoreJar = "logback-core-$LogbackVersion.jar"
342+
$LogbackCoreJarUrl = "https://repo1.maven.org/maven2/ch/qos/logback/logback-core/$LogbackVersion/$LogbackCoreJar"
343+
$LogbackClassicJar = "logback-classic-$LogbackVersion.jar"
344+
$LogbackClassicJarUrl = "https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/$LogbackVersion/$LogbackClassicJar"
345+
}
342346

343347
Set-Variable ProgressPreference SilentlyContinue
344348
Invoke-WebRequest -MaximumRedirection 1 -OutFile clouseau.zip $ClouseauDistUrl
@@ -356,16 +360,22 @@ if ($WithClouseau)
356360
Remove-Item "$ClouseauDir\clouseau-$ClouseauVersion"
357361
Remove-Item clouseau.zip
358362

359-
Invoke-WebRequest -MaximumRedirection 1 -OutFile "$ClouseauDir\$LogbackCoreJar" $LogbackCoreJarUrl
360-
If ($LASTEXITCODE -ne 0) {
361-
Write-Output "ERROR: $LogbackCoreJarUrl could not be downloaded."
362-
exit 1
363+
If (-not $WithZIOSE) {
364+
Invoke-WebRequest -MaximumRedirection 1 -OutFile "$ClouseauDir\$LogbackCoreJar" $LogbackCoreJarUrl
365+
If ($LASTEXITCODE -ne 0) {
366+
Write-Output "ERROR: $LogbackCoreJarUrl could not be downloaded."
367+
exit 1
368+
}
369+
370+
Invoke-WebRequest -MaximumRedirection 1 -OutFile "$ClouseauDir\$LogbackClassicJar" $LogbackClassicJarUrl
371+
If ($LASTEXITCODE -ne 0) {
372+
Write-Output "ERROR: $LogbackClassicJarUrl could not be downloaded."
373+
exit 1
374+
}
363375
}
364376

365-
Invoke-WebRequest -MaximumRedirection 1 -OutFile "$ClouseauDir\$LogbackClassicJar" $LogbackClassicJarUrl
366-
If ($LASTEXITCODE -ne 0) {
367-
Write-Output "ERROR: $LogbackClassicJarUrl could not be downloaded."
368-
exit 1
377+
If ($WithZIOSE) {
378+
New-Item -ItemType File -Path "$ClouseauDir\.ziose"
369379
}
370380
}
371381
elseif ($ClouseauMethod -eq "git") {

0 commit comments

Comments
 (0)