diff options
| -rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch | 26 | ||||
| -rw-r--r-- | meta/recipes-devtools/libdnf/libdnf_0.48.0.bb | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch b/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch new file mode 100644 index 0000000000..e3784cc9e4 --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | libdnf: allow reproducible binary builds | ||
| 2 | |||
| 3 | Use a dummy directory for test data if not built WITH_TESTS. Allow for overriding | ||
| 4 | TESTDATADIR, since the default is guaranteed to be wrong for target builds. | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
| 9 | |||
| 10 | |||
| 11 | --- a/CMakeLists.txt | ||
| 12 | +++ b/CMakeLists.txt | ||
| 13 | @@ -133,7 +133,12 @@ add_definitions(-DG_LOG_DOMAIN=\\"libdnf | ||
| 14 | add_definitions(-D_FILE_OFFSET_BITS=64) | ||
| 15 | |||
| 16 | # tests | ||
| 17 | -add_definitions(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\") | ||
| 18 | +if(NOT WITH_TESTS) | ||
| 19 | + set(TEST_DATA_DIR "/notests") | ||
| 20 | +elseif(NOT DEFINED TEST_DATA_DIR) | ||
| 21 | + set(TEST_DATA_DIR "${CMAKE_SOURCE_DIR}/data/tests") | ||
| 22 | +endif() | ||
| 23 | +add_definitions(-DTESTDATADIR=\\"${TEST_DATA_DIR}\\") | ||
| 24 | |||
| 25 | # librhsm | ||
| 26 | if(ENABLE_RHSM_SUPPORT) | ||
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb b/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb index 947b2f2348..37991e6d80 100644 --- a/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb +++ b/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb | |||
| @@ -8,6 +8,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \ | |||
| 8 | file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ | 8 | file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ |
| 9 | file://0001-Add-WITH_TESTS-option.patch \ | 9 | file://0001-Add-WITH_TESTS-option.patch \ |
| 10 | file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \ | 10 | file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \ |
| 11 | file://enable_test_data_dir_set.patch \ | ||
| 11 | " | 12 | " |
| 12 | 13 | ||
| 13 | SRCREV = "46a28d0cf09277fffc11392e5e362a2eda0d53a8" | 14 | SRCREV = "46a28d0cf09277fffc11392e5e362a2eda0d53a8" |
