Hello community, here is the log from the commit of package mailgraph for openSUSE:Factory checked in at 2019-07-01 10:44:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mailgraph (Old) and /work/SRC/openSUSE:Factory/.mailgraph.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mailgraph" Mon Jul 1 10:44:13 2019 rev:4 rq:706139 version:1.14 Changes: -------- --- /work/SRC/openSUSE:Factory/mailgraph/mailgraph.changes 2017-11-24 10:56:13.416443302 +0100 +++ /work/SRC/openSUSE:Factory/.mailgraph.new.4615/mailgraph.changes 2019-07-01 10:44:14.557464507 +0200 @@ -1,0 +2,39 @@ +Tue May 28 21:02:11 UTC 2019 - chris@computersalat.de + +- change dependency of systemd to pkgconfig(systemd) + +------------------------------------------------------------------- +Fri May 17 21:07:06 UTC 2019 - chris@computersalat.de + +- merge changes +- cleanup spec +- cleanup service file +- remove perl(RRDs) cause it is Provided by rrdtool + +------------------------------------------------------------------- +Sun May 12 15:25:33 UTC 2019 - lars@linux-schulserver.de - 1.14 + +- Require perl(RRDs) +- added mailgraph-1.14-tracking.patch to stop requesting an image + from http://oss.oetiker.ch every time the mailgraph.cgi is opened + including new source: rrdtool.gif +- added mailgraph-1.14-add_postgrey_and_greylisting_support.patch + which adds support (graphs) to postgrey and greylisting +- added mailgraph-1.14-add_postscreen_support.patch which handles + postscreen in the same way as smtpd +- added mailgraph.service file -> use systemd + +------------------------------------------------------------------- +Fri Dec 21 12:47:46 UTC 2018 - chris@computersalat.de + +- fix for boo#1116020 + * add systemd support + * add file mailgraph.service + * set defaults in sysconfig file +- format_spec_file +- use %license +- rebase mailgraph_for_nagios-plugins-mailgraph.patch +- rework mailgraph-1.14-pl.patch + * add support for rsyslog + +------------------------------------------------------------------- New: ---- mailgraph-1.14-add_postgrey_and_greylisting_support.patch mailgraph-1.14-add_postscreen_support.patch mailgraph-1.14-tracking.patch mailgraph.service rrdtool.gif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mailgraph.spec ++++++ --- /var/tmp/diff_new_pack.pqb2Ub/_old 2019-07-01 10:44:15.177465519 +0200 +++ /var/tmp/diff_new_pack.pqb2Ub/_new 2019-07-01 10:44:15.177465519 +0200 @@ -1,7 +1,7 @@ # # spec file for package mailgraph # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -28,15 +28,17 @@ Name: mailgraph Version: 1.14 Release: 0 -Summary: Very simple mail statistics RRDtool frontend for Postfix -License: GPL-2.0+ +Summary: RRDtool frontend for Mail statistics +License: GPL-2.0-or-later Group: Productivity/Networking/Diagnostic Url: http://mailgraph.schweikert.ch/ Source0: %{name}-%{version}.tar.bz2 Source1: %{name}.init -Source2: %{name}.logrotate -Source3: %{name}.sysconfig -# PATCH-FIX-openSUSE -- adapt pathnames for daemon_logfile and daemon_rrd_dir to openSUSE +Source2: %{name}.service +Source3: %{name}.logrotate +Source4: %{name}.sysconfig +Source5: rrdtool.gif +# PATCH-FIX-openSUSE -- rsyslog support, adapt pathnames for daemon_logfile and daemon_rrd_dir to openSUSE Patch0: %{name}-1.14-pl.patch # PATCH-FIX-openSUSE -- adapt/enhance css usage and skip $uri in ref Patch1: %{name}-1.14-cgi.patch @@ -44,23 +46,33 @@ Patch2: %{name}-1.14-css.patch # PATCH-FIX-openSUSE -- integrate patch from nagios-plugins-mailgraph Patch3: mailgraph_for_nagios-plugins-mailgraph.patch +# PATCH-FIX-UPSTREAM -- do not get an image from http://oss.oetiker.ch every time the mailgraph.cgi is called +Patch4: mailgraph-1.14-tracking.patch +# PATCH-FIX-UPSTREAM -- include postgrey and greylisting graphs in output (and add corresponding options) +Patch5: mailgraph-1.14-add_postgrey_and_greylisting_support.patch +# PATCH-FIX-UPSTREAM -- handle postscreen in the same way as smtpd +Patch6: mailgraph-1.14-add_postscreen_support.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch BuildRequires: apache2-devel -PreReq: coreutils -PreReq: diffutils -PreReq: fillup -PreReq: grep -PreReq: sed -PreReq: %insserv_prereq +Requires(pre): %fillup_prereq Requires: apache2-mod_perl Requires: logrotate Requires: postfix Requires: rrdtool Requires: perl(File::Tail) -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch +# %if 0%{?suse_version} > 1100 Provides: %{css_dir} %endif +# +%if 0%{?suse_version} >= 1210 +BuildRequires: pkgconfig(systemd) +%{?systemd_requires} +%define has_systemd 1 +%else +Requires(pre): %insserv_prereq +%endif %description Mailgraph is a very simple mail statistics RRDtool frontend for Postfix @@ -73,52 +85,84 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build %install -%{__install} -d -m 755 %{buildroot}%{_bindir} %{buildroot}%{_sbindir} -%{__install} -d -m 755 %{buildroot}%{_fillupdir} -%{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/img -%{__install} -d -m 755 %{buildroot}%{_localstatedir}/log/%{name} -%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/init.d -%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d -%{__install} -d -m 755 %{buildroot}%{cgi_dir} -%{__install} -d -m 755 %{buildroot}%{css_dir} - -%{__install} -m 755 %{name}.pl %{buildroot}%{_bindir}/ -%{__install} -m 755 %{name}.cgi %{buildroot}%{cgi_dir}/ -%{__install} -m 644 %{name}.css %{buildroot}%{css_dir}/ -%{__install} -m 755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name} -%{__install} -m 644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} -%{__install} -m 644 %{S:3} %{buildroot}%{_fillupdir}/sysconfig.%{name} -%{__ln_s} -f ../../etc/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} +install -d -m 755 %{buildroot}%{_sbindir} +install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/img +install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name} + +install -D -m 755 %{name}.pl %{buildroot}%{_bindir}/%{name}.pl +install -D -m 755 %{name}.cgi %{buildroot}%{cgi_dir}/%{name}.cgi +install -D -m 644 %{name}.css %{buildroot}%{css_dir}/%{name}.css +install -D -m 644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +install -D -m 644 %{S:4} %{buildroot}%{_fillupdir}/sysconfig.%{name} +install -D -m 644 %{S:5} %{buildroot}%{css_dir}/rrdtool.gif + +# systemd vs SysVinit +%if 0%{?has_systemd} +install -D -m 0644 %{S:2} %{buildroot}%{_unitdir}/%{name}.service +ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name} +%else #SysVinit +install -D -m 0755 %{S:1} %{buildroot}/%{_sysconfdir}/init.d/%{name} +ln -sf %{_sysconfdir}/init.d/%{name} %{buildroot}/%{_sbindir}/rc%{name} +%endif -%post -%{fillup_and_insserv mailgraph} +%pre +%if 0%{?has_systemd} +%service_add_pre %{name}.service +%endif %preun -%stop_on_removal mailgraph +%if 0%{?has_systemd} +%service_del_preun %{name}.service +%else +%stop_on_removal %{name} +%endif + +%post +%if 0%{?has_systemd} +%service_add_post %{name}.service +%{fillup_only mailgraph} +%else +%{fillup_and_insserv -f mailgraph} +install -d %{_localstatedir}/run/%{name} +%endif %postun -%restart_on_update mailgraph +%if 0%{?has_systemd} +%service_del_postun %{name}.service +%else +%restart_on_update %{name} %{insserv_cleanup} - -%clean -%{__rm} -rf %{buildroot} +%endif %files %defattr(-,root,root) -%doc CHANGES COPYING README +%doc CHANGES README +%if 0%{?suse_version} >= 01200 +%license COPYING +%else +%doc COPYING +%endif +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%{_fillupdir}/sysconfig.%{name} %dir %{_localstatedir}/lib/%{name} %attr(755,wwwrun,www) %dir %{_localstatedir}/lib/%{name}/img %dir %{_localstatedir}/log/%{name} %{_bindir}/%{name}.pl %{_sbindir}/rc%{name} +%if 0%{?has_systemd} +%{_unitdir}/%{name}.service +%else +%{_sysconfdir}/init.d/%{name} +%endif %{cgi_dir}/%{name}.cgi %{css_dir}/%{name}.css -%{_sysconfdir}/init.d/%{name} -%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%{_fillupdir}/sysconfig.%{name} +%{css_dir}/rrdtool.gif %changelog ++++++ mailgraph-1.14-add_postgrey_and_greylisting_support.patch ++++++ Index: mailgraph-1.14/mailgraph.cgi =================================================================== --- mailgraph-1.14.orig/mailgraph.cgi +++ mailgraph-1.14/mailgraph.cgi @@ -28,12 +28,14 @@ my @graphs = ( ); my %color = ( - sent => '000099', # rrggbb in hex - received => '009900', - rejected => 'AA0000', - bounced => '000000', - virus => 'DDBB00', - spam => '999999', + sent => '000099', # rrggbb in hex + received => '009900', + rejected => 'AA0000', + bounced => '000000', + virus => 'DDBB00', + spam => '999999', + greylisted => '999999', + delayed => '006400', ); sub rrd_graph(@) @@ -151,6 +153,36 @@ sub graph_err($$) ); } +sub graph_grey($$) +{ + my ($range, $file) = @_; + my $step = $range*$points_per_sample/$xpoints; + rrd_graph($range, $file, $ypoints_grey, + "DEF:greylisted=$rrd_greylist:greylisted:AVERAGE", + "DEF:mgreylisted=$rrd_greylist:greylisted:MAX", + "CDEF:rgreylisted=greylisted,60,*", + "CDEF:dgreylisted=greylisted,UN,0,greylisted,IF,$step,*", + "CDEF:sgreylisted=PREV,UN,dgreylisted,PREV,IF,dgreylisted,+", + "CDEF:rmgreylisted=mgreylisted,60,*", + "AREA:rgreylisted#$color{greylisted}:Greylisted", + 'GPRINT:sgreylisted:MAX:total\: %8.0lf msgs', + 'GPRINT:rgreylisted:AVERAGE:avg\: %5.2lf msgs/min', + 'GPRINT:rmgreylisted:MAX:max\: %4.0lf msgs/min\l', + + "DEF:delayed=$rrd_greylist:delayed:AVERAGE", + "DEF:mdelayed=$rrd_greylist:delayed:MAX", + "CDEF:rdelayed=delayed,60,*", + "CDEF:ddelayed=delayed,UN,0,delayed,IF,$step,*", + "CDEF:sdelayed=PREV,UN,ddelayed,PREV,IF,ddelayed,+", + "CDEF:rmdelayed=mdelayed,60,*", + "LINE2:rdelayed#$color{delayed}:Delayed ", + 'GPRINT:sdelayed:MAX:total\: %8.0lf msgs', + 'GPRINT:rdelayed:AVERAGE:avg\: %5.2lf msgs/min', + 'GPRINT:rmdelayed:MAX:max\: %4.0lf msgs/min\l', + ); +} + + sub print_html() { print "Content-Type: text/html\n\n"; @@ -180,6 +212,7 @@ HEADER print "