]> code.ossystems Code Review - openembedded-core.git/commitdiff
ipkg: Fix a problem with paths lengths triggering the use of GNU tar extensions and...
authorRichard Purdie <richard@openedhand.com>
Tue, 8 Aug 2006 12:18:53 +0000 (12:18 +0000)
committerRichard Purdie <richard@openedhand.com>
Tue, 8 Aug 2006 12:18:53 +0000 (12:18 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@596 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/ipkg/files/fix_tar_extension.patch [new file with mode: 0644]
meta/packages/ipkg/ipkg.inc
meta/packages/ipkg/ipkg_0.99.154.bb

diff --git a/meta/packages/ipkg/files/fix_tar_extension.patch b/meta/packages/ipkg/files/fix_tar_extension.patch
new file mode 100644 (file)
index 0000000..d9db5fc
--- /dev/null
@@ -0,0 +1,37 @@
+Index: C/libbb/unarchive.c
+===================================================================
+--- C.orig/libbb/unarchive.c   2005-02-05 16:58:19.000000000 -0500
++++ C/libbb/unarchive.c        2006-08-08 08:10:14.268431408 -0400
+@@ -28,7 +28,7 @@
+ #include "libbb.h"
+ #define CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY 1
+-// #define CONFIG_FEATURE_TAR_GNU_EXTENSIONS
++#define CONFIG_FEATURE_TAR_GNU_EXTENSIONS 1
+ #ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
+ static char *longname = NULL;
+@@ -657,7 +657,10 @@
+ # ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
+       case 'L': {
+                       longname = xmalloc(tar_entry->size + 1);
+-                      archive_xread_all((int) tar_stream, longname, tar_entry->size);
++                      if(fread(longname, tar_entry->size, 1, tar_stream) != 1) {
++                              error_msg("Short read in gnu extension");
++                              return(NULL);
++                      } 
+                       longname[tar_entry->size] = '\0';
+                       archive_offset += tar_entry->size;
+@@ -665,7 +668,10 @@
+               }
+       case 'K': {
+                       linkname = xmalloc(tar_entry->size + 1);
+-                      archive_xread_all((int) tar_stream, longname, tar_entry->size);
++                      if(fread(linkname, tar_entry->size, 1, tar_stream) != 1) {
++                              error_msg("Short read in gnu extension");
++                              return(NULL);
++                      } 
+                       linkname[tar_entry->size] = '\0';
+                       archive_offset += tar_entry->size;
index 8fc6c9efe0f5ae6150a6f0e08f85f12d804d0f8d..49bdd22c087b4d6b9d4a47588e750f0c236cee11 100644 (file)
@@ -10,6 +10,7 @@ FILES_libipkg = "${libdir}"
 AUTO_LIBNAME_PKGS = "libipkg"
 
 SRC_URI = "${HANDHELDS_CVS};module=familiar/dist/ipkg;tag=${@'V' + bb.data.getVar('PV',d,1).replace('.', '-')} \
+        file://fix_tar_extension.patch;patch=1 \
        file://terse.patch;patch=1"
 
 S = "${WORKDIR}/ipkg/C"
index de6af147b6119670de19260364c29738b6c69f8f..532072d38734d862ea1c88e20fed813e5467867b 100644 (file)
@@ -1,2 +1,2 @@
 include ipkg.inc
-PR = "r3"
+PR = "r4"