[packages/smokeping] - up to 2.7.3

arekm arekm at pld-linux.org
Fri Mar 15 09:35:12 CET 2019


commit f0aa5ed4211abd3e005c9fb6e9b2011015a74991
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Mar 15 09:35:00 2019 +0100

    - up to 2.7.3

 fix-paths.patch                  | 194 ++++++++++++++++++---------------------
 high_precision_sleep_timer.patch |  73 ---------------
 smokeping.spec                   |  22 +++--
 3 files changed, 103 insertions(+), 186 deletions(-)
---
diff --git a/smokeping.spec b/smokeping.spec
index 3f1c3cd..6dba2e3 100644
--- a/smokeping.spec
+++ b/smokeping.spec
@@ -2,12 +2,12 @@
 Summary:	Smokeping - a latency grapher that uses rrdtool
 Summary(pl.UTF-8):	Smokeping - narzędzie do tworzenia wykresów opóźnień sieci
 Name:		smokeping
-Version:	2.6.11
-Release:	3
+Version:	2.7.3
+Release:	1
 License:	GPL v2+
 Group:		Networking/Utilities
 Source0:	http://oss.oetiker.ch/smokeping/pub/%{name}-%{version}.tar.gz
-# Source0-md5:	702392f5f3599f7eb1cc47eb2d192cb9
+# Source0-md5:	e0a8657241182f6c8bdb91cfca2589c7
 Source1:	%{name}.init
 Source2:	%{name}-apache.conf
 Source3:	%{name}-config
@@ -15,8 +15,10 @@ Source4:	%{name}-lighttpd.conf
 Source5:	%{name}.tmpfiles
 Source6:	%{name}-httpd.conf
 Patch0:		fix-paths.patch
-Patch1:		high_precision_sleep_timer.patch
+Patch1:		no-thirdparty.patch
 URL:		http://oss.oetiker.ch/smokeping/
+BuildRequires:	autoconf
+BuildRequires:	automake
 BuildRequires:	perl-Config-Grammar
 BuildRequires:	perl-rrdtool
 BuildRequires:	perl-tools-pod
@@ -106,6 +108,10 @@ sed -i -e 's#@prefix@/etc/\(.*\).dist#/etc/smokeping/\1#' etc/config.dist.in
 sed -i -e 's#@prefix@/etc/#/etc/smokeping/#' etc/config.dist.in
 
 %build
+[ ! -f VERSION ] && echo %{version} > VERSION
+%{__aclocal}
+%{__autoconf}
+%{__automake}
 %configure \
 	--enable-pkgonly
 %{__make}
@@ -128,7 +134,7 @@ rm -rf $RPM_BUILD_ROOT/etc/smokeping/examples
 
 mv $RPM_BUILD_ROOT%{_prefix}/lib/{*.pm,Smokeping} $RPM_BUILD_ROOT%{_datadir}/%{name}
 
-mv $RPM_BUILD_ROOT{%{_prefix}/htdocs/cropper,%{_cgi_bindir}}
+mv $RPM_BUILD_ROOT{%{_prefix}/htdocs/{css,js},%{_cgi_bindir}}
 mv $RPM_BUILD_ROOT%{_bindir}/smokeping_cgi $RPM_BUILD_ROOT%{_cgi_bindir}/smokeping.cgi
 
 mv $RPM_BUILD_ROOT%{_mandir}/man1/{smokeping_cgi.1,smokeping.cgi.1}
@@ -207,7 +213,8 @@ find /var/lib/smokeping/rrd -type d -user root -group root -exec chown smokeping
 %attr(755,root,root) %{_bindir}/smokeping
 %attr(755,root,root) %{_bindir}/tSmoke
 %{_datadir}/smokeping
-%exclude %{_cgi_bindir}/cropper
+%exclude %{_cgi_bindir}/css
+%exclude %{_cgi_bindir}/js
 %exclude %{_datadir}/smokeping/smokeping.*cgi
 %{_mandir}/man1/smokeping.1*
 %{_mandir}/man1/smokeping.cgi.1*
