From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Joe Slater <joe.slater@windriver.com>,
openembedded-core@lists.openembedded.org
Cc: randy.macleod@windriver.com
Subject: Re: [oe-core][PATCH 1/1] libdnf: allow reproducible binary builds
Date: Wed, 22 Jul 2020 23:01:27 +0100 [thread overview]
Message-ID: <b840115e67395ab5a1ba2848acc48639d75921c9.camel@linuxfoundation.org> (raw)
In-Reply-To: <20200722203111.140237-1-joe.slater@windriver.com>
On Wed, 2020-07-22 at 13:31 -0700, Joe Slater wrote:
> Use a static TESTDATADIR if tests are disabled. Allow
> override of TESTDATADIR if tests are enabled since the
> default will be wrong for target builds.
>
> Signed-off-by: Joe Slater <joe.slater@windriver.com>
> ---
> .../libdnf/libdnf/enable_test_data_dir_set.patch | 26 ++++++++++++++++++++++
> meta/recipes-devtools/libdnf/libdnf_0.48.0.bb | 1 +
> 2 files changed, 27 insertions(+)
> create mode 100644 meta/recipes-devtools/libdnf/libdnf/enable_test_data_dir_set.patch
>
> 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 0000000..e3784cc
> --- /dev/null
> +++ b/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}\\")
Do we need to set a value in the build or do we never enable the tests?
Cheers,
Richard
next prev parent reply other threads:[~2020-07-22 22:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 20:31 [oe-core][PATCH 1/1] libdnf: allow reproducible binary builds Joe Slater
2020-07-22 22:01 ` Richard Purdie [this message]
2020-07-23 14:10 ` Joe Slater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b840115e67395ab5a1ba2848acc48639d75921c9.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=joe.slater@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=randy.macleod@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox