Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package blog for openSUSE:Factory checked in 
at 2026-03-18 16:49:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/blog (Old)
 and      /work/SRC/openSUSE:Factory/.blog.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "blog"

Wed Mar 18 16:49:14 2026 rev:22 rq:1339556 version:2.36

Changes:
--------
--- /work/SRC/openSUSE:Factory/blog/blog.changes        2025-04-29 
16:39:48.280739083 +0200
+++ /work/SRC/openSUSE:Factory/.blog.new.8177/blog.changes      2026-03-18 
16:49:32.122591307 +0100
@@ -1,0 +2,14 @@
+Tue Mar 17 09:18:40 UTC 2026 - Dr. Werner Fink <[email protected]>
+
+- Update to version 2.36
+  * If SYS_pidfd_open is not defined use a fallback
+    Include <asm/unistd.h> to get __NR_pidfd_open for
+    the definition of SYS_pidfd_open.
+  * Changes to let systemd find plymouth replacements
+    which means to add the appropiate Alias in systemd-ask-password-blog.path
+    and also in systemd-ask-password-blog.service with new Install
+    sections.  Also change description in systemd-ask-password-blog.path
+    to hint for blogd as replacement.
+  * Rework password asking method to be asynchronous
+
+-------------------------------------------------------------------

Old:
----
  showconsole-2.35.tar.gz

New:
----
  showconsole-2.36.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ blog.spec ++++++
--- /var/tmp/diff_new_pack.JqO6OO/_old  2026-03-18 16:49:32.918624652 +0100
+++ /var/tmp/diff_new_pack.JqO6OO/_new  2026-03-18 16:49:32.918624652 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package blog
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           blog
-Version:        2.35
+Version:        2.36
 %define sonum   2
 Release:        0
 Summary:        Boot logging

++++++ showconsole-2.35.tar.gz -> showconsole-2.36.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.35/.gitignore 
new/showconsole-2.36/.gitignore
--- old/showconsole-2.35/.gitignore     1970-01-01 01:00:00.000000000 +0100
+++ new/showconsole-2.36/.gitignore     2026-03-17 09:32:34.000000000 +0100
@@ -0,0 +1,18 @@
+.gdb_history
+core
+log
+isserial
+blog-store-messages.service
+blog-umount.service
+blogctl
+blogd
+blogd.8
+blogger
+blogger.8
+*.o
+*.so
+*.a
+libconsole/*.o
+libconsole/*.c.bak
+libconsole/x.c
+showconsole
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.35/libconsole/console.c 
new/showconsole-2.36/libconsole/console.c
--- old/showconsole-2.35/libconsole/console.c   2025-04-28 15:35:31.000000000 
+0200
+++ new/showconsole-2.36/libconsole/console.c   2026-03-17 09:32:34.000000000 
+0100
@@ -10,6 +10,10 @@
  * (at your option) any later version.
  */
 
+#ifndef  _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
@@ -30,6 +34,7 @@
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/syscall.h>
 #include <sys/sysmacros.h>
 #include <sys/vfs.h>
 #include <sys/wait.h>
@@ -37,10 +42,27 @@
 #include "listing.h"
 #include "libconsole.h"
 
-#undef BLOGD_EXT
-#ifndef  _GNU_SOURCE
-# define _GNU_SOURCE
+/* Fallback for older glibc */
+
+#ifndef SYS_pidfd_open
+# include <asm/unistd.h>
+# ifdef __NR_pidfd_open
+#  define SYS_pidfd_open __NR_pidfd_open
+# else
+#  define SYS_pidfd_open 434
+# endif
 #endif
+
+static inline int pidfd_open(pid_t pid, unsigned int flags)
+{
+    return syscall(SYS_pidfd_open, pid, flags);
+}
+
+#ifndef P_PIDFD
+# define P_PIDFD 3
+#endif
+
+#undef BLOGD_EXT
 #ifndef  BOOT_LOGFILE
 # define BOOT_LOGFILE          "/var/log/boot.log"
 #endif
@@ -70,6 +92,11 @@
 volatile sig_atomic_t asking;
 
 /*
+ * Ths is the socket fd for the answer.
+ */
+static int pwd_client_fd = -1;
+
+/*
  * One of the device for console are blocked if true.
  */
 static fd_set blocked;
@@ -101,7 +128,7 @@
  * Handle extended polls
  */
 int epfd  = -1;
