From e3328aa890cc6bbd697eae0835fc0798f1f23587627b09d9d0c0d9f947fcdadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 13 Feb 2025 12:05:44 +0000 Subject: [PATCH] update OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=692 --- rpm2archive.diff | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rpm2archive.diff b/rpm2archive.diff index 37896e6..4e1e82f 100644 --- a/rpm2archive.diff +++ b/rpm2archive.diff @@ -1,5 +1,5 @@ ---- tools/CMakeLists.txt.orig 2025-02-12 12:28:53.926181102 +0000 -+++ tools/CMakeLists.txt 2025-02-12 12:31:14.961909654 +0000 +--- tools/CMakeLists.txt.orig 2025-02-13 09:56:00.257085875 +0000 ++++ tools/CMakeLists.txt 2025-02-13 09:56:11.433064235 +0000 @@ -40,11 +40,8 @@ if (READLINE_FOUND) target_link_libraries(rpmlua PRIVATE PkgConfig::READLINE) endif() @@ -31,8 +31,8 @@ if (WITH_CXX) set (cxx_sources ---- tools/rpm2archive.c.orig 2025-02-10 09:57:58.036626709 +0000 -+++ tools/rpm2archive.c 2025-02-12 12:27:28.986344583 +0000 +--- tools/rpm2archive.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ tools/rpm2archive.c 2025-02-13 11:50:46.533098005 +0000 @@ -2,6 +2,14 @@ #include "system.h" @@ -69,7 +69,7 @@ static void fill_archive_entry(struct archive_entry * entry, rpmfi fi, char **hardlink) { -@@ -282,6 +295,542 @@ static int process_package(rpmts ts, con +@@ -282,6 +295,540 @@ static int process_package(rpmts ts, con return rc; } @@ -256,8 +256,6 @@ + bn = filename + l; + while (bn > filename && bn[-1] != '/') + bn--; -+ if (bn == filename + 1) -+ bn--; + /* truncate basename (we use 99 like libarchive so we can add a '/' if the prefix is empty) */ + l -= bn - filename; + if (l > 99 - (ilen + isdir)) @@ -282,7 +280,7 @@ + p++; /* skip the '/' */ + } + /* copy rest of the dir */ -+ p2 = p + (100 - (l + ilen + isdir)) > bn ? bn : p + (100 - (l + ilen + isdir)); ++ p2 = p + (99 - (l + ilen + isdir)) > bn ? bn : p + (99 - (l + ilen + isdir)); + while (p2 > p && *p2 != '/') + p2--; + if (p2 < bn && *p2 == '/')