Skip to contentSkip to conversation

libseccomp: Update to main branch

PATCH Superseded Khem Raj 4 participants 7 messages Jul 14, 2021 – Jul 17, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 libseccomp: Update to main branch

Get RV32 imlementation

---
 ...-configure.ac-Bump-version-to-2.5.99.patch | 26 +++++++++++++++++++
 .../libseccomp/libseccomp_2.5.1.bb            |  7 +++--
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch
meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch new file +26 -0
new file mode 100644
index 0000000000..f30ca77465
@@ -0,0 +1,26 @@
+From 00b6bc440a75443f9bea431bbb41df50469b5093 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 8 Jun 2021 23:13:20 -0700
+Subject: [PATCH] configure.ac: Bump version to 2.5.99
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3e87734..48e796f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ dnl #
+ dnl ####
+ dnl libseccomp defines
+ dnl ####
+-AC_INIT([libseccomp], [0.0.0])
++AC_INIT([libseccomp], [2.5.99])
+ 
+ dnl ####
+ dnl autoconf configuration
+-- 
+2.32.0
+
meta/recipes-support/libseccomp/libseccomp_2.5.1.bb +3 -4
index 8fe1023901..5f79f3dbcb 100644
@@ -7,14 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=0;endline=1;md5=8eac08d22113880357c
 
 DEPENDS += "gperf-native"
 
-SRCREV = "4bf70431a339a2886ab8c82e9a45378f30c6e6c7"
+SRCREV = "${AUTOREV}"
 
-SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.5 \
+SRC_URI = "git://github.com/kraj/libseccomp.git;branch=riscv32 \
+           file://0001-configure.ac-Bump-version-to-2.5.99.patch \
            file://run-ptest \
            "
 
-COMPATIBLE_HOST_riscv32 = "null"
-
 S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig ptest features_check
Signature · 1 line
2.32.0
author
#1 lore raw

PATCH 2/2 systemd: Fix libseccomp testcase involving __NR_ppoll

Some architectures may not have this syscall

---
 ...comp-Check-for-__NR_ppoll-before-use.patch | 39 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_248.3.bb    |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch
meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch new file +39 -0
new file mode 100644
index 0000000000..0ba5fa2547
@@ -0,0 +1,39 @@
+From 027ac2ad0695bb506460f9dd7e57149b71055887 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 8 Jun 2021 23:21:01 -0700
+Subject: [PATCH] test-seccomp: Check for __NR_ppoll before use
+
+some newer architectures like riscv32 do not have __NR_ppoll from get go
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/19858]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/test/test-seccomp.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
+index b1f917eb54..daac0fcea8 100644
+--- a/src/test/test-seccomp.c
++++ b/src/test/test-seccomp.c
+@@ -832,7 +832,7 @@ static void test_load_syscall_filter_set_raw(void) {
+                 assert_se(s = hashmap_new(NULL));
+ #if defined __NR_poll && __NR_poll >= 0
+                 assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(-1)) >= 0);
+-#else
++#elif defined __NR_ppoll
+                 assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(-1)) >= 0);
+ #endif
+ 
+@@ -849,7 +849,8 @@ static void test_load_syscall_filter_set_raw(void) {
+                 assert_se(s = hashmap_new(NULL));
+ #if defined __NR_poll && __NR_poll >= 0
+                 assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(EILSEQ)) >= 0);
+-#else
++#elif defined __NR_ppoll
++                assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(-1)) >= 0);
+                 assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(EILSEQ)) >= 0);
+ #endif
+ 
+-- 
+2.32.0
+
meta/recipes-core/systemd/systemd_248.3.bb +1 -0
index 37607708f7..f5022a99c2 100644
@@ -26,6 +26,7 @@ SRC_URI += " \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
            file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \
            file://0001-test-parse-argument-Include-signal.h.patch \
+           file://0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch \
            "
 
 # patches needed by musl
Signature · 1 line
2.32.0
#2 lore raw
In reply to Khem Raj

Did you forget to replace AUTOREV with new SRCREV when you were done?

Quoted 76 lines · Khem Raj

Get RV32 imlementation

---
 ...-configure.ac-Bump-version-to-2.5.99.patch | 26 +++++++++++++++++++
 .../libseccomp/libseccomp_2.5.1.bb            |  7 +++--
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644

meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch

diff --git a/meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch b/meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch new file mode 100644
index 0000000000..f30ca77465
--- /dev/null
+++
b/meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch

meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch new file +26 -0
@@ -0,0 +1,26 @@
+From 00b6bc440a75443f9bea431bbb41df50469b5093 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 8 Jun 2021 23:13:20 -0700
+Subject: [PATCH] configure.ac: Bump version to 2.5.99
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3e87734..48e796f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ dnl #
+ dnl ####
+ dnl libseccomp defines
+ dnl ####
+-AC_INIT([libseccomp], [0.0.0])
++AC_INIT([libseccomp], [2.5.99])
+
+ dnl ####
+ dnl autoconf configuration
+--
+2.32.0
+
meta/recipes-support/libseccomp/libseccomp_2.5.1.bb +0 -0
index 8fe1023901..5f79f3dbcb 100644
@@ -7,14 +7,13 @@ LIC_FILES_CHKSUM =

"file://LICENSE;beginline=0;endline=1;md5=8eac08d22113880357c

DEPENDS += "gperf-native"

meta/recipes-support/libseccomp/libseccomp_2.5.1.bb +3 -5
-SRCREV = "4bf70431a339a2886ab8c82e9a45378f30c6e6c7"
+SRCREV = "${AUTOREV}"
 
-SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.5 \
+SRC_URI = "git://github.com/kraj/libseccomp.git;branch=riscv32 \
+           file://0001-configure.ac-Bump-version-to-2.5.99.patch \
            file://run-ptest \
            "
 
-COMPATIBLE_HOST_riscv32 = "null"
-
 S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig ptest features_check
--

2.32.0

author
#3 lore raw
Quoted 3 lines · Martin Jansa

Did you forget to replace AUTOREV with new SRCREV when you were done?

hmm yes i did

Quoted 71 lines · Khem Raj
Quoted 70 lines

Get RV32 imlementation

---
 ...-configure.ac-Bump-version-to-2.5.99.patch | 26 +++++++++++++++++++
 .../libseccomp/libseccomp_2.5.1.bb            |  7 +++--
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch
meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch new file +26 -0
new file mode 100644
index 0000000000..f30ca77465
@@ -0,0 +1,26 @@
+From 00b6bc440a75443f9bea431bbb41df50469b5093 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 8 Jun 2021 23:13:20 -0700
+Subject: [PATCH] configure.ac: Bump version to 2.5.99
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3e87734..48e796f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ dnl #
+ dnl ####
+ dnl libseccomp defines
+ dnl ####
+-AC_INIT([libseccomp], [0.0.0])
++AC_INIT([libseccomp], [2.5.99])
+
+ dnl ####
+ dnl autoconf configuration
+--
+2.32.0
+
meta/recipes-support/libseccomp/libseccomp_2.5.1.bb +3 -5
index 8fe1023901..5f79f3dbcb 100644
@@ -7,14 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=0;endline=1;md5=8eac08d22113880357c
 
 DEPENDS += "gperf-native"
 
-SRCREV = "4bf70431a339a2886ab8c82e9a45378f30c6e6c7"
+SRCREV = "${AUTOREV}"
 
-SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.5 \
+SRC_URI = "git://github.com/kraj/libseccomp.git;branch=riscv32 \
+           file://0001-configure.ac-Bump-version-to-2.5.99.patch \
            file://run-ptest \
            "
 
-COMPATIBLE_HOST_riscv32 = "null"
-
 S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig ptest features_check
--

2.32.0

#4 lore raw
In reply to Khem Raj
Quoted 1 line · Khem Raj

Get RV32 imlementation

The subject is miss leading. You are replacing the upstream url with your github version to make riscv easier. Is this the preferred method of supporting new Architectures?

-armin

