[packages/systemd] try fixing build on x32 with new libseccomp

atler atler at pld-linux.org
Mon Dec 2 17:02:22 CET 2019


commit e94835298772a5b542b87c62af7e87f3a999722f
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Dec 2 16:57:08 2019 +0100

    try fixing build on x32 with new libseccomp
    
    syscall number on x32 has huge offset which makes it "unsigned long int"
    and in turn not compatible with "%d" format specifier. since fallback
    numbers appear to be negative just cast to "long long int" which should
    cover whole range of values

 systemd-x32.patch | 20 ++++++++++++++++++++
 systemd.spec      |  2 ++
 2 files changed, 22 insertions(+)
---
diff --git a/systemd.spec b/systemd.spec
index 1625220..feae58e 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -76,6 +76,7 @@ Patch11:	optional-tmp-on-tmpfs.patch
 Patch12:	uids_gids.patch
 Patch13:	sysctl.patch
 Patch14:	pld-pam-%{name}-user.patch
+Patch15:	%{name}-x32.patch
 URL:		https://www.freedesktop.org/wiki/Software/systemd/
 BuildRequires:	acl-devel
 %{?with_audit:BuildRequires:	audit-libs-devel}
@@ -671,6 +672,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 cp -p %{SOURCE2} src/systemd_booted.c
 
diff --git a/systemd-x32.patch b/systemd-x32.patch
new file mode 100644
index 0000000..81539ef
--- /dev/null
+++ b/systemd-x32.patch
@@ -0,0 +1,20 @@
+diff -urN systemd-244.orig/src/test/test-seccomp.c systemd-244/src/test/test-seccomp.c
+--- systemd-244.orig/src/test/test-seccomp.c	2019-11-29 17:32:36.000000000 +0100
++++ systemd-244/src/test/test-seccomp.c	2019-12-02 16:38:04.314771202 +0100
+@@ -558,11 +558,11 @@
+         log_info("/* %s */", __func__);
+ 
+         SECCOMP_FOREACH_LOCAL_ARCH(arch) {
+-                log_debug("arch %s: SCMP_SYS(mmap) = %d", seccomp_arch_to_string(arch), SCMP_SYS(mmap));
+-                log_debug("arch %s: SCMP_SYS(mmap2) = %d", seccomp_arch_to_string(arch), SCMP_SYS(mmap2));
+-                log_debug("arch %s: SCMP_SYS(shmget) = %d", seccomp_arch_to_string(arch), SCMP_SYS(shmget));
+-                log_debug("arch %s: SCMP_SYS(shmat) = %d", seccomp_arch_to_string(arch), SCMP_SYS(shmat));
+-                log_debug("arch %s: SCMP_SYS(shmdt) = %d", seccomp_arch_to_string(arch), SCMP_SYS(shmdt));
++                log_debug("arch %s: SCMP_SYS(mmap) = %lli", seccomp_arch_to_string(arch), (long long int) SCMP_SYS(mmap));
++                log_debug("arch %s: SCMP_SYS(mmap2) = %lli", seccomp_arch_to_string(arch), (long long int) SCMP_SYS(mmap2));
++                log_debug("arch %s: SCMP_SYS(shmget) = %lli", seccomp_arch_to_string(arch), (long long int) SCMP_SYS(shmget));
++                log_debug("arch %s: SCMP_SYS(shmat) = %lli", seccomp_arch_to_string(arch), (long long int) SCMP_SYS(shmat));
++                log_debug("arch %s: SCMP_SYS(shmdt) = %lli", seccomp_arch_to_string(arch), (long long int) SCMP_SYS(shmdt));
+         }
+ 
+         if (!is_seccomp_available()) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/e94835298772a5b542b87c62af7e87f3a999722f



More information about the pld-cvs-commit mailing list