public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - add support for noarch subpackages
@ 2026-11-23  9:25 Jindrich Novy
  0 siblings, 0 replies; only message in thread
From: Jindrich Novy @ 2026-11-23  9:25 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 42d9f1aba7061a28b54e3103ae37df01bf88dcf6
            Author : Jindrich Novy <jnovy@fedoraproject.org>
            Date   : 2008-08-29T05:25:44+00:00
            Stats  : +64/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/42d9f1aba7061a28b54e3103ae37df01bf88dcf6?branch=pmatilai-v6

            Log:
            - add support for noarch subpackages
- fix segfault in case of insufficient disk space detected (#460146)

---
diff --git a/rpm-4.5.90-noarch-subpackages.patch b/rpm-4.5.90-noarch-subpackages.patch
new file mode 100644
index 0000000..4c84ca2
--- /dev/null
+++ b/rpm-4.5.90-noarch-subpackages.patch
@@ -0,0 +1,43 @@
+diff --git a/build/parsePreamble.c b/build/parsePreamble.c
+index d168978..988b615 100644
+--- a/build/parsePreamble.c
++++ b/build/parsePreamble.c
+@@ -632,19 +632,32 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
+     case RPMTAG_EXCLUSIVEOS:
+ 	addOrAppendListEntry(spec->buildRestrictions, tag, field);
+ 	break;
+-    case RPMTAG_BUILDARCHS:
+-	if ((rc = poptParseArgvString(field,
+-				      &(spec->BACount),
+-				      &(spec->BANames)))) {
++    case RPMTAG_BUILDARCHS: {
++	int BACount;
++	const char **BANames = NULL;
++	if ((rc = poptParseArgvString(field, &BACount, &BANames))) {
+ 	    rpmlog(RPMLOG_ERR,
+ 		     _("line %d: Bad BuildArchitecture format: %s\n"),
+ 		     spec->lineNum, spec->line);
+ 	    return RPMRC_FAIL;
+ 	}
+-	if (!spec->BACount)
++	if (spec->packages == pkg) {
++	    spec->BACount = BACount;
++	    spec->BANames = BANames;
++	} else {
++	    if (BACount != 1 || strcmp(BANames[0], "noarch")) {
++		rpmlog(RPMLOG_ERR,
++			 _("line %d: Only noarch subpackages are supported: %s\n"),
++			spec->lineNum, spec->line);
++		BANames = _free(BANames);
++		return RPMRC_FAIL;
++	    }
++	    headerAddEntry(pkg->header, RPMTAG_ARCH, RPM_STRING_TYPE, "noarch", 1);
++	}
++	if (!BACount)
+ 	    spec->BANames = _free(spec->BANames);
+ 	break;
+-
++    }
+     default:
+ 	rpmlog(RPMLOG_ERR, _("Internal error: Bogus tag %d\n"), tag);
+ 	return RPMRC_FAIL;

diff --git a/rpm-4.5.90-segfault.patch b/rpm-4.5.90-segfault.patch
new file mode 100644
index 0000000..1d1cf4a
--- /dev/null
+++ b/rpm-4.5.90-segfault.patch
@@ -0,0 +1,12 @@
+diff -up rpm-4.5.90.git8461/lib/rpmps.c.460146 rpm-4.5.90.git8461/lib/rpmps.c
+--- rpm-4.5.90.git8461/lib/rpmps.c.460146	2008-06-30 14:50:49.000000000 +0200
++++ rpm-4.5.90.git8461/lib/rpmps.c	2008-08-26 19:35:30.000000000 +0200
+@@ -319,7 +319,7 @@ char * rpmProblemString(const rpmProblem
+ 	break;
+     case RPMPROB_DISKSPACE:
+ 	rc = rasprintf(&buf,
+-	    _("installing package %s needs %ld%cB on the %s filesystem"),
++	    _("installing package %s needs %llu%cB on the %s filesystem"),
+ 		pkgNEVR,
+ 		prob->num1 > (1024*1024)
+ 		    ? (prob->num1 + 1024 * 1024 - 1) / (1024 * 1024)

diff --git a/rpm.spec b/rpm.spec
index 21abaf9..ce1eb1f 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -18,7 +18,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 0.%{snapver}.2
+Release: 0.%{snapver}.3
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -33,6 +33,8 @@ Patch100: rpm-4.6.x-no-pkgconfig-reqs.patch
 
 # Already in upstream, remove on next snapshot update
 Patch200: rpm-4.5.90-archivesize.patch
+Patch201: rpm-4.5.90-noarch-subpackages.patch
+Patch202: rpm-4.5.90-segfault.patch
 
 # These are not yet upstream
 Patch300: rpm-4.5.90-posttrans.patch
@@ -164,6 +166,8 @@ that will manipulate RPM packages and databases.
 %patch100 -p1 -b .pkgconfig-deps
 
 %patch200 -p1 -b .archivesize
+%patch201 -p1 -b .noarch-subpackages
+%patch202 -p1 -b .segfault
 
 # needs a bit of upstream love first...
 #%patch300 -p1 -b .posttrans
@@ -342,6 +346,10 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Tue Aug 26 2008 Jindrich Novy <jnovy@redhat.com>
+- add support for noarch subpackages
+- fix segfault in case of insufficient disk space detected (#460146)
+
 * Wed Aug 13 2008 Panu Matilainen <pmatilai@redhat.com>
 - 4.5.90-0.git8461.2
 - fix archivesize tag generation on ppc (#458817)

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

only message in thread, other threads:[~2026-11-23  9:25 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:25 [rpms/rpm] pmatilai-v6: - add support for noarch subpackages Jindrich Novy

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