[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 24 Nov 2022 16:42:54 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Henry Wang <Henry.Wang@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 24 Nov 2022 16:43:27 +0000
  • Ironport-data: A9a23:BIXIAa4ZeYjVrrd7R2dARgxRtEvHchMFZxGqfqrLsTDasY5as4F+v mtOX27QOa2CNmGjfIp3YYvk/E5XuJSBmNFjT1Nl+XxnHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraBYnoqLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4pwehBtC5gZkPKkR4AeE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m6 9E7ES0JShu5lu+K2byQTNU2oP8aFZy+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJU0UUrsUIMtWcOOAj3/jczpeuRSNqLA++WT7xw1tyrn9dtHSf7RmQO0Fwx7H9 zqWrwwVBDkQatq722GK0UuXodXzxyneYrxCFuOBo6sCbFq7mTVIVUx+uUGAiea9ol6zXZRYM UN80gojq7IjsnOiSNbVVge95nWDu3Y0S9dWVuE39gyJ4q7V+BqCQHgJSCZbb94rv9NwQiYlv mJlhPuwW2Yp6ufMDyvAqPHE9lteJBT5M0ccSAw9UA8h6OPyrb0qgDnJcoxFK5eM24id9S7L/ xiGqy03hrM2hMEN1rmm8V2vvw9AtqQlXSZuuFyJAzvNAhdRIdf8Otf2sQSzAeNodt7xc7WXg JQTdyFyBsgqBIrFqiGCSf5l8FqBt6fca220bbKC8vAcG9WRF5yLJ9g4DNJWfh0B3iM4RNMRS BWP0T69HbcKVJZqBIcuC25LN+wkzLL7CfPuXe3OY9xFb/BZLVHZrXs0NRLAjzu3yCDAdJ3T3 r/CIa6R4YsyU/w7nFJauc9DuVPU+szO7TyKHs2qp/hW+bGfeGSUWd843KimN4gEAWLtiFu9z uuzwOPQlUoHAbOkOXOGmWPRRHhTRUUG6VnNg5Q/Xoa+zsBOQQnN19e5LWsdRrFY
  • Ironport-hdrordr: A9a23:1ISy96z6NEpYLabfbXPHKrPwIL1zdoMgy1knxilNoRw8SKKlfq eV7ZAmPH7P+VAssR4b+exoVJPtfZq+z+8R3WByB8bAYOCOggLBR+sO0WKL+UyGJ8SUzI9gPM lbHJSWcOeAb2RHsQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.