packages: mailgraph/mailgraph.init, mailgraph/mailgraph.spec - move cgi to ...
glen
glen at pld-linux.org
Tue Jul 13 15:55:53 CEST 2010
Author: glen Date: Tue Jul 13 13:55:53 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- move cgi to -cgi subpackage, main contains just collecting daemon
- switch to http user, drop hacking http user groups
- drop old migrate triggers
---- Files affected:
packages/mailgraph:
mailgraph.init (1.13 -> 1.14) , mailgraph.spec (1.52 -> 1.53)
---- Diffs:
================================================================
Index: packages/mailgraph/mailgraph.init
diff -u packages/mailgraph/mailgraph.init:1.13 packages/mailgraph/mailgraph.init:1.14
--- packages/mailgraph/mailgraph.init:1.13 Mon Jul 12 13:11:52 2010
+++ packages/mailgraph/mailgraph.init Tue Jul 13 15:55:47 2010
@@ -32,7 +32,7 @@
fi
msg_starting "mailgraph"
- daemon --user stats /usr/sbin/mailgraph.pl -d \
+ daemon --user http /usr/sbin/mailgraph.pl -d \
${STARTUP_OPTIONS} \
--daemon-rrd=/var/lib/mailgraph \
--daemon-pid=/var/lib/mailgraph/mailgraph.pid \
================================================================
Index: packages/mailgraph/mailgraph.spec
diff -u packages/mailgraph/mailgraph.spec:1.52 packages/mailgraph/mailgraph.spec:1.53
--- packages/mailgraph/mailgraph.spec:1.52 Tue Jul 13 09:39:11 2010
+++ packages/mailgraph/mailgraph.spec Tue Jul 13 15:55:47 2010
@@ -1,12 +1,12 @@
# $Revision$, $Date$
# TODO:
-# - make separate 2 packages: daemon and web-frontend
+# - lighttpd support
%include /usr/lib/rpm/macros.perl
Summary: Simple mail statistics for Postfix
Summary(pl.UTF-8): Proste statystyki dla Postfiksa
Name: mailgraph
Version: 1.14
-Release: 2
+Release: 2.3
License: GPL v2
Group: Applications/Networking
Source0: http://mailgraph.schweikert.ch/pub/%{name}-%{version}.tar.gz
@@ -23,12 +23,8 @@
BuildRequires: rpmbuild(macros) >= 1.268
Requires(post,preun): /sbin/chkconfig
Requires(triggerpostun): sed >= 4.0
-Requires: apache(mod_cgi)
-Requires: apache(mod_expires)
Requires: postfix
Requires: rc-scripts
-Requires: webapps
-Requires: webserver = apache
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -48,6 +44,18 @@
Postfiksa. Produkuje wykresy dzienne, tygodniowe, miesięczne i roczne
poczty wysłanej/odebranej i odbitej/odrzuconej.
+%package cgi
+Summary: CGI script for displaying mailgraph rrd data
+Group: Applications/WWW
+Requires: %{name} = %{version}-%{release}
+Requires: apache(mod_cgi)
+Requires: apache(mod_expires)
+Requires: webapps
+Requires: webserver
+
+%description cgi
+CGI script for displaying mailgraph rrd data.
+
%prep
%setup -q
%patch0 -p1
@@ -76,19 +84,12 @@
%clean
rm -rf $RPM_BUILD_ROOT
-%triggerin -- syslog >= 1.4.1-19
-m=$(%addusertogroup stats syslog)
-if [ -n "$m" ]; then
- echo >&2 "$m"
- %service %{name} restart
-fi
-
%post
/sbin/chkconfig --add %{name}
%service %{name} restart
if [ ! -f /var/log/mailgraph.log ]; then
touch /var/log/mailgraph.log
- chown stats /var/log/mailgraph.log
+ chown http /var/log/mailgraph.log
fi
%preun
@@ -97,65 +98,41 @@
/sbin/chkconfig --del %{name}
fi
-%triggerin -- apache1 < 1.3.37-3, apache1-base
-m=$(%addusertogroup http stats)
-if [ -n "$m" ]; then
- echo >&2 "$m"
- %service apache restart
-fi
+%triggerin cgi -- apache1 < 1.3.37-3, apache1-base
%webapp_register apache %{_webapp}
-%triggerun -- apache1 < 1.3.37-3, apache1-base
+%triggerun cgi -- apache1 < 1.3.37-3, apache1-base
%webapp_unregister apache %{_webapp}
-%triggerin -- apache < 2.2.0, apache-base
-m=$(%addusertogroup http stats)
-if [ -n "$m" ]; then
- echo >&2 "$m"
- %service httpd restart
-fi
+%triggerin cgi -- apache < 2.2.0, apache-base
%webapp_register httpd %{_webapp}
-%triggerun -- apache < 2.2.0, apache-base
+%triggerun cgi -- apache < 2.2.0, apache-base
%webapp_unregister httpd %{_webapp}
-%triggerpostun -- %{name} < 1.12-2.2
-# nuke very-old config location (this mostly for Ra)
-if [ -f /etc/httpd/httpd.conf ]; then
- sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
-fi
-
-# migrate from httpd (apache2) config dir
-if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
- cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
- mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
- sed -i -e 's,/usr/share/mailgraph,%{_appdir},' %{_sysconfdir}/httpd.conf
-fi
-
-rm -f /etc/httpd/conf.d/99_mailgraph.conf
-/usr/sbin/webapp register httpd %{_webapp}
-%service -q httpd reload
-
-%triggerpostun -- %{name} < 1.12-6
-chown stats:stats %{_pkglibdir}/*.rrd
+%triggerpostun -- %{name} < 1.14-2.1
+chown http:http %{_pkglibdir}/*.rrd
%files
%defattr(644,root,root,755)
%doc README CHANGES
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mailgraph
+%attr(754,root,root) /etc/rc.d/init.d/mailgraph
+%attr(755,root,root) %{_sbindir}/mailgraph.pl
+%{_mandir}/man1/mailgraph.1*
+%attr(770,root,http) %dir %{_pkglibdir}
+%ghost /var/log/mailgraph.log
+
+%files cgi
+%defattr(644,root,root,755)
%dir %attr(750,root,http) %{_sysconfdir}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mailgraph.css
-%attr(755,root,root) %{_sbindir}/mailgraph.pl
-%{_mandir}/man1/mailgraph.1*
-%attr(754,root,root) /etc/rc.d/init.d/mailgraph
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mailgraph
%dir %{_appdir}
%attr(755,root,root) %{_appdir}/index.cgi
%{_appdir}/mailgraph.css
-%attr(770,root,stats) %dir %{_pkglibdir}
%attr(775,root,http) %dir %{_pkglibdir}/img
-%ghost /var/log/mailgraph.log
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -163,6 +140,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.53 2010/07/13 13:55:47 glen
+- move cgi to -cgi subpackage, main contains just collecting daemon
+- switch to http user, drop hacking http user groups
+- drop old migrate triggers
+
Revision 1.52 2010/07/13 07:39:11 glen
- somewhy clamd was disabled, enable (thx algiss)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mailgraph/mailgraph.init?r1=1.13&r2=1.14&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mailgraph/mailgraph.spec?r1=1.52&r2=1.53&f=u
More information about the pld-cvs-commit
mailing list