-int evmax;
+int evmax = 0;
 
 /*
  * Remember if we're signaled.
@@ -223,7 +250,7 @@
                continue;
            }
            warn("can not write to fd %d", fd);
-            break;
+           break;
        }
        ptr += p;
        s -= p;
@@ -401,8 +428,6 @@
     int nfds, n, ret = 0;
     int saveerr = errno;
 
-    memset(&evlist[0], 0, evmax * sizeof(struct epoll_event));
-
     errno = 0;
     nfds = epoll_pwait(epfd, &evlist[0], evmax, timeout, &omask);
     if (nfds < 0) {
@@ -417,20 +442,22 @@
     for (n = 0; n < nfds; n++) {
        void (*efunc)(int);
        int fd;
+
+       ret = 1;
+
        efunc = epoll_handle(evlist[n].data.ptr, &fd);
        if (!efunc)
            continue;
+
        ret = 1;
-       if (evlist[n].events & (EPOLLIN|EPOLLOUT)) {
+
+       if (evlist[n].events & (EPOLLIN | EPOLLOUT | EPOLLRDHUP | EPOLLHUP | 
EPOLLERR)) {
+           if (evlist[n].events & (EPOLLRDHUP | EPOLLHUP | EPOLLERR)) {
+               warn("epoll returned RDHUP, HUP or ERR on fd %d", fd);
+           }
            efunc(fd);
            continue;
        }
-       if (evlist[n].events & (EPOLLRDHUP|EPOLLHUP)) {
-           warn("epoll returns RDHUP or HUP");
-           continue;
-       }
-       if (evlist[n].events & EPOLLERR)
-           warn("epoll returns error");
     }
 
     safein_noexit = 0;
@@ -881,7 +908,7 @@
                tavail = (ttail += cnt) - thead;
            }
 
-           goto flush;                                 /* Temporary silent as 
waiting on
+           goto flush;                                 /* Temporary silent as 
waiting on
                                                           passphrase or 
console device */
        } else while (tavail > 0) {                     /* Empty temporary 
buffer if any */
            size_t len = (size_t)tavail;
@@ -925,7 +952,7 @@
                    tavail = (ttail += cnt) - thead;
                }
                break;
-            }
+           }
            (void)tcdrain(c->fd);                       /* Write copy of input 
to real tty */
        }
 flush:
@@ -999,6 +1026,67 @@
        epoll_addread(fdconn, &socket_handler);
 }
 
+static void __attribute__((noinline)) epoll_pwd_done(int fd)
+{
+    siginfo_t info = {};
+    struct console *c;
+
+    /* Sweep zombie. WNOHANG avoid blocking, for false positive event */
+    if (waitid(P_PIDFD, fd, &info, WEXITED | WNOHANG) < 0) {
+       if (errno == ECHILD) {
+           /* Already reaped or invalid, clean up FD anyway */
+           epoll_delete(fd);
+           close(fd);
+       }
+       return;
+    }
+
+    /* Waitid didn't error, but also didn't reap anyone (e.g. stopped, not 
exited) */
+    if (info.si_pid == 0) {
+       return;
+    }
+
+    /* We successfully reaped a process. Clear descriptor for this gone 
process */
+    epoll_delete(fd);
+    close(fd);
+
+    /* Is this the first process which delivers a password? */
+    if (asking) {
+
+       if (info.si_code == CLD_EXITED && info.si_status == 0) {
+           asking = 0;         /* Success! */
+           
+           /* 1. Deliver the password and close the socket as well */
+           if (pwd_client_fd >= 0) {
+               (void)do_answer_password(pwd_client_fd);
+               epoll_delete(pwd_client_fd);
+               close(pwd_client_fd);
+               pwd_client_fd = -1;
+           }
+    
+           /* 2. Enable Kernel-Logging to the console Konsole */
+           klogctl(SYSLOG_ACTION_CONSOLE_ON, NULL, 0);
+    
+           /* 3. Close other waiting password processes */
+           list_for_each_entry(c, &cons->node, node) {
+               if (c->pid > 0 && c->pid != info.si_pid) {
+                   kill(c->pid, SIGTERM);
+               }
+               if (c->pid == info.si_pid) {
+                   c->pid = -1; /* we are done now */
+               }
+           }
+       }
+    } else {
+       /* Clear Zombies */
+       list_for_each_entry(c, &cons->node, node) {
+           if (c->pid == info.si_pid) {
+               c->pid = -1;
+           }
+       }
+    }
+}
+
 static void ask_for_password(void) attribute((noinline));
 static void epoll_socket_answer(int fd)
 {
@@ -1008,10 +1096,9 @@
        return;
     }
 
