All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] systemd: improve reproducibility
@ 2019-02-01  8:40 mingli.yu
  2019-02-13  5:52 ` Yu, Mingli
  0 siblings, 1 reply; 2+ messages in thread
From: mingli.yu @ 2019-02-01  8:40 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, Qi.Chen

From: Mingli Yu <mingli.yu@windriver.com>

Considering it's meanlingness to get test dir in
compiled env, remove ABS_BUILD_DIR and ABS_SRC_DIR
lines in src/shared/tests.c to improve reproducibility
to fix below issue:
WARNING: systemd-1_239-r0 do_package_qa: QA Issue: File /work/core2-64-wrs-linux/systemd/1_239-r0/packages-split/systemd/lib/systemd/libsystemd-shared-239.so in package contained reference to tmpdir [buildpaths]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 .../0001-test-improve-reproducibility.patch   | 40 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_239.bb      |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch b/meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch
new file mode 100644
index 00000000000..3d7aa7fc238
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch
@@ -0,0 +1,40 @@
+From f28a0e2a5f6a9ace858219c6f2513a5280acab48 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Fri, 1 Feb 2019 00:18:04 -0800
+Subject: [PATCH] test.c: improve reproducibility
+
+It's meanlingness to run test in compiled env,
+so uncoment the lines to avoid introducing
+ABS_BUILD_DIR and ABS_SRC_DIR to improve
+reproducibility to fix below issue:
+WARNING: systemd-1_239-r0 do_package_qa: QA Issue: File /work/core2-64-wrs-linux/systemd/1_239-r0/packages-split/systemd/lib/systemd/libsystemd-shared-239.so in package contained reference to tmpdir [buildpaths]
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/shared/tests.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/src/shared/tests.c b/src/shared/tests.c
+index 6b3df0aa07..7ac25eefea 100644
+--- a/src/shared/tests.c
++++ b/src/shared/tests.c
+@@ -37,12 +37,8 @@ const char* get_testdata_dir(const char *suffix) {
+                 _cleanup_free_ char *exedir = NULL;
+                 assert_se(readlink_and_make_absolute("/proc/self/exe", &exedir) >= 0);
+ 
+-                /* Check if we're running from the builddir. If so, use the compiled in path. */
+-                if (path_startswith(exedir, ABS_BUILD_DIR))
+-                        assert_se(snprintf(testdir, sizeof(testdir), "%s/test", ABS_SRC_DIR) > 0);
+-                else
+-                        /* Try relative path, according to the install-test layout */
+-                        assert_se(snprintf(testdir, sizeof(testdir), "%s/testdata", dirname(exedir)) > 0);
++                  /* Try relative path, according to the install-test layout */
++                  assert_se(snprintf(testdir, sizeof(testdir), "%s/testdata", dirname(exedir)) > 0);
+ 
+                 /* test this without the suffix, as it may contain a glob */
+                 if (access(testdir, F_OK) < 0) {
+-- 
+2.17.1
+
diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
index f843f588bdb..62ca9b146e7 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -41,6 +41,7 @@ SRC_URI += "file://touchscreen.rules \
            file://0024-journald-do-not-store-the-iovec-entry-for-process-co.patch \
            file://0025-journald-set-a-limit-on-the-number-of-fields.patch \
            file://0026-journal-fix-out-of-bounds-read-CVE-2018-16866.patch \
+           file://0001-test-improve-reproducibility.patch \
            "
 
 # patches made for musl are only applied on TCLIBC is musl
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] systemd: improve reproducibility
  2019-02-01  8:40 [PATCH] systemd: improve reproducibility mingli.yu
@ 2019-02-13  5:52 ` Yu, Mingli
  0 siblings, 0 replies; 2+ messages in thread
From: Yu, Mingli @ 2019-02-13  5:52 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, Qi.Chen

Ping.

