Date: Wednesday, July 11, 2018 @ 11:41:10 Author: mtorromeo Revision: 357306
upgpkg: logstash 6.3.1-1 Updated to 6.3.1 Modified: logstash/trunk/PKGBUILD ----------+ PKGBUILD | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-07-11 11:40:49 UTC (rev 357305) +++ PKGBUILD 2018-07-11 11:41:10 UTC (rev 357306) @@ -3,7 +3,8 @@ # Maintainer: Massimiliano Torromeo <massimiliano.torro...@gmail.com> pkgname=logstash -pkgver=6.3.0 +pkgver=6.3.1 +_jrubyver=9.1.13.0 pkgrel=1 pkgdesc='Tool for managing events and logs' url='https://www.elastic.co/products/logstash/' @@ -10,23 +11,26 @@ arch=('x86_64') license=('Apache') depends=('java-runtime-headless>=8' 'ruby' 'ruby-bundler') -# TODO: switch to up-to-date rake when 6.x arrives -makedepends=('java-environment=8' 'gradle' 'git' 'jruby') +makedepends=('java-environment=8' 'gradle' 'git') backup=('etc/conf.d/logstash' 'etc/logstash/logstash.yml') source=(${pkgname}-${pkgver}.tar.gz::https://github.com/elastic/logstash/archive/v${pkgver}.tar.gz + http://jruby.org.s3.amazonaws.com/downloads/${_jrubyver}/jruby-bin-${_jrubyver}.tar.gz logstash.service logstash@.service logstash-sysuser.conf logstash-tmpfile.conf bundle.config) -sha256sums=('dd11286d579e6d70af7001e0c897b6571651b073863489af71d9e109410ad807' +noextract=(jruby-bin-${_jrubyver}.tar.gz) +sha256sums=('bb9112ec7fbe919b5d66d9fe72ae30fcc61f23019431ecdfe06c96be3b9332bc' + '9d156646623ac2f27174721035b52572a4b05690db7c1293295aa2c04aad3908' '2b8b29297202334c784fdd7f2eb8d7e776c24c783b3c9f8387b500ab0039335c' 'a01ea29d4f53d785f6eb926ebfe445e64ed5b3dab5d0418848589dd79502d876' '18a68a59ddb0ce19778e83b65e68dd568d65b7180bf45b4cf298fb332d69eb26' '346b630484f8a35b1a549e94e53e3e151527852a29c72cc6e529221215a7f533' 'fe05315345e4489458c3eecac43726800109c1e390e74a14584096f6c041fee1') -sha512sums=('4987e39b19f64021d139e754dcb60b9119cab9b411df2bc13bc55b6a662949bdc79f9ebfc3667ff7d814e40b82cdd987ef12c3835bac1c4c535a4906318fd554' +sha512sums=('da2bd827a4c5aaecf3dff65259b34b5915c7260826daa7d13ecf3c694bec84f431699d1bec0ec05e47a6c7cb3ab50521e99e568eae7fadb0f10166929c2ce578' + 'ef88f613ada2665d4f63b2e2f15594739de8ba501406e76de417821f44847b0e258524687b0ae0cf5b737520aa4dd9bb59d80a4b89a81408cda638f28bebbead' '817097565519dc7c5eac7521339947c74c6148683ca594356dd2ceb3274a1e94f8e7318ce310e0fe5789d7ab0d4c23404f814bef31036a11ddfec08d16814c69' 'ce2cef4a784845b00d7c867273555811450bc459669abb5be944bfbbb02708129983e45376a9b308d6db22b2c7b4a7a212827a4826f2a27bc7e143cebc9abfe0' 'd811dc3b18d0032b79b4669c9f6aefca49963897c309d83cbf87616c7b8cb5944c17c8072980bcd115d0fb57ef1624d98259ff1082d402d308c33e766ee89699' @@ -38,6 +42,24 @@ rm bin/*.bat sed -e 's|LS_SETTINGS_DIR=.*|LS_SETTINGS_DIR="/etc/logstash"|' -i config/startup.options sed -e '1i [ -f /etc/profile.d/jre.sh ] && . /etc/profile.d/jre.sh' -i bin/logstash.lib.sh + + # Skip downloadAndInstallJRuby task in the bootstrap process + sed /downloadAndInstallJRuby/d -i rakelib/vendor.rake + + # Use system gradle + sed 's;./gradlew;gradle;g' -i rakelib/*.rake + + # Do not download jruby or clean vendor + sed -e '/delete "${projectDir}\/vendor"/d' \ + -e 's;dependsOn: downloadJRuby, ;;' \ + -i build.gradle + + # Skip downloadAndInstallJRuby task in the bootstrap process + sed /downloadAndInstallJRuby/d -i rakelib/vendor.rake + + mkdir -p vendor/_/ + cd vendor/_/ + ln -s "$srcdir"/jruby-bin-${_jrubyver}.tar.gz } build() { @@ -44,15 +66,24 @@ cd ${pkgname}-${pkgver} export JAVA_HOME=/usr/lib/jvm/java-8-openjdk + msg2 "Install vendored JRuby..." + gradle downloadAndInstallJRuby + + export PATH="$PWD/vendor/jruby/bin:$PATH" + msg2 "Rake bootstrap..." - /opt/jruby/bin/rake bootstrap + rake bootstrap msg2 "Rake plugin:install-default..." - /opt/jruby/bin/rake plugin:install-default + rake plugin:install-default rm -r vendor/_ build ci logstash-core/{build,src,spec} qa pkg spec rakelib tools vendor/bundle/jruby/*/cache .gradle - cd vendor/jruby/lib/jni - rm -r *Darwin *Windows *SunOS *FreeBSD arm-* ppc64* + + cd vendor/jruby/lib + mv jni jni-temp + mkdir jni + mv jni-temp/x86_64-Linux jni/ + rm -rf jni-temp } package() { @@ -63,6 +94,7 @@ mv config "${pkgdir}/etc/logstash" chmod 750 "${pkgdir}/etc/logstash" cp -a . "${pkgdir}/usr/share/logstash" + rm "${pkgdir}/usr/share/logstash/versions.yml" install -Dm 644 "${srcdir}"/{logstash.service,logstash@.service} -t "${pkgdir}/usr/lib/systemd/system" install -Dm 644 "${srcdir}/logstash-sysuser.conf" "${pkgdir}/usr/lib/sysusers.d/logstash.conf"