[PATCH] initial debconf update
aCaB
acab at clamav.net
Fri Apr 9 02:51:18 UTC 2010
---
debian/clamav-base.postinst.in | 28 ++++++++++++++++++++++++++++
debian/clamav-base.templates | 32 ++++++++++++++++++++++++++++++++
debian/clamav-freshclam.postinst.in | 5 +++++
debian/clamav-milter.postinst.in | 13 ++++++++++++-
debian/clamav-milter.templates | 10 ++++++++++
debian/control | 2 +-
debian/rules | 3 ++-
7 files changed, 90 insertions(+), 3 deletions(-)
diff --git a/debian/clamav-base.postinst.in b/debian/clamav-base.postinst.in
index 07fc419..acb6794 100644
--- a/debian/clamav-base.postinst.in
+++ b/debian/clamav-base.postinst.in
@@ -111,6 +111,10 @@ case "$1" in
localsock="$RET"
db_metaget clamav-base/FixStaleSocket value || true
fixstale="$RET"
+ db_get clamav-base/LocalSocketGroup value || true
+ localsockgrp="$RET"
+ db_get clamav-base/LocalSocketMode value || true
+ localsockmode="$RET"
fi
db_metaget clamav-base/ScanMail value || true
scanmail="$RET"
@@ -148,6 +152,14 @@ case "$1" in
fi
db_get clamav-base/SelfCheck || true
selfcheck="$RET"
+ db_metaget clamav-base/Bytecode value || true
+ bytecode="$RET"
+ if [ "$RET" = "true" ]; then
+ db_metaget clamav-base/BytecodeSecurity value || true
+ bytecodesec="$RET"
+ db_get clamav-base/BytecodeTimeout value || true
+ bytecodetime="$RET"
+ fi
slurp_config "$CLAMAVCONF"
@@ -174,6 +186,8 @@ case "$1" in
else
echo "LocalSocket $localsock" >> $DEBCONFFILE
echo "FixStaleSocket $fixstale" >> $DEBCONFFILE
+ echo "LocalSocketGroup $localsockgrp" >> $DEBCONFFILE
+ echo "LocalSocketMode $localsockmode" >> $DEBCONFFILE
fi
[ -z "$user" ] && user=clamav
[ -z "$AllowSupplementaryGroups" ] && AllowSupplementaryGroups=false
@@ -204,6 +218,11 @@ case "$1" in
[ -z "$ScanHTML" ] && ScanHTML=true
[ -z "$ScanPDF" ] && ScanPDF=true
fi
+ [ -z "$OfficialDatabaseOnly" ] && OfficialDatabaseOnly=false
+ [ -z "$CrossFilesystems" ] && CrossFilesystems=true
+ [ -z "$Bytecode" ] && bytecode=true
+ [ -z "$BytecodeSecurity" ] && bytecodesec=TrustSigned
+ [ -z "$BytecodeTimeout" ] && bytecodetime=60000
[ -z "$DetectBrokenExecutables" ] && DetectBrokenExecutables=false
[ -z "$MailFollowURLs" ] && MailFollowURLs=false
[ -z "$ExitOnOOM" ] && ExitOnOOM=false
@@ -283,6 +302,7 @@ StructuredDataDetection $StructuredDataDetection
CommandReadTimeout $CommandReadTimeout
SendBufTimeout $SendBufTimeout
MaxQueue $MaxQueue
+Bytecode $bytecode
EOF
if is_true "$StructuredDataDetection"; then
@@ -315,6 +335,13 @@ EOF
echo "LogFileMaxSize $LogFileMaxSize" >> $DEBCONFFILE
fi
+ if [ -n "$bytecode" ]; then
+ echo "Bytecode $bytecode" >> $DEBCONFFILE
+ echo "BytecodeSecurity $bytecodesec" >> $DEBCONFFILE
+ echo "BytecodeTimeout $bytecodetime" >> $DEBCONFFILE
+ fi
+ [ -n "$OfficialDatabaseOnly" ] && echo "OfficialDatabaseOnly $OfficialDatabaseOnly" >> $DEBCONFFILE
+ [ -n "$CrossFilesystems" ] && echo "CrossFilesystems $CrossFilesystems" >> $DEBCONFFILE
[ -n "$VirusEvent" ] && echo "VirusEvent $VirusEvent" >> $DEBCONFFILE
[ -n "$StreamMinPort" ] && echo "StreamMinPort $StreamMinPort" >> $DEBCONFFILE
[ -n "$StreamMaxPort" ] && echo "StreamMaxPort $StreamMaxPort" >> $DEBCONFFILE
@@ -326,6 +353,7 @@ EOF
[ -n "$ClamukoIncludePath" ] && echo "ClamukoIncludePath $ClamukoIncludePath" >> $DEBCONFFILE
[ -n "$ClamukoExcludePath" ] && echo "ClamukoExcludePath $ClamukoExcludePath" >> $DEBCONFFILE
[ -n "$ClamukoMaxFileSize" ] && echo "ClamukoMaxFileSize $ClamukoMaxFileSize" >> $DEBCONFFILE
+ [ -n "$ClamukoScannerCount" ] && echo "ClamukoScannerCount $ClamukoScannerCount" >> $DEBCONFFILE
ucf_cleanup "$CLAMAVCONF"
ucf_upgrade_check "$CLAMAVCONF" "$DEBCONFFILE" /var/lib/ucf/cache/:etc:clamav:clamd.conf
diff --git a/debian/clamav-base.templates b/debian/clamav-base.templates
index 3abe573..4e8ccd2 100644
--- a/debian/clamav-base.templates
+++ b/debian/clamav-base.templates
@@ -40,6 +40,16 @@ Type: boolean
Default: true
_Description: Gracefully handle left-over UNIX socket files?
+Template: clamav-base/LocalSocketGroup
+Type: string
+Default: clamav
+_Description: Group owner of clamd local (UNIX) socket:
+
+Template: clamav-base/LocalSocketMode
+Type: string
+Default: 666
+_Description: Creation mode for clamd local (UNIX) socket:
+
Template: clamav-base/TCPSocket
Type: string
Default: 3310
@@ -163,3 +173,25 @@ _Description: Groups for clamav-daemon (space-separated):
be able to access files owned by another user (e.g., in combination with
an MTA), then you will need to add clamd to the group for that piece of
software. Please see README.Debian in the clamav-base package for details.
+
+Template: clamav-base/Bytecode
+Type: boolean
+Default: false
+_Description: Do you want load bytecode from the database?
+
+Template: clamav-base/BytecodeSecurity
+Type: select
+__Choices: TrustSigned, Paranoid
+Default: TrustSigned
+_Description: Please choose the security level to apply to the bytecode:
+ .
+ - TrustSigned : trust bytecode loaded from signed virus database files,
+ but insert runtime safety checks for bytecode loaded
+ from unsigned sources
+ - Paranoid : always insert runtime checks
+
+Template: clamav-base/BytecodeTimeout
+Type: string
+Default: 60000
+_Description: Bytecode execution timeout in miliseconds:
+
diff --git a/debian/clamav-freshclam.postinst.in b/debian/clamav-freshclam.postinst.in
index 3a6dd1d..0b74d8b 100644
--- a/debian/clamav-freshclam.postinst.in
+++ b/debian/clamav-freshclam.postinst.in
@@ -91,6 +91,8 @@ case "$1" in
fi
db_metaget clamav-freshclam/NotifyClamd value || true
[ "$RET" = "true" ] && notify="/etc/clamav/clamd.conf"
+ db_metaget clamav-base/Bytecode value || true
+ bytecode="$RET"
slurp_config "$FRESHCLAMCONFFILE"
@@ -98,6 +100,7 @@ case "$1" in
[ -n "$DatabaseOwner" ] && [ "$DatabaseOwner" != "$dbowner" ] && dbowner="$DatabaseOwner"
[ -n "$UpdateLogFile" ] && [ "$UpdateLogFile" != "$udlogfile" ] && udlogfile="$UpdateLogFile"
[ -n "$MaxAttempts" ] && [ "$MaxAttempts" != "$maxatt" ] && maxatt="$MaxAttempts"
+ [ -n "$Bytecode" ] && [ "$Bytecode" != "$bytecode" ] && bytecode="$ByteCode"
# Set up cron method
if [ "$runas" = cron ]; then
@@ -166,6 +169,7 @@ ConnectTimeout $ConnectTimeout
ReceiveTimeout $ReceiveTimeout
ScriptedUpdates $ScriptedUpdates
CompressLocalDatabase $CompressLocalDatabase
+Bytecode $bytecode
EOF
if [ -n "$notify" ] ;then
@@ -212,6 +216,7 @@ EOF
[ -n "$LocalIPAddress" ] && echo "LocalIPAddress $LocalIPAddress" >> $DEBCONFILE
[ -n "$SubmitDetectionStats" ] && echo "SubmitDetectionStats $SubmitDetectionStats" >> $DEBCONFILE
[ -n "$DetectionStatsCountry" ] && echo "DetectionStatsCountry $DetectionStatsCountry" >> $DEBCONFILE
+ [ -n "$DetectionStatsHostID" ] && echo "DetectionStatsHostID $DetectionStatsHostID" >> $DEBCONFILE
[ -n "$SafeBrowsing" ] && echo "SafeBrowsing $SafeBrowsing" >> $DEBCONFILE
ucf_cleanup "$FRESHCLAMCONFFILE"
diff --git a/debian/clamav-milter.postinst.in b/debian/clamav-milter.postinst.in
index a39c19f..b4b4097 100644
--- a/debian/clamav-milter.postinst.in
+++ b/debian/clamav-milter.postinst.in
@@ -42,6 +42,10 @@ case "$1" in
miltersocket="$RET"
db_metaget clamav-milter/FixStaleSocket value || true
fixstalesocket="$RET"
+ db_metaget clamav-milter/MilterSocketGroup
+ miltersocketgrp="$RET"
+ db_metaget clamav-milter/MilterSocket
+ miltersocketmode="$RET"
db_metaget clamav-milter/User value || true
user="$RET"
db_metaget clamav-milter/AddGroups value || true
@@ -124,6 +128,9 @@ case "$1" in
[ -z "$MaxFileSize" ] && MaxFSize="25M"
[ -z "$LogFile" ] && [ -z "$logfile" ] && is_false "$logsyslog" && logfile=/var/log/clamav/clamav-milter.log
+ [ -z "$miltersocketgrp" ] && [ -n "$MilterSocketGroup" ] && miltersocketgrp="$MilterSocketGroup"
+ [ -z "$miltersocketmode" ] && [ -n "$MilterSocketMode" ] && miltersocketmode="$MilterSocketGroup"
+
if [ -z "$allowsupplementarygroups" ] && [ -n "$AllowSupplementaryGroups" ]; then
allowsupplementarygroups="$AllowSupplementaryGroups"
fi
@@ -198,7 +205,11 @@ EOF
echo "LogFileUnlock $logfileunlock" >> $DEBCONFFILE
echo "LogFileMaxSize $logfilemaxsize" >> $DEBCONFFILE
fi
-
+
+ [ -n "$miltersocketgrp" ] && echo "MilterSocketGroup $miltersocketgrp" >> $DEBCONFFILE
+ [ -n "$miltersocketmode" ] && echo "MilterSocketMode $miltersocketmode" >> $DEBCONFFILE
+ [ -n "$ReportHostname" ] && echo "ReportHostname $ReportHostname" >> $DEBCONFFILE
+
ucf_cleanup "$CLAMAVMILTERCONF"
ucf_upgrade_check "$CLAMAVMILTERCONF" "$DEBCONFFILE" /var/lib/ucf/cache/:etc:clamav:clamav-milter.conf
rm -f "$DEBCONFFILE"
diff --git a/debian/clamav-milter.templates b/debian/clamav-milter.templates
index a9bbd1c..a398bcc 100644
--- a/debian/clamav-milter.templates
+++ b/debian/clamav-milter.templates
@@ -34,6 +34,16 @@ Type: boolean
Default: true
_Description: Remove stale socket after unclean shutdown?
+Template: clamav-milter/MilterSocketGroup
+Type: string
+Default: clamav
+_Description: Group owner of clamav-milter local (UNIX) socket:
+
+Template: clamav-milter/MilterSocketMode
+Type: string
+Default: 666
+_Description: Creation mode for clamav-milter local (UNIX) socket:
+
Template: clamav-milter/User
Type: string
Default: clamav
diff --git a/debian/control b/debian/control
index 898684b..a615d20 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: utils
Priority: optional
Maintainer: ClamAV Team <pkg-clamav-devel at lists.alioth.debian.org>
Uploaders: Stephen Gran <sgran at debian.org>, Michael Meskes <meskes at debian.org>, Michael Tautschnig <mt at debian.org>
-Build-Depends: debhelper (>= 6.0.7), po-debconf, zlib1g-dev, libbz2-dev, libmilter-dev, libwrap0-dev, perl, bc, check, libtommath-dev, libltdl-dev, electric-fence, libncurses5-dev
+Build-Depends: debhelper (>= 6.0.7), po-debconf, zlib1g-dev, libbz2-dev, libmilter-dev, perl, bc, check, libtommath-dev, libltdl-dev, electric-fence, libncurses5-dev
Standards-Version: 3.8.3
Homepage: http://www.clamav.net/
diff --git a/debian/rules b/debian/rules
index 9bb6f84..c37ccb8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,7 @@ ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
else
CFLAGS += -O2
endif
+CXXFLAGS = ($CFLAGS)
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
STRIP_OPTS += dh_strip --dbg-package=clamav-dbg -p$@
@@ -78,7 +79,7 @@ ifeq ($(PO2DEBCONF),yes)
po2debconf -e utf8 debian/clamav-milter.templates.master > debian/clamav-milter.templates
endif
- $(MAKE) CFLAGS="${CFLAGS}" pkgdatadir=/var/lib/clamav/ all
+ $(MAKE) CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" pkgdatadir=/var/lib/clamav/ all
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-milter.init.in > debian/clamav-milter.init
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-milter.config.in > debian/clamav-milter.config
perl -pe 's~#COMMON-FUNCTIONS#~qx{cat debian/common_functions}~eg' < debian/clamav-milter.postinst.in > debian/clamav-milter.postinst
--
1.7.0.4
--ikeVEW9yuYc//A+q--
More information about the Pkg-clamav-devel
mailing list