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