pf-tools/pf-tools-0.33-stable: 4 new changesets

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Thu Mar 7 14:37:47 UTC 2013


details:   http://hg.debian.org/hg/pf-tools/pf-tools-0.33-stable/rev/7bf4eadf0564
changeset: 552:7bf4eadf0564
user:      Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>
date:      Thu Mar 07 15:12:18 2013 +0100
description:
Remove vmether black magic "feature": when mk_dhcp is run in a VM it causes duplicate hosts definitions in the DHCP configuration, which makes isc-dhcpd simply refuse to start. This "feature" hasn't been used for ~10 years anyway.

details:   http://hg.debian.org/hg/pf-tools/pf-tools-0.33-stable/rev/54959760dc28
changeset: 553:54959760dc28
user:      Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>
date:      Thu Mar 07 15:32:26 2013 +0100
description:
* Don't transform eth3 into eth1:9999 behind our back if no eth3 is available.
* Don't activate the weird UML things (most notably the interface remapping)
  when actually running under QEMU.

details:   http://hg.debian.org/hg/pf-tools/pf-tools-0.33-stable/rev/77d660d6254e
changeset: 554:77d660d6254e
user:      Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>
date:      Thu Mar 07 15:37:21 2013 +0100
description:
releasing version 0.33.25-1

details:   http://hg.debian.org/hg/pf-tools/pf-tools-0.33-stable/rev/f417f3a1fb52
changeset: 555:f417f3a1fb52
user:      Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>
date:      Thu Mar 07 15:37:21 2013 +0100
description:
tagging version debian-0.33.25-1

diffstat:

 .hgtags            |   1 +
 debian/changelog   |  13 +++++++++++++
 lib/PFTools/Net.pm |  47 ++++++-----------------------------------------
 sbin/mk_dhcp       |  21 ---------------------
 tools/xenlaunch    |   4 ----
 5 files changed, 20 insertions(+), 66 deletions(-)

diffs (158 lines):

diff -r 76afd2e0da7b -r f417f3a1fb52 .hgtags
--- a/.hgtags	Wed Oct 26 13:57:31 2011 +0200
+++ b/.hgtags	Thu Mar 07 15:37:21 2013 +0100
@@ -1,3 +1,4 @@
 c8b620892c7dd95374cd81b205e1c323cbada277 0.33.21-1
 82b295cfe2174230e2cb1cf3965970917ed92d75 0.33.22-1
 87ffc2caf7c2ab8f0e3e6ebb8fcac2af66d04673 0.33.24-1
+77d660d6254e2bac8641180d38881ce14f518634 debian-0.33.25-1
diff -r 76afd2e0da7b -r f417f3a1fb52 debian/changelog
--- a/debian/changelog	Wed Oct 26 13:57:31 2011 +0200
+++ b/debian/changelog	Thu Mar 07 15:37:21 2013 +0100
@@ -1,3 +1,16 @@
+pf-tools (0.33.25-1) unstable; urgency=low
+
+  * Remove vmether black magic "feature": when mk_dhcp is run in a VM it
+    causes duplicate hosts definitions in the DHCP configuration, which makes
+    isc-dhcpd simply refuse to start. This "feature" hasn't been used for ~10
+    years anyway.
+  * Don't transform eth3 into eth1:9999 behind our back if no eth3 is
+    available.
+  * Don't activate the weird UML things (most notably the interface remapping)
+    when actually running under QEMU.
+
+ -- Thomas Parmelan <tom+pf-tools at ankh.fr.EU.org>  Thu, 07 Mar 2013 15:36:57 +0100
+
 pf-tools (0.33.24-1) unstable; urgency=low
 
   * Work around Linux >= 2.6.39 adding a final slash to an NFS mount source in
diff -r 76afd2e0da7b -r f417f3a1fb52 lib/PFTools/Net.pm
--- a/lib/PFTools/Net.pm	Wed Oct 26 13:57:31 2011 +0200
+++ b/lib/PFTools/Net.pm	Thu Mar 07 15:37:21 2013 +0100
@@ -215,14 +215,7 @@
 	my $net = $nam;
 	$net =~ s/^[^\.]+\.//;
 	if ( $net =~ /$dhcpvlanregex/ ) {
-	    if ( defined $M->{'zone'}->{$nam}->{'ether'} ) {
-		return ( $M->{'ifup'}->{$nam},
-		    $M->{'zone'}->{$nam}->{'ether'} );
-	    }
-	    else {
-		return ( $M->{'ifup'}->{$nam},
-		    $M->{'zone'}->{$nam}->{'vmether'} );
-	    }
+            return ( $M->{'ifup'}->{$nam}, $M->{'zone'}->{$nam}->{'ether'} );
 	}
 
     }
@@ -1077,27 +1070,13 @@
 		}
 	    }
 
