create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
def setup():
pisitools.flags.add("-fexceptions")
autotools.autoreconf("-vfi")
# Remove -Wall from default flags. The makefiles enable enough warnings
# themselves, and they use -Werror.
pisitools.cflags.remove("-Wall")
autotools.configure("\
--disable-nls \
--enable-dwz \
--enable-thread-safety \
--program-prefix=\"eu-\" \
--with-bzlib \
--with-lzma \
--with-zlib \
")
def build():
autotools.make()
#def check():
#autotools.make("check")
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
# Don't remove all the static libs as libebl.a is needed by other packages
pisitools.remove("/usr/lib/libelf.a")
pisitools.remove("/usr/lib/libasm.a")
pisitools.remove("/usr/lib/libdw.a")
pisitools.dodoc("AUTHORS", "COPYING", "ChangeLog", "NEWS", "NOTES", "README", "THANKS", "TODO")
@@ -0,0 +1,37 @@
From 7f1eec317db79627b473c5b149a22a1b20d1f68f Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Wed, 9 Apr 2014 11:33:23 +0200
Subject: [PATCH] CVE-2014-0172 Check for overflow before calling malloc to
uncompress data.
https://bugzilla.redhat.com/show_bug.cgi?id=1085663
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
index 79daeac..34ea373 100644
--- a/libdw/dwarf_begin_elf.c
+++ b/libdw/dwarf_begin_elf.c
@@ -1,5 +1,5 @@
/* Create descriptor from ELF descriptor for processing file.
- Copyright (C) 2002-2011 Red Hat, Inc.
+ Copyright (C) 2002-2011, 2014 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -282,6 +282,12 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp)
memcpy (&size, data->d_buf + 4, sizeof size);
size = be64toh (size);
+ /* Check for unsigned overflow so malloc always allocated
+ enough memory for both the Elf_Data header and the
+ uncompressed section data. */
+ if (unlikely (sizeof (Elf_Data) + size < size))
+ break;
+
Elf_Data *zdata = malloc (sizeof (Elf_Data) + size);
if (unlikely (zdata == NULL))
break;
--
1.9.2
@@ -0,0 +1,43 @@
From e922ec4e3bcd7c164a9ce424accac4394e7d5afd Mon Sep 17 00:00:00 2001
From: Matthias Klose <doko@ubuntu.com>
Date: Tue, 07 Jan 2014 09:25:29 +0000
Subject: tests: backtrace-subr.sh (check_native_core) should check core file name.
Needed when /proc/sys/kernel/core_uses_pid is set to 0. Try to rename
the core file, and if it does still fail, skip the test.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 63b7bed..7e9dcf4 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-07 Matthias Klose <doko@ubuntu.com>
+
+ * backtrace-subr.sh (check_native_core): Check to see if core file
+ was created without ".PID" extension, if so mv core to core.PID.
+ Skip test if no core file was created or could be found.
+
2014-01-04 Mark Wielaard <mjw@redhat.com>
* backtrace-data.c (main): Don't assert if raise returns.
diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
index e7ece91..62b873c 100644
--- a/tests/backtrace-subr.sh
+++ b/tests/backtrace-subr.sh
@@ -111,6 +111,11 @@ check_native_core()
# Skip the test if we cannot adjust core ulimit.
core="core.`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`"
+ # see if /proc/sys/kernel/core_uses_pid is set to 0
+ if [ -f core ]; then
+ mv core "$core"
+ fi
+ if [ ! -f "$core" ]; then exit 77; fi
if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then
VALGRIND_CMD="$SAVED_VALGRIND_CMD"
--
cgit v0.9.2
+97
View File
@@ -0,0 +1,97 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>elfutils</Name>
<Homepage>http://www.redhat.com/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>OpenSoftware</License>
<IsA>app:console</IsA>
<IsA>library</IsA>
<Summary>Libraries/utilities to handle ELF objects</Summary>
<Description>elfutils contains libraries and utilities to handle ELF objects and is a replacement for libelf.</Description>
<Archive sha1sum="a300a1cd1543b65532e333a6e9f931db76841558" type="tarbz2">https://fedorahosted.org/releases/e/l/elfutils/0.160/elfutils-0.160.tar.bz2</Archive>
<BuildDependencies>
<Dependency>bzip2</Dependency>
<Dependency>xz-devel</Dependency>
<Dependency>zlib-devel</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>elfutils</Name>
<RuntimeDependencies>
<Dependency>xz</Dependency>
<Dependency>zlib</Dependency>
<Dependency>bzip2</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="header">/usr/include</Path>
</Files>
</Package>
<History>
<Update release="8">
<Date>2014-11-23</Date>
<Version>0.160</Version>
<Comment>Version bump.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="7">
<Date>2014-05-11</Date>
<Version>0.158</Version>
<Comment>Release bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="6">
<Date>2014-04-29</Date>
<Version>0.158</Version>
<Comment>Add upstream patch.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="5">
<Date>2014-02-22</Date>
<Version>0.158</Version>
<Comment>Version bump.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2013-08-27</Date>
<Version>0.156</Version>
<Comment>Clean elfutils.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2013-08-01</Date>
<Version>0.156</Version>
<Comment>Version bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-02-16</Date>
<Version>0.155</Version>
<Comment>New release</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-07-30</Date>
<Version>0.154</Version>
<Comment>First release</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
</History>
</PISI>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>elfutils</Name>
<Summary xml:lang="tr">Derlenmiş objeleri işlemek için gereken aletler koleksiyonu</Summary>
<Description xml:lang="tr">elfutils derlenmiş objeleri işlemek için gereken çeşitli araçlar içerir.</Description>
</Source>
</PISI>