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