Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Changqing Li <changqing.li@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH V2] mdadm: fix do_package failed when changed local.conf but not cleaned
Date: Tue, 8 Oct 2019 11:16:16 +0800	[thread overview]
Message-ID: <98ff244f-3fbb-ae80-788a-11b894eb18c7@windriver.com> (raw)
In-Reply-To: <1569304805-85150-1-git-send-email-changqing.li@windriver.com>

Ping

On 9/24/19 2:00 PM, changqing.li@windriver.com wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> reproduce steps:
> 1. add DISTRO_FEATURE_append = 'usrmerge' in local.conf
> 2. bitbake mdadm --success
> 3. remove DISTRO_FEATURE_append = 'usrmerge' from local.conf
> 4. bitbake mdadm  -- failed when do_package
>
> it is not proper to change source Makefile during do_install by sed,
> change to add patch for it.
>
> [YOCTO #13493]
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>   .../mdadm/files/0001-mdadm-support-usrmerge.patch  | 46 ++++++++++++++++++++++
>   meta/recipes-extended/mdadm/mdadm_4.1.bb           |  7 ++--
>   2 files changed, 50 insertions(+), 3 deletions(-)
>   create mode 100644 meta/recipes-extended/mdadm/files/0001-mdadm-support-usrmerge.patch
>
> diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-support-usrmerge.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-support-usrmerge.patch
> new file mode 100644
> index 0000000..f1aa119
> --- /dev/null
> +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-support-usrmerge.patch
> @@ -0,0 +1,46 @@
> +From 2c7ccea05d7cf9dde48d735faa511d1b06c14878 Mon Sep 17 00:00:00 2001
> +From: Changqing Li <changqing.li@windriver.com>
> +Date: Thu, 5 Sep 2019 18:03:11 +0800
> +Subject: [PATCH] mdadm: support usrmerge
> +
> +Upstream-Status: Inappropriate[oe-specific]
> +
> +Signed-off-by: Changqing Li <changqing.li@windriver.com>
> +---
> + Makefile | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 4839001..466e960 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -88,7 +88,7 @@ MAP_PATH = $(MAP_DIR)/$(MAP_FILE)
> + MDMON_DIR = $(RUN_DIR)
> + # place for autoreplace cookies
> + FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
> +-SYSTEMD_DIR=/lib/systemd/system
> ++SYSTEMD_DIR=${SYSTEMD_UNITDIR}/system
> + LIB_DIR=/usr/libexec/mdadm
> +
> + COROSYNC:=$(shell [ -f $(SYSROOT)/usr/include/corosync/cmap.h ] || echo -DNO_COROSYNC)
> +@@ -120,7 +120,7 @@ LDLIBS=-ldl
> +
> + INSTALL = /usr/bin/install
> + DESTDIR =
> +-BINDIR  = /sbin
> ++BINDIR  = ${BASE_SBINDIR}
> + MANDIR  = /usr/share/man
> + MAN4DIR = $(MANDIR)/man4
> + MAN5DIR = $(MANDIR)/man5
> +@@ -128,7 +128,7 @@ MAN8DIR = $(MANDIR)/man8
> +
> + UDEVDIR := $(shell $(PKG_CONFIG) --variable=udevdir udev 2>/dev/null)
> + ifndef UDEVDIR
> +- UDEVDIR = /lib/udev
> ++ UDEVDIR = ${NONARCH_BASE_LIBDIR}/udev
> + endif
> +
> + ifeq (,$(findstring s,$(MAKEFLAGS)))
> +--
> +2.7.4
> +
> diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> index 639382e..18cc87b 100644
> --- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
> +++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> @@ -23,6 +23,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
>   	   file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
>              file://include_sysmacros.patch \
>              file://0001-mdadm-skip-test-11spare-migration.patch \
> +           file://0001-mdadm-support-usrmerge.patch \
>              "
>   
>   SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
> @@ -43,13 +44,13 @@ CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
>   CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
>   CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'
>   
> -EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
> +EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" BASE_SBINDIR="${base_sbindir}" \
> +                NONARCH_BASE_LIBDIR="${nonarch_base_libdir}" \
> +                SYSTEMD_UNITDIR="${systemd_unitdir}"'
>   
>   DEBUG_OPTIMIZATION_append = " -Wno-error"
>   
>   do_compile() {
> -	# Point to right sbindir
> -	sed -i -e "s;BINDIR  = /sbin;BINDIR = $base_sbindir;" -e "s;UDEVDIR = /lib;UDEVDIR = $nonarch_base_libdir;" -e "s;SYSTEMD_DIR=/lib/systemd/system;SYSTEMD_DIR=${systemd_unitdir}/system;" ${S}/Makefile
>   	oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
>   }
>   


  parent reply	other threads:[~2019-10-08  3:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24  6:00 [PATCH V2] mdadm: fix do_package failed when changed local.conf but not cleaned changqing.li
2019-09-24 11:31 ` Ross Burton
2019-10-08  3:16 ` Changqing Li [this message]
2019-10-28 22:05   ` Ross Burton
2019-10-29  9:52     ` Changqing Li

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=98ff244f-3fbb-ae80-788a-11b894eb18c7@windriver.com \
    --to=changqing.li@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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