diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-27 14:34:02 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-27 14:34:02 -0600 |
commit | 7553795ec2d735c01dbdde129a65b7f45d5aa999 (patch) | |
tree | b3970009a8246b0c17a105fe6b10c8077fc2b763 /harmony/strace | |
parent | e2b01859c88d221992403d1293d42da33002be4d (diff) | |
download | packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.gz packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.bz2 packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.xz packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.zip |
Add harmony/ repo for packages still being discussed
See https://wiki.adelielinux.org/wiki/Project:Harmony
Diffstat (limited to 'harmony/strace')
-rw-r--r-- | harmony/strace/APKBUILD | 64 | ||||
-rw-r--r-- | harmony/strace/disable-fortify.patch | 39 | ||||
-rw-r--r-- | harmony/strace/fix-ppc-pt-regs-collision.patch | 19 | ||||
-rw-r--r-- | harmony/strace/nlattr-fix.patch | 21 |
4 files changed, 143 insertions, 0 deletions
diff --git a/harmony/strace/APKBUILD b/harmony/strace/APKBUILD new file mode 100644 index 000000000..3dc9c3443 --- /dev/null +++ b/harmony/strace/APKBUILD @@ -0,0 +1,64 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=strace +pkgver=4.19 +pkgrel=0 +pkgdesc="A useful diagnositic, instructional, and debugging tool" +url="https://strace.io/" +arch="all" +license="BSD" +depends="" +makedepends="linux-headers autoconf automake" +subpackages="$pkgname-doc" +options="!checkroot" +source="$pkgname-$pkgver.tar.gz::https://github.com/strace/$pkgname/archive/v$pkgver.tar.gz + disable-fortify.patch + fix-ppc-pt-regs-collision.patch + nlattr-fix.patch + " + +builddir="$srcdir/$pkgname-$pkgver" + +build() { + cd "$builddir" + case "$CLIBC" in + musl) export CFLAGS="$CFLAGS -Dsigcontext_struct=sigcontext" ;; + esac + + case "$CARCH" in + s390x) + # __SIGNAL_FRAMESIZE is defined in asm/sigcontext.h + # but including it would make conflict with struct sigcontext + # since we compile with it in musl. + # Temporarily add this until musl upstream has a proper fix + # for struct sigcontext. + export CFLAGS="$CFLAGS -D__SIGNAL_FRAMESIZE=160" + ;; + esac + + ./bootstrap + + ac_cv_have_long_long_off_t=yes \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make -j1 DESTDIR="$pkgdir" install +} + +sha512sums="fbf953d64b43785648e2df0eb6beee409c6b6f6c6a4d227b54c02a049031c5ff3a3a6af52a68a2980d89eb06dcafc36be5f8784728e9a28348145cdb4a7764f9 strace-4.19.tar.gz +273b92ebf0069f19bef7ec26c7860e2af7ef01e782255c70ded1ae5e967f8f6bf031ecba96612c6083bf58f46278ba4ab3ec0fb35b08c8c8d668191f97adee52 disable-fortify.patch +b70cee89dd49a2b5a69dc2a56c3a11169d3306e1a73981155188b574486965c034aa52b4ac1c6edff5ef55c9d52f27750acb242fac095a8a9f69689b51b3fad1 fix-ppc-pt-regs-collision.patch +44b1872cf996caa4970fa6c2875a3a2cffe4a38455e328d968bd7855ef9a05cf41190794dc137bc8667576635f5271057cf0e6cde9a6c7aee66afd1dba9bdba0 nlattr-fix.patch" diff --git a/harmony/strace/disable-fortify.patch b/harmony/strace/disable-fortify.patch new file mode 100644 index 000000000..26b2978c5 --- /dev/null +++ b/harmony/strace/disable-fortify.patch @@ -0,0 +1,39 @@ +Subject: [PATCH] don't use fortify-headers on netlink test sources +From: A. Wilcox <AWilcox@Wilcox-Tech.com> + +We can't use fortify-headers on netlink tests because it tests what happens +when a buffer overrun occurs. + +--- strace-4.18/tests/netlink_protocol.c.old 2017-07-05 07:08:09.000000000 +0000 ++++ strace-4.18/tests/netlink_protocol.c 2017-08-17 01:09:45.822502012 +0000 +@@ -28,6 +28,8 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#define _FORTIFY_SOURCE 0 ++ + #include "tests.h" + + #ifdef HAVE_SYS_XATTR_H +--- strace-4.18/tests/netlink_sock_diag.c.old 2017-07-05 07:08:09.000000000 +0000 ++++ strace-4.18/tests/netlink_sock_diag.c 2017-08-17 01:10:00.935807300 +0000 +@@ -27,6 +27,8 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#define _FORTIFY_SOURCE 0 ++ + #include "tests.h" + #include <stdio.h> + #include <string.h> +--- strace-4.18/tests/nlattr.c.old 2017-07-05 07:08:09.000000000 +0000 ++++ strace-4.18/tests/nlattr.c 2017-08-17 01:10:11.862453682 +0000 +@@ -28,6 +28,8 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#define _FORTIFY_SOURCE 0 ++ + #include "tests.h" + + #include <stdio.h> diff --git a/harmony/strace/fix-ppc-pt-regs-collision.patch b/harmony/strace/fix-ppc-pt-regs-collision.patch new file mode 100644 index 000000000..6de0fcdd6 --- /dev/null +++ b/harmony/strace/fix-ppc-pt-regs-collision.patch @@ -0,0 +1,19 @@ +--- a/ptrace.h ++++ b/ptrace.h +@@ -48,7 +48,15 @@ + # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + #endif + +-#include <linux/ptrace.h> ++#if defined(__powerpc__) || defined(__powerpc64__) ++# include <linux/types.h> ++# define __ASSEMBLY__ ++# include <linux/ptrace.h> ++# undef __ASSEMBLY__ ++#else ++# include <linux/ptrace.h> ++#endif ++ + + #ifdef HAVE_STRUCT_IA64_FPREG + # undef ia64_fpreg diff --git a/harmony/strace/nlattr-fix.patch b/harmony/strace/nlattr-fix.patch new file mode 100644 index 000000000..6d480fabb --- /dev/null +++ b/harmony/strace/nlattr-fix.patch @@ -0,0 +1,21 @@ +--- strace-4.18/tests/nlattr.c.old 2017-07-05 07:08:09.000000000 +0000 ++++ strace-4.18/tests/nlattr.c 2017-08-17 00:25:26.734218699 +0000 +@@ -61,7 +61,7 @@ + }; + struct msg *msg; + struct nlattr *nla; +- unsigned int msg_len; ++ uint32_t msg_len; + long rc; + + /* fetch fail: len < sizeof(struct nlattr) */ +@@ -259,7 +259,7 @@ + }; + struct msg *msg; + struct nlattr *nla; +- unsigned int msg_len; ++ uint32_t msg_len; + long rc; + + msg_len = NLMSG_SPACE(sizeof(msg->udm)) + sizeof(*nla); + |