summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2011-10-22 00:15:55 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2011-10-22 00:15:55 +0000
commitab7b2a4035da8d9ba16072094cd8ab70327b8caf (patch)
tree2e3f3c7a26ad425a42812f61afc08f60ccfa6ab9 /net-proxy/ufdbguard
parentRemove old. (diff)
downloadhistorical-ab7b2a4035da8d9ba16072094cd8ab70327b8caf.tar.gz
historical-ab7b2a4035da8d9ba16072094cd8ab70327b8caf.tar.bz2
historical-ab7b2a4035da8d9ba16072094cd8ab70327b8caf.zip
Revision bump to update the init script to be more sophisticated thanks to OpenRC.
Package-Manager: portage-2.2.0_alpha69/cvs/Linux x86_64
Diffstat (limited to 'net-proxy/ufdbguard')
-rw-r--r--net-proxy/ufdbguard/ChangeLog9
-rw-r--r--net-proxy/ufdbguard/Manifest14
-rw-r--r--net-proxy/ufdbguard/files/ufdb.initd.268
-rw-r--r--net-proxy/ufdbguard/ufdbguard-1.26-r1.ebuild137
4 files changed, 220 insertions, 8 deletions
diff --git a/net-proxy/ufdbguard/ChangeLog b/net-proxy/ufdbguard/ChangeLog
index d85f1f738b23..da3162c32264 100644
--- a/net-proxy/ufdbguard/ChangeLog
+++ b/net-proxy/ufdbguard/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-proxy/ufdbguard
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/ChangeLog,v 1.21 2011/09/14 15:21:34 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/ChangeLog,v 1.22 2011/10/22 00:15:54 flameeyes Exp $
+
+*ufdbguard-1.26-r1 (22 Oct 2011)
+
+ 22 Oct 2011; Diego E. Pettenò <flameeyes@gentoo.org>
+ +ufdbguard-1.26-r1.ebuild, +files/ufdb.initd.2:
+ Revision bump to update the init script to be more sophisticated thanks to
+ OpenRC.
14 Sep 2011; Diego E. Pettenò <flameeyes@gentoo.org> ChangeLog:
Forcing Manifest regeneration.
diff --git a/net-proxy/ufdbguard/Manifest b/net-proxy/ufdbguard/Manifest
index abab52e0d41e..31605ed12b60 100644
--- a/net-proxy/ufdbguard/Manifest
+++ b/net-proxy/ufdbguard/Manifest
@@ -1,8 +1,9 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
+Hash: SHA1
AUX ufdb.confd 672 RMD160 42308498bf95a6b4e104c9718789b4dc169030be SHA1 21f8c458d4ffa080e6adef6b75e51e08e76ac178 SHA256 dd12bbbb1c4babb44af9ebdf8e233b09405d820f816c17495e34ddd283e01b6b
AUX ufdb.initd 1905 RMD160 9d8c121184b17d3ad34faf3fefc9af783f6ab82c SHA1 fceb9cbf14e7b365dc1ad593730fbf6d1f8bba08 SHA256 b6c092282cc16681c7936b0a115d7f040d66e570425d53116700f311e1ab0ebe
+AUX ufdb.initd.2 1612 RMD160 f4b4766dbf0170309b9bcb0ba97ab8c84c24112f SHA1 130aa81b82033393116c124a4e20a1b5a73cf730 SHA256 425f77def535e3587de5f2d2cbaf65abc7a0b59df9ee0002eef48b1fcf13b40c
AUX ufdbUpdate.cron 464 RMD160 f2d45ee168d6b7e241ca6ee87687325174472132 SHA1 c11eff202a88f26255f18c15a75a31db5ccedf53 SHA256 31695bab91bfe4584df988399c344f8d7bba2c3bf9680492b9edf27807afee99
AUX ufdbguard-1.23-parallel-make.patch 3910 RMD160 5086735f2500899c28185a2887a44d9fdd585a39 SHA1 6861a77315776627d728ccfe893641999b9cc6f6 SHA256 6a855ed8b9232c3c663ec6fc890b19eb828d675f4cb6a0f9829702ed709cceb7
AUX ufdbguard-1.24-gentoo.patch 536 RMD160 702db979db7ee3d1a1617f9b9ee697b2dffc7b74 SHA1 e2e5dcfc9093a8ec5f4811c4eb6e52844c1665b3 SHA256 3e22a42b73c6aa6ff6737455b19d202d661990c9931ffa3785b6aaa78af73d90
@@ -11,15 +12,14 @@ DIST ufdbGuard-1.26.tar.gz 766725 RMD160 10f881cf40a5294ee074b913042e273ce667414
DIST ufdbguard-1.24-manual.pdf 491034 RMD160 f0eb280602c5bbc191431457bc49714ed1260a44 SHA1 eeb415fe32d84d27bda4250bb2b67196d7fe93d0 SHA256 7185161d912202510ec1767fc0239f48c2a98f948afb3a207ea55c341e03e459
DIST ufdbguard-1.26-manual.pdf 494360 RMD160 901d3cd4d5da6976c7e27a2db181e8948f50e4ce SHA1 375234c4bfd627bc9db48e7816f757ebde137f58 SHA256 b0ef3e648c0a9336018ddc7180b853ef904c108c7318d8c5ebaba7015fd185a4
EBUILD ufdbguard-1.24-r1.ebuild 3871 RMD160 11e3db1c0edd914b32db6dccf11394fa555df866 SHA1 a344a9488ae4edac3f463794196f54b07cb0121b SHA256 0fbcae29c11e77b26b02b228b15bc8473956450bd2df5f8429f0e3ee6f233ce8
+EBUILD ufdbguard-1.26-r1.ebuild 3954 RMD160 84972310a663786ce3fc1667f2276851c902280d SHA1 60df603f7d299f23fbb3553c2144ba0a4145f0b9 SHA256 0f9bfdc58294dfefa83f300b5254930c6fa26d1badf6985d891d880a9acd849e
EBUILD ufdbguard-1.26.ebuild 3949 RMD160 e3e7ae5e6780b6ff33c0993461c1433490b00b05 SHA1 eab8edde62eaa26e210b6c5bca2db0567375f3be SHA256 fc0e5d07a2828585f1d241b43d0fbce1ea6c1040c37db39f4ea0d2682e41cc3e
-MISC ChangeLog 4780 RMD160 033abdb87482a91986e6ac5cb01df9f81a944619 SHA1 c2dc98e36c0bda7b8269a8e0b64816423b5cd357 SHA256 3c1c51adad16e43cb6b8eb50bf5c3e06437f03ff7de9842c03c8e7413195393f
+MISC ChangeLog 5008 RMD160 18393c1965ed8ad84b3570380527ea1abefe5d21 SHA1 b13b04b0355af86be015c1c30392ff7470fbb3ae SHA256 2157ac8a80e38ee4eb08529338220d43974c3be70fd4d6bd11a4ecbab376d213
MISC metadata.xml 930 RMD160 b18e50b20ed136dcfc4730edc263f0d47d9a6a42 SHA1 6f6f5f48a9980e9ff4b04169ece36bcc901676c4 SHA256 dd9844b6440d0b7267ec9cc14b9809d48072874cf660968ff43d51f4414eeaa0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iJwEAQEIAAYFAk59ruEACgkQfXuS5UK5QB1HnQP+Me2Sh2s9kLlWLWuul4qZJZYd
-dPLHpsZuRjxPQLnJKhckyMMzUChEuV4JJAof1x9q0hAS5kDoEmjkmTdxvUxMr7XM
-HR7JG/iWYw3gSOOv7mcvFJ+wom8/PUFupiO0n4CgYKlK2rewITbjJvnWMMtnu/6J
-oMeNhGNP89DBvUkO1ak=
-=q0p6
+iEYEARECAAYFAk6iCzYACgkQAiZjviIA2XjN0gCglcijFfCc6qkFbrnpRCIJGvu+
+VUIAmgNtjhadgfr2EWK8VscA0uleZcuu
+=Ohp8
-----END PGP SIGNATURE-----
diff --git a/net-proxy/ufdbguard/files/ufdb.initd.2 b/net-proxy/ufdbguard/files/ufdb.initd.2
new file mode 100644
index 000000000000..75370da7917d
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdb.initd.2
@@ -0,0 +1,68 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/files/ufdb.initd.2,v 1.1 2011/10/22 00:15:55 flameeyes Exp $
+
+# reconfig is what the upstream documentation suggests, so let's
+# provide it for compatibility.
+extra_started_commands="reload reconfig"
+
+: ${configfile:=/etc/ufdbGuard.conf}
+
+pidfile=/var/run/ufdbguard/ufdbguardd.pid
+command=/usr/libexec/ufdbguard/ufdbguardd
+command_arguments="-c ${configfile} ${FUDB_OPTS}"
+
+start_stop_daemon_args="--user ${UFDB_USER} --wait 1500"
+
+name="ufdbGuard Daemon"
+
+depend() {
+ need net
+ before squid
+ use logger
+}
+
+get_config() {
+ # Okay this sounds silly, but it is important because the settings
+ # in ufdbGuard are quoted, so this unquotes them.
+ eval echo $(awk '$1 == "'$1'" { print $2 }' "${configfile}")
+}
+
+gentables() {
+ local dbhome=$(get_config dbhome)
+
+ for gt in ${UFDB_GT} ; do
+ [ -f "${dbhome}/${gt}/domains" ] || continue
+
+ urls=
+ [ -f "${dbhome}/${gt}/urls" ] && urls="${dbhome}/${gt}/urls"
+
+ ebegin "Generating domainlist ${gt}"
+ ufdbGenTable ${GENTABLE_OPTIONS} -t "${gt}" -d "${dbhome}/${gt}/domains" ${urls:+-u "${urls}"}
+ eend $?
+ done
+}
+
+start_pre() {
+ gentables
+
+ checkpath -d -m 0755 -o ${UFDB_USER} $(get_config logdir) /var/run/ufdbguardd
+}
+
+reload() {
+ if ! [ -f ${pidfile} ]; then
+ eerror "Unable to find PID file for ufdbguardd, was it just started?"
+ return 1
+ fi
+
+ gentables
+
+ ebegin "Reloading ufdbGuard"
+ kill -HUP "$(cat ${pidfile})"
+ eend $? "Failed to reload ufdbGuard"
+}
+
+reconfig() {
+ reload
+}
diff --git a/net-proxy/ufdbguard/ufdbguard-1.26-r1.ebuild b/net-proxy/ufdbguard/ufdbguard-1.26-r1.ebuild
new file mode 100644
index 000000000000..2497f64aa63e
--- /dev/null
+++ b/net-proxy/ufdbguard/ufdbguard-1.26-r1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/ufdbguard/ufdbguard-1.26-r1.ebuild,v 1.1 2011/10/22 00:15:55 flameeyes Exp $
+
+EAPI="4"
+
+inherit eutils flag-o-matic
+
+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"
+
+RDEPEND="${RDEPEND}
+ sys-apps/openrc"
+
+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}"/${PN}-1.23-parallel-make.patch
+ epatch "${FILESDIR}"/${PN}-1.24-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() {
+ # better safe than sorry, the code has a number of possible
+ # breakage, and at least one certain breakage.
+ append-flags -fno-strict-aliasing
+
+ 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
+ doman doc/*.1
+
+ dobin src/ufdbAnalyse src/ufdbGenTable src/ufdbGrab \
+ src/ufdbConvertDB
+ dosbin src/ufdbUpdate
+
+ exeinto /usr/libexec/ufdbguard
+ doexe src/mtserver/ufdbguardd src/mtserver/ufdbgclient
+
+ if use httpd; then
+ exeinto /usr/libexec/ufdbguard
+ doexe src/ufdbhttpd
+ fi
+
+ keepdir /usr/share/ufdbguard/blacklists
+
+ insinto /etc
+ doins src/ufdbGuard.conf
+
+ insinto /usr/share/ufdbguard/images
+ doins src/images/*
+
+ newconfd "${FILESDIR}"/ufdb.confd ufdb
+ newinitd "${FILESDIR}"/ufdb.initd.2 ufdb
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/ufdbUpdate.cron ufdbUpdate
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ newins "${DISTDIR}"/${P}-manual.pdf ReferenceManual.pdf
+ 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
+}