All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header
@ 2022-11-24 16:42 Anthony PERARD
  2022-11-25  9:28 ` Jan Beulich
  2022-11-25  9:51 ` Luca Fancellu
  0 siblings, 2 replies; 5+ messages in thread
From: Anthony PERARD @ 2022-11-24 16:42 UTC (permalink / raw)
  To: xen-devel; +Cc: Henry Wang, Anthony PERARD, Wei Liu

Use actual include directory used to install the public header in
COPYING file.

Also, move the input file out of "tools/include/xen/" because that
directory is removed on `make clean`.

We can't used ./configure because $includedir contain another
variable, so the change is done in Makefile.

Fixes: 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    For 4.17 inclusion:
    
    Doing `make clean && make` in the root dir is going to fail as make
    isn't going to find the COPYING file while trying to install the
    includes.
    
    If that patch is too much, we could replace the `sed` by `cp` and just
    move COPYING instead of changing it.

 tools/include/Makefile                        | 1 +
 tools/include/{xen/COPYING => xen.COPYING.in} | 2 +-
 tools/include/.gitignore                      | 1 +
 tools/include/xen/.gitignore                  | 2 --
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename tools/include/{xen/COPYING => xen.COPYING.in} (93%)
 create mode 100644 tools/include/.gitignore
 delete mode 100644 tools/include/xen/.gitignore

diff --git a/tools/include/Makefile b/tools/include/Makefile
index f838171e8c..d69aeb54bf 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -24,6 +24,7 @@ xen-foreign:
 xen-dir:
 	mkdir -p xen/libelf acpi
 	find xen/ acpi/ -type l -exec rm '{}' +
+	sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYING
 	ln -s $(XEN_ROOT)/xen/include/public/*.h xen/
 	ln -s $(XEN_ROOT)/xen/include/public/*/ xen/
 	ln -s ../xen-sys/$(XEN_OS) xen/sys
diff --git a/tools/include/xen/COPYING b/tools/include/xen.COPYING.in
similarity index 93%
rename from tools/include/xen/COPYING
rename to tools/include/xen.COPYING.in
index fe3f9b7557..25513fe529 100644
--- a/tools/include/xen/COPYING
+++ b/tools/include/xen.COPYING.in
@@ -1,7 +1,7 @@
 XEN NOTICE
 ==========
 
-This licence applies to all files within this subdirectory ("/usr/include/xen")
+This licence applies to all files within this subdirectory ("@includedir@")
 with the exception of "sys/" which may include headers under different
 licences.
 
diff --git a/tools/include/.gitignore b/tools/include/.gitignore
new file mode 100644
index 0000000000..be14e3632d
--- /dev/null
+++ b/tools/include/.gitignore
@@ -0,0 +1 @@
+/xen/
diff --git a/tools/include/xen/.gitignore b/tools/include/xen/.gitignore
deleted file mode 100644
index 0628b2daf1..0000000000
--- a/tools/include/xen/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!COPYING
-- 
Anthony PERARD



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

* Re: [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header
  2022-11-24 16:42 [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header Anthony PERARD
@ 2022-11-25  9:28 ` Jan Beulich
  2022-11-25 10:57   ` Anthony PERARD
  2022-12-01 10:48   ` Henry Wang
  2022-11-25  9:51 ` Luca Fancellu
  1 sibling, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2022-11-25  9:28 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Henry Wang, Wei Liu, xen-devel

On 24.11.2022 17:42, Anthony PERARD wrote:
> Use actual include directory used to install the public header in
> COPYING file.
> 
> Also, move the input file out of "tools/include/xen/" because that
> directory is removed on `make clean`.
> 
> We can't used ./configure because $includedir contain another
> variable, so the change is done in Makefile.
> 
> Fixes: 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
(with a question, perhaps just for my own education, at the end)

> ---
> 
> Notes:
>     For 4.17 inclusion:
>     
>     Doing `make clean && make` in the root dir is going to fail as make
>     isn't going to find the COPYING file while trying to install the
>     includes.

I second this would better be fixed for the release.

> --- a/tools/include/Makefile
> +++ b/tools/include/Makefile
> @@ -24,6 +24,7 @@ xen-foreign:
>  xen-dir:
>  	mkdir -p xen/libelf acpi
>  	find xen/ acpi/ -type l -exec rm '{}' +
> +	sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYING

Any particular reason for using -e here?

Jan


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

* Re: [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header
  2022-11-24 16:42 [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header Anthony PERARD
  2022-11-25  9:28 ` Jan Beulich
@ 2022-11-25  9:51 ` Luca Fancellu
  1 sibling, 0 replies; 5+ messages in thread
From: Luca Fancellu @ 2022-11-25  9:51 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Xen-devel, Henry Wang, Wei Liu



> On 24 Nov 2022, at 16:42, Anthony PERARD <anthony.perard@citrix.com> wrote:
> 
> Use actual include directory used to install the public header in
> COPYING file.
> 
> Also, move the input file out of "tools/include/xen/" because that
> directory is removed on `make clean`.
> 
> We can't used ./configure because $includedir contain another
> variable, so the change is done in Makefile.
> 
> Fixes: 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> ---
> 
> Notes:
>    For 4.17 inclusion:
> 
>    Doing `make clean && make` in the root dir is going to fail as make
>    isn't going to find the COPYING file while trying to install the
>    includes.
> 
>    If that patch is too much, we could replace the `sed` by `cp` and just
>    move COPYING instead of changing it.
> 
> tools/include/Makefile                        | 1 +
> tools/include/{xen/COPYING => xen.COPYING.in} | 2 +-
> tools/include/.gitignore                      | 1 +
> tools/include/xen/.gitignore                  | 2 --
> 4 files changed, 3 insertions(+), 3 deletions(-)
> rename tools/include/{xen/COPYING => xen.COPYING.in} (93%)
> create mode 100644 tools/include/.gitignore
> delete mode 100644 tools/include/xen/.gitignore
> 
> diff --git a/tools/include/Makefile b/tools/include/Makefile
> index f838171e8c..d69aeb54bf 100644
> --- a/tools/include/Makefile
> +++ b/tools/include/Makefile
> @@ -24,6 +24,7 @@ xen-foreign:
> xen-dir:
> 	mkdir -p xen/libelf acpi
> 	find xen/ acpi/ -type l -exec rm '{}' +
> +	sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYING

If I understand correctly, the -e can be dropped as this is the only command we are issuing to sed.

The patch looks good, I’ve tested it with and without the -e and it works

Cheers,
Luca



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

* Re: [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header
  2022-11-25  9:28 ` Jan Beulich
@ 2022-11-25 10:57   ` Anthony PERARD
  2022-12-01 10:48   ` Henry Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Anthony PERARD @ 2022-11-25 10:57 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Henry Wang, Wei Liu, xen-devel

On Fri, Nov 25, 2022 at 10:28:52AM +0100, Jan Beulich wrote:
> On 24.11.2022 17:42, Anthony PERARD wrote:
> > Use actual include directory used to install the public header in
> > COPYING file.
> > 
> > Also, move the input file out of "tools/include/xen/" because that
> > directory is removed on `make clean`.
> > 
> > We can't used ./configure because $includedir contain another
> > variable, so the change is done in Makefile.
> > 
> > Fixes: 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due to several licences")
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> (with a question, perhaps just for my own education, at the end)

> > +	sed -e 's#@includedir@#$(includedir)/xen#g' xen.COPYING.in > xen/COPYING
> 
> Any particular reason for using -e here?

No, I just often use it, even when unnecessary.

Thanks,

-- 
Anthony PERARD


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

* RE: [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header
  2022-11-25  9:28 ` Jan Beulich
  2022-11-25 10:57   ` Anthony PERARD
@ 2022-12-01 10:48   ` Henry Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Henry Wang @ 2022-12-01 10:48 UTC (permalink / raw)
  To: Jan Beulich, Anthony PERARD; +Cc: Wei Liu, xen-devel, Julien Grall

Hi 

> -----Original Message-----
> Subject: Re: [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework
> COPYING for installed Xen public header
> 
> On 24.11.2022 17:42, Anthony PERARD wrote:
> > Use actual include directory used to install the public header in
> > COPYING file.
> >
> > Also, move the input file out of "tools/include/xen/" because that
> > directory is removed on `make clean`.
> >
> > We can't used ./configure because $includedir contain another
> > variable, so the change is done in Makefile.
> >
> > Fixes: 4ea75e9a9058 ("Rework COPYING installed in /usr/include/xen/, due
> to several licences")
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry

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

end of thread, other threads:[~2022-12-01 10:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 16:42 [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header Anthony PERARD
2022-11-25  9:28 ` Jan Beulich
2022-11-25 10:57   ` Anthony PERARD
2022-12-01 10:48   ` Henry Wang
2022-11-25  9:51 ` Luca Fancellu

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.