From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../btrfs-tools/allow-relative-path.patch | 58 ++++++++++++++++++++++ .../btrfs-tools/btrfs-tools/weak-defaults.patch | 31 ++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch (limited to 'meta/recipes-devtools/btrfs-tools/btrfs-tools') diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch new file mode 100644 index 0000000000..695973eded --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/allow-relative-path.patch @@ -0,0 +1,58 @@ +From: Gui Hecheng + +The bug accurs when exec: + # mkfs.btrfs -r + (note: the path should be 'valid' correspond to your `pwd`) +error msg: + $ scandir for failed: No such file... + +Replace strdup() with realpath() to get the correct scan path. + +Upstream-Status: Backport (pending) + +Reported-by: Saul Wold +Signed-off-by: Gui Hecheng +--- + mkfs.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/mkfs.c b/mkfs.c +index 2dc90c2..1bd3069 100644 +--- a/mkfs.c ++++ b/mkfs.c +@@ -756,6 +756,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans, + ino_t parent_inum, cur_inum; + ino_t highest_inum = 0; + char *parent_dir_name; ++ char real_path[PATH_MAX]; + struct btrfs_path path; + struct extent_buffer *leaf; + struct btrfs_key root_dir_key; +@@ -764,7 +765,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans, + /* Add list for source directory */ + dir_entry = malloc(sizeof(struct directory_name_entry)); + dir_entry->dir_name = dir_name; +- dir_entry->path = strdup(dir_name); ++ dir_entry->path = realpath(dir_name, real_path); + + parent_inum = highest_inum + BTRFS_FIRST_FREE_OBJECTID; + dir_entry->inum = parent_inum; +@@ -876,7 +877,6 @@ static int traverse_directory(struct btrfs_trans_handle *trans, + } + + free_namelist(files, count); +- free(parent_dir_entry->path); + free(parent_dir_entry); + + index_cnt = 2; +@@ -887,7 +887,6 @@ static int traverse_directory(struct btrfs_trans_handle *trans, + fail: + free_namelist(files, count); + fail_no_files: +- free(parent_dir_entry->path); + free(parent_dir_entry); + return -1; + } +-- +1.8.1.4 + diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch new file mode 100644 index 0000000000..9ca9fca3ee --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/weak-defaults.patch @@ -0,0 +1,31 @@ +Upstream-Status: Pending + +Allow mandir to be set from the environment, fixing the following packaging warnings: + +WARNING: For recipe btrfs-tools, the following files were installed but not shipped in any package: +WARNING: /usr/man/man8/btrfs-show.8.gz +WARNING: /usr/man/man8/btrfs-image.8.gz +WARNING: /usr/man/man8/btrfsctl.8.gz +WARNING: /usr/man/man8/btrfs.8.gz +WARNING: /usr/man/man8/btrfsck.8.gz +WARNING: /usr/man/man8/mkfs.btrfs.8.gz + +RP - 5/7/2011 + +Index: git/man/Makefile +=================================================================== +--- git.orig/man/Makefile 2011-07-05 22:03:58.949919067 +0100 ++++ git/man/Makefile 2011-07-05 22:04:07.789919856 +0100 +@@ -2,9 +2,9 @@ + INSTALL= install + + prefix ?= /usr/local +-bindir = $(prefix)/bin +-mandir = $(prefix)/man +-man8dir = $(mandir)/man8 ++bindir ?= $(prefix)/bin ++mandir ?= $(prefix)/man ++man8dir ?= $(mandir)/man8 + + MANPAGES = mkfs.btrfs.8.gz btrfsctl.8.gz btrfsck.8.gz btrfs-image.8.gz \ + btrfs-show.8.gz btrfs.8.gz -- cgit v1.2.3-54-g00ecf