@@ -235,5 +242,6 @@ find /var/lib/smokeping/rrd -type d -user root -group root -exec chown smokeping
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_wwwconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_wwwconfdir}/httpd.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_wwwconfdir}/lighttpd.conf
-%{_cgi_bindir}/cropper
+%{_cgi_bindir}/css
+%{_cgi_bindir}/js
 %attr(755,root,root) %{_cgi_bindir}/smokeping.cgi
diff --git a/fix-paths.patch b/fix-paths.patch
index 1cafc5e..95c5f1f 100644
--- a/fix-paths.patch
+++ b/fix-paths.patch
@@ -1,100 +1,74 @@
-diff -urN smokeping-2.6.11.orig/doc/smokeping_install.pod smokeping-2.6.11/doc/smokeping_install.pod
---- smokeping-2.6.11.orig/doc/smokeping_install.pod	2013-11-14 10:42:22.000000000 +0100
-+++ smokeping-2.6.11/doc/smokeping_install.pod	2015-12-17 11:48:24.203504524 +0100
-@@ -152,7 +152,7 @@
- 
- =head2 Configuration
- 
--Use the F<etc/config.dist> file as a template to create your own smokeping configuration file.
-+Use the F</etc/smokeping/config> file as a template to create your own smokeping configuration file.
- See L<smokeping_config> for details.
- 
- =over
-diff -urN smokeping-2.6.11.orig/etc/basepage.html.dist smokeping-2.6.11/etc/basepage.html.dist
---- smokeping-2.6.11.orig/etc/basepage.html.dist	2012-04-02 09:20:35.000000000 +0200
-+++ smokeping-2.6.11/etc/basepage.html.dist	2015-12-17 11:48:24.211504620 +0100
-@@ -53,10 +53,10 @@
- -->
- </STYLE>
- 
--<script src="cropper/lib/prototype.js" type="text/javascript"></script>      
--<script src="cropper/lib/scriptaculous.js?load=builder,effects,dragdrop" type="text/javascript"></script>
--<script src="cropper/cropper.js" type="text/javascript"></script>
--<script src="cropper/smokeping-zoom.js" type="text/javascript"></script>
-+<script src="/smokeping/cropper/lib/prototype.js" type="text/javascript"></script>      
-+<script src="/smokeping/cropper/lib/scriptaculous.js?load=builder,effects,dragdrop" type="text/javascript"></script>
-+<script src="/smokeping/cropper/cropper.js" type="text/javascript"></script>
-+<script src="/smokeping/cropper/smokeping-zoom.js" type="text/javascript"></script>
- 
- 
- 
-diff -urN smokeping-2.6.11.orig/lib/Smokeping/Examples.pm smokeping-2.6.11/lib/Smokeping/Examples.pm
---- smokeping-2.6.11.orig/lib/Smokeping/Examples.pm	2011-10-05 11:51:46.000000000 +0200
-+++ smokeping-2.6.11/lib/Smokeping/Examples.pm	2015-12-17 11:48:24.208504584 +0100
-@@ -12,7 +12,7 @@
- This module generates L<smokeping_examples> and the example
- configuration files distributed with Smokeping. It is supposed to be
- invoked from the smokeping distribution top directory, as it will need
--the C<etc/config.dist> template configuration file and will create files
-+the C</etc/smokeping/config> template configuration file and will create files
- in the directories C<doc> and C<doc/examples>.
- 
- =head1 DESCRIPTION
-@@ -107,7 +107,7 @@
- ${e}head1 DESCRIPTION
- 
- Currently the examples differ only in the C<Probes> and C<Targets>
--sections. The other sections are taken from the C<etc/config.dist>
-+sections. The other sections are taken from the C</etc/smokeping/config>
- configuration template in the Smokeping distribution so that the example
- files are complete.
- 
-diff -urN smokeping-2.6.11.orig/lib/Smokeping.pm smokeping-2.6.11/lib/Smokeping.pm
---- smokeping-2.6.11.orig/lib/Smokeping.pm	2014-11-04 23:56:29.000000000 +0100
-+++ smokeping-2.6.11/lib/Smokeping.pm	2015-12-17 11:48:24.194504417 +0100
-@@ -3526,7 +3526,7 @@
- 
-  *** Probes ***
-  +FPing
-- binary = /usr/sepp/bin/fping
-+ binary = /usr/bin/fping
+diff -urN smokeping-2.7.3.org/bin/smokeinfo smokeping-2.7.3/bin/smokeinfo
+--- smokeping-2.7.3.org/bin/smokeinfo	2018-04-13 14:13:05.000000000 +0200
++++ smokeping-2.7.3/bin/smokeinfo	2019-03-15 09:15:16.281298555 +0100
+@@ -2,8 +2,7 @@
+ use strict;
+ use warnings;
  
