Date: Fri, 19 Dec 2003 20:26:19 +0900 (JST) From: Fumihiko Kimura <jfkimura@yahoo.co.jp> To: FreeBSD-gnats-submit@FreeBSD.org Cc: sergei@FreeBSD.org Subject: ports/60395: FIX and update ports: qmail-scanner Message-ID: <200312191126.hBJBQJPh032501@star.radio.gr.jp> Resent-Message-ID: <200312191130.hBJBUGAv013889@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 60395 >Category: ports >Synopsis: FIX and update ports: qmail-scanner >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 19 03:30:15 PST 2003 >Closed-Date: >Last-Modified: >Originator: Fumihiko Kimura >Release: FreeBSD 4.9-RELEASE i386 >Organization: >Environment: >Description: It became abnormal to install qmail-scanner into my PC. A revision was necessary about the following items. 1.Addition of QMAILSCAN_QUEUEBINARY Appointment of -- qmail-queue-binary became /usr/local/bin. I tried to change it to needing it with /var/qmail/bin as a default. 2.A change of a patch file When there is not appointment of a soft-headed mission, mkdir becomes an error in FreeBSD 4.9 (Perl version 5.005_03) in qmail-scanner-queue.template. I revised it to solve this. (like a permission mode 0755) 3.A change of pkg-plist I revise that there is the file makes '1' at the time of deinstall. 4.A change of pkg-install Because a script did not work by a lack of authority justly, I added a hand. (because qmail-scanner-queue-version.txt quarantine-attachments.db was not generated) And, In addition, I added the following for convenience. * Addition of QMAILSCAN_LANG It is convenient to update it in portupgrade. Just like: MAILSCAN_LANG=ja_JP.EUC When this ports does not do setuid for /usr/bin/suidperl when it is carried out in Perl version 5.005_03, I become an introduction error. This is thing previous work business and thinks that one to display a necessary thing by a message is preferable. # chmod 4711 /usr/bin/suidperl >How-To-Repeat: [FreeBSD 4.9 RELEASE] Sending standard test message - no viruses... Not enough arguments for mkdir at /usr/local/bin/qmail-scanner-queue.pl line 299, near ""$scandir/tmp") " BEGIN not safe after errors--compilation aborted at /usr/local/bin/qmail-scanner-queue.pl line 1017. qmail-inject: fatal: qq temporary problem (#4.3.0) Bad error. qmail-inject died *** Error code 1 etc.. >Fix: Check: FreeBSD 4.9-RELEASE FreeBSD 5.1-RELEASE ==== Begin here diff -urN qmail-scanner/Makefile qmail-scanner-update/Makefile --- qmail-scanner/Makefile Thu Dec 11 03:40:34 2003 +++ qmail-scanner-update/Makefile Thu Dec 18 23:55:28 2003 @@ -47,6 +47,14 @@ .if defined(QMAILSCAN_SPAMSTOSUFFIX) CONFIGURE_ARGS+= --spams-tosuffix "${QMAILSCAN_SPAMSTOSUFFIX}" .endif +.if defined(QMAILSCAN_LANG) +CONFIGURE_ARGS+= --lang "${QMAILSCAN_LANG}" +.endif +.if defined(QMAILSCAN_QUEUEBINARY) +CONFIGURE_ARGS+= --qmail-queue-binary "${QMAILSCAN_QUEUEBINARY)}/qmail-queue" +.else +CONFIGURE_ARGS+= --qmail-queue-binary "${QMAIL_DIR}/bin/qmail-queue" +.endif SPOOLDIR= ${PREFIX}/qmailscan PLIST_SUB= SPOOLDIR="${SPOOLDIR:S,${PREFIX}/,,}" diff -urN qmail-scanner/files/patch-qmail-scanner-queue.template qmail-scanner-update/files/patch-qmail-scanner-queue.template --- qmail-scanner/files/patch-qmail-scanner-queue.template Thu Dec 11 03:40:35 2003 +++ qmail-scanner-update/files/patch-qmail-scanner-queue.template Fri Dec 19 00:51:00 2003 @@ -1,5 +1,5 @@ --- qmail-scanner-queue.template.orig Thu Oct 16 02:05:10 2003 -+++ qmail-scanner-queue.template Thu Dec 11 14:28:48 2003 ++++ qmail-scanner-queue.template Thu Dec 19 17:48:00 2003 @@ -85,11 +85,17 @@ $qsmsgid=tolower("$V_HEADER-message-id") @@ -21,14 +21,19 @@ #Array of local domains that are checked against for #deciding whether or not to send recipient alerts to -@@ -294,6 +300,7 @@ if (! -d "$scandir/tmp") { +@@ -290,10 +296,11 @@ + umask(0077); + + if (! -d "$scandir/tmp") { +- mkdir("$scandir/tmp") || &error_condition("cannot create $scandir/tmp - $!"); ++ mkdir("$scandir/tmp",0755) || &error_condition("cannot create $scandir/tmp - $!"); } - + my $quarantine_event=0; +my $spam_event=0; - + my $file_id = &uniq_id(); - + @@ -415,7 +422,18 @@ eval { &email_quarantine_report; } else { diff -urN qmail-scanner/pkg-install qmail-scanner-update/pkg-install --- qmail-scanner/pkg-install Thu Dec 11 03:40:34 2003 +++ qmail-scanner-update/pkg-install Thu Dec 18 23:57:28 2003 @@ -30,7 +30,8 @@ ${MKDIR} -p ${SPOOLDIR}/tmp # Mod and owner - ${CHOWN} ${GU_NAME}:${GU_NAME} ${PREFIX}/bin/qmail-scanner-queue.pl + ${CHOWN} -R ${GU_NAME}:${GU_NAME} ${SPOOLDIR} +# ${CHOWN} ${GU_NAME}:${GU_NAME} ${PREFIX}/bin/qmail-scanner-queue.pl ${CHMOD} 4755 ${PREFIX}/bin/qmail-scanner-queue.pl # Initialize diff -urN qmail-scanner/pkg-plist qmail-scanner-update/pkg-plist --- qmail-scanner/pkg-plist Thu Dec 11 03:40:34 2003 +++ qmail-scanner-update/pkg-plist Thu Dec 18 23:52:23 2003 @@ -2,13 +2,13 @@ bin/qmail-scanner-queue.pl %%SPOOLDIR%%/quarantine-attachments.sample %%SPOOLDIR%%/quarantine-attachments.txt -@unexec rmdir %%SPOOLDIR%%/archives/cur 2>1 || true -@unexec rmdir %%SPOOLDIR%%/archives/new 2>1 || true -@unexec rmdir %%SPOOLDIR%%/archives/tmp 2>1 || true -@unexec rmdir %%SPOOLDIR%%/archives 2>1 || true -@unexec rmdir %%SPOOLDIR%%/quarantine/cur 2>1 || true -@unexec rmdir %%SPOOLDIR%%/quarantine/new 2>1 || true -@unexec rmdir %%SPOOLDIR%%/quarantine/tmp 2>1 || true -@unexec rmdir %%SPOOLDIR%%/quarantine 2>1 || true -@unexec rmdir %%SPOOLDIR%%/tmp 2>1 || true -@unexec rmdir %%SPOOLDIR%% 2>1 || true +@unexec rmdir %%SPOOLDIR%%/archives/cur 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/archives/new 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/archives/tmp 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/archives 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/quarantine/cur 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/quarantine/new 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/quarantine/tmp 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/quarantine 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%%/tmp 2>/dev/null || true +@unexec rmdir %%SPOOLDIR%% 2>/dev/null || true ==== END here >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312191126.hBJBQJPh032501>