-	    my $goteth1 = 0;
-
 	    # Traitement de chaque interface (ou reseau)
 	    foreach $i ( sort { cmpif( $a, $b ) }
 		keys %{ $S->{'interface'} } )
 	    {
 		my $nam;
 
-		if ( $i eq 'eth1' ) {
-		    $goteth1 = 1;
-		}
-
 		$j = $i;
-		if ( $j =~ m/^eth3/ && $NOETH3 ) {
-		    if ($goteth1) {
-			$j = 'eth1' . $' . ':9999';
-		    }
-		    else {
-			$j = 'eth1' . $';
-		    }
-		}
 
 		# Definition de l'entree DNS pour cette interface
 		my $lan ;
@@ -1169,24 +1148,11 @@
 		
 		$M->{'zone'}->{$nam}->{'TYPE'} = 'A';
 
-		# Adresse ethernet (pas forcement avec dhcp, eg tftp)
-		if ( defined( $S->{'ether'}->{$mnamindexnum} ) ) {
-		    $M->{'zone'}->{$nam}->{'ether'}
-			= $S->{'ether'}->{$mnamindexnum};
-		}
-
-		if ( defined( $S->{'vmether'}->{$mnamindexnum} ) ) {
-		    $M->{'zone'}->{$nam}->{'vmether'}
-			= $S->{'vmether'}->{$mnamindexnum};
-		}
-		elsif ( defined( $S->{'ether'}->{$mnamindexnum} ) ) {
-		    $M->{'zone'}->{$nam}->{'vmether'} = '00:50:56:' . sprintf(
-			"%02x:%02x:%02x",
-			unpack( "L", $mnam ) % 255,    # L : long unsigned,
-			unpack( "L", reverse $mnam ) % 255,
-			$start + $ipindex
-		    );
-		}
+                # Adresse Ethernet
+                if ( defined( $S->{'ether'}->{$mnamindexnum} ) ) {
+                    $M->{'zone'}->{$nam}->{'ether'}
+                        = $S->{'ether'}->{$mnamindexnum};
+                }
 
 		# Definition de l'alias DNS principal
 		if ( defined $S->{'shortname'} && $S->{'shortname'} eq $lan ) {
@@ -2207,7 +2173,6 @@
 
 elsif ( `grep -e '^model name[ 	]*: QEMU Virtual CPU' /proc/cpuinfo 2>/dev/null` ne '') {
     $PFTOOLS_VARS->{'QEMU'} = 1;
-    $PFTOOLS_VARS->{'UML'} = 1; # not true, but close. Understand "UML" as "generic virtualisation"
 }
 
 elsif ( `LANG=C LC_ALL=C /sbin/ifconfig eth0 2>/dev/null | awk '/HWaddr/ {print \$5}'`
diff -r 76afd2e0da7b -r f417f3a1fb52 sbin/mk_dhcp
--- a/sbin/mk_dhcp	Wed Oct 26 13:57:31 2011 +0200
+++ b/sbin/mk_dhcp	Thu Mar 07 15:37:21 2013 +0100
@@ -121,27 +121,6 @@
 
 			    print "}\n\n";
 			}
-			if ( defined( $M->{'zone'}->{$nam}->{'vmether'} ) && ( $PFTOOLS_VARS->{'VMWARE'} || $PFTOOLS_VARS->{'UML'} ) ) {
-			    printf( "host %s {\n", $nam2 );
-			    printf( "  hardware ethernet %s;\n", $M->{'zone'}->{$nam}->{'vmether'} );
-			    printf( "  fixed-address %s.%s;\n", $nam, $Z->{'SOA'}->{'name'} );
-
-			    if ( defined( $M->{'vmwfilename'} ) && $M->{'vmwfilename'} ne "" ) {
-				printf( "  filename \"%s\";\n", $M->{'vmwfilename'} );
-			    }
-
-			    if ( defined( $M->{'pxelinuxconf'} ) && $M->{'pxelinuxconf'} ne "" ) {
-				printf( "  option option-209 \"%s\";\n", $M->{'pxelinuxconf'} );
-			    }
-
-			    my @dns = Get_dns_from_zone( $Z, $M, $hostnum );
-
-			    if ( $#dns >= 0 && defined $dns[0] ) {
-				printf( "  option domain-name-servers %s;\n", join( ", ", @dns ) );
-			    }
-
-			    print "}\n\n";
-			}
 		    }
 		}
 	    }
diff -r 76afd2e0da7b -r f417f3a1fb52 tools/xenlaunch
--- a/tools/xenlaunch	Wed Oct 26 13:57:31 2011 +0200
+++ b/tools/xenlaunch	Thu Mar 07 15:37:21 2013 +0100
@@ -68,10 +68,6 @@
     my @ret;
     my $mac = Config_Key( $privatenetwork, $famille . "%%", "ether." . $num );
     unless ($mac) {
-	$mac = Config_Key( $privatenetwork, $famille . "%%",
-	    "vmether." . $num );
-    }
-    unless ($mac) {
 	warn "Can't find first if mac addr ($famille, $num)";
     }
 



More information about the pf-tools-commits mailing list