public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Joel Capitao <joel.capitao@protonmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/clevis] f44: Add new sources (release 25)
Date: Tue, 01 Dec 2026 16:56:13 GMT	[thread overview]
Message-ID: <179614417362.1.7332657872380008032.rpms-clevis-5002dd3d4275@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/clevis
            Branch : f44
            Commit : 5002dd3d4275a9b55a4a637fb24adec4f3221499
            Author : Joel Capitao <joel.capitao@protonmail.com>
            Date   : 2026-12-01T17:41:34+01:00
            Stats  : +50/-226 in 8 file(s)
            URL    : https://src.fedoraproject.org/rpms/clevis/c/5002dd3d4275a9b55a4a637fb24adec4f3221499?branch=f44

            Log:
            Add new sources (release 25)

Resolves: rhbz#2576038

Also remove old patches.

---
diff --git a/.gitignore b/.gitignore
index dda6661..143df80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
 /clevis-22.tar.xz
 /clevis-23.tar.xz
 /clevis-24.tar.xz
+/clevis-25.tar.xz

diff --git a/0001-Fix-truncation-errors-happening-when-O2-enabled.patch b/0001-Fix-truncation-errors-happening-when-O2-enabled.patch
deleted file mode 100644
index 63c34ef..0000000
--- a/0001-Fix-truncation-errors-happening-when-O2-enabled.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From c4b68e6f20a851f1d0b2a489a16ac38b2a7dda8e Mon Sep 17 00:00:00 2001
-From: Sergio Arroutbi <sarroutb@redhat.com>
-Date: Fri, 16 Oct 2026 10:19:29 +0200
-Subject: [PATCH] Fix truncation errors (happening when -O2 enabled)
-
-meson setup build defaults to --buildtype=debug which uses -O0.
-At this level, GCC doesn't perform deep enough data-flow analysis
-to detect that g_sock_file (1024 bytes) can exceed sock_addr.sun_path
-(108 bytes), so -Wstringop-truncation never fires.
-In other compilation scenarios, such as RPM build (centpkg),
-%meson uses --buildtype=plain with CFLAGS containing -O2.
-At this level, GCC tracks buffer sizes and sees the potential truncation
-Combined with -Werror from meson.build, it becomes a
-fatal error.
-
-Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
----
- .github/workflows/build.yml                          |  4 +++-
- src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c | 12 ++++++++----
- 2 files changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
-index 7ac4858..87e5a27 100644
---- a/.github/workflows/build.yml
-+++ b/.github/workflows/build.yml
-@@ -29,6 +29,8 @@ jobs:
-             stable: false
-           - os: ubuntu:devel
-             stable: false
-+          - os: quay.io/centos/centos:stream10
-+            extra_cflags: "-O2"
-     steps:
-       - uses: actions/checkout@v4
- 
-@@ -43,7 +45,7 @@ jobs:
-           mkdir -p build && cd build
-           export ninja=$(command -v ninja)
-           [ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
--          export CFLAGS="-g -coverage"
-+          export CFLAGS="-g -coverage ${{ matrix.extra_cflags }}"
-           meson .. || cat meson-logs/meson-log.txt >&2
-           ${ninja}
- 
-diff --git a/src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c b/src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c
-index c69af0e..833a798 100644
---- a/src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c
-+++ b/src/pins/pkcs11/clevis-pkcs11-afunix-socket-unlock.c
-@@ -44,6 +44,10 @@ const char* VERSION = "v0.0.1";
- #define MAX_ENTRIES 1024
- #define MAX_KEY 1024
- 
-+#ifndef UNIX_PATH_MAX
-+#define UNIX_PATH_MAX (sizeof(((struct sockaddr_un *)0)->sun_path))
-+#endif
-+
- const uint16_t DEFAULT_MAX_ITERATIONS = 3;
- const uint16_t MAX_PATH = 1024;
- const uint16_t MAX_CONTROL_MSG = 1024;
-@@ -62,8 +66,8 @@ volatile sig_atomic_t thread_loop = 1;
- volatile sig_atomic_t control_thread_info = 0;
- pthread_mutex_t mutex;
- FILE* logfile = NULL;
--static char g_sock_file[1024];
--static char g_sock_control_file[1024];
-+static char g_sock_file[UNIX_PATH_MAX];
-+static char g_sock_control_file[UNIX_PATH_MAX];
- 
- static int
- get_control_socket_name(const char* file_sock, char* control_sock, uint32_t control_sock_len) {
-@@ -110,7 +114,7 @@ static void* control_thread(void *targ) {
-     socklen_t len;
-     memset(&control_addr, 0, sizeof(control_addr));
-     control_addr.sun_family = AF_UNIX;
--    strncpy(control_addr.sun_path, control_sock, sizeof(control_addr.sun_path)-1);
-+    snprintf(control_addr.sun_path, sizeof(control_addr.sun_path), "%s", control_sock);
-     unlink(control_sock);
-     s = socket(AF_UNIX, SOCK_STREAM, 0);
-     if (s == -1) {
-@@ -301,7 +305,7 @@ int main(int argc, char* argv[]) {
- 
-     memset(&sock_addr, 0, sizeof(sock_addr));
-     sock_addr.sun_family = AF_UNIX;
--    strncpy(sock_addr.sun_path, g_sock_file, sizeof(sock_addr.sun_path)-1);
-+    snprintf(sock_addr.sun_path, sizeof(sock_addr.sun_path), "%s", g_sock_file);
-     s = socket(AF_UNIX, SOCK_STREAM, 0);
-     if (s == -1) {
-         perror("socket");
--- 
-2.56.0
-

diff --git a/0001-add-force-password-to-cryptsetup-luksChangeKey.patch b/0001-add-force-password-to-cryptsetup-luksChangeKey.patch
deleted file mode 100644
index a2b1b9e..0000000
--- a/0001-add-force-password-to-cryptsetup-luksChangeKey.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Sergio Arroutbi <sarroutbi@redhat.com>
-Date: Mon, 13 Oct 2026 16:51:50 +0200
-Subject: [PATCH] Add --force-password to cryptsetup luksChangeKey
-
----
- src/luks/clevis-luks-common-functions.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/luks/clevis-luks-common-functions.in b/src/luks/clevis-luks-common-functions.in
-index 1111111..2222222 100644
---- a/src/luks/clevis-luks-common-functions.in
-+++ b/src/luks/clevis-luks-common-functions.in
-@@ -1009,7 +1009,7 @@
-     if [ -n "${in_place}" ]; then
-         printf '%s' "${input}" | cryptsetup luksChangeKey "${DEV}" \
-                                             --key-slot "${SLT}" \
--                                            --batch-mode \
-+                                            --force-password --batch-mode \
-                                             ${pbkdf_args} \
-                                             ${extra_args}
-         return
---
-2.49.0
-

diff --git a/0001-include-setgroups-and-set-library-as-shared-mod.patch b/0001-include-setgroups-and-set-library-as-shared-mod.patch
new file mode 100644
index 0000000..29a73b0
--- /dev/null
+++ b/0001-include-setgroups-and-set-library-as-shared-mod.patch
@@ -0,0 +1,46 @@
+diff --git a/src/pins/tpm1/clevis-tpm1-tcsd-preload.c b/src/pins/tpm1/clevis-tpm1-tcsd-preload.c
+index cc32bde..e26c6f0 100644
+--- a/src/pins/tpm1/clevis-tpm1-tcsd-preload.c
++++ b/src/pins/tpm1/clevis-tpm1-tcsd-preload.c
+@@ -21,6 +21,7 @@
+ #define _GNU_SOURCE
+ 
+ #include <dlfcn.h>
++#include <grp.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -64,6 +65,20 @@ setgid(gid_t gid)
+     }
+ }
+ 
++int
++setgroups(size_t size, const gid_t *list)
++{
++    static int (*real_setgroups)(size_t, const gid_t *) = NULL;
++    if (no_privilege_drop()) {
++        return 0;
++    } else {
++        if (!real_setgroups) {
++            real_setgroups = dlsym(RTLD_NEXT, "setgroups");
++        }
++        return real_setgroups(size, list);
++    }
++}
++
+ static void __attribute ((constructor))
+ set_line_buffering(void)
+ {
+diff --git a/src/pins/tpm1/meson.build b/src/pins/tpm1/meson.build
+index d9b6c5e..0b980c6 100644
+--- a/src/pins/tpm1/meson.build
++++ b/src/pins/tpm1/meson.build
+@@ -11,7 +11,7 @@ if all
+   mans += join_paths(meson.current_source_dir(), 'clevis-encrypt-tpm1.1')
+ 
+   libdl_dep = dependency('dl', required: false)
+-  libclevis_tpm1_tcsd_preload = shared_library('clevis-tpm1-tcsd-preload', 'clevis-tpm1-tcsd-preload.c',
++  libclevis_tpm1_tcsd_preload = shared_module('clevis-tpm1-tcsd-preload', 'clevis-tpm1-tcsd-preload.c',
+     dependencies: libdl_dep,
+     install_dir: libdir,
+     install: true)

diff --git a/0002-pkcs11-test-non-root-rejection-in-afunix-socket-unlo.patch b/0002-pkcs11-test-non-root-rejection-in-afunix-socket-unlo.patch
deleted file mode 100644
index 0c9df0f..0000000
--- a/0002-pkcs11-test-non-root-rejection-in-afunix-socket-unlo.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From c3170a3594076c99a92f8c73cd485017a9d67641 Mon Sep 17 00:00:00 2001
-From: Sergio Arroutbi <sarroutb@redhat.com>
-Date: Fri, 16 Oct 2026 09:54:49 +0200
-Subject: [PATCH 1/2] pkcs11: test non-root rejection in afunix-socket-unlock
- (#591)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The daemon enforces root-only access on its control and data
-sockets via SO_PEERCRED UID checks (security requirement for
-key material handling). Non-root connections are rejected but
-the daemon keeps running — this is the correct behavior.
-
-Previously the test assumed root and failed with EPIPE when run
-as a non-root user. Instead of skipping, verify the daemon
-rejects the connection, logs the caller's UID, and stays alive.
-Root users continue to run the full protocol test suite.
-
-Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
----
- src/pins/pkcs11/tests/afunix-socket-unlock | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/src/pins/pkcs11/tests/afunix-socket-unlock b/src/pins/pkcs11/tests/afunix-socket-unlock
-index 54694a2..871d86f 100755
---- a/src/pins/pkcs11/tests/afunix-socket-unlock
-+++ b/src/pins/pkcs11/tests/afunix-socket-unlock
-@@ -34,7 +34,7 @@ SOCK="${TMP}/test.sock"
- CONTROL_SOCK="${TMP}/test.control.sock"
- LOG="${TMP}/daemon.log"
- 
--# Start daemon: 1 iteration, no start delay
-+# Start daemon: 3 iterations, no start delay
- clevis-pkcs11-afunix-socket-unlock \
-     -f "${SOCK}" -c "${CONTROL_SOCK}" -l "${LOG}" -t 3 -s 0 &
- DAEMON_PID=$!
-@@ -43,6 +43,19 @@ sleep 1
- # Verify daemon is running
- kill -0 "${DAEMON_PID}"
- 
-+if [ "$(id -u)" != 0 ]; then
-+    # --- Non-root: verify the daemon rejects connections and stays alive ---
-+    echo -n "test-device,test-passphrase" | \
-+        socat UNIX-CONNECT:"${CONTROL_SOCK}" - 2>/dev/null || true
-+    sleep 1
-+    kill -0 "${DAEMON_PID}"
-+    grep "Rejected control connection from UID $(id -u)" "${LOG}"
-+    echo "Non-root rejection test passed"
-+    exit 0
-+fi
-+
-+# --- Root tests below ---
-+
- # --- Test 1: normal device,passphrase ---
- echo -n "test-device,test-passphrase" | \
-     socat UNIX-CONNECT:"${CONTROL_SOCK}" -
--- 
-2.56.0
-

diff --git a/0003-include-setgroups-and-set-library-as-shared-mod.patch b/0003-include-setgroups-and-set-library-as-shared-mod.patch
deleted file mode 100644
index 29a73b0..0000000
--- a/0003-include-setgroups-and-set-library-as-shared-mod.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/src/pins/tpm1/clevis-tpm1-tcsd-preload.c b/src/pins/tpm1/clevis-tpm1-tcsd-preload.c
-index cc32bde..e26c6f0 100644
---- a/src/pins/tpm1/clevis-tpm1-tcsd-preload.c
-+++ b/src/pins/tpm1/clevis-tpm1-tcsd-preload.c
-@@ -21,6 +21,7 @@
- #define _GNU_SOURCE
- 
- #include <dlfcn.h>
-+#include <grp.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-@@ -64,6 +65,20 @@ setgid(gid_t gid)
-     }
- }
- 
-+int
-+setgroups(size_t size, const gid_t *list)
-+{
-+    static int (*real_setgroups)(size_t, const gid_t *) = NULL;
-+    if (no_privilege_drop()) {
-+        return 0;
-+    } else {
-+        if (!real_setgroups) {
-+            real_setgroups = dlsym(RTLD_NEXT, "setgroups");
-+        }
-+        return real_setgroups(size, list);
-+    }
-+}
-+
- static void __attribute ((constructor))
- set_line_buffering(void)
- {
-diff --git a/src/pins/tpm1/meson.build b/src/pins/tpm1/meson.build
-index d9b6c5e..0b980c6 100644
---- a/src/pins/tpm1/meson.build
-+++ b/src/pins/tpm1/meson.build
-@@ -11,7 +11,7 @@ if all
-   mans += join_paths(meson.current_source_dir(), 'clevis-encrypt-tpm1.1')
- 
-   libdl_dep = dependency('dl', required: false)
--  libclevis_tpm1_tcsd_preload = shared_library('clevis-tpm1-tcsd-preload', 'clevis-tpm1-tcsd-preload.c',
-+  libclevis_tpm1_tcsd_preload = shared_module('clevis-tpm1-tcsd-preload', 'clevis-tpm1-tcsd-preload.c',
-     dependencies: libdl_dep,
-     install_dir: libdir,
-     install: true)

diff --git a/clevis.spec b/clevis.spec
index a7444a5..b1f18ae 100644
--- a/clevis.spec
+++ b/clevis.spec
@@ -1,7 +1,7 @@
 %global dracut_prio 50
 
 Name:           clevis
-Version:        24
+Version:        25
 Release:        %autorelease
 Summary:        Automated decryption framework
 
@@ -10,9 +10,7 @@ URL:            https://github.com/latchset/%{name}
 Source0:        https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
 Source1:        clevis.sysusers
 
-Patch0001:      0001-Fix-truncation-errors-happening-when-O2-enabled.patch
-Patch0002:      0002-pkcs11-test-non-root-rejection-in-afunix-socket-unlo.patch
-Patch0003:      0003-include-setgroups-and-set-library-as-shared-mod.patch
+Patch0001:      0001-include-setgroups-and-set-library-as-shared-mod.patch
 
 BuildRequires:  git-core
 BuildRequires:  gcc

diff --git a/sources b/sources
index e367b8e..5917b19 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (clevis-24.tar.xz) = 9fe9291a71681af1c9c3d95cc8df35ee00e515922f70ce87ddaf648196e333830717cde30ac3ecbcccc49028dd1f1e6f0e20edeab98e7f763042e44685b1cf79
+SHA512 (clevis-25.tar.xz) = b7e20f87091ea70610d4e91ef5fd1fc4722a06fcd88ca574e85c320a333deb52fea60adb1f49165654c03c182f98e3fa88ec7a80c7abec14f84d1c71f2a81c7e

                 reply	other threads:[~2026-12-01 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179614417362.1.7332657872380008032.rpms-clevis-5002dd3d4275@fedoraproject.org \
    --to=joel.capitao@protonmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox