Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jun 2014 19:01:04 +0200
From:      Michael Grimm <trashcan@odo.in-berlin.de>
To:        ports@FreeBSD.org
Subject:   Re: Net::DNS 0.77 / resolv.conf with comments (was: FreeBSD Port: spamassassin-3.4.0_11)
Message-ID:  <46F18299-AF9A-4696-92E7-B235586F5ACA@odo.in-berlin.de>
In-Reply-To: <F4076F22-B662-4B82-9367-97269F0557EF@odo.in-berlin.de>
References:  <F868D930-1D30-478C-A5EC-2F0F7653E926@webweaving.org> <20140624100737.GT2586@home.opsec.eu> <B907A9B7-66DD-4441-844F-F0CC7EF6C611@webweaving.org> <046FCFFD-811E-4B71-9A91-731FE1C6D44F@odo.in-berlin.de> <F4076F22-B662-4B82-9367-97269F0557EF@odo.in-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28.06.2014, at 15:50, Michael Grimm <trashcan@odo.in-berlin.de> =
wrote:

> spamassassin-3.4.0_11 and p5-Net-DNS-0.76 worked as expected. After =
upgrading to p5-Net-DNS-0.77 I ran into an issue that looked similar to =
the one reported above. spamd couldn't be daemonized at start-up (timed =
out). After some investigations I found the reason why spamd didn't =
start after upgrading to p5-Net-DNS-0.77:
>=20
> /etc/resolv.conf
> 	nameserver	1.2.3.4		# some comment
> 	nameserver	8.8.8.8		# another comment
>=20
> That has been accepted by p5-Net-DNS-0.76, but for p5-Net-DNS-0.77 I =
had to remove the comments:
>=20
> /etc/resolv.conf
> 	nameserver	1.2.3.4
> 	nameserver	8.8.8.8
>=20
> After removing those comments spamassassin-3.4.0_11 and =
p5-Net-DNS-0.77 run as expected.
>=20
> Is this a bug or a feature?

Well, it seems to be a feature :-(

--- /usr/local/lib/perl5/site_perl/5.16/mach/Net/DNS/Resolver/Base.pm	=
2014-06-13 23:02:31.000000000 +0200
+++ Base.pm--0.76-way-to-read-resov.conf	2014-06-28 =
18:31:06.492446355 +0200
@@ -234,6 +234,10 @@
 	local $_;
=20
 	while (<FILE>) {
+		s/\s*[;#].*$//;					# strip =
comment
+		next unless m/\S/;				# skip =
empty line
+		s/^\s+//;					# strip =
leading space
+
 		/^nameserver/ && do {
 			my ( $keyword, @ip ) =3D split;
 			push @ns, map { $_ eq '0' ? '0.0.0.0' : $_ } =
@ip;

Applying this patch, and p5-Net-DNS-0.77 will deal with trailing =
comments in resolv.conf keywords.

Regards,
Michael=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46F18299-AF9A-4696-92E7-B235586F5ACA>