Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Lang Daniel via buildroot <buildroot@buildroot.org>
Cc: Lang Daniel <d.lang@abatec.at>,
	Andrey Grafin <conquistador@yandex-team.ru>
Subject: Re: [Buildroot] [PATCH] package/swupdate: fix ipc header include
Date: Tue, 1 Aug 2023 00:29:07 +0200	[thread overview]
Message-ID: <20230801002907.01f46d94@windsurf> (raw)
In-Reply-To: <VI1P190MB0493D233ECC579510F8C0FC69FB29@VI1P190MB0493.EURP190.PROD.OUTLOOK.COM>

Hello Daniel,

+ Andrey Grafin in Cc. Andrey, there is a question for you below.

On Thu, 2 Mar 2023 09:26:03 +0000
Lang Daniel via buildroot <buildroot@buildroot.org> wrote:

> Compilation for other programs trying to use swupdate headers will fail
> because the header is located in $STAGING_DIR/usr/include/swupdate and
> not $STAGING_DIR/usr/include.
> 
> Signed-off-by: Daniel Lang <d.lang@abatec.at>
> ---
>  .../swupdate/0001-progress_ipc-include.patch  | 33 +++++++++++++++++++
>  1 file changed, 33 insertions(+)
>  create mode 100644 package/swupdate/0001-progress_ipc-include.patch
> 
> diff --git a/package/swupdate/0001-progress_ipc-include.patch b/package/swupdate/0001-progress_ipc-include.patch
> new file mode 100644
> index 0000000000..cb555bc63b
> --- /dev/null
> +++ b/package/swupdate/0001-progress_ipc-include.patch
> @@ -0,0 +1,33 @@
> +From d073bf21c1021d313ae3edc92c8e89993e01fae4 Mon Sep 17 00:00:00 2001
> +From: Lang Daniel <d.lang@abatec.at>
> +Date: Thu, 2 Mar 2023 08:43:33 +0100
> +Subject: [PATCH] process: fix include
> +
> +The header might be installed to a subdirectory of /usr/include (like
> +with buildroot which sets /usr/include/swupdate). swupdate_status.h will
> +not be found in this case.
> +
> +
> +Signed-off-by: Daniel Lang <d.lang@abatec.at>
> +[Upstream status:
> +https://patchwork.ozlabs.org/project/swupdate/patch/VI1P190MB0493A1E34DC101CFDD5DFBB59FB29@VI1P190MB0493.EURP190.PROD.OUTLOOK.COM/]

You got some feedback from upstream, but never replied to it.

The next question was indeed why do we install in /usr/include/swupdate
and not /usr/include as recommended by upstream.

According to Buildroot commit eb2f2886b2364e5b6a0867f55106bf83acb064e7:

commit eb2f2886b2364e5b6a0867f55106bf83acb064e7
Author: Andrey Grafin <conquistador@yandex-team.ru>
Date:   Fri Dec 9 00:03:28 2022 +0300

    package/swupdate: add staging install
    
    SWupdate provides API for external programs, so some headers and
    libraries must be install to staging.
    
    This patch installs headers and libs to STAGING_DIR, to prevent a
    header name collision a subdirectory /usr/include/swupdate creates.
    
    Signed-off-by: Andrey Grafin <conquistador@yandex-team.ru>
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

But it doesn't say which one was causing a collision. Andrey, do you
remember which header file(s) were causing a problem here?

swupdate just installs:

-rw-r--r--. 1 thomas thomas 3813  1 août  00:26 network_ipc.h
-rw-r--r--. 1 thomas thomas 1599  1 août  00:26 progress_ipc.h
-rw-r--r--. 1 thomas thomas  749  1 août  00:26 swupdate_status.h

I'm not sure with what it clashes. The names are indeed probably not
the best, it would have been good to prefix them with swupdate_ or swu_
or something. But Debian installs them in /usr/include and it doesn't
collide with anything.

So I would be inclined to do what upstream suggests here and drop the
INCLUDEDIR=/usr/include/swupdate from swupdate.mk.

Thoughts?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-07-31 22:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02  9:26 [Buildroot] [PATCH] package/swupdate: fix ipc header include Lang Daniel via buildroot
2023-07-31 22:29 ` Thomas Petazzoni via buildroot [this message]
2023-08-09 22:06   ` Thomas Petazzoni via buildroot

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=20230801002907.01f46d94@windsurf \
    --to=buildroot@buildroot.org \
    --cc=conquistador@yandex-team.ru \
    --cc=d.lang@abatec.at \
    --cc=thomas.petazzoni@bootlin.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