summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cpio
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-extended/cpio
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-extended/cpio')
-rw-r--r--meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch20
-rw-r--r--meta/recipes-extended/cpio/cpio-2.11/statdef.patch17
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch25
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch31
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/statdef.patch15
-rw-r--r--meta/recipes-extended/cpio/cpio_2.11.bb12
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb16
-rw-r--r--meta/recipes-extended/cpio/cpio_v2.inc40
8 files changed, 176 insertions, 0 deletions
diff --git a/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
new file mode 100644
index 0000000000..b4d113d3a5
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
@@ -0,0 +1,20 @@
1ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4
5Upstream-Status: Pending
6Index: cpio-2.11/gnu/stdio.in.h
7===================================================================
8--- cpio-2.11.orig/gnu/stdio.in.h 2012-07-04 12:13:43.133066247 -0700
9+++ cpio-2.11/gnu/stdio.in.h 2012-07-04 12:14:10.189067564 -0700
10@@ -138,8 +138,10 @@
11 /* It is very rare that the developer ever has full control of stdin,
12 so any use of gets warrants an unconditional warning. Assume it is
13 always declared, since it is required by C89. */
14+#if defined gets
15 #undef gets
16 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
17+#endif
18
19 #if @GNULIB_FOPEN@
20 # if @REPLACE_FOPEN@
diff --git a/meta/recipes-extended/cpio/cpio-2.11/statdef.patch b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
new file mode 100644
index 0000000000..a6b8e82a0b
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
@@ -0,0 +1,17 @@
1Avoid multiple stat definitions
2Patch taken from cpio mailing list posting 2010-03-19
3
4Upstream-Status: Pending
5
6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7
8diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
9--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
10+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
11@@ -82,4 +82,6 @@
12 #define lstat stat
13 #endif
14 int lstat ();
15+#ifndef stat
16 int stat ();
17+#endif
diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
new file mode 100644
index 0000000000..49a7cf52a6
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
2
3This patch avoids heap overflow reported by :
4http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
5
6This is a clean patch for the GPLv2 tar recipe.
7
8the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio
9recipe, as they share code.
10
11Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
12
13Index: tar-1.17/lib/rtapelib.c
14===================================================================
15--- tar-1.17.orig/lib/rtapelib.c
16+++ tar-1.17/lib/rtapelib.c
17@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
18
19 sprintf (command_buffer, "R%lu\n", (unsigned long) length);
20 if (do_command (handle, command_buffer) == -1
21- || (status = get_status (handle)) == SAFE_READ_ERROR)
22+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
23 return SAFE_READ_ERROR;
24
25 for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
new file mode 100644
index 0000000000..e16585dd3f
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
@@ -0,0 +1,31 @@
1Upstream-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
6diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
7--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700
8+++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700
9@@ -1,4 +1,4 @@
10-# serial 4 -*- Autoconf -*-
11+# serial 5 -*- Autoconf -*-
12 # Enable extensions on systems that normally disable them.
13
14 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
15@@ -16,6 +16,7 @@
16 # ------------------------
17 # Enable extensions on systems that normally disable them,
18 # typically due to standards-conformance issues.
19+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
20 AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
21 [
22 AC_BEFORE([$0], [AC_COMPILE_IFELSE])
23@@ -48,7 +49,7 @@
24 AC_DEFINE([__EXTENSIONS__])
25 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
26 AC_DEFINE([_TANDEM_SOURCE])
27-])
28+])])
29
30 # gl_USE_SYSTEM_EXTENSIONS
31 # ------------------------
diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
new file mode 100644
index 0000000000..a00799fea9
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [licensing]
2
3# Avoid multiple stat definitions
4# Patch taken from cpio mailing list posting 2010-03-19
5
6diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
7--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
8+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
9@@ -82,4 +82,6 @@
10 #define lstat stat
11 #endif
12 int lstat ();
13+#ifndef stat
14 int stat ();
15+#endif
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb
new file mode 100644
index 0000000000..5f88b30f1e
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -0,0 +1,12 @@
1include cpio_v2.inc
2
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
5
6PR = "r4"
7
8SRC_URI += "file://remove-gets.patch \
9 "
10
11SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
12SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
new file mode 100644
index 0000000000..b6da207b92
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -0,0 +1,16 @@
1require cpio_v2.inc
2
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
5
6PR = "r3"
7
8SRC_URI += "file://m4extensions.patch \
9 file://avoid_heap_overflow.patch \
10 "
11
12SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
13SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
14
15# Required to build with gcc 4.3 and later:
16CFLAGS += "-fgnu89-inline"
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc
new file mode 100644
index 0000000000..30446b0ced
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -0,0 +1,40 @@
1SUMMARY = "GNU cpio is a program to manage archives of files"
2DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
3another. It handles a number of cpio formats as well as reading and writing tar files."
4HOMEPAGE = "http://www.gnu.org/software/cpio/"
5SECTION = "base"
6
7DEPENDS = "texinfo-native"
8
9SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
10 file://statdef.patch \
11 "
12
13inherit autotools gettext
14
15S = "${WORKDIR}/cpio-${PV}"
16
17EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
18
19do_install () {
20 autotools_do_install
21 install -d ${D}${base_bindir}/
22 mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
23 rmdir ${D}${bindir}/
24}
25
26PACKAGES =+ "${PN}-rmt"
27
28FILES_${PN}-rmt = "${base_sbindir}/rmt*"
29
30inherit update-alternatives
31
32ALTERNATIVE_PRIORITY = "100"
33
34ALTERNATIVE_${PN} = "cpio"
35ALTERNATIVE_${PN}-rmt = "rmt"
36
37ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
38
39ALTERNATIVE_PRIORITY[rmt] = "50"
40ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"