summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2011-02-23 13:04:45 +0100
committerMichael Grzeschik <m.grzeschik@pengutronix.de>2011-02-23 13:04:45 +0100
commite0c9fd107f802c269c8e628ef94bb3670548eac7 (patch)
treea503f4b620c3f8308a786d6566bca83b7af24768
parent0994538abfd22de2fc0524f08b6a32a8cb04829e (diff)
downloadptxdist-e0c9fd107f802c269c8e628ef94bb3670548eac7.tar.gz
ptxdist-e0c9fd107f802c269c8e628ef94bb3670548eac7.tar.xz
host-ipkg: fix long filenames issue in get_header_tar
-rw-r--r--patches/ipkg-0.99.163/0001-use-scripts-with-offlineroot.patch (renamed from patches/ipkg-0.99.163/ipkg-0.99.163-scripts-with-offlineroot.diff)20
-rw-r--r--patches/ipkg-0.99.163/0002-libbb-unarchive.c-fix-get_header_tar-long-filenames.patch73
-rw-r--r--patches/ipkg-0.99.163/series6
3 files changed, 90 insertions, 9 deletions
diff --git a/patches/ipkg-0.99.163/ipkg-0.99.163-scripts-with-offlineroot.diff b/patches/ipkg-0.99.163/0001-use-scripts-with-offlineroot.patch
index 09921dfae..f97c1c9e2 100644
--- a/patches/ipkg-0.99.163/ipkg-0.99.163-scripts-with-offlineroot.diff
+++ b/patches/ipkg-0.99.163/0001-use-scripts-with-offlineroot.patch
@@ -1,4 +1,6 @@
-Subject: use scripts with offlineroot
+From: unknown author <unknown.author@example.com>
+Date: Tue, 22 Feb 2011 17:48:08 +0100
+Subject: [PATCH] use scripts with offlineroot
The ipkg offline root mechanism avoids that the pre/post scripts are
being run. This patch re-enables the scripts; it makes it possible that
@@ -6,14 +8,15 @@ scripts can decide themselfs if they want to do something if DESTDIR is
set.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de
-
---
+ pkg.c | 6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
-Index: pkg.c
-===================================================================
---- pkg.c.orig
-+++ pkg.c
-@@ -1443,12 +1443,6 @@ int pkg_run_script(ipkg_conf_t *conf, pk
+diff --git a/pkg.c b/pkg.c
+index 64e7994..144e6e1 100644
+--- a/pkg.c
++++ b/pkg.c
+@@ -1443,12 +1443,6 @@ int pkg_run_script(ipkg_conf_t *conf, pkg_t *pkg,
return 0;
}
@@ -26,3 +29,6 @@ Index: pkg.c
sprintf_alloc(&cmd, "%s %s", path, args);
free(path);
+--
+1.7.2.3
+
diff --git a/patches/ipkg-0.99.163/0002-libbb-unarchive.c-fix-get_header_tar-long-filenames.patch b/patches/ipkg-0.99.163/0002-libbb-unarchive.c-fix-get_header_tar-long-filenames.patch
new file mode 100644
index 000000000..702ac6f19
--- /dev/null
+++ b/patches/ipkg-0.99.163/0002-libbb-unarchive.c-fix-get_header_tar-long-filenames.patch
@@ -0,0 +1,73 @@
+From: Michael Grzeschik <m.grzeschik@pengutronix.de>
+Date: Wed, 23 Feb 2011 12:10:19 +0100
+Subject: [PATCH] [libbb/unarchive.c] fix get_header_tar long filenames
+
+backported longlinksfix.patch from opkg svn-commit r594
+---
+ libbb/unarchive.c | 43 +++++++++++++++++++++++++++----------------
+ 1 files changed, 27 insertions(+), 16 deletions(-)
+
+diff --git a/libbb/unarchive.c b/libbb/unarchive.c
+index 0946ded..ffc5b9d 100644
+--- a/libbb/unarchive.c
++++ b/libbb/unarchive.c
+@@ -591,22 +591,6 @@ file_header_t *get_header_tar(FILE *tar_stream)
+ /* 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 if (linkname) {
+- tar_entry->name = linkname;
+- linkname = NULL;
+- } else
+-#endif
+- if (tar.formated.prefix[0] == 0) {
+- tar_entry->name = strdup(tar.formated.name);
+- } else {
+- tar_entry->name = concat_path_file(tar.formated.prefix, tar.formated.name);
+- }
+-
+ // tar_entry->name = xstrdup(tar.formated.name);
+
+ /*
+@@ -687,6 +671,33 @@ file_header_t *get_header_tar(FILE *tar_stream)
+
+ }
+
++#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);
+ }
+
+--
+1.7.2.3
+
diff --git a/patches/ipkg-0.99.163/series b/patches/ipkg-0.99.163/series
index e44d72abe..5946563a4 100644
--- a/patches/ipkg-0.99.163/series
+++ b/patches/ipkg-0.99.163/series
@@ -1,2 +1,4 @@
-ipkg-0.99.163-scripts-with-offlineroot.diff -p0
-
+# generated by git-ptx-patches
+0001-use-scripts-with-offlineroot.patch
+0002-libbb-unarchive.c-fix-get_header_tar-long-filenames.patch
+# 463f302f7a5dd0e570e366a2df5fa8d4 - git-ptx-patches magic