1 # $Id: junkbuster-rh.spec,v 1.27 2002/01/09 18:32:02 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.27 2002/01/09 18:32:02 hal9
30 # Removed RPM_OPT_FLAGS kludge.
32 # Revision 1.26 2002/01/09 18:21:10 hal9
33 # A few minor updates.
35 # Revision 1.25 2001/12/28 01:45:36 steudten
36 # Add paranoia check and BuildReq: gzip
38 # Revision 1.24 2001/12/01 21:43:14 hal9
39 # Allowed for new ijb.action file.
41 # Revision 1.23 2001/11/06 12:09:03 steudten
42 # Compress doc files. Install README and AUTHORS at last as document.
44 # Revision 1.22 2001/11/05 21:37:34 steudten
45 # Fix to include the actual version for name.
46 # Let the 'real' packager be included - sorry stefan.
48 # Revision 1.21 2001/10/31 19:27:27 swa
49 # consistent description. new name for suse since
50 # we had troubles with rpms of identical names
53 # Revision 1.20 2001/10/24 15:45:49 hal9
54 # To keep Thomas happy (aka correcting my mistakes)
56 # Revision 1.19 2001/10/15 03:23:59 hal9
59 # Revision 1.17 2001/10/10 18:59:28 hal9
60 # Minor change for init script.
62 # Revision 1.16 2001/09/24 20:56:23 hal9
65 # Revision 1.13 2001/09/10 17:44:43 swa
66 # integrate three pieces of documentation. needs work.
67 # will not build cleanly under redhat.
69 # Revision 1.12 2001/09/10 16:25:04 swa
70 # copy all templates. version updated.
72 # Revision 1.11 2001/07/03 11:00:25 sarantis
73 # replaced permissionsfile with actionsfile
75 # Revision 1.10 2001/07/03 09:34:44 sarantis
76 # bumped up version number.
78 # Revision 1.9 2001/06/12 18:15:29 swa
79 # the % in front of configure (see tag below) confused
80 # the rpm build process on 7.1.
82 # Revision 1.8 2001/06/12 17:15:56 swa
83 # fixes, because a clean build on rh6.1 was impossible.
84 # GZIP confuses make, % configure confuses rpm, etc.
86 # Revision 1.7 2001/06/11 12:17:26 sarantis
89 # Revision 1.6 2001/06/11 11:28:25 sarantis
90 # Further optimizations and adaptations in the spec file.
92 # Revision 1.5 2001/06/09 09:14:11 swa
93 # shamelessly adapted RPM stuff from the newest rpm that
94 # RedHat provided for the JB.
96 # Revision 1.4 2001/06/08 20:54:18 swa
97 # type with status file. remove forward et. al from file list.
99 # Revision 1.3 2001/06/07 17:28:10 swa
102 # Revision 1.2 2001/06/04 18:31:58 swa
103 # files are now prefixed with either `confdir' or `logdir'.
104 # `make redhat-dist' replaces both entries confdir and logdir
107 # Revision 1.1 2001/06/04 10:44:57 swa
108 # `make redhatr-dist' now works. Except for the paths
109 # in the config file.
113 Summary: The Internet Junkbuster
114 Vendor: http://ijbswa.sourceforge.net
118 Source0: http://www.waldherr.org/junkbuster/ijbswa-%{version}.tar.gz
120 BuildRoot: %{_tmppath}/%{name}-%{version}-root
121 Group: Networking/Utilities
122 URL: http://ijbswa.sourceforge.net/
123 Obsoletes: junkbuster-raw junkbuster-blank
124 Prereq: /usr/sbin/useradd , /sbin/chkconfig , /sbin/service
125 BuildRequires: perl gzip
126 Conflicts: junkbuster-raw junkbuster-blank
129 Internet Junkbuster is a web proxy with advanced filtering
130 capabilities for protecting privacy, filtering web page content,
131 managing cookies, controlling access, and removing ads, banners,
132 pop-ups and other obnoxious Internet Junk. Junkbuster has a very
133 flexible configuration and can be customized to suit individual needs
134 and tastes. Internet Junkbuster has application for both stand-alone
135 systems and multi-user networks.
137 %define ijbconf %{_sysconfdir}/junkbuster
148 /usr/sbin/useradd -d /etc/junkbuster -r junkbuster -s "/bin/false" > /dev/null 2>&1 || /bin/true
151 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
152 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} \
153 ${RPM_BUILD_ROOT}%{_mandir}/man8 \
154 ${RPM_BUILD_ROOT}/var/log/junkbuster \
155 ${RPM_BUILD_ROOT}%{ijbconf}/templates \
156 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d \
157 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
159 gzip README AUTHORS ChangeLog junkbuster.1 || /bin/true
160 install -s -m 744 junkbuster $RPM_BUILD_ROOT%{_sbindir}/junkbuster
161 cp -f junkbuster.1.gz $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8.gz
162 cp -f *.action $RPM_BUILD_ROOT%{ijbconf}/
163 cp -f re_filterfile $RPM_BUILD_ROOT%{ijbconf}/re_filterfile
164 cp -f trust $RPM_BUILD_ROOT%{ijbconf}/trust
165 cp -f templates/* $RPM_BUILD_ROOT%{ijbconf}/templates/
166 cp -f junkbuster.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/junkbuster
167 install -m 755 junkbuster.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/junkbuster
168 install -m 711 -d $RPM_BUILD_ROOT/var/log/junkbuster
170 # verify all file locations, etc. in the config file
171 # don't start with ^ or commented lines are not replaced
173 sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
174 # sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
175 # sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
176 # sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
177 # sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
178 # sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
179 # sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
180 sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
181 $RPM_BUILD_ROOT%{ijbconf}/config
182 perl -pe 's/{-no-cookies}/{-no-cookies}\n\.redhat.com/' ijb.action >\
183 $RPM_BUILD_ROOT%{ijbconf}/ijb.action
186 # for upgrade from 2.0.x
187 [ -f /var/log/junkbuster/junkbuster ] &&\
188 mv -f /var/log/junkbuster/junkbuster /var/log/junkbuster/logfile || /bin/true
189 chown -R junkbuster:junkbuster /var/log/junkbuster 2>/dev/null
190 chown -R junkbuster:junkbuster /etc/junkbuster 2>/dev/null
191 if [ "$1" = "1" ]; then
192 /sbin/chkconfig --add junkbuster
193 /sbin/service junkbuster condrestart > /dev/null 2>&1
195 # 01/09/02 HB, getting rid of any user=junkbust
196 grep junkbust: /etc/passwd >/dev/null && userdel junkbust || /bin/true
199 if [ "$1" = "0" ]; then
200 /sbin/service junkbuster stop > /dev/null 2>&1 ||:
201 /sbin/chkconfig --del junkbuster
205 #if [ "$1" -ge "1" ]; then
206 # /sbin/service junkbuster condrestart > /dev/null 2>&1
210 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
213 %defattr(-,root,root)
214 %doc README.gz AUTHORS.gz ChangeLog.gz
215 %doc doc/webserver/developer-manual doc/webserver/user-manual
216 %doc doc/webserver/user-manual
217 #%doc junkbuster.weekly junkbuster.monthly AUTHORS
220 %attr(0744,junkbuster,junkbuster) %dir /var/log/junkbuster
221 %config %{_sysconfdir}/logrotate.d/junkbuster
222 %attr(0744,junkbuster,junkbuster)/usr/sbin/junkbuster
224 %config %{_sysconfdir}/rc.d/init.d/junkbuster
228 * Wed Jan 09 2002 Hal Burgiss <hal@foobox.net>
229 - Removed UID 73. Included user-manual and developer-manual in docs.
230 Include other actions files. Default shell is now /bin/false.
231 Userdel user=junkbust. ChangeLog was not zipped. Removed
232 RPM_OPT_FLAGS kludge.
234 * Fri Dec 28 2001 Thomas Steudten <thomas@steudten.ch>
235 - add paranoia check for 'rm -rf $RPM_BUILD_ROOT'
236 - add gzip to 'BuildRequires'
238 * Sat Dec 1 2001 Hal Burgiss <hal@foobox.net>
239 - actionsfile is now ijb.action.
241 * Tue Nov 6 2001 Thomas Steudten <thomas@steudten.ch>
243 - Add more documents for installation
244 - Add version string to name and source
246 * Wed Oct 24 2001 Hal Burigss <hal@foobox.net>
247 - Back to user 'junkbuster' and fix configure macro.
249 * Wed Oct 10 2001 Hal Burigss <hal@foobox.net>
250 - More changes for user 'junkbust'. Init script had 'junkbuster'.
252 * Sun Sep 23 2001 Hal Burgiss <hal@foobox.net>
253 - Change of $RPM_OPT_FLAGS handling. Added new HTML doc files.
254 - Changed owner of /etc/junkbuster to shut up PAM/xauth log noise.
256 * Thu Sep 13 2001 Hal Burgiss <hal@foobox.net>
257 - Added $RPM_OPT_FLAGS support, renaming of old logfile, and
258 - made sure no default shell exists for user junkbust.
260 * Sun Jun 3 2001 Stefan Waldherr <stefan@waldherr.org>
263 * Mon Sep 25 2000 Stefan Waldherr <stefan@waldherr.org>
264 - CLF Logging patch by davep@cyw.uklinux.net
265 - Hal DeVore <haldevore@earthling.net> fix akamaitech in blocklist
267 * Sun Sep 17 2000 Stefan Waldherr <stefan@waldherr.org>
268 - Steve Kemp skx@tardis.ed.ac.uk's javascript popup patch.
269 - Markus Breitenbach breitenb@rbg.informatik.tu-darmstadt.de supplied
270 numerous fixes and enhancements for Steve's patch.
271 - adamlock@netscape.com (Adam Lock) in the windows version:
272 - Taskbar activity spinner always spins even when logging is
273 turned off (which is the default) - people who don't
274 like the spinner can turn it off from a menu option.
275 - Taskbar popup menu has a options submenu - people can now
276 open the settings files for cookies, blockers etc.
277 without opening the JB window.
278 - Logging functionality works again
279 - Buffer overflow is fixed - new code uses a bigger buffer
280 and snprintf so it shouldn't overflow anymore.
281 - Fixed userid swa, group learning problem while installing.
283 - Added patch by Benjamin Low <ben@snrc.uow.edu.au> that prevents JB to
284 core dump when there is no log file.
285 - Tweaked SuSE startup with the help of mohataj@gmx.net and Doc.B@gmx.de.
286 - Fixed man page to include imagefile and popupfile.
287 - Sanity check for the statistics function added.
288 - "Patrick D'Cruze" <pdcruze@orac.iinet.net.au>: It seems Microsoft
289 are transitioning Hotmail from FreeBSD/Apache to Windows 2000/IIS.
290 With IIS/5, it appears to omit the trailing \r\n from http header
291 only messages. eg, when I visit http://www.hotmail.com, IIS/5
292 responds with a HTTP 302 redirect header. However, this header
293 message is missing the trailing \r\n. IIS/5 then closes the
294 connection. Junkbuster, unfortunately, discards the header becomes
295 it thinks it is incomplete - and it is. MS have transmitted an
297 - Added bug reports and patch submission forms in the docs.
299 * Mon Mar 20 2000 Stefan Waldherr <stefan@waldherr.org>
300 Andrew <anw@tirana.freewire.co.uk> extended the JB:
301 Display of statistics of the total number of requests and the number
302 of requests filtered by junkbuster, also the percentage of requests
303 filtered. Suppression of the listing of files on the proxy-args page.
304 All stuff optional and configurable.
306 * Sun Sep 12 1999 Stefan Waldherr <stefan@waldherr.org>
307 Jan Willamowius (jan@janhh.shnet.org) fixed a bug in the
308 code which prevented the JB from handling URLs of the form
309 user:password@www.foo.com. Fixed.
311 * Mon Aug 2 1999 Stefan Waldherr <stefan@waldherr.org>
312 Blank images are no longer cached, thanks to a hint from Markus
313 Breitenbach <breitenb@rbg.informatik.tu-darmstadt.de>. The user
314 agent is NO longer set by the Junkbuster. Sadly, many sites depend
315 on the correct browser version nowadays. Incorporated many
316 suggestions from Jan "Yenya" Kasprzak <kas@fi.muni.cz> for the
317 spec file. Fixed logging problem and since runlevel 2 does not
318 use networking, I replaced /etc/rc.d/rc2.d/S84junkbuster with
319 /etc/rc.d/rc2.d/K09junkbuster thanks to Shaw Walker
320 <walker@netgate.net>. You should now be able to build this RPM as
321 a non-root user (mathias@weidner.sem.lipsia.de).
323 * Sun Jan 31 1999 Stefan Waldherr <stefan@waldherr.org>
324 /var/log/junkbuster set to nobody. Added /etc/junkbuster/imagelist
325 to allow more sophisticated matching of blocked images. Logrotate
326 logfile. Added files for auto-updating the blocklist et al.
328 * Wed Dec 16 1998 Stefan Waldherr <stefan@waldherr.org>
329 Configure blank version via config file. No separate blank
330 version anymore. Added Roland's <roland@spinnaker.rhein.de>
331 patch to show a logo instead of a blank area. Added a suggestion
332 from Alex <alex@cocoa.demon.co.uk>: /var/lock/subsys/junkbuster.
333 More regexps in the blocklist. Prepared the forwardfile for
334 squid. Extended image regexp with help from gabriel
335 <somlo@CS.ColoState.EDU>.
337 * Thu Nov 19 1998 Stefan Waldherr <stefan@waldherr.org>
338 All RPMs now identify themselves in the show-proxy-args page.
339 Released Windoze version. Run junkbuster as nobody instead of
342 * Fri Oct 30 1998 Stefan Waldherr <stefan@waldherr.org>
343 Newest version. First release (hence the little version number
344 mixture -- 2.0.2-0 instead of 2.0-7). This version tightens
345 security over 2.0.1; some multi-user sites will need to change
346 the listen-address in the configuration file. The blank version of
347 the Internet Junkbuster has a more sophisticated way of replacing
348 images. All RPMs identify themselves in the show-proxy-args page.
350 * Thu Sep 23 1998 Stefan Waldherr <stefan@waldherr.org>
351 Modified the blocking feature, so that only GIFs and JPEGs are
352 blocked and replaced but not HTML pages. Thanks to
353 "Gerd Flender" <plgerd@informatik.uni-siegen.de> for this nice
354 idea. Added numerous stuff to the blocklist. Keep patches in
355 seperate files and no longer in diffs (easier to maintain).
357 * Tue Jun 16 1998 Stefan Waldherr <swa@cs.cmu.edu>
358 Moved config files to /etc/junkbuster directory, moved man page,
359 added BuildRoot directive (Thanks to Alexey Nogin <ayn2@cornell.edu>)
360 Made new version junkbuster-raw (which is only a stripped version of
361 the junkuster rpm, i.e. without my blocklist, etc.)
363 * Tue Jun 16 1998 (2.0-1)
364 Uhm, not that much. Just a new junkbuster version that
365 fixes a couple of bugs ... and of course a bigger
366 blocklist with the unique Now-less-ads-than-ever(SM)
368 Oh, one thing: I changed the default user agent to Linux -- no
369 need anymore to support Apple.
371 * Tue Jun 16 1998 (2.0-0)
372 Now-less-ads-than-ever (SM)
373 compiled with gcc instead of cc
374 compiled with -O3, thus it should be a little faster
375 show-proxy-args now works
376 /etc/junkbuster.init wasn't necessary
378 * Tue Jun 16 1998 (1.4)
379 some more config files were put into /etc
380 The junkbuster-blank rpm returns a 1x1 pixel image, that gets
381 displayed by Netscape instead of the blocked image.
382 Read http://www.waldherr.org/junkbuster/ for
385 * Tue Jun 16 1998 (1.3)
386 The program has been moved to /usr/sbin (from /usr/local/bin)
387 Init- and stopscripts (/etc/rc.d/rc*) have been added so
388 that the junkbuster starts automatically during bootup.
389 The /etc/blocklist file is much more sophisticated. Theoretically
390 one should e.g. browse all major US and German newspapers without
391 seeing one annoying ad.
392 junkbuster.init was modified. It now starts junkbuster with an
393 additional "-r @" flag.