Skip to contentSkip to conversation

kas: tweak to improve CI work flow

PATCH New Armin Kuster 1 participant 2 messages Dec 31, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 kas: tweak to improve CI work flow

drop ptest from base builds.
Enable ptest in test image only

---
 kas/kas-security-base.yml | 1 +
 kas/qemux86-test.yml      | 4 ++++
 2 files changed, 5 insertions(+)
kas/kas-security-base.yml +1 -0
index bdd74b1..6d53071 100644
@@ -46,6 +46,7 @@ local_conf_header:
     PACKAGE_CLASSES = "package_ipk"
 
     DISTRO_FEATURES:append = " security pam apparmor smack ima tpm tpm2"
+    DISTRO_FEATURES:remove = "ptest"
     MACHINE_FEATURES:append = " tpm tpm2"
 
   diskmon: |
kas/qemux86-test.yml +4 -0
index 83a5353..98f1e7f 100644
@@ -3,4 +3,8 @@ header:
   includes:
     - kas-security-base.yml
 
+local_conf_header:
+  ptest: |
+      DISTRO_FEATURES:append = " ptest"
+
 machine: qemux86
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 parsec-service: fix build error

Fixes:

| error: unnecessary qualification
|    --> src/front/domain_socket.rs:247:30
|     |
| 247 |             let ucred_size = mem::size_of::<ucred>();
|     |                              ^^^^^^^^^^^^^^^^^^^^^
---
 ...Fix-unnecessary-qualifications-error.patch | 50 +++++++++++++++++++
 .../parsec-service/parsec-service_1.4.1.bb    |  2 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta-parsec/recipes-parsec/parsec-service/files/0002-Fix-unnecessary-qualifications-error.patch
meta-parsec/recipes-parsec/parsec-service/files/0002-Fix-unnecessary-qualifications-error.patch new file +50 -0
new file mode 100644
index 0000000..cef6bd8
@@ -0,0 +1,50 @@
+From 86d4d2ca2f1e873a29f9f4d4bba99fedee19a144 Mon Sep 17 00:00:00 2001
+From: Gowtham Suresh Kumar <[email protected]>
+Date: Thu, 29 Aug 2024 17:10:06 +0100
+Subject: [PATCH 2/4] Fix unnecessary qualifications error
+
+Signed-off-by: Gowtham Suresh Kumar <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Armin Kuster <[email protected]>
+
+---
+ src/front/domain_socket.rs | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/front/domain_socket.rs b/src/front/domain_socket.rs
+index 9fb8a0c..a0effa5 100644
+--- a/src/front/domain_socket.rs
++++ b/src/front/domain_socket.rs
+@@ -239,15 +239,16 @@ pub mod peer_credentials {
+     pub mod impl_linux {
+         use super::UCred;
+         use libc::{c_void, getsockopt, socklen_t, ucred, SOL_SOCKET, SO_PEERCRED};
++        use std::io;
++        use std::mem::size_of;
+         use std::os::unix::io::AsRawFd;
+         use std::os::unix::net::UnixStream;
+-        use std::{io, mem};
+ 
+         pub fn peer_cred(socket: &UnixStream) -> io::Result<UCred> {
+-            let ucred_size = mem::size_of::<ucred>();
++            let ucred_size = size_of::<ucred>();
+ 
+             // Trivial sanity checks.
+-            assert!(mem::size_of::<u32>() <= mem::size_of::<usize>());
++            assert!(size_of::<u32>() <= size_of::<usize>());
+             assert!(ucred_size <= u32::MAX as usize);
+ 
+             let mut ucred_size = ucred_size as socklen_t;
+@@ -266,7 +267,7 @@ pub mod peer_credentials {
+                     &mut ucred_size,
+                 );
+ 
+-                if ret == 0 && ucred_size as usize == mem::size_of::<ucred>() {
++                if ret == 0 && ucred_size as usize == size_of::<ucred>() {
+                     Ok(UCred {
+                         uid: ucred.uid,
+                         gid: ucred.gid,
+-- 
+2.43.0
+
meta-parsec/recipes-parsec/parsec-service/parsec-service_1.4.1.bb +2 -0
index 3aa0b0a..1d7c6e8 100644
@@ -11,6 +11,7 @@ SRC_URI += "crate://crates.io/parsec-service/${PV} \
             file://parsec_init \
             file://systemd.patch \
             file://parsec-tmpfiles.conf \
+            file://0002-Fix-unnecessary-qualifications-error.patch \
 "
 SRC_URI[parsec-service-1.4.1.sha256sum] = "06ad906fb13d6844ad676d4203a1096ae4efc87fe1abcea0481c507df56d8c98"
 
@@ -47,6 +48,7 @@ INITSCRIPT_NAME = "parsec"
 # The file should also be included into SRC_URI then
 PARSEC_CONFIG ?= "${S}/config.toml"
 
+
 do_install () {
     # Binaries
     install -d -m 700 -o parsec -g parsec "${D}${libexecdir}/parsec"
Signature · 1 line
2.43.0