+    /* Remember the Socket for later and start the background process */
+    pwd_client_fd = fd;
     ask_for_password();
-    (void)do_answer_password(fd);
-    epoll_delete(fd);
-    close(fd);
 }
 
 static void socket_handler(int fd)
@@ -1321,11 +1408,7 @@
 char* currenttty;
 static void ask_for_password(void)
 {
-    struct timespec timeout = {0, 50000000};
-    siginfo_t status = {};
-    sigset_t set = {};
     struct console *c;
-    int wait;
     size_t len;
 
     if (!pwprompt && !*pwprompt)
@@ -1343,19 +1426,11 @@
     }
     set_signal(SIGCHLD, NULL, chld_handler);
 
-    wait = 200;
-    while (wait > 0 && (len = klogctl(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0)) > 
0) {
-       usleep(1000);
-       wait--;
-    }
-    wait = 0;
-
     asking = 1;                                /* Show only our question about 
password/passphrase */
-    klogctl(SYSLOG_ACTION_CONSOLE_OFF, NULL, 0);
 
     /* pwprompt */
     list_for_each_entry(c, &cons->node, node) {
-
+       int pfd;
        if (c->fd < 0 || !c->tty)
            continue;
        (void)tcdrain(c->fd);
@@ -1369,7 +1444,7 @@
            struct console *d;
            char *message;
            int eightbit;
-           int len, fdc;
+           int len, fdc, wait;
 
            if (fdfifo >= 0)
                close(fdfifo);
@@ -1381,7 +1456,7 @@
                epoll_close_fd();
                close(epfd);
            }
-            FD_ZERO(&blocked);
+           FD_ZERO(&blocked);
            vc_reconnect = NULL;
 
            dup2(1, 2);
@@ -1406,7 +1481,6 @@
            set_signal(SIGINT,  NULL, SIG_DFL);
            set_signal(SIGTERM, NULL, SIG_DFL);
            set_signal(SIGSYS,  NULL, SIG_DFL);
-
            set_signal(SIGQUIT, NULL, SIG_IGN);
 
            fdc = request_tty(c->tty);
@@ -1417,6 +1491,12 @@
            dup2(fdc, 1);
            close(fdc);
 
+           wait = 200;
+           while (wait > 0 && (len = klogctl(SYSLOG_ACTION_SIZE_UNREAD, NULL, 
0)) > 0) {
+               usleep(1000);
+               wait--;
+           }
+           klogctl(SYSLOG_ACTION_CONSOLE_OFF, NULL, 0);
        again:
            clear_input(0);
 #if defined(__s390__) || defined(__s390x__)
@@ -1440,7 +1520,7 @@
 
            /* We read byte for byte */
            newtio = c->ctio;
-           newtio.c_lflag &= ~ECHO;
+           newtio.c_lflag &= ~(ECHO|ICANON);
            newtio.c_lflag |= ECHONL;
            newtio.c_cc[VTIME] = 0;
            newtio.c_cc[VMIN] = 1;
@@ -1463,83 +1543,43 @@
            password = frobnicate(password, *pwsize);
            _exit(0);
        }
