I've attached an updated diff based on the below feedback. Because the changes
only affect this bug I won't update the diff on the other two bugs until this
version is confirmed good.

On 14:20 Mon 23 Jun 2014, Niko Tyni wrote:
> On Mon, Jun 23, 2014 at 01:44:17PM +0300, Rowan Thorpe wrote:
>
> > Attached is a debdiff for several smokeping bugs.
>
> Thanks for your work. I'm not the maintainer (anymore), so just
> a couple of comments.
>
> > + use FindBin;
> > + # PERL5LIB
> > +-use lib "$FindBin::Bin/../thirdparty/lib/perl5";
> > +-use lib "$FindBin::Bin/../lib";
> > ++use lib "/usr/lib/perl5";
> > ++use lib "/usr/lib";
>
> Please don't hardcode /usr/lib/perl5. See #748380.

Good to know thanks. Will have it in mind in future

> /usr/lib makes no sense at all, that's not for perl modules.

Oops. I translated the paths too literally and didn't even think about Perl
context/sanity at the time (blame late night hacking and multitasking)...

> Just relying on the default perl search path without FindBin
> or any "use lib" statements should work fine AFAICS.

I have attached the updates - thanks.

> > +- use lib "/usr/local/smokeping/lib";
> > +- use lib "/usr/local/rrdtool-1.0.39/lib/perl";
> > ++ use lib "/usr/lib";
> > ++ use lib "/usr/lib/perl";
>
> /usr/lib/perl is nonsense too (presumably a typo?)

See my above excuse :-D

--
Rowan Thorpe
PGP fingerprint:
 BB0A 0787 C0EE BDD8 7F97  3D30 49F2 13A5 265D CCBD
----
"There is a great difference between worry and concern. A worried person sees
a problem, and a concerned person solves a problem."
 - Harold Stephens
