Revert "security/clamav: sync with upstream"

This reverts commit 785d090ee1.

ClamAV 0.101.0 breaks libclamav include files and some standards
like "CL_SCAN_STDOPT" which allegedly "should [be used] to make
your software ready for new features in future versions of libclamav".
Best part is nobody seems to have noticed yet.
This commit is contained in:
Franco Fichtner 2018-12-06 10:21:22 +01:00
parent 479d55e633
commit 293523c07d
3 changed files with 138 additions and 138 deletions

View File

@ -1,12 +1,12 @@
# Created by: markun@onohara.to
# $FreeBSD$
PORTNAME= clamav
PORTVERSION= 0.101.0
PORTREVISION= 1
PORTVERSION= 0.100.2
CATEGORIES= security
MASTER_SITES= http://www.clamav.net/downloads/production/
MAINTAINER= yasu@utahime.org
MAINTAINER= ler@FreeBSD.org
COMMENT= Command line virus scanner written entirely in C
LICENSE= GPLv2
@ -15,30 +15,72 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libltdl.so:devel/libltdl \
libcurl.so:ftp/curl
USES= cpe gmake gnome libtool ncurses pathfix pkgconfig ssl
USE_RC_SUBR= clamav-clamd clamav-freshclam
USE_LDCONFIG= yes
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_LDCONFIG= 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=${LOCALBASE}/lib \
CONFIGURE_ARGS= --libdir=${PREFIX}/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,
@ -47,6 +89,13 @@ 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} \
@ -59,74 +108,6 @@ 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|' \
@ -141,6 +122,49 @@ 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|' \
@ -149,8 +173,11 @@ post-patch:
${WRKSRC}/etc/clamd.conf.sample \
${WRKSRC}/etc/freshclam.conf.sample \
${WRKSRC}/etc/clamav-milter.conf.sample
@${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \
${WRKSRC}/libclamunrar/unrar.c
pre-configure-TESTS-on:
.if ${PORT_OPTIONS:MTESTS}
pre-configure:
@if ! ${PYTHON_CMD} -c "import thread" >/dev/null 2>&1; then \
${ECHO_MSG} ""; \
${ECHO_MSG} "==========================================================================="; \
@ -160,11 +187,14 @@ pre-configure-TESTS-on:
${ECHO_MSG} ""; \
${TOUCH} ${PY_NO_THREAD}; \
fi
.endif
post-build-TESTS-on:
.if ${PORT_OPTIONS:MTESTS}
post-build:
@if [ ! -f "${PY_NO_THREAD}" ]; then \
${MAKE_CMD} -C ${WRKSRC} check; \
fi
.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/clamav-config.h ${STAGEDIR}${PREFIX}/include
@ -172,6 +202,6 @@ post-install:
${STAGEDIR}${DBDIR} \
${STAGEDIR}${LOGDIR} \
${STAGEDIR}${RUNDIR}
(cd ${WRKSRC}/docs/html; ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/html)
${INSTALL_DATA} ${WRKSRC}/docs/html/* ${STAGEDIR}${DOCSDIR}/html
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1543875407
SHA256 (clamav-0.101.0.tar.gz) = f12a5ad86bc4e0bde6cad2d30c49c7daab184cba7ce631909434b5d9533a5ad2
SIZE (clamav-0.101.0.tar.gz) = 21686531
TIMESTAMP = 1538590041
SHA256 (clamav-0.100.2.tar.gz) = 4a2e4f0cd41e62adb5a713b4a1857c49145cd09a69957e6d946ecad575206dd6
SIZE (clamav-0.100.2.tar.gz) = 15926420

View File

@ -1,72 +1,37 @@
%%JSON%%bin/clamsubmit
%%JSON%%man/man1/clamsubmit.1.gz
%%MILTER%%@sample etc/clamav-milter.conf.sample
%%MILTER%%sbin/clamav-milter
%%NO_MSPACK%%lib/libclammspack.so
%%NO_MSPACK%%lib/libclammspack.so.0
%%NO_MSPACK%%lib/libclammspack.so.0.1.0
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Installation-Unix.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Installation-Unix/Steps-Debian-Ubuntu.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Installation-Unix/Steps-Redhat-CentOS.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Installation-Unix/Steps-macOS.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Installation-Windows.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Introduction.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/OnAccess.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/AuthenticodeRules.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/BodySignatureFormat.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/BytecodeSignatures.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/ContainerMetadata.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/DatabaseInfo.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/DynamicConfig.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/EncryptedArchives.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/ExtendedSignatures.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/FileTypeMagic.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/FileTypes.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/FunctionalityLevels.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/HashSignatures.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/LogicalSignatures.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/PhishSigs.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/Whitelists.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Signatures/YaraRules.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Usage.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Usage/Configuration.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Usage/Scanning.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/Usage/SignatureManagement.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/development.html
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/images/demon.png
%%PORTDOCS%%%%DOCSDIR%%/html/UserManual/libclamav.html
%%UNRAR%%lib/libclamunrar.so
%%UNRAR%%lib/libclamunrar.so.9
%%UNRAR%%lib/libclamunrar.so.9.0.0
%%UNRAR%%lib/libclamunrar_iface.so
%%UNRAR%%lib/libclamunrar_iface.so.9
%%UNRAR%%lib/libclamunrar_iface.so.9.0.0
@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
include/clamav-config.h
%%MILTER%%sbin/clamav-milter
sbin/clamd
include/clamav.h
include/clamav-config.h
lib/libclamav.so
lib/libclamav.so.9
lib/libclamav.so.9.0.0
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
@ -74,4 +39,9 @@ man/man5/clamd.conf.5.gz
man/man5/freshclam.conf.5.gz
man/man8/clamav-milter.8.gz
man/man8/clamd.8.gz
sbin/clamd
@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%%