git.iko.soy/typeable/nixpkgs
on master help sign in
parted: Update to new upstream version 3.2.

In order to properly run tests, we need to fix the unicode tests and after some search, I have found that Ludo (who is also the <nixpkgs> maintainer of parted) already reported this upstream and also provided a solution: http://lists.gnu.org/archive/html/bug-parted/2014-08/msg00003.html I'm updating parted to 3.2, because the latest blivet implementation relies on it for device geometry calculations. Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commit34ae3b7f77ef389574602e86bea6f6e434ab9d1b authoraszlig <aszlig@redmoonstudios.org> dateWed 22 Oct 2014, 01:17 (12 years ago) parent6553845
2 files changed+48−4
pkgs/tools/misc/parted/default.nix+10−4 pkgs/tools/misc/parted/gpt-unicode-test-fix.patch+38
pkgs/tools/misc/parted/default.nix+10−4
@@ -1,20 +1,26 @@
1−{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline
1+{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline, perl, python
22, utillinux, check, enableStatic ? false, hurd ? null }:
33
44stdenv.mkDerivation rec {
5− name = "parted-3.1";
5+ name = "parted-3.2";
66
77 src = fetchurl {
88 url = "mirror://gnu/parted/${name}.tar.xz";
9− sha256 = "05fa4m1bky9d13hqv91jlnngzlyn7y4rnnyq6d86w0dg3vww372y";
9+ sha256 = "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5";
1010 };
1111
12+ patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch;
13+
14+ postPatch = stdenv.lib.optionalString doCheck ''
15+ patchShebangs tests
16+ '';
17+
1218 buildInputs = [ libuuid ]
1319 ++ stdenv.lib.optional (readline != null) readline
1420 ++ stdenv.lib.optional (gettext != null) gettext
1521 ++ stdenv.lib.optional (devicemapper != null) devicemapper
1622 ++ stdenv.lib.optional (hurd != null) hurd
17− ++ stdenv.lib.optional doCheck check;
23+ ++ stdenv.lib.optionals doCheck [ check perl python ];
1824
1925 configureFlags =
2026 (if (readline != null)
pkgs/tools/misc/parted/gpt-unicode-test-fix.patchnew file+38
@@ -0,0 +1,38 @@
1+From Ludo's suggestion at:
2+
3+ http://debbugs.gnu.org/cgi/bugreport.cgi?msg=8;bug=18258
4+
5+diff --git a/tests/.t0251-gpt-unicode.sh.swp b/tests/.t0251-gpt-unicode.sh.swp
6+deleted file mode 100644
7+index b41c337..0000000
8+Binary files a/tests/.t0251-gpt-unicode.sh.swp and /dev/null differ
9+diff --git a/tests/t0251-gpt-unicode.sh b/tests/t0251-gpt-unicode.sh
10+index c845950..fa63a72 100755
11+--- a/tests/t0251-gpt-unicode.sh
12++++ b/tests/t0251-gpt-unicode.sh
13+@@ -22,7 +22,24 @@ dev=loop-file
14+ # create zeroed device
15+ truncate -s 10m $dev || fail=1
16+
17+-export LC_ALL=C.UTF-8
18++found_locale=no
19++for locale in en_US de_DE fr_FR es_ES
20++do
21++ LC_ALL="$locale.UTF-8"
22++ export LC_ALL
23++
24++ # In a UTF-8 locale, the string below prints as 4 characters.
25++ if [ `printf 'foo\341\264\244' | wc -m` -eq 4 ]; then
26++ found_locale=yes
27++ break
28++ fi
29++done
30++
31++if [ "$found_locale" != "yes" ]; then
32++ echo "no valid UTF-8 locale found; skipping" >&2
33++ exit 77
34++fi
35++
36+ # create gpt label with named partition
37+ part_name=$(printf 'foo\341\264\244')
38+ parted -s $dev mklabel gpt mkpart primary ext2 1MiB 2MiB name 1 $part_name > empty 2>&1 || fail=1