public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mark Wielaard <mjw@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Add debugedit-prefix.patch.
Date: Mon, 23 Nov 2026 09:31:03 GMT [thread overview]
Message-ID: <179542626394.1.13814847016307573932.rpms-rpm-6e205bd77eb5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 6e205bd77eb59dcb051374b8f978d88900f6c61b
Author : Mark Wielaard <mjw@fedoraproject.org>
Date : 2017-06-28T22:24:24+02:00
Stats : +39/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/6e205bd77eb59dcb051374b8f978d88900f6c61b?branch=pmatilai-v6
Log:
Add debugedit-prefix.patch.
---
diff --git a/debugedit-prefix.patch b/debugedit-prefix.patch
new file mode 100644
index 0000000..b50e4c2
--- /dev/null
+++ b/debugedit-prefix.patch
@@ -0,0 +1,33 @@
+diff --git a/tools/debugedit.c b/tools/debugedit.c
+index abd2ca4..a271b91 100644
+--- a/tools/debugedit.c
++++ b/tools/debugedit.c
+@@ -662,7 +662,8 @@ canonicalize_path (const char *s, char *d)
+ /* Returns the rest of PATH if it starts with DIR_PREFIX, skipping any
+ / path separators, or NULL if PATH doesn't start with
+ DIR_PREFIX. Might return the empty string if PATH equals DIR_PREFIX
+- (modulo trailing slashes). Never returns path starting with '/'. */
++ (modulo trailing slashes). Never returns path starting with '/'.
++ Note that DIR_PREFIX itself should NOT end with a '/'. */
+ static const char *
+ skip_dir_prefix (const char *path, const char *dir_prefix)
+ {
+@@ -670,12 +671,17 @@ skip_dir_prefix (const char *path, const char *dir_prefix)
+ if (strncmp (path, dir_prefix, prefix_len) == 0)
+ {
+ path += prefix_len;
++ /* Unless path == dir_prefix there should be at least one '/'
++ in the path (which we will skip). Otherwise the path has
++ a different (longer) directory prefix. */
++ if (*path != '\0' && !IS_DIR_SEPARATOR (*path))
++ return NULL;
+ while (IS_DIR_SEPARATOR (path[0]))
+ path++;
+ return path;
+ }
+
+- return 0;
++ return NULL;
+ }
+
+ /* Most strings will be in the existing debug string table. But to
diff --git a/rpm.spec b/rpm.spec
index 8e1ca24..84114aa 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -102,6 +102,9 @@ Patch283: find-debuginfo-process-files-in-parallel.patch
Patch285: find-debuginfo-untangle-unique-build-options.patch
Patch286: debugsrc-and-sub-debuginfo-packages.patch
+# debugedit check prefix match ends with slash.
+Patch290: debugedit-prefix.patch
+
# OpenSSL backend
Patch300: 0001-Add-OpenSSL-support-for-digest-and-signatures.patch
@@ -611,6 +614,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Thu Jun 29 2017 Mark Wielaard <mjw@fedoraproject.org>
+- Add debugedit-prefix.patch.
+
* Wed Jun 28 2017 Mark Wielaard <mjw@fedoraproject.org> - 4.13.0.1-27
- Add find-debuginfo-split-traversal-and-extraction-fix.patch (#1465170)
reply other threads:[~2026-11-23 9:31 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=179542626394.1.13814847016307573932.rpms-rpm-6e205bd77eb5@fedoraproject.org \
--to=mjw@fedoraproject.org \
--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