public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Lubos Kardos <lkardos@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - Ignore SIGPIPE signals during execucton of scriptlets
Date: Mon, 23 Nov 2026 09:29:41 GMT	[thread overview]
Message-ID: <179542618102.1.7335121807005434160.rpms-rpm-3631545efd5a@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 3631545efd5a7b97d73d236953c8cd2c91f60db0
            Author : Lubos Kardos <lkardos@redhat.com>
            Date   : 2015-10-30T14:55:06+01:00
            Stats  : +54/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/3631545efd5a7b97d73d236953c8cd2c91f60db0?branch=pmatilai-v6

            Log:
            - Ignore SIGPIPE signals during execucton of scriptlets
- Resolves: #1264198

---
diff --git a/rpm-4.13.0-ignore-sigpipe.patch b/rpm-4.13.0-ignore-sigpipe.patch
new file mode 100644
index 0000000..fbf9423
--- /dev/null
+++ b/rpm-4.13.0-ignore-sigpipe.patch
@@ -0,0 +1,49 @@
+From 90d8cc16486479441477e89c2e09bd4f9f7604bb Mon Sep 17 00:00:00 2001
+From: Lubos Kardos <lkardos@redhat.com>
+Date: Fri, 30 Oct 2015 14:42:32 +0100
+Subject: [PATCH] Ignore SIGPIPE signals during execucton of scriptlets
+ (rhbz:1264198)
+
+---
+ lib/rpmscript.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 493f4f2..98d3f42 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -271,6 +271,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
+     const char *line;
+     char *mline = NULL;
+     rpmRC rc = RPMRC_FAIL;
++    struct sigaction newact, oldact;
+ 
+     rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname);
+ 
+@@ -318,6 +319,12 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
+ 	goto exit;
+     }
+ 
++    /* Ignore SIGPIPE during execution of scriptlets */
++    sigemptyset(&newact.sa_mask);
++    newact.sa_flags = 0;
++    newact.sa_handler = SIG_IGN;
++    sigaction(SIGPIPE, &newact, &oldact);
++
+     pid = fork();
+     if (pid == (pid_t) -1) {
+ 	rpmlog(RPMLOG_ERR, _("Couldn't fork %s: %s\n"),
+@@ -428,6 +435,10 @@ exit:
+ 	free(fn);
+     }
+     free(mline);
++
++    /* Restore SIGPIPE handler */
++    sigaction(SIGPIPE, &oldact, NULL);
++
+     return rc;
+ }
+ 
+-- 
+1.9.3
+

diff --git a/rpm.spec b/rpm.spec
index 7349dc1..cf1bb66 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -29,7 +29,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}8%{?dist}
+Release: %{?snapver:0.%{snapver}.}9%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2
@@ -59,6 +59,7 @@ Patch103: rpm-4.13.0-wrong-version-macro.patch
 Patch104: rpm-4.13.0-memory-error.patch
 Patch105: rpm-4.13.0-rpmdeps-weakdep-support.patch
 Patch106: rpm-4.13.0-autopatch-fix.patch
+Patch107: rpm-4.13.0-ignore-sigpipe.patch
 
 # These are not yet upstream
 Patch302: rpm-4.7.1-geode-i686.patch
@@ -563,6 +564,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Fri Oct 30 2015 Lubos Kardos <lkardos@rpm.org> - 4.13.0-0.rc1.9
+- Ignore SIGPIPE signals during execucton of scriptlets (#1264198)
+
 * Fri Oct 30 2015 Florian Festi <ffesti@rpm.org> - 4.4.13.0-0.rc1.8
 - Move /usr/lib/rpm/fileattrs directory from rpm-build to rpm (#1272766)
 

                 reply	other threads:[~2026-11-23  9:29 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=179542618102.1.7335121807005434160.rpms-rpm-3631545efd5a@fedoraproject.org \
    --to=lkardos@redhat.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