Return-Path: Received: from heian.cn.fujitsu.com (unknown [59.151.112.132]) by mail.openembedded.org (Postfix) with ESMTP id 4BE1D72027 for ; Fri, 9 Jan 2015 06:36:19 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="55799152" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 09 Jan 2015 14:32:54 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t096Zk4R022887 for ; Fri, 9 Jan 2015 14:35:46 +0800 Received: from localhost.localdomain (10.167.226.48) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Fri, 9 Jan 2015 14:36:23 +0800 From: Lei Maohui To: Date: Fri, 9 Jan 2015 14:35:39 +0800 Message-ID: <1420785339-18761-1-git-send-email-leimaohui@cn.fujitsu.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.167.226.48] Subject: [met-oe][PATCH] crash: add new recipe X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2015 06:36:25 -0000 Content-Type: text/plain crash core analysis suite Signed-off-by: Lei Maohui --- .../0001-cross_add_configure_option.patch | 34 ++++++ .../crash/crash-7.0.9/0001-lzo_snappy.patch | 39 +++++++ .../7001force_define_architecture.patch | 13 +++ .../7002cross_add_configure_option.patch | 21 ++++ .../crash/crash-7.0.9/7003cross_ranlib.patch | 10 ++ .../crash/crash-7.0.9/config-site.crash-7.0.9 | 1 + .../crash/crash-7.0.9/lzo_snappy.patch | 100 +++++++++++++++++ .../crash/crash-7.0.9/use_system_readline.patch | 120 +++++++++++++++++++++ meta-oe/recipes-kernel/crash/crash_7.0.9.bb | 59 ++++++++++ meta-oe/recipes-kernel/crash/crash_7.0.9.bb.bak | 62 +++++++++++ 10 files changed, 459 insertions(+) create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/0001-lzo_snappy.patch create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/7002cross_add_configure_option.patch create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.9 create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/lzo_snappy.patch create mode 100644 meta-oe/recipes-kernel/crash/crash-7.0.9/use_system_readline.patch create mode 100644 meta-oe/recipes-kernel/crash/crash_7.0.9.bb create mode 100644 meta-oe/recipes-kernel/crash/crash_7.0.9.bb.bak diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch new file mode 100644 index 0000000..229647f --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-cross_add_configure_option.patch @@ -0,0 +1,34 @@ +From cbaaa42933bb27b1bcff4c7d71d54c913201ee88 Mon Sep 17 00:00:00 2001 +From: Lei Maohui +Date: Fri, 9 Jan 2015 11:51:18 +0900 +Subject: [PATCH] cross_add_configure_option + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 9c44633..39bebd0 100644 +--- a/Makefile ++++ b/Makefile +@@ -229,7 +229,7 @@ gdb_merge: force + @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj + @rm -f ${PROGRAM} + @if [ ! -f ${GDB}/config.status ]; then \ +- (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \ ++ (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \ + --with-bugurl="" --with-expat=no --with-python=no; \ + make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ + else make --no-print-directory rebuild; fi +@@ -277,7 +277,7 @@ force: + + make_configure: force + @rm -f configure +- @${CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS} ++ @cc ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS} + + clean: make_configure + @./configure ${CONF_TARGET_FLAG} -q -b +-- +1.8.4.2 + diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-lzo_snappy.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-lzo_snappy.patch new file mode 100644 index 0000000..8eb668d --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/0001-lzo_snappy.patch @@ -0,0 +1,39 @@ +From aab7f6d5ba37d85932783434f923d5bf21b4c13f Mon Sep 17 00:00:00 2001 +From: leimh +Date: Wed, 7 Jan 2015 15:34:54 +0900 +Subject: [PATCH 1/2] lzo_snappy + +--- + Makefile | 2 +- + diskdump.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 68521b8..3397eeb 100644 +--- a/Makefile ++++ b/Makefile +@@ -225,7 +225,7 @@ all: make_configure + gdb_merge: force + @if [ ! -f ${GDB}/README ]; then \ + make --no-print-directory gdb_unzip; fi +- @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs ++ @echo "${LDFLAGS} -lz -llzo2 -lsnappy -ldl -rdynamic" > ${GDB}/gdb/mergelibs + @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj + @rm -f ${PROGRAM} + @if [ ! -f ${GDB}/config.status ]; then \ +diff --git a/diskdump.c b/diskdump.c +index 3d33fdc..95b92ee 100644 +--- a/diskdump.c ++++ b/diskdump.c +@@ -23,6 +23,8 @@ + * GNU General Public License for more details. + */ + ++#define LZO ++#define SNAPPY + #include "defs.h" + #include "diskdump.h" + +-- +1.8.4.2 + diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch new file mode 100644 index 0000000..0d44c7f --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/7001force_define_architecture.patch @@ -0,0 +1,13 @@ +diff -uprN crash-5.1.8.org/configure.c crash-5.1.8/configure.c +--- crash-5.1.8.org/configure.c 2011-09-17 04:01:12.000000000 +0900 ++++ crash-5.1.8/configure.c 2012-09-13 13:28:45.393344108 +0900 +@@ -391,6 +391,9 @@ get_current_configuration(struct support + arch_mismatch(sp); + } + ++ /** Force define archtecture */ ++ target_data.target = FORCE_DEFINE_ARCH; ++ + if ((fp = fopen("Makefile", "r")) == NULL) { + perror("Makefile"); + goto get_release; diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/7002cross_add_configure_option.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/7002cross_add_configure_option.patch new file mode 100644 index 0000000..dc594eb --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/7002cross_add_configure_option.patch @@ -0,0 +1,21 @@ +diff -uprN crash-6.1.1.org/Makefile crash-6.1.1/Makefile +--- crash-6.1.1.org/Makefile 2012-11-20 05:57:31.000000000 +0900 ++++ crash-6.1.1/Makefile 2012-12-27 20:51:34.100833890 +0900 +@@ -223,7 +223,7 @@ gdb_merge: force + @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs + @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj + @if [ ! -f ${GDB}/config.status ]; then \ +- (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \ ++ (cd ${GDB}; ./configure --host=${GDB_TARGET} --build=${GDB_HOST} --with-separate-debug-dir=/usr/lib/debug \ + --with-bugurl="" --with-expat=no --with-python=no; \ + make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ + else (cd ${GDB}/gdb; make --no-print-directory CRASH_TARGET=${TARGET};); fi +@@ -254,7 +254,7 @@ force: + + make_configure: force + @rm -f configure +- @${CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS} ++ @cc ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS} + + clean: make_configure + @./configure ${CONF_TARGET_FLAG} -q -b diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch new file mode 100644 index 0000000..d567fa0 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/7003cross_ranlib.patch @@ -0,0 +1,10 @@ +--- crash-5.1.8/Makefile.orig 2011-12-27 11:21:58.220652105 +0900 ++++ crash-5.1.8/Makefile 2011-12-27 11:22:29.563651593 +0900 +@@ -285,6 +285,7 @@ + + library: make_build_data ${OBJECT_FILES} + ar -rs ${PROGRAM}lib.a ${OBJECT_FILES} ++ ${RANLIB} ${PROGRAM}lib.a + + gdb: force + rm -f ${GDB_OFILES} diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.9 b/meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.9 new file mode 100644 index 0000000..d6fc22f --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/config-site.crash-7.0.9 @@ -0,0 +1 @@ +bash_cv_have_mbstate_t=yes diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/lzo_snappy.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/lzo_snappy.patch new file mode 100644 index 0000000..820a17d --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/lzo_snappy.patch @@ -0,0 +1,100 @@ + + + +crash.git - crash + + + + + + + +
+ + + + +
+summaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: 73d2a4f713c045c4e9f046890bf88153442c8493 (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+
--- crash-7.0.2/diskdump.c.orig
++++ crash-7.0.2/diskdump.c
+@@ -23,6 +23,8 @@
+  * GNU General Public License for more details.
+  */
+ 
++#define LZO
++#define SNAPPY
+ #include "defs.h"
+ #include "diskdump.h"
+ 
+--- crash-7.0.2/Makefile.orig
++++ crash-7.0.2/Makefile
+@@ -223,7 +223,7 @@ all: make_configure
+ gdb_merge: force
+ 	@if [ ! -f ${GDB}/README ]; then \
+ 	  make --no-print-directory gdb_unzip; fi
+-	@echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
++	@echo "${LDFLAGS} -lz -llzo2 -lsnappy -ldl -rdynamic" > ${GDB}/gdb/mergelibs
+ 	@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
+ 	@rm -f ${PROGRAM}
+ 	@if [ ! -f ${GDB}/config.status ]; then \
+
+
+ +
+ + diff --git a/meta-oe/recipes-kernel/crash/crash-7.0.9/use_system_readline.patch b/meta-oe/recipes-kernel/crash/crash-7.0.9/use_system_readline.patch new file mode 100644 index 0000000..f992d25 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash-7.0.9/use_system_readline.patch @@ -0,0 +1,120 @@ + + + +crash.git - crash + + + + + + + +
+ + + + +
+summaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: a6e04c4e6017c4818d5245357f5e649ba684f14c (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
--- crash-7.0.4/cmdline.c.orig
++++ crash-7.0.4/cmdline.c
+@@ -42,7 +42,8 @@ static int verify_args_input_file(char *
+ #define READLINE_LIBRARY
+ 
+ #include <readline.h>
+-#include <rldefs.h>
++#define vi_mode 0
++#define emacs_mode 1
+ #include <history.h>
+ 
+ static void readline_init(void);
+--- crash-7.0.4/Makefile.orig
++++ crash-7.0.4/Makefile
+@@ -200,7 +200,7 @@ TAR_FILES=${SOURCE_FILES} Makefile ${GPL
+ 	${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES}
+ CSCOPE_FILES=${SOURCE_FILES}
+ 
+-READLINE_DIRECTORY=./${GDB}/readline
++READLINE_DIRECTORY=/usr/include/readline
+ BFD_DIRECTORY=./${GDB}/bfd
+ GDB_INCLUDE_DIRECTORY=./${GDB}/include
+ 
+@@ -228,7 +228,7 @@ gdb_merge: force
+ 	@rm -f ${PROGRAM}
+ 	@if [ ! -f ${GDB}/config.status ]; then \
+ 	  (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \
+-	    --with-bugurl="" --with-expat=no --with-python=no; \
++	    --with-bugurl="" --with-expat=no --with-python=no --with-system-readline; \
+ 	  make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
+ 	else (cd ${GDB}/gdb; make --no-print-directory CRASH_TARGET=${TARGET};); fi
+ 	@if [ ! -f ${PROGRAM} ]; then \
+
+
+ +
+ + diff --git a/meta-oe/recipes-kernel/crash/crash_7.0.9.bb b/meta-oe/recipes-kernel/crash/crash_7.0.9.bb new file mode 100644 index 0000000..efec061 --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash_7.0.9.bb @@ -0,0 +1,59 @@ +SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles" +DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\ +investigate either live systems, kernel core dumps created from the\ +netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\ +offered by Mission Critical Linux, or the LKCD kernel patch." + +HOMEPAGE = "http://people.redhat.com/anderson" +SECTION = "devel" + +inherit gettext + +DEPENDS = "zlib readline" + +SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz \ + file://7001force_define_architecture.patch \ + file://7003cross_ranlib.patch \ + file://0001-cross_add_configure_option.patch \ + " + +SRC_URI[md5sum] = "d70ad2ed0f6d210ed11e88b8e977f5fd" +SRC_URI[sha256sum] = "c6034c6eb6b52691c60d0b72dbdec58fac4c1b3ed1cd0697c209dc48d13a577e" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" + +EXTRA_OEMAKE = 'RPMPKG="${PV}" \ + GDB_TARGET="${TARGET_SYS}" \ + GDB_HOST="${BUILD_SYS}" \ + ' +do_configure() { + : +} + +do_compile_prepend() { + case ${TARGET_ARCH} in + arm*) ARCH=ARM ;; + i*86*) ARCH=X86 ;; + powerpc*) ARCH=PPC ;; + x86_64*) ARCH=X86_64 ;; + esac + + sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c + sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c + sed -i 's/>/>/g' ${S}/Makefile +} +do_compile() { + oe_runmake ${EXTRA_OEMAKE} +} + +do_install () { + install -d ${D}${bindir} + install -d ${D}/${mandir}/man8 + install -d ${D}${includedir}/crash + + oe_runmake DESTDIR=${D} install + install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/ + install -m 0644 ${S}/defs.h ${D}${includedir}/crash +} + diff --git a/meta-oe/recipes-kernel/crash/crash_7.0.9.bb.bak b/meta-oe/recipes-kernel/crash/crash_7.0.9.bb.bak new file mode 100644 index 0000000..8d559ee --- /dev/null +++ b/meta-oe/recipes-kernel/crash/crash_7.0.9.bb.bak @@ -0,0 +1,62 @@ +SUMMARY = "Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles" +DESCRIPTION = "The core analysis suite is a self-contained tool that can be used to\ +investigate either live systems, kernel core dumps created from the\ +netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\ +offered by Mission Critical Linux, or the LKCD kernel patch." + +HOMEPAGE = "http://people.redhat.com/anderson" +SECTION = "devel" + +inherit gettext + +DEPENDS = "zlib readline" +CONFIG_SITE="${WORKDIR}/config-site.${P}" +PARALLEL_MAKEINST = "" + +SRC_URI = "https://github.com/crash-utility/${BPN}/archive/${PV}.tar.gz \ + file://7001force_define_architecture.patch \ + file://7003cross_ranlib.patch \ + file://config-site.${P} \ + file://0001-cross_add_configure_option.patch \ + " + +SRC_URI[md5sum] = "d70ad2ed0f6d210ed11e88b8e977f5fd" +SRC_URI[sha256sum] = "c6034c6eb6b52691c60d0b72dbdec58fac4c1b3ed1cd0697c209dc48d13a577e" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504" + +EXTRA_OEMAKE = 'RPMPKG="${PV}" \ + GDB_TARGET="${TARGET_SYS}" \ + GDB_HOST="${BUILD_SYS}" \ + ' +do_configure() { + : +} + +do_compile_prepend() { + case ${TARGET_ARCH} in + arm*) ARCH=ARM ;; + i*86*) ARCH=X86 ;; + powerpc*) ARCH=PPC ;; + x86_64*) ARCH=X86_64 ;; + esac + + sed -i s/FORCE_DEFINE_ARCH/"${ARCH}"/g ${S}/configure.c + sed -i -e 's/#define TARGET_CFLAGS_ARM_ON_X86_64.*/#define TARGET_CFLAGS_ARM_ON_X86_64\t\"TARGET_CFLAGS=-D_FILE_OFFSET_BITS=64\"/g' ${S}/configure.c + sed -i 's/>/>/g' ${S}/Makefile +} +do_compile() { + oe_runmake ${EXTRA_OEMAKE} +} + +do_install () { + install -d ${D}${bindir} + install -d ${D}/${mandir}/man8 + install -d ${D}${includedir}/crash + + oe_runmake DESTDIR=${D} install + install -m 0644 ${S}/crash.8 ${D}/${mandir}/man8/ + install -m 0644 ${S}/defs.h ${D}${includedir}/crash +} + -- 1.8.4.2