From 49cb8ddf1cf6d6fbf0c605eb35702e0a781fc47f Mon Sep 17 00:00:00 2001 From: TizenOpenSource Date: Fri, 13 Jan 2023 13:38:18 +0900 Subject: [PATCH] Fix build error Signed-off-by: TizenOpenSource --- packaging/add_audit_arch_aarch64.patch | 15 +++++++++++++++ packaging/sudo.spec | 9 +++++---- 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 packaging/add_audit_arch_aarch64.patch diff --git a/packaging/add_audit_arch_aarch64.patch b/packaging/add_audit_arch_aarch64.patch new file mode 100644 index 0000000..0d7a1d2 --- /dev/null +++ b/packaging/add_audit_arch_aarch64.patch @@ -0,0 +1,15 @@ +diff --git a/src/exec_ptrace.h b/src/exec_ptrace.h +index 680194d..8c5d604 100644 +--- a/src/exec_ptrace.h ++++ b/src/exec_ptrace.h +@@ -46,6 +46,10 @@ + # endif + #endif + ++#ifndef AUDIT_ARCH_AARCH64 ++#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) ++#endif ++ + /* Align address to a (compat) word boundary. */ + #define WORDALIGN(_a, _r) \ + (((_a) + ((long)(_r).wordsize - 1L)) & ~((long)(_r).wordsize - 1L)) diff --git a/packaging/sudo.spec b/packaging/sudo.spec index a7a4d5e..439d171 100644 --- a/packaging/sudo.spec +++ b/packaging/sudo.spec @@ -14,6 +14,7 @@ Url: http://www.sudo.ws/ Source0: http://sudo.ws/sudo/dist/%{name}-%{version}.tar.gz Source1: sudo.pamd Source1001: sudo.manifest +Source1002: add_audit_arch_aarch64.patch BuildRequires: groff BuildRequires: pam-devel Requires(pre): coreutils @@ -46,7 +47,7 @@ makes possible to install packages from inside build. %prep %setup -q cp %{SOURCE1001} . - +%{__patch} -p1 < %{SOURCE1002} %build F_PIE=-fpie @@ -141,7 +142,6 @@ echo 'ALL ALL = (root) NOPASSWD: /usr/bin/rpm' >> %{_sysconfdir}/sudoers %{_libexecdir}/%{name}/%{name}/group_file.so %{_libexecdir}/%{name}/%{name}/system_group.so %{_libexecdir}/%{name}/%{name}/audit_json.so -%{_libexecdir}/%{name}/%{name}/sample_approval.so %{_libexecdir}/%{name}/%{name}/sudo_intercept.so %{_libexecdir}/%{name}/libsudo_util.so.* %attr(0711,root,root) %dir %ghost %{_localstatedir}/lib/%{name} @@ -151,7 +151,8 @@ echo 'ALL ALL = (root) NOPASSWD: /usr/bin/rpm' >> %{_sysconfdir}/sudoers %files devel %doc plugins/sample/sample_plugin.c %{_includedir}/sudo_plugin.h -%{_mandir}/man8/sudo_plugin.8%{?ext_man} -%attr(0644,root,root) %{_libexecdir}/%{name}/libsudo_util.so +%{_mandir}/man5/sudo_plugin.5%{?ext_man} +%{_libexecdir}/%{name}/libsudo_util.so* + %files rpm -- 2.7.4