X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=junkbuster-suse.spec;h=5b2b7d5417bf3659ab9f21084eeb21a7b8416c39;hp=56cf789f9fe8cc61ed5b9613b37b052a0f69eb7f;hb=d7a36242a9dc017c20019563454de0781b3775dc;hpb=258e78f82afac48a058c4d306786f8d53e93acc4 diff --git a/junkbuster-suse.spec b/junkbuster-suse.spec index 56cf789f..5b2b7d54 100644 --- a/junkbuster-suse.spec +++ b/junkbuster-suse.spec @@ -1,4 +1,4 @@ -# $Id: junkbuster-suse.spec,v 1.3 2001/06/07 17:28:10 swa Exp $ +# $Id: junkbuster-suse.spec,v 1.17 2002/03/08 19:30:23 swa Exp $ # # Written by and Copyright (C) 2001 the SourceForge # IJBSWA team. http://ijbswa.sourceforge.net @@ -25,44 +25,39 @@ # or write to the Free Software Foundation, Inc., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -# $Log: junkbuster-suse.spec,v $ -# Revision 1.3 2001/06/07 17:28:10 swa -# cosmetics -# -# Revision 1.2 2001/06/07 17:18:44 swa -# header fixed -# -# -# neededforbuild -ijb -# usedforbuild -ijb aaa_base aaa_dir autoconf automake base bash bindutil binutils bison bzip compress cpio cracklib db devs diffutils e2fsprogs file fileutils findutils flex gawk gcc gdbm gdbm-devel gettext glibc glibc-devel gpm gppshare groff gzip kbd less libtool libz lx_suse make mktemp modutils ncurses ncurses-devel net-tools netcfg nkitb pam pam-devel patch perl pgp ps rcs rpm sendmail sh-utils shadow strace syslogd sysvinit texinfo textutils timezone unzip util-linux vim xdevel xf86 xshared +# do not set to %{name} +%define ijbconf %{_sysconfdir}/junkbuster + +Summary: The Internet Junkbuster Vendor: http://ijbswa.sourceforge.net +Name: junkbuster-suse Distribution: defineme -Name: junkbuster +Version: 2.9.11 +Release: 1 +Source: http://www.waldherr.org/%{name}/ijbswa-%{version}.tar.gz +# not sure if this works +BuildRoot: %{_tmppath}/%{name}-%{version}-root Packager: Stefan Waldherr - Copyright: GPL -BuildRoot: /tmp/junkbuster-rpmbuild Group: Networking/Utilities +URL: http://ijbswa.sourceforge.net/ Provides: ijb Obsoletes: ijb Autoreqprov: on -Version: 2.9 -Release: 4 -Summary: The Internet Junkbuster -Source: http://www.waldherr.org/junkbuster/ijbswa.tar.gz +BuildRequires: perl gzip docbktls libtool # # ----------------------------------------------------------------------------- # %description -The Internet Junkbuster (TM) blocks unwanted banner ads and protects -your privacy from cookies and other threats. It's free under the GPL -(no warranty), runs under *NIX and works with almost any browser. You -need to clear you browser's cache and specify the proxy-server, -described in /usr/doc/junkbuster. This is a modified version which -returns a blank GIF for blocked images by default. But you can -configure this via /etc/junkbuster/config. +Internet Junkbuster is a web proxy with advanced filtering +capabilities for protecting privacy, filtering web page content, +managing cookies, controlling access, and removing ads, banners, +pop-ups and other obnoxious Internet Junk. Junkbuster has a very +flexible configuration and can be customized to suit individual needs +and tastes. Internet Junkbuster has application for both stand-alone +systems and multi-user networks. Authors: -------- @@ -80,24 +75,40 @@ SuSE series: n # ----------------------------------------------------------------------------- # %build -./configure +autoheader +autoconf +./configure --enable-no-gifs make +make dok + +## Explicitily stripping is not recomended. +## This is handled altomaticaly by RPM, and can couse troubles if +## anyone wants to build an unstriped version - morcego +#strip junkbuster # # ----------------------------------------------------------------------------- # %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/{var/log/junkbuster,usr/{sbin,share/man/man1},etc/{junkbuster,junkbuster/templates,init.d}} - -install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT/etc/init.d/junkbuster -ln -sf $RPM_BUILD_ROOT/etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT +mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} \ + ${RPM_BUILD_ROOT}%{_mandir}/man8 \ + ${RPM_BUILD_ROOT}/var/log/junkbuster \ + ${RPM_BUILD_ROOT}%{ijbconf}/templates \ + ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d \ + ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d +gzip README AUTHORS ChangeLog junkbuster.1 || /bin/true +install -s -m 744 junkbuster $RPM_BUILD_ROOT%{_sbindir}/junkbuster +cp -f junkbuster.1.gz $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8.gz +cp -f *.action $RPM_BUILD_ROOT%{ijbconf}/ +cp -f re_filterfile $RPM_BUILD_ROOT%{ijbconf}/re_filterfile +cp -f trust $RPM_BUILD_ROOT%{ijbconf}/trust +cp -f templates/* $RPM_BUILD_ROOT%{ijbconf}/templates/ +cp -f junkbuster.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/junkbuster +install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT%{_sysconfdir}/init.d/junkbuster +install -m 711 -d $RPM_BUILD_ROOT/var/log/junkbuster +ln -sf /etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster -install -m 755 junkbuster $RPM_BUILD_ROOT/usr/sbin -install -d $RPM_BUILD_ROOT/etc/junkbuster -install -d $RPM_BUILD_ROOT/etc/junkbuster/templates -install -m 644 permissionsfile $RPM_BUILD_ROOT/etc/junkbuster -install -m 644 re_filterfile $RPM_BUILD_ROOT/etc/junkbuster # verify all file locations, etc. in the config file # don't start with ^ or commented lines are not replaced cat config | \ @@ -109,44 +120,130 @@ cat config | \ # sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \ # sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \ sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \ - config.tmp -cp -f config.tmp config -install -m 644 config $RPM_BUILD_ROOT/etc/junkbuster -#install -m 644 forward $RPM_BUILD_ROOT/etc/junkbuster -install -m 644 trust $RPM_BUILD_ROOT/etc/junkbuster -install -m 644 templates/default $RPM_BUILD_ROOT/etc/junkbuster/templates -install -m 644 templates/show-status $RPM_BUILD_ROOT/etc/junkbuster/templates -install -m 644 templates/show-status-file $RPM_BUILD_ROOT/etc/junkbuster/templates -install -m 644 junkbuster.1 $RPM_BUILD_ROOT/usr/share/man/man1 -%{?suse_check} + $RPM_BUILD_ROOT%{ijbconf}/config + +# +# ----------------------------------------------------------------------------- +# +%pre +# We check to see if the user junkbuster exists. +# If it does, we do nothing +# If we don't, we check to see if the user junkbust exist and, in case it +# does, we change it do junkbuster. If it also does not exist, we create the +# junkbuster user -- morcego +id junkbuster > /dev/null 2>&1 +if [ $? -eq 1 ]; then + id junkbust > /dev/null 2>&1 + if [ $? -eq 0 ]; then + /usr/sbin/usermod -l junkbuster -d %{_sysconfdir}/junkbuster -s "" junkbust > /dev/null 2>&1 + else +# -r does not work on suse. + /usr/sbin/groupadd junkbuster + /usr/sbin/useradd -d %{_sysconfdir}/junkbuster -g junkbuster -s "" junkbuster > /dev/null 2>&1 + fi +fi # # ----------------------------------------------------------------------------- # %post +[ -f /var/log/junkbuster/junkbuster ] &&\ + mv -f /var/log/junkbuster/junkbuster /var/log/junkbuster/logfile || /bin/true +chown -R junkbuster:junkbuster /var/log/junkbuster 2>/dev/null +chown -R junkbuster:junkbuster /etc/junkbuster 2>/dev/null +# not available on suse +#if [ "$1" = "1" ]; then +# /sbin/chkconfig --add junkbuster +# /sbin/service junkbuster condrestart > /dev/null 2>&1 +#fi +# 01/09/02 HB, getting rid of any user=junkbust +# Changed by morcego to use the id command. +id junkbust > /dev/null 2>&1 && /usr/sbin/userdel junkbust || /bin/true sbin/insserv etc/init.d/junkbuster +# +# ----------------------------------------------------------------------------- +# +%preun +# need to stop the service on suse. swa. +#if [ "$1" = "0" ]; then +# /sbin/service junkbuster stop > /dev/null 2>&1 ||: +#fi + # # ----------------------------------------------------------------------------- # %postun sbin/insserv etc/init.d/ +# dont forget to remove user and group junkbuster +id junkbuster > /dev/null 2>&1 && /usr/sbin/userdel junkbuster || /bin/true + +# +# ----------------------------------------------------------------------------- +# +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT # # ----------------------------------------------------------------------------- # %files -#%doc README *.html -/usr/sbin/junkbuster -/usr/share/man/man1/junkbuster.1.gz -%config(noreplace) /etc/junkbuster -/etc/init.d/junkbuster +%defattr(-,root,root) +%doc README.gz AUTHORS.gz ChangeLog.gz +%doc doc/webserver/developer-manual doc/webserver/user-manual +%doc doc/webserver/user-manual +#%doc junkbuster.weekly junkbuster.monthly AUTHORS +%dir %{ijbconf} +%config %{ijbconf}/* +%attr(0744,junkbuster,junkbuster) %dir /var/log/junkbuster +%config %{_sysconfdir}/logrotate.d/junkbuster +%attr(0755,root,root)/usr/sbin/junkbuster +%{_mandir}/man8/* +%config %{_sysconfdir}/init.d/junkbuster /usr/sbin/rcjunkbuster # # ----------------------------------------------------------------------------- # -%changelog -n junkbuster +%changelog +* Thu Mar 7 2002 Stefan Waldherr +- major rework of rpm, help by kukuk@suse.de + +* Sun Mar 03 2002 Hal Burgiss +- /bin/false for shell causes init script to fail. Reverting. + +* Wed Jan 09 2002 Hal Burgiss +- Removed UID 73. Included user-manual and developer-manual in docs. + Include other actions files. Default shell is now /bin/false. + Userdel user=junkbust. ChangeLog was not zipped. Removed + RPM_OPT_FLAGS kludge. + +* Fri Dec 28 2001 Thomas Steudten +- add paranoia check for 'rm -rf $RPM_BUILD_ROOT' +- add gzip to 'BuildRequires' + +* Sat Dec 1 2001 Hal Burgiss +- actionsfile is now ijb.action. + +* Tue Nov 6 2001 Thomas Steudten +- Compress manpage +- Add more documents for installation +- Add version string to name and source + +* Wed Oct 24 2001 Hal Burigss +- Back to user 'junkbuster' and fix configure macro. + +* Wed Oct 10 2001 Hal Burigss +- More changes for user 'junkbust'. Init script had 'junkbuster'. + +* Sun Sep 23 2001 Hal Burgiss +- Change of $RPM_OPT_FLAGS handling. Added new HTML doc files. +- Changed owner of /etc/junkbuster to shut up PAM/xauth log noise. + +* Thu Sep 13 2001 Hal Burgiss +- Added $RPM_OPT_FLAGS support, renaming of old logfile, and +- made sure no default shell exists for user junkbust. + * Sun Jun 3 2001 Stefan Waldherr - rework of RPM * Wed Feb 14 2001 - uli@suse.de @@ -173,3 +270,65 @@ sbin/insserv etc/init.d/ (http://www.waldherr.org/junkbuster/) * Mon Mar 01 1999 - daniel@suse.de - new package: version 2.0 + +# $Log: junkbuster-suse.spec,v $ +# Revision 1.17 2002/03/08 19:30:23 swa +# remove user junkbuster after de-installation. +# synced suse with rh-specfile. installation +# and de-installation seem to work. +# +# Revision 1.16 2002/03/08 18:40:44 swa +# build requires tools. useradd and del works +# now. +# +# Revision 1.15 2002/03/07 19:23:50 swa +# i hate to scroll. suse: wrong configdir. +# +# Revision 1.14 2002/03/07 19:10:21 swa +# builds cleanly. thanks to kukuk@suse.de +# not yet tested. +# +# Revision 1.13 2002/03/07 18:25:56 swa +# synced redhat and suse build process +# +# Revision 1.12 2002/03/02 15:50:04 swa +# 2.9.11 version. more input for docs. +# +# Revision 1.11 2001/12/02 10:29:26 swa +# New version made these changes necessary. +# +# Revision 1.10 2001/10/31 19:27:27 swa +# consistent description. new name for suse since +# we had troubles with rpms of identical names +# on the webserver. +# +# Revision 1.9 2001/10/26 18:17:23 swa +# new version string +# +# Revision 1.8 2001/09/13 16:22:42 swa +# man page is legacy. suse rpm now contains html +# documentation. +# +# Revision 1.7 2001/09/10 17:44:22 swa +# integrate three pieces of documentation. +# +# Revision 1.6 2001/09/10 16:29:23 swa +# binary contained debug info. +# buildroot definition fucks up the build process under suse. +# program needs to write in varlogjunkbuster +# install all templates +# create varlogjunkbuster +# +# Revision 1.5 2001/06/09 09:13:29 swa +# description shorter +# +# Revision 1.4 2001/06/08 20:53:36 swa +# use buildroot, export init to separate file (better manageability) +# +# Revision 1.3 2001/06/07 17:28:10 swa +# cosmetics +# +# Revision 1.2 2001/06/07 17:18:44 swa +# header fixed +# +#