import UBI dbus-broker-36-4.el10

This commit is contained in:
eabdullin 2025-11-11 21:58:46 +00:00
parent aec65d3b43
commit d984c18863
2 changed files with 48 additions and 14 deletions

View File

@ -0,0 +1,27 @@
From 4b1d9da51dc2703b7596243cb555a689bb27b4c1 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@gmail.com>
Date: Wed, 16 Apr 2025 21:17:56 +0100
Subject: [PATCH] util/sockopt: also check for ESRCH when the process has
exited
The kernel in 6.16 is changing the return value from EINVAL to ESRCH so
that the particular case can be distinguished from generic errors:
https://lore.kernel.org/all/20250411-work-pidfs-enoent-v2-2-60b2d3bb545f@kernel.org/
---
src/util/sockopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/sockopt.c b/src/util/sockopt.c
index a374e59d..4270314d 100644
--- a/src/util/sockopt.c
+++ b/src/util/sockopt.c
@@ -238,7 +238,7 @@ int sockopt_get_peerpidfd(int fd, int *pidfdp) {
return SOCKOPT_E_UNSUPPORTED;
if (errno == ENODATA)
return SOCKOPT_E_UNAVAILABLE;
- if (errno == EINVAL)
+ if (errno == EINVAL || errno == ESRCH)
return SOCKOPT_E_REAPED;
return error_origin(-errno);

View File

@ -2,7 +2,7 @@
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 1;
release_number = 4;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
@ -17,6 +17,8 @@ Summary: Linux D-Bus Message Broker
License: Apache-2.0 AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND (Apache-2.0 OR LGPL-2.1-or-later)
URL: https://github.com/bus1/dbus-broker
Source0: https://github.com/bus1/dbus-broker/releases/download/v%{version}/dbus-broker-%{version}.tar.xz
Patch: https://github.com/bus1/dbus-broker/commit/4b1d9da51dc2703b7596243cb555a689bb27b4c1.patch
BuildRequires: pkgconfig(audit)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(dbus-1)
@ -29,7 +31,6 @@ BuildRequires: glibc-devel
BuildRequires: meson
BuildRequires: python3-docutils
Requires: dbus-common
Requires(pre): shadow-utils
%description
dbus-broker is an implementation of a message bus as defined by the D-Bus
@ -41,6 +42,11 @@ recent Linux kernel releases.
%prep
%autosetup -p1
# Create a sysusers.d config file
cat >dbus-broker.sysusers.conf <<EOF
u dbus %{dbus_user_id} 'System Message Bus' - -
EOF
%build
%meson -Dselinux=true -Daudit=true -Ddocs=true -Dsystem-console-users=gdm -Dlinux-4-17=true
%meson_build
@ -48,21 +54,11 @@ recent Linux kernel releases.
%install
%meson_install
install -m0644 -D dbus-broker.sysusers.conf %{buildroot}%{_sysusersdir}/dbus-broker.conf
%check
%meson_test
%pre
# create dbus user and group
getent group dbus >/dev/null || groupadd -f -g %{dbus_user_id} -r dbus
if ! getent passwd dbus >/dev/null ; then
if ! getent passwd %{dbus_user_id} >/dev/null ; then
useradd -r -u %{dbus_user_id} -g %{dbus_user_id} -d '/' -s /sbin/nologin -c "System message bus" dbus
else
useradd -r -g %{dbus_user_id} -d '/' -s /sbin/nologin -c "System message bus" dbus
fi
fi
exit 0
%post
%systemd_post dbus-broker.service
%systemd_user_post dbus-broker.service
@ -97,9 +93,20 @@ fi
%{_mandir}/man1/dbus-broker-launch.1*
%{_unitdir}/dbus-broker.service
%{_userunitdir}/dbus-broker.service
%{_sysusersdir}/dbus-broker.conf
%changelog
## START: Generated by rpmautospec
* Thu Aug 14 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 36-4
- Change dbus user GECOS to avoid warning
* Thu Aug 14 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 36-3
- Add sysusers.d config file to allow rpm to create users/groups
automatically
* Wed Jul 30 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 36-2
- Add patch to fix sockopt in kernel 6.16
* Tue Jan 21 2025 Packit <hello@packit.dev> - 36-1
- Update to 36 upstream release