aboutsummaryrefslogtreecommitdiffstats
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:12:30 +0000
commit82cc941128f9eaf57c3a9a648fc58227f6c1956c (patch)
treefe04241b69733c3f1df2cc5fb1b041016ad35338 /meta/recipes-devtools/e2fsprogs/e2fsprogs
parentda2156ee0f1ddab499d9ca2968b82b411ea84a95 (diff)
downloadopenembedded-core-82cc941128f9eaf57c3a9a648fc58227f6c1956c.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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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 @@
+# Extracted from the package's shipped aclocal.m4. Custom macros should be in
+# acinclude.m4 so running aclocal doesn't blow them away.
+#
+# RP 1/6/2010
+
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# CHECK_GNU_MAKE()
+#
+# DESCRIPTION
+#
+# This macro searches for a GNU version of make. If a match is found, the
+# makefile variable `ifGNUmake' is set to the empty string, otherwise it
+# is set to "#". This is useful for including a special features in a
+# Makefile, which cannot be handled by other versions of make. The
+# variable _cv_gnu_make_command is set to the command to invoke GNU make
+# if it exists, the empty string otherwise.
+#
+# Here is an example of its use:
+#
+# Makefile.in might contain:
+#
+# # A failsafe way of putting a dependency rule into a makefile
+# $(DEPEND):
+# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
+#
+# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
+# @ifGNUmake@ include $(DEPEND)
+# @ifGNUmake@ endif
+#
+# Then configure.in would normally contain:
+#
+# CHECK_GNU_MAKE()
+# AC_OUTPUT(Makefile)
+#
+# Then perhaps to cause gnu make to override any other make, we could do
+# something like this (note that GNU make always looks for GNUmakefile
+# first):
+#
+# if ! test x$_cv_gnu_make_command = x ; then
+# mv Makefile GNUmakefile
+# echo .DEFAULT: > Makefile ;
+# echo \ $_cv_gnu_make_command \$@ >> Makefile;
+# fi
+#
+# Then, if any (well almost any) other make is called, and GNU make also
+# exists, then the other make wraps the GNU make.
+#
+# LICENSE
+#
+# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+#
+# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
+
+AC_DEFUN(
+ [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
+ _cv_gnu_make_command='' ;
+dnl Search all the common names for GNU make
+ for a in "$MAKE" make gmake gnumake ; do
+ if test -z "$a" ; then continue ; fi ;
+ if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
+ _cv_gnu_make_command=$a ;
+ break;
+ fi
+ done ;
+ ) ;
+dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
+ if test "x$_cv_gnu_make_command" != "x" ; then
+ ifGNUmake='' ;
+ ifNotGNUmake='#' ;
+ else
+ ifGNUmake='#' ;
+ ifNotGNUmake='' ;
+ AC_MSG_RESULT("Not found");
+ fi
+ AC_SUBST(ifGNUmake)
+ AC_SUBST(ifNotGNUmake)
+] )
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 @@
+inode.c: only update the icache for ext2_inode
+
+We only read the cache when:
+
+bufsize == sizeof(struct ext2_inode)
+
+then we should only update the cache in the same condition, otherwise
+there would be errors, for example:
+
+cache[0]: cached ino 14 when bufsize = 128 by ext2fs_write_inode_full()
+cache[1]: cached ino 14 when bufsize = 156 by ext2fs_read_inode_full()
+
+Then update the cache:
+cache[0]: cached ino 15 when bufsize = 156 by ext2fs_read_inode_full()
+
+Then the ino 14 would hit the cache[1] when bufsize = 128 (but it was
+cached by bufsize = 156), so there would be errors.
+
+Upstream-Status: [Submitted]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/ext2fs/inode.c | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
+--- a/lib/ext2fs/inode.c
++++ b/lib/ext2fs/inode.c
+@@ -612,10 +612,12 @@ errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino,
+ #endif
+
+ /* Update the inode cache */
+- fs->icache->cache_last = (fs->icache->cache_last + 1) %
+- fs->icache->cache_size;
+- fs->icache->cache[fs->icache->cache_last].ino = ino;
+- fs->icache->cache[fs->icache->cache_last].inode = *inode;
++ if (bufsize == sizeof(struct ext2_inode)) {
++ fs->icache->cache_last = (fs->icache->cache_last + 1) %
++ fs->icache->cache_size;
++ fs->icache->cache[fs->icache->cache_last].ino = ino;
++ fs->icache->cache[fs->icache->cache_last].inode = *inode;
++ }
+
+ return 0;
+ }
+@@ -648,10 +650,12 @@ errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino,
+
+ /* Check to see if the inode cache needs to be updated */
+ if (fs->icache) {
+- for (i=0; i < fs->icache->cache_size; i++) {
+- if (fs->icache->cache[i].ino == ino) {
+- fs->icache->cache[i].inode = *inode;
+- break;
++ if (bufsize == sizeof(struct ext2_inode)) {
++ for (i=0; i < fs->icache->cache_size; i++) {
++ if (fs->icache->cache[i].ino == ino) {
++ fs->icache->cache[i].inode = *inode;
++ break;
++ }
+ }
+ }
+ } else {
+--
+1.8.1.2
+
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 @@
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mei Lei <lei.mei@intel.com>
+
+Index: e2fsprogs-1.41.5/po/Makefile.in.in
+===================================================================
+--- e2fsprogs-1.41.5.orig/po/Makefile.in.in 2009-02-14 13:49:08.000000000 +0000
++++ e2fsprogs-1.41.5/po/Makefile.in.in 2009-08-19 17:52:31.000000000 +0100
+@@ -30,7 +30,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ MKINSTALLDIRS = @MKINSTALLDIRS@
+-mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
++mkinstalldirs = $(MKINSTALLDIRS)
+
+ GMSGFMT = @GMSGFMT@
+ MSGFMT = @MSGFMT@
+Index: e2fsprogs-1.41.5/configure.in
+===================================================================
+--- e2fsprogs-1.41.5.orig/configure.in 2009-08-19 17:53:50.000000000 +0100
++++ e2fsprogs-1.41.5/configure.in 2009-08-19 17:48:38.000000000 +0100
+@@ -970,6 +970,8 @@
+ fi
+ AC_SUBST(BUILD_CFLAGS)
+ AC_SUBST(BUILD_LDFLAGS)
++MKINSTALLDIRS="mkdir -p"
++AC_SUBST(MKINSTALLDIRS)
+ dnl
+ dnl Make our output files, being sure that we create the some miscellaneous
+ 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 @@
+#!/bin/sh
+
+do_usage () {
+ cat << _EOF
+Usage: populate-extfs.sh <source> <device>
+Create an ext2/ext3/ext4 filesystem from a directory or file
+
+ source: The source directory or file
+ device: The target device
+
+_EOF
+ exit 1
+}
+
+[ $# -ne 2 ] && do_usage
+
+SRCDIR=${1%%/}
+DEVICE=$2
+DEBUGFS="debugfs"
+
+{
+ CWD="/"
+ find $SRCDIR | while read FILE; do
+ TGT="${FILE##*/}"
+ DIR="${FILE#$SRCDIR}"
+ DIR="${DIR%$TGT}"
+
+ # Skip the root dir
+ [ ! -z "$DIR" ] || continue
+ [ ! -z "$TGT" ] || continue
+
+ if [ "$DIR" != "$CWD" ]; then
+ echo "cd $DIR"
+ CWD="$DIR"
+ fi
+
+ # Only stat once since stat is a time consuming command
+ STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" "$FILE")
+ eval $STAT
+
+ case $TYPE in
+ "directory")
+ echo "mkdir $TGT"
+ ;;
+ "regular file" | "regular empty file")
+ echo "write \"$FILE\" \"$TGT\""
+ ;;
+ "symbolic link")
+ LINK_TGT=$(readlink "$FILE")
+ echo "symlink \"$TGT\" \"$LINK_TGT\""
+ ;;
+ "block special file")
+ echo "mknod \"$TGT\" b $DEVNO"
+ ;;
+ "character special file")
+ echo "mknod \"$TGT\" c $DEVNO"
+ ;;
+ "fifo")
+ echo "mknod \"$TGT\" p"
+ ;;
+ *)
+ echo "Unknown/unhandled file type '$TYPE' file: $FILE" 1>&2
+ ;;
+ esac
+
+ # Set the file mode
+ echo "sif \"$TGT\" mode 0x$MODE"
+
+ # Set uid and gid
+ echo "sif \"$TGT\" uid $U"
+ echo "sif \"$TGT\" gid $G"
+ done
+
+ # Handle the hard links.
+ # Save the hard links to a file, use the inode number as the filename, for example:
+ # If a and b's inode number is 6775928, save a and b to /tmp/tmp.VrCwHh5gdt/6775928.
+ INODE_DIR=`mktemp -d` || exit 1
+ for i in `find $SRCDIR -type f -links +1 -printf 'INODE=%i###FN=%p\n'`; do
+ eval `echo $i | sed 's$###$ $'`
+ echo ${FN#$SRCDIR} >>$INODE_DIR/$INODE
+ done
+ # Use the debugfs' ln and "sif links_count" to handle them.
+ for i in `ls $INODE_DIR`; do
+ # The link source
+ SRC=`head -1 $INODE_DIR/$i`
+ # Remove the files and link them again except the first one
+ for TGT in `sed -n -e '1!p' $INODE_DIR/$i`; do
+ echo "rm $TGT"
+ echo "ln $SRC $TGT"
+ done
+ LN_CNT=`cat $INODE_DIR/$i | wc -l`
+ # Set the links count
+ echo "sif $SRC links_count $LN_CNT"
+ done
+ rm -fr $INODE_DIR
+} | $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 @@
+When executing a script don't echo every command, as we do this for entire
+filesystems at rootfs time.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
+index 5590295..ac57292 100644
+--- a/debugfs/debugfs.c
++++ b/debugfs/debugfs.c
+@@ -2378,7 +2378,7 @@ static int source_file(const char *cmd_file, int ss_idx)
+ cp = strchr(buf, '\r');
+ if (cp)
+ *cp = 0;
+- printf("debugfs: %s\n", buf);
++ /*printf("debugfs: %s\n", buf);*/
+ retval = ss_execute_line(ss_idx, buf);
+ if (retval) {
+ 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 @@
+From b139e03ac2f72e644e547c7ee9b1514383af4d97 Mon Sep 17 00:00:00 2001
+From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
+Date: Wed, 30 Jan 2013 15:22:04 +0200
+Subject: [PATCH] When /etc/ld.so.cache is writeable by user running bitbake
+ then it creates invalid cache (in my case libstdc++.so
+ cannot be found after building zlib(-native) and I have to
+ call touch */libstdc++.so && /sbin/ldconfig to fix it.
+
+So remove ldconfig call from make install-libs
+
+Patch authored by Martin Jansa.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
+---
+ lib/Makefile.elf-lib | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib
+index 78479d3..4a4a5ac 100644
+--- a/lib/Makefile.elf-lib
++++ b/lib/Makefile.elf-lib
+@@ -50,8 +50,6 @@ install-shlibs install:: $(ELF_LIB) installdirs-elf-lib $(DEP_INSTALL_SYMLINK)
+ $(E) " SYMLINK $(libdir)/$(ELF_IMAGE).so"
+ $(Q) $(INSTALL_SYMLINK) $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(libdir)/$(ELF_IMAGE).so $(DESTDIR)
+- $(E) " LDCONFIG"
+- $(Q) -$(LDCONFIG)
+
+ install-strip: install
+ $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
+@@ -67,7 +65,6 @@ uninstall-shlibs uninstall::
+ $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
+ $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(DESTDIR)$(libdir)/$(ELF_IMAGE).so
+- -$(LDCONFIG)
+
+ clean::
+ $(RM) -rf elfshared
+--
+1.7.9.5
+