1 # $Id: junkbuster-rh.spec,v 1.4 2001/06/08 20:54:18 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.4 2001/06/08 20:54:18 swa
30 # type with status file. remove forward et. al from file list.
32 # Revision 1.3 2001/06/07 17:28:10 swa
35 # Revision 1.2 2001/06/04 18:31:58 swa
36 # files are now prefixed with either `confdir' or `logdir'.
37 # `make redhat-dist' replaces both entries confdir and logdir
40 # Revision 1.1 2001/06/04 10:44:57 swa
41 # `make redhatr-dist' now works. Except for the paths
46 %define PACKAGE_NAME junkbuster
47 %define PACKAGE_URL http://ijbswa.sourceforge.net
48 Summary: The Internet Junkbuster
49 Vendor: http://ijbswa.sourceforge.net
53 Source0: http://www.waldherr.org/junkbuster/ijbswa.tar.gz
55 BuildRoot: %{_tmppath}/%{name}-root
56 Group: Networking/Utilities
58 Packager: Stefan Waldherr <stefan@waldherr.org>
59 Distribution: defineme
60 Obsoletes: junkbuster-raw junkbuster-blank
61 Prereq: /usr/sbin/useradd , /sbin/chkconfig , /sbin/service
62 Conflicts: junkbuster-raw junkbuster-blank
65 # -----------------------------------------------------------------------------
68 The Internet Junkbuster stops your browser from displaying the
69 advertisement images that pervade many commercial web pages. Since
70 your browser has to download fewer images, surfing the web should be
74 # -----------------------------------------------------------------------------
79 # -----------------------------------------------------------------------------
86 # -----------------------------------------------------------------------------
89 #export DISTNAME='\"%PACKAGE_NAME-%PACKAGE_VERSION-%PACKAGE_RELEASE\"'
90 #export DISTURL='\"%PACKAGE_URL\"'
91 #make MORE_CFLAGS="$RPM_OPT_FLAGS"' -D_DISTNAME="$(DISTNAME)" -D_DISTURL="$(DISTURL)"'
92 # adds 486 optimization and stuff => bad
93 #make MORE_CFLAGS=' -D_DISTNAME="DDD" -D_DISTURL="UUU"'
99 # -----------------------------------------------------------------------------
102 /usr/sbin/useradd -d /etc/junkbuster -u 73 -r junkbust > /dev/null 2>&1 || /bin/true
105 # -----------------------------------------------------------------------------
108 rm -rf $RPM_BUILD_ROOT
109 mkdir -p $RPM_BUILD_ROOT/var/log/junkbuster \
110 $RPM_BUILD_ROOT%{_sbindir} \
111 $RPM_BUILD_ROOT%{_mandir}/man8 \
112 $RPM_BUILD_ROOT/etc/{junkbuster,junkbuster/templates,logrotate.d,cron.weekly,cron.monthly,rc.d/init.d}
113 install -s -m 744 junkbuster $RPM_BUILD_ROOT/usr/sbin/junkbuster
114 cp -f junkbuster.1 $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8
115 cp -f permissionsfile $RPM_BUILD_ROOT/etc/junkbuster/permissionsfile
116 cp -f re_filterfile $RPM_BUILD_ROOT/etc/junkbuster/re_filterfile
117 # cp -f blocklist $RPM_BUILD_ROOT/etc/junkbuster/blocklist
118 # cp -f imagelist $RPM_BUILD_ROOT/etc/junkbuster/imagelist
119 # cp -f cookiefile $RPM_BUILD_ROOT/etc/junkbuster/cookiefile
120 #cp -f aclfile $RPM_BUILD_ROOT/etc/junkbuster/aclfile
121 # verify all file locations, etc. in the config file
122 # don't start with ^ or commented lines are not replaced
124 sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
125 # sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
126 # sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
127 # sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
128 # sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
129 # sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
130 # sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
131 sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
132 $RPM_BUILD_ROOT/etc/junkbuster/config
133 #cp -f forward $RPM_BUILD_ROOT/etc/junkbuster/forward
134 cp -f trust $RPM_BUILD_ROOT/etc/junkbuster/trust
135 # cp -f popup $RPM_BUILD_ROOT/etc/junkbuster/popup
136 cp -f templates/default $RPM_BUILD_ROOT/etc/junkbuster/templates/
137 cp -f templates/show-status $RPM_BUILD_ROOT/etc/junkbuster/templates/
138 cp -f templates/show-status-file $RPM_BUILD_ROOT/etc/junkbuster/templates/
139 cp -f junkbuster.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/junkbuster
140 install -m 755 junkbuster.init $RPM_BUILD_ROOT/etc/rc.d/init.d/junkbuster
141 install -m 744 -d $RPM_BUILD_ROOT/var/log/junkbuster
144 # -----------------------------------------------------------------------------
147 if [ "$1" = "0" ]; then
148 /sbin/service junkbuster stop > /dev/null 2>&1
149 /sbin/chkconfig --del junkbuster
153 # -----------------------------------------------------------------------------
156 if [ "$1" -ge "1" ]; then
157 /sbin/service junkbuster condrestart > /dev/null 2>&1
161 # -----------------------------------------------------------------------------
164 /sbin/chkconfig --add junkbuster
167 # -----------------------------------------------------------------------------
170 rm -rf $RPM_BUILD_ROOT
173 # -----------------------------------------------------------------------------
176 %defattr(-,root,root)
177 # %doc ijbfaq.html ijbman.html README README.TOO gpl.html
178 %doc junkbuster.weekly junkbuster.monthly
180 %config /etc/junkbuster/config
181 %config /etc/junkbuster/permissionsfile
182 %config /etc/junkbuster/re_filterfile
183 %config /etc/junkbuster/trust
184 %dir /etc/junkbuster/templates
185 %config /etc/junkbuster/templates/default
186 %config /etc/junkbuster/templates/show-status
187 %config /etc/junkbuster/templates/show-status-file
188 %attr(0744,junkbust,junkbust) %dir /var/log/junkbuster
189 %config /etc/logrotate.d/junkbuster
190 %attr(0744,junkbust,junkbust)/usr/sbin/junkbuster
192 %config /etc/rc.d/init.d/junkbuster
195 # -----------------------------------------------------------------------------
200 * Sun Jun 3 2001 Stefan Waldherr <stefan@waldherr.org>
203 * Mon Sep 25 2000 Stefan Waldherr <stefan@waldherr.org>
204 - CLF Logging patch by davep@cyw.uklinux.net
205 - Hal DeVore <haldevore@earthling.net> fix akamaitech in blocklist
207 * Sun Sep 17 2000 Stefan Waldherr <stefan@waldherr.org>
208 - Steve Kemp skx@tardis.ed.ac.uk's javascript popup patch.
209 - Markus Breitenbach breitenb@rbg.informatik.tu-darmstadt.de supplied
210 numerous fixes and enhancements for Steve's patch.
211 - adamlock@netscape.com (Adam Lock) in the windows version:
212 - Taskbar activity spinner always spins even when logging is
213 turned off (which is the default) - people who don't
214 like the spinner can turn it off from a menu option.
215 - Taskbar popup menu has a options submenu - people can now
216 open the settings files for cookies, blockers etc.
217 without opening the JB window.
218 - Logging functionality works again
219 - Buffer overflow is fixed - new code uses a bigger buffer
220 and snprintf so it shouldn't overflow anymore.
221 - Fixed userid swa, group learning problem while installing.
223 - Added patch by Benjamin Low <ben@snrc.uow.edu.au> that prevents JB to
224 core dump when there is no log file.
225 - Tweaked SuSE startup with the help of mohataj@gmx.net and Doc.B@gmx.de.
226 - Fixed man page to include imagefile and popupfile.
227 - Sanity check for the statistics function added.
228 - "Patrick D'Cruze" <pdcruze@orac.iinet.net.au>: It seems Microsoft
229 are transitioning Hotmail from FreeBSD/Apache to Windows 2000/IIS.
230 With IIS/5, it appears to omit the trailing \r\n from http header
231 only messages. eg, when I visit http://www.hotmail.com, IIS/5
232 responds with a HTTP 302 redirect header. However, this header
233 message is missing the trailing \r\n. IIS/5 then closes the
234 connection. Junkbuster, unfortunately, discards the header becomes
235 it thinks it is incomplete - and it is. MS have transmitted an
237 - Added bug reports and patch submission forms in the docs.
239 * Mon Mar 20 2000 Stefan Waldherr <stefan@waldherr.org>
240 Andrew <anw@tirana.freewire.co.uk> extended the JB:
241 Display of statistics of the total number of requests and the number
242 of requests filtered by junkbuster, also the percentage of requests
243 filtered. Suppression of the listing of files on the proxy-args page.
244 All stuff optional and configurable.
246 * Sun Sep 12 1999 Stefan Waldherr <stefan@waldherr.org>
247 Jan Willamowius (jan@janhh.shnet.org) fixed a bug in the
248 code which prevented the JB from handling URLs of the form
249 user:password@www.foo.com. Fixed.
251 * Mon Aug 2 1999 Stefan Waldherr <stefan@waldherr.org>
252 Blank images are no longer cached, thanks to a hint from Markus
253 Breitenbach <breitenb@rbg.informatik.tu-darmstadt.de>. The user
254 agent is NO longer set by the Junkbuster. Sadly, many sites depend
255 on the correct browser version nowadays. Incorporated many
256 suggestions from Jan "Yenya" Kasprzak <kas@fi.muni.cz> for the
257 spec file. Fixed logging problem and since runlevel 2 does not
258 use networking, I replaced /etc/rc.d/rc2.d/S84junkbuster with
259 /etc/rc.d/rc2.d/K09junkbuster thanks to Shaw Walker
260 <walker@netgate.net>. You should now be able to build this RPM as
261 a non-root user (mathias@weidner.sem.lipsia.de).
263 * Sun Jan 31 1999 Stefan Waldherr <stefan@waldherr.org>
264 /var/log/junkbuster set to nobody. Added /etc/junkbuster/imagelist
265 to allow more sophisticated matching of blocked images. Logrotate
266 logfile. Added files for auto-updating the blocklist et al.
268 * Wed Dec 16 1998 Stefan Waldherr <stefan@waldherr.org>
269 Configure blank version via config file. No separate blank
270 version anymore. Added Roland's <roland@spinnaker.rhein.de>
271 patch to show a logo instead of a blank area. Added a suggestion
272 from Alex <alex@cocoa.demon.co.uk>: /var/lock/subsys/junkbuster.
273 More regexps in the blocklist. Prepared the forwardfile for
274 squid. Extended image regexp with help from gabriel
275 <somlo@CS.ColoState.EDU>.
277 * Thu Nov 19 1998 Stefan Waldherr <stefan@waldherr.org>
278 All RPMs now identify themselves in the show-proxy-args page.
279 Released Windoze version. Run junkbuster as nobody instead of
282 * Fri Oct 30 1998 Stefan Waldherr <stefan@waldherr.org>
283 Newest version. First release (hence the little version number
284 mixture -- 2.0.2-0 instead of 2.0-7). This version tightens
285 security over 2.0.1; some multi-user sites will need to change
286 the listen-address in the configuration file. The blank version of
287 the Internet Junkbuster has a more sophisticated way of replacing
288 images. All RPMs identify themselves in the show-proxy-args page.
290 * Thu Sep 23 1998 Stefan Waldherr <stefan@waldherr.org>
291 Modified the blocking feature, so that only GIFs and JPEGs are
292 blocked and replaced but not HTML pages. Thanks to
293 "Gerd Flender" <plgerd@informatik.uni-siegen.de> for this nice
294 idea. Added numerous stuff to the blocklist. Keep patches in
295 seperate files and no longer in diffs (easier to maintain).
297 * Tue Jun 16 1998 Stefan Waldherr <swa@cs.cmu.edu>
298 Moved config files to /etc/junkbuster directory, moved man page,
299 added BuildRoot directive (Thanks to Alexey Nogin <ayn2@cornell.edu>)
300 Made new version junkbuster-raw (which is only a stripped version of
301 the junkuster rpm, i.e. without my blocklist, etc.)
303 * Tue Jun 16 1998 (2.0-1)
304 Uhm, not that much. Just a new junkbuster version that
305 fixes a couple of bugs ... and of course a bigger
306 blocklist with the unique Now-less-ads-than-ever(SM)
308 Oh, one thing: I changed the default user agent to Linux -- no
309 need anymore to support Apple.
311 * Tue Jun 16 1998 (2.0-0)
312 Now-less-ads-than-ever (SM)
313 compiled with gcc instead of cc
314 compiled with -O3, thus it should be a little faster
315 show-proxy-args now works
316 /etc/junkbuster.init wasn't necessary
318 * Tue Jun 16 1998 (1.4)
319 some more config files were put into /etc
320 The junkbuster-blank rpm returns a 1x1 pixel image, that gets
321 displayed by Netscape instead of the blocked image.
322 Read http://www.waldherr.org/junkbuster/ for
325 * Tue Jun 16 1998 (1.3)
326 The program has been moved to /usr/sbin (from /usr/local/bin)
327 Init- and stopscripts (/etc/rc.d/rc*) have been added so
328 that the junkbuster starts automatically during bootup.
329 The /etc/blocklist file is much more sophisticated. Theoretically
330 one should e.g. browse all major US and German newspapers without
331 seeing one annoying ad.
332 junkbuster.init was modified. It now starts junkbuster with an
333 additional "-r @" flag.