summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/e2fsprogs/e2fsprogs
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-01-01 01:25:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-06 11:13:57 +0000
commit63281708fab30adc4ca1a506deefbf8a54dcce6d (patch)
treebf6b9b48314909bd062f4fba473708065cbd6c81 /meta/recipes-devtools/e2fsprogs/e2fsprogs
parent5ddb7d4ebb135e288ab56b44aceabb3578ae9ed1 (diff)
downloadpoky-63281708fab30adc4ca1a506deefbf8a54dcce6d.tar.gz
e2fsprogs: upgrade to 1.42.9
* Upgrade to 1.42.9 * Remove the following patches since they have been merged/fixed by upstream: - debugfs-extent-header.patch - debugfs-sparse-copy.patch - debugfs-too-short.patch - e2fsprogs-fix-tests-f_extent_oobounds.patch - fallocate.patch * The populate-extfs.sh had been merged by the upstream, but I'd like to go on using the previous one which is from our meta layer, they are a little different, and the script would be dropped when we use the mke2fs to populate the rootfs. * Sumitted the patch for populate-extfs.sh (from Søren Holm) to upstream. * Submitted fix-icache.patch to upstream, I wrongly thought it was not applicable to the upstream, but it does. * Join the do_install() and do_install_append() together. (From OE-Core rev: 82cc941128f9eaf57c3a9a648fc58227f6c1956c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs/e2fsprogs')
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m486
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-icache.patch65
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch30
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh96
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch19
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch44
6 files changed, 340 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
new file mode 100644
index 0000000000..4b00668476
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/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
63AC_DEFUN(
64 [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
65 _cv_gnu_make_command='' ;
66dnl 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 ) ;
75dnl 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/fix-icache.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-icache.patch
new file mode 100644
index 0000000000..03c0abc026
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-icache.patch
@@ -0,0 +1,65 @@
1inode.c: only update the icache for ext2_inode
2
3We only read the cache when:
4
5bufsize == sizeof(struct ext2_inode)
6
7then we should only update the cache in the same condition, otherwise
8there would be errors, for example:
9
10cache[0]: cached ino 14 when bufsize = 128 by ext2fs_write_inode_full()
11cache[1]: cached ino 14 when bufsize = 156 by ext2fs_read_inode_full()
12
13Then update the cache:
14cache[0]: cached ino 15 when bufsize = 156 by ext2fs_read_inode_full()
15
16Then the ino 14 would hit the cache[1] when bufsize = 128 (but it was
17cached by bufsize = 156), so there would be errors.
18
19Upstream-Status: [Submitted]
20
21Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
22---
23 lib/ext2fs/inode.c | 20 ++++++++++++--------
24 1 file changed, 12 insertions(+), 8 deletions(-)
25
26diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
27--- a/lib/ext2fs/inode.c
28+++ b/lib/ext2fs/inode.c
29@@ -612,10 +612,12 @@ errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino,
30 #endif
31
32 /* Update the inode cache */
33- fs->icache->cache_last = (fs->icache->cache_last + 1) %
34- fs->icache->cache_size;
35- fs->icache->cache[fs->icache->cache_last].ino = ino;
36- fs->icache->cache[fs->icache->cache_last].inode = *inode;
37+ if (bufsize == sizeof(struct ext2_inode)) {
38+ fs->icache->cache_last = (fs->icache->cache_last + 1) %
39+ fs->icache->cache_size;
40+ fs->icache->cache[fs->icache->cache_last].ino = ino;
41+ fs->icache->cache[fs->icache->cache_last].inode = *inode;
42+ }
43
44 return 0;
45 }
46@@ -648,10 +650,12 @@ errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino,
47
48 /* Check to see if the inode cache needs to be updated */
49 if (fs->icache) {
50- for (i=0; i < fs->icache->cache_size; i++) {
51- if (fs->icache->cache[i].ino == ino) {
52- fs->icache->cache[i].inode = *inode;
53- break;
54+ if (bufsize == sizeof(struct ext2_inode)) {
55+ for (i=0; i < fs->icache->cache_size; i++) {
56+ if (fs->icache->cache[i].ino == ino) {
57+ fs->icache->cache[i].inode = *inode;
58+ break;
59+ }
60 }
61 }
62 } else {
63--
641.8.1.2
65
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
new file mode 100644
index 0000000000..aa7a2981b4
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Inappropriate [configuration]
2
3Signed-off-by: Mei Lei <lei.mei@intel.com>
4
5Index: 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@
18Index: 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/populate-extfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh
new file mode 100644
index 0000000000..7de720b115
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh
@@ -0,0 +1,96 @@
1#!/bin/sh
2
3do_usage () {
4 cat << _EOF
5Usage: populate-extfs.sh <source> <device>
6Create 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
17SRCDIR=${1%%/}
18DEVICE=$2
19DEBUGFS="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/quiet-debugfs.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
new file mode 100644
index 0000000000..830e9d57a5
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
@@ -0,0 +1,19 @@
1When executing a script don't echo every command, as we do this for entire
2filesystems at rootfs time.
3
4Upstream-Status: Inappropriate
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
8index 5590295..ac57292 100644
9--- a/debugfs/debugfs.c
10+++ b/debugfs/debugfs.c
11@@ -2378,7 +2378,7 @@ static int source_file(const char *cmd_file, int ss_idx)
12 cp = strchr(buf, '\r');
13 if (cp)
14 *cp = 0;
15- printf("debugfs: %s\n", buf);
16+ /*printf("debugfs: %s\n", buf);*/
17 retval = ss_execute_line(ss_idx, buf);
18 if (retval) {
19 ss_perror(ss_idx, retval, buf);
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch
new file mode 100644
index 0000000000..f3e6eb778f
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/remove.ldconfig.call.patch
@@ -0,0 +1,44 @@
1From b139e03ac2f72e644e547c7ee9b1514383af4d97 Mon Sep 17 00:00:00 2001
2From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
3Date: Wed, 30 Jan 2013 15:22:04 +0200
4Subject: [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
9So remove ldconfig call from make install-libs
10
11Patch authored by Martin Jansa.
12
13Upstream-Status: Inappropriate [disable feature]
14
15Signed-off-by: Scott Garman <scott.a.garman@intel.com>
16Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
17---
18 lib/Makefile.elf-lib | 3 ---
19 1 file changed, 3 deletions(-)
20
21diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib
22index 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--
431.7.9.5
44