Um 10:43 Uhr am 28.11.17 schrieb Antoine Beaupre:
> On Wed, Oct 21, 2015 at 08:33:39PM +0200, Christoph Berg wrote:
>> Re: Sven Hartge 2014-09-09 <[email protected]>

>>>> Also the directory /var/lib/smokeping needs to be writable by www-data
>>>> to allow the data submitted by the slaves to be written to the RRD
>>>> files or you will get errors like this in the Apache error log:
>>>> 
>>>> smokeping.cgi [client 10.1.1.32]: Could not update 
>>>> /var/lib/smokeping//Remote/Campus_Remote/swXXX-remote-v1.smoke-slave.slave_cache,
>>>>  giving up for now. at /usr/share/perl5/Smokeping/Master.pm line 156.
>>> 
>>> Correction: The permissions for /var/lib/smokeping are fine, but the
>>> default configuration is missing the "dyndir" directive causing the CGI
>>> trying to write into the datadir instead of the correct directory
>>> /var/lib/smokeping/__cgi.
 
>> I ran into this as well, it would be nice if the package got fixed.
>> The default /var/lib/smokeping/__cgi permissions need to be adjusted
>> as well:
>> drwxrwsr-x 4 smokeping www-data 4096 Okt 21 20:24 /var/lib/smokeping/__cgi
> 
> So I'm not sure I follow all the proposed changes here.

I checked on a fresh installation and the permissions of
/var/lib/smokeping/__cgi are fine, they should be 2775 and
smokeping:www-data.

The main problem is the missing "dyndir" value from
/etc/smokeping/config.d/pathnames, which needs to be set to
"/var/lib/smokeping/__cgi".

Unfortunately just adding it to debian/split_config like so ...

@@ -14,8 +14,8 @@ do
     fi
 done
 
-egrep 'sendmail|imgcache|imgurl|datadir|piddir|smokemail|tmail' 
${DESTDIR}/etc/smokeping/config.d/General > 
${DESTDIR}/etc/smokeping/config.d/pathnames
+egrep 'sendmail|imgcache|imgurl|datadir|dyndir|piddir|smokemail|tmail' 
${DESTDIR}/etc/smokeping/config.d/General > 
${DESTDIR}/etc/smokeping/config.d/pathnames
 
-sed -i '/sendmail\|imgcache\|imgurl\|datadir\|piddir\|smokemail\|tmail/d' 
${DESTDIR}/etc/smokeping/config.d/General
+sed -i 
'/sendmail\|imgcache\|imgurl\|datadir\|dyndir\|piddir\|smokemail\|tmail/d' 
${DESTDIR}/etc/smokeping/config.d/General
 
 echo '@include /etc/smokeping/config.d/pathnames' >> 
${DESTDIR}/etc/smokeping/config.d/General

... is not enough, as the configure script never adds it to
config.d/General to begin with. (Might be worth reporting to upstream.)

As a workaround I propose to manually add the hardcoded value for the time
being:

@@ -15,6 +15,7 @@ do
 done
 
 egrep 'sendmail|imgcache|imgurl|datadir|dyndir|piddir|smokemail|tmail' 
${DESTDIR}/etc/smokeping/config.d/General > 
${DESTDIR}/etc/smokeping/config.d/pathnames
+echo 'dyndir = /var/lib/smokeping/__cgi' >> 
${DESTDIR}/etc/smokeping/config.d/pathnames
 
 sed -i 
'/sendmail\|imgcache\|imgurl\|datadir\|dyndir\|piddir\|smokemail\|tmail/d' 
${DESTDIR}/etc/smokeping/config.d/General
 
This should fix this bug. I am attaching patches based on current git HEAD
18e0f0a72a63d2ab3034dbb648c717aa74c27012 to fix this and Bug#826056, 
currently causing a FTBFS bug.

Grüße,
Sven
From 3bfbe49618ab62fc7a68d214ddc1de211ae111b7 Mon Sep 17 00:00:00 2001
From: Sven Hartge <[email protected]>
Date: Tue, 28 Nov 2017 21:12:11 +0100
Subject: [PATCH 1/3] Add dyndir config option to pathnames file

Signed-off-by: Sven Hartge <[email protected]>
---
 debian/split_config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/split_config b/debian/split_config
index 2b6bb95..00443b9 100755
--- a/debian/split_config
+++ b/debian/split_config
@@ -14,8 +14,8 @@ do
     fi
 done
 
-egrep 'sendmail|imgcache|imgurl|datadir|piddir|smokemail|tmail' ${DESTDIR}/etc/smokeping/config.d/General > ${DESTDIR}/etc/smokeping/config.d/pathnames
+egrep 'sendmail|imgcache|imgurl|datadir|dyndir|piddir|smokemail|tmail' ${DESTDIR}/etc/smokeping/config.d/General > ${DESTDIR}/etc/smokeping/config.d/pathnames
 
-sed -i '/sendmail\|imgcache\|imgurl\|datadir\|piddir\|smokemail\|tmail/d' ${DESTDIR}/etc/smokeping/config.d/General
+sed -i '/sendmail\|imgcache\|imgurl\|datadir\|dyndir\|piddir\|smokemail\|tmail/d' ${DESTDIR}/etc/smokeping/config.d/General
 
 echo '@include /etc/smokeping/config.d/pathnames' >> ${DESTDIR}/etc/smokeping/config.d/General
-- 
2.15.0

From 0137ed9f2d03f064f36c7f18be65791d509e9fcb Mon Sep 17 00:00:00 2001
From: Sven Hartge <[email protected]>
Date: Tue, 28 Nov 2017 21:21:35 +0100
Subject: [PATCH 2/3] Build-Depend on rename to fix #826056

Signed-off-by: Sven Hartge <[email protected]>
---
 debian/control | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/control b/debian/control
index 9933376..eb9a18d 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Build-Depends: debhelper (>= 7.0.50~)
  , dh-autoreconf
  , dh-apache2
  , apache2-dev
+ , rename
 Build-Depends-Indep: librrds-perl
  , groff-base
  , libhtml-parser-perl
-- 
2.15.0

From a23fcfa8f6d434c5ec96da73605ae22b29cea2ed Mon Sep 17 00:00:00 2001
From: Sven Hartge <[email protected]>
Date: Tue, 28 Nov 2017 21:37:16 +0100
Subject: [PATCH 3/3] Manually add dyndir to config.d/pathnames

Signed-off-by: Sven Hartge <[email protected]>
---
 debian/split_config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/split_config b/debian/split_config
index 00443b9..6c497a3 100755
--- a/debian/split_config
+++ b/debian/split_config
@@ -15,6 +15,7 @@ do
 done
 
 egrep 'sendmail|imgcache|imgurl|datadir|dyndir|piddir|smokemail|tmail' ${DESTDIR}/etc/smokeping/config.d/General > ${DESTDIR}/etc/smokeping/config.d/pathnames
+echo 'dyndir = /var/lib/smokeping/__cgi' >> ${DESTDIR}/etc/smokeping/config.d/pathnames
 
 sed -i '/sendmail\|imgcache\|imgurl\|datadir\|dyndir\|piddir\|smokemail\|tmail/d' ${DESTDIR}/etc/smokeping/config.d/General
 
-- 
2.15.0

Reply via email to