Quoted 65 lines
---
 ...-configure.ac-Bump-version-to-2.5.99.patch | 26 +++++++++++++++++++
 .../libseccomp/libseccomp_2.5.1.bb            |  7 +++--
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch
meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch new file +26 -0
new file mode 100644
index 0000000000..f30ca77465
@@ -0,0 +1,26 @@
+From 00b6bc440a75443f9bea431bbb41df50469b5093 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 8 Jun 2021 23:13:20 -0700
+Subject: [PATCH] configure.ac: Bump version to 2.5.99
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3e87734..48e796f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ dnl #
+ dnl ####
+ dnl libseccomp defines
+ dnl ####
+-AC_INIT([libseccomp], [0.0.0])
++AC_INIT([libseccomp], [2.5.99])
+ 
+ dnl ####
+ dnl autoconf configuration
+-- 
+2.32.0
+
meta/recipes-support/libseccomp/libseccomp_2.5.1.bb +3 -4
index 8fe1023901..5f79f3dbcb 100644
@@ -7,14 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=0;endline=1;md5=8eac08d22113880357c
 
 DEPENDS += "gperf-native"
 
-SRCREV = "4bf70431a339a2886ab8c82e9a45378f30c6e6c7"
+SRCREV = "${AUTOREV}"
 
-SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.5 \
+SRC_URI = "git://github.com/kraj/libseccomp.git;branch=riscv32 \
+           file://0001-configure.ac-Bump-version-to-2.5.99.patch \
            file://run-ptest \
            "
 
-COMPATIBLE_HOST_riscv32 = "null"
-
 S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig ptest features_check
#5 lore raw
Quoted 7 lines · Armin Kuster
Quoted 1 line · Khem Raj

Get RV32 imlementation

The subject is miss leading. You are replacing the upstream url with your github version to make riscv easier. Is this the preferred method of supporting new Architectures?

Please don't do this :(

We need to reference the main upstream repo, not a fork of for some specific feature work.

Cheers,

Richard

author
#6 lore raw
In reply to Armin Kuster
Quoted 8 lines · On Sat, Jul 17, 2021 at 2:30 PM akuster808 <[email protected]> wrote:
Quoted 1 line · Khem Raj

Get RV32 imlementation

The subject is miss leading. You are replacing the upstream url with your github version to make riscv easier. Is this the preferred method of supporting new Architectures?

No. You are looking at obsolete patch please review v2 and the patches are already submitted upstream as well

Quoted 75 lines

-armin

Quoted 7 lines
---
 ...-configure.ac-Bump-version-to-2.5.99.patch | 26 +++++++++++++++++++
 .../libseccomp/libseccomp_2.5.1.bb            |  7 +++--
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644

meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch

Quoted 2 lines

diff --git

a/meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch b/meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch

Quoted 4 lines

new file mode 100644
index 0000000000..f30ca77465
--- /dev/null
+++

b/meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch

Review

Quoted 28 lines
meta/recipes-support/libseccomp/files/0001-configure.ac-Bump-version-to-2.5.99.patch new file +26 -0
@@ -0,0 +1,26 @@
+From 00b6bc440a75443f9bea431bbb41df50469b5093 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 8 Jun 2021 23:13:20 -0700
+Subject: [PATCH] configure.ac: Bump version to 2.5.99
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3e87734..48e796f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ dnl #
+ dnl ####
+ dnl libseccomp defines
+ dnl ####
+-AC_INIT([libseccomp], [0.0.0])
++AC_INIT([libseccomp], [2.5.99])
+
+ dnl ####
+ dnl autoconf configuration
+--
+2.32.0
+
(quoted diff) +0 -0

b/meta/recipes-support/libseccomp/libseccomp_2.5.1.bb

meta/recipes-support/libseccomp/libseccomp_2.5.1.bb LIC_FILES_CHKSUM =

Quoted 4 lines

index 8fe1023901..5f79f3dbcb 100644

meta/recipes-support/libseccomp/libseccomp_2.5.1.bb +0 -0
@@ -7,14 +7,13 @@ LIC_FILES_CHKSUM =

"file://LICENSE;beginline=0;endline=1;md5=8eac08d22113880357c

Quoted 20 lines
meta/recipes-support/libseccomp/libseccomp_2.5.1.bb +3 -4
 DEPENDS += "gperf-native"
 
-SRCREV = "4bf70431a339a2886ab8c82e9a45378f30c6e6c7"
+SRCREV = "${AUTOREV}"
 
-SRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.5 \
+SRC_URI = "git://github.com/kraj/libseccomp.git;branch=riscv32 \
+           file://0001-configure.ac-Bump-version-to-2.5.99.patch \
            file://run-ptest \
            "
 
-COMPATIBLE_HOST_riscv32 = "null"
-
 S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig ptest features_check