- You can override it for a particular slave like this:
+-use lib (split /:/, q{}); # PERL5LIB
+-use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
++use lib "/usr/share/smokeping";
  
---- smokeping-2.6.11.orig/bin/smokeping	2011-10-05 11:51:46.000000000 +0200
-+++ smokeping-2.6.11/bin/smokeping	2015-12-22 10:41:23.876468254 +0100
-@@ -4,14 +4,11 @@
+ use Smokeping::Info;
+ use Getopt::Long 2.25 qw(:config no_ignore_case);
+diff -urN smokeping-2.7.3.org/bin/smokeping smokeping-2.7.3/bin/smokeping
+--- smokeping-2.7.3.org/bin/smokeping	2018-04-13 14:13:05.000000000 +0200
++++ smokeping-2.7.3/bin/smokeping	2019-03-15 09:13:44.808555196 +0100
+@@ -4,13 +4,11 @@
  use strict;
  use warnings;
  
+-use lib (split /:/, q{}); # PERL5LIB
 -use FindBin;
--# PERL5LIB
--use lib "$FindBin::Bin/../thirdparty/lib/perl5";
--use lib "$FindBin::Bin/../lib";
+-use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
 +use lib "/usr/share/smokeping";
  
  use Smokeping;
   
--Smokeping::main("$FindBin::Bin/../etc/config");
+-Smokeping::main("$FindBin::RealBin/../etc/config");
 +Smokeping::main("/etc/smokeping/config");
  
  =head1 NAME
  
