diff options
author | 2010-12-07 09:11:50 +0000 | |
---|---|---|
committer | 2010-12-07 09:11:50 +0000 | |
commit | cdc55858bf9a76e620e9ac7864564003c18374d5 (patch) | |
tree | f85cb2566cf878c82ee10f6e433729ab3a62a0c8 /net-proxy | |
parent | Corrected logic on die, thanks Guilherme Amadio for the patch #347929 (diff) | |
download | historical-cdc55858bf9a76e620e9ac7864564003c18374d5.tar.gz historical-cdc55858bf9a76e620e9ac7864564003c18374d5.tar.bz2 historical-cdc55858bf9a76e620e9ac7864564003c18374d5.zip |
Version bump. This new version renames the init script to ufdb (to fall in line with the official documentation), relocates the blacklists and the configuration file, allows setting user/password for download without editing the script, allows to disable at build time the use of ufdbhttpd, installs a cron.daily file to update the database and adds a reload target to the init script (with a reconfig alias as that's what the official documentation suggests to use). Also add a doc USE flag to download and install the official reference manual for the version.
Package-Manager: portage-2.2.0_alpha7/cvs/Linux x86_64
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/ufdbguard/ChangeLog | 18 | ||||
-rw-r--r-- | net-proxy/ufdbguard/Manifest | 24 | ||||
-rw-r--r-- | net-proxy/ufdbguard/files/ufdb.confd | 17 | ||||
-rw-r--r-- | net-proxy/ufdbguard/files/ufdb.initd | 77 | ||||
-rw-r--r-- | net-proxy/ufdbguard/files/ufdbUpdate.cron | 14 | ||||
-rw-r--r-- | net-proxy/ufdbguard/files/ufdbguard-1.23-gentoo.patch | 70 | ||||
-rw-r--r-- | net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch | 133 | ||||
-rw-r--r-- | net-proxy/ufdbguard/files/ufdbhttpd.confd | 11 | ||||
-rw-r--r-- | net-proxy/ufdbguard/files/ufdbhttpd.initd | 23 | ||||
-rw-r--r-- | net-proxy/ufdbguard/metadata.xml | 31 | ||||
-rw-r--r-- | net-proxy/ufdbguard/ufdbguard-1.23.ebuild | 130 |
11 files changed, 501 insertions, 47 deletions
diff --git a/net-proxy/ufdbguard/ChangeLog b/net-proxy/ufdbguard/ChangeLog index 8891b89dcf87..22e74c912b2e 100644 --- a/net-proxy/ufdbguard/ChangeLog +++ b/net-proxy/ufdbguard/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for net-proxy/ufdbguard # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/ChangeLog,v 1.9 2010/05/07 03:37:35 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/ChangeLog,v 1.10 2010/12/07 09:11:50 flameeyes Exp $ + +*ufdbguard-1.23 (07 Dec 2010) + + 07 Dec 2010; Diego E. Pettenò <flameeyes@gentoo.org> +ufdbguard-1.23.ebuild, + +files/ufdbguard-1.23-gentoo.patch, + +files/ufdbguard-1.23-parallel-make.patch, +files/ufdb.confd, + +files/ufdb.initd, +files/ufdbUpdate.cron, -files/ufdbhttpd.confd, + -files/ufdbhttpd.initd, metadata.xml: + Version bump. This new version renames the init script to ufdb (to fall in + line with the official documentation), relocates the blacklists and the + configuration file, allows setting user/password for download without editing + the script, allows to disable at build time the use of ufdbhttpd, installs a + cron.daily file to update the database and adds a reload target to the init + script (with a reconfig alias as that's what the official documentation + suggests to use). Also add a doc USE flag to download and install the + official reference manual for the version. 07 May 2010; Jeroen Roovers <jer@gentoo.org> ufdbguard-1.20.ebuild: Remove dev cruft from ebuild. diff --git a/net-proxy/ufdbguard/Manifest b/net-proxy/ufdbguard/Manifest index bf76d12904ec..bcd24461b1bc 100644 --- a/net-proxy/ufdbguard/Manifest +++ b/net-proxy/ufdbguard/Manifest @@ -1,11 +1,27 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX ufdb.confd 569 RMD160 ee105f38df8cdc44b4598f27aacba0696c922a66 SHA1 a682bc546ce632c4ee838e7f176c65472ca7b717 SHA256 8a511810af1f6ba2d1a0e096c2af66b5de0916339e26af9e4e0ee190f0e23e10 +AUX ufdb.initd 1750 RMD160 facc32cef9080043efff4bac61823542cb9faf26 SHA1 7c5aed9eca311ec11760b0507ca0a7228e365169 SHA256 14f6ca4c71ade59436ca6e2a174b827ac50bd2cf6d910696a2726b5cf53b5184 +AUX ufdbUpdate.cron 474 RMD160 1fa8fda97302a64b07be77140216e4353c73303e SHA1 294bc62120bce0a6a08fe9e4fe0988a657247d11 SHA256 d2ef98e681353140a83ca2ad41603659dab9e016f576c0203b191f6982f773cc AUX ufdbguard-1.20-parallel-make.patch 3889 RMD160 faf5efa264b7264e5e7dad84a9a324e898c351a8 SHA1 97b3222a194b826191241e267448b3f5631eb2a5 SHA256 e657a4be2f6764f00456a43b354794fb828667118093f7b95256f52cd03e49f5 +AUX ufdbguard-1.23-gentoo.patch 2160 RMD160 5a0662b95d9e1dfba97ce2aff8df584c8517299b SHA1 9befc66d0909e6fae0220a693e372846e3dab9db SHA256 e95da6e5f3d70b56e5e0e9ab4b89b5a64b8d1b2f8972e5ee66eb68a0c2e3d57d +AUX ufdbguard-1.23-parallel-make.patch 3910 RMD160 5086735f2500899c28185a2887a44d9fdd585a39 SHA1 6861a77315776627d728ccfe893641999b9cc6f6 SHA256 6a855ed8b9232c3c663ec6fc890b19eb828d675f4cb6a0f9829702ed709cceb7 AUX ufdbguard.confd 402 RMD160 2cd60b4733d49f77884dcf5f6b424698b6676277 SHA1 09c56de3e2112fce23fc71418303e3e74f7f978f SHA256 f39e7a716c65043e78cfb1e928a656115a9a3e545d8f36a05eabba499f5316a1 AUX ufdbguard.initd 1021 RMD160 7d4c5e63dcce32db5e4db24bdb35c8aa71611ac7 SHA1 d785bfe9b72b647e36998e39bc7a2ba9fbc6c929 SHA256 129db96a03b132eee27cb65c90e5fea36481d3230309e9d19c126a0c060b4618 -AUX ufdbhttpd.confd 292 RMD160 37e1b7ba717652918856dd1af399613485a067d1 SHA1 47265a838193178641183ecdccdbdfd68238b904 SHA256 2ef748832a479ba7e7610745a19773fc18fb7f278687d98532612e524d140d6e -AUX ufdbhttpd.initd 683 RMD160 162b1947d8deb82cf1a06b2cf797f676bb43f035 SHA1 f481aebdb7d31c102e9da6daf1b13f1999c668bc SHA256 a3b101c854a9694d38dac967a9436e3d40d1b9a9703a708723baf255bfecc7af DIST ufdbGuard-1.11.tar.gz 586455 RMD160 bf5386f65283a41de2263566b812f0f20c22a9fe SHA1 675c0c18b8b37570fd5e163f5e475f2c370dcfa4 SHA256 5ce227a5cc23c2f6b6f5ccac3e59711386feaa751ff56a922890e4cb240528f3 DIST ufdbGuard-1.20.tar.gz 681981 RMD160 b789de2d27c4e1834bdd1b7a1625f22210446889 SHA1 d16b3849d3ec05d1b0db73f2261ae111792f4203 SHA256 ef9ce77f7614cb1004fcbe4bf6bf8f54f44a2a7cedab0fdab61e6d2a580949da +DIST ufdbGuard-1.23.tar.gz 729063 RMD160 99e48e6ebbf2c1b0e9d9532f878853ca1319dd50 SHA1 6670b505670d7e7c9a9aef4a342f42c9d497b11f SHA256 02fbcee7cacc56c84e9d93557482da12cad2dd6ee548f86935dc2ac49777bbcc +DIST ufdbguard-1.23-manual.pdf 469337 RMD160 9d0e13aa45dc49869fb8136e9c71129d14f5a416 SHA1 3e3d4c66348bbb055bbb84fa874d57a10a613f3c SHA256 84d32233d1547e5690bbe78d94780dd4cfe56f6c0f0077a46bc9e1000585928d EBUILD ufdbguard-1.11.ebuild 1449 RMD160 ab72eddf685fe820661107c123ce02855cd31132 SHA1 b8c060fa78bc04e45a578b7bd83934c799e0fd65 SHA256 95fb89dcc517861b01f7a3af5da8593f96acfac5756d2ada0f18761a77532f86 EBUILD ufdbguard-1.20.ebuild 1742 RMD160 7a7babe1db357f89530e1b9d0f05a16c59c38cee SHA1 99eef95b0fbc1aa41f9663fb22068d3a1aee0a18 SHA256 c4e0d89f8174604b2774e341159c7845cc2bdebc241622c7b5fa1f67db224f0c -MISC ChangeLog 1630 RMD160 47917f2b00f3f718cabed8439e4e59a1b02a0eb1 SHA1 0c7d35dc7e924d74629019289de4790d9f2f36cd SHA256 2212a78b81da704a5740c4a6ac9970ab00a1d749483b4ae451ea5df4f2f56d37 -MISC metadata.xml 480 RMD160 0fdde361e5387cfb2309ac143af25bafa90c85a7 SHA1 3cf13af5230506504ace227a6bcffad632ec213c SHA256 578bc2eca5799022f63aa1adf4d4f67b73e53d8c3b4e9ee9393d8484c82eb500 +EBUILD ufdbguard-1.23.ebuild 3824 RMD160 0ce8cf2b8f51038b7455babb759eb111f4ddd705 SHA1 2e3fff409b59418dc3c53d2c3fd6205ec6ab9a47 SHA256 82c232ea801fc45da2b9cd03210087e08e836ce4a2b4cfa4e97e9954be3b4aad +MISC ChangeLog 2539 RMD160 3468afae7ee6feee0e6bb3fd3e19c8e1ba34fd9e SHA1 45ed953da9a9247c959c00d715e5006d2ce14055 SHA256 59c52dbc5a99f5516bba00c16adc399c420ac6b994938fe4af1ab9726c3eb262 +MISC metadata.xml 943 RMD160 0a1723e649891a6996b77378726a39c6c4caae1f SHA1 6af5940d239a4c0458a063d647481d6544c84c16 SHA256 a9e1f4c653f75f81e44eaa27085c16ba589b19fd25de401089476a8bb3245443 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.16 (GNU/Linux) + +iEYEARECAAYFAkz9+fMACgkQAiZjviIA2XirPQCfSAT26ntjO/pz9zWEWOuHNIGS +qkMAoLFLTpL6/NjzhSkuQSI+tRq5uNju +=ifpO +-----END PGP SIGNATURE----- diff --git a/net-proxy/ufdbguard/files/ufdb.confd b/net-proxy/ufdbguard/files/ufdb.confd new file mode 100644 index 000000000000..5ef5e4af6c53 --- /dev/null +++ b/net-proxy/ufdbguard/files/ufdb.confd @@ -0,0 +1,17 @@ +# -*- sh -*- +# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/files/ufdb.confd,v 1.1 2010/12/07 09:11:50 flameeyes Exp $ + +# Tables to re-generate when starting or reloading ufdbguard +UFDB_GT="alwaysallow alwaysdeny" + +# User under which to run ufdbguard; it should be the same as the +# proxy server you're using, so by default it is squid. +UFDB_USER="squid" + +# Options to pass to ufdbguardd; see /usr/libexec/ufdbguard/ufdbguardd +# -h for a brief list. +UFDB_OPTS="" + +# Options used by the modified ufdbUpdate script in Gentoo +DOWNLOAD_USER="" +DOWNLOAD_PASSWORD="" diff --git a/net-proxy/ufdbguard/files/ufdb.initd b/net-proxy/ufdbguard/files/ufdb.initd new file mode 100644 index 000000000000..b6c02c6b34fd --- /dev/null +++ b/net-proxy/ufdbguard/files/ufdb.initd @@ -0,0 +1,77 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/files/ufdb.initd,v 1.1 2010/12/07 09:11:50 flameeyes Exp $ + +# reconfig is what the upstream documentation suggests, so let's +# provide it for compatibility. +opts="${opts} reload reconfig" + +depend() { + need net + before squid + use logger +} + +get_config() { + awk '$1 == "'$1'" { print $2 }' "/etc/ufdbGuard.conf" +} + +gentables() { + local dbhome=$(get_config dbhome) + + for gt in ${UFDB_GT} ; do + if [ -f "${dbhome}/${gt}/domains" ] ; then + einfo "Generating domainlist ${gt}" + ufdbGenTable -t "${gt}" -d "${dbhome}/${gt}/domains" + fi + done +} + +start() { + gentables + + local logdir=$(get_config logdir) + + if [ ! -d "${logdir}" ] ; then + mkdir -p ${logdir} + chown -R ${UFDB_USER} ${logdir} + fi + + if [ ! -d /var/run/ufdbguardd ] ; then + mkdir -p /var/run/ufdbguard + chown -R ${UFDB_USER} /var/run/ufdbguard + fi + + ebegin "Starting ufdbGuard" + start-stop-daemon --start --chuid ${UFDB_USER} \ + --exec /usr/libexec/ufdbguard/ufdbguardd \ + --pidfile /var/run/ufdbguard/ufdbguardd.pid -- \ + -c /etc/ufdbGuard.conf ${UFDB_OPTS} + eend $? "Failed to start ufdbGuard" +} + +stop() { + ebegin "Stopping ufdbGuard" + start-stop-daemon --stop \ + --exec /usr/libexec/ufdbguard/ufdbguardd \ + --pidfile /var/run/ufdbguard/ufdbguardd.pid + eend $? "Failed to stop ufdbGuard" +} + +reload() { + if ! [ -f /var/run/ufdbguard/ufdbguardd.pid ]; then + eerror "Unable to find PID file for ufdbguardd, was it just started?" + return 1 + fi + + gentables + + ebegin "Reloading ufdbGuard" + kill -HUP $(</var/run/ufdbguard/ufdbguardd.pid) + eend $? "Failed to reload ufdbGuard" +} + +reconfig() { + reload +} diff --git a/net-proxy/ufdbguard/files/ufdbUpdate.cron b/net-proxy/ufdbguard/files/ufdbUpdate.cron new file mode 100644 index 000000000000..9442823d73ad --- /dev/null +++ b/net-proxy/ufdbguard/files/ufdbUpdate.cron @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/files/ufdbUpdate.cron,v 1.1 2010/12/07 09:11:50 flameeyes Exp $ + +# cron.daily file to update the ufdb database + +# Avoid doing anything if no download user is set in the configuration +# file +( . /etc/conf.d/ufdb ; [ -z "${DOWNLOAD_USER}" ]; ) && return 0 + +/usr/sbin/ufdbUpdate + +/etc/init.d/squid rotate diff --git a/net-proxy/ufdbguard/files/ufdbguard-1.23-gentoo.patch b/net-proxy/ufdbguard/files/ufdbguard-1.23-gentoo.patch new file mode 100644 index 000000000000..a63a2876975f --- /dev/null +++ b/net-proxy/ufdbguard/files/ufdbguard-1.23-gentoo.patch @@ -0,0 +1,70 @@ +Index: ufdbGuard-1.23/src/ufdbUpdate.in +=================================================================== +--- ufdbGuard-1.23.orig/src/ufdbUpdate.in ++++ ufdbGuard-1.23/src/ufdbUpdate.in +@@ -27,6 +27,8 @@ WGET_COMMAND="@WGET@" + NOTIFY_UFDBGUARDD="yes" # send HUP signal to ufdbguardd + SYSLOG_FACILITY="local6" # errors/warnings in system log have this facility name + ++source /etc/conf.d/ufdb ++ + # end of user settings. + # DO NOT EDIT ANYTHING BELOW THIS LINE. ######################################## + +@@ -268,45 +270,18 @@ else # no ufdbguardd processes... + then + echo "No ufdbguardd processes found. Starting the daemon..." + fi +- for dir in /usr/pkg/etc/rc.d \ +- /usr/local/etc/rc.d \ +- /etc/rc.d/init.d \ +- /etc/init.d \ +- /sbin/init.d \ +- $BINDIR +- do +- if [ -f $dir/ufdb.sh -o -f $dir/ufdb ] +- then +- # The most common reason why ufdbguardd does not start is because +- # the UNIX socket /tmp/ufdbguardd-03977 exists, so remove it! +- rm -f /tmp/ufdbguardd-03977 +- +- if [ -x $dir/ufdb.sh ] +- then +- $dir/ufdb.sh start +- else +- $dir/ufdb start +- fi +- exitcode=$? +- if [ $exitcode -ne 0 ] +- then +- logger -p $SYSLOG_FACILITY.error -t ufdbUpdate \ +- "The ufdbguardd daemon did not start (exit code is $exitval)." +- if [ $verbose = yes ] +- then +- echo "The ufdbguardd daemon did not start (exit code is $exitval)." +- fi +- fi +- exit 0 +- fi +- done +- +- logger -p $SYSLOG_FACILITY.error -t ufdbUpdate \ +- "The ufdbguardd daemon could not be started (could not find the ufdb[.sh] start script)." +- if [ $verbose = yes ] +- then +- echo "The ufdbguardd daemon could not be started (could not find the ufdb[.sh] start script)." ++ /etc/init.d/ufdb start ++ exitcode=$? ++ if [ $exitcode -ne 0 ] ++ then ++ logger -p $SYSLOG_FACILITY.error -t ufdbUpdate \ ++ "The ufdbguardd daemon did not start (exit code is $exitval)." ++ if [ $verbose = yes ] ++ then ++ echo "The ufdbguardd daemon did not start (exit code is $exitval)." ++ fi + fi ++ exit 0 + fi + + # Check the latest version. diff --git a/net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch b/net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch new file mode 100644 index 000000000000..3f95f2cbb3fa --- /dev/null +++ b/net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch @@ -0,0 +1,133 @@ +--- a/src/Makefile.in 2010-04-12 04:39:43.000000000 +0200 +--- b/src/Makefile.in 2010-05-07 05:26:03.000000000 +0200 +@@ -135,8 +135,8 @@ + # Dependencies for installing + # + +-daemon: +- cd mtserver; make ++daemon: $(UFDBOBJS) ++ cd mtserver; $(MAKE) + + ufdbhttpd: ufdbhttpd.o httpserver.o ufdbbase.o ufdblib.o sgLog.o crypt.o + $(LINK) ufdbhttpd.o httpserver.o ufdbbase.o ufdblib.o sgLog.o crypt.o $(LIBS) +@@ -235,7 +235,7 @@ + $(RM) $(bindir)/ufdbhttpd + + install.mt:: +- cd mtserver ; make ++ cd mtserver ; $(MAKE) + $(INSTALL_PROGRAM) mtserver/ufdbguardd $(bindir)/ufdbguardd + $(INSTALL_PROGRAM) mtserver/ufdbgclient $(bindir)/ufdbgclient + +@@ -272,8 +272,8 @@ + $(RM) *~ *.bak core core.* *.log *.log.[0-9] *.error + $(RM) *.o y.tab.c y.tab.h ufdbGuard ufdbGenTable ufdbAnalyse ufdbPrintTable ufdbhttpd + $(RM) ipv6 iptst rwtest lex.yy.c +- -@cd mtserver && make clean +- -@cd api 2>/dev/null && make clean ++ -@cd mtserver && $(MAKE) clean ++ -@cd api 2>/dev/null && $(MAKE) clean + + realclean:: clean + @echo making $@ in `basename \`pwd\`` +@@ -286,11 +286,11 @@ + distclean:: realclean + @echo making $@ in `basename \`pwd\`` + $(RM) Makefile sg.h config.h ufdbUpdate ufdbConvertDB ufdbGuard.conf +- -cd mtserver ; make distclean ++ -cd mtserver ; $(MAKE) distclean + + apidistclean: distclean + @echo making $@ in `basename \`pwd\`` +- -cd api ; make distclean ++ -cd api ; $(MAKE) distclean + + grab: ufdbGrab + ./ufdbGrab $(cfgdir) $(logdir) +@@ -532,25 +532,25 @@ + $(CC) --version + + g2953: +- make clean +- CC=/usr/local/gcc/2.95.3/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable ++ $(MAKE) clean ++ CC=/usr/local/gcc/2.95.3/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable + + g344: +- make clean +- CC=/usr/local/gcc/3.4.4/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable ++ $(MAKE) clean ++ CC=/usr/local/gcc/3.4.4/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable + + g401: +- make clean +- CC=/usr/local/gcc/4.0.1/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable ++ $(MAKE) clean ++ CC=/usr/local/gcc/4.0.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable + + g411: +- make clean +- CC=/usr/local/gcc/4.1.1/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable ++ $(MAKE) clean ++ CC=/usr/local/gcc/4.1.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable + + qinst: + /etc/init.d/squid stop + /etc/init.d/ufdb stop +- make install ++ $(MAKE) install + /etc/init.d/ufdb start + /etc/init.d/squid start + +--- a/src/mtserver/Makefile.in 2010-04-12 02:56:20.000000000 +0200 +--- b/src/mtserver/Makefile.in 2010-05-07 05:26:03.000000000 +0200 +@@ -48,10 +48,10 @@ + $(LINK) ufdbgclient.o -L. -lufdbd $(SOLARIS_LIBS) + + ../lex.yy.o: +- cd .. ; make lex.yy.o ++ cd .. ; $(MAKE) lex.yy.o + + ../y.tab.o: +- cd .. ; make y.tab.o ++ cd .. ; $(MAKE) y.tab.o + + $(MYLIB): ../crypt.o ../lex.yy.o ../sgDiv.o ../sgLog.o ../ufdbLookup.o \ + ../ufdblib.o ../y.tab.o ../ufdbbase.o +@@ -60,7 +60,7 @@ + ../ufdblib.o ../y.tab.o ../ufdbbase.o + + ptmalloc3/libptmalloc3.a: +- cd ptmalloc3 ; make linux-pthread ++ cd ptmalloc3 ; $(MAKE) linux-pthread + + $(MYLIBSSL): ../ufdbchkport.o ../httpsQueue.o ../ufdbHashtable.o + -@rm -f $(MYLIBSSL) +@@ -102,7 +102,7 @@ + ./ufdbgclient -p $(PORT) -l . -d "www.sex.com" 10.1.1.1 kees + + ../../test/blacklist/domains.ufdb: ../../test/blacklist/domains +- cd ../../test ; make blacklist/domains.ufdb ++ cd ../../test ; $(MAKE) blacklist/domains.ufdb + + LEAKOPTS= --leak-check=full --show-reachable=yes + LEAKOPTS= +@@ -382,7 +382,7 @@ + time ./ufdbgclient -p $(PORT) -l . < ../100000 > /dev/null 2>&1 + + tt: +- make tp3 ++ $(MAKE) tp3 + sleep 3 + kill -HUP `ps -ef | grep ufdbguardd | grep -v grep | head -1 | awk '{ print $$2 }'` + +@@ -455,6 +455,6 @@ + + + g411: +- make clean +- CC=/usr/local/gcc/4.1.1/bin/gcc make -e $(MAKEFLAGS) all ++ $(MAKE) clean ++ CC=/usr/local/gcc/4.1.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) all + diff --git a/net-proxy/ufdbguard/files/ufdbhttpd.confd b/net-proxy/ufdbguard/files/ufdbhttpd.confd deleted file mode 100644 index fad3f01cbed8..000000000000 --- a/net-proxy/ufdbguard/files/ufdbhttpd.confd +++ /dev/null @@ -1,11 +0,0 @@ -UFDB_HUSER="squid" -UFDB_HPORT="80" - -# option : ufdbhttpd --help # -UFDB_HOPTS="" - -# Better not change that # -UFDB_HIMG="/usr/share/ufdbguard/images" -UFDB_HBIN="/usr/bin/ufdbhttpd" -UFDB_HPIDFILE="/var/run/ufdbhttpd.pid" -UFDB_HLOGDIR=$( grep logdir ${UFDB_CONF} 2>/dev/null | awk '{print $2}' ) diff --git a/net-proxy/ufdbguard/files/ufdbhttpd.initd b/net-proxy/ufdbguard/files/ufdbhttpd.initd deleted file mode 100644 index 3f7dbcb28a98..000000000000 --- a/net-proxy/ufdbguard/files/ufdbhttpd.initd +++ /dev/null @@ -1,23 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/files/ufdbhttpd.initd,v 1.1 2009/03/18 17:08:50 bass Exp $ - -depend() { - need net - use logger -} - -start() { - ebegin "Starting ufdbHttpd" - start-stop-daemon --start --chuid ${UFDB_HUSER} \ - --exec ${UFDB_HBINARY} --pidfile ${UFDB_HPIDFILE} -- -p ${UFDB_HPORT} \ - -I ${UFDB_HIMG} -l ${UFDB_HLOGDIR} ${UFDB_HOPTS} - eend $? "Failed to start ufdbHttpd" -} - -stop() { - ebegin "Stopping ufdbHttpd" - start-stop-daemon --stop --exec ${UFDB_HBINARY} --pidfile ${UFDB_HPIDFILE} - eend $? "Failed to stop ufdbHttpd" -} diff --git a/net-proxy/ufdbguard/metadata.xml b/net-proxy/ufdbguard/metadata.xml index 2c5bd1d92d46..9a3457e1a868 100644 --- a/net-proxy/ufdbguard/metadata.xml +++ b/net-proxy/ufdbguard/metadata.xml @@ -1,12 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <herd>no-herd</herd> - <maintainer> - <email>bass@gentoo.org</email> -<!-- <description>Description of the maintainership</description> --> - </maintainer> - <longdescription> - The fastest URL filter with 25,000 URL verifications/sec to filter unwanted web content. ufdbGuard is a redirector for the Squid internet proxy. - </longdescription> + <herd>no-herd</herd> + <maintainer> + <email>bass@gentoo.org</email> + </maintainer> + <maintainer restrict="=net-proxy/ufdbguard-1.23*"> + <email>flameeyes@gentoo.org</email> + <description>Co-maintainer for version 1.23</description> + </maintainer> + <longdescription> + The fastest URL filter with 25,000 URL verifications/sec to filter + unwanted web content. ufdbGuard is a redirector for the Squid + internet proxy. + </longdescription> + <use> + <flag name="httpd"> + Build, install and start the provided mini-http daemon with the + redirect CGI integrated. Since there is no way to tell ufdbguard + to not start it, this is a build-time option. + </flag> + <flag name="doc"> + Download and install the ufdbguard reference manual in PDF. + </flag> + </use> </pkgmetadata> diff --git a/net-proxy/ufdbguard/ufdbguard-1.23.ebuild b/net-proxy/ufdbguard/ufdbguard-1.23.ebuild new file mode 100644 index 000000000000..4c72e864b58b --- /dev/null +++ b/net-proxy/ufdbguard/ufdbguard-1.23.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/ufdbguard-1.23.ebuild,v 1.1 2010/12/07 09:11:50 flameeyes Exp $ + +EAPI="2" + +inherit eutils + +MY_P="ufdbGuard-${PV}" + +DESCRIPTION="ufdbGuard is a redirector for the Squid internet proxy." +HOMEPAGE="http://www.urlfilterdb.com/en/products/ufdbguard.html" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz + doc? ( mirror://sourceforge/${PN}/ReferenceManual_v${PV/\./_}.pdf -> ${P}-manual.pdf )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+httpd doc" + +RDEPEND="dev-libs/openssl + app-arch/bzip2 + net-misc/wget" + +DEPEND="${RDEPEND} + sys-devel/bison + sys-devel/flex" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + # create the squid user exactly as done by net-proxy/squid-3.1.9 + enewgroup squid 31 + enewuser squid 31 -1 /var/cache/squid squid +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-parallel-make.patch + epatch "${FILESDIR}"/${P}-gentoo.patch + + egrep -r -e '/var/tmp/ufdb(guard|http)d.pid' "${S}" -lZ | xargs -0 \ + sed -i -e 's:/var/tmp/ufdb\(guard\|http\)d.pid:/var/run/ufdbguard/ufdb\1d.pid:' \ + || die + + # directory where ufdbhttpd is to be found + sed -i -e 's:DEFAULT_BINDIR.*:DEFAULT_BINDIR "/usr/libexec/ufdbguard":' \ + src/ufdb.h.in || die +} + +src_configure() { + econf \ + --with-ufdb-user=squid \ + --with-ufdb-config=/etc \ + --with-ufdb-logdir=/var/log/ufdbguard \ + --with-ufdb-dbhome=/usr/share/ufdbguard/blacklists \ + --with-ufdb-images_dir=/usr/share/ufdbguard/images +} + +src_install() { + dodoc CHANGELOG INSTALL README src/sampleufdbGuard.conf || die + doman doc/*.1 || die + + dobin src/ufdbAnalyse src/ufdbGenTable src/ufdbGrab \ + src/ufdbConvertDB || die + dosbin src/ufdbUpdate || die + + exeinto /usr/libexec/ufdbguard + doexe src/mtserver/ufdbguardd src/mtserver/ufdbgclient || die + + if use httpd; then + exeinto /usr/libexec/ufdbguard + doexe src/ufdbhttpd || die + fi + + keepdir /usr/share/ufdbguard/blacklists + + insinto /etc + doins src/ufdbGuard.conf || die + + insinto /usr/share/ufdbguard/images + doins src/images/* || die + + newconfd "${FILESDIR}"/ufdb.confd ufdb || die + newinitd "${FILESDIR}"/ufdb.initd ufdb || die + + exeinto /etc/cron.daily + newexe "${FILESDIR}"/ufdbUpdate.cron ufdbUpdate || die + + if use doc; then + insinto /usr/share/doc/${PF} + newins "${DISTDIR}"/${P}-manual.pdf ReferenceManual.pdf || die + fi +} + +pkg_postinst() { + elog "The default location for the blacklist database has been" + elog "moved to /usr/share/ufdbguard/blacklists." + elog "" + elog "The configuration file is no longer configurable in the" + elog "service file, and now resides at /etc/ufdbGuard.conf ." + elog "" + elog "The service script has been renamed from ufdbguad to simply" + elog "/etc/init.d/ufdb, to follow the official documentation, and" + elog "it gained a reload option with a reconfig alias." + elog "" + elog "You can configure the username and password parameters for" + elog "ufdbUpdate, to fetch the blacklist database provided by" + elog "URLfilterDB, directly in /etc/conf.d/ufdb without touching" + elog "the script itself." + elog "" + elog "To enable ufdbguard in squid, you should add this to your" + elog "squid.conf:" + elog "" + elog " url_rewrite_program /usr/libexec/ufdbguard/ufdbgclient -l /var/log/ufdbguard" + elog " url_rewrite_children 64" + elog "" + if ! use httpd; then + elog "You chose to not install the lightweight http daemon that" + elog "comes with ufdbguard." + else + elog "The ufdb service will start both the ufdbguardd daemon and" + elog "the ufdbhttpd http daemon to provide a local redirect CGI." + elog "If you don't want this to happen, disable the httpd USE flag." + fi + if use doc; then + elog "" + elog "The reference manual has been installed as" + elog " /usr/share/doc/${PF}/ReferenceManual.pdf" + fi +} |