From bdf089313be86997bc70ff9e9497f7ac10e5959f Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Thu, 15 Jun 2017 22:06:37 +0200 Subject: testing/mono: fix build, improve PaX marking It should not be needed to paxmark all binaries. --- testing/mono/APKBUILD | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'testing') diff --git a/testing/mono/APKBUILD b/testing/mono/APKBUILD index 3727f58903..89b9add927 100644 --- a/testing/mono/APKBUILD +++ b/testing/mono/APKBUILD @@ -6,8 +6,7 @@ pkgver=5.0.1.1 pkgrel=0 pkgdesc="Free implementation of the .NET platform including runtime and compiler" url="http://www.mono-project.com/" -#arch="x86_64 x86" -arch="" +arch="x86_64 x86" license="GPL" depends="python2" depends_dev="zlib-dev libgdiplus-dev" @@ -16,6 +15,15 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" source="http://download.mono-project.com/sources/mono/mono-${pkgver/_/~}.tar.bz2" builddir="$srcdir/$pkgname-$pkgver" +prepare() { + default_prepare + + # We need to do this so it don't get killed in the build proces when + # MPROTECT and RANDMMAP is enable. + sed -i '/exec "/ i\paxmark mr "$(readlink -f "$MONO_EXECUTABLE")"' \ + runtime/mono-wrapper.in +} + build() { cd "$builddir" @@ -35,9 +43,7 @@ build() { --enable-parallel-mark \ --with-mcs-docs=no \ --without-sigaltstack - - # dirty hack to set paxmark on grsec kernels - make || paxmark -mr mono/mini/mono-sgen && make + make } package() { @@ -45,9 +51,7 @@ package() { make -j1 DESTDIR="$pkgdir" install - # mark all bins - scanelf --nobanner "$pkgdir"/usr/bin/* | awk '{print $2}' \ - | xargs paxmark -mr + paxmark mr "$pkgdir"/usr/bin/mono-sgen } sha512sums="de2a8a3580b8236bafdc7e6967d68da08bf2dc775bce5166aba6134c1b986ae7fc56b97743d5122de14bf8fe074d3508c07324735616439dea0913633ee817da mono-5.0.1.1.tar.bz2" -- cgit v1.2.3