forked from fepitre/qubes-libdnf
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/pr/1'
* origin/pr/1: Fix locales in python tests Workaround for reproducibility due to hardcoded data path Set CMAKE_SKIP_RPATH to TRUE Update patch for tests and missing athlon arch version 0.55.0-1 Update to libdnf-0.55.0 Reformat patches with original author's description Make lintian happier Add reproducible=+fixfilepath flag version 0.54.2-1 Update to libdnf-0.54.2
- Loading branch information
Showing
21 changed files
with
223 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
libdnf (0.55.0-1) unstable; urgency=medium | ||
|
||
* Add reproducible=+fixfilepath flag | ||
* Make lintian happier | ||
* Reformat patches with original author's description | ||
* Update to libdnf-0.55.0 | ||
|
||
-- Frédéric Pierret (fepitre) <[email protected]> Sat, 28 Nov 2020 10:01:01 +0100 | ||
|
||
libdnf (0.54.2-1) unstable; urgency=medium | ||
|
||
* Update to libdnf-0.54.2 | ||
|
||
-- Frédéric Pierret (fepitre) <[email protected]> Sun, 01 Nov 2020 22:19:21 +0100 | ||
|
||
libdnf (0.48.0-2) unstable; urgency=medium | ||
|
||
[ Frédéric Pierret (fepitre) ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ Section: libs | |
Priority: optional | ||
Maintainer: Mihai Moldovan <[email protected]> | ||
Uploaders: Frédéric Pierret <[email protected]> | ||
Build-Depends: debhelper (>= 9~), | ||
Build-Depends: debhelper (>= 10~), | ||
dh-python, | ||
python3-dev, | ||
libpython3-dev, | ||
|
2 changes: 1 addition & 1 deletion
2
debian-pkg/debian/patches/0001-CMakeLists.txt-append-libsolv-cmake-path.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From d0c07d97dba24d25e41d60e6688f2245522f17f3 Mon Sep 17 00:00:00 2001 | ||
From 78c26ff3ee07e4b0284a3ab4c9bf17583d62a97f Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] CMakeLists.txt: append libsolv cmake path | ||
|
16 changes: 7 additions & 9 deletions
16
...ey-CMakeLists.txt_use-static-libche.patch → ...es/0002-Use-static-libcheck-version.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
From 02f66db51a3e9e058721dfcaea714de20bdb6a4f Mon Sep 17 00:00:00 2001 | ||
From b9d5eab53ab07340c14d0e80ea00b8024395594b Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
000200_tests-hawkey-CMakeLists.txt_use-static-libcheck-and-add-LDFLAGS | ||
Subject: [PATCH] Use static libcheck version. | ||
|
||
Within Debian, only the static libcheck library is shipped. Use it correctly, | ||
since the static library requires additional private libraries and definitions. | ||
--- | ||
tests/hawkey/CMakeLists.txt | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
tests/hawkey/CMakeLists.txt | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/tests/hawkey/CMakeLists.txt b/tests/hawkey/CMakeLists.txt | ||
index c2ca446a..b4acd57b 100644 | ||
index 29402d63..601bb4bc 100644 | ||
--- a/tests/hawkey/CMakeLists.txt | ||
+++ b/tests/hawkey/CMakeLists.txt | ||
@@ -28,7 +28,8 @@ add_executable(test_hawkey_main ${hawkeytest_SRCS}) | ||
set_target_properties(test_hawkey_main PROPERTIES COMPILE_FLAGS -fPIC) | ||
@@ -29,6 +29,8 @@ set_target_properties(test_hawkey_main PROPERTIES COMPILE_FLAGS -fPIC) | ||
target_link_libraries(test_hawkey_main | ||
libdnf | ||
- ${CHECK_LIBRARIES} | ||
${CHECK_LDFLAGS} | ||
+ ${CHECK_STATIC_LIBRARIES} | ||
+ ${CHECK_STATIC_LDFLAGS} | ||
${SOLV_LIBRARY} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
From 858f1ef41e7e6927b5e6308659f0f0cac965294c Mon Sep 17 00:00:00 2001 | ||
From c2f890e096b2215a364660ecaf8bdeed42d1d040 Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
000300_tests-hawkey-test_iutil.cpp_libdnf-dnf-sack.cpp_set-default-disttype-to-DISTTYPE_RPM | ||
Subject: [PATCH] Set the default disttype to RPM. | ||
|
||
On "foreign" systems, including Debian, libsolv tries to be smart and default | ||
to the native packaging system type. We need to explicitly override it to use | ||
|
@@ -13,10 +12,10 @@ RPM for dnf to work. | |
2 files changed, 8 insertions(+) | ||
|
||
diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp | ||
index 025988b4..cacf9fff 100644 | ||
index 9fd2c72d..38dcb9ec 100644 | ||
--- a/libdnf/dnf-sack.cpp | ||
+++ b/libdnf/dnf-sack.cpp | ||
@@ -185,6 +185,7 @@ dnf_sack_init(DnfSack *sack) | ||
@@ -186,6 +186,7 @@ dnf_sack_init(DnfSack *sack) | ||
DnfSackPrivate *priv = GET_PRIVATE(sack); | ||
priv->pool = pool_create(); | ||
pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
From 4f21fb8cfedca9bc23ffbe935718e1cc51b1cc79 Mon Sep 17 00:00:00 2001 | ||
From 237579203a15caee49379311dc45e0abfed97de5 Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
000320_tests-hawkey-test_iutil.cpp_libdnf-dnf-sack.cpp_enable-implicitobsoleteusescolors | ||
Subject: [PATCH] Enable implicitobsoleteusescolors flag. | ||
|
||
This flag is normally enabled by default in libsolv if compiled on Fedora or | ||
Mageia systems, but disabled for all others. Since we explicitly want to | ||
|
@@ -14,10 +13,10 @@ correct resolution. | |
2 files changed, 10 insertions(+) | ||
|
||
diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp | ||
index cacf9fff..0162e04b 100644 | ||
index 38dcb9ec..c994b2b2 100644 | ||
--- a/libdnf/dnf-sack.cpp | ||
+++ b/libdnf/dnf-sack.cpp | ||
@@ -186,6 +186,7 @@ dnf_sack_init(DnfSack *sack) | ||
@@ -187,6 +187,7 @@ dnf_sack_init(DnfSack *sack) | ||
priv->pool = pool_create(); | ||
pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1); | ||
pool_setdisttype(priv->pool, DISTTYPE_RPM); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
From af55ca7fb2193fce2dcdb36efb98c1993f2c7cdb Mon Sep 17 00:00:00 2001 | ||
From e899b8821cfe6b1fe03d3073c455e0fd352faca3 Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
000330_tests-hawkey-test_iutil.cpp_libdnf-dnf-sack.cpp_enable-rpmdb-in-homedir | ||
Subject: [PATCH] Tell libsolv to prefer rpmdb in home directory. | ||
|
||
The rpm package on Debian is patched to always use the RPMDB in a user's home | ||
directory. Libsolv is not patched in such a way. Since DNF is mixing librpm and | ||
|
@@ -14,10 +13,10 @@ Tell libsolv to prefer the rpmdb in the user's home directory. | |
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp | ||
index 0162e04b..b12ee6df 100644 | ||
index c994b2b2..d1338fbf 100644 | ||
--- a/libdnf/dnf-sack.cpp | ||
+++ b/libdnf/dnf-sack.cpp | ||
@@ -1685,7 +1685,7 @@ dnf_sack_load_system_repo(DnfSack *sack, HyRepo a_hrepo, int flags, GError **err | ||
@@ -1727,7 +1727,7 @@ dnf_sack_load_system_repo(DnfSack *sack, HyRepo a_hrepo, int flags, GError **err | ||
repo = repo_create(pool, HY_SYSTEM_REPO_NAME); | ||
|
||
g_debug("fetching rpmdb"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
From 50b3db61afb7c862258bb3a83a733b5e3295118d Mon Sep 17 00:00:00 2001 | ||
From aadc535e2ee5107f51273b11a2f44d8ac112d17d Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
000400_libdnf-dnf-sack.cpp_dnf-context.cpp_use-rpmdb-in-homedir | ||
Subject: [PATCH] Add rpmdb in home directory to checksum and DNF context setup | ||
function. | ||
|
||
The rpm package on Debian is patched to always use the RPMDB in a user's home | ||
directory. | ||
|
@@ -15,10 +15,10 @@ user's home directory. | |
2 files changed, 29 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp | ||
index 91df0bd9..32403fc2 100644 | ||
index d119e7de..0a343326 100644 | ||
--- a/libdnf/dnf-context.cpp | ||
+++ b/libdnf/dnf-context.cpp | ||
@@ -2196,12 +2196,33 @@ dnf_context_setup(DnfContext *context, | ||
@@ -2201,12 +2201,33 @@ dnf_context_setup(DnfContext *context, | ||
|
||
/* setup a file monitor on the rpmdb, if we're operating on the native / */ | ||
if (g_strcmp0(priv->install_root, "/") == 0) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
From 82ce0991ec9a5ed0c256b1555b5f0da5aa0a0427 Mon Sep 17 00:00:00 2001 | ||
From b7107f72ea041da04ecc5f49a5a01c3821fa4a06 Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
000500_libdnf-dnf-context.cpp_support-debian-distros-without-explicit-version | ||
Subject: [PATCH] Support Debian releases without explicit version. | ||
|
||
On Debian, some series have no version. Most notably testing, unstable and | ||
experimental. | ||
|
@@ -16,10 +15,10 @@ Fake the version in such a case. | |
1 file changed, 39 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp | ||
index 32403fc2..a87c11ce 100644 | ||
index 0a343326..94b16107 100644 | ||
--- a/libdnf/dnf-context.cpp | ||
+++ b/libdnf/dnf-context.cpp | ||
@@ -1631,9 +1631,45 @@ dnf_context_set_os_release(DnfContext *context, GError **error) try | ||
@@ -1636,9 +1636,45 @@ dnf_context_set_os_release(DnfContext *context, GError **error) try | ||
"os-release", | ||
"VERSION_ID", | ||
error); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
From c26801ec88f8d3736cf55b8b7853374dc7ae786b Mon Sep 17 00:00:00 2001 | ||
From e40bb378005a81230f645699829e21fc58ce1613 Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
000800_tests_hawkey_test_goal.cpp_workaround-failure-with-CK_FORK-no | ||
Subject: [PATCH] Workaround hawkey test failures with CK_FORK=no. | ||
|
||
For a description of what is happening here and a rational of why this might | ||
just be okay for us, see the source code comment. | ||
|
@@ -11,10 +10,10 @@ just be okay for us, see the source code comment. | |
1 file changed, 21 insertions(+) | ||
|
||
diff --git a/tests/hawkey/test_goal.cpp b/tests/hawkey/test_goal.cpp | ||
index c88901a9..f01c214f 100644 | ||
index cca12775..0c4db99c 100644 | ||
--- a/tests/hawkey/test_goal.cpp | ||
+++ b/tests/hawkey/test_goal.cpp | ||
@@ -864,6 +864,27 @@ START_TEST(test_goal_upgrade_disabled_repo) | ||
@@ -950,6 +950,27 @@ START_TEST(test_goal_upgrade_disabled_repo) | ||
auto pool = dnf_sack_get_pool(test_globals.sack); | ||
HyGoal goal = hy_goal_create(sack); | ||
|
||
|
6 changes: 3 additions & 3 deletions
6
...ls_smartcols_Cell.hpp_use-private-s.patch → ..._cell_get_alignment-with-older-libs.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
From 004c043c931d10122ad2c4fe073f6920cd3c2970 Mon Sep 17 00:00:00 2001 | ||
From 0957ec9fe8659964391e2c4dbe5da3349c1c0687 Mon Sep 17 00:00:00 2001 | ||
From: Mihai Moldovan <[email protected]> | ||
Date: Tue, 29 Sep 2020 18:30:16 +0200 | ||
Subject: [PATCH] | ||
100000_libdnf_utils_smartcols_Cell.hpp_use-private-scols_cell_get_alignment | ||
Subject: [PATCH] Use private scols_cell_get_alignment() with older | ||
libsmartcols | ||
|
||
Stretch's version of libsmartcols includes the (binary) symbol, but does not | ||
export it via its API, probably to make the intermediate release | ||
|
47 changes: 47 additions & 0 deletions
47
debian-pkg/debian/patches/0010-test_sack-fix-number-of-arches-if-athlon-if-not-avai.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From 858a6257d9b31fd4c21a6baa9176e31eb2722742 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= | ||
<[email protected]> | ||
Date: Sun, 1 Nov 2020 13:32:10 +0100 | ||
Subject: [PATCH] test_sack: fix number of arches if "athlon" if not available | ||
|
||
It's the case for Debian and openSUSE | ||
--- | ||
tests/hawkey/test_sack.cpp | 17 ++++++++++++++--- | ||
1 file changed, 14 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/tests/hawkey/test_sack.cpp b/tests/hawkey/test_sack.cpp | ||
index 5eab83b3..e528cd94 100644 | ||
--- a/tests/hawkey/test_sack.cpp | ||
+++ b/tests/hawkey/test_sack.cpp | ||
@@ -83,14 +83,25 @@ START_TEST(test_list_arches) | ||
const char ** arches = dnf_sack_list_arches(sack); | ||
|
||
/* noarch, x86_64, athlon, i686, i586, i486, i386 */ | ||
- fail_unless(g_strv_length((gchar**)arches) == 7); | ||
+ fail_unless(g_strv_length((gchar**)arches) >= 6 && g_strv_length((gchar**)arches) <= 7); | ||
|
||
- if (strcmp(arches[2], "athlon") == 0) { | ||
+ if (g_strv_length((gchar**)arches) == 7) { | ||
// Fedora, Mageia | ||
+ ck_assert_str_eq(arches[0], "noarch"); | ||
+ ck_assert_str_eq(arches[1], "x86_64"); | ||
+ ck_assert_str_eq(arches[2], "athlon"); | ||
ck_assert_str_eq(arches[3], "i686"); | ||
+ ck_assert_str_eq(arches[4], "i586"); | ||
+ ck_assert_str_eq(arches[5], "i486"); | ||
+ ck_assert_str_eq(arches[6], "i386"); | ||
} else { | ||
- // openSUSE - "athlon" is not available | ||
+ // openSUSE, Debian - "athlon" is not available | ||
+ ck_assert_str_eq(arches[0], "noarch"); | ||
+ ck_assert_str_eq(arches[1], "x86_64"); | ||
+ ck_assert_str_eq(arches[2], "i686"); | ||
ck_assert_str_eq(arches[3], "i586"); | ||
+ ck_assert_str_eq(arches[4], "i486"); | ||
+ ck_assert_str_eq(arches[5], "i386"); | ||
} | ||
|
||
g_free(arches); | ||
-- | ||
2.26.2 | ||
|
26 changes: 26 additions & 0 deletions
26
debian-pkg/debian/patches/0011-Set-CMAKE_SKIP_RPATH-to-TRUE.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 60a75d60f6b7706843a8ce3dbeb5b4e8d810b279 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= | ||
<[email protected]> | ||
Date: Tue, 24 Nov 2020 22:16:41 +0100 | ||
Subject: [PATCH] Set CMAKE_SKIP_RPATH to TRUE | ||
|
||
--- | ||
CMakeLists.txt | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 6c96caed..508d30bd 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -115,6 +115,8 @@ add_compile_options(-Wcast-align -Wno-uninitialized -Wredundant-decls -Wwrite-st | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -Wmissing-prototypes -Waggregate-return -Wshadow -Werror=implicit-function-declaration") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wmissing-declarations") | ||
|
||
+SET(CMAKE_SKIP_RPATH TRUE) | ||
+ | ||
# apple: turn rpath off | ||
set(CMAKE_MACOSX_RPATH 0) | ||
|
||
-- | ||
2.26.2 | ||
|
35 changes: 35 additions & 0 deletions
35
debian-pkg/debian/patches/0012-data-workaround-for-hardcoded-absolute-path-data-in-.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 1ebd6f31e19c59a85867e8b9dd08742decf385e1 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= | ||
<[email protected]> | ||
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 | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 508d30bd..35f911e1 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) | ||
@@ -186,3 +186,5 @@ add_subdirectory(tests) | ||
if(WITH_BINDINGS) | ||
add_subdirectory(python/hawkey) | ||
endif() | ||
+ | ||
+file(COPY data DESTINATION /tmp) | ||
-- | ||
2.26.2 | ||
|
46 changes: 46 additions & 0 deletions
46
debian-pkg/debian/patches/0013-python-tests-fix-locale-issues.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From bb2cf334db621ed48adf65ebe8463b3145125b7e Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= | ||
<[email protected]> | ||
Date: Wed, 2 Dec 2020 11:30:10 +0100 | ||
Subject: [PATCH] python tests: fix locale issues | ||
|
||
It has been observed that manipulating locales in Debian | ||
environement, tests are failing. | ||
|
||
====================================================================== | ||
ERROR: test_custom_querying (tests.test_reldep.Reldep) | ||
---------------------------------------------------------------------- | ||
Traceback (most recent call last): | ||
File "/tmp/reprotest.wOQ8sL/build-experiment-1/build-experiment-1/python/hawkey/tests/tests/test_reldep.py", line 78, in test_custom_querying | ||
reldep = hawkey.Reldep(self.sack, u"\u0159 >= 3") | ||
_hawkey.ValueException: Wrong reldep format: \u0159 >= 3 | ||
--- | ||
python/hawkey/tests/tests/__init__.py | 1 + | ||
python/hawkey/tests/tests/base.py | 5 +++++ | ||
2 files changed, 6 insertions(+) | ||
|
||
diff --git a/python/hawkey/tests/tests/__init__.py b/python/hawkey/tests/tests/__init__.py | ||
index e69de29b..8b137891 100644 | ||
--- a/python/hawkey/tests/tests/__init__.py | ||
+++ b/python/hawkey/tests/tests/__init__.py | ||
@@ -0,0 +1 @@ | ||
+ | ||
diff --git a/python/hawkey/tests/tests/base.py b/python/hawkey/tests/tests/base.py | ||
index 4d5937b2..e46a1d66 100644 | ||
--- a/python/hawkey/tests/tests/base.py | ||
+++ b/python/hawkey/tests/tests/base.py | ||
@@ -33,6 +33,11 @@ if cachedir is None: | ||
cachedir = tempfile.mkdtemp(dir=os.path.dirname(hawkey.test.UNITTEST_DIR), | ||
prefix='pyhawkey') | ||
|
||
+# run tests with C locales | ||
+os.environ["LC_ALL"] = "C" | ||
+os.environ["LANG"] = "C.UTF-8" | ||
+os.environ["LANGUAGE"] = "en_US:en" | ||
+ | ||
class TestCase(unittest.TestCase): | ||
repo_dir = os.path.normpath(os.path.join(__file__, "../../../../../data/tests/hawkey/")) | ||
|
||
-- | ||
2.26.2 | ||
|
Oops, something went wrong.