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