diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-22 18:30:24 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-22 18:30:24 +0000 |
commit | b1a2255b2d7f72ec2a9a196bfe5fc922e684446b (patch) | |
tree | 701a1c0a1199f8c11c497bf3c928c4c6c4a81c1f /meta/recipes-devtools/opkg/opkg/longlinksfix.patch | |
parent | 01cb362dd0a246aa1be47dc2715529185e719856 (diff) | |
download | poky-b1a2255b2d7f72ec2a9a196bfe5fc922e684446b.tar.gz |
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/opkg/opkg/longlinksfix.patch')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/longlinksfix.patch | 92 |
1 files changed, 92 insertions, 0 deletions
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 @@ | |||
1 | If a tarball contains a long symlink (over 100 chars) in a longpath (over 100 | ||
2 | chars) then the resulting link or path can be truncated to 100 chars. | ||
3 | |||
4 | This is due to a bug where if both 'L' and 'K' entries are found in the tarball, | ||
5 | only the first one takes affect due to get_header_tar recursively calling itself. | ||
6 | To fix this, process longname and linkname at the end of the function rather | ||
7 | than the start after any subcalls have taken place. | ||
8 | |||
9 | Richard Purdie | ||
10 | 22/12/2010 | ||
11 | |||
12 | Index: trunk/libbb/unarchive.c | ||
13 | =================================================================== | ||
14 | --- trunk.orig/libbb/unarchive.c 2010-12-22 18:14:52.575074849 +0000 | ||
15 | +++ trunk/libbb/unarchive.c 2010-12-22 18:16:01.845103832 +0000 | ||
16 | @@ -506,23 +506,7 @@ | ||
17 | /* convert to type'ed variables */ | ||
18 | tar_entry = xcalloc(1, sizeof(file_header_t)); | ||
19 | |||
20 | -#ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS | ||
21 | - if (longname) { | ||
22 | - tar_entry->name = longname; | ||
23 | - longname = NULL; | ||
24 | - } else | ||
25 | -#endif | ||
26 | - { | ||
27 | - tar_entry->name = xstrndup(tar.formated.name, 100); | ||
28 | |||
29 | - if (tar.formated.prefix[0]) { | ||
30 | - char *temp = tar_entry->name; | ||
31 | - char *prefixTemp = xstrndup(tar.formated.prefix, 155); | ||
32 | - tar_entry->name = concat_path_file(prefixTemp, temp); | ||
33 | - free(temp); | ||
34 | - free(prefixTemp); | ||
35 | - } | ||
36 | - } | ||
37 | |||
38 | // tar_entry->name = xstrdup(tar.formated.name); | ||
39 | |||
40 | @@ -535,16 +519,7 @@ | ||
41 | tar_entry->gid = strtol(tar.formated.gid, NULL, 8); | ||
42 | tar_entry->size = strtol(tar.formated.size, NULL, 8); | ||
43 | tar_entry->mtime = strtol(tar.formated.mtime, NULL, 8); | ||
44 | -#ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS | ||
45 | - if (linkname) { | ||
46 | - tar_entry->link_name = linkname; | ||
47 | - linkname = NULL; | ||
48 | - } else | ||
49 | -#endif | ||
50 | - { | ||
51 | - tar_entry->link_name = *tar.formated.linkname != '\0' ? | ||
52 | - xstrndup(tar.formated.linkname, 100) : NULL; | ||
53 | - } | ||
54 | + | ||
55 | tar_entry->device = (strtol(tar.formated.devmajor, NULL, 8) << 8) + | ||
56 | strtol(tar.formated.devminor, NULL, 8); | ||
57 | |||
58 | @@ -611,6 +586,34 @@ | ||
59 | |||
60 | } | ||
61 | |||
62 | + | ||
63 | +#ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS | ||
64 | + if (longname) { | ||
65 | + tar_entry->name = longname; | ||
66 | + longname = NULL; | ||
67 | + } else | ||
68 | +#endif | ||
69 | + { | ||
70 | + tar_entry->name = xstrndup(tar.formated.name, 100); | ||
71 | + | ||
72 | + if (tar.formated.prefix[0]) { | ||
73 | + char *temp = tar_entry->name; | ||
74 | + char *prefixTemp = xstrndup(tar.formated.prefix, 155); | ||
75 | + tar_entry->name = concat_path_file(prefixTemp, temp); | ||
76 | + free(temp); | ||
77 | + free(prefixTemp); | ||
78 | + } | ||
79 | + } | ||
80 | + | ||
81 | + if (linkname) { | ||
82 | + tar_entry->link_name = linkname; | ||
83 | + linkname = NULL; | ||
84 | + } else | ||
85 | + { | ||
86 | + tar_entry->link_name = *tar.formated.linkname != '\0' ? | ||
87 | + xstrndup(tar.formated.linkname, 100) : NULL; | ||
88 | + } | ||
89 | + | ||
90 | return(tar_entry); | ||
91 | } | ||
92 | |||