On 2019年02月01日 16:40, mingli.yu@windriver.com wrote:
> From: Mingli Yu <mingli.yu@windriver.com>
>
> Considering it's meanlingness to get test dir in
> compiled env, remove ABS_BUILD_DIR and ABS_SRC_DIR
> lines in src/shared/tests.c to improve reproducibility
> to fix below issue:
> WARNING: systemd-1_239-r0 do_package_qa: QA Issue: File /work/core2-64-wrs-linux/systemd/1_239-r0/packages-split/systemd/lib/systemd/libsystemd-shared-239.so in package contained reference to tmpdir [buildpaths]
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>   .../0001-test-improve-reproducibility.patch   | 40 +++++++++++++++++++
>   meta/recipes-core/systemd/systemd_239.bb      |  1 +
>   2 files changed, 41 insertions(+)
>   create mode 100644 meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch
>
> diff --git a/meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch b/meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch
> new file mode 100644
> index 00000000000..3d7aa7fc238
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0001-test-improve-reproducibility.patch
> @@ -0,0 +1,40 @@
> +From f28a0e2a5f6a9ace858219c6f2513a5280acab48 Mon Sep 17 00:00:00 2001
> +From: Mingli Yu <mingli.yu@windriver.com>
> +Date: Fri, 1 Feb 2019 00:18:04 -0800
> +Subject: [PATCH] test.c: improve reproducibility
> +
> +It's meanlingness to run test in compiled env,
> +so uncoment the lines to avoid introducing
> +ABS_BUILD_DIR and ABS_SRC_DIR to improve
> +reproducibility to fix below issue:
> +WARNING: systemd-1_239-r0 do_package_qa: QA Issue: File /work/core2-64-wrs-linux/systemd/1_239-r0/packages-split/systemd/lib/systemd/libsystemd-shared-239.so in package contained reference to tmpdir [buildpaths]
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> +---
> + src/shared/tests.c | 8 ++------
> + 1 file changed, 2 insertions(+), 6 deletions(-)
> +
> +diff --git a/src/shared/tests.c b/src/shared/tests.c
> +index 6b3df0aa07..7ac25eefea 100644
> +--- a/src/shared/tests.c
> ++++ b/src/shared/tests.c
> +@@ -37,12 +37,8 @@ const char* get_testdata_dir(const char *suffix) {
> +                 _cleanup_free_ char *exedir = NULL;
> +                 assert_se(readlink_and_make_absolute("/proc/self/exe", &exedir) >= 0);
> +
> +-                /* Check if we're running from the builddir. If so, use the compiled in path. */
> +-                if (path_startswith(exedir, ABS_BUILD_DIR))
> +-                        assert_se(snprintf(testdir, sizeof(testdir), "%s/test", ABS_SRC_DIR) > 0);
> +-                else
> +-                        /* Try relative path, according to the install-test layout */
> +-                        assert_se(snprintf(testdir, sizeof(testdir), "%s/testdata", dirname(exedir)) > 0);
> ++                  /* Try relative path, according to the install-test layout */
> ++                  assert_se(snprintf(testdir, sizeof(testdir), "%s/testdata", dirname(exedir)) > 0);
> +
> +                 /* test this without the suffix, as it may contain a glob */
> +                 if (access(testdir, F_OK) < 0) {
> +--
> +2.17.1
> +
> diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
> index f843f588bdb..62ca9b146e7 100644
> --- a/meta/recipes-core/systemd/systemd_239.bb
> +++ b/meta/recipes-core/systemd/systemd_239.bb
> @@ -41,6 +41,7 @@ SRC_URI += "file://touchscreen.rules \
>              file://0024-journald-do-not-store-the-iovec-entry-for-process-co.patch \
>              file://0025-journald-set-a-limit-on-the-number-of-fields.patch \
>              file://0026-journal-fix-out-of-bounds-read-CVE-2018-16866.patch \
> +           file://0001-test-improve-reproducibility.patch \
>              "
>
>   # patches made for musl are only applied on TCLIBC is musl
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-13  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-01  8:40 [PATCH] systemd: improve reproducibility mingli.yu
2019-02-13  5:52 ` Yu, Mingli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.