public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - Log failures for fork failing (OLPC)
@ 2026-11-23  9:24 Paul Nasrat
  0 siblings, 0 replies; only message in thread
From: Paul Nasrat @ 2026-11-23  9:24 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : e266478320f0a9e11cf9b53e10b7b052e7908b2f
            Author : Paul Nasrat <pnasrat@fedoraproject.org>
            Date   : 2007-04-16T11:59:52+00:00
            Stats  : +71/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/e266478320f0a9e11cf9b53e10b7b052e7908b2f?branch=pmatilai-v6

            Log:
            - Log failures for fork failing (OLPC)
- Gendiff enhancement from Enrico Scholz (#146981)

---
diff --git a/rpm-4.4.2-cdiff.patch b/rpm-4.4.2-cdiff.patch
new file mode 100644
index 0000000..d469f95
--- /dev/null
+++ b/rpm-4.4.2-cdiff.patch
@@ -0,0 +1,22 @@
+--- rpm-4.4.2/gendiff.cdiff	2002-07-13 20:54:36.000000000 +0100
++++ rpm-4.4.2/gendiff	2007-04-16 12:48:09.000000000 +0100
+@@ -6,14 +6,16 @@
+   exit 1
+ }
+ 
++: ${DIFF:=diff -p}
++
+ find $1 \( -name "*$2" -o -name ".*$2" \) -print |
+ while read f; do
+     U=-u
+     [ "`basename $f`" = "ChangeLog$2" ] && U=-U0
+-#    diff ${U} $f `echo $f | sed s/$2\$//`
++#    ${DIFF} ${U} $f `echo $f | sed s/$2\$//`
+     if [ -r "$f" ]; then
+-	diff ${U} "${f}" "${f%$2}"
++	${DIFF} ${U} "${f}" "${f%$2}"
+     else
+-	diff ${U} /dev/null "${f%$2}"
++	${DIFF} ${U} /dev/null "${f%$2}"
+     fi
+ done

diff --git a/rpm-4.4.2-forkfailed.patch b/rpm-4.4.2-forkfailed.patch
new file mode 100644
index 0000000..9d030e3
--- /dev/null
+++ b/rpm-4.4.2-forkfailed.patch
@@ -0,0 +1,40 @@
+Print error message if scriptlet fork fails instead if silently
+dying. [#152779]
+
+Index: lib/psm.c
+===================================================================
+--- lib/psm.c.orig
++++ lib/psm.c
+@@ -910,6 +910,12 @@ static rpmRC runScript(rpmpsm psm, Heade
+     }
+     /*@=branchstate@*/
+ 
++    if (psm->sq.child == (pid_t)-1) {
++	rpmError(RPMERR_FORK, _("Couldn't fork %s: %s\n"), sln, strerror(errno));
++	rc = RPMRC_FAIL;
++	goto exit;
++    }
++
+     (void) psmWait(psm);
+ 
+   /* XXX filter order dependent multilib "other" arch helper error. */
+@@ -934,6 +940,7 @@ static rpmRC runScript(rpmpsm psm, Heade
+     }
+   }
+ 
++exit:
+     if (freePrefixes) prefixes = hfd(prefixes, ipt);
+ 
+     xx = Fclose(out);	/* XXX dup'd STDOUT_FILENO */
+Index: rpmio/rpmsq.c
+===================================================================
+--- rpmio/rpmsq.c.orig
++++ rpmio/rpmsq.c
+@@ -407,6 +407,7 @@ fprintf(stderr, "    Enable(%p): %p\n", 
+ 
+     pid = fork();
+     if (pid < (pid_t) 0) {		/* fork failed.  */
++	sq->child = (pid_t)-1;
+ /*@-bounds@*/
+ 	xx = close(sq->pipes[0]);
+ 	xx = close(sq->pipes[1]);

diff --git a/rpm.spec b/rpm.spec
index 29cb7c0..24610e8 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -17,7 +17,7 @@ Summary: The RPM package management system
 Name: rpm
 Version: 4.4.2
 %{expand: %%define rpm_version %{version}}
-Release: 42%{?dist}
+Release: 43%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source: rpm-%{rpm_version}.tar.gz
@@ -63,6 +63,8 @@ Patch36: rpm-4.4.2-unicodekey.patch
 Patch37: rpm-4.4.2-noneon.patch
 Patch38: rpm-4.4.2-debugedit-canonicalize-path.patch
 Patch39: rpm-4.4.2-no-ppc-asm.patch
+Patch40: rpm-4.4.2-forkfailed.patch
+Patch41: rpm-4.4.2-cdiff.patch
 License: GPL
 Requires: patch > 2.5
 Prereq: shadow-utils
@@ -204,6 +206,8 @@ shell-like rules.
 %patch37 -p1 -b .noneon
 %patch38 -p0 -b .debugcan
 %patch39 -p1 -b .noppcasm
+%patch40 -p0 -b .forkfail
+%patch41 -p1 -b .cdiff
 
 # rebuild configure for ipv6
 autoconf
@@ -562,6 +566,10 @@ exit 0
 %{__includedir}/popt.h
 
 %changelog
+* Mon Apr 16 2007 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-43
+- Log failures for fork failing (OLPC)
+- Gendiff enhancement from Enrico Scholz (#146981)
+
 * Wed Apr 04 2007 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-42
 - Remove ppc64 inline asm (#233145)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:24 [rpms/rpm] pmatilai-v6: - Log failures for fork failing (OLPC) Paul Nasrat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox