From 4bef346e762b956946fbb922843a67ff57e5236a Mon Sep 17 00:00:00 2001 From: Matteo Croce Date: Dec 05 2024 22:16:19 +0000 Subject: Use absolute path in reflink plugin --- diff --git a/0003-apath.patch b/0003-apath.patch new file mode 100644 index 0000000..7628a34 --- /dev/null +++ b/0003-apath.patch @@ -0,0 +1,41 @@ +From 4a17a8f52732cf508a35d2686591b0b7df9c000b Mon Sep 17 00:00:00 2001 +From: Matteo Croce +Date: Thu, 5 Dec 2024 23:12:19 +0100 +Subject: [PATCH] absoute path + +Adapt rpmpluginsCallFsmFileInstall to use absolute path + +--- + lib/rpmplugins.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/rpmplugins.c b/lib/rpmplugins.c +index 4b86320..1418aed 100644 +--- a/lib/rpmplugins.c ++++ b/lib/rpmplugins.c +@@ -444,12 +444,13 @@ rpmRC rpmpluginsCallFsmFileInstall(rpmPlugins plugins, rpmfi fi, + int i; + rpmRC rc = RPMRC_OK; + rpmRC hook_rc; ++ char *apath = abspath(fi, path); + + for (i = 0; i < plugins->count; i++) { + rpmPlugin plugin = plugins->plugins[i]; + RPMPLUGINS_SET_HOOK_FUNC(fsm_file_install); + if (hookFunc) { +- hook_rc = hookFunc(plugin, fi, path, file_mode, op); ++ hook_rc = hookFunc(plugin, fi, apath, file_mode, op); + if (hook_rc == RPMRC_FAIL) { + rpmlog(RPMLOG_ERR, "Plugin %s: hook fsm_file_install failed\n", plugin->name); + rc = RPMRC_FAIL; +@@ -467,6 +468,7 @@ rpmRC rpmpluginsCallFsmFileInstall(rpmPlugins plugins, rpmfi fi, + } + } + } ++ free(apath); + + return rc; + } +-- +2.47.1 + diff --git a/rpm.spec b/rpm.spec index 276b368..c195806 100644 --- a/rpm.spec +++ b/rpm.spec @@ -32,7 +32,7 @@ %global rpmver 4.16.1.3 #global snapver rc1 -%global rel 34.3 +%global rel 34.4 %global sover 9 %global srcver %{rpmver}%{?snapver:-%{snapver}} @@ -150,6 +150,7 @@ Patch2000: rpm-4.16.1.3-backport-multithreaded-zstd.patch # Copy-on-Write Patch9901: 0001-RPM-with-Copy-on-Write.patch Patch9902: 0002-plugin-absolute-path.patch +Patch9903: 0003-apath.patch Provides: rpm(pr1470) Provides: rpm(pr1470_1) @@ -728,6 +729,9 @@ fi %doc doc/librpm/html/* %changelog +* Thu Dec 5 2024 Matteo Croce - 4.16.1.3-34.4 +- Fix absolute path reflink plugin + * Fri Nov 22 2024 Matteo Croce - 4.16.1.3-34.3 - Squash all CoW patches - Fix a path issue with plugins