1 |
commit: d026e6e417699653eeb305f0af3257fd66e599d6 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 7 22:18:00 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 7 22:18:00 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d026e6e4 |
7 |
|
8 |
app-admin/sudo: backport arm64 build fix patch |
9 |
|
10 |
Closes: https://bugs.gentoo.org/850454 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../sudo/files/sudo-1.9.11-fix-arm64-build.patch | 23 ++++++++++++++++++++++ |
14 |
app-admin/sudo/sudo-1.9.11.ebuild | 4 ++++ |
15 |
2 files changed, 27 insertions(+) |
16 |
|
17 |
diff --git a/app-admin/sudo/files/sudo-1.9.11-fix-arm64-build.patch b/app-admin/sudo/files/sudo-1.9.11-fix-arm64-build.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..baf960d49530 |
20 |
--- /dev/null |
21 |
+++ b/app-admin/sudo/files/sudo-1.9.11-fix-arm64-build.patch |
22 |
@@ -0,0 +1,23 @@ |
23 |
+https://github.com/sudo-project/sudo/commit/d549adf04bfde7936306203e2e8886ffd93d00ea |
24 |
+https://bugs.gentoo.org/850454 |
25 |
+ |
26 |
+From: Pierre Bourdon <delroth@×××××.com> |
27 |
+Date: Tue, 7 Jun 2022 17:14:39 +0200 |
28 |
+Subject: [PATCH] exec_ptrace: fix missing sudo_pt_regs on aarch64 |
29 |
+ |
30 |
+AArch64 already had an existing "user_pt_regs" struct and didn't need a |
31 |
+struct alias before the renaming to "sudo_pt_regs". Make the code build |
32 |
+again by adding the now missing alias. |
33 |
+ |
34 |
+Fixes: 2eb8ff17 |
35 |
+--- a/src/exec_ptrace.h |
36 |
++++ b/src/exec_ptrace.h |
37 |
+@@ -76,6 +76,7 @@ |
38 |
+ # define reg_arg4(x) (x).r10 |
39 |
+ #elif defined(__aarch64__) |
40 |
+ # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_AARCH64 |
41 |
++# define sudo_pt_regs struct user_pt_regs |
42 |
+ # define reg_syscall(x) (x).regs[8] /* w8 */ |
43 |
+ # define reg_retval(x) (x).regs[0] /* x0 */ |
44 |
+ # define reg_sp(x) (x).sp /* sp */ |
45 |
+ |
46 |
|
47 |
diff --git a/app-admin/sudo/sudo-1.9.11.ebuild b/app-admin/sudo/sudo-1.9.11.ebuild |
48 |
index dda0650bd5fc..7515b25714d3 100644 |
49 |
--- a/app-admin/sudo/sudo-1.9.11.ebuild |
50 |
+++ b/app-admin/sudo/sudo-1.9.11.ebuild |
51 |
@@ -80,6 +80,10 @@ REQUIRED_USE=" |
52 |
|
53 |
MAKEOPTS+=" SAMPLES=" |
54 |
|
55 |
+PATCHES=( |
56 |
+ "${FILESDIR}"/${P}-fix-arm64-build.patch |
57 |
+) |
58 |
+ |
59 |
src_prepare() { |
60 |
default |
61 |
elibtoolize |