Hello,

Attached are 2 patches, upgrading parted from 1.6.22 to 1.8.8.

parted188-Makefile.patch:
I had to add --disable-Werror flag to configure,
to get parted to compile on debian Lenny.

parted188-install-pl.patch:
Change regex to reflect the 'new' output from parted.
I had to process install.pl with unix2dos, as install.pl has a bit of  both 
dos and unix line endings.
I think install.pl should have dos endings??

Patches are build-tested on debian Lenny and Etch.
Both builds are tested in vmware for now.
--- unattended-dl/install/dosbin/install.pl	2008-03-30 20:27:58.000000000 +0200
+++ unattended/install/dosbin/install.pl	2008-03-30 20:27:53.000000000 +0200
@@ -512,15 +512,18 @@
     my ($ext_start, $ext_end);
 
     # Read the current partition table.
-    my $cmd = 'parted -s /dev/dsk print';
+    my $cmd = 'parted -s /dev/dsk unit MB print';
     open PARTED, "$cmd|"
         or die "Unable to fork: $^E";
 
+    my $bexpr = '(\d+[.|,]?\d*)[B|k|M|G]\w?'; #regex-part for disksize-numbers
+
     while (my $line = <PARTED>) {
-        my ($start, $end, $parttype) =
-            ($line =~ /^\d+\s+(\d+\.\d{3})\s+(\d+\.\d{3})\s+(primary|logical|extended)/);
+        my ($start, $end, $partsize, $parttype) =
+            ($line =~ m/^\s?\d+\s+$bexpr\s+$bexpr\s+$bexpr\s+(primary|logical|extended)/);
         defined $start && defined $end && defined $parttype
             or next;
+
 print "DEBUG: PARTED_VAR START:$start END:$end PARTTYPE:$parttype \n" ;
         if ($logical && $parttype eq 'extended') {
             # If multiple extended partitions (weird), use the first.
--- unattended/linuxboot/Makefile-bf-parted188	2008-03-30 17:02:37.000000000 +0200
+++ unattended/linuxboot/Makefile	2008-03-30 17:16:56.000000000 +0200
@@ -23,7 +23,7 @@
 mysql=mysql-5.0.51a
 nano=nano-2.0.7
 ncurses=ncurses-5.6
-parted=parted-1.6.22
+parted=parted-1.8.8
 pciutils=pciutils-2.2.10
 pcmcia-cs=pcmcia-cs-3.2.8
 perl=perl-5.10.0
@@ -448,12 +448,14 @@
 
 ## parted
 
+#FIXME: --disable-Werror added to compile parted 1.8.8 with gcc 4.2.1 and later
+#       This will probably be fixed in a later version of parted
 $(parted)/parted/.libs/parted: fakeinclude/stdio.h stage1/lib/libuuid.so \
 				stage1/lib/libdl.so
 	cd $(parted)						\
 	&& CFLAGS="$(fakelib_cflags) -I$(cwd)/$(e2fsprogs)/lib"	\
 		./configure --disable-nls --without-readline	\
-			--build=i586-linux			\
+		--build=i586-linux --disable-Werror		\
 	&& make
 	[ -e $@ ]
 
@@ -971,8 +973,7 @@
 	http://mirror.services.wisc.edu/mysql/Downloads/MySQL-5.0/)
 $(call download_rule, $(nano), tar.gz, http://www.nano-editor.org/dist/v2.0/)
 $(call download_rule, $(ncurses), tar.gz, http://ftp.gnu.org/gnu/ncurses/)
-$(call download_rule, $(parted), tar.gz, 			\
-        http://unattended.cvs.sourceforge.net/*checkout*/unattended/unattended/linuxboot/misc/)
+$(call download_rule, $(parted), tar.gz, http://ftp.gnu.org/gnu/parted/)
 $(call download_rule, $(pciutils), tar.bz2,			\
 	http://ftp.all.kernel.org/pub/software/utils/pciutils/)
 $(call download_rule, $(pcmcia-cs), tar.gz,			\
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
unattended-devel mailing list
unattended-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-devel

Reply via email to