On 2019/08/26 14:55, Henry Jensen wrote:
> Greetings,
>
> the port www/dansguardian is deprecated for a long time. It's
> designated successor is a fork called e2guardian[0]. Unfortunately
> there was no port for it until now.
>
> This port builds the current version of e2guardian, an Open Source web
> content filter. It filters the actual content of pages based on many
> methods including phrase matching, request header and URL filtering,
> etc.
>
> I applied several patches to this port, some of them based on the old
> dansguardian patches.
>
> The most delicate patch is possibly patch-src_FatController_cpp, where
> I replaced a sigtimedwait() system call (which doesn't exist on
> OpenBSD) with a sigwait() call. I am not really a C programmer, so
> maybe this should be double checked.
>
> However, the port builds and runs as intended on amd64.
>
> Note, that this ports adds a user and group _e2guardian with the id
> 833, so /usr/ports/infrastructure/db/user.list should be updated.
>
> This is my first new port, so there maybe other things I got wrong
>
>
> Regards,
> Henry
>
>
>
> [0] http://e2guardian.org/
Here is your port cleaned up a little. I'll quote a diff and comment
inline so you can see what I changed.
:: diff --git a/Makefile b/Makefile
:: index 3e5d0bf..1b94b51 100644
:: --- a/Makefile
:: +++ b/Makefile
:: @@ -1,26 +1,29 @@
:: # $OpenBSD
::
:: +GH_ACCOUNT = e2guardian
:: +GH_PROJECT = e2guardian
:: +GH_TAGNAME = 5.3.3
::
:: -V = 5.3.3
https://github.com/xxx/xxx/archive/ MASTER_SITES URLs should use GH_* variables.,.
:: COMMENT = content scanning web filter
:: -DISTNAME = e2guardian-${V}
:: -REVISION = 0
new port starts with no REVISION
:: +
:: CATEGORIES = www net
::
:: HOMEPAGE = http://www.e2guardian.org/
::
:: # GPLv2+
:: -PERMIT_PACKAGE_CDROM = Yes
:: +PERMIT_PACKAGE = Yes
ports dev is done on -current which needs this
::
:: -WANTLIB = c m pcre pcreposix ${COMPILER_LIBCXX} z
:: +WANTLIB += ${COMPILER_LIBCXX} c m pcre pcreposix z
directly paste from port-lib-depends-check
::
:: -COMPILER = base-clang ports-gcc
:: +COMPILER = base-clang ports-gcc
::
:: -MASTER_SITES = https://github.com/e2guardian/e2guardian/archive/${V}/
:: +LIB_DEPENDS = devel/pcre
::
:: -LIB_DEPENDS = devel/pcre
:: +CONFIGURE_STYLE = autoreconf
:: +AUTOCONF_VERSION = 2.69
:: +AUTOMAKE_VERSION = 1.15
:: +AUTORECONF = ${WRKSRC}/autogen.sh
ports using autogen.sh/autoreconf should generally use the new
support in ports infrastructure.
what is your intention with the clamav flavour? it's mentioned in
DESCR but not used in Makefile.
::
:: -CONFIGURE_STYLE = gnu
:: CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
:: LDFLAGS="-L${LOCALBASE}/lib"
:: CONFIGURE_ARGS = --with-proxygroup=_e2guardian \
:: @@ -33,27 +36,8 @@ FLAVOR ?=
:: CONFIGURE_ARGS += --with-dgdebug
:: .endif
::
:: -
:: -
:: FAKE_FLAGS += DGCONFDIR=${PREFIX}/share/examples/e2guardian \
:: - rel_group=_e2guardian rel_user=_e2guardian
:: + rel_group=_e2guardian \
:: + rel_user=_e2guardian
:: -
:: -
:: -AUTOCONF_VERSION= 2.69
:: -AUTOMAKE_VERSION= 1.14
:: -BUILD_DEPENDS += ${MODGNU_AUTOCONF_DEPENDS} \
:: - ${MODGNU_AUTOMAKE_DEPENDS} \
:: - devel/libtool
handled by CONFIGURE_STYLE=autoreconf
:: -MAKE_ENV= MKDIR_P='mkdir -p'
i think this is unnecessary?
:: -
:: -
:: -pre-configure:
:: - cd ${WRKSRC} && \
:: - NOCONFIGURE=1 \
:: - AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
:: - AUTOCONF_VERSION=${AUTOCONF_VERSION} \
:: - ./autogen.sh
handled by CONFIGURE_STYLE=autoreconf
:: -
::
:: .include <bsd.port.mk>
:: diff --git a/pkg/DESCR b/pkg/DESCR
:: index 36df6b2..4a44b03 100644
:: --- a/pkg/DESCR
:: +++ b/pkg/DESCR
:: @@ -1,9 +1,6 @@
:: -E2Guardian is an award winning Open Source web content filter which
:: -currently runs on Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, HP-UX, and
:: -Solaris. It filters the actual content of pages based on many methods
:: -including phrase matching, PICS filtering and URL filtering. It does not
:: -purely filter based on a banned list of sites like lesser totally
:: -commercial filters.
:: +E2Guardian is a web proxy that filters the actual content of pages based
:: +on various methods including phrase matching, PICS filtering and URL
:: +filtering.
less marketing-speak, focus on what it does
::
:: E2Guardian is designed to be completely flexible and allows you to
:: tailor the filtering to your exact needs. It can be as draconian or as
:: diff --git a/pkg/PLIST b/pkg/PLIST
:: index f4e497f..0961fcb 100644
:: --- a/pkg/PLIST
:: +++ b/pkg/PLIST
:: @@ -1,10 +1,7 @@
:: @comment $OpenBSD: PLIST,v$
:: -@pkgpath www/e2guardian,clamav
this line is bogus.
:: -@newgroup _e2guardian:833
:: -@newuser _e2guardian:833:833:daemon:E2Guardian:/nonexistent:/sbin/nologin
:: +@newgroup _e2guardian:842
:: +@newuser _e2guardian:842:842:daemon:e2guardian user:/nonexistent:/sbin/nologin
833 is taken, the next free is 842
:: -@mode 0755
:: @rcscript ${RCDIR}/e2guardian
:: -@mode
@mode not needed here
:: @man man/man8/e2guardian.8
:: @bin sbin/e2guardian
:: share/doc/e2guardian/
:: @@ -591,7 +588,6 @@ share/examples/e2guardian/preauth.story
:: @sample ${SYSCONFDIR}/e2guardian/preauth.story
:: share/examples/e2guardian/site.story
:: @sample ${SYSCONFDIR}/e2guardian/site.story
:: -@mode 0755
:: @owner _e2guardian
:: @group _e2guardian
:: @sample /var/log/e2guardian/
Plus see robert's comments about sigtimedwait.
No comments:
Post a Comment