Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e6114781b0fa
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 11238ffbe1d1
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 30, 2018

  1. Copy the full SHA
    11238ff View commit details
Showing with 39 additions and 3 deletions.
  1. +5 −3 pkgs/tools/filesystems/btrfs-progs/default.nix
  2. +34 −0 pkgs/tools/filesystems/btrfs-progs/e2fsprogs.patch
8 changes: 5 additions & 3 deletions pkgs/tools/filesystems/btrfs-progs/default.nix
Original file line number Diff line number Diff line change
@@ -2,14 +2,14 @@
, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt, zstd
}:

let version = "4.14.1"; in
let version = "4.15.1"; in

stdenv.mkDerivation rec {
name = "btrfs-progs-${version}";

src = fetchurl {
url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
sha256 = "1palnddw3d50kyflwk1j4xapbc6jniid6j5i9dsr8l8a7nkv7ich";
sha256 = "15izak6jg6pqr6ha9447cdrdj9k6kfiarvwlrj53cpvrsv02l437";
};

nativeBuildInputs = [
@@ -20,7 +20,9 @@ stdenv.mkDerivation rec {

# gcc bug with -O1 on ARM with gcc 4.8
# This should be fine on all platforms so apply universally
patchPhase = "sed -i s/-O1/-O2/ configure";
prePatch = "sed -i s/-O1/-O2/ configure";

patches = [ ./e2fsprogs.patch ];

postInstall = ''
install -v -m 444 -D btrfs-completion $out/etc/bash_completion.d/btrfs
34 changes: 34 additions & 0 deletions pkgs/tools/filesystems/btrfs-progs/e2fsprogs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From e4034ba388308fd4b791bd20122c28070d195e1e Mon Sep 17 00:00:00 2001
From: Qu Wenruo <wqu@suse.com>
Date: Wed, 14 Mar 2018 08:56:57 +0800
Subject: [PATCH] btrfs-progs: convert/ext2: Remove check for
ext2_ext_attr_entry->e_value_block

In latest e2fsprogs (1.44.0) definition of ext2_ext_attr_entry has
removed member e_value_block, as currently ext* doesn't support it set
anyway.

So remove such check so that we can pass compile.

Issue: #110
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199071
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
convert/source-ext2.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/convert/source-ext2.c b/convert/source-ext2.c
index b1492c786..070126ec3 100644
--- a/convert/source-ext2.c
+++ b/convert/source-ext2.c
@@ -422,8 +422,7 @@ static int ext2_xattr_check_entry(struct ext2_ext_attr_entry *entry,
{
size_t value_size = entry->e_value_size;

- if (entry->e_value_block != 0 || value_size > size ||
- entry->e_value_offs + value_size > size)
+ if (value_size > size || entry->e_value_offs + value_size > size)
return -EIO;
return 0;
}