diff options
author | Renato Botelho <garga@FreeBSD.org> | 2007-02-18 18:36:49 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2007-02-18 18:36:49 +0000 |
commit | aa88ef55235ce11f5ad8fefe2e844b09359d2fce (patch) | |
tree | bc767e3ed4c8f350b48b2660d60f03e8e8140e5b /security/clamav-devel/files | |
parent | 56cfde4f5847a7a0c5c355a37e7c4fbcefc3f4d8 (diff) |
Notes
Diffstat (limited to 'security/clamav-devel/files')
-rw-r--r-- | security/clamav-devel/files/patch-clamd_session.c | 13 | ||||
-rw-r--r-- | security/clamav-devel/files/patch-configure | 20 | ||||
-rw-r--r-- | security/clamav-devel/files/pkg-deinstall.in | 15 | ||||
-rw-r--r-- | security/clamav-devel/files/pkg-install.in | 59 |
4 files changed, 36 insertions, 71 deletions
diff --git a/security/clamav-devel/files/patch-clamd_session.c b/security/clamav-devel/files/patch-clamd_session.c deleted file mode 100644 index 3cbe01db6bb5..000000000000 --- a/security/clamav-devel/files/patch-clamd_session.c +++ /dev/null @@ -1,13 +0,0 @@ ---- clamd/session.c.orig Wed Sep 13 19:13:20 2006 -+++ clamd/session.c Tue Sep 26 09:42:41 2006 -@@ -42,6 +42,10 @@ - #include <signal.h> - #include <errno.h> - #include <stddef.h> -+#if (defined(__FreeBSD__) && __FreeBSD_version >= 600000) -+#include <sys/limits.h> -+#endif -+#include <sys/syslimits.h> - - #include "libclamav/clamav.h" - #include "libclamav/str.h" diff --git a/security/clamav-devel/files/patch-configure b/security/clamav-devel/files/patch-configure index 2ac2e4dfeb61..96f1b1ce1785 100644 --- a/security/clamav-devel/files/patch-configure +++ b/security/clamav-devel/files/patch-configure @@ -1,25 +1,5 @@ --- configure.orig Thu Jun 23 23:12:00 2005 +++ configure Tue Jun 28 20:53:10 2005 -@@ -10914,6 +10914,9 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <sys/types.h> -+#include <netinet/in.h> -+#include <arpa/nameser.h> - #include <resolv.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -10957,6 +10960,9 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <sys/types.h> -+#include <netinet/in.h> -+#include <arpa/nameser.h> - #include <resolv.h> - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -11195,19 +11201,25 @@ sendmailver_c=`echo $sendmailver | awk -F. '{printf $3}'` diff --git a/security/clamav-devel/files/pkg-deinstall.in b/security/clamav-devel/files/pkg-deinstall.in index 207212015296..ee619bc86abb 100644 --- a/security/clamav-devel/files/pkg-deinstall.in +++ b/security/clamav-devel/files/pkg-deinstall.in @@ -7,7 +7,20 @@ fi CLAMAVUSER=%%CLAMAVUSER%% +echo +echo "====================================================" +echo +echo "If you want remove clamav permanently from you system" +echo "execute following commands:" +echo +echo " # rm -rf %%LOGDIR%%" +echo " # rm -rf %%RUNDIR%%" +echo " # rm -rf %%DBDIR%%" if pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then - echo "To delete ${CLAMAVUSER} user permanently, use 'pw userdel \"${CLAMAVUSER}\"'" + echo " # pw userdel ${CLAMAVUSER}" fi +echo +echo "====================================================" +echo + exit 0 diff --git a/security/clamav-devel/files/pkg-install.in b/security/clamav-devel/files/pkg-install.in index 91ec86b6b17b..d2225f6ad301 100644 --- a/security/clamav-devel/files/pkg-install.in +++ b/security/clamav-devel/files/pkg-install.in @@ -2,69 +2,54 @@ # $FreeBSD$ PREFIX=${PKG_PREFIX:-%%PREFIX%%} -DESTDIR=${PKG_DESTDIR:-} CLAMAVUSER=%%CLAMAVUSER%% CLAMAVGROUP=%%CLAMAVGROUP%% UID=106 GID=$UID -DBDIR=$DESTDIR%%DBDIR%% -LOGDIR=$DESTDIR%%LOGDIR%% -RUNDIR=$DESTDIR%%RUNDIR%% +DBDIR=%%DBDIR%% +LOGDIR=%%LOGDIR%% +RUNDIR=%%RUNDIR%% + +PW="pw" +CHOWN="chown" +MKDIR="mkdir -p" if [ "$2" = "PRE-INSTALL" ]; then - if ! pw groupshow "$CLAMAVGROUP" 2>/dev/null 1>&2; then - if pw groupadd $CLAMAVGROUP -g $GID; then - echo "=> Added group \"$CLAMAVGROUP\"." + 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..." + 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 - \ + 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\"." + ${PW} groupmod mail -m ${CLAMAVUSER} + echo "=> Added user \"${CLAMAVUSER}\"." else - echo "=> Adding user \"$CLAMAVUSER\" failed..." + echo "=> Adding user \"${CLAMAVUSER}\" failed..." exit 1 fi fi elif [ "$2" = "POST-INSTALL" ]; then - if [ ! -d "$DBDIR" ]; then - mkdir -p "$DBDIR" || exit 1 - chown "$CLAMAVUSER:$CLAMAVGROUP" "$DBDIR" || exit 1 - fi - - if [ ! -d "$LOGDIR" ]; then - mkdir -p "$LOGDIR" || exit 1 - chown "$CLAMAVUSER:$CLAMAVGROUP" "$LOGDIR" || exit 1 - fi + [ ! -d "${DBDIR}" ] && (${MKDIR} ${DBDIR} || exit 1) + ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DBDIR} || exit 1 - if [ ! -d "$RUNDIR" ]; then - mkdir -p "$RUNDIR" || exit 1 - chown "$CLAMAVUSER:$CLAMAVGROUP" "$RUNDIR" || exit 1 - fi + [ ! -d "${LOGDIR}" ] && (${MKDIR} ${LOGDIR} || exit 1) + ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${LOGDIR} || exit 1 - 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 + [ ! -d "${RUNDIR}" ] && (${MKDIR} ${RUNDIR} || exit 1) + ${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${RUNDIR} || exit 1 fi |