summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGoliathLabs2020-04-25 21:44:50 +0200
committerGoliathLabs2020-04-25 21:44:50 +0200
commitc98cae4d98f8ec4239af9ae439d7c1ea640a9295 (patch)
tree5f07cc7275abf2d6fd39c3438813fb72199d5d99
parentb450c58ec5a5e84b4dcb52517abc9ec3ccae1bd7 (diff)
downloadaur-c98cae4d98f8ec4239af9ae439d7c1ea640a9295.tar.gz
Updated: 7.6.2
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD50
-rw-r--r--build.patch60
3 files changed, 91 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 280ebebaa97..c3c28be0b15 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = logstash-xpack
pkgdesc = Tool for managing events and logs
- pkgver = 7.5.1
- pkgrel = 2
- url = https://www.elastic.co/products/logstash/
+ pkgver = 7.6.2
+ pkgrel = 1
+ url = https://www.elastic.co/logstash
arch = x86_64
license = Apache
makedepends = java-environment<11
@@ -14,18 +14,23 @@ pkgbase = logstash-xpack
depends = awk
provides = logstash
conflicts = logstash
+ noextract = jruby-dist-9.2.7.0-bin.tar.gz
backup = etc/conf.d/logstash
backup = etc/logstash/jvm.options
backup = etc/logstash/log4j2.properties
backup = etc/logstash/logstash.yml
backup = etc/logstash/pipelines.yml
- source = https://artifacts.elastic.co/downloads/logstash/logstash-7.5.1.tar.gz
+ source = https://github.com/elastic/logstash/archive/v7.6.2/logstash-7.6.2.tar.gz
+ source = https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.7.0/jruby-dist-9.2.7.0-bin.tar.gz
+ source = build.patch
source = logstash.service
source = logstash@.service
source = logstash-sysuser.conf
source = logstash-tmpfile.conf
source = bundle.config
- sha256sums = 72f9454c82e8ddd509b5e8d41de0b5089c8722041181963e70de60fd38558606
+ sha256sums = 3e0c920c4d2a3ea0ac5a5990cd163ef232d363b622012a545a640b2b7bede1e8
+ sha256sums = da7c1a5ce90015c0bafd4bca0352294e08fe1c9ec049ac51e82fe57ed50e1348
+ sha256sums = 9ae56b463b465f16363f60670c7da4e84a9bf03c17324c4364c089d7a480cb4b
sha256sums = 2b8b29297202334c784fdd7f2eb8d7e776c24c783b3c9f8387b500ab0039335c
sha256sums = a01ea29d4f53d785f6eb926ebfe445e64ed5b3dab5d0418848589dd79502d876
sha256sums = 18a68a59ddb0ce19778e83b65e68dd568d65b7180bf45b4cf298fb332d69eb26
diff --git a/PKGBUILD b/PKGBUILD
index a7ac117f68e..744855a8c49 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,15 @@
-# Maintainer: Eric Liu <eric@hnws.me>
+# Maintainer: Felix Golatofski <contact@xdfr.de>
+# Contributor: Eric Liu <eric@hnws.me>
# Official repo maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Official repo maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=logstash-xpack
_pkgname=logstash
-pkgver=7.5.1
-pkgrel=2
+pkgver=7.6.2
+_jrubyver=9.2.7.0
+pkgrel=1
pkgdesc='Tool for managing events and logs'
-url='https://www.elastic.co/products/logstash/'
+url='https://www.elastic.co/logstash'
arch=('x86_64')
license=('Apache')
depends=('java-runtime-headless>=8' 'ruby' 'ruby-bundler' 'coreutils' 'awk')
@@ -19,13 +21,19 @@ backup=('etc/conf.d/logstash'
'etc/logstash/log4j2.properties'
'etc/logstash/logstash.yml'
'etc/logstash/pipelines.yml')
-source=(https://artifacts.elastic.co/downloads/logstash/$_pkgname-$pkgver.tar.gz
+_jrubydist=jruby-dist-${_jrubyver}-bin.tar.gz
+source=(https://github.com/elastic/logstash/archive/v${pkgver}/${_pkgname}-${pkgver}.tar.gz
+ https://repo1.maven.org/maven2/org/jruby/jruby-dist/${_jrubyver}/${_jrubydist}
+ build.patch
logstash.service
logstash@.service
logstash-sysuser.conf
logstash-tmpfile.conf
bundle.config)
-sha256sums=('72f9454c82e8ddd509b5e8d41de0b5089c8722041181963e70de60fd38558606'
+noextract=(${_jrubydist})
+sha256sums=('3e0c920c4d2a3ea0ac5a5990cd163ef232d363b622012a545a640b2b7bede1e8'
+ 'da7c1a5ce90015c0bafd4bca0352294e08fe1c9ec049ac51e82fe57ed50e1348'
+ '9ae56b463b465f16363f60670c7da4e84a9bf03c17324c4364c089d7a480cb4b'
'2b8b29297202334c784fdd7f2eb8d7e776c24c783b3c9f8387b500ab0039335c'
'a01ea29d4f53d785f6eb926ebfe445e64ed5b3dab5d0418848589dd79502d876'
'18a68a59ddb0ce19778e83b65e68dd568d65b7180bf45b4cf298fb332d69eb26'
@@ -39,7 +47,37 @@ prepare() {
sed -e '1i [ -f /etc/profile.d/jre.sh ] && . /etc/profile.d/jre.sh' -i bin/logstash.lib.sh
# remove deprecated JVM options
+ sed 's|"-XX:+UseParNewGC", ||g' -i logstash-core/benchmarks/build.gradle
sed 's|-XX:+UseParNewGC||g' -i config/jvm.options
+
+ # patch -p1 -i "$srcdir"/build.patch
+
+ # Use system gradle (currently not working)
+ # sed 's;./gradlew;gradle;g' -i rakelib/*.rake
+
+ # Skip downloadAndInstallJRuby task in the bootstrap process
+ sed /downloadAndInstallJRuby/d -i rakelib/vendor.rake
+
+ mkdir -p vendor/_/
+ cd vendor/_/
+ ln -s "$srcdir"/${_jrubydist}
+}
+
+build() {
+ cd $_pkgname-${pkgver}
+ export PATH="/usr/lib/jvm/java-10-openjdk/bin:$PWD/vendor/jruby/bin:$PATH"
+
+ # gradle -x :logstash-core:javadoc bootstrap (system gradle currently not working)
+ RELEASE=1 OSS=1 ./gradlew -x :logstash-core:javadoc installDefaultGems
+
+ rm -r build ci logstash-core/{build,src,spec} qa pkg spec rakelib tools .gradle \
+ vendor/_ vendor/bundle/jruby/*/cache vendor/jruby/lib/ruby/gems/shared/cache
+
+ cd vendor/jruby/lib
+ mv jni jni-temp
+ mkdir jni
+ mv jni-temp/x86_64-Linux jni/
+ rm -rf jni-temp
}
package() {
diff --git a/build.patch b/build.patch
index b4ab046f16d..4f897627ad1 100644
--- a/build.patch
+++ b/build.patch
@@ -1,8 +1,8 @@
diff --git a/build.gradle b/build.gradle
-index 3fda82e..d926183 100644
+index 5b2275e..67312d6 100644
--- a/build.gradle
+++ b/build.gradle
-@@ -121,7 +121,6 @@ if (versionMap["jruby-runtime-override"]) {
+@@ -111,7 +111,6 @@ def isReleaseBuild = System.getenv('RELEASE') == "1" || versionQualifier
clean {
delete "${projectDir}/Gemfile"
delete "${projectDir}/Gemfile.lock"
@@ -10,7 +10,20 @@ index 3fda82e..d926183 100644
delete "${projectDir}/.bundle"
delete "${projectDir}/qa/integration/Gemfile.lock"
delete "${projectDir}/qa/integration/.bundle"
-@@ -158,7 +157,7 @@ task downloadJRuby(type: Download) {
+@@ -346,7 +345,7 @@ task downloadEs(type: Download) {
+ // in the normal PR type builds it is plain '7.0.0'
+ // in the build invoked by the release manager it is '7.0.0-alpha1' etc.
+ // the artifacts-api will return JSON like this: `{"versions":["5.6.13-SNAPSHOT","6.4.3-SNAPSHOT","6.5.0-SNAPSHOT","6.6.0-SNAPSHOT","7.0.0-alpha1-SNAPSHOT"]}`
+-
++
+ String qualifiedVersion = dlVersions['versions'].grep(isReleaseBuild ? ~/^${version}$/ : ~/^${version}-SNAPSHOT/)[0]
+
+ if (qualifiedVersion == null) {
+diff --git a/rubyUtils.gradle b/rubyUtils.gradle
+index 6f0eec4..08a35f6 100644
+--- a/rubyUtils.gradle
++++ b/rubyUtils.gradle
+@@ -190,7 +190,7 @@ task downloadJRuby(type: Download) {
downloadJRuby.onlyIf { customJRubyDir == "" }
@@ -19,38 +32,39 @@ index 3fda82e..d926183 100644
description "Verify the SHA1 of the download JRuby artifact"
inputs.file(jrubyTarPath)
outputs.file(jrubyTarPath)
-@@ -169,35 +168,7 @@ task verifyFile(dependsOn: downloadJRuby, type: Verify) {
-
+@@ -202,36 +202,7 @@ task verifyFile(dependsOn: downloadJRuby, type: Verify) {
verifyFile.onlyIf { customJRubyDir == "" }
+ verifyFile.onlyIf { doChecksum }
-task buildCustomJRuby(type: Exec) {
-- description "Build tar.gz and .jar artifacts from JRuby source directory"
-- workingDir customJRubyDir
-- commandLine './mvnw', 'clean', 'install', '-Pdist', '-Pcomplete'
-- standardOutput = new ByteArrayOutputStream()
-- errorOutput = new ByteArrayOutputStream()
-- ext.output = {
-- standardOutput.toString() + errorOutput.toString()
-- }
+- description "Build tar.gz and .jar artifacts from JRuby source directory"
+- workingDir (customJRubyDir == "" ? "./" : customJRubyDir)
+- commandLine './mvnw', 'clean', 'install', '-Pdist', '-Pcomplete'
+- standardOutput = new ByteArrayOutputStream()
+- errorOutput = new ByteArrayOutputStream()
+- ext.output = {
+- standardOutput.toString() + errorOutput.toString()
+- }
-}
-
-buildCustomJRuby.onlyIf { customJRubyDir != "" }
-
-task installCustomJRuby(dependsOn: buildCustomJRuby, type: Copy) {
-- description "Install custom built JRuby in the vendor directory"
-- inputs.file(customJRubyTar)
-- outputs.dir("${projectDir}/vendor/jruby")
-- from tarTree(customJRubyTar == "" ? jrubyTarPath : customJRubyTar)
-- eachFile { f ->
-- f.path = f.path.replaceFirst("^jruby-${customJRubyVersion}", '')
-- }
-- exclude "**/stdlib/rdoc/**"
-- includeEmptyDirs = false
-- into "${projectDir}/vendor/jruby"
+- description "Install custom built JRuby in the vendor directory"
+- inputs.file(customJRubyTar)
+- outputs.dir("${projectDir}/vendor/jruby")
+- from tarTree(customJRubyTar == "" ? jrubyTarPath : customJRubyTar)
+- eachFile { f ->
+- f.path = f.path.replaceFirst("^jruby-${customJRubyVersion}", '')
+- }
+- exclude "**/stdlib/rdoc/**"
+- includeEmptyDirs = false
+- into "${projectDir}/vendor/jruby"
-}
-
-installCustomJRuby.onlyIf { customJRubyDir != "" }
-
+-
-task downloadAndInstallJRuby(dependsOn: [verifyFile, installCustomJRuby], type: Copy) {
+task downloadAndInstallJRuby(dependsOn: [verifyFile], type: Copy) {
description "Install JRuby in the vendor directory"