Fix build error accepted/tizen_8.0_unified sandbox/backup/sudo_1.9.12p1_20240122 tizen_8.0 accepted/tizen/8.0/unified/20231005.095548 accepted/tizen/unified/20230120.182022 tizen_8.0_m2_release
authorTizenOpenSource <tizenopensrc@samsung.com>
Fri, 13 Jan 2023 04:38:18 +0000 (13:38 +0900)
committerTizenOpenSource <tizenopensrc@samsung.com>
Fri, 13 Jan 2023 04:38:18 +0000 (13:38 +0900)
Signed-off-by: TizenOpenSource <tizenopensrc@samsung.com>
packaging/add_audit_arch_aarch64.patch [new file with mode: 0644]
packaging/sudo.spec

diff --git a/packaging/add_audit_arch_aarch64.patch b/packaging/add_audit_arch_aarch64.patch
new file mode 100644 (file)
index 0000000..0d7a1d2
--- /dev/null
@@ -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))
index a7a4d5e..439d171 100644 (file)
@@ -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