summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-06-16 20:02:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-08 17:20:57 +0100
commite5fef6bc21c1046a8f08c27f8fcb27322d56008b (patch)
tree55ef509bdab736527436a369510f0938c1f82914 /meta
parentb626de02f78af6189a115d2f3eb94a24fbd5bc16 (diff)
downloadpoky-e5fef6bc21c1046a8f08c27f8fcb27322d56008b.tar.gz
libarchive: add 2.8.4 version
This recipe has been imported from OpenEmbedded (rev 6db4b9050e0e8b963e2a6b63790e48e3042ea99e). (From OE-Core rev: 292a45064aa9926868c798341dc72f183c5de076) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch42
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch31
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch63
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch33
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch31
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch28
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch31
-rw-r--r--meta/recipes-extended/libarchive/libarchive_2.8.4.bb25
8 files changed, 284 insertions, 0 deletions
diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch b/meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch
new file mode 100644
index 0000000000..f65f89f46b
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch
@@ -0,0 +1,42 @@
1libarchive: Backport patch from upstream (revision 1990)
2
3Upstream-Status: Backport
4
5Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
6
7diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
8index 7473c50..27671df 100644
9--- a/libarchive/archive_read_disk_entry_from_file.c
10+++ b/libarchive/archive_read_disk_entry_from_file.c
11@@ -163,15 +163,26 @@ archive_read_disk_entry_from_file(struct archive *_a,
12
13 #ifdef HAVE_READLINK
14 if (S_ISLNK(st->st_mode)) {
15- char linkbuffer[PATH_MAX + 1];
16- int lnklen = readlink(path, linkbuffer, PATH_MAX);
17+ size_t linkbuffer_len = st->st_size + 1;
18+ char *linkbuffer;
19+ int lnklen;
20+
21+ linkbuffer = malloc(linkbuffer_len);
22+ if (linkbuffer == NULL) {
23+ archive_set_error(&a->archive, ENOMEM,
24+ "Couldn't read link data");
25+ return (ARCHIVE_FAILED);
26+ }
27+ lnklen = readlink(path, linkbuffer, linkbuffer_len);
28 if (lnklen < 0) {
29 archive_set_error(&a->archive, errno,
30 "Couldn't read link data");
31+ free(linkbuffer);
32 return (ARCHIVE_FAILED);
33 }
34 linkbuffer[lnklen] = 0;
35 archive_entry_set_symlink(entry, linkbuffer);
36+ free(linkbuffer);
37 }
38 #endif
39
40--
411.7.1
42
diff --git a/meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch b/meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch
new file mode 100644
index 0000000000..6ece7f3899
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch
@@ -0,0 +1,31 @@
1libarchive: Backport patch from upstream (revision 1991)
2
3Upstream-Status: Backport
4
5Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
6
7diff --git a/libarchive/archive_write_disk.c b/libarchive/archive_write_disk.c
8index caf958e..60699e0 100644
9--- a/libarchive/archive_write_disk.c
10+++ b/libarchive/archive_write_disk.c
11@@ -434,7 +434,7 @@ _archive_write_header(struct archive *_a, struct archive_entry *entry)
12 if (ret != ARCHIVE_OK)
13 goto done;
14 }
15-#ifdef HAVE_FCHDIR
16+#if defined(HAVE_FCHDIR) && defined(PATH_MAX)
17 /* If path exceeds PATH_MAX, shorten the path. */
18 edit_deep_directories(a);
19 #endif
20@@ -866,7 +866,7 @@ archive_write_disk_new(void)
21 * object creation is likely to fail, but any error will get handled
22 * at that time.
23 */
24-#ifdef HAVE_FCHDIR
25+#if defined(HAVE_FCHDIR) && defined(PATH_MAX)
26 static void
27 edit_deep_directories(struct archive_write_disk *a)
28 {
29--
301.7.1
31
diff --git a/meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch b/meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch
new file mode 100644
index 0000000000..0193a07d19
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch
@@ -0,0 +1,63 @@
1libarchive: Backport patch from upstream (rev 2516)
2
3Fix Issue 100: Allow a zero for the Type M Path Table Location, since
4WinISO (and probably other programs) set it this way.
5
6http://code.google.com/p/libarchive/source/detail?r=2516
7
8Upstream-Status: Backport
9
10Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11
12diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
13index 0c640c8..fdef3fb 100644
14--- a/libarchive/archive_read_support_format_iso9660.c
15+++ b/libarchive/archive_read_support_format_iso9660.c
16@@ -714,11 +714,13 @@ isSVD(struct iso9660 *iso9660, const unsigned char *h)
17 if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
18 return (0);
19
20- /* Location of Occurrence of Type M Path Table must be
21- * available location,
22+ /* The Type M Path Table must be at a valid location (WinISO
23+ * and probably other programs omit this, so we allow zero)
24+ *
25 * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
26 location = archive_be32dec(h+SVD_type_M_path_table_offset);
27- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
28+ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2)
29+ || location >= volume_block)
30 return (0);
31
32 /* Read Root Directory Record in Volume Descriptor. */
33@@ -790,7 +792,8 @@ isEVD(struct iso9660 *iso9660, const unsigned char *h)
34 * available location,
35 * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
36 location = archive_be32dec(h+PVD_type_m_path_table_offset);
37- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
38+ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2)
39+ || location >= volume_block)
40 return (0);
41
42 /* Reserved field must be 0. */
43@@ -865,11 +868,14 @@ isPVD(struct iso9660 *iso9660, const unsigned char *h)
44 if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
45 return (0);
46
47- /* Location of Occurrence of Type M Path Table must be
48- * available location,
49+ /* The Type M Path Table must also be at a valid location
50+ * (although ECMA 119 requires a Type M Path Table, WinISO and
51+ * probably other programs omit it, so we permit a zero here)
52+ *
53 * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
54 location = archive_be32dec(h+PVD_type_m_path_table_offset);
55- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
56+ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2)
57+ || location >= volume_block)
58 return (0);
59
60 /* Reserved field must be 0. */
61--
621.7.1
63
diff --git a/meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch b/meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch
new file mode 100644
index 0000000000..eaa9ad0813
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch
@@ -0,0 +1,33 @@
1libarchive: Backport patch from upstream (rev 2514)
2
3Enable version stripping code in joliet extension support for iso9660.
4
5http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=587316
6
7Upstream-Status: Backport
8
9Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
10
11diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
12index fdef3fb..8dcfeb4 100644
13--- a/libarchive/archive_read_support_format_iso9660.c
14+++ b/libarchive/archive_read_support_format_iso9660.c
15@@ -1755,7 +1755,6 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
16 }
17 *wp = L'\0';
18
19-#if 0 /* untested code, is it at all useful on Joliet? */
20 /* trim trailing first version and dot from filename.
21 *
22 * Remember we where in UTF-16BE land!
23@@ -1775,7 +1774,6 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
24 /* Chop off trailing '.' from filenames. */
25 if (*(wp-1) == '.')
26 *(--wp) = L'\0';
27-#endif
28
29 /* store the result in the file name field. */
30 archive_strappend_w_utf8(&file->name, wbuff);
31--
321.7.1
33
diff --git a/meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch b/meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch
new file mode 100644
index 0000000000..dd8ac6a876
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch
@@ -0,0 +1,31 @@
1libarchive: Backport patch from upstream (rev 2520)
2
3Fix version/dot stripping code in joliet extension of iso9660.
4
5Upstream-Status: Backport
6
7Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
8
9diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
10index 8dcfeb4..2d3a855 100644
11--- a/libarchive/archive_read_support_format_iso9660.c
12+++ b/libarchive/archive_read_support_format_iso9660.c
13@@ -1766,13 +1766,13 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
14 * *, /, :, ;, ? and \.
15 */
16 /* Chop off trailing ';1' from files. */
17- if (*(wp-2) == ';' && *(wp-1) == '1') {
18+ if (*(wp-2) == L';' && *(wp-1) == L'1') {
19 wp-=2;
20 *wp = L'\0';
21 }
22
23 /* Chop off trailing '.' from filenames. */
24- if (*(wp-1) == '.')
25+ if (*(wp-1) == L'.')
26 *(--wp) = L'\0';
27
28 /* store the result in the file name field. */
29--
301.7.1
31
diff --git a/meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch b/meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch
new file mode 100644
index 0000000000..b55ae1701a
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch
@@ -0,0 +1,28 @@
1libarchive: Backport patch from upstream (rev 2521).
2
3Disable dot stripping code since it's still broken
4and noone has been able to figure it out (yet).
5
6Upstream-Status: Backport
7
8Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9
10diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
11index 2d3a855..8661532 100644
12--- a/libarchive/archive_read_support_format_iso9660.c
13+++ b/libarchive/archive_read_support_format_iso9660.c
14@@ -1771,9 +1771,11 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
15 *wp = L'\0';
16 }
17
18+#if 0 /* XXX: this somehow manages to strip of single-character file extensions, like '.c'. */
19 /* Chop off trailing '.' from filenames. */
20 if (*(wp-1) == L'.')
21 *(--wp) = L'\0';
22+#endif
23
24 /* store the result in the file name field. */
25 archive_strappend_w_utf8(&file->name, wbuff);
26--
271.7.1
28
diff --git a/meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch b/meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch
new file mode 100644
index 0000000000..b5465a3385
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch
@@ -0,0 +1,31 @@
1libarchive: Ignore ENOSYS error when setting up xattrs. (Closes: #588925)
2
3Modestas Vainius found out that HPPA returns errno ENOSYS
4on listxattrs. Currently, ENOTSUP is ignored so we'll do the
5same for ENOSYS as well.
6
7For full debug info about this see Modestas Vainius awesome
8report at:
9
10http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588925#10
11
12Upstream-Status: Pending
13
14Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
15
16diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
17index 27671df..c49e755 100644
18--- a/libarchive/archive_read_disk_entry_from_file.c
19+++ b/libarchive/archive_read_disk_entry_from_file.c
20@@ -398,7 +398,7 @@ setup_xattrs(struct archive_read_disk *a,
21 list_size = listxattr(path, NULL, 0);
22
23 if (list_size == -1) {
24- if (errno == ENOTSUP)
25+ if (errno == ENOTSUP || errno == ENOSYS)
26 return (ARCHIVE_OK);
27 archive_set_error(&a->archive, errno,
28 "Couldn't list extended attributes");
29--
301.7.1
31
diff --git a/meta/recipes-extended/libarchive/libarchive_2.8.4.bb b/meta/recipes-extended/libarchive/libarchive_2.8.4.bb
new file mode 100644
index 0000000000..6d4fb39d1e
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive_2.8.4.bb
@@ -0,0 +1,25 @@
1DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
2HOMEPAGE = "http://code.google.com/p/libarchive/"
3SECTION = "devel"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://COPYING;md5=4255e2e6f0349a4ac8fbd68459296e46"
6PR = "r0"
7
8DEPENDS = "libxml2"
9
10SRC_URI = "http://libarchive.googlecode.com/files/libarchive-${PV}.tar.gz \
11 file://0001-Patch-from-upstream-revision-1990.patch \
12 file://0002-Patch-from-upstream-revision-1991.patch \
13 file://0003-Patch-from-upstream-rev-2516.patch \
14 file://0004-Patch-from-upstream-rev-2514.patch \
15 file://0005-Patch-from-upstream-rev-2520.patch \
16 file://0006-Patch-from-upstream-rev-2521.patch \
17 file://0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch \
18 "
19
20SRC_URI[md5sum] = "83b237a542f27969a8d68ac217dc3796"
21SRC_URI[sha256sum] = "86cffa3eaa28d3116f5d0b20284026c3762cf4a2b52b9844df2b494d4a89f688"
22
23inherit autotools lib_package
24
25BBCLASSEXTEND = "nativesdk"