Package: hellanzb
Version: 0.13-5.2
Severity: important
Tags: patch

The hellanzb package has been patched so that it doesn't use unrar by
default in order to prevent the package from being moved from main to
contrib. In more detail, the SKIP_UNRAR configuration option defaults to
True in Debian and unrar has been added to hellanzb's Suggests. So far
so good.

However, hellanzb crashes on startup if unrar isn't installed, no matter
what the SKIP_UNRAR configuration option is set to:

        A problem occurred while reading the config file: FatalError'>:
        Cannot continue program, required executable not found: 'unrar'
        Exiting: FatalError'>: Cannot continue program, required
        executable not found: 'unrar'

The attached debdiff fixes this bug. It changes hellanzb's Core.py so
that it only looks for the unrar executable if SKIP_UNRAR is not set to
True. The diff also contains other minor changes, which of course can be
dropped if they're not welcome:

  * Bump Standards-Version to 3.8.3 (no changes needed).
  * Add README.sources to fix patch-system-but-no-source-readme lintian
 warning.
  * Minor cleanup in README.Debian and NEWS.Debian.

If the patch is applied, I'll take care of sending it upstream. However,
the project is more or less dead.

Fixing this bug will also make it possible to finally resolve #523851,
because up to now, LottaNZB depended unrar only to prevent HellaNZB from
crashing.

Regards,
Severin Heiniger
diff -u hellanzb-0.13/debian/control hellanzb-0.13/debian/control
--- hellanzb-0.13/debian/control
+++ hellanzb-0.13/debian/control
@@ -4,7 +4,7 @@
 Maintainer: Adam Cécile (Le_Vert) <gand...@le-vert.net>
 Build-Depends: debhelper (>= 5.0.37.2), dpatch
 Build-Depends-Indep: python-all-dev (>= 2.5.4), python-all, python-support (>= 0.5.3)
-Standards-Version: 3.8.1
+Standards-Version: 3.8.3
 Homepage: http://www.hellanzb.com/
 
 Package: hellanzb
