Adding support for LOG_LEVEL_CGI
[privoxy.git] / junkbuster-rh.spec
1 # $Id: junkbuster-rh.spec,v 1.13 2001/09/10 17:44:43 swa Exp $
2 #
3 # Written by and Copyright (C) 2001 the SourceForge
4 # IJBSWA team.  http://ijbswa.sourceforge.net
5 #
6 # Based on the Internet Junkbuster originally written
7 # by and Copyright (C) 1997 Anonymous Coders and 
8 # Junkbusters Corporation.  http://www.junkbusters.com
9 #
10 # This program is free software; you can redistribute it 
11 # and/or modify it under the terms of the GNU General
12 # Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at
14 # your option) any later version.
15 #
16 # This program is distributed in the hope that it will
17 # be useful, but WITHOUT ANY WARRANTY; without even the
18 # implied warranty of MERCHANTABILITY or FITNESS FOR A
19 # PARTICULAR PURPOSE.  See the GNU General Public
20 # License for more details.
21 #
22 # The GNU General Public License should be included with
23 # this file.  If not, you can view it at
24 # http://www.gnu.org/copyleft/gpl.html
25 # or write to the Free Software Foundation, Inc., 59
26 # Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27 #
28 # $Log: junkbuster-rh.spec,v $
29 # Revision 1.13  2001/09/10 17:44:43  swa
30 # integrate three pieces of documentation. needs work.
31 # will not build cleanly under redhat.
32 #
33 # Revision 1.12  2001/09/10 16:25:04  swa
34 # copy all templates. version updated.
35 #
36 # Revision 1.11  2001/07/03 11:00:25  sarantis
37 # replaced permissionsfile with actionsfile
38 #
39 # Revision 1.10  2001/07/03 09:34:44  sarantis
40 # bumped up version number.
41 #
42 # Revision 1.9  2001/06/12 18:15:29  swa
43 # the % in front of configure (see tag below) confused
44 # the rpm build process on 7.1.
45 #
46 # Revision 1.8  2001/06/12 17:15:56  swa
47 # fixes, because a clean build on rh6.1 was impossible.
48 # GZIP confuses make, % configure confuses rpm, etc.
49 #
50 # Revision 1.7  2001/06/11 12:17:26  sarantis
51 # fix typo in %post
52 #
53 # Revision 1.6  2001/06/11 11:28:25  sarantis
54 # Further optimizations and adaptations in the spec file.
55 #
56 # Revision 1.5  2001/06/09 09:14:11  swa
57 # shamelessly adapted RPM stuff from the newest rpm that
58 # RedHat provided for the JB.
59 #
60 # Revision 1.4  2001/06/08 20:54:18  swa
61 # type with status file. remove forward et. al from file list.
62 #
63 # Revision 1.3  2001/06/07 17:28:10  swa
64 # cosmetics
65 #
66 # Revision 1.2  2001/06/04 18:31:58  swa
67 # files are now prefixed with either `confdir' or `logdir'.
68 # `make redhat-dist' replaces both entries confdir and logdir
69 # with redhat values
70 #
71 # Revision 1.1  2001/06/04 10:44:57  swa
72 # `make redhatr-dist' now works. Except for the paths
73 # in the config file.
74 #
75 #
76 #
77 Summary: The Internet Junkbuster
78 Vendor: http://ijbswa.sourceforge.net
79 Name: junkbuster
80 Version: 2.9.8
81 Release: 1
82 Source0: http://www.waldherr.org/junkbuster/ijbswa.tar.gz
83 Copyright: GPL
84 BuildRoot: %{_tmppath}/%{name}-root
85 Group: Networking/Utilities
86 URL: http://ijbswa.sourceforge.net/
87 Packager: Stefan Waldherr <stefan@waldherr.org>
88 Obsoletes: junkbuster-raw junkbuster-blank
89 Prereq: /usr/sbin/useradd , /sbin/chkconfig , /sbin/service 
90 Conflicts: junkbuster-raw junkbuster-blank
91
92 %description
93 The Internet Junkbuster is an application that provides privacy and
94 security to the user of the world wide web. It controls cookies,
95 removes advertisements or pop-up windows. You can actually modify the
96 content of web pages on-the-fly.
97
98 %define ijbconf %{_sysconfdir}/junkbuster
99
100 %prep
101 %setup -c -n ijbswa
102
103 %build
104 ./configure
105 make
106 strip junkbuster
107
108 %pre
109 /usr/sbin/useradd -d /etc/junkbuster -u 73 -r junkbust > /dev/null 2>&1 || /bin/true
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} \
114          ${RPM_BUILD_ROOT}%{_mandir}/man8 \
115          ${RPM_BUILD_ROOT}/var/log/junkbuster \
116          ${RPM_BUILD_ROOT}%{ijbconf}/templates \
117          ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d \
118          ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
119
120 install -s -m 744 junkbuster $RPM_BUILD_ROOT%{_sbindir}/junkbuster
121 # cp -f junkbuster.1 $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8
122 cp -f actionsfile $RPM_BUILD_ROOT%{ijbconf}/actionsfile
123 cp -f re_filterfile $RPM_BUILD_ROOT%{ijbconf}/re_filterfile
124 cp -f trust $RPM_BUILD_ROOT%{ijbconf}/trust
125 cp -f templates/*  $RPM_BUILD_ROOT%{ijbconf}/templates/
126 cp -f junkbuster.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/junkbuster
127 install -m 755 junkbuster.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/junkbuster
128 install -m 744 -d $RPM_BUILD_ROOT/var/log/junkbuster
129
130 # verify all file locations, etc. in the config file
131 # don't start with ^ or commented lines are not replaced
132 cat config | \
133     sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
134 #    sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
135 #    sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
136 #    sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
137 #    sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
138 #    sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
139 #    sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
140     sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
141     $RPM_BUILD_ROOT%{ijbconf}/config
142
143 %post
144 if [ "$1" = "1" ]; then
145         /sbin/chkconfig --add junkbuster
146 fi
147
148 %preun
149 if [ "$1" = "0" ]; then
150         /sbin/service junkbuster stop > /dev/null 2>&1 ||:
151         /sbin/chkconfig --del junkbuster
152 fi
153
154 %postun
155 if [ "$1" -ge "1" ]; then
156         /sbin/service junkbuster condrestart > /dev/null 2>&1
157 fi
158
159 %clean
160 rm -rf $RPM_BUILD_ROOT
161
162 %files
163 %defattr(-,root,root)
164 %doc faq.html user-manual.html developer-manual.html
165 %doc junkbuster.weekly junkbuster.monthly
166 %dir %{ijbconf}
167 %config %{ijbconf}/*
168 %attr(0744,junkbust,junkbust) %dir /var/log/junkbuster
169 %config %{_sysconfdir}/logrotate.d/junkbuster
170 %attr(0744,junkbust,junkbust)/usr/sbin/junkbuster
171 # %{_mandir}/man8/*
172 %config %{_sysconfdir}/rc.d/init.d/junkbuster
173
174
175 %changelog
176
177 * Sun Jun  3 2001 Stefan Waldherr <stefan@waldherr.org>
178 - rework of RPM
179
180 * Mon Sep 25 2000 Stefan Waldherr <stefan@waldherr.org>
181 - CLF Logging patch by davep@cyw.uklinux.net
182 - Hal DeVore <haldevore@earthling.net> fix akamaitech in blocklist
183
184 * Sun Sep 17 2000 Stefan Waldherr <stefan@waldherr.org>
185 - Steve Kemp skx@tardis.ed.ac.uk's javascript popup patch.
186 - Markus Breitenbach breitenb@rbg.informatik.tu-darmstadt.de supplied
187   numerous fixes and enhancements for Steve's patch.
188 - adamlock@netscape.com (Adam Lock) in the windows version:
189   - Taskbar activity spinner always spins even when logging is
190   turned off (which is the default) - people who don't
191   like the spinner can turn it off from a menu option.
192   - Taskbar popup menu has a options submenu - people can now
193   open the settings files for cookies, blockers etc.
194   without opening the JB window.
195   - Logging functionality works again
196   - Buffer overflow is fixed - new code uses a bigger buffer
197   and snprintf so it shouldn't overflow anymore.
198 - Fixed userid swa, group learning problem while installing.
199   root must build RPM.
200 - Added patch by Benjamin Low <ben@snrc.uow.edu.au> that prevents JB to
201   core dump when there is no log file.
202 - Tweaked SuSE startup with the help of mohataj@gmx.net and Doc.B@gmx.de.
203 - Fixed man page to include imagefile and popupfile.
204 - Sanity check for the statistics function added.
205 - "Patrick D'Cruze" <pdcruze@orac.iinet.net.au>: It seems Microsoft
206  are transitioning Hotmail from FreeBSD/Apache to Windows 2000/IIS.
207  With IIS/5, it appears to omit the trailing \r\n from http header
208  only messages.  eg, when I visit http://www.hotmail.com, IIS/5
209  responds with a HTTP 302 redirect header.  However, this header
210  message is missing the trailing \r\n.  IIS/5 then closes the
211  connection.  Junkbuster, unfortunately, discards the header becomes
212  it thinks it is incomplete - and it is.  MS have transmitted an
213  incomplete header!
214 - Added bug reports and patch submission forms in the docs.
215
216 * Mon Mar 20 2000 Stefan Waldherr <stefan@waldherr.org>
217        Andrew <anw@tirana.freewire.co.uk> extended the JB:
218        Display of statistics of the total number of requests and the number
219        of requests filtered by junkbuster, also the percentage of requests
220        filtered. Suppression of the listing of files on the proxy-args page.
221        All stuff optional and configurable.
222
223 * Sun Sep 12 1999 Stefan Waldherr <stefan@waldherr.org>
224        Jan Willamowius (jan@janhh.shnet.org) fixed a bug in the 
225        code which prevented the JB from handling URLs of the form
226        user:password@www.foo.com. Fixed.
227
228 * Mon Aug  2 1999 Stefan Waldherr <stefan@waldherr.org>
229         Blank images are no longer cached, thanks to a hint from Markus 
230         Breitenbach <breitenb@rbg.informatik.tu-darmstadt.de>. The user 
231         agent is NO longer set by the Junkbuster. Sadly, many sites depend 
232         on the correct browser version nowadays. Incorporated many 
233         suggestions from Jan "Yenya" Kasprzak <kas@fi.muni.cz> for the
234         spec file. Fixed logging problem and since runlevel 2 does not 
235         use networking, I replaced /etc/rc.d/rc2.d/S84junkbuster with
236         /etc/rc.d/rc2.d/K09junkbuster thanks to Shaw Walker 
237         <walker@netgate.net>. You should now be able to build this RPM as 
238         a non-root user (mathias@weidner.sem.lipsia.de).
239
240 * Sun Jan 31 1999 Stefan Waldherr <stefan@waldherr.org>
241         /var/log/junkbuster set to nobody. Added /etc/junkbuster/imagelist
242         to allow more sophisticated matching of blocked images. Logrotate
243         logfile. Added files for auto-updating the blocklist et al.
244
245 * Wed Dec 16 1998 Stefan Waldherr <stefan@waldherr.org>
246         Configure blank version via config file. No separate blank
247         version anymore. Added Roland's <roland@spinnaker.rhein.de>
248         patch to show a logo instead of a blank area. Added a suggestion
249         from Alex <alex@cocoa.demon.co.uk>: /var/lock/subsys/junkbuster.
250         More regexps in the blocklist. Prepared the forwardfile for
251         squid. Extended image regexp with help from gabriel 
252         <somlo@CS.ColoState.EDU>.
253
254 * Thu Nov 19 1998 Stefan Waldherr <stefan@waldherr.org>
255         All RPMs now identify themselves in the show-proxy-args page.
256         Released Windoze version. Run junkbuster as nobody instead of
257         root. 
258
259 * Fri Oct 30 1998 Stefan Waldherr <stefan@waldherr.org>
260         Newest version. First release (hence the little version number
261         mixture -- 2.0.2-0 instead of 2.0-7). This version tightens 
262         security over 2.0.1; some multi-user sites will need to change 
263         the listen-address in the configuration file. The blank version of
264         the Internet Junkbuster has a more sophisticated way of replacing
265         images. All RPMs identify themselves in the show-proxy-args page.
266
267 * Thu Sep 23 1998 Stefan Waldherr <stefan@waldherr.org>
268         Modified the blocking feature, so that only GIFs and JPEGs are
269         blocked and replaced but not HTML pages. Thanks to 
270         "Gerd Flender" <plgerd@informatik.uni-siegen.de> for this nice
271         idea. Added numerous stuff to the blocklist. Keep patches in
272         seperate files and no longer in diffs (easier to maintain).
273
274 * Tue Jun 16 1998 Stefan Waldherr <swa@cs.cmu.edu>
275         Moved config files to /etc/junkbuster directory, moved man page,
276         added BuildRoot directive (Thanks to Alexey Nogin <ayn2@cornell.edu>)
277         Made new version junkbuster-raw (which is only a stripped version of 
278         the junkuster rpm, i.e. without my blocklist, etc.)
279
280 * Tue Jun 16 1998 (2.0-1)
281         Uhm, not that much. Just a new junkbuster version that
282         fixes a couple of bugs ... and of course a bigger 
283         blocklist with the unique Now-less-ads-than-ever(SM)
284         feature.
285         Oh, one thing: I changed the default user agent to Linux -- no 
286         need anymore to support Apple.
287
288 * Tue Jun 16 1998 (2.0-0)
289         Now-less-ads-than-ever (SM)
290         compiled with gcc instead of cc
291         compiled with -O3, thus it should be a little faster
292         show-proxy-args now works
293         /etc/junkbuster.init wasn't necessary
294
295 * Tue Jun 16 1998 (1.4)
296         some more config files were put into /etc
297         The junkbuster-blank rpm returns a 1x1 pixel image, that gets 
298         displayed by Netscape instead of the blocked image.
299         Read http://www.waldherr.org/junkbuster/ for
300         further info.
301
302 * Tue Jun 16 1998 (1.3)
303         The program has been moved to /usr/sbin (from /usr/local/bin)
304         Init- and stopscripts (/etc/rc.d/rc*) have been added so
305         that the junkbuster starts automatically during bootup.
306         The /etc/blocklist file is much more sophisticated. Theoretically
307         one should e.g. browse all major US and German newspapers without
308         seeing one annoying ad.
309         junkbuster.init was modified. It now starts junkbuster with an
310         additional "-r @" flag.