Bug#891202: [pkg-go] Bug#891202: prometheus-alertmanager: False owner/group for /var/lib/prometheus

2018-02-23 Thread tuxcoder
(resend, false To address)

Thanks for replaying so fast.

On 2018-02-23 14:53, Martín Ferrari wrote:

> Ah, sorry, now I see that you are reporting against the version in
> stable. There is not much I can do to fix that, the version in testing
> does not have this issue.
>
> What I can do (and I had forgotten to do before), is to backport that
> version to stretch.


Is there a way to get the postinst script backported to stable.

I'm not a big fan of mixing stable/testing in production systems and
stretch will be stay stable for more than 1 year.

Currently I added  a workaround to my ansible role, but it would be nice
to get it fixed upstream in debian so that other people not run into the
same issue.

Best Regards
Norbert Summer (Tuxcoder)



Bug#891202: [pkg-go] Bug#891202: prometheus-alertmanager: False owner/group for /var/lib/prometheus

2018-02-23 Thread Martín Ferrari
Hi,

On 23/02/18 12:17, tuxcoder wrote:

> The service trys to `mkdir /var/lib/prometheus/alertmanager` on startup,
> but the dir `/var/lib/prometheus` is owned by root.
> 
> If the package `prometheus` is installed first this is not the case.
Uhm, I think you are mistaken, or I missed something.

The directory is created when unpacking the deb file:

$ dpkg -L prometheus-alertmanager | grep /var/lib/
/var/lib/prometheus
/var/lib/prometheus/alertmanager

Then the post-installation script does this:

chown -R prometheus:prometheus /var/lib/prometheus/alertmanager || true
chown -R prometheus:prometheus /var/log/prometheus || true

And the initsciprt does this (as root):

mkdir -p `dirname $PIDFILE` || true
chown -R $USER: `dirname $LOGFILE`
chown -R $USER: `dirname $PIDFILE`

So, I don't know where you saw that mkdir, nor where it could be a problem.

-- 
Martín Ferrari (Tincho)



Bug#891202: [pkg-go] Bug#891202: prometheus-alertmanager: False owner/group for /var/lib/prometheus

2018-02-23 Thread Martín Ferrari
Ah, sorry, now I see that you are reporting against the version in
stable. There is not much I can do to fix that, the version in testing
does not have this issue.

What I can do (and I had forgotten to do before), is to backport that
version to stretch.

On 23/02/18 14:48, Martín Ferrari wrote:
> Hi,
> 
> On 23/02/18 12:17, tuxcoder wrote:
> 
>> The service trys to `mkdir /var/lib/prometheus/alertmanager` on startup,
>> but the dir `/var/lib/prometheus` is owned by root.
>>
>> If the package `prometheus` is installed first this is not the case.
> Uhm, I think you are mistaken, or I missed something.
> 
> The directory is created when unpacking the deb file:
> 
> $ dpkg -L prometheus-alertmanager | grep /var/lib/
> /var/lib/prometheus
> /var/lib/prometheus/alertmanager
> 
> Then the post-installation script does this:
> 
> chown -R prometheus:prometheus /var/lib/prometheus/alertmanager || true
> chown -R prometheus:prometheus /var/log/prometheus || true
> 
> And the initsciprt does this (as root):
> 
> mkdir -p `dirname $PIDFILE` || true
> chown -R $USER: `dirname $LOGFILE`
> chown -R $USER: `dirname $PIDFILE`
> 
> So, I don't know where you saw that mkdir, nor where it could be a problem.
> 


-- 
Martín Ferrari (Tincho)