FreeBSD Bugzilla – Attachment 48014 Details for
Bug 73491
Update security/clamav-devel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
clamav-devel.patch
clamav-devel.patch (text/plain), 18.28 KB, created by
rob
on 2004-11-03 19:10:16 UTC
(
hide
)
Description:
clamav-devel.patch
Filename:
MIME Type:
Creator:
rob
Created:
2004-11-03 19:10:16 UTC
Size:
18.28 KB
patch
obsolete
>diff -ruN clamav-devel.orig/Makefile clamav-devel/Makefile >--- clamav-devel.orig/Makefile Sat Oct 16 17:04:36 2004 >+++ clamav-devel/Makefile Wed Nov 3 19:46:29 2004 >@@ -6,7 +6,7 @@ > # > > PORTNAME= clamav >-PORTVERSION= 20040826 >+PORTVERSION= 20041101 > CATEGORIES= security > MASTER_SITES= http://www.clamav.net/snapshot/ > PKGNAMESUFFIX= -devel >@@ -23,9 +23,9 @@ > arc:${PORTSDIR}/archivers/arc \ > unzip:${PORTSDIR}/archivers/unzip > >-OPTIONS= MILTER "Compile the milter interface" off >+OPTIONS= MILTER "Compile the milter interface" Off \ >+ CURL "Support URL downloading" Off > USE_REINPLACE= yes >-USE_GMAKE= yes > GNU_CONFIGURE= yes > CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} > USE_AUTOCONF_VER=259 >@@ -35,10 +35,17 @@ > INSTALLS_SHLIB= yes > USE_RC_SUBR= yes > >+PKGINSTALL= ${WRKDIR}/pkg-install >+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall >+ >+PORTDOCS= NEWS ChangeLog html >+ > CONFIGURE_ARGS= --with-dbdir=${DATADIR} \ > --disable-clamuko \ > --disable-clamav \ > --enable-bigstack \ >+ --disable-gethostbyname_r \ >+ --enable-readdir_r \ > --disable-dependency-tracking > CPPFLAGS+= -I${LOCALBASE}/include > CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include >@@ -46,16 +53,15 @@ > CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" > > MAN1= clamscan.1 freshclam.1 sigtool.1 clamdscan.1 >-MAN5= clamav.conf.5 freshclam.conf.5 >+MAN5= clamd.conf.5 freshclam.conf.5 > MAN8= clamd.8 clamav-milter.8 > >-CONFLICTS= clamav-0.* >+CONFLICTS= clamav-0.[0-9]* > > CLAMAVUSER?= clamav > CLAMAVGROUP?= clamav > CLAMAV_CLAMD_SOCKET?= /var/run/clamav/clamd > CLAMAV_MILTER_SOCKET?= /var/run/clamav/clmilter.sock >-DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} > > SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \ > -e 's|%%DATADIR%%|${DATADIR}|g' \ >@@ -65,12 +71,13 @@ > -e 's|%%CLAMAV_MILTER_SOCKET%%|${CLAMAV_MILTER_SOCKET}|g' > > SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \ >- -e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \ >- -e 's|^\#?(PidFile) .*$$|\1 /var/run/clamav/clamd.pid|' \ >+ -e 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 /var/log/clamav/\3|' \ >+ -e 's|^\#?(PidFile) .*/([a-z]+\.pid)$$|\1 /var/run/clamav/\2|' \ > -e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \ > -e 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' \ > -e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \ > -e 's|^\#?(ScanMail)$$|\1|' \ >+ -e 's|^\#?(NotifyClamd)$$|\1|' \ > -e 's|^\#?(Checks)$$|\#\1|' \ > -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \ > -e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \ >@@ -90,14 +97,12 @@ > > .include <bsd.port.pre.mk> > >-.if ${OSVERSION} < 501001 >-# compiles only with libcipher >-LDFLAGS+= -lcipher >-.endif >- > .if defined(WITH_MILTER) > .if !exists(/usr/lib/libmilter.a) > BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail >+CONFIGURE_ENV+= SENDMAIL="${LOCALBASE}/sbin/sendmail" >+.else >+CONFIGURE_ENV+= SENDMAIL="/usr/sbin/sendmail" > .endif > CONFIGURE_ARGS+= --enable-milter > PLIST_SUB+= CLAMAV-MILTER="" >@@ -105,58 +110,64 @@ > PLIST_SUB+= CLAMAV-MILTER="@comment " > .endif > >-post-patch: >- @${REINPLACE_CMD} -e 's|/usr/lib/sendmail|/usr/sbin/sendmail|g' \ >- ${WRKSRC}/clamav-milter/clamav-milter.c >- @${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \ >- ${WRKSRC}/Makefile.am >+.if defined(WITH_CURL) >+LIB_DEPENDS+= curl.3:${PORTSDIR}/ftp/curl >+CONFIGURE_ARGS+= --with-libcurl >+.else >+CONFIGURE_ARGS+= --without-libcurl >+.endif >+ >+pre-configure: > @cd ${WRKSRC} && ${ACLOCAL} > >+pre-build: >+ @if ${LDCONFIG} -r | ${GREP} -qw -e -lclamav; then \ >+ ${ECHO_MSG} "===> *** WARNING ***"; \ >+ ${ECHO_MSG} " Installed version of libclamav found."; \ >+ ${ECHO_MSG} " This might cause build problems."; \ >+ fi >+ > post-build: >- @${SED} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamav.conf \ >- > ${BUILD_WRKSRC}/etc/clamav.conf.default >- @${CP} ${BUILD_WRKSRC}/etc/clamav.conf.default \ >- ${BUILD_WRKSRC}/etc/clamav.conf >- @${SED} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf \ >- > ${BUILD_WRKSRC}/etc/freshclam.conf.default >- @${CP} ${BUILD_WRKSRC}/etc/freshclam.conf.default \ >- ${BUILD_WRKSRC}/etc/freshclam.conf >+ @${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamd.conf >+ @${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf >+ @${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install >${PKGINSTALL} >+ @${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-deinstall >${PKGDEINSTALL} > @${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-clamd.sh \ >- > ${WRKDIR}/clamav-clamd.sh >- @${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-milter.sh \ >- > ${WRKDIR}/clamav-milter.sh >+ >${WRKDIR}/clamav-clamd.sh > @${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-freshclam.sh \ >- > ${WRKDIR}/clamav-freshclam.sh >+ >${WRKDIR}/clamav-freshclam.sh >+.if defined(WITH_MILTER) >+ @${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-milter.sh \ >+ >${WRKDIR}/clamav-milter.sh >+.endif > > pre-install: >- @${SETENV} PKG_PREFIX=${PREFIX} \ >+ @${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \ > ${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL >-.if !defined(NOPORTDOCS) >- @${MKDIR} ${DOCSDIR} >- @${INSTALL_DATA} ${WRKSRC}/docs/*pdf ${DOCSDIR} >-.endif > > post-install: >- @[ -f ${PREFIX}/etc/clamav.conf ] || \ >- ${CP} ${BUILD_WRKSRC}/etc/clamav.conf.default \ >- ${PREFIX}/etc/clamav.conf >- @[ -f ${PREFIX}/etc/clamav.conf.default ] || \ >- ${CP} ${BUILD_WRKSRC}/etc/clamav.conf.default \ >- ${PREFIX}/etc/clamav.conf.default >- @[ -f ${PREFIX}/etc/freshclam.conf ] || \ >- ${CP} ${BUILD_WRKSRC}/etc/freshclam.conf.default \ >- ${PREFIX}/etc/freshclam.conf >- @[ -f ${PREFIX}/etc/freshclam.conf.default ] || \ >- ${CP} ${BUILD_WRKSRC}/etc/freshclam.conf.default \ >- ${PREFIX}/etc/freshclam.conf.default >- @${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DATADIR} > @${INSTALL_SCRIPT} ${WRKDIR}/clamav-clamd.sh \ >- ${RC_DIR}/clamav-clamd${RC_SUFX} >+ ${DESTDIR}${RC_DIR}/clamav-clamd${RC_SUFX} > @${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \ >- ${RC_DIR}/clamav-freshclam${RC_SUFX} >+ ${DESTDIR}${RC_DIR}/clamav-freshclam${RC_SUFX} >+ @${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DATADIR} >+.for c in clamd freshclam >+ @[ -f ${DESTDIR}${PREFIX}/etc/${c}.conf ] || \ >+ ${CP} ${DESTDIR}${PREFIX}/etc/${c}.conf.default ${DESTDIR}${PREFIX}/etc/${c}.conf >+.endfor > .if defined(WITH_MILTER) > @${INSTALL_SCRIPT} ${WRKDIR}/clamav-milter.sh \ >- ${RC_DIR}/clamav-milter${RC_SUFX} >+ ${DESTDIR}${RC_DIR}/clamav-milter${RC_SUFX} >+.endif >+.if !defined(NOPORTDOCS) >+ @${MKDIR} ${DESTDIR}${DOCSDIR} >+ @${INSTALL_DATA} ${INSTALL_WRKSRC}/NEWS ${INSTALL_WRKSRC}/ChangeLog \ >+ ${DESTDIR}${DOCSDIR} >+ @${MKDIR} ${DESTDIR}${DOCSDIR}/html >+ @${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/html/*.* \ >+ ${DESTDIR}${DOCSDIR}/html > .endif >+ @${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \ >+ ${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL > > .include <bsd.port.post.mk> >diff -ruN clamav-devel.orig/distinfo clamav-devel/distinfo >--- clamav-devel.orig/distinfo Sat Oct 16 17:04:36 2004 >+++ clamav-devel/distinfo Wed Nov 3 19:47:08 2004 >@@ -1,2 +1,2 @@ >-MD5 (clamav-devel-20040826.tar.gz) = c739f4d138863a27ce57976e6bb67deb >-SIZE (clamav-devel-20040826.tar.gz) = 1660493 >+MD5 (clamav-devel-20041101.tar.gz) = 47e175c4ff831d4afd6b29ebce62605b >+SIZE (clamav-devel-20041101.tar.gz) = 1312776 >diff -ruN clamav-devel.orig/files/clamav-clamd.sh clamav-devel/files/clamav-clamd.sh >--- clamav-devel.orig/files/clamav-clamd.sh Sat Oct 16 17:04:36 2004 >+++ clamav-devel/files/clamav-clamd.sh Wed Nov 3 19:32:12 2004 >@@ -24,20 +24,12 @@ > command=%%PREFIX%%/sbin/clamd > pidfile=/var/run/clamav/clamd.pid > required_dirs=%%DATADIR%% >-required_files=%%PREFIX%%/etc/clamav.conf >+required_files=%%PREFIX%%/etc/clamd.conf > >-stop_postcmd=stop_postcmd >+# read settings, set default values >+load_rc_config "$name" >+: ${clamav_clamd_enable="NO"} >+: ${clamav_clamd_flags=""} >+: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"} > >-stop_postcmd() >-{ >- rm -f $pidfile >-} >- >-# set defaults >- >-clamav_clamd_enable=${clamav_clamd_enable:-"NO"} >-clamav_clamd_flags=${clamav_clamd_flags:-""} >-clamav_clamd_socket=${clamav_clamd_socket:-"%%CLAMAV_CLAMD_SOCKET%%"} >- >-load_rc_config $name > run_rc_command "$1" >diff -ruN clamav-devel.orig/files/clamav-freshclam.sh clamav-devel/files/clamav-freshclam.sh >--- clamav-devel.orig/files/clamav-freshclam.sh Sat Oct 16 17:04:36 2004 >+++ clamav-devel/files/clamav-freshclam.sh Wed Nov 3 19:32:16 2004 >@@ -9,7 +9,7 @@ > # KEYWORD: FreeBSD shutdown > > # >-# Add the following lines to /etc/rc.conf to enable freshclam daemon: >+# Add the following lines to /etc/rc.conf to enable the freshclam daemon: > # > #clamav_freshclam_enable="YES" > # >@@ -22,16 +22,14 @@ > rcvar=`set_rcvar` > > command=%%PREFIX%%/bin/freshclam >+pidfile=/var/run/clamav/freshclam.pid >+command_args="--daemon" > required_dirs=%%DATADIR%% > required_files=%%PREFIX%%/etc/freshclam.conf > >-# set defaults >+# read settings, set default values >+load_rc_config "$name" >+: ${clamav_freshclam_enable="NO"} >+: ${clamav_freshclam_flags=""} > >-clamav_freshclam_enable=${clamav_freshclam_enable:-"NO"} >-clamav_freshclam_flags=${clamav_freshclam_flags:-"--pid=/var/run/clamav/freshclam.pid --daemon-notify=%%PREFIX%%/etc/clamav.conf"} >- >-load_rc_config $name >- >-# add --daemon to any given arguments >-clamav_freshclam_flags="${clamav_freshclam_flags} --daemon" > run_rc_command "$1" >diff -ruN clamav-devel.orig/files/clamav-milter.sh clamav-devel/files/clamav-milter.sh >--- clamav-devel.orig/files/clamav-milter.sh Sat Oct 16 17:04:36 2004 >+++ clamav-devel/files/clamav-milter.sh Wed Nov 3 19:32:20 2004 >@@ -23,7 +23,7 @@ > > command=%%PREFIX%%/sbin/clamav-milter > required_dirs=%%DATADIR%% >-required_files=%%PREFIX%%/etc/clamav.conf >+required_files=%%PREFIX%%/etc/clamd.conf > > start_precmd=start_precmd > >@@ -33,15 +33,14 @@ > warn "Stale socket $clamav_milter_socket removed." > rm "$clamav_milter_socket" > fi >+ rc_flags="${flags:-$clamav_milter_flags} $clamav_milter_socket" > } > >-# set defaults >- >-clamav_milter_enable=${clamav_milter_enable:-"NO"} >-clamav_milter_socket=${clamav_milter_socket:-"%%CLAMAV_MILTER_SOCKET%%"} >-clamav_milter_flags=${clamav_milter_flags:-"--postmaster-only --local --outgoing --max-children=50"} >- >+# read settings, set default values > load_rc_config $name >+: ${clamav_milter_enable="NO"} >+: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"} >+: ${clamav_milter_flags="--postmaster-only --local --outgoing --max-children=50"} > > # add socket to any given argument > clamav_milter_flags="${clamav_milter_flags} ${clamav_milter_socket}" >diff -ruN clamav-devel.orig/files/patch-Makefile.am clamav-devel/files/patch-Makefile.am >--- clamav-devel.orig/files/patch-Makefile.am Thu Jan 1 01:00:00 1970 >+++ clamav-devel/files/patch-Makefile.am Sun Oct 17 12:04:33 2004 >@@ -0,0 +1,10 @@ >+--- Makefile.am.orig Sat Oct 16 17:43:47 2004 >++++ Makefile.am Sat Oct 16 17:44:12 2004 >+@@ -20,6 +20,6 @@ >+ >+ bin_SCRIPTS=clamav-config >+ >+-pkgconfigdir = $(libdir)/pkgconfig >++pkgconfigdir = $(prefix)/libdata/pkgconfig >+ pkgconfig_DATA = libclamav.pc >+ >diff -ruN clamav-devel.orig/files/patch-configure.in clamav-devel/files/patch-configure.in >--- clamav-devel.orig/files/patch-configure.in Sat Oct 16 17:04:36 2004 >+++ clamav-devel/files/patch-configure.in Wed Nov 3 19:32:23 2004 >@@ -9,27 +9,4 @@ > - CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread -lc_r" > TH_SAFE="-thread-safe" > AC_DEFINE(CL_THREAD_SAFE,1,[thread safe]) >- AC_DEFINE(_REENTRANT,1,[thread safe]) >-@@ -510,6 +507,8 @@ >- >- dnl Check for gethostbyname_r and number of its arguments >- dnl Code from libwww/configure.in >-+AC_CHECK_FUNC(gethostbyname_r) >-+if test $ac_cv_func_gethostbyname_r = 'yes'; then >- AC_MSG_CHECKING(for gethostbyname_r) >- if test -z "$ac_cv_gethostbyname_args"; then >- AC_TRY_COMPILE( >-@@ -565,6 +564,13 @@ >- AC_DEFINE(HAVE_GETHOSTBYNAME_R_6,1,[gethostbyname_r takes 6 arguments]) >- fi >- AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyname_args arguments]) >-+fi >-+else >-+dnl Check for gethostbyname() >-+AC_CHECK_FUNC(gethostbyname) >-+if test $ac_cv_func_gethostbyname = 'no'; then >-+ AC_MSG_ERROR(***** fail on check gethostbyname()) >-+fi >- fi >- >- dnl Check for clamav in /etc/passwd >+ AC_DEFINE(_REENTRANT,1,[thread safe]) >\ No newline at end of file >diff -ruN clamav-devel.orig/files/patch-etc::Makefile.am clamav-devel/files/patch-etc::Makefile.am >--- clamav-devel.orig/files/patch-etc::Makefile.am Thu Jan 1 01:00:00 1970 >+++ clamav-devel/files/patch-etc::Makefile.am Sun Oct 17 13:04:41 2004 >@@ -0,0 +1,12 @@ >+--- etc/Makefile.am.orig Sat Oct 2 23:09:13 2004 >++++ etc/Makefile.am Sun Oct 17 13:04:24 2004 >+@@ -20,7 +20,5 @@ >+ >+ install: >+ $(mkinstalldirs) $(DESTDIR)$(CFGINST) >+- @test -f $(DESTDIR)$(CFGINST)/clamd.conf || \ >+- $(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST) >+- @test -f $(DESTDIR)$(CFGINST)/freshclam.conf || \ >+- $(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST) >++ $(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)/clamd.conf.default >++ $(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)/freshclam.conf.default >diff -ruN clamav-devel.orig/pkg-deinstall clamav-devel/pkg-deinstall >--- clamav-devel.orig/pkg-deinstall Sat Oct 16 17:04:36 2004 >+++ clamav-devel/pkg-deinstall Wed Nov 3 19:32:23 2004 >@@ -1,7 +1,13 @@ >-if [ ! "$2" = "POST-DEINSTALL" ]; then >+#!/bin/sh >+# $FreeBSD$ >+ >+if [ "$2" != "POST-DEINSTALL" ]; then > exit 0 > fi >-echo "----------------------------------------------------------" >-echo " If you really want to remove this package, please remove" >-echo " the clamav-user and clean out log files and database" >-echo "----------------------------------------------------------" >+ >+CLAMAVUSER=%%CLAMAVUSER%% >+ >+if pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then >+ echo "To delete ${CLAMAVUSER} user permanently, use 'pw userdel \"${CLAMAVUSER}\"'" >+fi >+exit 0 >diff -ruN clamav-devel.orig/pkg-install clamav-devel/pkg-install >--- clamav-devel.orig/pkg-install Sat Oct 16 17:04:36 2004 >+++ clamav-devel/pkg-install Wed Nov 3 19:32:23 2004 >@@ -1,50 +1,71 @@ > #!/bin/sh >+# $FreeBSD: ports/security/clamav/pkg-install,v 1.8 2004/10/14 09:30:47 eik Exp $ >+ >+PREFIX=${PKG_PREFIX:-%%PREFIX%%} >+DESTDIR=${PKG_DESTDIR:-} >+ >+CLAMAVUSER=%%CLAMAVUSER%% >+CLAMAVGROUP=%%CLAMAVGROUP%% >+UID=106 >+GID=$UID >+ >+CLAMRUN=$DESTDIR/var/run/clamav >+CLAMLOG=$DESTDIR/var/log/clamav >+DATADIR=$DESTDIR%%DATADIR%% > > if [ "$2" = "PRE-INSTALL" ]; then > >-if [ -z "${CLAMAVUSER}" ]; then >- CLAMAVUSER=clamav >-fi >- >-if [ -z "${CLAMAVGROUP}" ]; then >- CLAMAVGROUP=clamav >-fi >+ if ! pw groupshow "$CLAMAVGROUP" 2>/dev/null 1>&2; then >+ if pw groupadd $CLAMAVGROUP -g $GID; then >+ echo "=> Added group \"$CLAMAVGROUP\"." >+ else >+ echo "=> Adding group \"$CLAMAVGROUP\" failed..." >+ exit 1 >+ fi >+ fi > >-UID=106 >-GID=${UID} >+ if ! pw usershow "$CLAMAVUSER" 2>/dev/null 1>&2; then >+ if pw useradd $CLAMAVUSER -u $UID -g $CLAMAVGROUP -h - \ >+ -s "/sbin/nologin" -d "/nonexistent" \ >+ -c "Clam Antivirus"; \ >+ then >+ pw groupmod mail -m $CLAMAVUSER >+ echo "=> Added user \"$CLAMAVUSER\"." >+ else >+ echo "=> Adding user \"$CLAMAVUSER\" failed..." >+ exit 1 >+ fi >+ fi > >-CLAMRUN=/var/run/clamav >-CLAMLOG=/var/log/clamav >+elif [ "$2" = "POST-INSTALL" ]; then > >-echo "===> Adding user \"${CLAMAVUSER}\" if necessary." >-if ! pw groupshow "${CLAMAVGROUP}" 2>/dev/null 1>&2; then >- if pw groupadd ${CLAMAVGROUP} -g ${GID}; then >- echo "===> Added group \"${CLAMAVGROUP}\"." >- else >- echo "===> Adding group \"${CLAMAVGROUP}\" failed..." >- exit 1 >- fi >-fi >- >-if ! pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then >- if pw useradd ${CLAMAVUSER} -u ${UID} -g ${CLAMAVGROUP} -h - \ >- -s "/usr/sbin/nologin" -d "/nonexistent" \ >- -c "Clam Antivirus"; \ >- then >- echo "===> Added user \"${CLAMAVUSER}\"." >- pw groupmod mail -m ${CLAMAVUSER} >- else >- echo "===> Adding user \"${CLAMAVUSER}\" failed..." >- exit 1 >- fi >-fi >- >-echo "===> Setting permissions..." >-mkdir -p "${CLAMRUN}" >-chown "${CLAMAVUSER}:${CLAMAVGROUP}" "${CLAMRUN}" >+ if [ ! -d "$CLAMRUN" ]; then >+ mkdir -p "$CLAMRUN" || exit 1 >+ chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMRUN" || exit 1 >+ fi >+ >+ if [ ! -d "$CLAMLOG" ]; then >+ mkdir -p "$CLAMLOG" || exit 1 >+ chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMLOG" || exit 1 >+ fi >+ >+ if [ ! -d "$DATADIR" ]; then >+ mkdir -p "$DATADIR" || exit 1 >+ chown "$CLAMAVUSER:$CLAMAVGROUP" "$DATADIR" || exit 1 >+ fi >+ >+ if [ -f "$DESTDIR$PREFIX/etc/clamav.conf" ]; then >+ echo >+ echo "**************** WARNING ****************" >+ echo "* *" >+ echo "* The configuration file has changed: *" >+ echo "* Please edit $PREFIX/etc/clamd.conf *" >+ echo "* and remove $PREFIX/etc/clamav.conf *" >+ echo "* *" >+ echo "**************** WARNING ****************" >+ echo >+ fi > >-mkdir -p "${CLAMLOG}" >-chown "${CLAMAVUSER}:${CLAMAVGROUP}" "${CLAMLOG}" > fi > > exit 0 >diff -ruN clamav-devel.orig/pkg-plist clamav-devel/pkg-plist >--- clamav-devel.orig/pkg-plist Sat Oct 16 17:04:36 2004 >+++ clamav-devel/pkg-plist Wed Nov 3 19:32:23 2004 >@@ -1,3 +1,4 @@ >+@comment $FreeBSD$ > @unexec [ ! -f /var/run/clamav/clamd.pid ] || %%RC_DIR%%/clamav-clamd%%RC_SUFX%% stop || true > @unexec [ ! -f /var/run/clamav/freshclam.pid ] || %%RC_DIR%%/clamav-freshclam%%RC_SUFX%% stop || true > bin/clamav-config >@@ -15,21 +16,14 @@ > lib/libclamav.so > lib/libclamav.a > libdata/pkgconfig/libclamav.pc >-%%PORTDOCS%%%%DOCSDIR%%/clamav-mirror-howto.pdf >-%%PORTDOCS%%%%DOCSDIR%%/clamdoc.pdf >-%%PORTDOCS%%%%DOCSDIR%%/signatures.pdf >-@unexec if cmp -s %D/etc/clamav.conf %D/etc/clamav.conf.default; then rm -f %D/etc/clamav.conf; fi >-etc/clamav.conf.default >-@exec [ -f %B/clamav.conf ] || cp %B/%f %B/clamav.conf >+@unexec if cmp -s %D/etc/clamd.conf %D/etc/clamd.conf.default; then rm -f %D/etc/clamd.conf; fi >+etc/clamd.conf.default >+@exec [ -f %B/clamd.conf ] || cp %B/%f %B/clamd.conf > @unexec if cmp -s %D/etc/freshclam.conf %D/etc/freshclam.conf.default; then rm -f %D/etc/freshclam.conf; fi > etc/freshclam.conf.default > @exec [ -f %B/freshclam.conf ] || cp %B/%f %B/freshclam.conf >-@owner %%CLAMAVUSER%% >-@group %%CLAMAVGROUP%% >-@exec chown %%CLAMAVUSER%%:%%CLAMAVGROUP%% %B >-@unexec [ -s %D/%%DATADIR%%/main.cvd ] || rm -f %D/%%DATADIR%%/main.cvd >-@unexec [ -s %D/%%DATADIR%%/daily.cvd ] || rm -f %D/%%DATADIR%%/daily.cvd >+@unexec [ -s %D/%%DATADIR%%/daily.cvd ] || rm -f %D/%%DATADIR%%/daily.cvd || true >+@unexec [ -s %D/%%DATADIR%%/main.cvd ] || rm -f %D/%%DATADIR%%/main.cvd || true > @unexec rmdir %D/%%DATADIR%% 2>/dev/null || true > @unexec rmdir /var/run/clamav 2>/dev/null || true > @unexec rmdir /var/log/clamav 2>/dev/null || true >-%%PORTDOCS%%@dirrm %%DOCSDIR%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 73491
: 48014