diff options
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8')
9 files changed, 583 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/acinclude.m4 b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/acinclude.m4 new file mode 100644 index 0000000000..4b00668476 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/acinclude.m4 | |||
@@ -0,0 +1,86 @@ | |||
1 | # Extracted from the package's shipped aclocal.m4. Custom macros should be in | ||
2 | # acinclude.m4 so running aclocal doesn't blow them away. | ||
3 | # | ||
4 | # RP 1/6/2010 | ||
5 | |||
6 | # =========================================================================== | ||
7 | # http://www.nongnu.org/autoconf-archive/check_gnu_make.html | ||
8 | # =========================================================================== | ||
9 | # | ||
10 | # SYNOPSIS | ||
11 | # | ||
12 | # CHECK_GNU_MAKE() | ||
13 | # | ||
14 | # DESCRIPTION | ||
15 | # | ||
16 | # This macro searches for a GNU version of make. If a match is found, the | ||
17 | # makefile variable `ifGNUmake' is set to the empty string, otherwise it | ||
18 | # is set to "#". This is useful for including a special features in a | ||
19 | # Makefile, which cannot be handled by other versions of make. The | ||
20 | # variable _cv_gnu_make_command is set to the command to invoke GNU make | ||
21 | # if it exists, the empty string otherwise. | ||
22 | # | ||
23 | # Here is an example of its use: | ||
24 | # | ||
25 | # Makefile.in might contain: | ||
26 | # | ||
27 | # # A failsafe way of putting a dependency rule into a makefile | ||
28 | # $(DEPEND): | ||
29 | # $(CC) -MM $(srcdir)/*.c > $(DEPEND) | ||
30 | # | ||
31 | # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND))) | ||
32 | # @ifGNUmake@ include $(DEPEND) | ||
33 | # @ifGNUmake@ endif | ||
34 | # | ||
35 | # Then configure.in would normally contain: | ||
36 | # | ||
37 | # CHECK_GNU_MAKE() | ||
38 | # AC_OUTPUT(Makefile) | ||
39 | # | ||
40 | # Then perhaps to cause gnu make to override any other make, we could do | ||
41 | # something like this (note that GNU make always looks for GNUmakefile | ||
42 | # first): | ||
43 | # | ||
44 | # if ! test x$_cv_gnu_make_command = x ; then | ||
45 | # mv Makefile GNUmakefile | ||
46 | # echo .DEFAULT: > Makefile ; | ||
47 | # echo \ $_cv_gnu_make_command \$@ >> Makefile; | ||
48 | # fi | ||
49 | # | ||
50 | # Then, if any (well almost any) other make is called, and GNU make also | ||
51 | # exists, then the other make wraps the GNU make. | ||
52 | # | ||
53 | # LICENSE | ||
54 | # | ||
55 | # Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au> | ||
56 | # | ||
57 | # Copying and distribution of this file, with or without modification, are | ||
58 | # permitted in any medium without royalty provided the copyright notice | ||
59 | # and this notice are preserved. | ||
60 | # | ||
61 | # Note: Modified by Ted Ts'o to add @ifNotGNUMake@ | ||
62 | |||
63 | AC_DEFUN( | ||
64 | [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command, | ||
65 | _cv_gnu_make_command='' ; | ||
66 | dnl Search all the common names for GNU make | ||
67 | for a in "$MAKE" make gmake gnumake ; do | ||
68 | if test -z "$a" ; then continue ; fi ; | ||
69 | if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then | ||
70 | _cv_gnu_make_command=$a ; | ||
71 | break; | ||
72 | fi | ||
73 | done ; | ||
74 | ) ; | ||
75 | dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise | ||
76 | if test "x$_cv_gnu_make_command" != "x" ; then | ||
77 | ifGNUmake='' ; | ||
78 | ifNotGNUmake='#' ; | ||
79 | else | ||
80 | ifGNUmake='#' ; | ||
81 | ifNotGNUmake='' ; | ||
82 | AC_MSG_RESULT("Not found"); | ||
83 | fi | ||
84 | AC_SUBST(ifGNUmake) | ||
85 | AC_SUBST(ifNotGNUmake) | ||
86 | ] ) | ||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-extent-header.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-extent-header.patch new file mode 100644 index 0000000000..ae44730192 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-extent-header.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | debugfs: properly set up extent header in do_write | ||
2 | |||
3 | do_write doesn't fully set up the first extent header on a new | ||
4 | inode, so if we write a 0-length file, and don't write any data | ||
5 | to the new file, we end up creating something that looks corrupt | ||
6 | to kernelspace: | ||
7 | |||
8 | EXT4-fs error (device loop0): ext4_ext_check_inode:464: inode #12: comm ls: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0) | ||
9 | |||
10 | Do something similar to ext4_ext_tree_init() here, and | ||
11 | fill out the first extent header upon creation to avoid this. | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Reported-by: Robert Yang <liezhi.yang@windriver.com> | ||
16 | Signed-off-by: Eric Sandeen <sandeen@redhat.com> | ||
17 | --- | ||
18 | debugfs/debugfs.c | 13 ++++++++++++- | ||
19 | 1 file changed, 12 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c | ||
22 | --- a/debugfs/debugfs.c | ||
23 | +++ b/debugfs/debugfs.c | ||
24 | @@ -1726,8 +1726,19 @@ void do_write(int argc, char *argv[]) | ||
25 | inode.i_links_count = 1; | ||
26 | inode.i_size = statbuf.st_size; | ||
27 | if (current_fs->super->s_feature_incompat & | ||
28 | - EXT3_FEATURE_INCOMPAT_EXTENTS) | ||
29 | + EXT3_FEATURE_INCOMPAT_EXTENTS) { | ||
30 | + int i; | ||
31 | + struct ext3_extent_header *eh; | ||
32 | + | ||
33 | + eh = (struct ext3_extent_header *) &inode.i_block[0]; | ||
34 | + eh->eh_depth = 0; | ||
35 | + eh->eh_entries = 0; | ||
36 | + eh->eh_magic = EXT3_EXT_MAGIC; | ||
37 | + i = (sizeof(inode.i_block) - sizeof(*eh)) / | ||
38 | + sizeof(struct ext3_extent); | ||
39 | + eh->eh_max = ext2fs_cpu_to_le16(i); | ||
40 | inode.i_flags |= EXT4_EXTENTS_FL; | ||
41 | + } | ||
42 | if (debugfs_write_new_inode(newfile, &inode, argv[0])) { | ||
43 | close(fd); | ||
44 | return; | ||
45 | -- | ||
46 | 1.8.1.2 | ||
47 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-sparse-copy.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-sparse-copy.patch new file mode 100644 index 0000000000..07124702a3 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-sparse-copy.patch | |||
@@ -0,0 +1,148 @@ | |||
1 | debugfs.c: do sparse copy when src is a sparse file | ||
2 | |||
3 | Let debugfs do sparse copy when src is a sparse file, just like | ||
4 | "cp --sparse=auto" | ||
5 | |||
6 | * For the: | ||
7 | #define IO_BUFSIZE 64*1024 | ||
8 | this is a suggested value from gnu coreutils: | ||
9 | http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/ioblksize.h;h=1ae93255e7d0ccf0855208c7ae5888209997bf16;hb=HEAD | ||
10 | |||
11 | * Use malloc() to allocate memory for the buffer since put 64K (or | ||
12 | more) on the stack seems not a good idea. | ||
13 | |||
14 | Upstream-Status: Submitted | ||
15 | |||
16 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
17 | Acked-by: Darren Hart <dvhart@linux.intel.com> | ||
18 | --- | ||
19 | debugfs/debugfs.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++---- | ||
20 | 1 file changed, 58 insertions(+), 4 deletions(-) | ||
21 | |||
22 | diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c | ||
23 | --- a/debugfs/debugfs.c | ||
24 | +++ b/debugfs/debugfs.c | ||
25 | @@ -41,6 +41,16 @@ extern char *optarg; | ||
26 | #define BUFSIZ 8192 | ||
27 | #endif | ||
28 | |||
29 | +/* 64KiB is the minimium blksize to best minimize system call overhead. */ | ||
30 | +#ifndef IO_BUFSIZE | ||
31 | +#define IO_BUFSIZE 64*1024 | ||
32 | +#endif | ||
33 | + | ||
34 | +/* Block size for `st_blocks' */ | ||
35 | +#ifndef S_BLKSIZE | ||
36 | +#define S_BLKSIZE 512 | ||
37 | +#endif | ||
38 | + | ||
39 | ss_request_table *extra_cmds; | ||
40 | const char *debug_prog_name; | ||
41 | int sci_idx; | ||
42 | @@ -1563,22 +1573,37 @@ void do_find_free_inode(int argc, char *argv[]) | ||
43 | } | ||
44 | |||
45 | #ifndef READ_ONLY | ||
46 | -static errcode_t copy_file(int fd, ext2_ino_t newfile) | ||
47 | +static errcode_t copy_file(int fd, ext2_ino_t newfile, int bufsize, int make_holes) | ||
48 | { | ||
49 | ext2_file_t e2_file; | ||
50 | errcode_t retval; | ||
51 | int got; | ||
52 | unsigned int written; | ||
53 | - char buf[8192]; | ||
54 | + char *buf; | ||
55 | char *ptr; | ||
56 | + char *zero_buf; | ||
57 | + int cmp; | ||
58 | |||
59 | retval = ext2fs_file_open(current_fs, newfile, | ||
60 | EXT2_FILE_WRITE, &e2_file); | ||
61 | if (retval) | ||
62 | return retval; | ||
63 | |||
64 | + if (!(buf = (char *) malloc(bufsize))){ | ||
65 | + com_err("copy_file", errno, "can't allocate buffer\n"); | ||
66 | + return; | ||
67 | + } | ||
68 | + | ||
69 | + /* This is used for checking whether the whole block is zero */ | ||
70 | + retval = ext2fs_get_memzero(bufsize, &zero_buf); | ||
71 | + if (retval) { | ||
72 | + com_err("copy_file", retval, "can't allocate buffer\n"); | ||
73 | + free(buf); | ||
74 | + return retval; | ||
75 | + } | ||
76 | + | ||
77 | while (1) { | ||
78 | - got = read(fd, buf, sizeof(buf)); | ||
79 | + got = read(fd, buf, bufsize); | ||
80 | if (got == 0) | ||
81 | break; | ||
82 | if (got < 0) { | ||
83 | @@ -1586,6 +1611,21 @@ static errcode_t copy_file(int fd, ext2_ino_t newfile) | ||
84 | goto fail; | ||
85 | } | ||
86 | ptr = buf; | ||
87 | + | ||
88 | + /* Sparse copy */ | ||
89 | + if (make_holes) { | ||
90 | + /* Check whether all is zero */ | ||
91 | + cmp = memcmp(ptr, zero_buf, got); | ||
92 | + if (cmp == 0) { | ||
93 | + /* The whole block is zero, make a hole */ | ||
94 | + retval = ext2fs_file_lseek(e2_file, got, EXT2_SEEK_CUR, NULL); | ||
95 | + if (retval) | ||
96 | + goto fail; | ||
97 | + got = 0; | ||
98 | + } | ||
99 | + } | ||
100 | + | ||
101 | + /* Normal copy */ | ||
102 | while (got > 0) { | ||
103 | retval = ext2fs_file_write(e2_file, ptr, | ||
104 | got, &written); | ||
105 | @@ -1596,10 +1636,14 @@ static errcode_t copy_file(int fd, ext2_ino_t newfile) | ||
106 | ptr += written; | ||
107 | } | ||
108 | } | ||
109 | + free(buf); | ||
110 | + ext2fs_free_mem(&zero_buf); | ||
111 | retval = ext2fs_file_close(e2_file); | ||
112 | return retval; | ||
113 | |||
114 | fail: | ||
115 | + free(buf); | ||
116 | + ext2fs_free_mem(&zero_buf); | ||
117 | (void) ext2fs_file_close(e2_file); | ||
118 | return retval; | ||
119 | } | ||
120 | @@ -1612,6 +1656,8 @@ void do_write(int argc, char *argv[]) | ||
121 | ext2_ino_t newfile; | ||
122 | errcode_t retval; | ||
123 | struct ext2_inode inode; | ||
124 | + int bufsize = IO_BUFSIZE; | ||
125 | + int make_holes = 0; | ||
126 | |||
127 | if (common_args_process(argc, argv, 3, 3, "write", | ||
128 | "<native file> <new file>", CHECK_FS_RW)) | ||
129 | @@ -1687,7 +1733,15 @@ void do_write(int argc, char *argv[]) | ||
130 | return; | ||
131 | } | ||
132 | if (LINUX_S_ISREG(inode.i_mode)) { | ||
133 | - retval = copy_file(fd, newfile); | ||
134 | + if (statbuf.st_blocks < statbuf.st_size / S_BLKSIZE) { | ||
135 | + make_holes = 1; | ||
136 | + /* | ||
137 | + * Use I/O blocksize as buffer size when | ||
138 | + * copying sparse files. | ||
139 | + */ | ||
140 | + bufsize = statbuf.st_blksize; | ||
141 | + } | ||
142 | + retval = copy_file(fd, newfile, bufsize, make_holes); | ||
143 | if (retval) | ||
144 | com_err("copy_file", retval, 0); | ||
145 | } | ||
146 | -- | ||
147 | 1.7.10.4 | ||
148 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-too-short.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-too-short.patch new file mode 100644 index 0000000000..607305be54 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/debugfs-too-short.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | debugfs.c: the max length of debugfs argument is too short | ||
2 | |||
3 | The max length of debugfs argument is 256 which is too short, the | ||
4 | arguments are two paths, the PATH_MAX is 4096 according to | ||
5 | /usr/include/linux/limits.h, so use BUFSIZ (which is 8192 on Linux | ||
6 | systems), that's also what the ss library uses. | ||
7 | |||
8 | Upstream-Status: Submitted | ||
9 | |||
10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
11 | Acked-by: Darren Hart <dvhart@linux.intel.com> | ||
12 | --- | ||
13 | debugfs/debugfs.c | 6 +++++- | ||
14 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c | ||
17 | --- a/debugfs/debugfs.c | ||
18 | +++ b/debugfs/debugfs.c | ||
19 | @@ -37,6 +37,10 @@ extern char *optarg; | ||
20 | #include "../version.h" | ||
21 | #include "jfs_user.h" | ||
22 | |||
23 | +#ifndef BUFSIZ | ||
24 | +#define BUFSIZ 8192 | ||
25 | +#endif | ||
26 | + | ||
27 | ss_request_table *extra_cmds; | ||
28 | const char *debug_prog_name; | ||
29 | int sci_idx; | ||
30 | @@ -2311,7 +2315,7 @@ void do_dump_mmp(int argc EXT2FS_ATTR((unused)), char *argv[]) | ||
31 | static int source_file(const char *cmd_file, int ss_idx) | ||
32 | { | ||
33 | FILE *f; | ||
34 | - char buf[256]; | ||
35 | + char buf[BUFSIZ]; | ||
36 | char *cp; | ||
37 | int exit_status = 0; | ||
38 | int retval; | ||
39 | -- | ||
40 | 1.8.1.2 | ||
41 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/fallocate.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/fallocate.patch new file mode 100644 index 0000000000..d074c15cfd --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/fallocate.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | We assume that fallocate is supported somehow | ||
2 | but we need to check if we have fallocate() | ||
3 | this problem shows up on uclibc systems since | ||
4 | uclibc does not have fallocate() implemented | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | |||
10 | Index: e2fsprogs-1.42/lib/ext2fs/unix_io.c | ||
11 | =================================================================== | ||
12 | --- e2fsprogs-1.42.orig/lib/ext2fs/unix_io.c 2012-01-17 17:24:34.290780625 -0800 | ||
13 | +++ e2fsprogs-1.42/lib/ext2fs/unix_io.c 2012-01-17 17:25:37.338783680 -0800 | ||
14 | @@ -895,7 +895,7 @@ | ||
15 | goto unimplemented; | ||
16 | #endif | ||
17 | } else { | ||
18 | -#ifdef FALLOC_FL_PUNCH_HOLE | ||
19 | +#if defined FALLOC_FL_PUNCH_HOLE && defined HAVE_FALLOCATE | ||
20 | /* | ||
21 | * If we are not on block device, try to use punch hole | ||
22 | * to reclaim free space. | ||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/fix-icache.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/fix-icache.patch new file mode 100644 index 0000000000..ad4e3439f4 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/fix-icache.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | inode.c: only update the icache for ext2_inode | ||
2 | |||
3 | We only read the cache when: | ||
4 | |||
5 | bufsize == sizeof(struct ext2_inode) | ||
6 | |||
7 | then we should only update the cache in the same condition, otherwise | ||
8 | there would be errors, for example: | ||
9 | |||
10 | cache[0]: cached ino 14 when bufsize = 128 by ext2fs_write_inode_full() | ||
11 | cache[1]: cached ino 14 when bufsize = 156 by ext2fs_read_inode_full() | ||
12 | |||
13 | Then update the cache: | ||
14 | cache[0]: cached ino 15 when bufsize = 156 by ext2fs_read_inode_full() | ||
15 | |||
16 | Then the ino 14 would hit the cache[1] when bufsize = 128 (but it was | ||
17 | cached by bufsize = 156), so there would be errors. | ||
18 | |||
19 | Note: the upstream has changed the icache lot, so this patch is | ||
20 | inappropriate for the upstream, we can drop this patch when we update | ||
21 | the package. | ||
22 | |||
23 | Upstream-Status: [Inappropriate] | ||
24 | |||
25 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
26 | --- | ||
27 | lib/ext2fs/inode.c | 20 ++++++++++++-------- | ||
28 | 1 file changed, 12 insertions(+), 8 deletions(-) | ||
29 | |||
30 | diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c | ||
31 | --- a/lib/ext2fs/inode.c | ||
32 | +++ b/lib/ext2fs/inode.c | ||
33 | @@ -612,10 +612,12 @@ errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino, | ||
34 | #endif | ||
35 | |||
36 | /* Update the inode cache */ | ||
37 | - fs->icache->cache_last = (fs->icache->cache_last + 1) % | ||
38 | - fs->icache->cache_size; | ||
39 | - fs->icache->cache[fs->icache->cache_last].ino = ino; | ||
40 | - fs->icache->cache[fs->icache->cache_last].inode = *inode; | ||
41 | + if (bufsize == sizeof(struct ext2_inode)) { | ||
42 | + fs->icache->cache_last = (fs->icache->cache_last + 1) % | ||
43 | + fs->icache->cache_size; | ||
44 | + fs->icache->cache[fs->icache->cache_last].ino = ino; | ||
45 | + fs->icache->cache[fs->icache->cache_last].inode = *inode; | ||
46 | + } | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | @@ -648,10 +650,12 @@ errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino, | ||
51 | |||
52 | /* Check to see if the inode cache needs to be updated */ | ||
53 | if (fs->icache) { | ||
54 | - for (i=0; i < fs->icache->cache_size; i++) { | ||
55 | - if (fs->icache->cache[i].ino == ino) { | ||
56 | - fs->icache->cache[i].inode = *inode; | ||
57 | - break; | ||
58 | + if (bufsize == sizeof(struct ext2_inode)) { | ||
59 | + for (i=0; i < fs->icache->cache_size; i++) { | ||
60 | + if (fs->icache->cache[i].ino == ino) { | ||
61 | + fs->icache->cache[i].inode = *inode; | ||
62 | + break; | ||
63 | + } | ||
64 | } | ||
65 | } | ||
66 | } else { | ||
67 | -- | ||
68 | 1.8.1.2 | ||
69 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/mkdir.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/mkdir.patch new file mode 100644 index 0000000000..aa7a2981b4 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/mkdir.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Signed-off-by: Mei Lei <lei.mei@intel.com> | ||
4 | |||
5 | Index: e2fsprogs-1.41.5/po/Makefile.in.in | ||
6 | =================================================================== | ||
7 | --- e2fsprogs-1.41.5.orig/po/Makefile.in.in 2009-02-14 13:49:08.000000000 +0000 | ||
8 | +++ e2fsprogs-1.41.5/po/Makefile.in.in 2009-08-19 17:52:31.000000000 +0100 | ||
9 | @@ -30,7 +30,7 @@ | ||
10 | INSTALL = @INSTALL@ | ||
11 | INSTALL_DATA = @INSTALL_DATA@ | ||
12 | MKINSTALLDIRS = @MKINSTALLDIRS@ | ||
13 | -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) | ||
14 | +mkinstalldirs = $(MKINSTALLDIRS) | ||
15 | |||
16 | GMSGFMT = @GMSGFMT@ | ||
17 | MSGFMT = @MSGFMT@ | ||
18 | Index: e2fsprogs-1.41.5/configure.in | ||
19 | =================================================================== | ||
20 | --- e2fsprogs-1.41.5.orig/configure.in 2009-08-19 17:53:50.000000000 +0100 | ||
21 | +++ e2fsprogs-1.41.5/configure.in 2009-08-19 17:48:38.000000000 +0100 | ||
22 | @@ -970,6 +970,8 @@ | ||
23 | fi | ||
24 | AC_SUBST(BUILD_CFLAGS) | ||
25 | AC_SUBST(BUILD_LDFLAGS) | ||
26 | +MKINSTALLDIRS="mkdir -p" | ||
27 | +AC_SUBST(MKINSTALLDIRS) | ||
28 | dnl | ||
29 | dnl Make our output files, being sure that we create the some miscellaneous | ||
30 | dnl directories | ||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh new file mode 100644 index 0000000000..9eff030820 --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh | |||
@@ -0,0 +1,96 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | do_usage () { | ||
4 | cat << _EOF | ||
5 | Usage: populate-extfs.sh <source> <device> | ||
6 | Create an ext2/ext3/ext4 filesystem from a directory or file | ||
7 | |||
8 | source: The source directory or file | ||
9 | device: The target device | ||
10 | |||
11 | _EOF | ||
12 | exit 1 | ||
13 | } | ||
14 | |||
15 | [ $# -ne 2 ] && do_usage | ||
16 | |||
17 | SRCDIR=${1%%/} | ||
18 | DEVICE=$2 | ||
19 | DEBUGFS="debugfs" | ||
20 | |||
21 | { | ||
22 | CWD="/" | ||
23 | find $SRCDIR | while read FILE; do | ||
24 | TGT="${FILE##*/}" | ||
25 | DIR="${FILE#$SRCDIR}" | ||
26 | DIR="${DIR%$TGT}" | ||
27 | |||
28 | # Skip the root dir | ||
29 | [ ! -z "$DIR" ] || continue | ||
30 | [ ! -z "$TGT" ] || continue | ||
31 | |||
32 | if [ "$DIR" != "$CWD" ]; then | ||
33 | echo "cd $DIR" | ||
34 | CWD="$DIR" | ||
35 | fi | ||
36 | |||
37 | # Only stat once since stat is a time consuming command | ||
38 | STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" $FILE) | ||
39 | eval $STAT | ||
40 | |||
41 | case $TYPE in | ||
42 | "directory") | ||
43 | echo "mkdir $TGT" | ||
44 | ;; | ||
45 | "regular file" | "regular empty file") | ||
46 | echo "write $FILE $TGT" | ||
47 | ;; | ||
48 | "symbolic link") | ||
49 | LINK_TGT=$(readlink $FILE) | ||
50 | echo "symlink $TGT $LINK_TGT" | ||
51 | ;; | ||
52 | "block special file") | ||
53 | echo "mknod $TGT b $DEVNO" | ||
54 | ;; | ||
55 | "character special file") | ||
56 | echo "mknod $TGT c $DEVNO" | ||
57 | ;; | ||
58 | "fifo") | ||
59 | echo "mknod $TGT p" | ||
60 | ;; | ||
61 | *) | ||
62 | echo "Unknown/unhandled file type '$TYPE' file: $FILE" 1>&2 | ||
63 | ;; | ||
64 | esac | ||
65 | |||
66 | # Set the file mode | ||
67 | echo "sif $TGT mode 0x$MODE" | ||
68 | |||
69 | # Set uid and gid | ||
70 | echo "sif $TGT uid $U" | ||
71 | echo "sif $TGT gid $G" | ||
72 | done | ||
73 | |||
74 | # Handle the hard links. | ||
75 | # Save the hard links to a file, use the inode number as the filename, for example: | ||
76 | # If a and b's inode number is 6775928, save a and b to /tmp/tmp.VrCwHh5gdt/6775928. | ||
77 | INODE_DIR=`mktemp -d` || exit 1 | ||
78 | for i in `find $SRCDIR -type f -links +1 -printf 'INODE=%i###FN=%p\n'`; do | ||
79 | eval `echo $i | sed 's$###$ $'` | ||
80 | echo ${FN#$SRCDIR} >>$INODE_DIR/$INODE | ||
81 | done | ||
82 | # Use the debugfs' ln and "sif links_count" to handle them. | ||
83 | for i in `ls $INODE_DIR`; do | ||
84 | # The link source | ||
85 | SRC=`head -1 $INODE_DIR/$i` | ||
86 | # Remove the files and link them again except the first one | ||
87 | for TGT in `sed -n -e '1!p' $INODE_DIR/$i`; do | ||
88 | echo "rm $TGT" | ||
89 | echo "ln $SRC $TGT" | ||
90 | done | ||
91 | LN_CNT=`cat $INODE_DIR/$i | wc -l` | ||
92 | # Set the links count | ||
93 | echo "sif $SRC links_count $LN_CNT" | ||
94 | done | ||
95 | rm -fr $INODE_DIR | ||
96 | } | $DEBUGFS -w -f - $DEVICE | ||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/remove.ldconfig.call.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/remove.ldconfig.call.patch new file mode 100644 index 0000000000..f3e6eb778f --- /dev/null +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/remove.ldconfig.call.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From b139e03ac2f72e644e547c7ee9b1514383af4d97 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Dinu <andrei.adrianx.dinu@intel.com> | ||
3 | Date: Wed, 30 Jan 2013 15:22:04 +0200 | ||
4 | Subject: [PATCH] When /etc/ld.so.cache is writeable by user running bitbake | ||
5 | then it creates invalid cache (in my case libstdc++.so | ||
6 | cannot be found after building zlib(-native) and I have to | ||
7 | call touch */libstdc++.so && /sbin/ldconfig to fix it. | ||
8 | |||
9 | So remove ldconfig call from make install-libs | ||
10 | |||
11 | Patch authored by Martin Jansa. | ||
12 | |||
13 | Upstream-Status: Inappropriate [disable feature] | ||
14 | |||
15 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
16 | Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> | ||
17 | --- | ||
18 | lib/Makefile.elf-lib | 3 --- | ||
19 | 1 file changed, 3 deletions(-) | ||
20 | |||
21 | diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib | ||
22 | index 78479d3..4a4a5ac 100644 | ||
23 | --- a/lib/Makefile.elf-lib | ||
24 | +++ b/lib/Makefile.elf-lib | ||
25 | @@ -50,8 +50,6 @@ install-shlibs install:: $(ELF_LIB) installdirs-elf-lib $(DEP_INSTALL_SYMLINK) | ||
26 | $(E) " SYMLINK $(libdir)/$(ELF_IMAGE).so" | ||
27 | $(Q) $(INSTALL_SYMLINK) $(ELF_INSTALL_DIR)/$(ELF_SONAME) \ | ||
28 | $(libdir)/$(ELF_IMAGE).so $(DESTDIR) | ||
29 | - $(E) " LDCONFIG" | ||
30 | - $(Q) -$(LDCONFIG) | ||
31 | |||
32 | install-strip: install | ||
33 | $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)" | ||
34 | @@ -67,7 +65,6 @@ uninstall-shlibs uninstall:: | ||
35 | $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \ | ||
36 | $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \ | ||
37 | $(DESTDIR)$(libdir)/$(ELF_IMAGE).so | ||
38 | - -$(LDCONFIG) | ||
39 | |||
40 | clean:: | ||
41 | $(RM) -rf elfshared | ||
42 | -- | ||
43 | 1.7.9.5 | ||
44 | |||