From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4238458973 for ; Thu, 21 Jan 2016 22:56:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4D34221C020; Thu, 21 Jan 2016 22:56:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C7F5F21C020 for ; Thu, 21 Jan 2016 22:56:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 90DD33408B8 for ; Thu, 21 Jan 2016 22:56:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5A170A91 for ; Thu, 21 Jan 2016 22:56:24 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1453417479.90225ea32c41056dc22f7a9c5d038d4f773b98ab.blueness@gentoo> Subject: [gentoo-commits] proj/musl:master commit in: sys-apps/sandbox/files/, sys-apps/sandbox/ X-VCS-Repository: proj/musl X-VCS-Files: sys-apps/sandbox/Manifest sys-apps/sandbox/files/sandbox-2.10-disable-same.patch sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch sys-apps/sandbox/sandbox-2.10-r99.ebuild X-VCS-Directories: sys-apps/sandbox/ sys-apps/sandbox/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 90225ea32c41056dc22f7a9c5d038d4f773b98ab X-VCS-Branch: master Date: Thu, 21 Jan 2016 22:56:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fce829e8-39b7-42e9-9029-03a2dc8fa0ff X-Archives-Hash: 77879b765c41332bb9a6540dfdd28975 commit: 90225ea32c41056dc22f7a9c5d038d4f773b98ab Author: Anthony G. Basile gentoo org> AuthorDate: Thu Jan 21 23:04:39 2016 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Thu Jan 21 23:04:39 2016 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=90225ea3 sys-apps/sandbox: bumpt to 2.10 Package-Manager: portage-2.2.26 RepoMan-Options: --force sys-apps/sandbox/Manifest | 4 + .../sandbox/files/sandbox-2.10-disable-same.patch | 77 ++++++++++++ .../files/sandbox-2.10-memory-corruption.patch | 42 +++++++ sys-apps/sandbox/sandbox-2.10-r99.ebuild | 129 +++++++++++++++++++++ 4 files changed, 252 insertions(+) diff --git a/sys-apps/sandbox/Manifest b/sys-apps/sandbox/Manifest index ee7e77a..4c3a3bd 100644 --- a/sys-apps/sandbox/Manifest +++ b/sys-apps/sandbox/Manifest @@ -1,4 +1,6 @@ AUX 09sandbox 37 SHA256 73e9e9d12ba54f1c649813ec86107924050528852c890a8ba1e2853796781bbe SHA512 4e8a9c58debde6480224a45559c5f2db4765213d151e47937f9142f110cac3681bf6402acaf21249a37bb17398e7bc00ae7feee68ecdb5b9363c432eac1b052a WHIRLPOOL 80d55a34d3faf3314f2b9de2200d4b46a800128514be9e30eb59e5f03fb7a0a5197a9e5b5ab33d6b68d35bf83c86a1bd7ba734a33ccd382fe0af3b2c2a11d0bd +AUX sandbox-2.10-disable-same.patch 2547 SHA256 09a11cf077ae69684080d1f0fd8fe83683fdf5f061e0a7a5261ca03463fd554a SHA512 bf005fbde7b6ba88df36bb75064658764e488dd2f3c96a6f92c69ad3f2e8d2db12ba2c7bafa9656326b7fde73301c330f68bd064efa0fce2a7eb28fff6ce0a1e WHIRLPOOL 27f0df961dcedc70819ecd1d0f105fb7176ecd77127ab187025d9aa52df9faa43941314c71a998dd72658105dfec4c5c6d3341dbae18e18b409af7dc6d9c31d6 +AUX sandbox-2.10-memory-corruption.patch 1515 SHA256 4876cc9962d56d3c5fc5418fe12ef1a399e34ff0272f12640c4a5c5b775e8888 SHA512 1eb650824cc7a876fabef382cafb451a507326a8422fb7bb5014699046b64ea8f4cf2bba9efcb75d7a2eac4eff493d06153422f85c119f49635ac0840071660c WHIRLPOOL db2c834119c7887ed746154e73e88cc09bf2a31184b3cda2732b70cb43dd8bc7f59f1072a4cc56ebcf593ba67330b9888832dc186ee55e009428d607f62293ab AUX sandbox-2.6-check-empty-paths-at.patch 7454 SHA256 a48759a4d3e9a70713473b6fad59bdd750b5cd37e7d632c786205ff20004ae2c SHA512 5eba7915dedf57f44c37881e9c6b48db8733d1493779a33127d08bb9ea77056d788ec9ace72c13eb101f42f01c95309c7cebca6c76212a8c99a8655372c0b7d7 WHIRLPOOL 46eb3a8ef8f22030cd793f3b16adc190b5750019c0df83e161c6918f08555a8ad890c1425b03cbf7e53ebcd34a07a9dd9b594d0c0fe31834656ffce3d58fa284 AUX sandbox-2.6-desktop.patch 875 SHA256 2eecf67790aeac210f9aa899a86f7664776ed65d9b55159e1b359162dfb9ff74 SHA512 b72ec7f414d19bf513dfb1aea10523fa5dc07a1375d8f08f664d204b64b23c891a79ca14987528c595936f441e1f595b366aabbc57313667c7639d73d089ed9a WHIRLPOOL 7f787b8be9b5712eb2b2a0cd2ff825df1045ebf1cc4e73a50f610e620d30752045690a5c28835465d0ab0c3c4a9eaf8b92a5c123cd741ad69dfedb31aa457fa0 AUX sandbox-2.6-include-PROTECTED-symbols.patch 569 SHA256 6edd24b329fd9908005e8566002f213d2799375ad4fced483be4707ddf0570ed SHA512 d96644fc48ec70f992bef55ccae03c0034bfb669586b8257a2c74f1cf0b78f2fbfebc2417ac62cd15841cc5e973272962252b88ca066224cf118eecf060e0d80 WHIRLPOOL f377d71928a6fb84b1e413ae2f4335fe6753d6cc056cb21fe758c8b5559330473a88098c85863c3157b0b5bec8f5530f233f1a2a659eee553c3bb07ae3633399 @@ -8,6 +10,8 @@ AUX sandbox-2.6-no-pch.patch 702 SHA256 d95a65ffe23c6c81f6b1e695f27cffc1cb617ebf AUX sandbox-2.6-open-nofollow.patch 2027 SHA256 c8816ae4e1991f9941abd43ec4bfdbf4e99cf36ee90694f77ab88754c53785ce SHA512 dd5222f32a40def38c9719363a24c48d5b112e3560b44c5f32afc3daa0614fe9bc5cb68ca8ac69032cc8d6299f09b25d4d7c72e16892188b42768ffb28c19f07 WHIRLPOOL 03cb5fb9df04a8d7f92855c292a6c431d01d330fecae198f2c4b95d824454f10ce1ad66db1a9d54d1bef5f74989cf6debb2d98de28ee0c2c6a09c1a0752b5519 AUX sandbox-2.6-static-close-fd.patch 2945 SHA256 807eb4dc1ba6543c94a90a9a53bb89f42079ea20ed7c196f82d65f280e5de96a SHA512 e2f57c4d80816241f3ba4828c2b27c67d1d604b14b2d575888a978e5c4e8e47e60e3a609d81e59c615bc5b7cee6194cc362e255ae8508f632862a35180c30de8 WHIRLPOOL e08f60227fe954894d3a3a01297e9988f4d7722ea75ffbd2b0f3971d38c8ce00af230fcaecb1f53243a868d54f48bb680e2d547bbeb2ee3e5a11f8942d2084fd AUX sandbox-2.6-trace-hppa.patch 850 SHA256 20688b2f33162f95af4af5e3c7d3700f2e7776e454b785ac1398f0870f84efa9 SHA512 fb7bf2202f960e952edc1e52fe4b6b085042158223d96b9baa899e871abcdef711ede3122c971120f55f71cc1aad71496a6079222dbaaa6c14b0c6f7ea182454 WHIRLPOOL 80f7fb529b912d19d81b9d71ee4a648db7b217583f2e8f2054cc666839030ea7d0112d69d52a2bf35c4d3549ffbd81dbd0cd39d5993bfabbb43bcb6a4455ade4 +DIST sandbox-2.10.tar.xz 417068 SHA256 019d6a2646b3a5f9b6fc3fcb6ff99332901017eb845442bec8573b9901506fa6 SHA512 178b3b8fcb54e6ff67df1c8101866739b49e4d31a66717c21ef502dd2ab609fca70f1a0c662b913e207bfc1ba6994cefdcf5c92ff32add9dd98bd9707f301305 WHIRLPOOL 5d6cffa7317cafeba02af75de9ae914d4365a62b54d3dfcc14cb272e621f2f76a60a945591ccb57dd59d6750152087cb2f21e43ded3ec181d6b42df173147192 DIST sandbox-2.6.tar.xz 366356 SHA256 95615c5879dfc419713f22ba5506a2802a50ea0ce8a2f57c656354f2e50b1c4d SHA512 32ba7fb675c67fdc8bc52da1db7ed6878e5fea8753accb30d9aca00f708e0dde03287b5962caf5ef031bea6934d6ef3e18404b015c70ebd551d3fd8109ad2371 WHIRLPOOL bab2d015fb0de92a2266408ca7941c8fb66b599179040cfc727ffce5b2424a9722dc55ba89d198e3361044d8cb357314205488d2a980c7b8af063fd8940f0c03 +EBUILD sandbox-2.10-r99.ebuild 2840 SHA256 338358721cd45193b40b8d9338b57e579dbcee412091dd2e2ed6652dc0d214ff SHA512 88f8e227c670c96f3c9bda50d6c92bd08821112b77d05274e4a96e8aa11007b5dffd4564d89b27b6f68b2afa8937e78a4a71ee9eec2d7320cc07a88e8a2b2986 WHIRLPOOL bf0ed5ba0a94d2cffb73b8b8a799dee99543b36c89ff643d7fc9dab6cb4c7638df879419987a78e60b6e812d2e5e986e02b1278b23e9e8c40272cf0755f66c2f EBUILD sandbox-2.6-r999.ebuild 3391 SHA256 c4756c9265bc272f82bb6ad7221e15c3d28c9987ec5fb53e9957f02b44dcbf8b SHA512 a7b34f6fab52348f6024d2b719e01067d88c7b30fff4d73b361a5d24042c401e2b65ad3039256dd0c033ee2e3528e39d5988b0a40ec523eadb4a5da679b72503 WHIRLPOOL c80cc5e94914c56e528492cdb042bf79c8cc33d664a19aa38e981d8e453245412b5b4439e4374f1d7d023b0ec050abd641f675a718172012017f0b065e9112b5 MISC metadata.xml 316 SHA256 488f8a1ba1e1d07a159d22ac198aefee5dfa9ded04de2969019f177161abef1b SHA512 2b4ddea0bb5a40cac834a09b89624049b8561a4a4f648b4d5072c413d4eca78b5cc24859664fa746be36c8b60188e88f2ae38c2c5af30d91dc6273c0f85de278 WHIRLPOOL 64ed27fc7abb1b3b82621f6bb91f03d0070933d0423f9d323ac803354fc6acf2182df1dd85a083fa047d63561a5e92d44287ef4935a11a733244d4393edf8f6f diff --git a/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch b/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch new file mode 100644 index 0000000..296b322 --- /dev/null +++ b/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch @@ -0,0 +1,77 @@ +From 7a923f646ce10b7dec3c7ae5fe2079c10aa21752 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sun, 20 Dec 2015 16:08:16 -0500 +Subject: [PATCH] libsbutil: gnulib: hand disable same_name usage + +We don't provide same_name because the one caller we don't use, but it +relies on gc-sections to avoid link errors. That flag doesn't work on +ia64 though, so we need to hand delete the one caller. Ugh. + +Signed-off-by: Mike Frysinger +--- + libsbutil/gnulib/hash-triple.c | 9 --------- + libsbutil/gnulib/same.h | 25 ------------------------- + 2 files changed, 34 deletions(-) + delete mode 100644 libsbutil/gnulib/same.h + +diff --git a/libsbutil/gnulib/hash-triple.c b/libsbutil/gnulib/hash-triple.c +index c3b6d9f..06cfbdf 100644 +--- a/libsbutil/gnulib/hash-triple.c ++++ b/libsbutil/gnulib/hash-triple.c +@@ -24,7 +24,6 @@ + #include + + #include "hash-pjw.h" +-#include "same.h" + #include "same-inode.h" + + #define STREQ(a, b) (strcmp (a, b) == 0) +@@ -52,14 +51,6 @@ triple_hash_no_name (void const *x, size_t table_size) + + /* Compare two F_triple structs. */ + bool +-triple_compare (void const *x, void const *y) +-{ +- struct F_triple const *a = x; +- struct F_triple const *b = y; +- return (SAME_INODE (*a, *b) && same_name (a->name, b->name)) ? true : false; +-} +- +-bool + triple_compare_ino_str (void const *x, void const *y) + { + struct F_triple const *a = x; +diff --git a/libsbutil/gnulib/same.h b/libsbutil/gnulib/same.h +deleted file mode 100644 +index ee313c5..0000000 +--- a/libsbutil/gnulib/same.h ++++ /dev/null +@@ -1,25 +0,0 @@ +-/* Determine whether two file names refer to the same file. +- +- Copyright (C) 1997-2000, 2003-2004, 2009-2015 Free Software Foundation, Inc. +- +- This program is free software: you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with this program. If not, see . */ +- +-#ifndef SAME_H_ +-# define SAME_H_ 1 +- +-# include +- +-bool same_name (const char *source, const char *dest); +- +-#endif /* SAME_H_ */ +-- +2.6.2 + diff --git a/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch b/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch new file mode 100644 index 0000000..7dd27c9 --- /dev/null +++ b/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch @@ -0,0 +1,42 @@ +From 529a388ebb1b4e9d6ad8a1bb61dd8211833a5976 Mon Sep 17 00:00:00 2001 +From: Denis Lisov +Date: Sat, 19 Dec 2015 19:13:58 +0300 +Subject: [PATCH] libsandbox: fix old_malloc_size check on realloc + +Realloc uses SB_MALLOC_TO_SIZE assuming it returns the usable size, +while it is really the mmap size, which is greater. Thus it may fail +to reallocate even if required. + +URL: https://bugs.gentoo.org/568714 +Signed-off-by: Denis Lisov +Signed-off-by: Mike Frysinger +--- + libsandbox/memory.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/libsandbox/memory.c b/libsandbox/memory.c +index 8581128..a2d69a2 100644 +--- a/libsandbox/memory.c ++++ b/libsandbox/memory.c +@@ -40,7 +40,8 @@ static int sb_munmap(void *addr, size_t length) + + #define SB_MALLOC_TO_MMAP(ptr) ((void*)((uintptr_t)(ptr) - MIN_ALIGN)) + #define SB_MMAP_TO_MALLOC(ptr) ((void*)((uintptr_t)(ptr) + MIN_ALIGN)) +-#define SB_MALLOC_TO_SIZE(ptr) (*((size_t*)SB_MALLOC_TO_MMAP(ptr))) ++#define SB_MALLOC_TO_MMAP_SIZE(ptr) (*((size_t*)SB_MALLOC_TO_MMAP(ptr))) ++#define SB_MALLOC_TO_SIZE(ptr) (SB_MALLOC_TO_MMAP_SIZE(ptr) - MIN_ALIGN) + + void *malloc(size_t size) + { +@@ -57,7 +58,7 @@ void free(void *ptr) + { + if (ptr == NULL) + return; +- if (munmap(SB_MALLOC_TO_MMAP(ptr), SB_MALLOC_TO_SIZE(ptr))) ++ if (munmap(SB_MALLOC_TO_MMAP(ptr), SB_MALLOC_TO_MMAP_SIZE(ptr))) + sb_ebort("sandbox memory corruption with free(%p): %s\n", + ptr, strerror(errno)); + } +-- +2.6.2 + diff --git a/sys-apps/sandbox/sandbox-2.10-r99.ebuild b/sys-apps/sandbox/sandbox-2.10-r99.ebuild new file mode 100644 index 0000000..71c40e7 --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.10-r99.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# +# don't monkey with this ebuild unless contacting portage devs. +# period. +# + +inherit eutils flag-o-matic toolchain-funcs multilib unpacker multiprocessing pax-utils + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~mips ppc x86" +IUSE="multilib" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +EMULTILIB_PKG="true" +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES=-sandbox emerge sandbox" +} + +sb_get_install_abis() { use multilib && get_install_abis || echo ${ABI:-default} ; } + +sb_foreach_abi() { + local OABI=${ABI} + for ABI in $(sb_get_install_abis) ; do + cd "${WORKDIR}/build-${ABI}" + einfo "Running $1 for ABI=${ABI}..." + "$@" + done + ABI=${OABI} +} + +src_unpack() { + unpacker + cd "${S}" + epatch "${FILESDIR}"/${P}-memory-corruption.patch #568714 + epatch "${FILESDIR}"/${P}-disable-same.patch + epatch "${FILESDIR}"/${PN}-2.6-musl.patch + epatch_user +} + +sb_configure() { + mkdir "${WORKDIR}/build-${ABI}" + cd "${WORKDIR}/build-${ABI}" + + use multilib && multilib_toolchain_setup ${ABI} + + local myconf=() + host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092 + + einfo "Configuring sandbox for ABI=${ABI}..." + ECONF_SOURCE="${S}" \ + econf ${myconf} || die +} + +sb_compile() { + emake || die +} + +src_compile() { + filter-lfs-flags #90228 + + # Run configures in parallel! + multijob_init + local OABI=${ABI} + for ABI in $(sb_get_install_abis) ; do + multijob_child_init sb_configure + done + ABI=${OABI} + multijob_finish + + sb_foreach_abi sb_compile +} + +sb_test() { + emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" || die +} + +src_test() { + sb_foreach_abi sb_test +} + +sb_install() { + emake DESTDIR="${D}" install || die + insinto /etc/sandbox.d #333131 + doins etc/sandbox.d/00default || die +} + +src_install() { + sb_foreach_abi sb_install + + doenvd "${FILESDIR}"/09sandbox + + keepdir /var/log/sandbox + fowners root:portage /var/log/sandbox + fperms 0770 /var/log/sandbox + + cd "${S}" + dodoc AUTHORS ChangeLog* NEWS README +} + +pkg_preinst() { + chown root:portage "${D}"/var/log/sandbox + chmod 0770 "${D}"/var/log/sandbox + + local old=$(find "${ROOT}"/lib* -maxdepth 1 -name 'libsandbox*') + if [[ -n ${old} ]] ; then + elog "Removing old sandbox libraries for you:" + elog ${old//${ROOT}} + find "${ROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -exec rm -fv {} \; + fi +} + +pkg_postinst() { + chmod 0755 "${ROOT}"/etc/sandbox.d #265376 +}