[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Fri Feb 26 15:21:21 UTC 2010


 .prev-version                         |    2 
 NEWS                                  |    7 ++
 bootstrap                             |   89 +++++++++++++++++++++++++---------
 cfg.mk                                |    2 
 gnulib                                |    2 
 libparted/labels/dos.c                |    6 +-
 tests/Makefile.am                     |    1 
 tests/t0202-gpt-pmbr.sh               |    4 -
 tests/t2400-dos-hfs-partition-type.sh |   48 ++++++++++++++++++
 9 files changed, 133 insertions(+), 28 deletions(-)

New commits:
commit fa26620b66550b84119ea98718d256d32abe8f6c
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Feb 26 15:29:58 2010 +0100

    post-release administrivia
    
    * NEWS: Add header line for next release.
    * .prev-version: Record previous version.
    * cfg.mk (old_NEWS_hash): Auto-update.

diff --git a/.prev-version b/.prev-version
index 879b416..8bbe6cf 100644
--- a/.prev-version
+++ b/.prev-version
@@ -1 +1 @@
-2.1
+2.2
diff --git a/NEWS b/NEWS
index e363e99..3eb2ea7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 GNU parted NEWS                                    -*- outline -*-
 
+* Noteworthy changes in release ?.? (????-??-??) [?]
+
+
 * Noteworthy changes in release 2.2 (2010-02-26) [stable]
 
 ** Changes in behavior
diff --git a/cfg.mk b/cfg.mk
index 26c3b92..dc68a03 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -41,7 +41,7 @@ local-checks-to-skip = \
 # Now that we have better (check.mk) tests, make this the default.
 export VERBOSE = yes
 
-old_NEWS_hash = 3667631deb6fa6200514ce8811be7801
+old_NEWS_hash = 71570fda344ec276ea5c9ff0ab82fdce
 
 include $(srcdir)/dist-check.mk
 

commit f8aad5c00e4708da2dc67f9f771d1b5a82b88ad9
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Feb 26 15:25:29 2010 +0100

    version 2.2
    
    * NEWS: Record release date.

diff --git a/NEWS b/NEWS
index c390fcd..e363e99 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
 GNU parted NEWS                                    -*- outline -*-
 
-* Noteworthy changes in release ?.? (????-??-??) [?]
+* Noteworthy changes in release 2.2 (2010-02-26) [stable]
 
 ** Changes in behavior
 

commit 9ffd7eb93f6027a35ff854f7518947c91c086136
Author: Curtis  Gedak <gedakc at gmail.com>
Date:   Fri Feb 26 15:07:29 2010 +0100

    dos: set HFS/HFS+ partition identifier to proper value
    
    The correct value for an "hfs" partition identifier is 0xAF.
    Previously the partition identifier was incorrectly set to 0x83.
    * libparted/labels/dos.c (PARTITION_HFS): Define.
    (msdos_partition_set_system): Use it.

diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index dce35b2..b83bcc2 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -86,6 +86,7 @@ static const char MBR_BOOT_CODE[] = {
 #define PARTITION_LINUX		0x83
 #define PARTITION_LINUX_EXT	0x85
 #define PARTITION_LINUX_LVM	0x8e
+#define PARTITION_HFS		0xaf
 #define PARTITION_SUN_UFS	0xbf
 #define PARTITION_DELL_DIAG	0xde
 #define PARTITION_GPT		0xee
@@ -1354,7 +1355,10 @@ msdos_partition_set_system (PedPartition* part,
 		   || !strcmp (fs_type->name, "hpfs")) {
 		dos_data->system = PARTITION_NTFS;
 		dos_data->system |= dos_data->hidden ? PART_FLAG_HIDDEN : 0;
-	} else if (!strcmp (fs_type->name, "sun-ufs"))
+	} else if (!strcmp (fs_type->name, "hfs")
+		   || !strcmp (fs_type->name, "hfs+"))
+		dos_data->system = PARTITION_HFS;
+	else if (!strcmp (fs_type->name, "sun-ufs"))
 		dos_data->system = PARTITION_SUN_UFS;
 	else if (is_linux_swap (fs_type->name))
 		dos_data->system = PARTITION_LINUX_SWAP;

commit 4da2a2c02c0a86224d0465f10fd24aa625c285e6
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Feb 26 14:53:33 2010 +0100

    tests: exercise today's HFS partition type fix
    
    * tests/t2400-dos-hfs-partition-type.sh: New script.
    * tests/Makefile.am: Add it.
    * NEWS (Bug fixes): Mention it.

diff --git a/NEWS b/NEWS
index 53f83ce..c390fcd 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,10 @@ GNU parted NEWS                                    -*- outline -*-
   Parted no longer uses a physical sector size of 0 or of any other
   value smaller than the logical sector size.
 
+  dos: creating an HFS or HFS+ partition in an msdos partition table
+  used to set the partition type to 0x83.  That is wrong.  The required
+  number is 0xaf, and that is what is used now.
+
   gpt: read-only operation could clobber MBR part of hybrid GPT+MBR table
   [bug introduced in parted-2.1]
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8159a32..0cc7279 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -22,6 +22,7 @@ TESTS = \
   t2100-mkswap.sh \
   t2200-dos-label-recog.sh \
   t2300-dos-label-extended-bootcode.sh \
+  t2400-dos-hfs-partition-type.sh \
   t3000-resize-fs.sh \
   t4000-sun-raid-type.sh \
   t4001-sun-vtoc.sh \
diff --git a/tests/t2400-dos-hfs-partition-type.sh b/tests/t2400-dos-hfs-partition-type.sh
new file mode 100644
index 0000000..1b1ffe6
--- /dev/null
+++ b/tests/t2400-dos-hfs-partition-type.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Ensure that an HFS partition in a dos table gets the right ID
+
+# Copyright (C) 2010 Free Software Foundation, Inc.
+
+# 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 3 of the License, or
+# (at your option) any later version.
+
+# This program 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.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if test "$VERBOSE" = yes; then
+  set -x
+  parted --version
+fi
+
+: ${srcdir=.}
+. $srcdir/t-lib.sh
+
+dev=loop-file
+ss=$sector_size_
+n_sectors=8000
+
+fail=0
+
+dd if=/dev/null of=$dev bs=$ss seek=$n_sectors || framework_failure
+
+# create a GPT partition table
+parted -s $dev mklabel msdos \
+  mkpart pri hfs  2048s 4095s \
+  mkpart pri hfs+ 4096s 6143s > out 2>&1 || fail=1
+# expect no output
+compare out /dev/null || fail=1
+
+# Extract the "type" byte of the first partition.
+od -An -j450 -tx1 -N1 $dev  > out || fail=1
+od -An -j466 -tx1 -N1 $dev >> out || fail=1
+printf ' af\n af\n' > exp || fail=1
+compare out exp || fail=1
+
+Exit $fail

commit 15b05d910328f4120f5ded3b81f5f29e861f8b31
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Feb 26 14:47:52 2010 +0100

    tests: gpt-pmbr: don't ignore stdout comparison result
    
    * tests/t0202-gpt-pmbr.sh: Fail if we get unexpected output.

diff --git a/tests/t0202-gpt-pmbr.sh b/tests/t0202-gpt-pmbr.sh
index acfb2b6..100194a 100755
--- a/tests/t0202-gpt-pmbr.sh
+++ b/tests/t0202-gpt-pmbr.sh
@@ -33,7 +33,7 @@ dd if=/dev/null of=$dev bs=1 seek=1M || framework_failure
 # create a GPT partition table
 parted -s $dev mklabel gpt > out 2>&1 || fail=1
 # expect no output
-compare out /dev/null
+compare out /dev/null || fail=1
 
 # Fill the first $bootcode_size bytes with 0's.
 # This affects only the protective MBR, so doesn't affect validity of gpt table.
@@ -45,7 +45,7 @@ parted -s $dev p || fail=1
 # create a GPT partition table on top of the existing one.
 parted -s $dev mklabel gpt > out 2>&1 || fail=1
 # expect no output
-compare out /dev/null
+compare out /dev/null || fail=1
 
 # Extract the first $bootcode_size Bytes after GPT creation
 dd if=$dev of=after bs=1c count=$bootcode_size > /dev/null 2>&1 || fail=1

commit e7aef7686a3786552b5e24370ac58e02c4d49783
Author: Jim Meyering <meyering at redhat.com>
Date:   Thu Feb 25 18:32:58 2010 +0100

    build: update gnulib submodule to latest
    
    * bootstrap: Copy from gnulib.

diff --git a/bootstrap b/bootstrap
index 7136875..bf163c7 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,4 +1,6 @@
 #! /bin/sh
+# Print a version string.
+scriptversion=2010-02-25.16; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -17,7 +19,15 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Written by Paul Eggert.
+# Originally written by Paul Eggert.  The canonical version of this
+# script is maintained as build-aux/bootstrap in gnulib, however, to
+# be useful to your project, you should place a copy of it under
+# version control in the top-level directory of your project.  The
+# intent is that all customization can be done with a bootstrap.conf
+# file also maintained in your version control; gnulib comes with a
+# template build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnulib at gnu.org.
 
 nl='
 '
@@ -43,7 +53,7 @@ Options:
                           sources reside.  Use this if you already
                           have gnulib sources on your machine, and
                           do not want to waste your bandwidth downloading
-                          them again.
+                          them again.  Defaults to \$GNULIB_SRCDIR.
  --copy                   Copy files instead of creating symbolic links.
  --force                  Attempt to bootstrap even if the sources seem
                           not to have been checked out.
@@ -71,6 +81,7 @@ gnulib_modules=
 gnulib_files=
 
 # A function to be called after everything else in this script.
+# Override it via your own definition in bootstrap.conf.
 bootstrap_epilogue() { :; }
 
 # The command to download all .po files for a specified domain into
@@ -132,7 +143,8 @@ XGETTEXT_OPTIONS='\\\
  --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
 '
 
-# Package bug report address for gettext files
+# Package bug report address and copyright holder for gettext files
+COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
 MSGID_BUGS_ADDRESS=bug-$package at gnu.org
 
 # Files we don't want to import.
@@ -159,7 +171,6 @@ vc_ignore=auto
 # die otherwise.
 find_tool ()
 {
-  # Find sha1sum, named gsha1sum on MacPorts.
   find_tool_envvar=$1
   shift
   find_tool_names=$@
@@ -187,8 +198,8 @@ find_tool ()
   eval "export $find_tool_envvar"
 }
 
-# Find sha1sum, named gsha1sum on MacPorts.
-find_tool SHA1SUM sha1sum gsha1sum
+# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6.
+find_tool SHA1SUM sha1sum gsha1sum shasum
 
 # Override the default configuration, if necessary.
 # Make sure that bootstrap.conf is sourced from the current directory
@@ -313,10 +324,20 @@ get_version() {
   $app --version >/dev/null 2>&1 || return 1
 
   $app --version 2>&1 |
-  sed -n 's/[^0-9.]*\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/p
+  sed -n '# extract version within line
+          s/.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
+          t done
+
+          # extract version at start of line
+          s/^\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
           t done
+
           d
+
           :done
+          #the following essentially does s/5.005/5.5/
+          s/\.0*\([1-9]\)/.\1/g
+          p
           q'
 }
 
@@ -379,7 +400,7 @@ fi
 
 cleanup_gnulib() {
   status=$?
-  rm -fr gnulib
+  rm -fr "$gnulib_path"
   exit $status
 }
 
@@ -387,6 +408,8 @@ git_modules_config () {
   test -f .gitmodules && git config --file .gitmodules "$@"
 }
 
+gnulib_path=`git_modules_config submodule.gnulib.path`
+
 # Get gnulib files.
 
 case ${GNULIB_SRCDIR--} in
@@ -396,30 +419,43 @@ case ${GNULIB_SRCDIR--} in
     git submodule init || exit $?
     git submodule update || exit $?
 
-  elif [ ! -d gnulib ]; then
+  elif [ ! -d "$gnulib_path" ]; then
     echo "$0: getting gnulib files..."
 
     trap cleanup_gnulib 1 2 13 15
 
     git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
-    git clone $shallow git://git.sv.gnu.org/gnulib ||
+    git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
       cleanup_gnulib
 
     trap - 1 2 13 15
   fi
-  GNULIB_SRCDIR=gnulib
+  GNULIB_SRCDIR=$gnulib_path
   ;;
 *)
