File: 0012-data-workaround-for-hardcoded-absolute-path-data-in-.patch

package info (click to toggle)
libdnf 0.69.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,440 kB
  • sloc: cpp: 47,543; xml: 1,638; python: 1,527; ansic: 1,187; sql: 218; sh: 54; makefile: 42
file content (34 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 9c8e0cb52813ed5c8bd713ecda40ccb5e648b81a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
 <frederic.pierret@qubes-os.org>
Date: Sat, 28 Nov 2020 23:00:31 +0100
Subject: [PATCH] data: workaround for hardcoded absolute path data in
 variables

We use clean env for each build to use /tmp as location. This is
a temporary solution until upstream/we found a better way for that.
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3fc5cda..70804347 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,7 +134,7 @@ add_definitions(-DG_LOG_DOMAIN=\\"libdnf\\")
 add_definitions(-D_FILE_OFFSET_BITS=64)
 
 # tests
-add_definitions(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\")
+add_definitions(-DTESTDATADIR=\\"/tmp/data/tests\\")
 
 # librhsm
 if(ENABLE_RHSM_SUPPORT)
@@ -182,3 +182,4 @@ endif()
 
 
 add_subdirectory(etc)
+file(COPY data DESTINATION /tmp)
-- 
2.26.2