Date: Fri, 30 Nov 2018 02:34:21 +0000 (UTC) From: Larry Rosenman <ler@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r486224 - head/security/clamav Message-ID: <201811300234.wAU2YL0B043705@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ler Date: Fri Nov 30 02:34:20 2018 New Revision: 486224 URL: https://svnweb.freebsd.org/changeset/ports/486224 Log: security/clamav: fix test failures. It adds a few more fixes and improvements. - Solves the bug, by adding a MSPACK option (enabled by default) and a build dependency on pkg-config. - Makes massive use of options helpers and similar tools to improve Makefile's readability. In the rewriting I have not maintained the dependency of option LDAP on option MILTER and the two options are now indipendent: if this is bad, it as to be fixed on my patch. I avoided to do it directly because I am unsure it is needed. - Uses now libpcre2 consistently (before the port could link to libpcre2 by mistake). - Removes useless arguments about zlib in CONFIGURE_ARGS. - Reorders variables consistently with the standard order. - Cleans header. - Updates pkg-plist and sort if alphabetically. - Bump PORTREVISION, needed because of some fixes. PR: 228468 Submitted by: phascolarctos@protonmail.ch Reported by: gondim@bsdinfo.com.br Modified: head/security/clamav/Makefile head/security/clamav/pkg-plist Modified: head/security/clamav/Makefile ============================================================================== --- head/security/clamav/Makefile Fri Nov 30 01:16:43 2018 (r486223) +++ head/security/clamav/Makefile Fri Nov 30 02:34:20 2018 (r486224) @@ -1,8 +1,8 @@ -# Created by: markun@onohara.to # $FreeBSD$ PORTNAME= clamav PORTVERSION= 0.100.2 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://www.clamav.net/downloads/production/ @@ -12,75 +12,34 @@ COMMENT= Command line virus scanner written entirely i LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING +BUILD_DEPENDS= pkg-config:devel/pkgconf LIB_DEPENDS= libltdl.so:devel/libltdl \ libcurl.so:ftp/curl -OPTIONS_DEFINE= ARC ARJ LHA UNZOO UNRAR TESTS MILTER LDAP ICONV STDERR \ - EXPERIMENTAL DOCS IPV6 DMG_XAR JSON PCRE - -ARC_DESC= Enable arch archives support -ARJ_DESC= Enable arj archives support -LHA_DESC= Enable lha archives support -UNZOO_DESC= Enable zoo archives support -TESTS_DESC= Run compile-time tests (req. python) -MILTER_DESC= Compile the milter interface -STDERR_DESC= Print logs to stderr instead of stdout -EXPERIMENTAL_DESC= Build experimental code -DMG_XAR_DESC= Enable DMG and XAR archives support - -OPTIONS_DEFAULT= ARC ARJ UNZOO UNRAR DMG_XAR \ - JSON PCRE - -ARC_RUN_DEPENDS= arc:archivers/arc -ARJ_RUN_DEPENDS= arj:archivers/arj -LHA_RUN_DEPENDS= lha:archivers/lha -UNZOO_RUN_DEPENDS= unzoo:archivers/unzoo -JSON_LIB_DEPENDS= libjson-c.so:devel/json-c -PCRE_LIB_DEPENDS= libpcre.so:devel/pcre -UNRAR_CONFIGURE_ENABLE= unrar -MILTER_CONFIGURE_ENABLE=milter -TESTS_CONFIGURE_ENABLE= check -JSON_CONFIGURE_WITH= libjson -PCRE_CONFIGURE_WITH= pcre -TESTS_BUILD_DEPENDS= ${LOCALBASE}/include/check.h:devel/check -ICONV_CONFIGURE_ON= --with-iconv -ICONV_CONFIGURE_OFF= --without-iconv -ICONV_USES= iconv -EXPERIMENTAL_CONFIGURE_ENABLE= experimental -IPV6_CONFIGURE_ENABLE= ipv6 -DMG_XAR_CONFIGURE_ENABLE= xml -DMG_XAR_USE= GNOME=libxml2 - USES= cpe gmake gnome libtool ncurses pathfix ssl -GNU_CONFIGURE= yes +USE_RC_SUBR= clamav-clamd clamav-freshclam USE_LDCONFIG= yes + +GNU_CONFIGURE= yes INSTALL_TARGET= install-strip -USE_RC_SUBR= clamav-clamd clamav-freshclam -PORTDOCS= * - -DBDIR= /var/db/clamav -LOGDIR= /var/log/clamav -RUNDIR= /var/run/clamav PLIST_SUB+= DBDIR=${DBDIR} \ LOGDIR=${LOGDIR} \ RUNDIR=${RUNDIR} \ CLAMAVUSER=${CLAMAVUSER} \ CLAMAVGROUP=${CLAMAVGROUP} -PY_NO_THREAD= ${WRKDIR}/.python-has-no-threads -OPTIONS_SUB= yes -CONFIGURE_ARGS= --libdir=${PREFIX}/lib \ +CONFIGURE_ARGS= --libdir=${LOCALBASE}/lib \ --with-dbdir=${DBDIR} \ - --with-zlib=/usr \ --disable-clamuko \ --disable-clamav \ --enable-bigstack \ --enable-readdir_r \ --enable-gethostbyname_r \ --disable-dependency-tracking \ - --disable-zlib-vcheck \ --enable-clamdtop + +CFLAGS_i386= -march=i486 CPPFLAGS+= -I${LOCALBASE}/include # This port has a problem with -pthread, @@ -89,13 +48,6 @@ LDFLAGS+= -lthr -L${LOCALBASE}/lib CONFLICTS?= clamav-milter-[0-9]* -CLAMAVUSER?= clamav -CLAMAVGROUP?= clamav - -CLAMAV_CLAMD_SOCKET?= ${RUNDIR}/clamd.sock -CLAMAV_CLAMD_PIDFILE?= ${RUNDIR}/clamd.pid -CLAMAV_MILTER_SOCKET?= ${RUNDIR}/clmilter.sock - SUB_FILES= pkg-deinstall SUB_LIST+= DBDIR=${DBDIR} \ LOGDIR=${LOGDIR} \ @@ -108,6 +60,74 @@ SUB_LIST+= DBDIR=${DBDIR} \ CLAMAV_CLAMD_PIDFILE=${CLAMAV_CLAMD_PIDFILE} \ CLAMAV_MILTER_SOCKET=${CLAMAV_MILTER_SOCKET} +PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \ + CLAMAVGROUP=${CLAMAVGROUP} + +OPTIONS_DEFINE= ARC ARJ LHA UNZOO UNRAR TESTS MILTER MSPACK LDAP ICONV STDERR \ + EXPERIMENTAL DOCS IPV6 DMG_XAR JSON PCRE + +OPTIONS_DEFAULT= ARC ARJ UNZOO UNRAR DMG_XAR \ + JSON PCRE MSPACK +OPTIONS_SUB= yes + +ARC_DESC= Enable arch archives support +ARJ_DESC= Enable arj archives support +LHA_DESC= Enable lha archives support +UNZOO_DESC= Enable zoo archives support +TESTS_DESC= Run compile-time tests (req. python) +MILTER_DESC= Compile the milter interface +MSPACK_DESC= Get mspack support from ports (otherwise use bundled) +STDERR_DESC= Print logs to stderr instead of stdout +EXPERIMENTAL_DESC= Build experimental code +DMG_XAR_DESC= Enable DMG and XAR archives support + +ARC_RUN_DEPENDS= arc:archivers/arc +ARJ_RUN_DEPENDS= arj:archivers/arj +DMG_XAR_CONFIGURE_ENABLE= xml +DMG_XAR_USE= GNOME=libxml2 +EXPERIMENTAL_CONFIGURE_ENABLE= experimental +ICONV_CONFIGURE_WITH= iconv +ICONV_USES= iconv +IPV6_CONFIGURE_ENABLE= ipv6 +JSON_CONFIGURE_WITH= libjson +JSON_LIB_DEPENDS= libjson-c.so:devel/json-c +LDAP_LDFLAGS= -lldap +LDAP_USE= OPENLDAP=yes +LHA_RUN_DEPENDS= lha:archivers/lha +MILTER_CONFIGURE_WITH= sendmail=/usr/sbin/sendmail +MILTER_CONFIGURE_ENABLE=milter +MILTER_USE= RC_SUBR=clamav-milter +MSPACK_CONFIGURE_WITH= system-libmspack=${LOCALBASE}/lib/libmspack.so +MSPACK_LIB_DEPENDS= libmspack.so:archivers/libmspack +PCRE_CONFIGURE_WITH= pcre +PCRE_LIB_DEPENDS= libpcre2-8.so:devel/pcre2 +STDERR_EXTRA_PATCHES= ${FILESDIR}/extra-patch-shared_output.c +TESTS_CONFIGURE_ENABLE= check +TESTS_BUILD_DEPENDS= ${LOCALBASE}/include/check.h:devel/check +TESTS_USES= python:build +UNRAR_CONFIGURE_ENABLE= unrar +UNZOO_RUN_DEPENDS= unzoo:archivers/unzoo + +CLAMAVUSER?= clamav +CLAMAVGROUP?= clamav + +CLAMAV_CLAMD_SOCKET?= ${RUNDIR}/clamd.sock +CLAMAV_CLAMD_PIDFILE?= ${RUNDIR}/clamd.pid +CLAMAV_MILTER_SOCKET?= ${RUNDIR}/clmilter.sock + +.if ${CLAMAVUSER} == "clamav" +USERS= clamav +.endif + +.if ${CLAMAVGROUP} == "clamav" +GROUPS= clamav mail +.endif + +DBDIR= /var/db/clamav +LOGDIR= /var/log/clamav +RUNDIR= /var/run/clamav +PY_NO_THREAD= ${WRKDIR}/.python-has-no-threads + SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \ -e 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 ${LOGDIR}/\3|' \ -e 's|^\#?(PidFile) .*/([a-z\-]+\.pid)$$|\1 ${RUNDIR}/\2|' \ @@ -122,49 +142,6 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \ -e 's|^\#?(MilterSocket) */tmp.*$$|\1 ${CLAMAV_MILTER_SOCKET}|' \ -e 's|^\#?(ClamdSocket).*$$|\1 unix:${CLAMAV_CLAMD_SOCKET}|' -PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \ - CLAMAVGROUP=${CLAMAVGROUP} - -.include <bsd.port.options.mk> - -.if ${CLAMAVUSER} == "clamav" -USERS= clamav -.endif - -.if ${CLAMAVGROUP} == "clamav" -GROUPS= clamav mail -.endif - -. if ${PORT_OPTIONS:MTESTS} -USES+= python:build -. endif - -.if ${PORT_OPTIONS:MMILTER} -USE_RC_SUBR+= clamav-milter -. if ${PORT_OPTIONS:MLDAP} && exists(${LOCALBASE}/lib/libldap.so) -USE_OPENLDAP= yes -LDFLAGS+= -lldap -. endif - -. if !exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a) -BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:mail/libmilter -CONFIGURE_ARGS+=--with-sendmail=${LOCALBASE}/sbin/sendmail -LDFLAGS+= -L${LOCALBASE}/lib -. else -CONFIGURE_ARGS+=--with-sendmail=/usr/sbin/sendmail -. endif -.endif - -.if ${PORT_OPTIONS:MSTDERR} -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c -.endif - -.include <bsd.port.pre.mk> - -.if ${ARCH} == "i386" -CFLAGS+= -march=i486 -.endif - post-patch: @${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|-lthr|g' \ -e 's|LC_REVISION=22|LC_REVISION=24|' \ @@ -176,8 +153,7 @@ post-patch: @${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \ ${WRKSRC}/libclamunrar/unrar.c -.if ${PORT_OPTIONS:MTESTS} -pre-configure: +pre-configure-TESTS-on: @if ! ${PYTHON_CMD} -c "import thread" >/dev/null 2>&1; then \ ${ECHO_MSG} ""; \ ${ECHO_MSG} "==========================================================================="; \ @@ -187,14 +163,11 @@ pre-configure: ${ECHO_MSG} ""; \ ${TOUCH} ${PY_NO_THREAD}; \ fi -.endif -.if ${PORT_OPTIONS:MTESTS} -post-build: +post-build-TESTS-on: @if [ ! -f "${PY_NO_THREAD}" ]; then \ ${MAKE_CMD} -C ${WRKSRC} check; \ fi -.endif post-install: ${INSTALL_DATA} ${WRKSRC}/clamav-config.h ${STAGEDIR}${PREFIX}/include @@ -204,4 +177,4 @@ post-install: ${STAGEDIR}${RUNDIR} ${INSTALL_DATA} ${WRKSRC}/docs/html/* ${STAGEDIR}${DOCSDIR}/html -.include <bsd.port.post.mk> +.include <bsd.port.mk> Modified: head/security/clamav/pkg-plist ============================================================================== --- head/security/clamav/pkg-plist Fri Nov 30 01:16:43 2018 (r486223) +++ head/security/clamav/pkg-plist Fri Nov 30 02:34:20 2018 (r486224) @@ -1,37 +1,123 @@ +%%JSON%%bin/clamsubmit +%%JSON%%man/man1/clamsubmit.1.gz +%%MILTER%%@sample etc/clamav-milter.conf.sample +%%MILTER%%sbin/clamav-milter +%%NO_MSPACK%%lib/libclammspack.a +%%NO_MSPACK%%lib/libclammspack.so +%%NO_MSPACK%%lib/libclammspack.so.0 +%%NO_MSPACK%%lib/libclammspack.so.0.1.0 +%%NO_MSPACK%%libdata/pkgconfig/libclammspack.pc +%%PORTDOCS%%%%DOCSDIR%%/html/clam.png +%%PORTDOCS%%%%DOCSDIR%%/html/clamdoc.css +%%PORTDOCS%%%%DOCSDIR%%/html/clamdoc.html +%%PORTDOCS%%%%DOCSDIR%%/html/contents.png +%%PORTDOCS%%%%DOCSDIR%%/html/crossref.png +%%PORTDOCS%%%%DOCSDIR%%/html/demon.png +%%PORTDOCS%%%%DOCSDIR%%/html/footnode.html +%%PORTDOCS%%%%DOCSDIR%%/html/img1.png +%%PORTDOCS%%%%DOCSDIR%%/html/img2.png +%%PORTDOCS%%%%DOCSDIR%%/html/img3.png +%%PORTDOCS%%%%DOCSDIR%%/html/img4.png +%%PORTDOCS%%%%DOCSDIR%%/html/img5.png +%%PORTDOCS%%%%DOCSDIR%%/html/index.html +%%PORTDOCS%%%%DOCSDIR%%/html/next.png +%%PORTDOCS%%%%DOCSDIR%%/html/next_g.png +%%PORTDOCS%%%%DOCSDIR%%/html/node1.html +%%PORTDOCS%%%%DOCSDIR%%/html/node10.html +%%PORTDOCS%%%%DOCSDIR%%/html/node11.html +%%PORTDOCS%%%%DOCSDIR%%/html/node12.html +%%PORTDOCS%%%%DOCSDIR%%/html/node13.html +%%PORTDOCS%%%%DOCSDIR%%/html/node14.html +%%PORTDOCS%%%%DOCSDIR%%/html/node15.html +%%PORTDOCS%%%%DOCSDIR%%/html/node16.html +%%PORTDOCS%%%%DOCSDIR%%/html/node17.html +%%PORTDOCS%%%%DOCSDIR%%/html/node18.html +%%PORTDOCS%%%%DOCSDIR%%/html/node19.html +%%PORTDOCS%%%%DOCSDIR%%/html/node2.html +%%PORTDOCS%%%%DOCSDIR%%/html/node20.html +%%PORTDOCS%%%%DOCSDIR%%/html/node21.html +%%PORTDOCS%%%%DOCSDIR%%/html/node22.html +%%PORTDOCS%%%%DOCSDIR%%/html/node23.html +%%PORTDOCS%%%%DOCSDIR%%/html/node24.html +%%PORTDOCS%%%%DOCSDIR%%/html/node25.html +%%PORTDOCS%%%%DOCSDIR%%/html/node26.html +%%PORTDOCS%%%%DOCSDIR%%/html/node27.html +%%PORTDOCS%%%%DOCSDIR%%/html/node28.html +%%PORTDOCS%%%%DOCSDIR%%/html/node29.html +%%PORTDOCS%%%%DOCSDIR%%/html/node3.html +%%PORTDOCS%%%%DOCSDIR%%/html/node30.html +%%PORTDOCS%%%%DOCSDIR%%/html/node31.html +%%PORTDOCS%%%%DOCSDIR%%/html/node32.html +%%PORTDOCS%%%%DOCSDIR%%/html/node33.html +%%PORTDOCS%%%%DOCSDIR%%/html/node34.html +%%PORTDOCS%%%%DOCSDIR%%/html/node35.html +%%PORTDOCS%%%%DOCSDIR%%/html/node36.html +%%PORTDOCS%%%%DOCSDIR%%/html/node37.html +%%PORTDOCS%%%%DOCSDIR%%/html/node38.html +%%PORTDOCS%%%%DOCSDIR%%/html/node39.html +%%PORTDOCS%%%%DOCSDIR%%/html/node4.html +%%PORTDOCS%%%%DOCSDIR%%/html/node40.html +%%PORTDOCS%%%%DOCSDIR%%/html/node41.html +%%PORTDOCS%%%%DOCSDIR%%/html/node42.html +%%PORTDOCS%%%%DOCSDIR%%/html/node43.html +%%PORTDOCS%%%%DOCSDIR%%/html/node44.html +%%PORTDOCS%%%%DOCSDIR%%/html/node45.html +%%PORTDOCS%%%%DOCSDIR%%/html/node46.html +%%PORTDOCS%%%%DOCSDIR%%/html/node47.html +%%PORTDOCS%%%%DOCSDIR%%/html/node48.html +%%PORTDOCS%%%%DOCSDIR%%/html/node49.html +%%PORTDOCS%%%%DOCSDIR%%/html/node5.html +%%PORTDOCS%%%%DOCSDIR%%/html/node50.html +%%PORTDOCS%%%%DOCSDIR%%/html/node51.html +%%PORTDOCS%%%%DOCSDIR%%/html/node52.html +%%PORTDOCS%%%%DOCSDIR%%/html/node53.html +%%PORTDOCS%%%%DOCSDIR%%/html/node54.html +%%PORTDOCS%%%%DOCSDIR%%/html/node55.html +%%PORTDOCS%%%%DOCSDIR%%/html/node56.html +%%PORTDOCS%%%%DOCSDIR%%/html/node57.html +%%PORTDOCS%%%%DOCSDIR%%/html/node58.html +%%PORTDOCS%%%%DOCSDIR%%/html/node59.html +%%PORTDOCS%%%%DOCSDIR%%/html/node6.html +%%PORTDOCS%%%%DOCSDIR%%/html/node60.html +%%PORTDOCS%%%%DOCSDIR%%/html/node61.html +%%PORTDOCS%%%%DOCSDIR%%/html/node62.html +%%PORTDOCS%%%%DOCSDIR%%/html/node7.html +%%PORTDOCS%%%%DOCSDIR%%/html/node8.html +%%PORTDOCS%%%%DOCSDIR%%/html/node9.html +%%PORTDOCS%%%%DOCSDIR%%/html/prev.png +%%PORTDOCS%%%%DOCSDIR%%/html/prev_g.png +%%PORTDOCS%%%%DOCSDIR%%/html/up.png +%%PORTDOCS%%%%DOCSDIR%%/html/up_g.png +%%UNRAR%%lib/libclamunrar.so +%%UNRAR%%lib/libclamunrar.so.7 +%%UNRAR%%lib/libclamunrar.so.7.1.1 +%%UNRAR%%lib/libclamunrar_iface.so +%%UNRAR%%lib/libclamunrar_iface.so.7 +%%UNRAR%%lib/libclamunrar_iface.so.7.1.1 +@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%DBDIR%% +@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%LOGDIR%% +@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%RUNDIR%% +@sample etc/clamd.conf.sample +@sample etc/freshclam.conf.sample bin/clamav-config bin/clambc bin/clamconf bin/clamdscan bin/clamdtop bin/clamscan -%%JSON%%bin/clamsubmit bin/freshclam bin/sigtool -%%MILTER%%sbin/clamav-milter -sbin/clamd -include/clamav.h include/clamav-config.h +include/clamav.h lib/libclamav.so lib/libclamav.so.7 lib/libclamav.so.7.1.1 -lib/libclammspack.a -lib/libclammspack.so -lib/libclammspack.so.0 -lib/libclammspack.so.0.1.0 -%%UNRAR%%lib/libclamunrar.so -%%UNRAR%%lib/libclamunrar.so.7 -%%UNRAR%%lib/libclamunrar.so.7.1.1 -%%UNRAR%%lib/libclamunrar_iface.so -%%UNRAR%%lib/libclamunrar_iface.so.7 -%%UNRAR%%lib/libclamunrar_iface.so.7.1.1 libdata/pkgconfig/libclamav.pc -libdata/pkgconfig/libclammspack.pc man/man1/clambc.1.gz man/man1/clamconf.1.gz man/man1/clamdscan.1.gz man/man1/clamdtop.1.gz man/man1/clamscan.1.gz -%%JSON%%man/man1/clamsubmit.1.gz man/man1/freshclam.1.gz man/man1/sigtool.1.gz man/man5/clamav-milter.conf.5.gz @@ -39,9 +125,4 @@ man/man5/clamd.conf.5.gz man/man5/freshclam.conf.5.gz man/man8/clamav-milter.8.gz man/man8/clamd.8.gz -@sample etc/clamd.conf.sample -@sample etc/freshclam.conf.sample -%%MILTER%%@sample etc/clamav-milter.conf.sample -@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%DBDIR%% -@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%LOGDIR%% -@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%RUNDIR%% +sbin/clamd
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811300234.wAU2YL0B043705>