[Pkg-torrus-maintainers] Bug#686099: torrus-common: Wrong user hardcoded in devdiscover

Bernhard Schmidt berni at birkenwald.de
Tue Aug 28 22:23:18 UTC 2012


On 28.08.2012 16:49, Bernhard Schmidt wrote:

Hi guys,

>> Package: torrus-common
>> Version: 2.03-1
>> Severity: important
>> Tags: patch
>>
>> devdiscover has the username 'torrus' hardcoded for its --mkdir option but Debian uses
>> 'Debian-torrus' instead.
>>
>> The attached patch simply changes the username.
>> A better solution would look up the right username at each devdiscover invocation.
>
> This is already a macro in devdiscover.in, but we don't set torrus_user
> in debian/rules. I think this should fix it already, I will give it a
> spin tonight if noone beats me to it.

This simple patch fixes the problem for good.

commit 8602bb5760c544fdb65df0f0c3883d3bcc5b47d0
Author: Bernhard Schmidt <berni+deb at birkenwald.de>
Date:   Wed Aug 29 00:17:55 2012 +0200

     set torrus_user correctly for configure

     Closes: #686099

diff --git a/debian/rules b/debian/rules
index 086b11d..5ba1cda 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,7 @@ override_dh_auto_configure:
         distxmldir=/usr/share/torrus/xmlconfig \
         defrrddir=/var/lib/torrus/collector_rrd \
         mansec_usercmd=8 \
+       torrus_user=Debian-torrus \
         ./configure \
                 --prefix=/usr \
                 --sysconfdir=/etc \

I've built it and extracted the binary package, these are the only changes.

diff -urN torrus-common_2.03-1.0/usr/share/torrus/bin/devdiscover 
torrus-common_2.03-1.1/usr/share/torrus/bin/devdiscover
--- torrus-common_2.03-1.0/usr/share/torrus/bin/devdiscover	2012-08-29 
00:08:47.000000000 +0200
+++ torrus-common_2.03-1.1/usr/share/torrus/bin/devdiscover	2012-08-29 
00:10:13.000000000 +0200
@@ -585,8 +585,8 @@
                  $confBuildSemaphore->down();
              }

-            my ($login,$pass,$uid,$gid) = getpwnam('torrus')
-                or die('Cannot get user details for torrus');
+            my ($login,$pass,$uid,$gid) = getpwnam('Debian-torrus')
+                or die('Cannot get user details for Debian-torrus');

              foreach my $dir ( $dd->listDataDirs() )
              {
diff -urN 
torrus-common_2.03-1.0/usr/share/torrus/conf_defaults/initscript.conf 
torrus-common_2.03-1.1/usr/share/torrus/conf_defaults/initscript.conf
--- 
torrus-common_2.03-1.0/usr/share/torrus/conf_defaults/initscript.conf 
2012-08-29 00:08:47.000000000 +0200
+++ 
torrus-common_2.03-1.1/usr/share/torrus/conf_defaults/initscript.conf 
2012-08-29 00:10:13.000000000 +0200
@@ -1,7 +1,7 @@
  # Torrus init script configuration
  # You can override any value in /etc/torrus/conf/initscript.siteconf

-# If we perform su torrus
+# If we perform su Debian-torrus
  TORRUS_CHANGE_UID=yes

  # How many times we sleep and wait for processes to finish
diff -urN torrus-common_2.03-1.0/usr/share/torrus/conf_defaults/instvars 
torrus-common_2.03-1.1/usr/share/torrus/conf_defaults/instvars
--- torrus-common_2.03-1.0/usr/share/torrus/conf_defaults/instvars 
2012-08-29 00:08:47.000000000 +0200
+++ torrus-common_2.03-1.1/usr/share/torrus/conf_defaults/instvars 
2012-08-29 00:10:13.000000000 +0200
@@ -36,7 +36,7 @@
  var_mode=''
  var_group=''
  var_user=''
-torrus_user='torrus'
+torrus_user='Debian-torrus'
  perlithreads=''
  PERLINC=''
  enable_pkgonly='yes'

How should we proceed regarding the Wheezy freeze? Does anyone think we 
have a chance to get this trivial fix in?

Bernhard



More information about the Pkg-torrus-maintainers mailing list