1 # $Id: privoxy-rh.spec,v 1.45 2006/07/18 14:48:47 david__schmidt Exp $
3 # Written by and Copyright (C) 2001 the SourceForge
4 # Privoxy team. http://www.privoxy.org/
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.
29 # Defines should happen in the begining of the file
30 %define veryoldname junkbust
31 %define oldname junkbuster
32 %define privoxyconf %{_sysconfdir}/%{name}
33 %define privoxy_uid 73
34 %define privoxy_gid 73
38 # Version and release should be updated acordingly on configure.in and
39 # configure. Otherwise, the package can be build with the wrong value
42 Summary: Privoxy - privacy enhancing proxy
44 Source0: http://www.waldherr.org/%{name}/%{name}-%{version}.tar.gz
45 BuildRoot: %{_tmppath}/%{name}-%{version}-root
46 Group: System Environment/Daemons
47 URL: http://www.privoxy.org/
48 Obsoletes: junkbuster-raw junkbuster-blank junkbuster
49 # Prereq: /usr/sbin/useradd , /sbin/chkconfig , /sbin/service
50 Prereq: shadow-utils, chkconfig, initscripts, sh-utils
51 BuildRequires: perl gzip sed libtool autoconf
52 Conflicts: junkbuster-raw junkbuster-blank junkbuster
55 Privoxy is a web proxy with advanced filtering capabilities for
56 protecting privacy, filtering web page content, managing cookies,
57 controlling access, and removing ads, banners, pop-ups and other
58 obnoxious Internet junk. Privoxy has a very flexible configuration and
59 can be customized to suit individual needs and tastes. Privoxy has application
60 for both stand-alone systems and multi-user networks.
62 Privoxy is based on the Internet Junkbuster.
69 # We check to see if versions match
74 CONFIG_VERSION=`cat configure.in | sed -n -e 's/^VERSION_MAJOR=\([0-9]*\)/\1./p' -e 's/^VERSION_MINOR=\([0-9]*\)/\1./p' -e 's/^VERSION_POINT=\([0-9]*\)/\1/p' | awk '{printf $1}'`
75 if [ "%{version}" != "${CONFIG_VERSION}" ]; then
76 echo "The version declared on the specfile does not match the version"
77 echo "declared on configure.in. This should not happen. The build will"
78 echo "be interrupted now, so you can fix it."
83 %configure --disable-dynamic-pcre
85 # Docs are in CVS and tarball now.
88 ## Explicitily stripping is not recomended.
89 ## This is handled altomaticaly by RPM, and can couse troubles if
90 ## anyone wants to build an unstriped version - morcego
94 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
95 mkdir -p %{buildroot}%{_sbindir} \
96 %{buildroot}%{_mandir}/man1 \
97 %{buildroot}%{_localstatedir}/log/%{name} \
98 %{buildroot}%{privoxyconf}/templates \
99 %{buildroot}%{_sysconfdir}/logrotate.d \
100 %{buildroot}%{_sysconfdir}/rc.d/init.d
102 ## Manual gziping of manpages should not be done, once it can
103 ## break the building on some distributions. Anyway, rpm does it
104 ## automagicaly these days
105 ## Gziping the documentation files is not recomended - morcego
106 #gzip README AUTHORS ChangeLog %{name}.1 || /bin/true
108 install -s -m 744 %{name} %{buildroot}%{_sbindir}/%{name}
110 # Using sed to "convert" from DOS format to UNIX
111 # This is important behaviour, and should not be removed without some
112 # other assurance that these files don't get packed in the the
114 for i in `ls *.action`
116 cat $i | sed -e 's/[[:cntrl:]]*$//' > %{buildroot}%{privoxyconf}/$i
118 cat default.filter | sed -e 's/[[:cntrl:]]*$//' > %{buildroot}%{privoxyconf}/default.filter
119 cat trust | sed -e 's/[[:cntrl:]]*$//' > %{buildroot}%{privoxyconf}/trust
124 cat $i | sed -e 's/[[:cntrl:]]*$//' > %{buildroot}%{privoxyconf}/templates/$i
128 cp -f %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
129 cp -f %{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
130 install -m 755 %{name}.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
131 install -m 711 -d %{buildroot}%{_localstatedir}/log/%{name}
133 # verify all file locations, etc. in the config file
134 # don't start with ^ or commented lines are not replaced
135 ## Changing the sed paramter delimiter to @, so we don't have to
136 ## escape the slashes
138 sed 's@^confdir.*@confdir %{privoxyconf}@g' | \
139 # sed 's/^permissionsfile.*/permissionsfile \/etc\/%{name}\/permissionsfile/g' | \
140 # sed 's/^filterfile.*/default.filter \/etc\/%{name}\/default.filter/g' | \
141 # sed 's/^logfile.*/logfile \%{_localstatedir}\/log\/%{name}\/logfile/g' | \
142 # sed 's/^jarfile.*/jarfile \%{_localstatedir}\/log\/%{name}\/jarfile/g' | \
143 # sed 's/^forward.*/forward \/etc\/%{name}\/forward/g' | \
144 # sed 's/^aclfile.*/aclfile \/etc\/%{name}\/aclfile/g' > \
145 sed 's@^logdir.*@logdir %{_localstatedir}/log/%{name}@g' | \
146 sed -e 's/[[:cntrl:]]*$//' > \
147 %{buildroot}%{privoxyconf}/config
148 perl -pe 's/{-no-cookies}/{-no-cookies}\n\.redhat.com/' default.action >\
149 %{buildroot}%{privoxyconf}/default.action
152 ## Macros are expanded even on commentaries. So, we have to use %%
157 # This is where we handle old usernames (junkbust and junkbuster)
158 # I'm not sure we should do that, but this is the way we have been
159 # doing it for some time now -- morcego
160 # We should do it for the group as well -- morcego
161 # Doing it by brute force. Much cleaner (no more Mr. Nice Guy) -- morcego
164 usermod -u %{privoxy_uid} -g %{privoxy_gid} -l %{name} -d %{_sysconfdir}/%{name} -s "" %{oldname} > /dev/null 2>&1 || :
165 usermod -u %{privoxy_uid} -g %{privoxy_gid} -l %{name} -d %{_sysconfdir}/%{name} -s "" %{veryoldname} > /dev/null 2>&1 || :
166 userdel %{oldname} > /dev/null 2>&1 ||:
167 userdel %{veryoldname} > /dev/null 2>&1 ||:
169 # Change the group name. Remove anything left behind.
170 groupmod -g %{privoxy_gid} -n %{name} %{oldname} > /dev/null 2>&1 ||:
171 groupmod -g %{privoxy_gid} -n %{name} %{veryoldname} > /dev/null 2>&1 ||:
172 groupdel %{oldname} > /dev/null 2>&1 ||:
173 groupdel %{veryoldname} > /dev/null 2>&1 ||:
175 # Doublecheck to see if the group exist, and that it has the correct gid
176 /bin/grep -E '^%{name}:' %{_sysconfdir}/group > /dev/null 2>&1
177 if [ $? -eq 1 ]; then
178 # Looks like it does not exist. Create it
179 groupadd -g %{privoxy_gid} %{name} > /dev/null 2>&1
181 /bin/grep -E '^%{name}:[^:]*:%{privoxy_gid}:' %{_sysconfdir}/group > /dev/null 2>&1
182 if [ $? -eq 1 ]; then
183 # The group exists, but does not have the correct gid
184 groupmod -g %{privoxy_gid} %{name} > /dev/null 2>&1
188 # Check to see if everything is okey. Create user if it still does not
190 id %{name} > /dev/null 2>&1
191 if [ $? -eq 1 ]; then
192 %{_sbindir}/useradd -u %{privoxy_uid} -g %{privoxy_gid} -d %{_sysconfdir}/%{name} -r -s "" %{name} > /dev/null 2>&1
195 # Double check that the group has the correct uid
196 P_UID=`id -u %{name} 2>/dev/null`
197 if [ $P_UID -ne %{privoxy_uid} ]; then
198 %{_sbindir}/usermod -u %{privoxy_uid} %{name}
201 # The same for the gid
202 P_GID=`id -g %{name} 2>/dev/null`
203 if [ $P_GID -ne %{privoxy_gid} ]; then
204 %{_sbindir}/usermod -g %{privoxy_gid} %{name}
208 # for upgrade from 2.0.x
209 [ -f %{_localstatedir}/log/%{oldname}/logfile ] && {
210 mv -f %{_localstatedir}/log/%{oldname}/logfile %{_localstatedir}/log/%{name}/logfile ||: ;
211 chown -R %{name}:%{name} %{_localstatedir}/log/%{name} 2>/dev/null ||: ;
213 [ -f %{_localstatedir}/log/%{name}/%{name} ] && {
214 mv -f %{_localstatedir}/log/%{name}/%{name} %{_localstatedir}/log/%{name}/logfile ||: ;
215 chown -R %{name}:%{name} %{_sysconfdir}/%{name} 2>/dev/null ||: ;
217 /sbin/chkconfig --add privoxy
218 if [ "$1" = "1" ]; then
219 /sbin/service %{name} condrestart > /dev/null 2>&1 ||:
223 /sbin/service %{veryoldname} stop > /dev/null 2>&1 ||:
224 /sbin/service %{oldname} stop > /dev/null 2>&1 ||:
226 if [ "$1" = "0" ]; then
227 /sbin/service %{name} stop > /dev/null 2>&1 ||:
228 /sbin/chkconfig --del privoxy
232 #if [ "$1" -ge "1" ]; then
233 # /sbin/service %{name} condrestart > /dev/null 2>&1
235 # We only remove it we this is not an upgrade
236 if [ "$1" = "0" ]; then
237 id privoxy > /dev/null 2>&1 && %{_sbindir}/userdel privoxy || /bin/true
238 /bin/grep -E '^%{name}:' %{_sysconfdir}/group > /dev/null && %{_sbindir}/groupdel %{name} || /bin/true
242 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
245 %defattr(0644,root,root,0755)
246 %doc README AUTHORS ChangeLog LICENSE
247 %doc doc/text/developer-manual.txt doc/text/user-manual.txt doc/text/faq.txt
248 %doc doc/webserver/developer-manual
249 %doc doc/webserver/user-manual
250 %doc doc/webserver/faq
251 %doc doc/webserver/p_doc.css doc/webserver/p_web.css doc/webserver/privoxy-index.html
252 %doc doc/webserver/images
253 %doc doc/webserver/man-page
255 # ATTENTION FOR defattr change here !
256 %defattr(0644,%{name},%{name},0755)
259 %dir %{privoxyconf}/templates
260 %dir %{_localstatedir}/log/%{name}
262 %attr(0744,%{name},%{name})%{_sbindir}/%{name}
264 # WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
265 # We should not use wildchars here. This could mask missing files problems
267 # WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
268 %config(noreplace) %{privoxyconf}/config
269 %config %{privoxyconf}/standard.action
270 %config(noreplace) %{privoxyconf}/user.action
271 %config %{privoxyconf}/default.action
272 %config %{privoxyconf}/default.filter
273 %config(noreplace) %{privoxyconf}/user.filter
274 %config(noreplace) %{privoxyconf}/trust
276 # Please keep these alphabetized so its easier to find one that
278 %config %{privoxyconf}/templates/blocked
279 %config %{privoxyconf}/templates/cgi-error-404
280 %config %{privoxyconf}/templates/cgi-error-bad-param
281 %config %{privoxyconf}/templates/cgi-error-disabled
282 %config %{privoxyconf}/templates/cgi-error-file
283 %config %{privoxyconf}/templates/cgi-error-file-read-only
284 %config %{privoxyconf}/templates/cgi-error-modified
285 %config %{privoxyconf}/templates/cgi-error-parse
286 %config %{privoxyconf}/templates/cgi-style.css
287 %config %{privoxyconf}/templates/connect-failed
288 %config %{privoxyconf}/templates/default
289 %config %{privoxyconf}/templates/edit-actions-add-url-form
290 %config %{privoxyconf}/templates/edit-actions-for-url
291 %config %{privoxyconf}/templates/edit-actions-for-url-filter
292 %config %{privoxyconf}/templates/edit-actions-list
293 %config %{privoxyconf}/templates/edit-actions-list-button
294 %config %{privoxyconf}/templates/edit-actions-list-section
295 %config %{privoxyconf}/templates/edit-actions-list-url
296 %config %{privoxyconf}/templates/edit-actions-remove-url-form
297 %config %{privoxyconf}/templates/edit-actions-url-form
298 %config %{privoxyconf}/templates/mod-local-help
299 %config %{privoxyconf}/templates/mod-support-and-service
300 %config %{privoxyconf}/templates/mod-title
301 %config %{privoxyconf}/templates/mod-unstable-warning
302 %config %{privoxyconf}/templates/no-such-domain
303 %config %{privoxyconf}/templates/show-request
304 %config %{privoxyconf}/templates/show-status
305 %config %{privoxyconf}/templates/show-status-file
306 %config %{privoxyconf}/templates/show-url-info
307 %config %{privoxyconf}/templates/show-version
308 %config %{privoxyconf}/templates/toggle
309 %config %{privoxyconf}/templates/toggle-mini
310 %config %{privoxyconf}/templates/untrusted
312 # Attention, new defattr change here !
313 %defattr(0644,root,root,0755)
315 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
316 %config(noreplace) %attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
318 %{_mandir}/man1/%{name}.*
321 * Sat Sep 02 2006 Hal Burgiss <hal@foobox.net>
322 - Include new file, user.filter. Do not overwrite "trust" file
323 (does anyone use this?).
325 * Wed Mar 26 2003 Andreas Oesterhelt <andreas@oesterhelt.org>
326 - Bump version for 3.0.2.
328 * Wed Mar 19 2003 Hal Burgiss <hal@foobox.net>
329 - Bump version for 3.0.1.
331 * Tue Aug 25 2002 Hal Burgiss <hal@foobox.net>
332 - Bump version for 3.0.0 :)
334 * Tue Aug 06 2002 Hal Burgiss <hal@foobox.net>
335 - Reset version for 2.9.20.
337 * Tue Jul 30 2002 Hal Burgiss <hal@foobox.net>
338 - Reset version for 2.9.18.
340 * Sat Jul 27 2002 Hal Burgiss <hal@foobox.net>
341 - Reset version and release for 2.9.16.
343 * Fri Jul 12 2002 Karsten Hopp <karsten@redhat.de>
344 - don't use ghost files for rcX.d/*, using chkconfig is the
345 correct way to do this job (#68619)
347 * Fri Jul 05 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
349 - Changing delete order for groups and users (users should be first)
351 * Wed Jul 03 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
353 - Changing sed expression that removed CR from the end of the lines. This
354 new one removes any control caracter, and should work with older versions
357 * Tue Jul 02 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
359 - Fixing defattr values. File and directory modes where swapped
361 * Tue Jul 02 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
363 - Bumping Release number (which should be changed every time the specfile
366 * Tue Jul 02 2002 Hal Burgiss <hal@foobox.net>
368 - Fix typo in templates creation.
370 * Wed Jun 26 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
372 - Fixing issues created by specfile sync between branches
373 - Correcting the release number (WARNING)
374 - Reintroducing text file conversion (dos -> unix)
375 - Reconverting hardcoded directories to macros
376 - Refixing ownership of privoxy files (now using multiple defattr
379 * Thu Jun 20 2002 Karsten Hopp <karsten@redhat.de>
380 - fix several .spec file issues to shut up rpmlint
381 - non-standard-dir-perm /var/log/privoxy 0744
382 - invalid-vendor Privoxy.Org (This is ok for binaries compiled by privoxy
383 members, but not for packages from Red Hat)
384 - non-standard-group Networking/Utilities
385 - logrotate and init scripts should be noreplace
387 * Mon May 27 2002 Hal Burgiss <hal@foobox.net>
389 - Index.html is now privoxy-index.html for doc usage.
391 * Sat May 25 2002 Hal Burgiss <hal@foobox.net>
393 - Add html man page so index.html does not 404.
395 * Fri May 24 2002 Hal Burgiss <hal@foobox.net>
397 - Add another template and alphabetize these for easier tracking.
398 - Add doc/images directory.
400 * Wed May 15 2002 Hal Burgiss <hal@foobox.net>
402 - Add templates/edit-actions-list-button
404 * Fri May 03 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
407 - Adding noreplace for %%{privoxyconf}/config
408 - Included a method to verify if the versions declared on the specfile and
409 configure.in match. Interrupt the build if they don't.
411 * Fri Apr 26 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
413 - Changing Vendor to Privoxy.Org
415 * Tue Apr 23 2002 Hal Burgiss <hal@foobox.net>
417 - Adjust for new *actions files.
419 * Mon Apr 22 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
421 - Removed the redhat hack that prevented the user and group from
422 being dealocated. That was a misundestanding of my part regarding
425 * Mon Apr 22 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
427 - Using macros to define uid and gid values
430 * Mon Apr 22 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
432 - Changes to fixate the uid and gid values as (both) 73. This is a
433 value we hope to standarize for all distributions. RedHat already
434 uses it, and Conectiva should start as soon as I find where the heck
435 I left my cluebat :-)
436 - Only remove the user and group on uninstall if this is not redhat, once
437 redhat likes to have the values allocated even if the package is not
440 * Tue Apr 16 2002 Hal Burgiss <hal@foobox.net>
442 - Add --disable-dynamic-pcre to configure.
444 * Wed Apr 10 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
446 - Relisting template files on the %%files section
448 * Tue Apr 09 2002 Hal Burgiss <hal@foobox.net>
450 - Removed 'make dok'. Docs are all maintained in CVS (and tarball) now.
452 * Mon Apr 08 2002 Hal Burgiss <hal@foobox.net>
454 - Add templates/cgi-style.css, faq.txt, p_web.css, LICENSE
455 - Remove templates/blocked-compact.
456 - Add more docbook stuff to Builderquires.
458 * Thu Mar 28 2002 Sarantis Paskalis <sarantis@cnl.di.uoa.gr>
460 - Include correct documentation file.
462 * Tue Mar 26 2002 Hal Burgiss <hal@foobox.net>
464 - Fix typo in Description.
466 * Tue Mar 26 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
468 - Added commentary asking to update the release value on the configure
471 * Tue Mar 25 2002 Hal Burgiss <hal@foobox.net>
473 - Added the missing edit-actions-for-url-filter to templates.
475 * Mon Mar 25 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
477 - Fixing Release number
479 * Sun Mar 24 2002 Hal Burgiss <hal@foobox.net>
483 * Sun Mar 24 2002 Rodrigo Barbosa <rodrigob@suespammers.org>
485 - Fixed the init files entries. Now we use %%ghost
486 - improved username (and groupname) handling on the %%pre section. By improved
487 I mean: we do it by brute force now. Much easier to maintain. Yeah, you
488 got it right. No more Mr. Nice Guy.
489 - Removed the userdel call on %%post. No need, once it's complety handled on
492 * Sun Mar 24 2002 Hal Burgiss <hal@foobox.net>
493 + junkbusterng-2.9.13-1
494 Added autoheader. Added autoconf to buildrequires.
496 * Sun Mar 24 2002 Hal Burgiss <hal@foobox.net>
497 + junkbusterng-2.9.13-1
498 - Fixed build problems re: name conflicts with man page and logrotate.
499 - Commented out rc?d/* configs for time being, which are causing a build
500 - failure. /etc/junkbuster is now /etc/privoxy. Stefan did other name
501 - changes. Fixed typo ';' should be ':' causing 'rpm -e' to fail.
503 * Fri Mar 22 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
504 + junkbusterng-2.9.13-1
505 - References to the expression ijb where changed where possible
506 - New package name: junkbusterng (all in lower case, acording to
507 the LSB recomendation)
508 - Version changed to: 2.9.13
510 - Added: junkbuster to obsoletes and conflicts (Not sure this is
511 right. If it obsoletes, why conflict ? Have to check it later)
512 - Summary changed: Stefan, please check and aprove it
513 - Changes description to use the new name
514 - Sed string was NOT changed. Have to wait to the manpage to
516 - Keeping the user junkbuster for now. It will require some aditional
517 changes on the script (scheduled for the next specfile release)
518 - Added post entry to move the old logfile to the new log directory
519 - Removing "chkconfig --add" entry (not good to have it automaticaly
520 added to the startup list).
521 - Added preun section to stop the service with the old name, as well
522 as remove it from the startup list
523 - Removed the chkconfig --del entry from the conditional block on
524 the preun scriptlet (now handled on the %files section)
526 * Thu Mar 21 2002 Hal Burgiss <hal@foobox.net>
527 - added ijb_docs.css to docs.
529 * Mon Mar 11 2002 Hal Burgiss <hal@foobox.net>
530 + junkbuster-2.9.11-8
531 - Take out --enable-no-gifs, breaks some browsers.
533 * Sun Mar 10 2002 Hal Burgiss <hal@foobox.net>
534 + junkbuster-2.9.11-8
535 - Add --enable-no-gifs to configure.
537 * Fri Mar 08 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
538 + junkbuster-2.9.11-7
539 - Added BuildRequires to libtool.
541 * Tue Mar 06 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
542 + junkbuster-2.9.11-6
543 - Changed the routined that handle the junkbust and junkbuster users on
544 %%pre and %%post to work in a smoother manner
545 - %%files now uses hardcoded usernames, to avoid problems with package
546 name changes in the future
548 * Tue Mar 05 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
549 + junkbuster-2.9.11-5
550 - Added "make redhat-dok" to the build process
551 - Added docbook-utils to BuildRequires
553 * Tue Mar 05 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
554 + junkbuster-2.9.11-4
555 - Changing man section in the manpage from 1 to 8
556 - We now require packages, not files, to avoid issues with apt
558 * Mon Mar 04 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
559 + junkbuster-2.9.11-3
560 - Fixing permissions of the init script
562 * Mon Mar 04 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
563 + junkbuster-2.9.11-2
564 - General specfile fixup, using the best recomended practices, including:
565 - Adding -q to %%setup
566 - Using macros whereever possible
567 - Not using wildchars on %%files section
568 - Doubling the percentage char on changelog and comments, to
569 avoid rpm expanding them
571 * Sun Mar 03 2002 Hal Burgiss <hal@foobox.net>
572 - /bin/false for shell causes init script to fail. Reverting.
574 * Wed Jan 09 2002 Hal Burgiss <hal@foobox.net>
575 - Removed UID 73. Included user-manual and developer-manual in docs.
576 Include other actions files. Default shell is now /bin/false.
577 Userdel user=junkbust. ChangeLog was not zipped. Removed
578 RPM_OPT_FLAGS kludge.
580 * Fri Dec 28 2001 Thomas Steudten <thomas@steudten.ch>
581 - add paranoia check for 'rm -rf %%{buildroot}'
582 - add gzip to 'BuildRequires'
584 * Sat Dec 1 2001 Hal Burgiss <hal@foobox.net>
585 - actionsfile is now ijb.action.
587 * Tue Nov 6 2001 Thomas Steudten <thomas@steudten.ch>
589 - Add more documents for installation
590 - Add version string to name and source
592 * Wed Oct 24 2001 Hal Burigss <hal@foobox.net>
593 - Back to user 'junkbuster' and fix configure macro.
595 * Wed Oct 10 2001 Hal Burigss <hal@foobox.net>
596 - More changes for user 'junkbust'. Init script had 'junkbuster'.
598 * Sun Sep 23 2001 Hal Burgiss <hal@foobox.net>
599 - Change of $RPM_OPT_FLAGS handling. Added new HTML doc files.
600 - Changed owner of /etc/junkbuster to shut up PAM/xauth log noise.
602 * Thu Sep 13 2001 Hal Burgiss <hal@foobox.net>
603 - Added $RPM_OPT_FLAGS support, renaming of old logfile, and
604 - made sure no default shell exists for user junkbust.
606 * Sun Jun 3 2001 Stefan Waldherr <stefan@waldherr.org>
609 * Mon Sep 25 2000 Stefan Waldherr <stefan@waldherr.org>
610 - CLF Logging patch by davep@cyw.uklinux.net
611 - Hal DeVore <haldevore@earthling.net> fix akamaitech in blocklist
613 * Sun Sep 17 2000 Stefan Waldherr <stefan@waldherr.org>
614 - Steve Kemp skx@tardis.ed.ac.uk's javascript popup patch.
615 - Markus Breitenbach breitenb@rbg.informatik.tu-darmstadt.de supplied
616 numerous fixes and enhancements for Steve's patch.
617 - adamlock@netscape.com (Adam Lock) in the windows version:
618 - Taskbar activity spinner always spins even when logging is
619 turned off (which is the default) - people who don't
620 like the spinner can turn it off from a menu option.
621 - Taskbar popup menu has a options submenu - people can now
622 open the settings files for cookies, blockers etc.
623 without opening the JB window.
624 - Logging functionality works again
625 - Buffer overflow is fixed - new code uses a bigger buffer
626 and snprintf so it shouldn't overflow anymore.
627 - Fixed userid swa, group learning problem while installing.
629 - Added patch by Benjamin Low <ben@snrc.uow.edu.au> that prevents JB to
630 core dump when there is no log file.
631 - Tweaked SuSE startup with the help of mohataj@gmx.net and Doc.B@gmx.de.
632 - Fixed man page to include imagefile and popupfile.
633 - Sanity check for the statistics function added.
634 - "Patrick D'Cruze" <pdcruze@orac.iinet.net.au>: It seems Microsoft
635 are transitioning Hotmail from FreeBSD/Apache to Windows 2000/IIS.
636 With IIS/5, it appears to omit the trailing \r\n from http header
637 only messages. eg, when I visit http://www.hotmail.com, IIS/5
638 responds with a HTTP 302 redirect header. However, this header
639 message is missing the trailing \r\n. IIS/5 then closes the
640 connection. Junkbuster, unfortunately, discards the header becomes
641 it thinks it is incomplete - and it is. MS have transmitted an
643 - Added bug reports and patch submission forms in the docs.
645 * Mon Mar 20 2000 Stefan Waldherr <stefan@waldherr.org>
646 Andrew <anw@tirana.freewire.co.uk> extended the JB:
647 Display of statistics of the total number of requests and the number
648 of requests filtered by junkbuster, also the percentage of requests
649 filtered. Suppression of the listing of files on the proxy-args page.
650 All stuff optional and configurable.
652 * Sun Sep 12 1999 Stefan Waldherr <stefan@waldherr.org>
653 Jan Willamowius (jan@janhh.shnet.org) fixed a bug in the
654 code which prevented the JB from handling URLs of the form
655 user:password@www.foo.com. Fixed.
657 * Mon Aug 2 1999 Stefan Waldherr <stefan@waldherr.org>
658 Blank images are no longer cached, thanks to a hint from Markus
659 Breitenbach <breitenb@rbg.informatik.tu-darmstadt.de>. The user
660 agent is NO longer set by the Junkbuster. Sadly, many sites depend
661 on the correct browser version nowadays. Incorporated many
662 suggestions from Jan "Yenya" Kasprzak <kas@fi.muni.cz> for the
663 spec file. Fixed logging problem and since runlevel 2 does not
664 use networking, I replaced /etc/rc.d/rc2.d/S84junkbuster with
665 /etc/rc.d/rc2.d/K09junkbuster thanks to Shaw Walker
666 <walker@netgate.net>. You should now be able to build this RPM as
667 a non-root user (mathias@weidner.sem.lipsia.de).
669 * Sun Jan 31 1999 Stefan Waldherr <stefan@waldherr.org>
670 %%{_localstatedir}/log/junkbuster set to nobody. Added /etc/junkbuster/imagelist
671 to allow more sophisticated matching of blocked images. Logrotate
672 logfile. Added files for auto-updating the blocklist et al.
674 * Wed Dec 16 1998 Stefan Waldherr <stefan@waldherr.org>
675 Configure blank version via config file. No separate blank
676 version anymore. Added Roland's <roland@spinnaker.rhein.de>
677 patch to show a logo instead of a blank area. Added a suggestion
678 from Alex <alex@cocoa.demon.co.uk>: %%{_localstatedir}/lock/subsys/junkbuster.
679 More regexps in the blocklist. Prepared the forwardfile for
680 squid. Extended image regexp with help from gabriel
681 <somlo@CS.ColoState.EDU>.
683 * Thu Nov 19 1998 Stefan Waldherr <stefan@waldherr.org>
684 All RPMs now identify themselves in the show-proxy-args page.
685 Released Windoze version. Run junkbuster as nobody instead of
688 * Fri Oct 30 1998 Stefan Waldherr <stefan@waldherr.org>
689 Newest version. First release (hence the little version number
690 mixture -- 2.0.2-0 instead of 2.0-7). This version tightens
691 security over 2.0.1; some multi-user sites will need to change
692 the listen-address in the configuration file. The blank version of
693 the Internet Junkbuster has a more sophisticated way of replacing
694 images. All RPMs identify themselves in the show-proxy-args page.
696 * Thu Sep 23 1998 Stefan Waldherr <stefan@waldherr.org>
697 Modified the blocking feature, so that only GIFs and JPEGs are
698 blocked and replaced but not HTML pages. Thanks to
699 "Gerd Flender" <plgerd@informatik.uni-siegen.de> for this nice
700 idea. Added numerous stuff to the blocklist. Keep patches in
701 seperate files and no longer in diffs (easier to maintain).
703 * Tue Jun 16 1998 Stefan Waldherr <swa@cs.cmu.edu>
704 Moved config files to /etc/junkbuster directory, moved man page,
705 added BuildRoot directive (Thanks to Alexey Nogin <ayn2@cornell.edu>)
706 Made new version junkbuster-raw (which is only a stripped version of
707 the junkuster rpm, i.e. without my blocklist, etc.)
709 * Tue Jun 16 1998 (2.0-1)
710 Uhm, not that much. Just a new junkbuster version that
711 fixes a couple of bugs ... and of course a bigger
712 blocklist with the unique Now-less-ads-than-ever(SM)
714 Oh, one thing: I changed the default user agent to Linux -- no
715 need anymore to support Apple.
717 * Tue Jun 16 1998 (2.0-0)
718 Now-less-ads-than-ever (SM)
719 compiled with gcc instead of cc
720 compiled with -O3, thus it should be a little faster
721 show-proxy-args now works
722 /etc/junkbuster.init wasn't necessary
724 * Tue Jun 16 1998 (1.4)
725 some more config files were put into /etc
726 The junkbuster-blank rpm returns a 1x1 pixel image, that gets
727 displayed by Netscape instead of the blocked image.
728 Read http://www.waldherr.org/junkbuster/ for
731 * Tue Jun 16 1998 (1.3)
732 The program has been moved to /usr/sbin (from /usr/local/bin)
733 Init- and stopscripts (/etc/rc.d/rc*) have been added so
734 that the junkbuster starts automatically during bootup.
735 The /etc/blocklist file is much more sophisticated. Theoretically
736 one should e.g. browse all major US and German newspapers without
737 seeing one annoying ad.
738 junkbuster.init was modified. It now starts junkbuster with an
739 additional "-r @" flag.
741 # $Log: privoxy-rh.spec,v $
742 # Revision 1.45 2006/07/18 14:48:47 david__schmidt
743 # Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
744 # with what was really the latest development (the v_3_0_branch branch)
746 # Revision 1.33.2.22 2004/01/30 17:09:29 oes
747 # Bumped version for 3.0.3
749 # Revision 1.33.2.21 2003/03/26 00:25:00 oes
750 # Bump version for 3.0.2
752 # Revision 1.33.2.20 2003/03/20 03:27:11 hal9
753 # Bump version for 3.0.1 pending release.
755 # Revision 1.33.2.19 2002/08/25 23:36:03 hal9
756 # Bump version for 3.0.0.
758 # Revision 1.33.2.18 2002/08/10 11:28:50 oes
761 # Revision 1.33.2.17 2002/08/07 01:08:49 hal9
762 # Bumped version to 2.9.18.
764 # Revision 1.33.2.16 2002/08/05 08:42:13 kick_
765 # same permissions, same runlevels as all the other initscripts
767 # Revision 1.33.2.15 2002/07/30 21:51:19 hal9
768 # Bump version to 2.9.17.
770 # Revision 1.33.2.14 2002/07/27 21:58:16 kick_
773 # Revision 1.33.2.13 2002/07/27 21:39:41 kick_
774 # condrestart raised an error during an fresh install when privoxy wasn't already running
776 # Revision 1.33.2.12 2002/07/27 15:47:10 hal9
777 # Reset version and release for 2.9.16.
779 # Revision 1.33.2.11 2002/07/25 09:47:57 kick_
780 # this caused some errors during a fresh installation. It's unnecessary to call an extra program (/bin/true) to set the error code to 0
782 # Revision 1.33.2.10 2002/07/12 09:14:26 kick_
783 # don't use ghost files for rcX.d/*, chkconfig is available to do this job. Enable translation of error messge
785 # Revision 1.33.2.9 2002/07/05 17:16:19 morcego
786 # - Changing delete order for groups and users (users should be first)
788 # Revision 1.33.2.8 2002/07/03 20:46:24 morcego
789 # - Changing sed expression that removed CR from the end of the lines. This
790 # new one removes any control caracter, and should work with older versions
793 # Revision 1.33.2.7 2002/07/02 18:16:48 morcego
794 # - Fixing defattr values. File and directory modes where swapped
796 # Revision 1.33.2.6 2002/07/02 17:38:10 morcego
797 # Bumping Release number
799 # Revision 1.33.2.5 2002/07/02 11:43:20 hal9
800 # Fix typo in templates creation.
802 # Revision 1.33.2.4 2002/06/26 17:32:45 morcego
803 # Integrating fixed from the main branch.
805 # Revision 1.33.2.3 2002/06/24 12:13:34 kick_
806 # shut up rpmlint. btw: The vendor tag should be set in you .rpmmacros file, not in the spec file!
808 # Revision 1.33.2.2 2002/05/28 02:39:38 hal9
809 # Replace index.html with privoxy-index.html for docs.
811 # Revision 1.33.2.1 2002/05/26 17:20:23 hal9
812 # Add images to doc dirs.
814 # Revision 1.33 2002/05/25 02:08:23 hal9
815 # Add doc/images directory.
816 # Redhat: alphabetized list of templates (and I think added one in the process)
818 # Revision 1.32 2002/05/16 01:37:29 hal9
819 # Add new template file so CGI stuff works :)
821 # Revision 1.31 2002/05/03 17:14:35 morcego
822 # *.spec: Version bump to 2.9.15
823 # -rh.spec: noreplace for %%{privoxyconf}/config
824 # Will interrupt the build if versions from configure.in and
825 # specfile do not match
827 # Revision 1.30 2002/04/26 15:51:05 morcego
828 # Changing Vendor value to Privoxy.Org
830 # Revision 1.29 2002/04/24 03:13:51 hal9
831 # New actions files changes.
833 # Revision 1.28 2002/04/22 18:51:33 morcego
834 # user and group now get removed on rh too.
836 # Revision 1.27 2002/04/22 16:32:31 morcego
837 # configure.in, *.spec: Bumping release to 2 (2.9.14-2)
838 # -rh.spec: uid and gid are now macros
839 # -suse.spec: Changing the header Copyright to License (Copyright is
842 # Revision 1.26 2002/04/22 16:24:36 morcego
843 # - Changes to fixate the uid and gid values as (both) 73. This is a
844 # value we hope to standarize for all distributions. RedHat already
845 # uses it, and Conectiva should start as soon as I find where the heck
846 # I left my cluebat :-)
847 # - Only remove the user and group on uninstall if this is not redhat, once
848 # redhat likes to have the values allocated even if the package is not
851 # Revision 1.25 2002/04/17 01:59:12 hal9
852 # Add --disable-dynamic-pcre.
854 # Revision 1.24 2002/04/11 10:09:20 oes
857 # Revision 1.23 2002/04/10 18:14:45 morcego
858 # - (privoxy-rh.spec only) Relisting template files on the %%files section
859 # - (configure.in, privoxy-rh.spec) Bumped package release to 5
861 # Revision 1.22 2002/04/09 22:06:12 hal9
864 # Revision 1.21 2002/04/09 02:52:26 hal9
865 # - Add templates/cgi-style.css, faq.txt, p_web.css, LICENSE
866 # - Remove templates/blocked-compact.
867 # - Add more docbook stuff to Buildrequires.
869 # Revision 1.20 2002/04/08 20:27:45 swa
872 # Revision 1.19 2002/03/27 22:44:59 sarantis
873 # Include correct documentation file.
875 # Revision 1.18 2002/03/27 22:10:14 sarantis
876 # bumped Hal's last commit 1 day to the future to make rpm build again.
878 # Revision 1.17 2002/03/27 00:48:23 hal9
881 # Revision 1.16 2002/03/26 22:29:55 swa
882 # we have a new homepage!
884 # Revision 1.15 2002/03/26 17:39:54 morcego
885 # Adding comment on the specfile to remember the packager to update
886 # the release number on the configure script
888 # Revision 1.14 2002/03/26 14:25:15 hal9
889 # Added edit-actions-for-url-filter to templates in %%config
891 # Revision 1.13 2002/03/25 13:31:04 morcego
892 # Bumping Release tag.
894 # Revision 1.12 2002/03/25 03:11:40 hal9
895 # Do it right way this time :/
897 # Revision 1.11 2002/03/25 03:09:51 hal9
900 # Revision 1.10 2002/03/24 22:16:14 morcego
901 # Just removing some old commentaries.
903 # Revision 1.9 2002/03/24 22:03:22 morcego
904 # Should be working now. See %changelog for details
906 # Revision 1.8 2002/03/24 21:13:01 morcego
909 # Revision 1.7 2002/03/24 21:07:18 hal9
910 # Add autoheader, etc.
912 # Revision 1.6 2002/03/24 19:56:40 hal9
913 # /etc/junkbuster is now /etc/privoxy. Fixed ';' typo.
915 # Revision 1.4 2002/03/24 13:32:42 swa
916 # name change related issues
918 # Revision 1.3 2002/03/24 12:56:21 swa
919 # name change related issues.
921 # Revision 1.2 2002/03/24 11:40:14 swa
924 # Revision 1.1 2002/03/24 11:23:44 swa
927 # Revision 1.1 2002/03/22 20:53:03 morcego
928 # - Ongoing process to change name to JunkbusterNG
929 # - configure/configure.in: no change needed
931 # - TAR_ARCH = /tmp/JunkbusterNG-$(RPM_VERSION).tar.gz
932 # - PROGRAM = jbng@EXEEXT@
933 # - rh-spec now references as junkbusterng-rh.spec
934 # - redhat-upload: references changed to junkbusterng-* (package names)
935 # - tarball-dist: references changed to JunkbusterNG-distribution-*
936 # - tarball-src: now JunkbusterNG-*
937 # - install: initscript now junkbusterng.init and junkbusterng (when
939 # - junkbuster-rh.spec: renamed to junkbusterng-rh.spec
940 # - junkbusterng.spec:
941 # - References to the expression ijb where changed where possible
942 # - New package name: junkbusterng (all in lower case, acording to
943 # the LSB recomendation)
944 # - Version changed to: 2.9.13
946 # - Added: junkbuster to obsoletes and conflicts (Not sure this is
947 # right. If it obsoletes, why conflict ? Have to check it later)
948 # - Summary changed: Stefan, please check and aprove it
949 # - Changes description to use the new name
950 # - Sed string was NOT changed. Have to wait to the manpage to
952 # - Keeping the user junkbuster for now. It will require some aditional
953 # changes on the script (scheduled for the next specfile release)
954 # - Added post entry to move the old logfile to the new log directory
955 # - Removing "chkconfig --add" entry (not good to have it automaticaly
956 # added to the startup list).
957 # - Added preun section to stop the service with the old name, as well
958 # as remove it from the startup list
959 # - Removed the chkconfig --del entry from the conditional block on
960 # the preun scriptlet (now handled on the %files section)
961 # - junkbuster.init: renamed to junkbusterng.init
962 # - junkbusterng.init:
963 # - Changed JB_BIN to jbng
964 # - Created JB_OBIN with the old value of JB_BIN (junkbuster), to
965 # be used where necessary (config dir)
968 # - The config directory is /etc/junkbuster yet. Have to change it on the
969 # specfile, after it is changes on the code
970 # - The only files that got renamed on the cvs tree were the rh specfile and
971 # the init file. Some file references got changes on the makefile and on the
972 # rh-spec (as listed above)
974 # Revision 1.43 2002/03/21 16:04:10 hal9
975 # added ijb_docs.css to %doc
977 # Revision 1.42 2002/03/12 13:41:18 sarantis
978 # remove hard-coded "ijbswa" string in build phase
980 # Revision 1.41 2002/03/11 22:58:32 hal9
981 # Remove --enable-no-gifs
983 # Revision 1.39 2002/03/08 18:57:29 swa
984 # remove user junkbuster after de-installation.
986 # Revision 1.38 2002/03/08 13:45:27 morcego
987 # Adding libtool to Buildrequires
989 # Revision 1.37 2002/03/07 19:23:49 swa
990 # i hate to scroll. suse: wrong configdir.
992 # Revision 1.36 2002/03/07 05:06:54 morcego
993 # Fixed %pre scriptlet. And, as a bonus, you can even understand it now. :-)
995 # Revision 1.34 2002/03/07 00:11:57 morcego
996 # Few changes on the %pre and %post sections of the rh specfile to handle
997 # usernames more cleanly
999 # Revision 1.33 2002/03/05 13:13:57 morcego
1000 # - Added "make redhat-dok" to the build phase
1001 # - Added docbook-utils to BuildRequires
1003 # Revision 1.32 2002/03/05 12:34:24 morcego
1004 # - Changing section internaly on the manpage from 1 to 8
1005 # - We now require packages, not files, to avoid issues with apt
1007 # Revision 1.31 2002/03/04 18:06:09 morcego
1008 # SPECFILE: fixing permissing of the init script (broken by the last change)
1010 # Revision 1.30 2002/03/04 16:18:03 morcego
1011 # General cleanup of the rh specfile.
1014 # * Mon Mar 04 2002 Rodrigo Barbosa <rodrigob@tisbrasil.com.br>
1015 # + junkbuster-2.9.11-2
1016 # - General specfile fixup, using the best recomended practices, including:
1017 # - Adding -q to %%setup
1018 # - Using macros whereever possible
1019 # - Not using wildchars on %%files section
1020 # - Doubling the percentage char on changelog and comments, to
1021 # avoid rpm expanding them
1023 # Revision 1.29 2002/03/03 19:21:22 hal9
1024 # Init script fails if shell is /bin/false.
1026 # Revision 1.28 2002/01/09 18:34:03 hal9
1029 # Revision 1.27 2002/01/09 18:32:02 hal9
1030 # Removed RPM_OPT_FLAGS kludge.
1032 # Revision 1.26 2002/01/09 18:21:10 hal9
1033 # A few minor updates.
1035 # Revision 1.25 2001/12/28 01:45:36 steudten
1036 # Add paranoia check and BuildReq: gzip
1038 # Revision 1.24 2001/12/01 21:43:14 hal9
1039 # Allowed for new ijb.action file.
1041 # Revision 1.23 2001/11/06 12:09:03 steudten
1042 # Compress doc files. Install README and AUTHORS at last as document.
1044 # Revision 1.22 2001/11/05 21:37:34 steudten
1045 # Fix to include the actual version for name.
1046 # Let the 'real' packager be included - sorry stefan.
1048 # Revision 1.21 2001/10/31 19:27:27 swa
1049 # consistent description. new name for suse since
1050 # we had troubles with rpms of identical names
1053 # Revision 1.20 2001/10/24 15:45:49 hal9
1054 # To keep Thomas happy (aka correcting my mistakes)
1056 # Revision 1.19 2001/10/15 03:23:59 hal9
1059 # Revision 1.17 2001/10/10 18:59:28 hal9
1060 # Minor change for init script.
1062 # Revision 1.16 2001/09/24 20:56:23 hal9
1065 # Revision 1.13 2001/09/10 17:44:43 swa
1066 # integrate three pieces of documentation. needs work.
1067 # will not build cleanly under redhat.
1069 # Revision 1.12 2001/09/10 16:25:04 swa
1070 # copy all templates. version updated.
1072 # Revision 1.11 2001/07/03 11:00:25 sarantis
1073 # replaced permissionsfile with actionsfile
1075 # Revision 1.10 2001/07/03 09:34:44 sarantis
1076 # bumped up version number.
1078 # Revision 1.9 2001/06/12 18:15:29 swa
1079 # the %% in front of configure (see tag below) confused
1080 # the rpm build process on 7.1.
1082 # Revision 1.8 2001/06/12 17:15:56 swa
1083 # fixes, because a clean build on rh6.1 was impossible.
1084 # GZIP confuses make, %% configure confuses rpm, etc.
1086 # Revision 1.7 2001/06/11 12:17:26 sarantis
1087 # fix typo in %%post
1089 # Revision 1.6 2001/06/11 11:28:25 sarantis
1090 # Further optimizations and adaptations in the spec file.
1092 # Revision 1.5 2001/06/09 09:14:11 swa
1093 # shamelessly adapted RPM stuff from the newest rpm that
1094 # RedHat provided for the JB.
1096 # Revision 1.4 2001/06/08 20:54:18 swa
1097 # type with status file. remove forward et. al from file list.
1099 # Revision 1.3 2001/06/07 17:28:10 swa
1102 # Revision 1.2 2001/06/04 18:31:58 swa
1103 # files are now prefixed with either `confdir' or `logdir'.
1104 # `make redhat-dist' replaces both entries confdir and logdir
1105 # with redhat values
1107 # Revision 1.1 2001/06/04 10:44:57 swa
1108 # `make redhatr-dist' now works. Except for the paths
1109 # in the config file.