-    }
-
-    do {                               /* Wait on any job if any */
-       int ret;
-
-       status.si_pid = 0;
-       ret = waitid(P_ALL, 0, &status, WEXITED);
-
-       if (ret == 0)
-           break;
-
-       if (ret < 0) {
-           if (errno == ECHILD)
-               break;
-           if (errno == EINTR)
-               continue;
-           error("can not wait on password asking process: %m");
-           break;
-       }
-
-    } while (1);
-
-    asking = 0;                                /* Now throw out any collected 
messages if any */
-    klogctl(SYSLOG_ACTION_CONSOLE_ON, NULL, 0);
-
-    list_for_each_entry(c, &cons->node, node) {
-       if (c->fd < 0)
-           continue;
-       if (c->pid < 0)
-           continue;
-       if (c->pid == status.si_pid)    /* Remove first reply ... */
-           c->pid = -1;
-       else {
-           kill(c->pid, SIGTERM);      /* and terminate the others */
-           wait++;
-       }
-    }
-
-    sigemptyset(&set);
-    sigaddset(&set, SIGCHLD);          /* On exit we'll see SIGCHLD */
-
-    do {
-       int signum, ret;
-
-       if (wait <= 0) {
-           asking = 0;                 /* Now throw out any collected messages 
if any */
-           break;
-       }
-
-       status.si_pid = 0;
-       ret = waitid(P_ALL, 0, &status, WEXITED|WNOHANG);
-
-       if (ret < 0) {
-           if (errno == ECHILD)
-               break;
-           if (errno == EINTR)
-               continue;
-       }
 
-       if (!ret && status.si_pid > 0) {
-           list_for_each_entry(c, &cons->node, node) {
-               if (c->pid < 0)
-                   continue;
-               if (c->pid == status.si_pid) {
-                   c->pid = -1;
-                   wait--;
+       pfd = pidfd_open(c->pid, 0);
+       if (pfd >= 0) {
+           epoll_addread(pfd, &epoll_pwd_done);
+       } else {
+           siginfo_t info = {};
+           warn("pidfd_open failed for pid %d, falling back to synchronous 
wait", (int)c->pid);
+           do {
+               if (waitid(P_PID, c->pid, &info, WEXITED) == 0) {
+                   if (info.si_code == CLD_EXITED && info.si_status == 0) {
+                       struct console *d;
+                       
+                       asking = 0;
+                       if (pwd_client_fd >= 0) {
+                           (void)do_answer_password(pwd_client_fd);
+                           epoll_delete(pwd_client_fd);
+                           close(pwd_client_fd);
+                           pwd_client_fd = -1;
+                       }
+                       klogctl(SYSLOG_ACTION_CONSOLE_ON, NULL, 0);
+                       c->pid = -1;
+                       
+                       /* Terminate all other password asking children for 
syncronious mode */
+                       list_for_each_entry(d, &cons->node, node) {
+                           if (d->pid > 0 && d->pid != c->pid) {
+                               kill(d->pid, SIGTERM);
+                               /* Just wait to avoid being flooded with 
zombies */
+                               waitid(P_PID, d->pid, NULL, WEXITED);
+                               d->pid = -1;
+                           }
+                       }
+                   } else {
+                       /* Done even with errors, just to finish the loop. */
+                       c->pid = -1;
+                   }
                }
-           }
-           continue;
+           } while (c->pid != -1 && errno == EINTR);
        }
-
-       signum = sigtimedwait(&set, NULL, &timeout);
-       if (signum != SIGCHLD) {
-           if (signum < 0 && errno == EAGAIN)
-               break;
-       }
-
-    } while (1);
+    }
 }
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.35/systemd-ask-password-blog.path 
new/showconsole-2.36/systemd-ask-password-blog.path
--- old/showconsole-2.35/systemd-ask-password-blog.path 2025-04-28 
15:35:31.000000000 +0200
+++ new/showconsole-2.36/systemd-ask-password-blog.path 2026-03-17 
09:32:34.000000000 +0100
@@ -1,5 +1,5 @@
 [Unit]
-Description=Forward Password Requests to Plymouth Directory Watch
+Description=Forward Password Requests to Blogd for Plymouth Directory Watch
 Documentation=http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents
 DefaultDependencies=no
 After=blog.service
@@ -9,9 +9,13 @@
 Conflicts=shutdown.target
 Before=shutdown.target
 ConditionKernelCommandLine=!blog.enable=0
+ConditionKernelCommandLine=!plymouth.enable=0
 ConditionPathExists=/run/blogd.pid
 ConditionVirtualization=!container
 
 [Path]
 DirectoryNotEmpty=/run/systemd/ask-password
 MakeDirectory=yes
+
+[Install]
+Alias=systemd-ask-password-plymouth.path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.35/systemd-ask-password-blog.service 
new/showconsole-2.36/systemd-ask-password-blog.service
--- old/showconsole-2.35/systemd-ask-password-blog.service      2025-04-28 
15:35:31.000000000 +0200
+++ new/showconsole-2.36/systemd-ask-password-blog.service      2026-03-17 
09:32:34.000000000 +0100
@@ -8,9 +8,13 @@
 Conflicts=shutdown.target initrd-switch-root.target
 Before=shutdown.target initrd-switch-root.target
 ConditionKernelCommandLine=!blog.enable=0
+ConditionKernelCommandLine=!plymouth.enable=0
 ConditionVirtualization=!container
 ConditionPathExists=/run/blogd.pid
 
 [Service]
 ExecStart=/usr/bin/systemd-tty-ask-password-agent --watch --plymouth
 SystemCallArchitectures=native
+
+[Install]
+Alias=systemd-ask-password-plymouth.service

Reply via email to