diff options
author | Fabian Groffen <grobian@gentoo.org> | 2023-04-10 18:06:15 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2023-04-10 18:07:39 +0200 |
commit | b93b0bec1fdc6ecb0eadb35d79c10444d2614a58 (patch) | |
tree | ac5aeae1175dbff2ac19139f68a4035107fcd61a /app-metrics/carbonapi-booking | |
parent | net-misc/memcached: stabilize 1.6.19 (diff) | |
download | gentoo-b93b0bec1fdc6ecb0eadb35d79c10444d2614a58.tar.gz gentoo-b93b0bec1fdc6ecb0eadb35d79c10444d2614a58.tar.bz2 gentoo-b93b0bec1fdc6ecb0eadb35d79c10444d2614a58.zip |
app-metrics/carbonapi-booking-0.3.0-r1: add deps and fix logfile path
Manage permission bits for carbonapi.log by putting it in a directory we
can manage. Register deps necessary for rendering png output.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'app-metrics/carbonapi-booking')
-rw-r--r-- | app-metrics/carbonapi-booking/carbonapi-booking-0.3.0-r1.ebuild (renamed from app-metrics/carbonapi-booking/carbonapi-booking-0.3.0.ebuild) | 19 | ||||
-rw-r--r-- | app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-colours.patch | 55 | ||||
-rw-r--r-- | app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-logfile.patch | 14 | ||||
-rw-r--r-- | app-metrics/carbonapi-booking/files/carbonapi-booking.initd | 3 |
4 files changed, 89 insertions, 2 deletions
diff --git a/app-metrics/carbonapi-booking/carbonapi-booking-0.3.0.ebuild b/app-metrics/carbonapi-booking/carbonapi-booking-0.3.0-r1.ebuild index e8633fd600e7..166f4baa33fa 100644 --- a/app-metrics/carbonapi-booking/carbonapi-booking-0.3.0.ebuild +++ b/app-metrics/carbonapi-booking/carbonapi-booking-0.3.0-r1.ebuild @@ -15,7 +15,21 @@ LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64" -DEPEND="" +DEPEND=" + app-arch/bzip2 + dev-libs/expat + media-libs/fontconfig + media-libs/freetype + media-libs/libpng + x11-libs/cairo + x11-libs/libX11 + x11-libs/libXau + x11-libs/libxcb + x11-libs/libXdmcp + x11-libs/libXext + x11-libs/libXrender + x11-libs/pixman +" RDEPEND="${DEPEND} acct-group/carbon acct-user/carbon" @@ -28,6 +42,9 @@ src_prepare() { # go-module's -buildmode=pie sed -i -e 's/ -race / /' Makefile || die + eapply "${FILESDIR}"/${P}-logfile.patch + eapply "${FILESDIR}"/${P}-colours.patch + eapply_user } diff --git a/app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-colours.patch b/app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-colours.patch new file mode 100644 index 000000000000..6fbbeeb181cb --- /dev/null +++ b/app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-colours.patch @@ -0,0 +1,55 @@ +use colouring defaults from graphite-web-1.10 + +--- carbonapi-0.3.0/expr/functions/cairo/png/picture_params.go ++++ carbonapi-0.3.0/expr/functions/cairo/png/picture_params.go +@@ -351,10 +351,10 @@ + Height: 250, + Margin: 10, + LogBase: 0, +- FgColor: "white", +- BgColor: "black", +- MajorLine: "rose", +- MinorLine: "grey", ++ FgColor: "black", ++ BgColor: "white", ++ MajorLine: "grey", ++ MinorLine: "rose", + FontName: "Sans", + FontSize: 10, + FontBold: FontWeightNormal, +@@ -414,8 +414,8 @@ + LeftDashed: false, + LeftColor: "", + +- MajorGridLineColor: "white", +- MinorGridLineColor: "grey", ++ MajorGridLineColor: "grey", ++ MinorGridLineColor: "rose", + } + + var templates = map[string]PictureParams{ +@@ -424,10 +424,10 @@ + Height: 250, + Margin: 10, + LogBase: 0, +- FgColor: "white", +- BgColor: "black", +- MajorLine: "rose", +- MinorLine: "grey", ++ FgColor: "black", ++ BgColor: "white", ++ MajorLine: "grey", ++ MinorLine: "rose", + FontName: "Sans", + FontSize: 10, + FontBold: FontWeightNormal, +@@ -487,7 +487,7 @@ + LeftDashed: false, + LeftColor: "", + +- MajorGridLineColor: "white", +- MinorGridLineColor: "grey", ++ MajorGridLineColor: "grey", ++ MinorGridLineColor: "rose", + }, + } diff --git a/app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-logfile.patch b/app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-logfile.patch new file mode 100644 index 000000000000..5e1015cf67dd --- /dev/null +++ b/app-metrics/carbonapi-booking/files/carbonapi-booking-0.3.0-logfile.patch @@ -0,0 +1,14 @@ +- don't log to stdout +- change log to be under subdir so ebuild can manage its permissions + +--- carbonapi-0.3.0/config/carbonapi.yaml ++++ carbonapi-0.3.0/config/carbonapi.yaml +@@ -130,7 +130,7 @@ + - X-Real-Ip + - X-Webauth-User + loggerConfig: +- outputPaths: ["stdout", "/var/log/carbonapi.log"] ++ outputPaths: ["/var/log/carbonapi/carbonapi.log"] + level: "info" + encoding: "json" + diff --git a/app-metrics/carbonapi-booking/files/carbonapi-booking.initd b/app-metrics/carbonapi-booking/files/carbonapi-booking.initd index c52069a77666..c4fbee5331a0 100644 --- a/app-metrics/carbonapi-booking/files/carbonapi-booking.initd +++ b/app-metrics/carbonapi-booking/files/carbonapi-booking.initd @@ -19,7 +19,8 @@ depend() { start_pre() { mkdir -p "${pidfile%/*}" - chown ${user}:${group} "${pidfile%/*}" + mkdir -p /var/log/carbonapi + chown ${user}:${group} "${pidfile%/*}" /var/log/carbonapi } stop_post() { |