-  # Redirect the gnulib submodule to the directory on the command line
-  # if possible.
+  # Use GNULIB_SRCDIR as a reference.
   if test -d "$GNULIB_SRCDIR"/.git && \
         git_modules_config submodule.gnulib.url >/dev/null; then
-    git submodule init
-    GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
-    git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
     echo "$0: getting gnulib files..."
-    git submodule update || exit $?
-    GNULIB_SRCDIR=gnulib
+    if git submodule --help|grep reference > /dev/null; then
+      # Prefer the one-liner available in git 1.6.4 or newer.
+      git submodule update --init --reference "$GNULIB_SRCDIR" \
+        "$gnulib_path" || exit $?
+    else
+      # This fallback allows at least git 1.5.5.
+      if test -f "$gnulib_path"/gnulib-tool; then
+        # Since file already exists, assume submodule init already complete.
+        git submodule update || exit $?
+      else
+        # Older git can't clone into an empty directory.
+        rmdir "$gnulib_path" 2>/dev/null
+        git clone --reference "$GNULIB_SRCDIR" \
+          "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
+          && git submodule init && git submodule update \
+          || exit $?
+      fi
+    fi
+    GNULIB_SRCDIR=$gnulib_path
   fi
   ;;
 esac
@@ -625,7 +661,7 @@ slurp() {
       for excluded_file in $excluded_files; do
         test "$dir/$file" = "$excluded_file" && continue 2
       done
-      if test $file = Makefile.am; then
+      if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
         copied=$copied${sep}$gnulib_mk; sep=$nl
         remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
         sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
@@ -643,7 +679,7 @@ slurp() {
           rm -f $dir/$file
           sed '
             /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
-              AC_DEFUN([AM_INTL_SUBDIR], [
+              AC_DEFUN([AM_INTL_SUBDIR], [])
             /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
               AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
             $a\
@@ -732,7 +768,7 @@ find "$m4_base" "$source_base" \
 # Reconfigure, getting other files.
 
 # Skip autoheader if it's not needed.
-grep '^[	 ]*AC_CONFIG_HEADERS\>' configure.ac >/dev/null ||
+grep -E '^[	 ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
   AUTOHEADER=true
 
 for command in \
@@ -776,7 +812,8 @@ if test $with_gettext = yes; then
   rm -f po/Makevars
   sed '
     /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
-    /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
+    /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
+    /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
     /^XGETTEXT_OPTIONS *=/{
       s/$/ \\/
       a\
@@ -806,3 +843,11 @@ fi
 bootstrap_epilogue
 
 echo "$0: done.  Now you can run './configure'."
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/gnulib b/gnulib
index 2709233..80cd995 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 2709233ead439b582d82af48bd25e709378cda44
+Subproject commit 80cd995cdcbf4b9ded895a43621a11f11806ad8d



More information about the Parted-commits mailing list