All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Zhizhikin <andrey.z@gmail.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: openembeded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [meta-oe][PATCH] lvm2/libdevmapper: Make it build for native
Date: Tue, 25 Feb 2020 10:45:45 +0100	[thread overview]
Message-ID: <CAHtQpK6CBwCwivMSk4j0-ofr2eD82a6PkNPYt1aepDcBFVK7ng@mail.gmail.com> (raw)
In-Reply-To: <20190911145254.15693-1-pkj@axis.com>

Hello all,

I've just faced the problem with building lvm2 of the [zeus] and it
looks like this patch causes issues with similar symptoms that has
been reported for bash CVE [1].

This patch also touches the configure part, and in case if `-c
cleanall` is used - the build succeeds.

Failed build log looks like following:
ERROR: lvm2-2.03.02-r0 do_patch: Command Error: 'quilt --quiltrc
/development/projects/build-output/work/corei7-64-poky-linux/lvm2/2.03.02-r0/recipe-sysroot-native/etc/quiltrc
push' exited with 0  Output:
Applying patch 0001-configure-Fix-setting-of-CLDFLAGS-default.patch
patching file configure
Hunk #1 FAILED at 3077.
Hunk #2 FAILED at 3098.
Hunk #3 FAILED at 3111.
3 out of 3 hunks FAILED -- rejects in file configure
patching file configure.ac
Hunk #2 succeeded at 50 (offset -1 lines).
Hunk #3 succeeded at 63 (offset -1 lines).
Patch 0001-configure-Fix-setting-of-CLDFLAGS-default.patch does not
apply (enforce with -f)
ERROR: Logfile of failure stored in:
/development/projects/build-output/work/corei7-64-poky-linux/lvm2/2.03.02-r0/temp/log.do_patch.10047
ERROR: Task (/development/projects/yocto-build-appliance/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb:do_patch)
failed with exit code '1'

Since there was no decision (yet) taken on the bash one - can we
combine those two together to find a common solution for both cases?

On Wed, Sep 11, 2019 at 4:53 PM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> Backport a patch from upstream master that corrects the passing of
> link flags through configure.
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
>  ...gure-Fix-setting-of-CLDFLAGS-default.patch | 78 +++++++++++++++++++
>  meta-oe/recipes-support/lvm2/lvm2.inc         |  1 +
>  2 files changed, 79 insertions(+)
>  create mode 100644 meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch
>
> diff --git a/meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch b/meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch
> new file mode 100644
> index 000000000..07cb88ffb
> --- /dev/null
> +++ b/meta-oe/recipes-support/lvm2/files/0001-configure-Fix-setting-of-CLDFLAGS-default.patch
> @@ -0,0 +1,78 @@
> +From 4a3e707402032788e09282e0f54fdf82c8a0f8fc Mon Sep 17 00:00:00 2001
> +From: Marian Csontos <mcsontos@redhat.com>
> +Date: Mon, 19 Aug 2019 14:54:43 +0200
> +Subject: [PATCH] configure: Fix setting of CLDFLAGS default
> +
> +---
> + configure    | 6 +++---
> + configure.ac | 6 +++---
> + 2 files changed, 6 insertions(+), 6 deletions(-)
> +
> +Upstream-Status: Backport [https://sourceware.org/git/?p=lvm2.git;a=commit;h=4a3e707402032788e09282e0f54fdf82c8a0f8fc]
> +Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> +
> +diff --git a/configure b/configure
> +index ff3a59b6b..4c8476502 100755
> +--- a/configure
> ++++ b/configure
> +@@ -3077,7 +3077,7 @@ if test -z "$CFLAGS"; then :
> + fi
> + case "$host_os" in
> +       linux*)
> +-              CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym"
> ++              CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
> +               # equivalent to -rdynamic
> +               ELDFLAGS="-Wl,--export-dynamic"
> +               # FIXME Generate list and use --dynamic-list=.dlopen.sym
> +@@ -3098,7 +3098,7 @@ case "$host_os" in
> +               ;;
> +       darwin*)
> +               CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
> +-              CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}"
> ++              CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
> +               ELDFLAGS=
> +               CLDWHOLEARCHIVE="-all_load"
> +               CLDNOWHOLEARCHIVE=
> +@@ -3111,7 +3111,7 @@ case "$host_os" in
> +               BLKDEACTIVATE=no
> +               ;;
> +       *)
> +-              CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}"
> ++              CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
> +               ;;
> + esac
> +
> +diff --git a/configure.ac b/configure.ac
> +index 5da694631..830edb8da 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -30,7 +30,7 @@ AC_CANONICAL_TARGET([])
> + AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"])
> + case "$host_os" in
> +       linux*)
> +-              CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym"
> ++              CLDFLAGS="${CLDFLAGS-"$LDFLAGS"} -Wl,--version-script,.export.sym"
> +               # equivalent to -rdynamic
> +               ELDFLAGS="-Wl,--export-dynamic"
> +               # FIXME Generate list and use --dynamic-list=.dlopen.sym
> +@@ -51,7 +51,7 @@ case "$host_os" in
> +               ;;
> +       darwin*)
> +               CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
> +-              CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}"
> ++              CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
> +               ELDFLAGS=
> +               CLDWHOLEARCHIVE="-all_load"
> +               CLDNOWHOLEARCHIVE=
> +@@ -64,7 +64,7 @@ case "$host_os" in
> +               BLKDEACTIVATE=no
> +               ;;
> +       *)
> +-              CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}"
> ++              CLDFLAGS="${CLDFLAGS-"$LDFLAGS"}"
> +               ;;
> + esac
> +
> +--
> +2.21.0
> +
> diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
> index f358663b0..6c95bfd02 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> @@ -15,6 +15,7 @@ SRC_URI = "https://sourceware.org/pub/lvm2/LVM2.${PV}.tgz \
>             file://0001-Avoid-bashisms-in-init-scripts.patch \
>             file://0005-do-not-build-manual.patch \
>             file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \
> +           file://0001-configure-Fix-setting-of-CLDFLAGS-default.patch \
>             "
>  SRC_URI[md5sum] = "5fc07da5461a3794a751dcfc355827d5"
>  SRC_URI[sha256sum] = "550ba750239fd75b7e52c9877565cabffef506bbf6d7f6f17b9700dee56c720f"
> --
> 2.21.0
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

[1]: http://lists.openembedded.org/pipermail/openembedded-core/2020-February/292991.html

--
Regards,
Andrey.


  reply	other threads:[~2020-02-25  9:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 14:52 [meta-oe][PATCH] lvm2/libdevmapper: Make it build for native Peter Kjellerstedt
2020-02-25  9:45 ` Andrey Zhizhikin [this message]
2020-02-27  0:44   ` Peter Kjellerstedt

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=CAHtQpK6CBwCwivMSk4j0-ofr2eD82a6PkNPYt1aepDcBFVK7ng@mail.gmail.com \
    --to=andrey.z@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.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 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.