aboutsummaryrefslogtreecommitdiffstats
path: root/community/radare2
diff options
context:
space:
mode:
Diffstat (limited to 'community/radare2')
-rw-r--r--community/radare2/APKBUILD152
-rw-r--r--community/radare2/capstone4.patch30
-rw-r--r--community/radare2/string-header-build-fix.patch25
3 files changed, 126 insertions, 81 deletions
diff --git a/community/radare2/APKBUILD b/community/radare2/APKBUILD
index 762cd8ee125..304896b4344 100644
--- a/community/radare2/APKBUILD
+++ b/community/radare2/APKBUILD
@@ -4,22 +4,105 @@
# Contributor: Jose-Luis Rivas <ghostbar@riseup.net>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=radare2
-pkgver=5.5.0
+pkgver=5.9.0
pkgrel=0
-pkgdesc="An opensource, crossplatform reverse engineering framework"
-url="http://www.radare.org"
-arch="all !mips64" # build failures
-license="GPL-3.0"
+pkgdesc="Opensource, crossplatform reverse engineering framework"
+url="https://www.radare.org/"
+arch="all"
+license="GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later"
options="net !check" # upstream does not provide any working testsuite
-makedepends="$depends_dev libzip-dev openssl1.1-compat-dev capstone-dev linux-headers"
-subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-libs"
-source="$pkgname-$pkgver.tar.gz::https://github.com/radare/radare2/archive/$pkgver.tar.gz
- string-header-build-fix.patch
- capstone4.patch"
+makedepends="
+ capstone-dev
+ file-dev
+ libzip-dev
+ linux-headers
+ lz4-dev
+ meson
+ xxhash-dev
+ zlib-dev
+ "
+subpackages="
+ $pkgname-dbg
+ $pkgname-dev
+ $pkgname-doc
+ $pkgname-libs
+ $pkgname-zsh-completion:zshcomp:noarch
+ "
+source="$pkgname-$pkgver.tar.gz::https://github.com/radare/radare2/archive/$pkgver.tar.gz"
# secfixes:
+# 5.8.2-r0:
+# - CVE-2023-0302
+# 5.8.0-r0:
+# - CVE-2022-4398
+# 5.7.2-r0:
+# - CVE-2022-34520
+# - CVE-2022-34502
+# 5.7.0-r0:
+# - CVE-2022-1437
+# - CVE-2022-1444
+# - CVE-2022-1451
+# - CVE-2022-1452
+# - CVE-2022-1649
+# - CVE-2022-1714
+# - CVE-2022-1809
+# - CVE-2022-1899
+# 5.6.8-r0:
+# - CVE-2022-1061
+# - CVE-2022-1207
+# - CVE-2022-1237
+# - CVE-2022-1238
+# - CVE-2022-1244
+# - CVE-2022-1283
+# - CVE-2022-1284
+# - CVE-2022-1296
+# - CVE-2022-1297
+# - CVE-2022-1382
+# - CVE-2022-1383
+# 5.6.6-r0:
+# - CVE-2022-0849
+# - CVE-2022-1031
+# - CVE-2022-1052
+# - CVE-2022-1240
+# 5.6.4-r0:
+# - CVE-2022-0476
+# - CVE-2022-0676
+# - CVE-2022-0695
+# - CVE-2022-0712
+# - CVE-2022-0713
+# 5.6.2-r0:
+# - CVE-2022-0518
+# - CVE-2022-0519
+# - CVE-2022-0520
+# - CVE-2022-0521
+# - CVE-2022-0522
+# - CVE-2022-0523
+# - CVE-2022-0559
+# 5.6.0-r0:
+# - CVE-2022-0139
+# - CVE-2022-0173
+# - CVE-2022-0419
+# 5.5.4-r0:
+# - CVE-2021-44974
+# - CVE-2021-44975
+# 5.5.2-r0:
+# - CVE-2021-4021
+# 5.4.0-r0:
+# - CVE-2021-3673
+# 5.3.1-r0:
+# - CVE-2021-32613
+# 4.5.1-r0:
+# - CVE-2020-16269
+# - CVE-2020-17487
# 4.5.0-r0:
# - CVE-2020-15121
+# 4.4.0-r0:
+# - CVE-2020-27793
+# - CVE-2020-27794
+# - CVE-2020-27795
+# 4.0.0-r0:
+# - CVE-2019-19590
+# - CVE-2019-19647
# 3.9.0-r0:
# - CVE-2019-14745
# - CVE-2019-12865
@@ -28,27 +111,44 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/radare/radare2/archive/$pkgv
# - CVE-2019-12790
build() {
- [ "$CARCH" = "s390x" ] && _disable_debugger="--disable-debugger"
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --localstatedir=/var \
+ local _disable_debugger=
+ if [ "$CARCH" = "s390x" ]; then
+ _disable_debugger="-Ddebugger=false"
+ fi
+
+ abuild-meson \
$_disable_debugger \
- --with-syscapstone \
- --with-openssl \
- --with-syszip
- make HAVE_LIBVERSION=1
+ -Duse_sys_magic=true \
+ -Duse_sys_zlib=true \
+ -Duse_sys_lz4=true \
+ -Duse_sys_xxhash=true \
+ -Duse_sys_zip=true \
+ -Duse_sys_capstone=true \
+ -Dwant_capstone=true \
+ . output
+ meson compile -C output
}
package() {
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" meson install --no-rebuild -C output
+
+ # Install additional documentation files
+ for file in doc/*; do
+ if [ -f "$file" ]; then
+ install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname "$file"
+ fi
+ done
+
+ # Create soname.major.minor symlinks which the meson build
+ # system doesn't create by default (GNU autotools did though).
+ for file in "$pkgdir"/usr/lib/libr_*.so.?.?.?; do
+ name=${file##*/} # basename with major.minor.patch
+ major=${name%.*} # basename with major.minor
+
+ ln -s "$name" "$pkgdir/usr/lib/$major"
+ done
}
sha512sums="
-a5a6a8b1c88fd01a4920e1bac15b853afdf23701229cd13789962682208ee6fa727c04acb5ee4fc54dd55a99016a68332fd4586c01ff69596b6abf461a7eb665 radare2-5.5.0.tar.gz
-5e60a1112a10cdd6a31374ba9b564d6522a37086380cf74b7232e32fb700ae1b2f68edbc0726ebedcc31d4789bc4f89525f117f25dac3609c60a75d471e49c85 string-header-build-fix.patch
-f0463c798345ee8cb776fd6b8b5a185c5c7300882b6619340c9264bcdc30a0f2a7700961f6b6100893db734ab8b0f352f6a5b6aac66992de860f9a062dab5648 capstone4.patch
+f184ad6e066a5113091912c11cca87cb9450eff20e920a00dc9da0efa9de97d6bfdaf44ae4d9e08a4760f4ebca82732832a309fad8452930adb4ee2438d9668e radare2-5.9.0.tar.gz
"
diff --git a/community/radare2/capstone4.patch b/community/radare2/capstone4.patch
deleted file mode 100644
index a6722173db1..00000000000
--- a/community/radare2/capstone4.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 645835794b0013b52042d5762d98d03fcbf250f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sergi=20=C3=80lvarez=20i=20Capilla?= <pancake@nowsecure.com>
-Date: Mon, 15 Nov 2021 18:10:04 +0100
-Subject: [PATCH] arm64's NAND isnt supported in capstone4
-
----
- libr/anal/p/anal_arm_cs.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/libr/anal/p/anal_arm_cs.c b/libr/anal/p/anal_arm_cs.c
-index dbdfcafd898..307b3997486 100644
---- a/libr/anal/p/anal_arm_cs.c
-+++ b/libr/anal/p/anal_arm_cs.c
-@@ -1361,13 +1361,13 @@ static int analop64_esil(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int l
- case ARM64_INS_AND:
- OPCALL("&");
- break;
-- case ARM64_INS_NAND:
-- OPCALL_NEG("&");
-- break;
- case ARM64_INS_ORR:
- OPCALL("|");
- break;
- #if CS_API_MAJOR > 4
-+ case ARM64_INS_NAND:
-+ OPCALL_NEG("&");
-+ break;
- case ARM64_INS_ADDS:
- case ARM64_INS_ADCS:
- OPCALL("+");
diff --git a/community/radare2/string-header-build-fix.patch b/community/radare2/string-header-build-fix.patch
deleted file mode 100644
index aa4acacb361..00000000000
--- a/community/radare2/string-header-build-fix.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-The fortify header for wchar.h seems to assume that string.h is included
-beforehand. Otherwise it fails with the following error:
-
- In file included from /usr/include/fortify/strings.h:22,
- from /usr/include/string.h:57,
- from /usr/include/fortify/wchar.h:30,
- from /home/soeren/src/aports/community/radare2/src/radare2-5.0.0/libr/include/r_util/r_str.h:4,
- from uleb128.c:3:
- /usr/include/fortify/string.h:144:1: error: 'mempcpy' undeclared here (not in a function); did you mean 'memccpy'?
- 144 | _FORTIFY_FN(mempcpy) void *mempcpy(void *__d, const void *__s, size_t __n)
- | ^~~~~~~~~~~
-
-Including string.h fixes the error.
-
-diff -upr radare2-5.0.0.orig/libr/include/r_util/r_str.h radare2-5.0.0/libr/include/r_util/r_str.h
---- radare2-5.0.0.orig/libr/include/r_util/r_str.h 2020-12-22 12:42:23.032644219 +0100
-+++ radare2-5.0.0/libr/include/r_util/r_str.h 2020-12-22 12:42:30.796011296 +0100
-@@ -1,6 +1,7 @@
- #ifndef R_STR_H
- #define R_STR_H
-
-+#include <string.h>
- #include <wchar.h>
- #include "r_str_util.h"
- #include "r_list.h"