seting up ports

Dominic Mitchell dom at happygiraffe.net
Tue Jun 3 18:21:27 BST 2003


--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Jun 03, 2003 at 06:01:51PM +0100, Daniel Finnimore wrote:
> Hi Dom
> 
> I give below the output of the "make" executed in /usr/ports/mail/qmail. The
> only patch I have is qmail-dns-patch.txt.
> 
> You may use the following build options:
> 
> WITH_QMAILQUEUE_PATCH=yes enable patch to qmail to run a QMAILQUEUE
>     program instead of bin/qmail-queue
> WITH_BIG_TODO_PATCH=yes  enable big_todo qmail patch
> WITH_BIG_CONCURRENCY_PATCH=yes enable patch to qmail to
>     use a concurrency greater than 240
> WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT=NUMBER
>     (default NUMBER=)
>     set this to a value reasonable for
>     your system if you use the patch
> #
> 
> >> qmail-103.patch doesn't seem to exist in /usr/ports/distfiles/.
> >> Attempting to fetch from http://www.ckdhr.com/ckd/.
> >> Attempting to fetch from
> ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/lioux/.
> >> Attempting to fetch from
> ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/lioux/.
> >> Attempting to fetch from
> ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/lioux/.
> >> Attempting to fetch from
> ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/lioux/.
> >> Attempting to fetch from
> ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/lioux/.
> >> Attempting to fetch from
> ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
> >> Couldn't fetch it - please try to retrieve this
> >> port manually into /usr/ports/distfiles/ and try again.
> *** Error code 1
> 
> Stop in /usr/ports/mail/qmail.
> 
> How do I modify the "make" instruction to get over this problem??

You don't need to.  The only problem is that you can't (for whatever
readon) download one of the files that the port needs.  I've managed to
download it successfully, and it's only 2K, so I've attached it to this
email.  If you save it as /usr/ports/distfiles/qmail-103.patch and try
running make again to see what happens.

BTW, it looks like you've only captured stdout in the above log.  It's
helpful to include stderr as well.  Try running make like this:

% make 2>&1 | tee MAKELOG

-Dom

--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="qmail-103.patch"

--- qmail-1.03/dns.c.103	Mon Aug 17 16:06:58 1998
+++ qmail-1.03/dns.c	Wed Aug 26 16:28:56 1998
@@ -21,10 +21,12 @@
 static unsigned short getshort(c) unsigned char *c;
 { unsigned short u; u = c[0]; return (u << 8) + c[1]; }
 
-static union { HEADER hdr; unsigned char buf[PACKETSZ]; } response;
+static struct { unsigned char *buf; } response;
+static int responsebuflen = 0;
 static int responselen;
 static unsigned char *responseend;
 static unsigned char *responsepos;
+static u_long saveresoptions;
 
 static int numanswers;
 static char name[MAXDNAME];
@@ -45,18 +47,33 @@
  errno = 0;
  if (!stralloc_copy(&glue,domain)) return DNS_MEM;
  if (!stralloc_0(&glue)) return DNS_MEM;
- responselen = lookup(glue.s,C_IN,type,response.buf,sizeof(response));
+ if (!responsebuflen)
+  if (response.buf = (unsigned char *)alloc(PACKETSZ+1))
+   responsebuflen = PACKETSZ+1;
+  else return DNS_MEM;
+
+ responselen = lookup(glue.s,C_IN,type,response.buf,responsebuflen);
+ if ((responselen >= responsebuflen) ||
+     (responselen > 0 && (((HEADER *)response.buf)->tc)))
+  {
+   if (responsebuflen < 65536)
+    if (alloc_re(&response.buf, responsebuflen, 65536))
+     responsebuflen = 65536;
+    else return DNS_MEM;
+    saveresoptions = _res.options;
+    _res.options |= RES_USEVC;
+    responselen = lookup(glue.s,C_IN,type,response.buf,responsebuflen);
+    _res.options = saveresoptions;
+  }
  if (responselen <= 0)
   {
    if (errno == ECONNREFUSED) return DNS_SOFT;
    if (h_errno == TRY_AGAIN) return DNS_SOFT;
    return DNS_HARD;
   }
- if (responselen >= sizeof(response))
-   responselen = sizeof(response);
  responseend = response.buf + responselen;
  responsepos = response.buf + sizeof(HEADER);
- n = ntohs(response.hdr.qdcount);
+ n = ntohs(((HEADER *)response.buf)->qdcount);
  while (n-- > 0)
   {
    i = dn_expand(response.buf,responseend,responsepos,name,MAXDNAME);
@@ -66,7 +83,7 @@
    if (i < QFIXEDSZ) return DNS_SOFT;
    responsepos += QFIXEDSZ;
   }
- numanswers = ntohs(response.hdr.ancount);
+ numanswers = ntohs(((HEADER *)response.buf)->ancount);
  return 0;
 }
 

--45Z9DzgjV8m4Oswq--




More information about the Ukfreebsd mailing list