Igor Gnatenko 53960f
From 56c2885d708bc3485cad2b14205224e082ff2d01 Mon Sep 17 00:00:00 2001
Igor Gnatenko 53960f
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Igor Gnatenko 53960f
Date: Fri, 28 Jul 2017 07:42:38 +0200
Igor Gnatenko 53960f
Subject: [PATCH] find-debuginfo.sh: make sure that debugsourcefiles.list is
Igor Gnatenko 53960f
 generated under the builddir
Igor Gnatenko 53960f
Igor Gnatenko 53960f
The %_debugsource_template expects the debugsourcefiles.list file
Igor Gnatenko 53960f
to be in the (current) build dir. Make sure that is always the case
Igor Gnatenko 53960f
even if find-debuginfo.sh was invoked in a different (sub) directory
Igor Gnatenko 53960f
by prepending $BUILDDIR to the output file as written in description
Igor Gnatenko 53960f
"All file names in switches are relative to builddir (. if not given).".
Igor Gnatenko 53960f
Igor Gnatenko 53960f
Closes: https://github.com/rpm-software-management/rpm/issues/279
Igor Gnatenko 53960f
Based-on-patch-by: Mark Wielaard <mark@klomp.org>
Igor Gnatenko 53960f
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Igor Gnatenko 53960f
(cherry picked from commit 436b6ce0ddf33f90f8efd967f0457efce23bd71f)
Igor Gnatenko 53960f
---
Igor Gnatenko 53960f
 scripts/find-debuginfo.sh | 1 +
Igor Gnatenko 53960f
 1 file changed, 1 insertion(+)
Igor Gnatenko 53960f
Igor Gnatenko 53960f
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
Igor Gnatenko 53960f
index b83e4c6db..af065cd23 100644
Igor Gnatenko 53960f
--- a/scripts/find-debuginfo.sh
Igor Gnatenko 53960f
+++ b/scripts/find-debuginfo.sh
Igor Gnatenko 53960f
@@ -566,6 +566,7 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then
Igor Gnatenko 53960f
 fi
Igor Gnatenko 53960f
 
Igor Gnatenko 53960f
 if [ -n "$srcout" ]; then
Igor Gnatenko 53960f
+  srcout="$BUILDDIR/$srcout"
Igor Gnatenko 53960f
   > "$srcout"
Igor Gnatenko 53960f
   if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
Igor Gnatenko 53960f
     (cd "${RPM_BUILD_ROOT}/usr"