---- smokeping-2.6.11.orig/bin/tSmoke	2011-10-05 11:51:46.000000000 +0200
-+++ smokeping-2.6.11/bin/tSmoke	2015-12-22 10:44:19.154562257 +0100
-@@ -51,10 +51,7 @@
- # -- Getopt::Long
+diff -urN smokeping-2.7.3.org/bin/smokeping_cgi smokeping-2.7.3/bin/smokeping_cgi
+--- smokeping-2.7.3.org/bin/smokeping_cgi	2018-04-13 14:13:05.000000000 +0200
++++ smokeping-2.7.3/bin/smokeping_cgi	2019-03-15 09:14:55.490675372 +0100
+@@ -4,9 +4,7 @@
+ use strict;
+ use warnings;
+ 
+-use lib (split /:/, q{}); # PERL5LIB
+-use FindBin;
+-use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
++use lib "/usr/share/smokeping";
+ 
+ # don't bother with zombies
+ $SIG{CHLD} = 'IGNORE';
+@@ -17,8 +15,7 @@
+ 
+ use CGI::Fast;
+ 
+-my $cfg = (shift @ARGV) || "$FindBin::Bin/../etc/config";
+-
++my $cfg = (shift @ARGV) || "/etc/smokeping/config";
+ 
+ while (my $q = new CGI::Fast) {
+    Smokeping::cgi($cfg,$q);
+diff -urN smokeping-2.7.3.org/bin/tSmoke smokeping-2.7.3/bin/tSmoke
+--- smokeping-2.7.3.org/bin/tSmoke	2018-04-13 14:13:05.000000000 +0200
++++ smokeping-2.7.3/bin/tSmoke	2019-03-15 09:14:23.476382053 +0100
+@@ -52,9 +52,7 @@
  #
  # Point the lib variables to your implementation
--use FindBin;
--# PERL5LIB
--use lib "$FindBin::Bin/../thirdparty/lib/perl5";
--use lib "$FindBin::Bin/../lib";
+ 
+-use lib (split /:/, q{}); # PERL5LIB
+-use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR
+-
 +use lib "/usr/share/smokeping";
  
  use Smokeping;
  use Net::SMTP;
-@@ -63,7 +60,7 @@
+@@ -63,7 +61,7 @@
  use RRDs;
  
  # Point to your Smokeping config file
@@ -103,40 +77,48 @@ diff -urN smokeping-2.6.11.orig/lib/Smokeping.pm smokeping-2.6.11/lib/Smokeping.
  
  # global variables
  my $cfg;
---- smokeping-2.6.11.orig/bin/smokeping_cgi	2011-10-05 11:51:46.000000000 +0200
-+++ smokeping-2.6.11/bin/smokeping_cgi	2015-12-22 10:45:24.548343500 +0100
-@@ -4,10 +4,7 @@
- use strict;
- use warnings;
+diff -urN smokeping-2.7.3.org/doc/smokeping_install.pod smokeping-2.7.3/doc/smokeping_install.pod
+--- smokeping-2.7.3.org/doc/smokeping_install.pod	2018-01-30 21:40:07.000000000 +0100
++++ smokeping-2.7.3/doc/smokeping_install.pod	2019-03-15 09:11:30.687864995 +0100
+@@ -108,7 +108,7 @@
  
--use FindBin;
--# PERL5LIB
--use lib "$FindBin::Bin/../thirdparty/lib/perl5";
--use lib "$FindBin::Bin/../lib";
-+use lib "/usr/share/smokeping";
+ =head2 Configuration
  
- # don't bother with zombies
- $SIG{CHLD} = 'IGNORE';
-@@ -18,7 +15,7 @@
+-Use the F<etc/config.dist> file as a template to create your own smokeping configuration file.
++Use the F</etc/smokeping/config> file as a template to create your own smokeping configuration file.
+ See L<smokeping_config> for details.
  
- use CGI::Fast;
+ =over
+diff -urN smokeping-2.7.3.org/lib/Smokeping/Examples.pm smokeping-2.7.3/lib/Smokeping/Examples.pm
+--- smokeping-2.7.3.org/lib/Smokeping/Examples.pm	2011-10-05 11:51:46.000000000 +0200
++++ smokeping-2.7.3/lib/Smokeping/Examples.pm	2019-03-15 09:11:30.687864995 +0100
+@@ -12,7 +12,7 @@
+ This module generates L<smokeping_examples> and the example
+ configuration files distributed with Smokeping. It is supposed to be
+ invoked from the smokeping distribution top directory, as it will need
+-the C<etc/config.dist> template configuration file and will create files
++the C</etc/smokeping/config> template configuration file and will create files
+ in the directories C<doc> and C<doc/examples>.
  
--my $cfg = (shift @ARGV) || "$FindBin::Bin/../etc/config";
-+my $cfg = (shift @ARGV) || "/etc/smokeping/config";
+ =head1 DESCRIPTION
+@@ -107,7 +107,7 @@
+ ${e}head1 DESCRIPTION
  
+ Currently the examples differ only in the C<Probes> and C<Targets>
+-sections. The other sections are taken from the C<etc/config.dist>
++sections. The other sections are taken from the C</etc/smokeping/config>
+ configuration template in the Smokeping distribution so that the example
+ files are complete.
  
- while (my $q = new CGI::Fast) {
---- smokeping-2.6.11.orig/bin/smokeinfo	2012-07-03 22:37:04.000000000 +0200
-+++ smokeping-2.6.11/bin/smokeinfo	2015-12-22 10:46:30.982137167 +0100
-@@ -2,10 +2,7 @@
- use strict;
- use warnings;
+diff -urN smokeping-2.7.3.org/lib/Smokeping.pm smokeping-2.7.3/lib/Smokeping.pm
+--- smokeping-2.7.3.org/lib/Smokeping.pm	2018-12-20 11:24:44.000000000 +0100
++++ smokeping-2.7.3/lib/Smokeping.pm	2019-03-15 09:13:01.330584016 +0100
+@@ -3620,7 +3620,7 @@
  
--use FindBin;
--# PERL5LIB
--use lib "$FindBin::Bin/../thirdparty/lib/perl5";
--use lib "$FindBin::Bin/../lib";
-+use lib "/usr/share/smokeping";
+  *** Probes ***
+  +FPing
+- binary = /usr/sepp/bin/fping
++ binary = /usr/bin/fping
+ 
+ You can override it for a particular slave like this:
  
- use Smokeping::Info;
- use Getopt::Long 2.25 qw(:config no_ignore_case);
diff --git a/high_precision_sleep_timer.patch b/high_precision_sleep_timer.patch
deleted file mode 100644
index 429ba13..0000000
--- a/high_precision_sleep_timer.patch
+++ /dev/null
@@ -1,73 +0,0 @@
---- smokeping-2.6.11.orig/lib/Smokeping.pm	2015-12-21 13:02:15.615786332 +0100
-+++ smokeping-2.6.11/lib/Smokeping.pm	2015-12-21 20:26:59.387447714 +0100
-@@ -10,7 +10,7 @@
- use SNMP_Session;
- # enable locale??
- #use locale;
--use POSIX qw(locale_h signal_h sys_wait_h);
-+use POSIX qw(fmod locale_h signal_h sys_wait_h);
- use Smokeping::Config;
- use RRDs;
- use Sys::Syslog qw(:DEFAULT setlogsock);
-@@ -21,6 +21,7 @@
- use Smokeping::RRDhelpers;
- use Smokeping::Graphs;
- use URI::Escape;
-+use Time::HiRes;
- 
- setlogsock('unix')
-    if grep /^ $^O $/xo, ("linux", "openbsd", "freebsd", "netbsd");
-@@ -4395,18 +4396,27 @@
- 
-     report_probes($probes, $myprobe);
- 
-+    my $now = Time::HiRes::time();
-+    my $longprobe = 0;
-     while (1) {
-         unless ($opt{nosleep} or $opt{debug}) {
--                my $sleeptime = $step - (time-$offset) % $step;
-+                my $sleeptime = $step - fmod($now-$offset, $step);
-+                my $logmsg = "Sleeping $sleeptime seconds.";
-+                if ($longprobe && $step-$sleeptime < 0.3) {
-+                    $logmsg = "NOT sleeping $sleeptime seconds, running probes immediately.";
-+                    $sleeptime = 0;
-+                }
-                 if (defined $myprobe) {
--                        $probes->{$myprobe}->do_debug("Sleeping $sleeptime seconds.");
-+                        $probes->{$myprobe}->do_debug($logmsg);
-                 } else {
--                        do_debuglog("Sleeping $sleeptime seconds.");
-+                        do_debuglog($logmsg);
-+                }
-+                if ($sleeptime > 0) {
-+                    Time::HiRes::sleep($sleeptime);
-                 }
--                sleep $sleeptime;
-                 last if checkhup($multiprocessmode, $gothup) && reload_cfg($cfgfile);
-         }
--        my $now = time;       
-+        my $startts = Time::HiRes::time();
-         run_probes $probes, $myprobe; # $myprobe is undef if running without 'concurrentprobes'
-         my %sortercache;
-         if ($opt{'master-url'}){            
-@@ -4430,8 +4440,11 @@
-             save_sortercache($cfg,\%sortercache,$myprobe);
-         }
-         exit 0 if $opt{debug};
--        my $runtime = time - $now;
-+        $now = Time::HiRes::time();
-+        my $runtime = $now - $startts;
-+        $longprobe = 0;
-         if ($runtime > $step) {
-+                $longprobe = 1;
-                 my $warn = "WARNING: smokeping took $runtime seconds to complete 1 round of polling. ".
-                 "It should complete polling in $step seconds. ".
-                 "You may have unresponsive devices in your setup.\n";
-@@ -4442,6 +4455,7 @@
-                 }
-         }
-         elsif ($runtime > $step * 0.8) {
-+                $longprobe = 1;
-                 my $warn = "NOTE: smokeping took $runtime seconds to complete 1 round of polling. ".
-                 "This is over 80% of the max time available for a polling cycle ($step seconds).\n";
-                 if (defined $myprobe) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/smokeping.git/commitdiff/f0aa5ed4211abd3e005c9fb6e9b2011015a74991



More information about the pld-cvs-commit mailing list