[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#786513: jessie-pu: package fai/4.3.1+deb8u1



Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

I like to get fai 4.3.1+deb8u1 into the next point release for jessie.
It fixes the grave bug #785804 which could cause data loss and an
important bug #780144. Additionally the copyright date was changed in
two files.

Here's the full debdiff:
> diff debdiff fai_4.3.1.dsc fai_4.3.1+deb8u1.dsc

diff -Nru fai-4.3.1/bin/fai fai-4.3.1+deb8u1/bin/fai
--- fai-4.3.1/bin/fai	2014-07-11 16:00:50.000000000 +0200
+++ fai-4.3.1+deb8u1/bin/fai	2015-05-22 11:20:15.000000000 +0200
@@ -121,6 +121,14 @@
         fi
         cat /proc/kmsg >/dev/tty4 &
 
+        # fix IP address lifetime
+        ip -4 addr show | \
+            awk '/^[0-9]+: [^:]+:/ { iface = substr($2, 1, length($2) - 1); }
+                 /^  *inet [0-9.]*\/[0-9]* / && iface != "lo" { print $2, iface; }' | \
+        while read addr iface; do
+            ip -4 addr change "$addr" dev "$iface" valid_lft forever preferred_lft forever
+        done
+
         # start secure shell daemon for remote access
         [ "$flag_sshd" -a -x /usr/sbin/sshd ] && /usr/sbin/sshd
     fi
diff -Nru fai-4.3.1/bin/setup-storage fai-4.3.1+deb8u1/bin/setup-storage
--- fai-4.3.1/bin/setup-storage	2014-10-06 16:13:35.000000000 +0200
+++ fai-4.3.1+deb8u1/bin/setup-storage	2015-05-22 11:20:15.000000000 +0200
@@ -211,6 +211,7 @@
 $FAI::debug and print Dumper \%FAI::dev_children;
 
 # generate the command script
+&FAI::get_parted_version;
 &FAI::build_disk_commands;
 &FAI::build_raid_commands;
 &FAI::build_btrfs_commands;
diff -Nru fai-4.3.1/debian/changelog fai-4.3.1+deb8u1/debian/changelog
--- fai-4.3.1/debian/changelog	2014-11-19 16:06:11.000000000 +0100
+++ fai-4.3.1+deb8u1/debian/changelog	2015-05-22 11:20:16.000000000 +0200
@@ -1,3 +1,11 @@
+fai (4.3.1+deb8u1) jessie; urgency=high
+
+  * setup-storage: add support for parted 2.4, Closes: #785804
+  * fai: Fix IP address lifetime, Closes: #780144
+  * update copyright year to 2015
+
+ -- Thomas Lange <lange@debian.org>  Fri, 22 May 2015 11:07:24 +0200
+
 fai (4.3.1) unstable; urgency=low
 
   [Thomas Lange]
diff -Nru fai-4.3.1/lib/prcopyleft fai-4.3.1+deb8u1/lib/prcopyleft
--- fai-4.3.1/lib/prcopyleft	2013-12-26 12:42:19.000000000 +0100
+++ fai-4.3.1+deb8u1/lib/prcopyleft	2015-05-22 11:06:36.000000000 +0200
@@ -3,7 +3,7 @@
 #*********************************************************************
 #
 # This script is part of FAI (Fully Automatic Installation)
-# (c) 2003-2014 by Thomas Lange, lange@informatik.uni-koeln.de
+# (c) 2003-2015 by Thomas Lange, lange@informatik.uni-koeln.de
 # Universitaet zu Koeln
 #
 #*********************************************************************
@@ -17,7 +17,7 @@
              -------------------------------------------------
                    Fully Automatic Installation  -  FAI
 
-                   $FAI_VERSION   (c) 1999-2014
+                   $FAI_VERSION   (c) 1999-2015
                Thomas Lange  <lange@informatik.uni-koeln.de>
              -------------------------------------------------
 EOF
diff -Nru fai-4.3.1/lib/setup-storage/Commands.pm fai-4.3.1+deb8u1/lib/setup-storage/Commands.pm
--- fai-4.3.1/lib/setup-storage/Commands.pm	2014-10-17 16:35:07.000000000 +0200
+++ fai-4.3.1+deb8u1/lib/setup-storage/Commands.pm	2015-05-22 11:20:16.000000000 +0200
@@ -46,6 +46,12 @@
 ################################################################################
 
 my @preserved_raid = ();
+my $parted_version = 0;
+
+sub get_parted_version {
+  my ($major, $minor) = (`parted -v | head -1` =~ m/\s+(\d).(\d)/);
+  $parted_version = 1 if ($major >= 3 or ($major == 2 and $minor >= 4));
+}
 
 sub build_mkfs_commands {
 
@@ -623,8 +629,13 @@
           &FAI::push_command( "resize2fs /dev/$vg/$lv ${block_count}s",
             "e2fsck_f_resize_$vg/$lv", "lv_shrink_$vg/$lv" );
         } else {
-          &FAI::push_command( "parted -s /dev/$vg/$lv resize 1 0 " . $lv_size->{eff_size} .  "B",
-            "vg_enabled_$vg", "lv_shrink_$vg/$lv" );
+          if ($parted_version) {
+            &FAI::push_command( "parted -s /dev/$vg/$lv resizepart 1 " . $lv_size->{eff_size} .  "B",
+                                "vg_enabled_$vg", "lv_shrink_$vg/$lv" );
+          } else {
+           &FAI::push_command( "parted -s /dev/$vg/$lv resize 1 0 " . $lv_size->{eff_size} .  "B",
+                               "vg_enabled_$vg", "lv_shrink_$vg/$lv" );
+         }
         }
         &FAI::push_command( "lvresize -L $lvsize_mib $vg/$lv",
           "vg_enabled_$vg,lv_shrink_$vg/$lv", "lv_created_$vg/$lv" );
@@ -639,8 +650,13 @@
           &FAI::push_command( "resize2fs /dev/$vg/$lv ${block_count}s",
             "e2fsck_f_resize_$vg/$lv", "exist_/dev/$vg/$lv" );
         } else {
-          &FAI::push_command( "parted -s /dev/$vg/$lv resize 1 0 " . $lv_size->{eff_size} .  "B",
-            "vg_enabled_$vg,lv_grow_$vg/$lv", "exist_/dev/$vg/$lv" );
+          if ($parted_version) {
+            &FAI::push_command( "parted -s /dev/$vg/$lv resizepart 1 " . $lv_size->{eff_size} .  "B",
+                                "vg_enabled_$vg,lv_grow_$vg/$lv", "exist_/dev/$vg/$lv" );
+          } else {
+           &FAI::push_command( "parted -s /dev/$vg/$lv resize 1 0 " . $lv_size->{eff_size} .  "B",
+                                "vg_enabled_$vg,lv_grow_$vg/$lv", "exist_/dev/$vg/$lv" );
+         }
         }
       }
 
