[27117] in Source-Commits
/svn/athena r25956 - in trunk/athena/bin/hostinfo: . debian debian/source
daemon@ATHENA.MIT.EDU (Victor Vasiliev)
Sat Apr 27 15:44:46 2013
Date: Sat, 27 Apr 2013 15:44:39 -0400
From: Victor Vasiliev <vasilvv@MIT.EDU>
Message-Id: <201304271944.r3RJidQo027976@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: vasilvv
Date: 2013-04-27 15:44:39 -0400 (Sat, 27 Apr 2013)
New Revision: 25956
Added:
trunk/athena/bin/hostinfo/debian/install
trunk/athena/bin/hostinfo/debian/manpages
trunk/athena/bin/hostinfo/debian/source/
trunk/athena/bin/hostinfo/debian/source/format
trunk/athena/bin/hostinfo/hostinfo
Removed:
trunk/athena/bin/hostinfo/Makefile.in
trunk/athena/bin/hostinfo/configure.in
trunk/athena/bin/hostinfo/hostinfo.pl
Modified:
trunk/athena/bin/hostinfo/debian/changelog
trunk/athena/bin/hostinfo/debian/control
trunk/athena/bin/hostinfo/debian/rules
Log:
In hostinfo:
* Switch to dh7
* Use debian/install file instead of autoconf+make
* Bump upstream version
* Switch to source format 3.0 (quilt)
Modified: trunk/athena/bin/hostinfo/debian/changelog
===================================================================
--- trunk/athena/bin/hostinfo/debian/changelog 2013-04-26 16:26:02 UTC (rev 25955)
+++ trunk/athena/bin/hostinfo/debian/changelog 2013-04-27 19:44:39 UTC (rev 25956)
@@ -1,10 +1,17 @@
-debathena-hostinfo (10.0.0-0debathena3) UNRELEASED; urgency=low
+debathena-hostinfo (10.0.1-0debathena1) UNRELEASED; urgency=low
+ [ Jonathan Reed ]
* Bump debian/compat to 6
* Switch from control.in to control (Trac: #561)
* Bump Standards-Version to 3.9.3
* Bump compat level to 7
+ [ Victor Vasiliev ]
+ * Switch to dh7
+ * Use debian/install file instead of autoconf+make
+ * Bump upstream version
+ * Switch to source format 3.0 (quilt)
+
-- Jonathan Reed <jdreed@mit.edu> Wed, 03 Apr 2013 13:59:46 -0400
debathena-hostinfo (10.0.0-0debathena2) unstable; urgency=low
Modified: trunk/athena/bin/hostinfo/debian/control
===================================================================
--- trunk/athena/bin/hostinfo/debian/control 2013-04-26 16:26:02 UTC (rev 25955)
+++ trunk/athena/bin/hostinfo/debian/control 2013-04-27 19:44:39 UTC (rev 25956)
@@ -2,13 +2,13 @@
Section: debathena/net
Priority: extra
Maintainer: Debathena Project <debathena@mit.edu>
-Build-Depends: cdbs, debhelper, dh-buildinfo, autoconf
+Build-Depends: debhelper (>= 7)
Standards-Version: 3.9.3
Package: debathena-hostinfo
Architecture: all
Provides: hostinfo
-Depends: ${misc:Depends}, bind9-host
+Depends: ${perl:Depends}, ${misc:Depends}, bind9-host
Description: A utility to ask an Internet nameserver for host information
The hostinfo utility fetches the Domain Name System records for the
specified host name and prints them.
Added: trunk/athena/bin/hostinfo/debian/install
===================================================================
--- trunk/athena/bin/hostinfo/debian/install (rev 0)
+++ trunk/athena/bin/hostinfo/debian/install 2013-04-27 19:44:39 UTC (rev 25956)
@@ -0,0 +1 @@
+hostinfo usr/bin
Added: trunk/athena/bin/hostinfo/debian/manpages
===================================================================
--- trunk/athena/bin/hostinfo/debian/manpages (rev 0)
+++ trunk/athena/bin/hostinfo/debian/manpages 2013-04-27 19:44:39 UTC (rev 25956)
@@ -0,0 +1 @@
+hostinfo.1
Modified: trunk/athena/bin/hostinfo/debian/rules
===================================================================
--- trunk/athena/bin/hostinfo/debian/rules 2013-04-26 16:26:02 UTC (rev 25955)
+++ trunk/athena/bin/hostinfo/debian/rules 2013-04-27 19:44:39 UTC (rev 25956)
@@ -1,8 +1,5 @@
#!/usr/bin/make -f
-DEB_AUTO_UPDATE_AUTOCONF = 2.50
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/autotools.mk
+%:
+ dh $@
-clean::
- rm -f configure
Added: trunk/athena/bin/hostinfo/debian/source/format
===================================================================
--- trunk/athena/bin/hostinfo/debian/source/format (rev 0)
+++ trunk/athena/bin/hostinfo/debian/source/format 2013-04-27 19:44:39 UTC (rev 25956)
@@ -0,0 +1 @@
+3.0 (quilt)
Copied: trunk/athena/bin/hostinfo/hostinfo (from rev 25955, trunk/athena/bin/hostinfo/hostinfo.pl)
===================================================================
--- trunk/athena/bin/hostinfo/hostinfo (rev 0)
+++ trunk/athena/bin/hostinfo/hostinfo 2013-04-27 19:44:39 UTC (rev 25956)
@@ -0,0 +1,155 @@
+#!/usr/bin/perl
+# $Id: hostinfo.pl,v 1.5 2002-06-11 21:12:59 jweiss Exp $
+
+# Copyright 1998 by the Massachusetts Institute of Technology.
+#
+# Permission to use, copy, modify, and distribute this
+# software and its documentation for any purpose and without
+# fee is hereby granted, provided that the above copyright
+# notice appear in all copies and that both that copyright
+# notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in
+# advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+# M.I.T. makes no representations about the suitability of
+# this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+
+# This is a simple DNS querying program. It was originally written in
+# C, but has been rewritten as a wrapper around "host" in the BIND
+# distribution.
+
+$hostprog = "/usr/bin/host";
+
+$long_output = $show_host = $show_addr = $show_hinfo = $show_mx = 1;
+$server = "";
+
+sub usage {
+ print STDERR "Usage: hostinfo <options> <host-names-or-addresses>\n";
+ print STDERR " -h: output only hostname\n";
+ print STDERR " -a: output only address\n";
+ print STDERR " -i: output only host info record\n";
+ print STDERR " -m: output only mx record\n";
+ print STDERR " -q: disable additional query for hinfo & mx\n";
+ print STDERR " -ns <server>: ask specified name server\n";
+ exit 1;
+}
+
+if (! @ARGV) {
+ &usage();
+}
+
+while (@ARGV) {
+ my $arg = shift(@ARGV);
+ if ($arg eq "-h") {
+ $show_host = 1;
+ $long_output = $show_addr = $show_hinfo = $show_mx = 0;
+ next;
+ } elsif ($arg eq "-a") {
+ $show_addr = 1;
+ $long_output = $show_host = $show_hinfo = $show_mx = 0;
+ next;
+ } elsif ($arg eq "-i") {
+ $show_hinfo = 1;
+ $long_output = $show_host = $show_addr = $show_mx = 0;
+ next;
+ } elsif ($arg eq "-m") {
+ $show_mx = 1;
+ $long_output = $show_host = $show_addr = $show_hinfo = 0;
+ next;
+ } elsif ($arg eq "-q") {
+ $long_output = $show_host = $show_addr = 1;
+ $show_hinfo = $show_mx = 0;
+ next;
+ } elsif ($arg eq "-ns") {
+ $server = shift(@ARGV) || &usage();
+ if ($server =~ /[^a-zA-Z0-9.-]/) {
+ print STDERR "Bad hostname '$server'.\n";
+ &usage();
+ }
+ system "$hostprog -t a $server > /dev/null 2>&1";
+ if ($?) {
+ print STDERR "No such host '$server'.\n\n";
+ $server = "";
+ }
+ next;
+ } elsif ($arg =~ /^-/) {
+ &usage();
+ }
+
+ if ($arg =~ /[^a-zA-Z0-9.-]/) {
+ print STDERR "Bad hostname '$arg'.\n";
+ next;
+ }
+
+ $host = $hinfo = "";
+ @addr = @mx = ();
+
+ if ($show_mx) {
+ open(HOST, "$hostprog -t mx '$arg' $server 2>&1 |");
+ while (<HOST>) {
+ if (/mail is handled .*by [ \d]*([^ ]*)$/) {
+ push(@mx, $1);
+ }
+ }
+ close(HOST);
+ }
+ chomp (@mx);
+
+ open(HOST, "$hostprog -t a '$arg' $server 2>&1 |");
+ while (<HOST>) {
+ if (/(.*) has address (.*)$/) {
+ $host = $1;
+ push(@addr, $2);
+ } elsif ( /domain name pointer (.*)$/) {
+ $host = $1;
+ push(@addr, $arg);
+ } else {
+ $error = $error . $_;
+ }
+ }
+ close(HOST);
+
+ if (!$host) {
+ if ($error =~ /Host not found\./) {
+ print STDERR "No such host '$arg'.\n";
+ } elsif ($error =~ /try again|No recovery/) {
+ print STDERR "Cannot resolve name '$arg' due to network difficulties.\n";
+ } elsif (!@mx) {
+ print STDERR "No such host '$arg'.\n";
+ } elsif (!$show_mx) {
+ print STDERR "No address for '$arg'.\n";
+ }
+ next unless ($show_mx && @mx);
+ }
+
+ if ($show_hinfo) {
+ open(HOST, "$hostprog -t hinfo '$host' $server 2>&1 |");
+ while (<HOST>) {
+ if (/host information (.*)$/) {
+ $hinfo = $1;
+ $hinfo =~ s: :/:;
+ }
+ }
+ }
+
+ if ($long_output) {
+ print "Desired host:\t$arg\n";
+ if ($host) {
+ print "Official name:\t$host\n";
+ }
+ foreach (@addr) { print "Host address:\t$_\n"; }
+ print "Host info:\t$hinfo\n" if $show_hinfo && $hinfo;
+ foreach (@mx) { print "MX address:\t$_\n" if $show_mx; }
+ } elsif ($show_host && $host) {
+ print "$host\n";
+ } elsif ($show_addr && @addr) {
+ foreach (@addr) { print "$_\n"; }
+ } elsif ($show_hinfo && $hinfo) {
+ print "$hinfo\n";
+ } elsif ($show_mx && @mx) {
+ foreach (@mx) { print "$_\n"; }
+ }
+
+ print "\n" if $long_output && @ARGV;
+}