From babd6fa61b50a55dc3daebb0260a44127ff773e7 Mon Sep 17 00:00:00 2001 From: anolis-bot Date: Thu, 10 Nov 2022 16:48:13 +0800 Subject: [PATCH 1/2] update to dbus-1.12.8-23.el8 Signed-off-by: anolis-bot --- dbus-kill-process-with-session | 15 ++++++++-- dbus-systemd-sysusers.conf | 2 ++ dbus.spec | 50 +++++++++++++--------------------- dist | 1 + 4 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 dbus-systemd-sysusers.conf create mode 100644 dist diff --git a/dbus-kill-process-with-session b/dbus-kill-process-with-session index c60199f..f891568 100644 --- a/dbus-kill-process-with-session +++ b/dbus-kill-process-with-session @@ -6,11 +6,22 @@ exec >& /dev/null -trap 'kill -TERM $1 $(jobs -p)' EXIT +MONITOR_READY_FILE=$(mktemp dbus-session-monitor.XXXXXX --tmpdir) + +trap 'rm -f "${MONITOR_READY_FILE}"; kill -TERM $1; kill -HUP $(jobs -p)' EXIT export GVFS_DISABLE_FUSE=1 -coproc SESSION_MONITOR (gio monitor -f "/run/systemd/sessions/${XDG_SESSION_ID}") +coproc SESSION_MONITOR (gio monitor -f "/run/systemd/sessions/${XDG_SESSION_ID}" "${MONITOR_READY_FILE}") + +# Poll until the gio monitor command is actively monitoring +until + touch "${MONITOR_READY_FILE}" + read -t 0.5 -u ${SESSION_MONITOR[0]} +do + continue +done +# Block until the session is closed while grep -q ^State=active <(loginctl show-session $XDG_SESSION_ID) do read -u ${SESSION_MONITOR[0]} diff --git a/dbus-systemd-sysusers.conf b/dbus-systemd-sysusers.conf new file mode 100644 index 0000000..c98ae40 --- /dev/null +++ b/dbus-systemd-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u dbus 81 "System Message Bus" - - diff --git a/dbus.spec b/dbus.spec index 7ca550b..9735497 100644 --- a/dbus.spec +++ b/dbus.spec @@ -1,5 +1,3 @@ -%define anolis_release .0.2 - %global _hardened_build 1 %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -21,7 +19,7 @@ Name: dbus Epoch: 1 Version: 1.12.8 -Release: 18%{anolis_release}%{?dist}.1 +Release: 23%{?dist} Summary: D-BUS message bus Group: System Environment/Libraries @@ -35,6 +33,7 @@ Source1: 00-start-message-bus.sh Source2: ssh-x-forwarding.csh Source3: ssh-x-forwarding.sh Source4: dbus-kill-process-with-session +Source5: dbus-systemd-sysusers.conf Patch0: 0001-tools-Use-Python3-for-GetAllMatchRules.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1725570 Patch1: dbus-1.12.8-fix-CVE-2019-12749.patch @@ -105,11 +104,6 @@ Requires: dbus-common = %{epoch}:%{version}-%{release} Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: dbus-tools = %{epoch}:%{version}-%{release} -Provides: /usr/bin/dbus-cleanup-sockets -Provides: /usr/bin/dbus-daemon -Provides: /usr/bin/dbus-run-session -Provides: /usr/bin/dbus-test-tool - %description daemon D-BUS is a system for sending messages between applications. It is used both for the system-wide message bus service, and as a @@ -120,11 +114,6 @@ Summary: D-BUS Tools and Utilities Group: Development/Libraries Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release} -Provides: /usr/bin/dbus-monitor -Provides: /usr/bin/dbus-send -Provides: /usr/bin/dbus-update-activation-environment -Provides: /usr/bin/dbus-uuidgen - %description tools Tools and utilities to interact with a running D-Bus Message Bus, provided by the reference implementation. @@ -165,19 +154,10 @@ Requires: %{name}-daemon = %{epoch}:%{version}-%{release} # Used by SSH daemon helper script. Requires: /usr/bin/gio -Provides: /usr/bin/dbus-launch - %description x11 D-BUS contains some tools that require Xlib to be installed, those are in this separate package so server systems need not install X. -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name}-daemon = %{epoch}:%{version}-%{release} - -%description doc -Doc pages for %{name}. %prep %autosetup -p1 @@ -229,10 +209,13 @@ find %{buildroot} -name '*.la' -type f -delete rm -rf %{buildroot}%{_libdir}/cmake %endif +rm -f %{buildroot}%{_sysusersdir}/dbus.conf + install -Dp -m755 %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/00-start-message-bus.sh install -Dp -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/ssh-x-forwarding.csh install -p -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/ install -Dp -m755 %{SOURCE4} %{buildroot}%{_libexecdir}/dbus-1/dbus-kill-process-with-session +install -Dp -m644 %{SOURCE5} %{buildroot}%{_sysusersdir}/dbus.conf # Obsolete, but still widely used, for drop-in configuration snippets. install --directory %{buildroot}%{_sysconfdir}/dbus-1/session.d @@ -361,6 +344,7 @@ popd # just have it be in libs, because dbus Requires dbus-libs. %{!?_licensedir:%global license %%doc} %license COPYING +%doc AUTHORS ChangeLog HACKING NEWS README %exclude %{_pkgdocdir}/diagram.* %exclude %{_pkgdocdir}/introspect.* %exclude %{_pkgdocdir}/system-activation.txt @@ -430,20 +414,24 @@ popd %{_libdir}/pkgconfig/dbus-1.pc %{_includedir}/* -%files doc -%doc AUTHORS ChangeLog HACKING NEWS README - %changelog -* Fri Nov 04 2022 Zhao Hang - 1.12.8-18.0.2.1 -- Update requires +* Tue Sep 06 2022 Ray Strode - 1:1.12.8-23 +- Address race for very short running sessions in SSH + session monitoring script. + Related: #2089362 + +* Tue Aug 09 2022 Ray Strode - 1:1.12.8-22 +- Use hangup signal instead of termination signal to + kill sesssion monitoring script to appeach tcsh. + Related: #2089362 -* Thu Sep 22 2022 Zhao Hang - 1.12.8-18.0.1.1 -- Add doc sub package, requires and provides +* Mon Aug 08 2022 David King - 1:1.12.8-20 +- Override sysusers configuration (#2090397) -* Thu Jun 16 2022 Ray Strode - 1:1.12.8-18.1 +* Thu Jun 16 2022 Ray Strode - 1:1.12.8-19 - Ensure SSH session monitoring script is cleaned up when the session exits. - Resolves: #2097784 + Resolves: #2089362 * Mon Dec 06 2021 Ray Strode - 1.12.8-18 - Ensure session bus started for SSH sessions gets used by those diff --git a/dist b/dist new file mode 100644 index 0000000..9c0e36e --- /dev/null +++ b/dist @@ -0,0 +1 @@ +an8 -- Gitee From 6e9052baab84422588b5991bf7c5aa4bf19f7309 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Sat, 16 Jul 2022 14:31:10 +0800 Subject: [PATCH 2/2] spec: add doc sub package, requires and provides Signed-off-by: Zhao Hang --- dbus.spec | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/dbus.spec b/dbus.spec index 9735497..909b4c9 100644 --- a/dbus.spec +++ b/dbus.spec @@ -1,3 +1,5 @@ +%define anolis_release .0.1 + %global _hardened_build 1 %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -19,7 +21,7 @@ Name: dbus Epoch: 1 Version: 1.12.8 -Release: 23%{?dist} +Release: 23%{anolis_release}%{?dist} Summary: D-BUS message bus Group: System Environment/Libraries @@ -104,6 +106,11 @@ Requires: dbus-common = %{epoch}:%{version}-%{release} Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: dbus-tools = %{epoch}:%{version}-%{release} +Provides: /usr/bin/dbus-cleanup-sockets +Provides: /usr/bin/dbus-daemon +Provides: /usr/bin/dbus-run-session +Provides: /usr/bin/dbus-test-tool + %description daemon D-BUS is a system for sending messages between applications. It is used both for the system-wide message bus service, and as a @@ -114,6 +121,11 @@ Summary: D-BUS Tools and Utilities Group: Development/Libraries Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release} +Provides: /usr/bin/dbus-monitor +Provides: /usr/bin/dbus-send +Provides: /usr/bin/dbus-update-activation-environment +Provides: /usr/bin/dbus-uuidgen + %description tools Tools and utilities to interact with a running D-Bus Message Bus, provided by the reference implementation. @@ -154,10 +166,19 @@ Requires: %{name}-daemon = %{epoch}:%{version}-%{release} # Used by SSH daemon helper script. Requires: /usr/bin/gio +Provides: /usr/bin/dbus-launch + %description x11 D-BUS contains some tools that require Xlib to be installed, those are in this separate package so server systems need not install X. +%package doc +Summary: Documents for %{name} +BuildArch: noarch +Requires: %{name}-daemon = %{epoch}:%{version}-%{release} + +%description doc +Doc pages for %{name}. %prep %autosetup -p1 @@ -344,7 +365,6 @@ popd # just have it be in libs, because dbus Requires dbus-libs. %{!?_licensedir:%global license %%doc} %license COPYING -%doc AUTHORS ChangeLog HACKING NEWS README %exclude %{_pkgdocdir}/diagram.* %exclude %{_pkgdocdir}/introspect.* %exclude %{_pkgdocdir}/system-activation.txt @@ -414,7 +434,13 @@ popd %{_libdir}/pkgconfig/dbus-1.pc %{_includedir}/* +%files doc +%doc AUTHORS ChangeLog HACKING NEWS README + %changelog +* Tue Jan 03 2023 Zhao Hang - 1.12.8-23.0.1 +- Add doc sub package, requires and provides + * Tue Sep 06 2022 Ray Strode - 1:1.12.8-23 - Address race for very short running sessions in SSH session monitoring script. -- Gitee