Blob Blame History Raw
From 56c2885d708bc3485cad2b14205224e082ff2d01 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Fri, 28 Jul 2017 07:42:38 +0200
Subject: [PATCH] find-debuginfo.sh: make sure that debugsourcefiles.list is
 generated under the builddir

The %_debugsource_template expects the debugsourcefiles.list file
to be in the (current) build dir. Make sure that is always the case
even if find-debuginfo.sh was invoked in a different (sub) directory
by prepending $BUILDDIR to the output file as written in description
"All file names in switches are relative to builddir (. if not given).".

Closes: https://github.com/rpm-software-management/rpm/issues/279
Based-on-patch-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
(cherry picked from commit 436b6ce0ddf33f90f8efd967f0457efce23bd71f)
---
 scripts/find-debuginfo.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index b83e4c6db..af065cd23 100644
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -566,6 +566,7 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then
 fi
 
 if [ -n "$srcout" ]; then
+  srcout="$BUILDDIR/$srcout"
   > "$srcout"
   if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
     (cd "${RPM_BUILD_ROOT}/usr"