ports/56474: [patch] update security/amavisd to current version and unbreak

Mark Linimon linimon at lonesome.com
Fri Sep 5 03:30:07 UTC 2003


The following reply was made to PR ports/56474; it has been noted by GNATS.

From: Mark Linimon <linimon at lonesome.com>
To: FreeBSD-gnats-submit at FreeBSD.org, freebsd-ports-bugs at FreeBSD.org
Cc:  
Subject: Re: ports/56474: [patch] update security/amavisd to current version and unbreak
Date: Thu, 4 Sep 2003 22:29:39 -0500

 Sigh.  I forgot to include the fact that one of the patch files has now
 been incorporated into the upstream version.  While I was at it I
 went ahead and pacified portlint somewhat.
 
 diff -ruN amavisd.dist/Makefile amavisd/Makefile
 --- amavisd.dist/Makefile	Thu Sep  4 22:27:17 2003
 +++ amavisd/Makefile	Thu Sep  4 22:23:15 2003
 @@ -6,12 +6,12 @@
  #
  
  PORTNAME=	amavisd
 -PORTVERSION=	20020531
 -PORTREVISION=	1
 +PORTVERSION=	0.1
 +PORTEPOCH=	1
  CATEGORIES=	security
  MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
  MASTER_SITE_SUBDIR=	amavis
 -DISTNAME=	${PORTNAME}-snapshot-${PORTVERSION}
 +DISTNAME=	${PORTNAME}-${PORTVERSION}
  
  MAINTAINER=	ports at FreeBSD.org
  COMMENT=	The daemonized version of amavis-perl
 @@ -21,17 +21,17 @@
  		${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj \
  		${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar \
  		${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Archive/Tar.pm:${PORTSDIR}/archivers/p5-Archive-Tar 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/IO/AtomicFile.pm:${PORTSDIR}/devel/p5-IO-stringy 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/MIME/Body.pm:${PORTSDIR}/mail/p5-MIME-Tools 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Mail/Address.pm:${PORTSDIR}/mail/p5-Mail-Tools 
 \
 -		
 ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net
 +		
 ${SITE_PERL}/${PERL_VER}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib 
 \
 +		
 ${SITE_PERL}/${PERL_VER}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib 
 \
 +		
 ${SITE_PERL}/${PERL_VER}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 
 \
 +		
 ${SITE_PERL}/${PERL_VER}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog 
 \
 +		
 ${SITE_PERL}/${PERL_VER}/Archive/Tar.pm:${PORTSDIR}/archivers/p5-Archive-Tar 
 \
 +		
 ${SITE_PERL}/${PERL_VER}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip 
 \
 +		
 ${SITE_PERL}/${PERL_VER}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF 
 \
 +		${SITE_PERL}/${PERL_VER}/IO/AtomicFile.pm:${PORTSDIR}/devel/p5-IO-stringy \
 +		${SITE_PERL}/${PERL_VER}/MIME/Body.pm:${PORTSDIR}/mail/p5-MIME-Tools \
 +		${SITE_PERL}/${PERL_VER}/Mail/Address.pm:${PORTSDIR}/mail/p5-Mail-Tools \
 +		${SITE_PERL}/${PERL_VER}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net
  RUN_DEPENDS=	${BUILD_DEPENDS}
  
  GNU_CONFIGURE=	yes
 diff -ruN amavisd.dist/distinfo amavisd/distinfo
 --- amavisd.dist/distinfo	Thu Sep  4 22:27:22 2003
 +++ amavisd/distinfo	Thu Sep  4 21:56:00 2003
 @@ -1 +1 @@
 -MD5 (amavisd-snapshot-20020531.tar.gz) = 0d97a1c227c9934b19c0ff283ccb3561
 +MD5 (amavisd-0.1.tar.gz) = 432a32bfc6d473564f49028b540f53ad
 diff -ruN amavisd.dist/files/patch-amavis::amavisd.in 
 amavisd/files/patch-amavis::amavisd.in
 --- amavisd.dist/files/patch-amavis::amavisd.in	Thu Sep  4 22:15:18 2003
 +++ amavisd/files/patch-amavis::amavisd.in	Wed Dec 31 18:00:00 1969
 @@ -1,91 +0,0 @@
 ---- amavis/amavisd.in.orig	Sun Aug 25 23:45:58 2002
 -+++ amavis/amavisd.in	Sun Aug 25 23:50:56 2002
 -@@ -123,7 +123,7 @@
 - #
 - # Client/server/daemon related
 - 
 --my ($socketname, $parentpid, $tmppid) = ("@sockname@", 0, 0);
 -+my ($socketname, $parentpid, $diedpid, $tmppid) = ("@sockname@", 0, 0, 0);
 - 
 - # flag to indicate compressing file format
 - my $some_compression = 0;
 -@@ -172,15 +172,19 @@
 - #
 - # SIGCHLD handler
 - sub deadbabe {
 --    for (;;) {
 --	my $childpid = wait;
 --	last if $childpid < 0;
 --	$child_status{$childpid} = $?;
 --	$child_etime{$childpid} = time;
 --    }
 -+    do {
 -+      $tmppid = waitpid(-1, &WNOHANG);
 -+    } while ($tmppid > 0);
 -+    $diedpid = 1;
 -     $SIG{CHLD} = \&deadbabe;
 -+# stupid sys5 resets the signal when called - but only -after- the wait...
 - }
 --$SIG{CHLD} = \&deadbabe;
 -+# Catch any dead child process
 -+
 -+# If IGNORE leaves zombies behind on your system,
 -+# switch the comments between the two lines below
 -+# $SIG{CHLD} = \&deadbabe;
 -+$SIG{CHLD} = 'IGNORE';
 - 
 - # may need to do more - eg. if logging changes, close/reopen syslog/log file
 - # rethink - handler should be simple
 -@@ -240,15 +244,16 @@
 - sub main_loop() {
 -     my ($inbuff, $mpid, $a);
 - 
 --    for (;;) {
 --	$a = accept(Client,Server);
 -+    while (($a = accept(Client,Server)) || $diedpid) {
 - 
 - 	do_log(3,"enter accept loop");
 --	report_children();
 --
 --	# if the accept returned purely because of a caught
 --	# sigchld, then continue
 --	    next unless $a;
 -+        # now we start the repeating loop...
 -+        if ($diedpid) {
 -+            $diedpid = 0;
 -+            # if the accept returned purely because of a caught sigchld
 -+            # then continue
 -+            next unless (defined($a));
 -+        }
 - 
 - 	if (!defined($mpid = fork)) {
 - 	    shutdown Server, 2;
 -@@ -257,12 +262,12 @@
 - 	}
 - 
 - 	# if we're the parent, just go back to the accept loop
 --	if ($mpid) {   # we are the parent
 --	    $child_stime{$mpid} = time;
 --	    next;  # just go back to the accept loop
 --	}
 --	$SIG{CHLD} = undef;
 --	do_log(3,"forked off -- child [$$] running...");
 -+        next if ($mpid);
 -+  
 -+        do_log(3,"forked off -- child running...");
 -+  
 -+        $SIG{CHLD} = 'DEFAULT';
 -+        # reset sigchild - we don't want to mess up $? for the virus scanner
 - 
 - 	#
 - 	# Receive TEMPDIR/SENDER/RCPTS/LDA/LDAARGS from client
 -@@ -1326,9 +1331,6 @@
 - 	do_log(3,"removed pid file");
 - 	unlink("$socketname");
 - 	do_log(3,"removed socket");
 --	while (wait>=0) {};  # must wait for children (if still alive)
 --			     # to get their status by the $SIG{CHLD} handler
 --	report_children();
 -     }
 - 
 -     ($DO_SYSLOG eq "yes") ? closelog() : $log->close();
 



More information about the freebsd-ports-bugs mailing list