From 321a50da6a64416ef3fb258190bed4d7868d7d20 Mon Sep 17 00:00:00 2001 From: nyyu Date: Sun, 2 Jan 2022 10:37:09 +0100 Subject: [PATCH] nexus: securize, futur proof --- nexus-oss/PKGBUILD | 26 +++++++------------- nexus-oss/nexus-oss | 8 +++++-- nexus-oss/nexus-oss.install | 45 ----------------------------------- nexus-oss/nexus-oss.service | 35 +++++++++++++++++++++++---- nexus-oss/nexus-oss.sysusers | 1 - nexus-oss/nexus-oss.vmoptions | 10 ++------ 6 files changed, 48 insertions(+), 77 deletions(-) delete mode 100644 nexus-oss/nexus-oss.install diff --git a/nexus-oss/PKGBUILD b/nexus-oss/PKGBUILD index ec9bf41..ee09ad0 100644 --- a/nexus-oss/PKGBUILD +++ b/nexus-oss/PKGBUILD @@ -1,22 +1,21 @@ -_version=3.37.0 -_patch=01 +_version=3.37.3 +_patch=02 pkgname=nexus-oss pkgver=${_version}.${_patch} -pkgrel=1 +pkgrel=2 pkgdesc='Nexus 3 Repository OSS' arch=('any') url='http://nexus.sonatype.org' license=("custom:$pkgname") depends=('java-runtime=11') replaces=('nexus3') -provides=($pkgname) +provides=('nexus3') backup=("var/lib/$pkgname/etc/nexus.properties" "usr/lib/$pkgname/bin/nexus.vmoptions" ) source=("https://download.sonatype.com/nexus/3/nexus-$_version-$_patch-unix.tar.gz" "$pkgname" - "$pkgname.install" "$pkgname.properties" "$pkgname.service" "$pkgname.sysusers" @@ -24,26 +23,19 @@ source=("https://download.sonatype.com/nexus/3/nexus-$_version-$_patch-unix.tar. "$pkgname.vmoptions" "pref_jre.cfg" ) -sha256sums=('3a928576502b53cd77eaa4f41564eb848d13707c106d45540116fc54dcee519b' - '3d2ebc2a796dbdc7e7e3b97e4c3272292169c898776e111f503f0517e434caff' - 'f03a4a2a454ab15bbe7b6d479ec4b6a86055a4ffb77704dc44fe11a19382278b' +sha256sums=('c1db431908c5a76b44015c555d6ef4517abf0a86844faffee0f5d6c62359312d' + 'b33fbb8769ac73fe339ea2875a240f308fbd584519f533fba25cf6136eac2dd0' 'dcdef5614db12f38b3da0b9de1b52fb7fa402af6621a825981c6168a34a6ad9b' - '3670748854d3f05623c9a8826605c3e2a97c7b3955104e74b5eed00ed17299c1' - '77d699b5ccf6387fa2f69df2cd71cdb75b4ffbf46a10110dd6c0e2802783dbef' + 'bb6d16579712ebb15df948ac395b9095955c12fec9160dd871254836a82c4062' + '29567e274ffacb06e03580d94685b04aeb7197cd84a14108a347ad5307931be6' '939994095f0c5de005a1e36a295bea791a70dadfa32af23b400cbd87be57af9c' - '98e1405dc1c79373975463b7780ccb5eb89ba388988d35208ba285a4cf05be2a' + '176c02ba4299ad818eed75cdaeb42a2d9ffa7332fc74ff30b7c37965e7095df4' 'd713e29b72522fe4395b6959d27e2a98a24961393e08df7a6b022b1fd77c650d') -install=$pkgname.install - package() { install -dm755 $pkgdir/usr/lib install -dm750 $pkgdir/var/lib/$pkgname - sed -i '448iadd_class_path "$app_home/lib/boot/activation-1.1.jar"' $srcdir/nexus-$_version-$_patch/bin/nexus - sed -i '459iadd_class_path "$app_home/lib/endorsed/org.apache.karaf.specs.locator-4.2.9.jar"' $srcdir/nexus-$_version-$_patch/bin/nexus - sed -i '146,166d' $srcdir/nexus-$_version-$_patch/bin/nexus - cp -a $srcdir/nexus-$_version-$_patch $pkgdir/usr/lib/$pkgname cp -a $srcdir/sonatype-work/nexus3/orient $pkgdir/var/lib/$pkgname diff --git a/nexus-oss/nexus-oss b/nexus-oss/nexus-oss index 12bfa60..0fc80b7 100644 --- a/nexus-oss/nexus-oss +++ b/nexus-oss/nexus-oss @@ -1,4 +1,8 @@ -#!/bin/bash +#!/bin/sh -exec /usr/lib/nexus-oss/bin/nexus "$@" +java=$(