@@ -1192,11 +1208,16 @@
     ##     " ${block_count}s", "e2fsck_f_resize_" . &FAI::make_device_name($disk, $p),
     ##     "resized_" .  &FAI::make_device_name($disk, $p) );
     } else {
-      &FAI::push_command( "parted -s $disk resize $p ${start}B ${end}B",
-        "rebuilt_" . &FAI::make_device_name($disk, $p) . $deps, "resized_" .
-        &FAI::make_device_name($disk, $p) );
+      if ($parted_version) {
+        &FAI::push_command( "parted -s $disk resizepart $p ${end}B",
+                            "rebuilt_" . &FAI::make_device_name($disk, $p) . $deps, "resized_" .
+                            &FAI::make_device_name($disk, $p) );
+      } else {
+        &FAI::push_command( "parted -s $disk resize $p ${start}B ${end}B",
+                            "rebuilt_" . &FAI::make_device_name($disk, $p) . $deps, "resized_" .
+                            &FAI::make_device_name($disk, $p) );
+      }
     }
-
   }
 
   # write the disklabel again to drop the partition table and create a new one
diff -Nru fai-4.3.1/README fai-4.3.1+deb8u1/README
--- fai-4.3.1/README	2014-08-31 00:54:12.000000000 +0200
+++ fai-4.3.1+deb8u1/README	2015-05-22 11:06:43.000000000 +0200
@@ -53,4 +53,4 @@
 
 4096R/074BCDE4 B11E E327 3F6B 2DEB 528C  93DA 2BF8 D9FE 074B CDE4
 ----------------------------------------------------------------------
-Copyright (c) 1999-2014 Thomas Lange. All rights reserved.
+Copyright (c) 1999-2015 Thomas Lange. All rights reserved.


-- 
regards Thomas


Reply to: