All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/swupdate: fix ipc header include
@ 2023-03-02  9:26 Lang Daniel via buildroot
  2023-07-31 22:29 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Lang Daniel via buildroot @ 2023-03-02  9:26 UTC (permalink / raw)
  To: buildroot

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/]
+---
+ include/progress_ipc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/progress_ipc.h b/include/progress_ipc.h
+index 5d0be1c..30e5266 100644
+--- a/include/progress_ipc.h
++++ b/include/progress_ipc.h
+@@ -9,7 +9,7 @@
+ #define _PROGRESS_IPC_H
+ 
+ #include <stdbool.h>
+-#include <swupdate_status.h>
++#include "swupdate_status.h"
+ 
+ #ifdef __cplusplus
+ extern "C" {
+-- 
+2.25.1
+
-- 
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/swupdate: fix ipc header include
  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
  2023-08-09 22:06   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-31 22:29 UTC (permalink / raw)
  To: Lang Daniel via buildroot; +Cc: Lang Daniel, Andrey Grafin

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

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

* Re: [Buildroot] [PATCH] package/swupdate: fix ipc header include
  2023-07-31 22:29 ` Thomas Petazzoni via buildroot
@ 2023-08-09 22:06   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-09 22:06 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot
  Cc: Lang Daniel, Andrey Grafin, Thomas Petazzoni

On Tue, 1 Aug 2023 00:29:07 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

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

Following the discussion we had, I submitted:

  https://patchwork.ozlabs.org/project/buildroot/patch/20230809220514.2089980-1-thomas.petazzoni@bootlin.com/

And I marked this patch proposed by Daniel Lang as Rejected. Let me
know what you think of this other proposal.

Thanks,

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

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

end of thread, other threads:[~2023-08-09 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2023-08-09 22:06   ` Thomas Petazzoni via buildroot

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.