summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo2021-03-04 11:56:16 +0800
committerLeo2021-03-04 11:56:16 +0800
commit90f90510fbd7b524ee841e96ff302fe84e66080b (patch)
tree5580234ad366bb05186730f0017cd8affb5322c3
parent26443f27469794d164f2ab92833efabd21892fd8 (diff)
downloadaur-90f90510fbd7b524ee841e96ff302fe84e66080b.tar.gz
Apply patch to correct log level of stderr from worker.
-rw-r--r--.SRCINFO8
-rw-r--r--00-worker-log-level-info.patch22
-rw-r--r--PKGBUILD24
3 files changed, 45 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f3f2dfb20948..63df6658aa08 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,21 @@
pkgbase = roadrunner
pkgdesc = High-performance PHP application server, load-balancer and process manager written in Golang
pkgver = 2.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://roadrunner.dev/
arch = x86_64
license = MIT
makedepends = go>=1.13
depends = php>=7.3
options = !buildflags
- source = https://github.com/spiral/roadrunner-binary/archive/v2.0.0.tar.gz
+ source = roadrunner-binary-2.0.0.tar.gz::https://github.com/spiral/roadrunner-binary/archive/v2.0.0.tar.gz
+ source = roadrunner-2.0.0.tar.gz::https://github.com/spiral/roadrunner/archive/v2.0.0.tar.gz
source = .rr.yaml.sample-full
source = .rr.yaml.sample-minimal
+ source = 00-worker-log-level-info.patch
sha256sums = 2faf5e5176aefcddf15c6ee66a73e182b51edf4aad50ff53155a83b786b5e216
+ sha256sums = c6dd45569d3d395927d58ffafca7165f417fdc297787e9135c2149344242918e
+ sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
diff --git a/00-worker-log-level-info.patch b/00-worker-log-level-info.patch
new file mode 100644
index 000000000000..c41c9c5cd37c
--- /dev/null
+++ b/00-worker-log-level-info.patch
@@ -0,0 +1,22 @@
+diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
+index 95e593b..476f85d 100644
+--- a/plugins/server/plugin.go
++++ b/plugins/server/plugin.go
+@@ -241,7 +241,7 @@ func (server *Plugin) collectEvents(event interface{}) {
+ server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"))
+ case events.EventWorkerStderr:
+ // TODO unsafe byte to string convert
+- server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"))
++ server.log.Info(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"))
+ }
+ }
+ }
+@@ -255,7 +255,7 @@ func (server *Plugin) collectWorkerLogs(event interface{}) {
+ server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"))
+ case events.EventWorkerStderr:
+ // TODO unsafe byte to string convert
+- server.log.Debug(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"))
++ server.log.Info(strings.TrimRight(string(we.Payload.([]byte)), " \n\t"))
+ }
+ }
+ }
diff --git a/PKGBUILD b/PKGBUILD
index 4ead1f7b09a8..a2693c755a3e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
# Maintainer: Leo <i@setuid0.dev>
pkgname=roadrunner
-_dirname=${pkgname}-binary
+binname=${pkgname}-binary
pkgver=2.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="High-performance PHP application server, load-balancer and process manager written in Golang"
arch=(x86_64)
url="https://roadrunner.dev/"
@@ -11,12 +11,16 @@ license=(MIT)
depends=("php>=7.3")
makedepends=("go>=1.13")
source=(
- "https://github.com/spiral/$_dirname/archive/v$pkgver.tar.gz"
+ "$binname-$pkgver.tar.gz::https://github.com/spiral/$binname/archive/v$pkgver.tar.gz"
+ "$pkgname-$pkgver.tar.gz::https://github.com/spiral/$pkgname/archive/v$pkgver.tar.gz"
".rr.yaml.sample-full"
".rr.yaml.sample-minimal"
+ "00-worker-log-level-info.patch"
)
sha256sums=(
"2faf5e5176aefcddf15c6ee66a73e182b51edf4aad50ff53155a83b786b5e216"
+ "c6dd45569d3d395927d58ffafca7165f417fdc297787e9135c2149344242918e"
+ SKIP
SKIP
SKIP
)
@@ -24,7 +28,12 @@ options=("!buildflags")
prepare() {
export GOPATH="$srcdir"/gopath
- cd "$_dirname-$pkgver"
+
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 < "$srcdir/00-worker-log-level-info.patch"
+
+ cd "$srcdir/$binname-$pkgver"
+ go mod edit -replace "github.com/spiral/roadrunner/v2=../roadrunner-$pkgver"
go mod download
}
@@ -34,7 +43,9 @@ build() {
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
- cd "$_dirname-$pkgver"
+
+ cd "$srcdir/$binname-$pkgver"
+
CGO_ENABLED=0 go build \
-trimpath \
-ldflags "-s\
@@ -45,8 +56,7 @@ build() {
}
package() {
- cd "$_dirname-$pkgver"
- install -Dt "$pkgdir/usr/bin/" -m755 rr
+ install -Dt "$pkgdir/usr/bin/" -m755 "$srcdir/$binname-$pkgver/rr"
install -Dt "$pkgdir/usr/share/$pkgname/" -m644 "$srcdir/.rr.yaml.sample-full"
install -Dt "$pkgdir/usr/share/$pkgname/" -m644 "$srcdir/.rr.yaml.sample-minimal"
}