diff -Nru smokeping-2.6.9/debian/changelog smokeping-2.6.9/debian/changelog
--- smokeping-2.6.9/debian/changelog    2013-03-16 18:07:00.000000000 +0200
+++ smokeping-2.6.9/debian/changelog    2014-06-23 13:25:34.000000000 +0300
@@ -1,3 +1,20 @@
+smokeping (2.6.9-1~exp0.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use dh_autoreconf to avoid errors about "missing xx" and to allow
+    rebuilding after first build (Closes: #724471)
+  * use dh_auto_configure rather than ./configure in rules, to only
+    override specified flags, not all
+  * add patches:
+    * fix-paths-inside-executables - hardcode paths inside executables
+      (Closes: #707225)
+    * fix-pod-escaping - quote-protect a slash in a pod-link
+      (Closes: #752393)
+
+  * bump Standards-Version to 3.9.5
+
+ -- Rowan Thorpe <[email protected]>  Fri, 20 Jun 2014 13:13:26 +0300
+
 smokeping (2.6.9-1~exp0) experimental; urgency=high
 
   * New upstream release to properly fix CVE-2012-0790 (Closes: #659899)
diff -Nru smokeping-2.6.9/debian/control smokeping-2.6.9/debian/control
--- smokeping-2.6.9/debian/control      2013-03-16 18:07:00.000000000 +0200
+++ smokeping-2.6.9/debian/control      2014-06-23 12:29:14.000000000 +0300
@@ -3,10 +3,10 @@
 Priority: extra
 Maintainer: Antoine Beaupré <[email protected]>
 Uploaders: Jose Carlos Garcia Sogo <[email protected]>
-Build-Depends: debhelper (>= 7.0.50~), autoconf, automake
+Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, dh-autoreconf
 Build-Depends-Indep: librrds-perl, groff-base, libhtml-parser-perl,
  libdigest-hmac-perl, libwww-perl, liburi-perl, libcgi-fast-perl, 
libconfig-grammar-perl
-Standards-Version: 3.9.2
+Standards-Version: 3.9.5
 Homepage: http://smokeping.org/
 Vcs-Browser: http://git.debian.org/?p=collab-maint/smokeping.git
 Vcs-Git: git://git.debian.org/git/collab-maint/smokeping.git
diff -Nru smokeping-2.6.9/debian/patches/fix-paths-inside-executables 
smokeping-2.6.9/debian/patches/fix-paths-inside-executables
--- smokeping-2.6.9/debian/patches/fix-paths-inside-executables 1970-01-01 
02:00:00.000000000 +0200
+++ smokeping-2.6.9/debian/patches/fix-paths-inside-executables 2014-06-23 
15:33:06.000000000 +0300
@@ -0,0 +1,170 @@
+Index: smokeping-2.6.9/bin/smokeinfo
+===================================================================
+--- smokeping-2.6.9.orig/bin/smokeinfo
++++ smokeping-2.6.9/bin/smokeinfo
+@@ -2,11 +2,6 @@
+ use strict;
+ use warnings;
+ 
+-use FindBin;
+-# PERL5LIB
+-use lib "$FindBin::Bin/../thirdparty/lib/perl5";
+-use lib "$FindBin::Bin/../lib";
+-
+ use Smokeping::Info;
+ use Getopt::Long 2.25 qw(:config no_ignore_case);
+ use Pod::Usage 1.14;
+@@ -84,19 +79,19 @@
+ 
+ Get all data all nodes
+ 
+- smokeinfo etc/config 
++ smokeinfo /etc/smokeping/config 
+ 
+ Only show nodes directly under /Customers
+ 
+- smokeinfo --filter=/Customers/ etc/config
++ smokeinfo --filter=/Customers/ /etc/smokeping/config
+ 
+ Show all nodes under /Customers
+ 
+- smokeinfo --mode=recursive --filter=/Customers/ etc/config
++ smokeinfo --mode=recursive --filter=/Customers/ /etc/smokeping/config
+ 
+ Show all nodes with '_wlan_' in the name
+ 
+- smokeinfo --mode=regexp --filter=_wlan_ etc/config
++ smokeinfo --mode=regexp --filter=_wlan_ /etc/smokeping/config
+ 
+ =head1 COPYRIGHT
+ 
+Index: smokeping-2.6.9/bin/smokeping
+===================================================================
+--- smokeping-2.6.9.orig/bin/smokeping
++++ smokeping-2.6.9/bin/smokeping
+@@ -4,14 +4,9 @@
+ use strict;
+ use warnings;
+ 
+-use FindBin;
+-# PERL5LIB
+-use lib "$FindBin::Bin/../thirdparty/lib/perl5";
+-use lib "$FindBin::Bin/../lib";
+-
+ use Smokeping;
+  
+-Smokeping::main("$FindBin::Bin/../etc/config");
++Smokeping::main("/etc/smokeping/config");
+ 
+ =head1 NAME
+ 
+@@ -129,25 +124,6 @@
+ 
+ Please refer to L<the installation document|smokeping_install> for detailed 
setup instructions.
+ 
+-=head1 SETUP
+-
+-When installing SmokePing, this file has to be adjusted to fit your
+-local system. Three paths have to be entered.
+-
+-One pointing to your B<rrdtool> installation
+-
+- use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
+-
+-One pointing to the place where you have installed the SmokePing libraries
+-
+- use lib qw(/home/oetiker/public_html/smokeping/lib);
+-
+-The third path is the argument to the Smokeping::main command. It points to
+-the SmokePing configuration file.
+-
+- use Smokeping;
+- Smokeping::main("/home/oetiker/.smokeping/config");
+-
+ =head1 COPYRIGHT
+ 
+ Copyright (c) 2002 by Tobias Oetiker. All right reserved.
+Index: smokeping-2.6.9/bin/smokeping_cgi
+===================================================================
+--- smokeping-2.6.9.orig/bin/smokeping_cgi
++++ smokeping-2.6.9/bin/smokeping_cgi
+@@ -4,11 +4,6 @@
+ use strict;
+ use warnings;
+ 
+-use FindBin;
+-# PERL5LIB
+-use lib "$FindBin::Bin/../thirdparty/lib/perl5";
+-use lib "$FindBin::Bin/../lib";
+-
+ # don't bother with zombies
+ $SIG{CHLD} = 'IGNORE';
+ 
+Index: smokeping-2.6.9/bin/tSmoke
+===================================================================
+--- smokeping-2.6.9.orig/bin/tSmoke
++++ smokeping-2.6.9/bin/tSmoke
+@@ -49,12 +49,6 @@
+ # -- Smokeping libraries
+ # -- RRDTool
+ # -- Getopt::Long
+-#
+-# Point the lib variables to your implementation
+-use FindBin;
+-# PERL5LIB
+-use lib "$FindBin::Bin/../thirdparty/lib/perl5";
+-use lib "$FindBin::Bin/../lib";
+ 
+ use Smokeping;
+ use Net::SMTP;
+@@ -63,7 +57,7 @@
+ use RRDs;
+ 
+ # Point to your Smokeping config file
+-my $cfgfile = "etc/config.dist";
++my $cfgfile = "/etc/smokeping/config";
+ 
+ # global variables
+ my $cfg;
+@@ -478,39 +472,9 @@
+ Typical crontab used to invoke this are
+ 
+  # Quick morning alert to see what's down
+- 0 6 * * * /usr/local/smokeping/bin/tSmoke.pl --q 
[email protected] --morning
++ 0 6 * * * /usr/sbin/tSmoke --q [email protected] --morning
+  # Weekly report on the percent availability of network systems with no detail
+- 0 8 * * * /usr/local/smokeping/bin/tSmoke.pl --q 
[email protected] --weekly --detail=0
+-
+-=head1 SETUP
+-
+-When installing tSmoke, some variables must be adjusted to fit your local 
system.
+-
+-We need to use the following B<libraries>:
+-
+-=over
+-
+-=item Smokeping
+-
+-=item RRDTool Perl bindings
+-
+-=item Getopt::Long
+-
+-=back
+-
+-Set up your libraries:
+-
+- use lib "/usr/local/smokeping/lib";
+- use lib "/usr/local/rrdtool-1.0.39/lib/perl";
+-
+-Point to your Smokeping B<config> file
+-
+- my $cfgfile = "/usr/local/smokeping/etc/config";
+-
+-Modify the Smokeping config file to include a path for tmail in the
+-General section:
+-
+- tmail = /usr/local/smokeping/etc/tmail
++ 0 8 * * * /usr/sbin/tSmoke --q [email protected] --weekly 
--detail=0
+ 
+ =head1 COPYRIGHT
+ 
diff -Nru smokeping-2.6.9/debian/patches/fix-pod-escaping 
smokeping-2.6.9/debian/patches/fix-pod-escaping
--- smokeping-2.6.9/debian/patches/fix-pod-escaping     1970-01-01 
02:00:00.000000000 +0200
+++ smokeping-2.6.9/debian/patches/fix-pod-escaping     2014-06-23 
12:12:18.000000000 +0300
@@ -0,0 +1,13 @@
+Index: smokeping-2.6.9/lib/Smokeping.pm
+===================================================================
+--- smokeping-2.6.9.orig/lib/Smokeping.pm
++++ smokeping-2.6.9/lib/Smokeping.pm
+@@ -2631,7 +2631,7 @@ DOC
+ The base directory where SmokePing keeps the files related to the DYNAMIC 
function.
+ This directory must be writeable by the WWW server. It is also used for 
temporary
+ storage of slave polling results by the master in 
+-L<the master/slave mode|smokeping_master_slave>.
++L<the masterE<sol>slave mode|smokeping_master_slave>.
+ 
+ If this variable is not specified, the value of C<datadir> will be used 
instead.
+ DOC
diff -Nru smokeping-2.6.9/debian/patches/series 
smokeping-2.6.9/debian/patches/series
--- smokeping-2.6.9/debian/patches/series       2013-03-16 18:07:00.000000000 
+0200
+++ smokeping-2.6.9/debian/patches/series       2014-06-23 11:06:11.000000000 
+0300
@@ -6,3 +6,5 @@
 fix-conf-path-cgi
 typo_642197
 fix-400d-graph
+fix-paths-inside-executables
+fix-pod-escaping
diff -Nru smokeping-2.6.9/debian/rules smokeping-2.6.9/debian/rules
--- smokeping-2.6.9/debian/rules        2013-03-16 18:07:00.000000000 +0200
+++ smokeping-2.6.9/debian/rules        2014-06-23 12:21:35.000000000 +0300
@@ -22,11 +22,7 @@
 TMP=$(CURDIR)/debian/smokeping
 
 override_dh_auto_configure:
-       aclocal
-       autoconf
-       automake
-       ./configure --prefix=/usr --with-htdocs-dir=/usr/share/smokeping/www 
--bindir=/usr/sbin --sysconfdir=/usr/share/doc/smokeping/
-
+       dh_auto_configure -- --prefix=/usr 
--with-htdocs-dir=/usr/share/smokeping/www --bindir=/usr/sbin 
--sysconfdir=/usr/share/doc/smokeping/
 
 override_dh_auto_install:
        dh_auto_install
@@ -47,4 +43,4 @@
        install -m 644 $(CURDIR)/debian/default-config 
$(TMP)/etc/smokeping/config
 
 %:
-       dh $@
+       dh $@ --with autoreconf

Reply via email to