Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608774 - www-apps/grafana-bin: miscellaneous fixes
Summary: www-apps/grafana-bin: miscellaneous fixes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 18:21 UTC by Austin English (RETIRED)
Modified: 2017-04-11 08:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
logrotate support (0001-www-apps-grafana-bin-add-logrotate-support.patch,2.44 KB, patch)
2017-02-09 18:21 UTC, Austin English (RETIRED)
Details | Diff
create missing dashboard directory (0002-www-apps-grafana-bin-ensure-var-lib-grafana-dashboar.patch,1.32 KB, patch)
2017-02-09 18:22 UTC, Austin English (RETIRED)
Details | Diff
fix permissions (0003-www-apps-grafana-bin-fperms-to-755-instead-of-750-so.patch,1.01 KB, patch)
2017-02-09 18:22 UTC, Austin English (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Austin English (RETIRED) gentoo-dev 2017-02-09 18:21:59 UTC
Created attachment 463002 [details, diff]
logrotate support

When deploying grafana-bin, I noticed a couple issues:
A) I can't read the logfiles as my normal user, but must be root
B) The log complains about a missing directory (and grafana doesn't create it, even though it has write permission there)

I've attached patches for that, along with adding logrotate support.

Also sent as https://github.com/gentoo/gentoo/pull/3895
Comment 1 Austin English (RETIRED) gentoo-dev 2017-02-09 18:22:33 UTC
Created attachment 463004 [details, diff]
create missing dashboard directory
Comment 2 Austin English (RETIRED) gentoo-dev 2017-02-09 18:22:52 UTC
Created attachment 463006 [details, diff]
fix permissions
Comment 3 Patrice Clement gentoo-dev 2017-03-21 23:24:51 UTC
I would like these changes to land in the tree. Patrick I know you don't like when a developer supersedes you but can you please take a look at what Austin put together? Thanks.
Comment 4 Ferenc Erki 2017-03-29 15:41:50 UTC
I've proposed an alternative fix for these in adjust's overlay over at
https://github.com/adjust/gentoo-overlay/pull/53. If you can test before
Patrick picks this thread up, I'd be happy to get some feedback (here or
there).

Some changes though:
- grafana has built-in log rotation (see grafana.ini for details), so I
  try not to risk a bad interaction between that and an external logrotate
  config
- I try to avoid making grafana directories world readable; I encourage adding
  unprivileged users to the grafana group instead, which should already have
  proper permissions in place to e.g. read logs
- more directories are being taken care of, not just dashboards, and not just
  install-time
Comment 5 Patrick Lauer gentoo-dev 2017-04-11 08:58:51 UTC
Fixed in 77e5da07ebf7376541167d97a0d5eb8f39ce7f08 with ferki's proposed fix