diff options
Diffstat (limited to 'meta/recipes-extended/tar')
-rw-r--r-- | meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch | 22 | ||||
-rw-r--r-- | meta/recipes-extended/tar/tar-1.17/gcc43build.patch | 37 | ||||
-rw-r--r-- | meta/recipes-extended/tar/tar-1.17/m4extensions.patch | 30 | ||||
-rw-r--r-- | meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb | 6 | ||||
-rw-r--r-- | meta/recipes-extended/tar/tar.inc | 45 | ||||
-rw-r--r-- | meta/recipes-extended/tar/tar/remove-gets.patch | 22 | ||||
-rw-r--r-- | meta/recipes-extended/tar/tar_1.17.bb | 14 | ||||
-rw-r--r-- | meta/recipes-extended/tar/tar_1.27.1.bb | 10 |
8 files changed, 186 insertions, 0 deletions
diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch new file mode 100644 index 0000000000..da2ae3cb0f --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] | ||
2 | |||
3 | This patch avoids heap overflow reported by : | ||
4 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 | ||
5 | |||
6 | This is a clean patch for the GPLv2 tar recipe. | ||
7 | |||
8 | Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25 | ||
9 | |||
10 | Index: tar-1.17/lib/rtapelib.c | ||
11 | =================================================================== | ||
12 | --- tar-1.17.orig/lib/rtapelib.c | ||
13 | +++ tar-1.17/lib/rtapelib.c | ||
14 | @@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si | ||
15 | |||
16 | sprintf (command_buffer, "R%lu\n", (unsigned long) length); | ||
17 | if (do_command (handle, command_buffer) == -1 | ||
18 | - || (status = get_status (handle)) == SAFE_READ_ERROR) | ||
19 | + || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) | ||
20 | return SAFE_READ_ERROR; | ||
21 | |||
22 | for (counter = 0; counter < status; counter += rlen, buffer += rlen) | ||
diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch new file mode 100644 index 0000000000..f8059a0a89 --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | # Fix errors when built with gcc 4.3 | ||
4 | # Patch taken from Debian bug #452096 | ||
5 | |||
6 | diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h | ||
7 | --- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800 | ||
8 | +++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700 | ||
9 | @@ -198,7 +198,11 @@ | ||
10 | #endif | ||
11 | |||
12 | #ifndef ARGP_FS_EI | ||
13 | -#define ARGP_FS_EI extern inline | ||
14 | + #if defined __GNUC_STDC_INLINE__ | ||
15 | + #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__)) | ||
16 | + #else | ||
17 | + #define ARGP_FS_EI extern inline | ||
18 | + #endif | ||
19 | #endif | ||
20 | |||
21 | ARGP_FS_EI size_t | ||
22 | diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h | ||
23 | --- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700 | ||
24 | +++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700 | ||
25 | @@ -580,7 +580,11 @@ | ||
26 | # endif | ||
27 | |||
28 | # ifndef ARGP_EI | ||
29 | -# define ARGP_EI extern __inline__ | ||
30 | +# if defined __GNUC_STDC_INLINE__ | ||
31 | +# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__)) | ||
32 | +# else | ||
33 | +# define ARGP_EI extern __inline__ | ||
34 | +# endif | ||
35 | # endif | ||
36 | |||
37 | ARGP_EI void | ||
diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch new file mode 100644 index 0000000000..30534c29ce --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | # Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. | ||
4 | # This is needed to configure correctly with newer versions of autoconf. | ||
5 | |||
6 | --- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700 | ||
7 | +++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700 | ||
8 | @@ -1,4 +1,4 @@ | ||
9 | -# serial 4 -*- Autoconf -*- | ||
10 | +# serial 5 -*- Autoconf -*- | ||
11 | # Enable extensions on systems that normally disable them. | ||
12 | |||
13 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | ||
14 | @@ -16,6 +16,7 @@ | ||
15 | # ------------------------ | ||
16 | # Enable extensions on systems that normally disable them, | ||
17 | # typically due to standards-conformance issues. | ||
18 | +m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ | ||
19 | AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
20 | [ | ||
21 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
22 | @@ -48,7 +49,7 @@ | ||
23 | AC_DEFINE([__EXTENSIONS__]) | ||
24 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
25 | AC_DEFINE([_TANDEM_SOURCE]) | ||
26 | -]) | ||
27 | +])]) | ||
28 | |||
29 | # gl_USE_SYSTEM_EXTENSIONS | ||
30 | # ------------------------ | ||
diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb b/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb new file mode 100644 index 0000000000..071ede765b --- /dev/null +++ b/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require tar_${PV}.bb | ||
2 | |||
3 | inherit native | ||
4 | |||
5 | BPN = "tar" | ||
6 | EXTRAINSTALL = "" | ||
diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc new file mode 100644 index 0000000000..51d49340a1 --- /dev/null +++ b/meta/recipes-extended/tar/tar.inc | |||
@@ -0,0 +1,45 @@ | |||
1 | SUMMARY = "GNU file archiving program" | ||
2 | DESCRIPTION = "GNU tar saves many files together into a single tape \ | ||
3 | or disk archive, and can restore individual files from the archive." | ||
4 | HOMEPAGE = "http://www.gnu.org/software/tar/" | ||
5 | SECTION = "base" | ||
6 | |||
7 | SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" | ||
8 | |||
9 | inherit autotools gettext texinfo | ||
10 | |||
11 | EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" | ||
12 | |||
13 | EXTRAINSTALL = "do_install_extra" | ||
14 | EXTRAINSTALL_class-nativesdk = "" | ||
15 | |||
16 | do_install () { | ||
17 | autotools_do_install | ||
18 | ${EXTRAINSTALL} | ||
19 | } | ||
20 | |||
21 | do_install_extra () { | ||
22 | install -d ${D}${base_bindir} | ||
23 | mv ${D}${bindir}/tar ${D}${base_bindir}/tar | ||
24 | rmdir ${D}${bindir}/ | ||
25 | } | ||
26 | |||
27 | PACKAGES =+ "${PN}-rmt" | ||
28 | |||
29 | PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl," | ||
30 | |||
31 | FILES_${PN}-rmt = "${base_sbindir}/rmt*" | ||
32 | |||
33 | inherit update-alternatives | ||
34 | |||
35 | ALTERNATIVE_PRIORITY = "100" | ||
36 | |||
37 | ALTERNATIVE_${PN} = "tar" | ||
38 | ALTERNATIVE_${PN}-rmt = "rmt" | ||
39 | ALTERNATIVE_${PN}_class-nativesdk = "" | ||
40 | ALTERNATIVE_${PN}-rmt_class-nativesdk = "" | ||
41 | |||
42 | ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" | ||
43 | ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" | ||
44 | |||
45 | BBCLASSEXTEND = "nativesdk" | ||
diff --git a/meta/recipes-extended/tar/tar/remove-gets.patch b/meta/recipes-extended/tar/tar/remove-gets.patch new file mode 100644 index 0000000000..0b8be39eed --- /dev/null +++ b/meta/recipes-extended/tar/tar/remove-gets.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Index: tar-1.27/gnu/stdio.in.h | ||
7 | =================================================================== | ||
8 | --- tar-1.27.orig/gnu/stdio.in.h 2013-06-29 08:54:26.000000000 +0300 | ||
9 | +++ tar-1.27/gnu/stdio.in.h 2013-10-16 15:22:46.977204737 +0300 | ||
10 | @@ -710,10 +710,12 @@ | ||
11 | /* It is very rare that the developer ever has full control of stdin, | ||
12 | so any use of gets warrants an unconditional warning; besides, C11 | ||
13 | removed it. */ | ||
14 | +#if defined gets | ||
15 | #undef gets | ||
16 | #if HAVE_RAW_DECL_GETS | ||
17 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
18 | #endif | ||
19 | +#endif | ||
20 | |||
21 | |||
22 | #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ | ||
diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb new file mode 100644 index 0000000000..b9ca2063df --- /dev/null +++ b/meta/recipes-extended/tar/tar_1.17.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | require tar.inc | ||
2 | |||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
5 | |||
6 | PR = "r3" | ||
7 | |||
8 | SRC_URI += "file://m4extensions.patch \ | ||
9 | file://gcc43build.patch \ | ||
10 | file://avoid_heap_overflow.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290" | ||
14 | SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492" | ||
diff --git a/meta/recipes-extended/tar/tar_1.27.1.bb b/meta/recipes-extended/tar/tar_1.27.1.bb new file mode 100644 index 0000000000..439bb500b9 --- /dev/null +++ b/meta/recipes-extended/tar/tar_1.27.1.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require tar.inc | ||
2 | |||
3 | LICENSE = "GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
5 | |||
6 | SRC_URI += "file://remove-gets.patch \ | ||
7 | " | ||
8 | |||
9 | SRC_URI[md5sum] = "490e074dd7e71f553df8357a7ef9bdcf" | ||
10 | SRC_URI[sha256sum] = "9b0fb3ce8512059337add0da5f8f0f7d7647f2201f5ece24581d620ea60337c6" | ||