From f4cf9fe05bb3f32fabea4e54dd92d368967a80da Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 14:36:22 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- .../cpio/cpio-2.11/remove-gets.patch | 20 +++++++++++ meta/recipes-extended/cpio/cpio-2.11/statdef.patch | 17 +++++++++ .../cpio/cpio-2.8/avoid_heap_overflow.patch | 25 ++++++++++++++ .../cpio/cpio-2.8/m4extensions.patch | 31 +++++++++++++++++ meta/recipes-extended/cpio/cpio-2.8/statdef.patch | 15 ++++++++ meta/recipes-extended/cpio/cpio_2.11.bb | 12 +++++++ meta/recipes-extended/cpio/cpio_2.8.bb | 16 +++++++++ meta/recipes-extended/cpio/cpio_v2.inc | 40 ++++++++++++++++++++++ 8 files changed, 176 insertions(+) create mode 100644 meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.11/statdef.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.8/statdef.patch create mode 100644 meta/recipes-extended/cpio/cpio_2.11.bb create mode 100644 meta/recipes-extended/cpio/cpio_2.8.bb create mode 100644 meta/recipes-extended/cpio/cpio_v2.inc (limited to 'meta/recipes-extended/cpio') 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 @@ +ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +Index: cpio-2.11/gnu/stdio.in.h +=================================================================== +--- cpio-2.11.orig/gnu/stdio.in.h 2012-07-04 12:13:43.133066247 -0700 ++++ cpio-2.11/gnu/stdio.in.h 2012-07-04 12:14:10.189067564 -0700 +@@ -138,8 +138,10 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ ++#if defined gets + #undef gets + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # 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 @@ +Avoid multiple stat definitions +Patch taken from cpio mailing list posting 2010-03-19 + +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h +--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 ++++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 +@@ -82,4 +82,6 @@ + #define lstat stat + #endif + int lstat (); ++#ifndef stat + int stat (); ++#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 @@ +Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] + +This patch avoids heap overflow reported by : +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 + +This is a clean patch for the GPLv2 tar recipe. + +the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio +recipe, as they share code. + +Nitin A Kamble 2011/04/25 + +Index: tar-1.17/lib/rtapelib.c +=================================================================== +--- tar-1.17.orig/lib/rtapelib.c ++++ tar-1.17/lib/rtapelib.c +@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si + + sprintf (command_buffer, "R%lu\n", (unsigned long) length); + if (do_command (handle, command_buffer) == -1 +- || (status = get_status (handle)) == SAFE_READ_ERROR) ++ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) + return SAFE_READ_ERROR; + + 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 @@ +Upstream-Status: Inappropriate [licensing] + +# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. +# This is needed to configure correctly with newer versions of autoconf. + +diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4 +--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700 ++++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700 +@@ -1,4 +1,4 @@ +-# serial 4 -*- Autoconf -*- ++# serial 5 -*- Autoconf -*- + # Enable extensions on systems that normally disable them. + + # Copyright (C) 2003, 2006 Free Software Foundation, Inc. +@@ -16,6 +16,7 @@ + # ------------------------ + # Enable extensions on systems that normally disable them, + # typically due to standards-conformance issues. ++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ + AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], + [ + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) +@@ -48,7 +49,7 @@ + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + AC_DEFINE([_TANDEM_SOURCE]) +-]) ++])]) + + # gl_USE_SYSTEM_EXTENSIONS + # ------------------------ 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 @@ +Upstream-Status: Inappropriate [licensing] + +# Avoid multiple stat definitions +# Patch taken from cpio mailing list posting 2010-03-19 + +diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h +--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 ++++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 +@@ -82,4 +82,6 @@ + #define lstat stat + #endif + int lstat (); ++#ifndef stat + int stat (); ++#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 @@ +include cpio_v2.inc + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" + +PR = "r4" + +SRC_URI += "file://remove-gets.patch \ + " + +SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" +SRC_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 @@ +require cpio_v2.inc + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" + +PR = "r3" + +SRC_URI += "file://m4extensions.patch \ + file://avoid_heap_overflow.patch \ + " + +SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1" +SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad" + +# Required to build with gcc 4.3 and later: +CFLAGS += "-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 @@ +SUMMARY = "GNU cpio is a program to manage archives of files" +DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \ +another. It handles a number of cpio formats as well as reading and writing tar files." +HOMEPAGE = "http://www.gnu.org/software/cpio/" +SECTION = "base" + +DEPENDS = "texinfo-native" + +SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ + file://statdef.patch \ + " + +inherit autotools gettext + +S = "${WORKDIR}/cpio-${PV}" + +EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" + +do_install () { + autotools_do_install + install -d ${D}${base_bindir}/ + mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" + rmdir ${D}${bindir}/ +} + +PACKAGES =+ "${PN}-rmt" + +FILES_${PN}-rmt = "${base_sbindir}/rmt*" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "cpio" +ALTERNATIVE_${PN}-rmt = "rmt" + +ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" + +ALTERNATIVE_PRIORITY[rmt] = "50" +ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" -- cgit v1.2.3-54-g00ecf