aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-09-24 22:58:30 +0100
committerStuart Shelton <stuart@shelton.me>2017-09-25 00:52:57 +0100
commit124894f1ffd271aa988bfb943c5191e14b8a5293 (patch)
tree41c097487a30dd360dad2d90baed8a61c1e79c1a /sys-libs
parentAdd dev-db/mongodb-3.0.14, dev-db/mongodb-3.2.16, update README.md (diff)
downloadsrcshelton-124894f1ffd271aa988bfb943c5191e14b8a5293.tar.gz
srcshelton-124894f1ffd271aa988bfb943c5191e14b8a5293.tar.bz2
srcshelton-124894f1ffd271aa988bfb943c5191e14b8a5293.zip
Add sys-libs/libunwind-1.1-r1, update README.md
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libunwind/Manifest5
-rw-r--r--sys-libs/libunwind/files/libunwind-1.1-fix-CVE-2015-3239.patch15
-rw-r--r--sys-libs/libunwind/files/libunwind-1.1-lzma.patch63
-rw-r--r--sys-libs/libunwind/files/libunwind-1.1-x32.patch13
-rw-r--r--sys-libs/libunwind/libunwind-1.1-r1.ebuild73
5 files changed, 169 insertions, 0 deletions
diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
new file mode 100644
index 00000000..02f22367
--- /dev/null
+++ b/sys-libs/libunwind/Manifest
@@ -0,0 +1,5 @@
+AUX libunwind-1.1-fix-CVE-2015-3239.patch 523 SHA256 3d37676dfaf88e267fd2e0422db93b9613f91af40fc5f4189806a64a23b07de9 SHA512 71f28720486c07cbbc31cf2747096e324cc43dd57c4ec9312da12fd4aa9d5af83e4cbe80071b6192cdf14a2e2afd090c136e57476ac981204a933db67d609c01 WHIRLPOOL 5c2b15253ca2ef597ebf6a6ae1b26c5728ce50dd5468c6115546b0af83e19b73c5becf3d1885b275e7619318f279dbb0eab531905b64c3bc87c8fb2cdd1fc31b
+AUX libunwind-1.1-lzma.patch 3004 SHA256 84716d048c507862761f4889871ab6428f9ca5818baeb3bddbc5612d5ff3ef15 SHA512 d15f849d743426fd030de2990d683a5373273ecfc407b081280e7f5fb2e65350496badb7b094911719e5b3f6bdac5ddf2653e556391c58a8559938a11f60250c WHIRLPOOL 3d56eed2a93fa373516d923bf0c491c68c464e62c0302ba0bc995d2491b27b01b109dd750bc47079f66c163c5f1a1a5d13c541709c0090ff78926bcdc98da992
+AUX libunwind-1.1-x32.patch 448 SHA256 6d2c3a0054830dcf89c36ad00efc14f3cfaeb69124eacbf1234658d017bee30a SHA512 fcfb19b71cef5ae0141818f0dd246c9a3fdc8ca4eae1baea3ee4f96edecdeabce6cba412fe7e35c55c4294655dda196ddd8bceeefb146c9b1c12aaaa05300df2 WHIRLPOOL dc104ec70e57bde17f79571a9682cac70609d712d2191e41a17614566efbf09e301b48a5fd387cf0340a563569e821a57cce7cf1484772f01788388fab54774e
+DIST libunwind-1.1.tar.gz 1098603 SHA256 9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a SHA512 bfe04f2bfac9f9e47c37f0b23ed2f264d8d3d3d6f1392fe9d794ee13cad216b3740979e922e4276fb65c1ccdc836fce48812cb5459ecdd2a89a621036a35d7c1 WHIRLPOOL 1a0e566edf92c0563cb5525203f2718c3454bc0be25ec8079cde8441de08b6d8951db7cbf2f0a02a4a0f1e6c350e74e551a482d9094996daefa216a79bc9d383
+EBUILD libunwind-1.1-r1.ebuild 2480 SHA256 31f8b31e58bd481951afb667fb93fbabf2b597f382668b681796d7c4079fb411 SHA512 c812e2f40e2277034118726dfa7b5a423ae53a8eb8dd3d112386dd6df50271f4bf56291916c8a34cd6c9c8beb439b7cb913548a2f1a218396d9e7f343ea0a84d WHIRLPOOL a3eb3f8f55d17e66aa78229f9118b5bba3b4d7edd30c2aa1282186238b259210e2e4f0101242d40d2adb64f98b600a0c3a8f0f46d1713d423fcf08a24e05d56f
diff --git a/sys-libs/libunwind/files/libunwind-1.1-fix-CVE-2015-3239.patch b/sys-libs/libunwind/files/libunwind-1.1-fix-CVE-2015-3239.patch
new file mode 100644
index 00000000..153108bb
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.1-fix-CVE-2015-3239.patch
@@ -0,0 +1,15 @@
+taken from Fedora
+
+https://bugs.gentoo.org/585830
+
+--- libunwind-1.1/include/dwarf_i.h.CVE20153239
++++ libunwind-1.1/include/dwarf_i.h
+@@ -20,7 +20,7 @@
+ extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
+ /* REG is evaluated multiple times; it better be side-effects free! */
+ # define dwarf_to_unw_regnum(reg) \
+- (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
++ (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
+ #endif
+
+ #ifdef UNW_LOCAL_ONLY
diff --git a/sys-libs/libunwind/files/libunwind-1.1-lzma.patch b/sys-libs/libunwind/files/libunwind-1.1-lzma.patch
new file mode 100644
index 00000000..09cefa02
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.1-lzma.patch
@@ -0,0 +1,63 @@
+From 38c349bb000b427c376e756e3ecdb764a2b4d297 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 15 Feb 2014 21:00:59 -0500
+Subject: [PATCH] link sublibs against liblzma as needed
+
+The coredump/elf32/elf64/elfxx libs use lzma funcs but don't link against
+it. This produces sub-shared libs that don't link against lzma and can
+make the linker angry due to underlinking like so:
+
+libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=amdfam10 -pipe -g \
+ -frecord-gcc-switches -Wimplicit-function-declaration -fexceptions \
+ -Wall -Wsign-compare -Wl,-O1 -Wl,--hash-style=gnu \
+ -o .libs/test-coredump-unwind test-coredump-unwind.o \
+ ../src/.libs/libunwind-coredump.so ../src/.libs/libunwind-x86_64.so
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_footer_decode'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_buffer_decode'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_size'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_end'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_uncompressed_size'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_buffer_decode'
+collect2: error: ld returned 1 exit status
+
+So add LIBLZMA to the right LIBADD for each of these libraries.
+
+URL: https://bugs.gentoo.org/444050
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ src/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -169,7 +169,7 @@ libunwind_arm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libunwind_arm_la_LDFLAGS) $(LDFLAGS) -o $@
+ @ARCH_ARM_TRUE@am_libunwind_arm_la_rpath = -rpath $(libdir)
+-libunwind_coredump_la_LIBADD =
++libunwind_coredump_la_LIBADD = $(LIBLZMA)
+ am__libunwind_coredump_la_SOURCES_DIST = coredump/_UCD_accessors.c \
+ coredump/_UCD_create.c coredump/_UCD_destroy.c \
+ coredump/_UCD_access_mem.c coredump/_UCD_elf_map_image.c \
+@@ -214,15 +214,15 @@ am_libunwind_dwarf_local_la_OBJECTS = dwarf/Lexpr.lo dwarf/Lfde.lo \
+ libunwind_dwarf_local_la_OBJECTS = \
+ $(am_libunwind_dwarf_local_la_OBJECTS)
+ @REMOTE_ONLY_FALSE@@USE_DWARF_TRUE@am_libunwind_dwarf_local_la_rpath =
+-libunwind_elf32_la_LIBADD =
++libunwind_elf32_la_LIBADD = $(LIBLZMA)
+ am_libunwind_elf32_la_OBJECTS = elf32.lo
+ libunwind_elf32_la_OBJECTS = $(am_libunwind_elf32_la_OBJECTS)
+ @USE_ELF32_TRUE@am_libunwind_elf32_la_rpath =
+-libunwind_elf64_la_LIBADD =
++libunwind_elf64_la_LIBADD = $(LIBLZMA)
+ am_libunwind_elf64_la_OBJECTS = elf64.lo
+ libunwind_elf64_la_OBJECTS = $(am_libunwind_elf64_la_OBJECTS)
+ @USE_ELF64_TRUE@am_libunwind_elf64_la_rpath =
+-libunwind_elfxx_la_LIBADD =
++libunwind_elfxx_la_LIBADD = $(LIBLZMA)
+ am_libunwind_elfxx_la_OBJECTS = elfxx.lo
+ libunwind_elfxx_la_OBJECTS = $(am_libunwind_elfxx_la_OBJECTS)
+ @USE_ELFXX_TRUE@am_libunwind_elfxx_la_rpath =
+--
+1.8.5.5
+
diff --git a/sys-libs/libunwind/files/libunwind-1.1-x32.patch b/sys-libs/libunwind/files/libunwind-1.1-x32.patch
new file mode 100644
index 00000000..a501cc33
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.1-x32.patch
@@ -0,0 +1,13 @@
+--- src/x86_64/Gos-linux.c~ 2012-10-06 05:54:38.000000000 +0100
++++ src/x86_64/Gos-linux.c 2013-03-19 15:59:20.066439541 +0000
+@@ -143,8 +143,8 @@
+
+ Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
+ (unsigned long long) c->dwarf.ip, sc);
+- __asm__ __volatile__ ("mov %0, %%rsp;"
+- "mov %1, %%rax;"
++ __asm__ __volatile__ ("mov %q0, %%rsp;"
++ "mov %q1, %%rax;"
+ "syscall"
+ :: "r"(sc), "i"(SYS_rt_sigreturn)
+ : "memory");
diff --git a/sys-libs/libunwind/libunwind-1.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.1-r1.ebuild
new file mode 100644
index 00000000..17a26ac1
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.1-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils libtool
+
+DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
+HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
+SRC_URI="mirror://nongnu/libunwind/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="7"
+KEYWORDS="amd64 arm hppa ia64 ~mips ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug debug-frame libatomic lzma static-libs"
+
+RESTRICT="test" #461958 -- re-enable tests with >1.1 again for retesting, this is here for #461394
+
+# We just use the header from libatomic.
+RDEPEND="lzma? ( app-arch/xz-utils )"
+DEPEND="${RDEPEND}
+ libatomic? ( dev-libs/libatomic_ops )"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+QA_DT_NEEDED_x86_fbsd="usr/lib/libunwind.so.7.0.0"
+
+src_prepare() {
+ # These tests like to fail. bleh.
+ echo 'int main(){return 0;}' > tests/Gtest-dyn1.c
+ echo 'int main(){return 0;}' > tests/Ltest-dyn1.c
+
+ # Since we have tests disabled via RESTRICT, disable building in the subdir
+ # entirely. This worksaround some build errors too. #484846
+ sed -i -e '/^SUBDIRS/s:tests::' Makefile.in || die
+
+ sed -i -e '/LIBLZMA/s:-lzma:-llzma:' configure{.ac,} || die #444050
+ epatch "${FILESDIR}"/${P}-lzma.patch #444050
+ epatch "${FILESDIR}"/${P}-fix-CVE-2015-3239.patch #585830
+ epatch "${FILESDIR}"/${P}-x32.patch
+ elibtoolize
+}
+
+src_configure() {
+ # https://savannah.nongnu.org/bugs/index.php?34324
+ # --enable-cxx-exceptions: always enable it, headers provide the interface
+ # and on some archs it is disabled by default causing a mismatch between the
+ # API and the ABI, bug #418253
+ # conservative-checks: validate memory addresses before use; as of 1.0.1,
+ # only x86_64 supports this, yet may be useful for debugging, couple it with
+ # debug useflag.
+ ac_cv_header_atomic_ops_h=$(usex libatomic) \
+ econf \
+ --enable-cxx-exceptions \
+ $(use_enable debug-frame) \
+ $(use_enable lzma minidebuginfo) \
+ $(use_enable static-libs static) \
+ $(use_enable debug conservative_checks) \
+ $(use_enable debug)
+}
+
+src_test() {
+ # Explicitly allow parallel build of tests.
+ # Sandbox causes some tests to freak out.
+ SANDBOX_ON=0 emake check
+}
+
+src_install() {
+ default
+ # libunwind-ptrace.a (and libunwind-ptrace.h) is separate API and without
+ # shared library, so we keep it in any case
+ use static-libs || find "${ED}"usr '(' -name 'libunwind-generic.a' -o -name 'libunwind*.la' ')' -delete
+}