diff -u hellanzb-0.13/debian/changelog hellanzb-0.13/debian/changelog
--- hellanzb-0.13/debian/changelog
+++ hellanzb-0.13/debian/changelog
@@ -1,3 +1,13 @@
+hellanzb (0.13-5.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Bump Standards-Version to 3.8.3 (no changes needed).
+  * Add new patch to fix crash when unrar isn't installed.
+  * Add README.sources to fix patch-system-but-no-source-readme lintian warning.
+  * Minor cleanup in README.Debian and NEWS.Debian.
+
+ -- Severin Heiniger <severinheini...@gmail.com>  Wed, 04 Nov 2009 19:32:33 +0100
+
 hellanzb (0.13-5.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u hellanzb-0.13/debian/NEWS.Debian hellanzb-0.13/debian/NEWS.Debian
--- hellanzb-0.13/debian/NEWS.Debian
+++ hellanzb-0.13/debian/NEWS.Debian
@@ -1,16 +1,16 @@
 hellanzb (0.11-1) experimental; urgency=low
 
-  On previous version, hellanzb XMLRPC server was listening to world.
-  It's really unsafe and expose user to several security issues if he doesn't
-  change the default password.
+  In previous versions, the HellaNZB XMLRPC server accepted connections from
+  anywhere. Not changing the default password exposed the user to several
+  security issues.
 
-  Therefore, I added a new configuration directive named 
-  Hellanzb.XMLRPC_SERVER_BIND. If it's not set, remote access to the XMLRPC
-  server is disabled (binded to 127.0.0.1).
+  Therefore, a new configuration directive named Hellanzb.XMLRPC_SERVER_BIND
+  has been added. If it's not set, remote access to the XMLRPC server is
+  disabled (bound to 127.0.0.1).
 
-  To reproduce the same behavior as previous version, just add:
-  Hellanzb.XMLRPC_SERVER_BIND. = '0.0.0.0' to hellanzb.conf.
+  To reproduce the same behavior as previous versions, just add
+  Hellanzb.XMLRPC_SERVER_BIND = '0.0.0.0' to hellanzb.conf.
 
-  /!\ Please add Hellanzb.XMLRPC_SERVER_BIND. to your configuration file.
+  Please add Hellanzb.XMLRPC_SERVER_BIND to your configuration file.
 
  -- Adam Cécile (Le_Vert) <gand...@le-vert.net>  Sat, 10 Feb 2007 15:01:20 +0100
diff -u hellanzb-0.13/debian/README.Debian hellanzb-0.13/debian/README.Debian
--- hellanzb-0.13/debian/README.Debian
+++ hellanzb-0.13/debian/README.Debian
@@ -1,12 +1,11 @@
-hellanzb for Debian
-----------------------
+HellaNZB for Debian
+-------------------
 
-The default configuration files skip unraring during post processing 
-("Hellanzb.SKIP_UNRAR = True").
+The default configuration file skips unraring during post-processing 
+(Hellanzb.SKIP_UNRAR is set to True). This is necessary to prevent the package
+from being moved from main to contrib.
 
-I removed unrar call to avoid the package to be moved from main to contrib.
-
-You can enable this feature again but you need to install unrar package from
-non-free.
+You can enable this feature again but you'll need to install the non-free
+unrar package.
 
  -- Adam Cécile (Le_Vert) <gand...@le-vert.net>, Fri,  8 Sep 2006 21:12:36 +0200
diff -u hellanzb-0.13/debian/patches/00list hellanzb-0.13/debian/patches/00list
--- hellanzb-0.13/debian/patches/00list
+++ hellanzb-0.13/debian/patches/00list
@@ -5,0 +6 @@
+005-Fix_crash_on_missing_unrar
only in patch2:
unchanged:
--- hellanzb-0.13.orig/debian/README.source
+++ hellanzb-0.13/debian/README.source
@@ -0,0 +1,26 @@
+This package uses dpatch to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To get the fully patched source after unpacking the source package, cd
+to the root level of the source package and run:
+
+    debian/rules patch
+
+Removing a patch is as simple as removing its entry from the
+debian/patches/00list file, and please also remove the patch file
+itself.
+
+Creating a new patch is done with "dpatch-edit-patch patch XX_patchname"
+where you should replace XX with a new number and patchname with a
+descriptive shortname of the patch. You can then simply edit all the
+files your patch wants to edit, and then simply "exit 0" from the shell
+to actually create the patch file.
+
+To tweak an already existing patch, call "dpatch-edit-patch XX_patchname"
+and replace XX_patchname with the actual filename from debian/patches
+you want to use.
+
+To clean up afterwards again, "debian/rules unpatch" will do the
+work for you - or you can of course choose to call
+"fakeroot debian/rules clean" all together.
only in patch2:
unchanged:
--- hellanzb-0.13.orig/debian/patches/005-Fix_crash_on_missing_unrar
+++ hellanzb-0.13/debian/patches/005-Fix_crash_on_missing_unrar
@@ -0,0 +1,42 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 005-Fix_crash_on_missing_unrar by
+## Severin Heiniger <severinheini...@gmail.com>
+##
+## DP: This package doesn't depend on unrar and SKIP_UNRAR is set to True by the
+## DP: 002-Debianize_conf_file patch.
+## DP: However, if unrar isn't installed, HellaNZB crashes on startup no matter
+## DP: what SKIP_UNRAR is set to. This patch causes HellaNZB not to look for the
+## DP: unrar executable if SKIP_UNRAR is set to True.
+
+...@dpatch@
+diff -urNad hellanzb-0.13~/Hellanzb/Core.py hellanzb-0.13/Hellanzb/Core.py
+--- hellanzb-0.13~/Hellanzb/Core.py	2009-11-04 19:30:49.115313617 +0100
++++ hellanzb-0.13/Hellanzb/Core.py	2009-11-04 19:31:16.375292395 +0100
+@@ -84,10 +84,14 @@
+         else:
+             Hellanzb.MAX_RATE = int(Hellanzb.MAX_RATE)
+ 
+-        if not hasattr(Hellanzb, 'UNRAR_CMD') or Hellanzb.UNRAR_CMD is None:
+-            Hellanzb.UNRAR_CMD = assertIsExe(['rar', 'unrar'])
+-        else:
+-            Hellanzb.UNRAR_CMD = assertIsExe([Hellanzb.UNRAR_CMD])
++        if not hasattr(Hellanzb, 'SKIP_UNRAR') or Hellanzb.SKIP_UNRAR is None:
++            Hellanzb.SKIP_UNRAR = False
++
++        if not Hellanzb.SKIP_UNRAR:
++            if not hasattr(Hellanzb, 'UNRAR_CMD') or Hellanzb.UNRAR_CMD is None:
++                Hellanzb.UNRAR_CMD = assertIsExe(['rar', 'unrar'])
++            else:
++                Hellanzb.UNRAR_CMD = assertIsExe([Hellanzb.UNRAR_CMD])
+ 
+         if not hasattr(Hellanzb, 'PAR2_CMD') or Hellanzb.PAR2_CMD is None:
+             Hellanzb.PAR2_CMD = assertIsExe(['par2'])
+@@ -104,8 +108,6 @@
+         else:
+             Hellanzb.MACBINCONV_CMD = assertIsExe([Hellanzb.MACBINCONV_CMD])
+ 
+-        if not hasattr(Hellanzb, 'SKIP_UNRAR') or Hellanzb.SKIP_UNRAR is None:
+-            Hellanzb.SKIP_UNRAR = False
+         if not hasattr(Hellanzb, 'XMLRPC_SERVER_BIND') or Hellanzb.XMLRPC_SERVER_BIND is None:
+             print 'Warning: Hellanzb.XMLRPC_SERVER_BIND is not set, bind to 127.0.0.1'
+             Hellanzb.XMLRPC_SERVER_BIND = '127.0.0.1'

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to