debian/0000755000000000000000000000000012260735335007174 5ustar debian/changelog0000644000000000000000000000314212260735335011046 0ustar libbind-confparser-perl (0.95-4) unstable; urgency=low * Team upload [ Xavier Guimard ] * Take over for the Debian Perl Group on maintainer's request (http://bugs.debian.org/677732#10) * Update source format to 3.0 (quilt) * Add debian/watch file * Update debian/copyright (years and format) * Bump Standards-Version to 3.9.4 * Bump debhelper compatibility to 8 * Update bind9 patch in quilt format * Update debian/rules to use "dh $@" [ Salvatore Bonaccorso ] * Change Vcs-Git to canonical URI (git://anonscm.debian.org) * Change search.cpan.org based URIs to metacpan.org based URIs [ Axel Beckert ] * Bump debhelper compatibility to 9 + Update versioned debhelper build-dependency accordingly + Gets rid of dh_pysupport deprecation warning * Bump Standards-Version to 3.9.5 (no changes) * Update spelling-error.patch to fix one more spelling error -- Axel Beckert Wed, 01 Jan 2014 07:51:09 +0100 libbind-confparser-perl (0.95-3) unstable; urgency=low * Preliminary support for some version 9 configuration files. * Change Section: from interpreters to perl * debhelper compat v4 -- Ivan Kohler Mon, 29 Mar 2004 16:54:08 -0800 libbind-confparser-perl (0.95-2) unstable; urgency=low * binary-arch vs. binary-indep (closes: Bug#153363) * debian/copyright pedantry (closes: Bug#153390) -- Ivan Kohler Sat, 7 Sep 2002 06:50:00 -0700 libbind-confparser-perl (0.95-1) unstable; urgency=low * Initial Release (closes: Bug#143718). -- Ivan Kohler Sat, 20 Apr 2002 01:14:58 -0700 debian/compat0000644000000000000000000000000212260734526010373 0ustar 9 debian/control0000644000000000000000000000205212260734542010575 0ustar Source: libbind-confparser-perl Maintainer: Debian Perl Group Uploaders: Ivan Kohler , Xavier Guimard Section: perl Priority: optional Build-Depends: debhelper (>= 9~), perl Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libbind-confparser-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libbind-confparser-perl.git Homepage: https://metacpan.org/release/BIND-Conf_Parser Package: libbind-confparser-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends} Description: Parser class for BIND configuration files BIND::Conf_Parser implements a virtual base class for parsing BIND (Berkeley Internet Name Domain) server version 8 (and sometimes version 9) configuration files ("named.conf"). The parsing methods shown in the synopsis perform syntactic analysis only. As each meaningful semantic 'chunk' is parsed, a callback method is invoked with the parsed information. debian/copyright0000644000000000000000000000267412260733020011125 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: BIND-Conf_Parser Source: https://metacpan.org/release/BIND-Conf_Parser/ Upstream-Contact: Philip Guenther Files: * Copyright: 1998-1999 Philip Guenther License: other This program is free software; redistribution and modification in any form is explicitly permitted provided that all versions retain this copyright notice and the following disclaimer. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Files: debian/* Copyright: 2002, 2004, Ivan Kohler 2012, Xavier Guimard License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/patches/0000755000000000000000000000000012260735141010616 5ustar debian/patches/bind9-compatibility.patch0000644000000000000000000001130012260733020015500 0ustar Description: Bind 9 compatibility Author: Ivan Kohler Bug: https://rt.cpan.org/Ticket/Display.html?id=82217 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=82217 Reviewed-By: Xavier Guimard Last-Update: 2012-12-22 --- a/README +++ b/README @@ -3,12 +3,12 @@ DESCRIPTION This module allows a script to understand the contents of a BIND - version 8 named.conf file. Why would you want to parse your - /etc/named.conf file? Well, let's say you're a sysadmin and you've - gotten tired of mismatches between your DNS forward and reverse - zones, and you want a tool that'll check your zone files for - inconsistencies and typos. How's that tool going to get the - complete list of zone files? Tah da, enter this module, stage + version 8 (and sometimes version 9) named.conf file. Why would you + want to parse your /etc/named.conf file? Well, let's say you're a + sysadmin and you've gotten tired of mismatches between your DNS + forward and reverse zones, and you want a tool that'll check your + zone files for inconsistencies and typos. How's that tool going to + get the complete list of zone files? Tah da, enter this module, stage right! The verify_zones script included with this module does exactly the above, and may even work at your site. @@ -19,7 +19,9 @@ The name of this module is perhaps not the best. Suggestions are welcome. - This revision matches BIND version 8.2.2. + This revision matches BIND version 8.2.2. Some capability to not + throw fatal exceptions when parsing version 9 configuration files + has been added, but it is far from complete. THANKS The design of this module was inspired by Gisle Aas's HTML::Parser @@ -56,5 +58,7 @@ ftp://ftp.gac.edu/pub/guenther/BIND-Conf_Parser-0.95.tar.gz AUTHOR - BIND-Conf_Parser was created by Philip Guenther + BIND-Conf_Parser was created by Philip Guenther . + Some very preliminary changes were made to parse a few version 9 + configuration files by Ivan Kohler . --- a/lib/BIND/Conf_Parser.pm +++ b/lib/BIND/Conf_Parser.pm @@ -427,6 +427,20 @@ $self->expect(';', "to finish logging declaration"); } +sub parse_listen_on($$) { + my($self, $mess) = @_; + $self->expect([ [ 'port' ], '{' ], $mess); + my($port); + if ($self->{_token} eq WORD) { + $self->expect(NUMBER, "following `port'"); + $port = 0 + $self->{_data}; + $self->expect('{', $mess); + } else { + $port = 53; + } + return [$port, $self->parse_addrmatchlist($mess, 1)]; +} + my(%opt_table) = ( "version" => STRING, "directory" => STRING, @@ -470,19 +484,8 @@ "allow-transfer" => \&parse_addrmatchlist, "allow-recursion" => \&parse_addrmatchlist, "blackhole" => \&parse_addrmatchlist, - "listen-on" => sub { - my($self, $mess) = @_; - $self->expect([ [ 'port' ], '{' ], $mess); - my($port); - if ($self->{_token} eq WORD) { - $self->expect(NUMBER, "following `port'"); - $port = 0 + $self->{_data}; - $self->expect('{', $mess); - } else { - $port = 53; - } - return [$port, $self->parse_addrmatchlist($mess, 1)]; - }, + "listen-on" => \&parse_listen_on, + "listen-on-v6" => \&parse_listen_on, "query-source" => sub { my($self, $mess) = @_; my($port, $address) = (0, 0); @@ -935,10 +938,10 @@ =head1 DESCRIPTION C implements a virtual base class for parsing BIND -(Berkeley Internet Name Domain) server version 8 configuration files -("named.conf"). The parsing methods shown in the synopsis perform -syntactic analysis only. As each meaningful semantic 'chunk' is -parsed, a callback method is invoked with the parsed information. +(Berkeley Internet Name Domain) server version 8 (and sometimes version 9) +configuration files ("named.conf"). The parsing methods shown in the +synopsis perform syntactic analysis only. As each meaningful semantic +'chunk' is parsed, a callback method is invoked with the parsed information. The following methods are the public entry points for the base class: =over 4 @@ -1065,7 +1068,9 @@ and understands the statements, options, and forms of that version. Since the BIND developers have only made upward compatible changes to the syntax, C will correctly parse valid config files -for previous versions of BIND. +for previous versions of BIND. Some support for simple version 9 +configuration files has been added, but there are probably new statements +that are not yet recognized. A C object is a blessed anonymous hash. In an attempt to prevent modules trampling on each other I propose that any debian/patches/series0000644000000000000000000000005712260733020012027 0ustar bind9-compatibility.patch spelling-error.patch debian/patches/spelling-error.patch0000644000000000000000000000262112260735141014604 0ustar Description: Spelling error patch Author: Xavier Guimard Author: Axel Beckert Forwarded: no Last-Update: 2014-01-01 Index: libbind-confparser-perl/lib/BIND/Conf_Parser.pm =================================================================== --- libbind-confparser-perl.orig/lib/BIND/Conf_Parser.pm 2014-01-01 07:47:29.748931491 +0100 +++ libbind-confparser-perl/lib/BIND/Conf_Parser.pm 2014-01-01 07:47:44.289008410 +0100 @@ -1058,7 +1058,7 @@ Some callbacks are invoked before the semicolon that terminates the corresponding syntactic form is actually recognized. It is therefore possible for a syntax error to not be detected until after a callback -is invoked for the presumably completly parsed form. No attempt is +is invoked for the presumably completely parsed form. No attempt is made to delay the invocation of callbacks to the completion of toplevel statements. @@ -1074,7 +1074,7 @@ A C object is a blessed anonymous hash. In an attempt to prevent modules trampling on each other I propose that any -subclass that requires persistant state between calls to the callback +subclass that requires persistent state between calls to the callback routines (handle_foo()) and other subclass methods should prefix its keys names with its own name separated by _'s. For example, a hypothetical C module would keep data under debian/rules0000755000000000000000000000003612260733020010240 0ustar #!/usr/bin/make -f %: dh $@ debian/source/0000755000000000000000000000000012260733020010461 5ustar debian/source/format0000644000000000000000000000001412260733020011667 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000015612260733566010233 0ustar version=3 https://metacpan.org/release/BIND-Conf_Parser .*/BIND-Conf_Parser-([\.\d]+)\.(?:tar\.gz|tar|tgz)$