postfix-mailgraph/postfix-mailgraph.spec

Mon, 20 Apr 2009 19:22:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 20 Apr 2009 19:22:00 +0200
changeset 178
0ba300bdf30a
parent 171
b72f2be1f619
child 193
9f27b979db4d
permissions
-rw-r--r--

Change unfortunate but partly useful overreaching security tradeoff.
The principle of allocating each running process an individual system
user and group can have security benefits, however maintining a plethora
of users, groups, processes, file modes, file permissions, and even
nonportable file ACLs on a host serving from a hundred processes has
some security disadvantages. This tradeoff is even worse for systems
like OpenPKG which benefit from administration transparency through the
use of minimal system intrusion and only three usage privilege levels.

michael@171 1 ##
michael@171 2 ## postfix-mailgraph.spec -- OpenPKG RPM Package Specification
michael@171 3 ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@171 4 ##
michael@171 5 ## Permission to use, copy, modify, and distribute this software for
michael@171 6 ## any purpose with or without fee is hereby granted, provided that
michael@171 7 ## the above copyright notice and this permission notice appear in all
michael@171 8 ## copies.
michael@171 9 ##
michael@171 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@171 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@171 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@171 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@171 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@171 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@171 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@171 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@171 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@171 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@171 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@171 21 ## SUCH DAMAGE.
michael@171 22 ##
michael@171 23
michael@171 24 # package information
michael@171 25 Name: postfix-mailgraph
michael@171 26 Summary: Postfix Mail Graphing
michael@171 27 URL: http://mailgraph.schweikert.ch/
michael@171 28 Vendor: David Schweikert
michael@171 29 Packager: OpenPKG Foundation e.V.
michael@171 30 Distribution: OpenPKG Community
michael@171 31 Class: EVAL
michael@171 32 Group: Mail
michael@171 33 License: GPL
michael@171 34 Version: 1.14
michael@172 35 Release: 20090416
michael@171 36
michael@171 37 # list of sources
michael@171 38 Source0: http://mailgraph.schweikert.ch/pub/mailgraph-%{version}.tar.gz
michael@171 39 Source1: rc.postfix-mailgraph
michael@171 40 Patch0: postfix-mailgraph.patch
michael@171 41
michael@171 42 # build information
michael@171 43 Prefix: %{l_prefix}
michael@171 44 BuildRoot: %{l_buildroot}
michael@171 45 BuildPreReq: OpenPKG, openpkg >= 20060823
michael@172 46 PreReq: OpenPKG, openpkg >= 20060823
michael@172 47 PreReq: postfix, perl, perl-sys
michael@172 48 PreReq: rrdtool, rrdtool::with_perl = yes
michael@171 49 AutoReq: no
michael@171 50 AutoReqProv: no
michael@171 51
michael@171 52 %description
michael@171 53 Mailgraph is a very simple mail statistics RRDtool frontend for the
michael@171 54 Postfix MTA that produces daily, weekly, monthly and yearly graphs
michael@171 55 of received/sent and bounced/rejected mail.
michael@171 56
michael@171 57 %track
michael@171 58 prog postfix-mailgraph = {
michael@171 59 version = %{version}
michael@171 60 url = http://mailgraph.schweikert.ch/pub/
michael@171 61 regex = mailgraph-(__VER__)\.tar\.gz
michael@171 62 }
michael@171 63
michael@171 64 %prep
michael@171 65 %setup -q -n mailgraph-%{version}
michael@171 66 %patch -p0
michael@171 67
michael@171 68 %build
michael@171 69
michael@171 70 %install
michael@171 71 rm -rf $RPM_BUILD_ROOT
michael@171 72 %{l_shtool} mkdir -f -p -m 755 \
michael@171 73 $RPM_BUILD_ROOT%{l_prefix}/sbin \
michael@171 74 $RPM_BUILD_ROOT%{l_prefix}/cgi \
michael@171 75 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
michael@171 76 $RPM_BUILD_ROOT%{l_prefix}/var/postfix-mailgraph/rrd \
michael@171 77 $RPM_BUILD_ROOT%{l_prefix}/var/postfix-mailgraph/img \
michael@171 78 $RPM_BUILD_ROOT%{l_prefix}/var/postfix-mailgraph/run
michael@171 79 %{l_shtool} install -c -m 755 \
michael@171 80 -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
michael@171 81 -e 's;/var/log/mailgraph\.log;%{l_prefix}/var/postfix-mailgraph/run/mailgraph.log;' \
michael@171 82 -e 's;/var/run/mailgraph\.pid;%{l_prefix}/var/postfix-mailgraph/run/mailgraph.pid;' \
michael@171 83 -e 's;/var/log/syslog;%{l_prefix}/var/postfix/log/postfix.log;' \
michael@171 84 -e 's;/var/log;%{l_prefix}/var/postfix-mailgraph/rrd;' \
michael@171 85 mailgraph.pl $RPM_BUILD_ROOT%{l_prefix}/sbin/mailgraph
michael@171 86 %{l_shtool} install -c -m 755 \
michael@171 87 -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
michael@171 88 -e 's;mailgraph\.cgi;mailgraph;' \
michael@171 89 -e 's;mailgraph\.rrd;%{l_prefix}/var/postfix-mailgraph/rrd/mailgraph.rrd;' \
michael@171 90 -e 's;mailgraph_virus\.rrd;%{l_prefix}/var/postfix-mailgraph/rrd/mailgraph_virus.rrd;' \
michael@171 91 -e 's;/tmp/mailgraph;%{l_prefix}/var/postfix-mailgraph/img;' \
michael@171 92 mailgraph.cgi $RPM_BUILD_ROOT%{l_prefix}/cgi/mailgraph
michael@171 93 %{l_shtool} install -c -m 755 %{l_value -s -a} \
michael@171 94 %{SOURCE rc.postfix-mailgraph} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
michael@171 95 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@171 96 %{l_files_std} \
michael@171 97 '%attr(755,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/postfix-mailgraph/img'
michael@171 98
michael@171 99 %files -f files
michael@171 100
michael@171 101 %clean
michael@171 102 rm -rf $RPM_BUILD_ROOT
michael@171 103

mercurial