public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - ensure relocatable packages always get install-prefix(es) set (#979443)
Date: Mon, 23 Nov 2026 09:28:22 GMT [thread overview]
Message-ID: <179542610205.1.2522580040182403780.rpms-rpm-2bbb203d3d8e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 2bbb203d3d8ea919b660ae55989c75d8f9fa3a8b
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2013-07-05T10:41:32+03:00
Stats : +61/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/2bbb203d3d8ea919b660ae55989c75d8f9fa3a8b?branch=pmatilai-v6
Log:
- ensure relocatable packages always get install-prefix(es) set (#979443)
---
diff --git a/rpm-4.11.1-instprefix.patch b/rpm-4.11.1-instprefix.patch
new file mode 100644
index 0000000..54c6ae7
--- /dev/null
+++ b/rpm-4.11.1-instprefix.patch
@@ -0,0 +1,55 @@
+commit 1ac9e84d9a4a04df7c8f659a8df676fc4f8544f0
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Fri Jul 5 10:27:18 2013 +0300
+
+ Ensure relocatable packages always get install-prefix(es) set (RhBug:979443)
+
+ - Scriptlets from relocatable packages should always run with
+ $RPM_INSTALL_PREFIX* defined, whether actually being relocated or not.
+ - Fixes regression introduced by the optimization in commit
+ 5d3018c4ed476b1b7ac18e2573af517f872cb303. We always need to call
+ addPrefixes() but return early from rpmRelocateFileList() when
+ no relocations are taking place, fixing the performance regression
+ introduced all the way back in cb8241dda783f7e8c143b08fecf57fe89a39c3a6
+ which is what 5d3018c4ed476b1b7ac18e2573af517f872cb303 was trying
+ to fix. Pooh :)
+
+ (cherry picked from commit 88d24b14a8e0e33e768cb74a3487acf0925b012a)
+
+diff --git a/lib/rpmfi.c b/lib/rpmfi.c
+index 0bfb5dd..185deae 100644
+--- a/lib/rpmfi.c
++++ b/lib/rpmfi.c
+@@ -793,7 +793,8 @@ static int addPrefixes(Header h, rpmRelocation *relocations, int numRelocations)
+ headerPutStringArray(h, RPMTAG_INSTPREFIXES, actualRelocations, numActual);
+ }
+ free(actualRelocations);
+- return numActual;
++ /* When any relocations are present there'll be more work to do */
++ return 1;
+ }
+
+ static void saveRelocs(Header h, rpmtd bnames, rpmtd dnames, rpmtd dindexes)
+@@ -835,7 +836,8 @@ void rpmRelocateFileList(rpmRelocation *relocations, int numRelocations,
+ int i, j;
+ struct rpmtd_s bnames, dnames, dindexes, fmodes;
+
+- addPrefixes(h, relocations, numRelocations);
++ if (!addPrefixes(h, relocations, numRelocations))
++ return;
+
+ if (!_printed) {
+ _printed = 1;
+diff --git a/lib/rpmte.c b/lib/rpmte.c
+index 6afd69e..87fb391 100644
+--- a/lib/rpmte.c
++++ b/lib/rpmte.c
+@@ -98,7 +98,7 @@ static rpmfi getFI(rpmte p, Header h)
+ (RPMFI_NOHEADER | RPMFI_FLAGS_ERASE);
+
+ /* relocate stuff in header if necessary */
+- if (rpmteType(p) == TR_ADDED && rpmfsFC(p->fs) > 0 && p->nrelocs) {
++ if (rpmteType(p) == TR_ADDED && rpmfsFC(p->fs) > 0) {
+ if (!headerIsSource(h) && !headerIsEntry(h, RPMTAG_ORIGBASENAMES)) {
+ rpmRelocateFileList(p->relocs, p->nrelocs, p->fs, h);
+ }
diff --git a/rpm.spec b/rpm.spec
index 1ca33ba..e53a70f 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}2%{?dist}
+Release: %{?snapver:0.%{snapver}.}3%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -48,6 +48,7 @@ Patch6: rpm-4.9.0-armhfp-logic.patch
# Patches already in upstream
# Filter soname dependencies by name
Patch100: rpm-4.11.x-filter-soname-deps.patch
+Patch101: rpm-4.11.1-instprefix.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -231,6 +232,7 @@ packages on a system.
%patch4 -p1 -b .use-gpg2
%patch100 -p1 -b .filter-soname-deps
+%patch101 -p1 -b .instprefix
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -466,6 +468,9 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
+* Fri Jul 05 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.1-3
+- ensure relocatable packages always get install-prefix(es) set (#979443)
+
* Thu Jul 04 2013 Panu Matilainen <pmatilai@redhat.com> - 4.11.1-2
- fix .gnu_debuglink CRC32 after dwz, buildrequire binutils-devel (#971119)
reply other threads:[~2026-11-23 9:28 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=179542610205.1.2522580040182403780.rpms-rpm-2bbb203d3d8e@fedoraproject.org \
--to=pmatilai@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