summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-12-22 18:30:24 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-22 18:30:24 +0000
commitb1a2255b2d7f72ec2a9a196bfe5fc922e684446b (patch)
tree701a1c0a1199f8c11c497bf3c928c4c6c4a81c1f /meta/recipes-devtools
parent01cb362dd0a246aa1be47dc2715529185e719856 (diff)
downloadopenembedded-core-b1a2255b2d7f72ec2a9a196bfe5fc922e684446b.tar.gz
openembedded-core-b1a2255b2d7f72ec2a9a196bfe5fc922e684446b.tar.bz2
openembedded-core-b1a2255b2d7f72ec2a9a196bfe5fc922e684446b.zip
opkg: Update to svn r590 to fix symbolic link issues
See the longlinksfix patch for details but symlinks over 100 chars long were broken in sdk tarballs and its due to problems in the inbuilt tar in libbb in opkg. The patch fixes this and switched to svn r590 which already had partial fixes. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch17
-rw-r--r--meta/recipes-devtools/opkg/opkg/logfix.patch23
-rw-r--r--meta/recipes-devtools/opkg/opkg/longlinksfix.patch92
-rw-r--r--meta/recipes-devtools/opkg/opkg_svn.bb8
4 files changed, 96 insertions, 44 deletions
diff --git a/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch b/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch
deleted file mode 100644
index 4b12448155..0000000000
--- a/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Rebase for the latest version
-Dongxiao Xu <dongxiao.xu@intel.com>
-
-diff -ruN opkg-0.1.8-orig/libbb/unarchive.c opkg-0.1.8/libbb/unarchive.c
---- opkg-0.1.8-orig/libbb/unarchive.c 2010-07-20 09:39:02.266424893 +0800
-+++ opkg-0.1.8/libbb/unarchive.c 2010-07-20 09:39:50.474435569 +0800
-@@ -523,6 +523,10 @@
- }
- }
-
-+ if (strlen(tar_entry->name) > 100) {
-+ tar_entry->name[100] = 0;
-+ }
-+
- // tar_entry->name = xstrdup(tar.formated.name);
-
- /*
diff --git a/meta/recipes-devtools/opkg/opkg/logfix.patch b/meta/recipes-devtools/opkg/opkg/logfix.patch
deleted file mode 100644
index da06f00bd0..0000000000
--- a/meta/recipes-devtools/opkg/opkg/logfix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Patch to remove "duplicate" bits of logs from opkg output, which
-massively simplifies do_rootfs logs. The reason is we get unflushed
-data passed to the children and duplicated.
-
-RP - 26/1/10
-
-Index: trunk/libbb/gz_open.c
-===================================================================
---- trunk.orig/libbb/gz_open.c 2010-01-26 23:12:10.000000000 +0000
-+++ trunk/libbb/gz_open.c 2010-01-26 23:12:17.000000000 +0000
-@@ -38,6 +38,12 @@
- perror_msg("pipe");
- return(NULL);
- }
-+
-+ /* If we don't flush, we end up with two copies of anything pending,
-+ one from the parent, one from the child */
-+ fflush(stdout);
-+ fflush(stderr);
-+
- if ((*pid = fork()) == -1) {
- perror_msg("fork");
- return(NULL);
diff --git a/meta/recipes-devtools/opkg/opkg/longlinksfix.patch b/meta/recipes-devtools/opkg/opkg/longlinksfix.patch
new file mode 100644
index 0000000000..6908392932
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/longlinksfix.patch
@@ -0,0 +1,92 @@
+If a tarball contains a long symlink (over 100 chars) in a longpath (over 100
+chars) then the resulting link or path can be truncated to 100 chars.
+
+This is due to a bug where if both 'L' and 'K' entries are found in the tarball,
+only the first one takes affect due to get_header_tar recursively calling itself.
+To fix this, process longname and linkname at the end of the function rather
+than the start after any subcalls have taken place.
+
+Richard Purdie
+22/12/2010
+
+Index: trunk/libbb/unarchive.c
+===================================================================
+--- trunk.orig/libbb/unarchive.c 2010-12-22 18:14:52.575074849 +0000
++++ trunk/libbb/unarchive.c 2010-12-22 18:16:01.845103832 +0000
+@@ -506,23 +506,7 @@
+ /* convert to type'ed variables */
+ tar_entry = xcalloc(1, sizeof(file_header_t));
+
+-#ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
+- if (longname) {
+- tar_entry->name = longname;
+- longname = NULL;
+- } else
+-#endif
+- {
+- tar_entry->name = xstrndup(tar.formated.name, 100);
+
+- if (tar.formated.prefix[0]) {
+- char *temp = tar_entry->name;
+- char *prefixTemp = xstrndup(tar.formated.prefix, 155);
+- tar_entry->name = concat_path_file(prefixTemp, temp);
+- free(temp);
+- free(prefixTemp);
+- }
+- }
+
+ // tar_entry->name = xstrdup(tar.formated.name);
+
+@@ -535,16 +519,7 @@
+ tar_entry->gid = strtol(tar.formated.gid, NULL, 8);
+ tar_entry->size = strtol(tar.formated.size, NULL, 8);
+ tar_entry->mtime = strtol(tar.formated.mtime, NULL, 8);
+-#ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
+- if (linkname) {
+- tar_entry->link_name = linkname;
+- linkname = NULL;
+- } else
+-#endif
+- {
+- tar_entry->link_name = *tar.formated.linkname != '\0' ?
+- xstrndup(tar.formated.linkname, 100) : NULL;
+- }
++
+ tar_entry->device = (strtol(tar.formated.devmajor, NULL, 8) << 8) +
+ strtol(tar.formated.devminor, NULL, 8);
+
+@@ -611,6 +586,34 @@
+
+ }
+
++
++#ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
++ if (longname) {
++ tar_entry->name = longname;
++ longname = NULL;
++ } else
++#endif
++ {
++ tar_entry->name = xstrndup(tar.formated.name, 100);
++
++ if (tar.formated.prefix[0]) {
++ char *temp = tar_entry->name;
++ char *prefixTemp = xstrndup(tar.formated.prefix, 155);
++ tar_entry->name = concat_path_file(prefixTemp, temp);
++ free(temp);
++ free(prefixTemp);
++ }
++ }
++
++ if (linkname) {
++ tar_entry->link_name = linkname;
++ linkname = NULL;
++ } else
++ {
++ tar_entry->link_name = *tar.formated.linkname != '\0' ?
++ xstrndup(tar.formated.linkname, 100) : NULL;
++ }
++
+ return(tar_entry);
+ }
+
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 518c767354..7a9e90e76b 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -9,15 +9,15 @@ RDEPENDS_${PN}_virtclass-nativesdk = ""
PACKAGE_ARCH_update-alternatives-cworth = "all"
SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
- file://opkg_unarchive.patch \
file://add_vercmp.patch \
file://headerfix.patch \
- file://logfix.patch"
+ file://longlinksfix.patch \
+"
S = "${WORKDIR}/trunk"
-PV = "0.0+svnr${SRCREV}"
-PR = "r15"
+PV = "0.1.8+svnr${SRCREV}"
+PR = "r1"
PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"