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

package info (click to toggle)
libdnf 0.75.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,468 kB
  • sloc: cpp: 48,297; xml: 1,638; python: 1,537; ansic: 1,223; sql: 227; sh: 54; makefile: 39
file content (29 lines) | stat: -rw-r--r-- 927 bytes parent folder | download
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
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(-)

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -139,7 +139,7 @@
 add_definitions(-DG_LOG_DOMAIN="libdnf")
 
 # tests
-add_definitions(-DTESTDATADIR="${CMAKE_SOURCE_DIR}/data/tests")
+add_definitions(-DTESTDATADIR="/tmp/data/tests")
 
 # Use libdnf5 drop-in configuration directories including distribution configuration.
 if(ENABLE_DNF5_CONF_DROP_IN)
@@ -203,3 +203,4 @@
 
 
 add_subdirectory(etc)
+file(COPY data DESTINATION /tmp)