diff options
Diffstat (limited to 'poky/meta/recipes-devtools/libdnf')
-rw-r--r-- | poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch | 10 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch | 36 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch | 26 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb (renamed from poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb) | 4 |
4 files changed, 33 insertions, 43 deletions
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch index ac9400c48..384add5e1 100644 --- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch +++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch @@ -1,4 +1,4 @@ -From 56fa2bbdbd29377a6ef0d0b7aadbac8b5ea8c95b Mon Sep 17 00:00:00 2001 +From 7d60d62b5c5374156703ca7262fb2f85ec5db119 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 6 Nov 2018 13:54:43 +0100 Subject: [PATCH] Add WITH_TESTS option @@ -14,7 +14,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 881152a..965c992 100644 +index 9c6e1b2f..8599c540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ option(WITH_MAN "Enables hawkey man page generation" ON) @@ -24,8 +24,8 @@ index 881152a..965c992 100644 +option(WITH_TESTS "Enables unit tests" ON) - # load pkg-config first; it's required by other modules -@@ -165,8 +166,10 @@ endif() + # build options - debugging +@@ -179,8 +180,10 @@ endif() # build tests @@ -37,7 +37,7 @@ index 881152a..965c992 100644 add_subdirectory(python/hawkey) endif() diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt -index d964534..84d1720 100644 +index d9645346..84d17204 100644 --- a/python/hawkey/CMakeLists.txt +++ b/python/hawkey/CMakeLists.txt @@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY}) diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch deleted file mode 100644 index 6be484fea..000000000 --- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-Use-single-quotes-around-string-literals-used-in-SQL.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 96ca7d0049461df2293dd0000edcbc69b64255e0 Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt <pkj@axis.com> -Date: Sun, 3 May 2020 22:40:39 +0200 -Subject: [PATCH] Use single-quotes around string literals used in SQL - statements - -If sqlite is built with -DSQLITE_DQS=0 in accordance with -https://sqlite.org/quirks.html#dblquote, migration to version 1.2 of the -history database would fail with: - - History database cannot be created: /var/lib/dnf/history.sqlite. - Error: SQLite error on ":memory:": Executing an SQL statement failed: - no such column: 1.2 - -Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/951] -Signed-off-by: Peter Kjellerstedt <pkj@axis.com> ---- - libdnf/transaction/sql/migrate_tables_1_2.sql | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libdnf/transaction/sql/migrate_tables_1_2.sql b/libdnf/transaction/sql/migrate_tables_1_2.sql -index 49b75315..f80ad1c4 100644 ---- a/libdnf/transaction/sql/migrate_tables_1_2.sql -+++ b/libdnf/transaction/sql/migrate_tables_1_2.sql -@@ -1,9 +1,9 @@ - R"**( - BEGIN TRANSACTION; - ALTER TABLE trans -- ADD comment TEXT DEFAULT ""; -+ ADD comment TEXT DEFAULT ''; - UPDATE config -- SET value = "1.2" -+ SET value = '1.2' - WHERE key = 'version'; - COMMIT; - )**" diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch b/poky/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch new file mode 100644 index 000000000..e3784cc9e --- /dev/null +++ b/poky/meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch @@ -0,0 +1,26 @@ +libdnf: allow reproducible binary builds + +Use a dummy directory for test data if not built WITH_TESTS. Allow for overriding +TESTDATADIR, since the default is guaranteed to be wrong for target builds. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,7 +133,12 @@ add_definitions(-DG_LOG_DOMAIN=\\"libdnf + add_definitions(-D_FILE_OFFSET_BITS=64) + + # tests +-add_definitions(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\") ++if(NOT WITH_TESTS) ++ set(TEST_DATA_DIR "/notests") ++elseif(NOT DEFINED TEST_DATA_DIR) ++ set(TEST_DATA_DIR "${CMAKE_SOURCE_DIR}/data/tests") ++endif() ++add_definitions(-DTESTDATADIR=\\"${TEST_DATA_DIR}\\") + + # librhsm + if(ENABLE_RHSM_SUPPORT) diff --git a/poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb index 1b06d66b1..37991e6d8 100644 --- a/poky/meta/recipes-devtools/libdnf/libdnf_0.47.0.bb +++ b/poky/meta/recipes-devtools/libdnf/libdnf_0.48.0.bb @@ -8,10 +8,10 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \ file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ file://0001-Add-WITH_TESTS-option.patch \ file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \ - file://0001-Use-single-quotes-around-string-literals-used-in-SQL.patch \ + file://enable_test_data_dir_set.patch \ " -SRCREV = "8330eea6985c4e4b53796f858de5b6b38b1ddf5c" +SRCREV = "46a28d0cf09277fffc11392e5e362a2eda0d53a8" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/git" |