1 # $Id: junkbuster-rh.spec,v 1.13 2001/09/10 17:44:43 swa Exp $
3 # Written by and Copyright (C) 2001 the SourceForge
4 # IJBSWA team. http://ijbswa.sourceforge.net
6 # Based on the Internet Junkbuster originally written
7 # by and Copyright (C) 1997 Anonymous Coders and
8 # Junkbusters Corporation. http://www.junkbusters.com
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.
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.
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.
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.
33 # Revision 1.12 2001/09/10 16:25:04 swa
34 # copy all templates. version updated.
36 # Revision 1.11 2001/07/03 11:00:25 sarantis
37 # replaced permissionsfile with actionsfile
39 # Revision 1.10 2001/07/03 09:34:44 sarantis
40 # bumped up version number.
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.
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.
50 # Revision 1.7 2001/06/11 12:17:26 sarantis
53 # Revision 1.6 2001/06/11 11:28:25 sarantis
54 # Further optimizations and adaptations in the spec file.
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.
60 # Revision 1.4 2001/06/08 20:54:18 swa
61 # type with status file. remove forward et. al from file list.
63 # Revision 1.3 2001/06/07 17:28:10 swa
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
71 # Revision 1.1 2001/06/04 10:44:57 swa
72 # `make redhatr-dist' now works. Except for the paths
77 Summary: The Internet Junkbuster
78 Vendor: http://ijbswa.sourceforge.net
82 Source0: http://www.waldherr.org/junkbuster/ijbswa.tar.gz
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
93 The Internet Junkbuster stops your browser from displaying the
94 advertisement images that pervade many commercial web pages. Since
95 your browser has to download fewer images, surfing the web should be
98 %define ijbconf %{_sysconfdir}/junkbuster
104 OPT_FLAGS="$RPM_OPT_FLAGS -Ipcre -Wall"
106 make "CFLAGS=$OPT_FLAGS"
110 /usr/sbin/useradd -d /etc/junkbuster -u 73 -r junkbust -s "" > /dev/null 2>&1 || /bin/true
113 rm -rf $RPM_BUILD_ROOT
114 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} \
115 ${RPM_BUILD_ROOT}%{_mandir}/man8 \
116 ${RPM_BUILD_ROOT}/var/log/junkbuster \
117 ${RPM_BUILD_ROOT}%{ijbconf}/templates \
118 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d \
119 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
121 install -s -m 744 junkbuster $RPM_BUILD_ROOT%{_sbindir}/junkbuster
123 #cp -f junkbuster.1 $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8
124 cp -f actionsfile $RPM_BUILD_ROOT%{ijbconf}/actionsfile
125 cp -f re_filterfile $RPM_BUILD_ROOT%{ijbconf}/re_filterfile
126 cp -f trust $RPM_BUILD_ROOT%{ijbconf}/trust
127 cp -f templates/* $RPM_BUILD_ROOT%{ijbconf}/templates/
128 cp -f junkbuster.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/junkbuster
129 install -m 755 junkbuster.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/junkbuster
130 install -m 744 -d $RPM_BUILD_ROOT/var/log/junkbuster
132 # verify all file locations, etc. in the config file
133 # don't start with ^ or commented lines are not replaced
135 sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
136 # sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
137 # sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
138 # sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
139 # sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
140 # sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
141 # sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
142 sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
143 $RPM_BUILD_ROOT%{ijbconf}/config
146 if [ "$1" = "1" ]; then
147 /sbin/chkconfig --add junkbuster
149 # for upgrade from 2.0.x
150 chown junkbust:junkbust /var/log/junkbuster/* 2>/dev/null
151 chown junkbust:junkbust /etc/junkbuster 2>/dev/null
152 [ -f /var/log/junkbuster/junkbuster ] &&\
153 mv -f /var/log/junkbuster/junkbuster /var/log/junkbuster/logfile || true
156 if [ "$1" = "0" ]; then
157 /sbin/service junkbuster stop > /dev/null 2>&1 ||:
158 /sbin/chkconfig --del junkbuster
162 if [ "$1" -ge "1" ]; then
163 /sbin/service junkbuster condrestart > /dev/null 2>&1
167 rm -rf $RPM_BUILD_ROOT
170 %defattr(-,root,root)
171 %doc doc/webserver/developer-manual doc/webserver/user-manual README
172 %doc junkbuster.weekly junkbuster.monthly
175 %attr(0744,junkbust,junkbust) %dir /var/log/junkbuster
176 %config %{_sysconfdir}/logrotate.d/junkbuster
177 %attr(0744,junkbust,junkbust)/usr/sbin/junkbuster
178 #temporarily out until it is updated.
180 %config %{_sysconfdir}/rc.d/init.d/junkbuster
184 * Sun Sep 23 2001 Hal Burgiss <hal@foobox.net>
185 - Change of $RPM_OPT_FLAGS handling. Added new HTML doc files.
186 - Changed owner of /etc/junkbuster to shut up PAM/xauth log noise.
188 * Thu Sep 13 2001 Hal Burgiss <hal@foobox.net>
189 - Added $RPM_OPT_FLAGS support, renaming of old logfile, and
190 - made sure no default shell exists for user junkbust.
192 * Sun Jun 3 2001 Stefan Waldherr <stefan@waldherr.org>
195 * Mon Sep 25 2000 Stefan Waldherr <stefan@waldherr.org>
196 - CLF Logging patch by davep@cyw.uklinux.net
197 - Hal DeVore <haldevore@earthling.net> fix akamaitech in blocklist
199 * Sun Sep 17 2000 Stefan Waldherr <stefan@waldherr.org>
200 - Steve Kemp skx@tardis.ed.ac.uk's javascript popup patch.
201 - Markus Breitenbach breitenb@rbg.informatik.tu-darmstadt.de supplied
202 numerous fixes and enhancements for Steve's patch.
203 - adamlock@netscape.com (Adam Lock) in the windows version:
204 - Taskbar activity spinner always spins even when logging is
205 turned off (which is the default) - people who don't
206 like the spinner can turn it off from a menu option.
207 - Taskbar popup menu has a options submenu - people can now
208 open the settings files for cookies, blockers etc.
209 without opening the JB window.
210 - Logging functionality works again
211 - Buffer overflow is fixed - new code uses a bigger buffer
212 and snprintf so it shouldn't overflow anymore.
213 - Fixed userid swa, group learning problem while installing.
215 - Added patch by Benjamin Low <ben@snrc.uow.edu.au> that prevents JB to
216 core dump when there is no log file.
217 - Tweaked SuSE startup with the help of mohataj@gmx.net and Doc.B@gmx.de.
218 - Fixed man page to include imagefile and popupfile.
219 - Sanity check for the statistics function added.
220 - "Patrick D'Cruze" <pdcruze@orac.iinet.net.au>: It seems Microsoft
221 are transitioning Hotmail from FreeBSD/Apache to Windows 2000/IIS.
222 With IIS/5, it appears to omit the trailing \r\n from http header
223 only messages. eg, when I visit http://www.hotmail.com, IIS/5
224 responds with a HTTP 302 redirect header. However, this header
225 message is missing the trailing \r\n. IIS/5 then closes the
226 connection. Junkbuster, unfortunately, discards the header becomes
227 it thinks it is incomplete - and it is. MS have transmitted an
229 - Added bug reports and patch submission forms in the docs.
231 * Mon Mar 20 2000 Stefan Waldherr <stefan@waldherr.org>
232 Andrew <anw@tirana.freewire.co.uk> extended the JB:
233 Display of statistics of the total number of requests and the number
234 of requests filtered by junkbuster, also the percentage of requests
235 filtered. Suppression of the listing of files on the proxy-args page.
236 All stuff optional and configurable.
238 * Sun Sep 12 1999 Stefan Waldherr <stefan@waldherr.org>
239 Jan Willamowius (jan@janhh.shnet.org) fixed a bug in the
240 code which prevented the JB from handling URLs of the form
241 user:password@www.foo.com. Fixed.
243 * Mon Aug 2 1999 Stefan Waldherr <stefan@waldherr.org>
244 Blank images are no longer cached, thanks to a hint from Markus
245 Breitenbach <breitenb@rbg.informatik.tu-darmstadt.de>. The user
246 agent is NO longer set by the Junkbuster. Sadly, many sites depend
247 on the correct browser version nowadays. Incorporated many
248 suggestions from Jan "Yenya" Kasprzak <kas@fi.muni.cz> for the
249 spec file. Fixed logging problem and since runlevel 2 does not
250 use networking, I replaced /etc/rc.d/rc2.d/S84junkbuster with
251 /etc/rc.d/rc2.d/K09junkbuster thanks to Shaw Walker
252 <walker@netgate.net>. You should now be able to build this RPM as
253 a non-root user (mathias@weidner.sem.lipsia.de).
255 * Sun Jan 31 1999 Stefan Waldherr <stefan@waldherr.org>
256 /var/log/junkbuster set to nobody. Added /etc/junkbuster/imagelist
257 to allow more sophisticated matching of blocked images. Logrotate
258 logfile. Added files for auto-updating the blocklist et al.
260 * Wed Dec 16 1998 Stefan Waldherr <stefan@waldherr.org>
261 Configure blank version via config file. No separate blank
262 version anymore. Added Roland's <roland@spinnaker.rhein.de>
263 patch to show a logo instead of a blank area. Added a suggestion
264 from Alex <alex@cocoa.demon.co.uk>: /var/lock/subsys/junkbuster.
265 More regexps in the blocklist. Prepared the forwardfile for
266 squid. Extended image regexp with help from gabriel
267 <somlo@CS.ColoState.EDU>.
269 * Thu Nov 19 1998 Stefan Waldherr <stefan@waldherr.org>
270 All RPMs now identify themselves in the show-proxy-args page.
271 Released Windoze version. Run junkbuster as nobody instead of
274 * Fri Oct 30 1998 Stefan Waldherr <stefan@waldherr.org>
275 Newest version. First release (hence the little version number
276 mixture -- 2.0.2-0 instead of 2.0-7). This version tightens
277 security over 2.0.1; some multi-user sites will need to change
278 the listen-address in the configuration file. The blank version of
279 the Internet Junkbuster has a more sophisticated way of replacing
280 images. All RPMs identify themselves in the show-proxy-args page.
282 * Thu Sep 23 1998 Stefan Waldherr <stefan@waldherr.org>
283 Modified the blocking feature, so that only GIFs and JPEGs are
284 blocked and replaced but not HTML pages. Thanks to
285 "Gerd Flender" <plgerd@informatik.uni-siegen.de> for this nice
286 idea. Added numerous stuff to the blocklist. Keep patches in
287 seperate files and no longer in diffs (easier to maintain).
289 * Tue Jun 16 1998 Stefan Waldherr <swa@cs.cmu.edu>
290 Moved config files to /etc/junkbuster directory, moved man page,
291 added BuildRoot directive (Thanks to Alexey Nogin <ayn2@cornell.edu>)
292 Made new version junkbuster-raw (which is only a stripped version of
293 the junkuster rpm, i.e. without my blocklist, etc.)
295 * Tue Jun 16 1998 (2.0-1)
296 Uhm, not that much. Just a new junkbuster version that
297 fixes a couple of bugs ... and of course a bigger
298 blocklist with the unique Now-less-ads-than-ever(SM)
300 Oh, one thing: I changed the default user agent to Linux -- no
301 need anymore to support Apple.
303 * Tue Jun 16 1998 (2.0-0)
304 Now-less-ads-than-ever (SM)
305 compiled with gcc instead of cc
306 compiled with -O3, thus it should be a little faster
307 show-proxy-args now works
308 /etc/junkbuster.init wasn't necessary
310 * Tue Jun 16 1998 (1.4)
311 some more config files were put into /etc
312 The junkbuster-blank rpm returns a 1x1 pixel image, that gets
313 displayed by Netscape instead of the blocked image.
314 Read http://www.waldherr.org/junkbuster/ for
317 * Tue Jun 16 1998 (1.3)
318 The program has been moved to /usr/sbin (from /usr/local/bin)
319 Init- and stopscripts (/etc/rc.d/rc*) have been added so
320 that the junkbuster starts automatically during bootup.
321 The /etc/blocklist file is much more sophisticated. Theoretically
322 one should e.g. browse all major US and German newspapers without
323 seeing one annoying ad.
324 junkbuster.init was modified. It now starts junkbuster with an
325 additional "-r @" flag.