summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD10
-rw-r--r--graalvm-rebuild-libpolyglot.hook11
-rwxr-xr-xtest.sh2
4 files changed, 22 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4deb9309a900..e38cb88ebb47 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = jdk8-graalvm-bin
pkgdesc = Universal virtual machine for running applications written in a variety of languages (JVM-based, LLVM-based, or other), Java 8 version
pkgver = 21.2.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.graalvm.org/
install = jdk8-graalvm-bin.install
arch = x86_64
@@ -12,6 +12,8 @@ pkgbase = jdk8-graalvm-bin
provides = java-runtime=8
provides = java-environment=8
source = https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.2.0/graalvm-ce-java8-linux-amd64-21.2.0.tar.gz
+ source = graalvm-rebuild-libpolyglot.hook
sha256sums = 0ea16ff2fe178800195e2918ee7ceee352601d4161a17eac67979febaaecfe05
+ sha256sums = SKIP
pkgname = jdk8-graalvm-bin
diff --git a/PKGBUILD b/PKGBUILD
index 4912879470de..abc54a07e127 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
java_=8
pkgname="jdk${java_}-graalvm-bin"
pkgver=21.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="Universal virtual machine for running applications written in a variety of languages (JVM-based, LLVM-based, or other), Java ${java_} version"
arch=('x86_64')
url='https://www.graalvm.org/'
@@ -15,12 +15,16 @@ optdepends=("graal-nodejs-jdk${java_}-bin: Node.js component (used to be bundled
provides=("java-runtime=${java_}"
"java-environment=${java_}")
install="$pkgname.install"
-source=("https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${pkgver}/graalvm-ce-java${java_}-linux-amd64-${pkgver}.tar.gz")
-sha256sums=('0ea16ff2fe178800195e2918ee7ceee352601d4161a17eac67979febaaecfe05')
+source=("https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${pkgver}/graalvm-ce-java${java_}-linux-amd64-${pkgver}.tar.gz"
+ 'graalvm-rebuild-libpolyglot.hook')
+sha256sums=('0ea16ff2fe178800195e2918ee7ceee352601d4161a17eac67979febaaecfe05'
+ 'SKIP')
package() {
cd "graalvm-ce-java${java_}-${pkgver}"
mkdir -p "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/"
cp -a -t "$pkgdir/usr/lib/jvm/java-${java_}-graalvm/" *
install -DTm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ sed "s/JAVA/${java_}/g" < "../graalvm-rebuild-libpolyglot.hook" > "graalvm-jdk${java_}-rebuild-libpolyglot.hook"
+ install -DTm644 "graalvm-jdk${java_}-rebuild-libpolyglot.hook" "$pkgdir/usr/share/libalpm/hooks/graalvm-jdk${java_}-rebuild-libpolyglot.hook"
}
diff --git a/graalvm-rebuild-libpolyglot.hook b/graalvm-rebuild-libpolyglot.hook
new file mode 100644
index 000000000000..9f35151d15ab
--- /dev/null
+++ b/graalvm-rebuild-libpolyglot.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/jvm/java-JAVA-graalvm/*
+
+[Action]
+Description = Suggest rebuilding GraalVM libpolyglot component
+When = PostTransaction
+Exec = /usr/bin/printf '%s\n' 'Changes to GraalVM detected.' 'You may need to rebuild libpolyglot (and possibly other components) with the following command:' ' /usr/lib/jvm/java-JAVA-graalvm/bin/gu rebuild libpolyglot' "Note that this will take a while (which is why it's not done automatically):" 'the package maintainer has experienced CPU times upwards of _four hours_.' '(However, it parallelizes fairly well, so wall-clock time will depend on your CPU.)' "If you don't rebuild libpolyglot, then --polyglot without --jvm probably won't work right."
diff --git a/test.sh b/test.sh
index 0b6209c3adcf..08bddea83689 100755
--- a/test.sh
+++ b/test.sh
@@ -15,7 +15,7 @@ PATH=/usr/lib/jvm/java-${java_}-graalvm/bin/:$(systemd-path search-binaries-defa
printf '%s\n' 'Testing Node with polyglot R, Python, Ruby, JavaScript, and Java...'
-jsThree=$(node --polyglot << 'EOF'
+jsThree=$(node --polyglot --jvm << 'EOF'
rPlus = Polyglot.eval('R', '(function(s1, s2) s1 + s2)');
pythonPlus = Polyglot.eval('python', 'lambda s1, s2: s1 + s2');
rubyOne = Polyglot.eval('ruby', '1')