!286 Fix regression on ctrl-c during transaction killing scriptlets
From: @renxichen Reviewed-by: @xujing99 Signed-off-by: @xujing99
This commit is contained in:
commit
3af0bf4f86
@ -0,0 +1,36 @@
|
||||
From 25c4c61a9599590ce4d610621ff0bffde7ae5e82 Mon Sep 17 00:00:00 2001
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Thu, 3 Mar 2022 10:31:28 +0200
|
||||
Subject: [PATCH] Fix regression on ctrl-c during transaction killing
|
||||
scriptlets
|
||||
|
||||
Commit cb6aa82dbc10d554f8d234e934ae7c77e39a3ce2 unblocked all signals
|
||||
from scriptlets, but turns out this is too much: SIGINT, SIGTSTP and
|
||||
SIGQUIT sent from the terminal are passed to the process group, and
|
||||
with unblocked signals end up killing our scriptlets while rpm itself
|
||||
continues. -ENOSENSE.
|
||||
|
||||
Stopping (and continuing) is okay though so we don't block that.
|
||||
---
|
||||
lib/rpmscript.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/rpmscript.c b/lib/rpmscript.c
|
||||
index e123916a9..3d6f3a72c 100644
|
||||
--- a/lib/rpmscript.c
|
||||
+++ b/lib/rpmscript.c
|
||||
@@ -197,8 +197,10 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
|
||||
int xx;
|
||||
sigset_t set;
|
||||
|
||||
- /* Unmask all signals, the scripts may need them */
|
||||
+ /* Unmask most signals, the scripts may need them */
|
||||
sigfillset(&set);
|
||||
+ sigdelset(&set, SIGINT);
|
||||
+ sigdelset(&set, SIGQUIT);
|
||||
sigprocmask(SIG_UNBLOCK, &set, NULL);
|
||||
|
||||
/* SIGPIPE is ignored in rpm, reset to default for the scriptlet */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
6
rpm.spec
6
rpm.spec
@ -1,6 +1,6 @@
|
||||
Name: rpm
|
||||
Version: 4.17.0
|
||||
Release: 31
|
||||
Release: 32
|
||||
Summary: RPM Package Manager
|
||||
License: GPLv2+
|
||||
URL: http://www.rpm.org/
|
||||
@ -113,6 +113,7 @@ Patch6074: backport-Fix-possible-null-pointer-reference-in-ndb.patch
|
||||
Patch6075: backport-Fix-rpmDigestBundleFinal-and-Update-return-code-on-i.patch
|
||||
Patch6076: backport-Actually-return-an-error-in-parseScript-if-parsing-f.patch
|
||||
Patch6077: backport-Check-inside-root-when-querying-for-files.patch
|
||||
Patch6078: backport-Fix-regression-on-ctrl-c-during-transaction-killing-.patch
|
||||
|
||||
BuildRequires: gcc autoconf automake libtool make gawk popt-devel openssl-devel readline-devel
|
||||
BuildRequires: zlib-devel zstd-devel >= 1.3.8 xz-devel bzip2-devel libarchive-devel ima-evm-utils-devel
|
||||
@ -403,6 +404,9 @@ make check || (cat tests/rpmtests.log; exit 0)
|
||||
%{_mandir}/man1/gendiff.1*
|
||||
|
||||
%changelog
|
||||
* Thu Dec 14 2023 renhongxun<renhongxun@h-partners.com> - 4.17.0-32
|
||||
- Fix regression on ctrl-c during transaction killing scriptlets
|
||||
|
||||
* Tue Sep 26 2023 renhongxun<renhongxun@h-partners.com> - 4.17.0-31
|
||||
- Fix potential segmentation fault
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user