diff options
author | sborrill <sborrill@pkgsrc.org> | 2022-02-18 11:57:30 +0000 |
---|---|---|
committer | sborrill <sborrill@pkgsrc.org> | 2022-02-18 11:57:30 +0000 |
commit | 14bf136503aece226389c08337f053ffde671d25 (patch) | |
tree | a4c472f845b1f6d4249d02c1635eddedde151f32 /www | |
parent | 229a1107623567a55243ed18ba44849bf4759a40 (diff) | |
download | pkgsrc-14bf136503aece226389c08337f053ffde671d25.tar.gz |
ufdbguard: import ufdbGuard 1.35.3
ufdbGuard is a URL filter to block unwanted web content on the internet.
ufdbGuard can also enforce Google SafeSearch, detect UltraSurf, Tor, Skype
and other chat applications, proxy tunnels and enforce safer HTTPS traffic.
ufdbGuard is a redirector for the Squid web proxy with 50,000 URL
verifications/second. ufdbGuard integrates with user authorities like LDAP,
Kerberos and Active Directory to assign different policies to different
groups of users.
Diffstat (limited to 'www')
-rw-r--r-- | www/ufdbguard/DESCR | 7 | ||||
-rw-r--r-- | www/ufdbguard/MESSAGE | 12 | ||||
-rw-r--r-- | www/ufdbguard/Makefile | 58 | ||||
-rw-r--r-- | www/ufdbguard/PLIST | 48 | ||||
-rw-r--r-- | www/ufdbguard/distinfo | 7 | ||||
-rwxr-xr-x | www/ufdbguard/files/ufdbguardd.sh | 18 | ||||
-rw-r--r-- | www/ufdbguard/patches/patch-Makefile.in | 47 | ||||
-rw-r--r-- | www/ufdbguard/patches/patch-configure | 24 |
8 files changed, 221 insertions, 0 deletions
diff --git a/www/ufdbguard/DESCR b/www/ufdbguard/DESCR new file mode 100644 index 00000000000..12f718cb593 --- /dev/null +++ b/www/ufdbguard/DESCR @@ -0,0 +1,7 @@ +ufdbGuard is a URL filter to block unwanted web content on the internet. +ufdbGuard can also enforce Google SafeSearch, detect UltraSurf, Tor, Skype +and other chat applications, proxy tunnels and enforce safer HTTPS traffic. +ufdbGuard is a redirector for the Squid web proxy with 50,000 URL +verifications/second. ufdbGuard integrates with user authorities like LDAP, +Kerberos and Active Directory to assign different policies to different +groups of users. diff --git a/www/ufdbguard/MESSAGE b/www/ufdbguard/MESSAGE new file mode 100644 index 00000000000..b290fa19af6 --- /dev/null +++ b/www/ufdbguard/MESSAGE @@ -0,0 +1,12 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2022/02/18 11:57:30 sborrill Exp $ + +ufdbGuard does not include any blocklists and its default configuration +assumes you will subscribe to their commercial lists. However, it can be +used with blocklists from any source (they will need to be compiled into +its own internal format using the ufdbConvertDB command). + +Full documentation (including how to configure squid) can be found at: +https://urlfilterdb.com/files/downloads/ReferenceManual.pdf + +=========================================================================== diff --git a/www/ufdbguard/Makefile b/www/ufdbguard/Makefile new file mode 100644 index 00000000000..f7f12462135 --- /dev/null +++ b/www/ufdbguard/Makefile @@ -0,0 +1,58 @@ +# $NetBSD: Makefile,v 1.1 2022/02/18 11:57:30 sborrill Exp $ + +DISTNAME= ufdbGuard-${VERSION} +VERSION= 1.35.3 +PKGNAME= ufdbguard-${VERSION} +CATEGORIES= www +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ufdbguard/} + +MAINTAINER= sborrill@NetBSD.org +HOMEPAGE= http://ufdbguard.sourceforge.net/ +COMMENT= URL filter for use with squid +LICENSE= gnu-gpl-v2 + +BUILD_DEFS+= VARBASE + +USE_LANGUAGES= c c++ +GNU_CONFIGURE= yes +USE_TOOLS+= perl:run + +RCD_SCRIPTS+= ufdbguardd + +.include "../../mk/bsd.prefs.mk" +UFDB_USER?= ufdb +UFDB_GROUP?= ufdb +PKG_USERS= ${UFDB_USER}:${UFDB_GROUP} +PKG_GROUPS= ${UFDB_GROUP} +PKG_GROUPS_VARS+= UFDB_GROUP +PKG_USERS_VARS+= UFDB_USER + +CONFIGURE_ARGS+= --with-ufdb-user=${UFDB_USER} +CONFIGURE_ARGS+= --with-ufdb-mandir=${PREFIX}/${PKGMANDIR} +CONFIGURE_ARGS+= --datadir=${DBDIR} +CONFIGURE_ARGS+= --with-ufdb-samplesdir=${PREFIX}/${EGDIR} +CONFIGURE_ARGS+= --with-ufdb-imagesdir=${PREFIX}/share/ufdbguard +CONFIGURE_ARGS+= --with-ufdb-dbhome=${DBDIR} +CONFIGURE_ARGS+= --with-ufdb-logdir=${VARBASE}/log/ufdbguard + +CFLAGS.NetBSD+= -D_NETBSD_SOURCE # needed for struct timezone + +DBDIR= ${PKG_SYSCONFDIR}/ufdbguard +EGDIR= share/examples/ufdbguard +OWN_DIRS+= ${PKG_SYSCONFDIR}/ufdbguard/security +OWN_DIRS_PERMS+= ${VARBASE}/log/ufdbguard ${UFDB_USER} ${UFDB_GROUP} 0755 +OWN_DIRS_PERMS+= ${DBDIR} ${UFDB_USER} ${UFDB_GROUP} 0755 + +CONF_FILES+= ${PREFIX}/${EGDIR}/ufdbGuard.conf \ + ${PKG_SYSCONFDIR}/ufdbGuard.conf +CONF_FILES+= ${PREFIX}/${EGDIR}/cacerts \ + ${PKG_SYSCONFDIR}/ufdbguard/security/cacerts + +post-install: + ${INSTALL_DATA} ${WRKSRC}/src/ufdbGuard.conf \ + ${DESTDIR}${PREFIX}/${EGDIR}/ufdbGuard.conf; \ + ${INSTALL_DATA} ${WRKSRC}/src/security/cacerts \ + ${DESTDIR}${PREFIX}/${EGDIR}/cacerts + +.include "../../security/openssl/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/www/ufdbguard/PLIST b/www/ufdbguard/PLIST new file mode 100644 index 00000000000..859c8cf6a33 --- /dev/null +++ b/www/ufdbguard/PLIST @@ -0,0 +1,48 @@ +@comment $NetBSD: PLIST,v 1.1 2022/02/18 11:57:30 sborrill Exp $ +bin/ufdb-pstack +bin/ufdbAnalyse +bin/ufdbConvertDB +bin/ufdbDLstatus +bin/ufdbGenTable +bin/ufdbUpdate +bin/ufdb_analyse_urls +bin/ufdb_analyse_users +bin/ufdb_top_urls +bin/ufdb_top_users +bin/ufdbgclient +bin/ufdbguardd +bin/ufdbhttpd +bin/ufdbsignal +man/man1/ufdbAnalyse.1 +man/man1/ufdb_analyse_urls.1 +man/man1/ufdb_analyse_users.1 +man/man1/ufdb_top_urls.1 +man/man1/ufdb_top_users.1 +man/man8/ufdbgclient.8 +man/man8/ufdbguardd.8 +man/man8/ufdbhttpd.8 +man/man8/ufdbupdate.8 +share/examples/ufdbguard/URLblocked.cgi +share/examples/ufdbguard/cacerts +share/examples/ufdbguard/execdomainlist.sh +share/examples/ufdbguard/execuserlist.sh +share/examples/ufdbguard/ufdbGuard.conf +share/ufdbguard/default.flv +share/ufdbguard/default.mp3 +share/ufdbguard/default.mpeg +share/ufdbguard/default.wmv +share/ufdbguard/forbidden-normal-de.png +share/ufdbguard/forbidden-normal-en.png +share/ufdbguard/forbidden-normal-es.png +share/ufdbguard/forbidden-normal-fr.png +share/ufdbguard/forbidden-normal-it.png +share/ufdbguard/forbidden-normal-nl.png +share/ufdbguard/forbidden-normal-pl.png +share/ufdbguard/forbidden-normal-pt.png +share/ufdbguard/forbidden-normal-sv.png +share/ufdbguard/forbidden-normal-tr.png +share/ufdbguard/no-ads.png +share/ufdbguard/smallcross.png +share/ufdbguard/square.png +share/ufdbguard/transparent.png +@pkgdir etc diff --git a/www/ufdbguard/distinfo b/www/ufdbguard/distinfo new file mode 100644 index 00000000000..3d68384d36b --- /dev/null +++ b/www/ufdbguard/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2022/02/18 11:57:30 sborrill Exp $ + +BLAKE2s (ufdbGuard-1.35.3.tar.gz) = 1340316253aa57a15f217283cc77503bc2e95dddb9a09cd3e6ad6e61c9a3b539 +SHA512 (ufdbGuard-1.35.3.tar.gz) = 0f9d6fb5d6d52fe6f9ae3b55d535f718c590bdaaa734217627ba852edf6607d9c48ad8bfe44f2d1585724f2e09eb62cc5c862941fcc10af721a6e9e365ff6be2 +Size (ufdbGuard-1.35.3.tar.gz) = 1738159 bytes +SHA1 (patch-Makefile.in) = ab4ece9804cee2b53494b66380b214dd5f7b8558 +SHA1 (patch-configure) = a29e1b519741e7291c4bec551432136b8bf9afd3 diff --git a/www/ufdbguard/files/ufdbguardd.sh b/www/ufdbguard/files/ufdbguardd.sh new file mode 100755 index 00000000000..12605ad2854 --- /dev/null +++ b/www/ufdbguard/files/ufdbguardd.sh @@ -0,0 +1,18 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: ufdbguardd.sh,v 1.1 2022/02/18 11:57:30 sborrill Exp $ +# + +# PROVIDE: ufdbguardd +# REQUIRE: daemon + +$_rc_subr_loaded . /etc/rc.subr + +name="ufdbguardd" +rcvar=$name +command="@PREFIX@/bin/${name}" +pidfile="@VARBASE@/run/ufdbguard/${name}.pid" +required_files="@PKG_SYSCONFDIR@/ufdbGuard.conf" + +load_rc_config $name +run_rc_command "$1" diff --git a/www/ufdbguard/patches/patch-Makefile.in b/www/ufdbguard/patches/patch-Makefile.in new file mode 100644 index 00000000000..fc2ecfd34b5 --- /dev/null +++ b/www/ufdbguard/patches/patch-Makefile.in @@ -0,0 +1,47 @@ +$NetBSD: patch-Makefile.in,v 1.1 2022/02/18 11:57:30 sborrill Exp $ + +We will install the settings file and rc.d scripts ourselves. +Ensure setuid/setgid files are not writable. +Don't create directories that require specific ownership at packaging time + +--- src/Makefile.in.orig 2020-11-01 13:42:44.000000000 +0000 ++++ src/Makefile.in 2022-02-01 12:16:25.509130107 +0000 +@@ -212,7 +212,7 @@ + ipt: iptst + LANG=en_US.UTF-8 iptst + +-install:: install.bin install.etc install.pid install.security install.checks install.log ++install:: install.bin install.pid install.checks install.log + @echo making $@ in `basename \`pwd\`` + @echo + @echo "==================================================================" +@@ -237,7 +237,6 @@ + $(INSTALL_PROGRAM) ufdb_top_urls.pl $(DESTDIR)$(bindir)/ufdb_top_urls + $(INSTALL_PROGRAM) ufdb_top_users.pl $(DESTDIR)$(bindir)/ufdb_top_users + @if [ -f ufdbpeek ] ; then $(INSTALL_PROGRAM) ufdbpeek $(DESTDIR)$(bindir)/ufdbpeek ; fi +- @if [ -f $(DESTDIR)$(cfgdir)/ufdbGuard.conf ] ; then echo "$(DESTDIR)$(cfgdir)/ufdbGuard.conf already exists." ; else $(INSTALL_DATA) ufdbGuard.conf $(DESTDIR)$(cfgdir)/ufdbGuard.conf ; fi + + install.pid:: + if [ $(piddir) != /var/tmp ] ; then $(INSTALL) -d $(DESTDIR)$(piddir) ; fi +@@ -270,11 +269,8 @@ + createdirs:: + echo "Creating directories ..." + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(INSTALL) -o $(RUNAS) -d $(DESTDIR)$(logdir) + $(INSTALL) -d $(DESTDIR)$(cfgdir) + $(INSTALL) -d $(DESTDIR)`dirname $(syscfgfile)` +- $(INSTALL) -o $(RUNAS) -d $(DESTDIR)$(dbhome) +- $(INSTALL) -o $(RUNAS) -d $(DESTDIR)$(dbhome)/security + $(INSTALL) -d $(DESTDIR)$(images_dir) + + uninstall.bin:: +@@ -299,7 +295,8 @@ + -$(RM) $(DESTDIR)$(bindir)/ufdbsignal ; \ + $(INSTALL_PROGRAM) mtserver/ufdbsignal $(DESTDIR)$(bindir)/ufdbsignal ; \ + chown root $(DESTDIR)$(bindir)/ufdbsignal ; \ +- chmod +s $(DESTDIR)$(bindir)/ufdbsignal ++ chmod +s $(DESTDIR)$(bindir)/ufdbsignal; \ ++ chmod -w $(DESTDIR)$(bindir)/ufdbsignal + + install.images:: + $(INSTALL_DATA) images/forbidden-normal-de.png $(DESTDIR)$(images_dir)/forbidden-normal-de.png diff --git a/www/ufdbguard/patches/patch-configure b/www/ufdbguard/patches/patch-configure new file mode 100644 index 00000000000..2d2e27f931e --- /dev/null +++ b/www/ufdbguard/patches/patch-configure @@ -0,0 +1,24 @@ +$NetBSD: patch-configure,v 1.1 2022/02/18 11:57:30 sborrill Exp $ + +Use correct locations for pkgsrc + +--- configure.orig 2020-11-02 13:42:38.000000000 +0000 ++++ configure 2022-01-28 16:55:48.436979029 +0000 +@@ -7297,7 +7297,7 @@ + ufdb_os_type=gentoo + ufdb_initdir=/etc/init.d + ufdb_sysconfigfile="/etc/conf.d/ufdb" +-elif test -f /usr/pkg/etc # NetBSD ++elif test $MYOS = NetBSD # NetBSD + then + ufdb_os_type=netbsd + ufdb_initdir=/etc/init.d +@@ -7307,6 +7307,8 @@ + ufdb_initdir=/usr/local/etc + ufdb_sysconfigfile="/etc/urlfilterdb/ufdbguard" + fi ++ufdb_sysconfigfile=$ufdb_config/ufdbguard ++ + echo "OS type is $ufdb_os_type and system configuration file is $ufdb_sysconfigfile" + + if test ! -f $ufdb_sysconfigfile |