Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/python-unittest-xml-reporting: add patch to fix LICENSE file installation
@ 2024-08-17 10:33 Thomas Petazzoni via buildroot
  2024-08-18  7:30 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-17 10:33 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Asaf Kahlon, Thomas Petazzoni

The LICENSE file gets installed directly to the root of $(TARGET_DIR),
which clashes with other packages:

FileExistsError: File already exists: /home/autobuild/autobuild/instance-3/output-1/target/LICENSE

This commit fixes this issue for the python-unittest-xml-reporting
package. Other fixes will be needed for the other patches.

The issue in python-unittest-xml-reporting was introduced in upstream
commit c43427611390fba83ca13fbb5311bd8fece5048f, which first appeared
in v3.1.0. We switched from a pre-3.1.0 version to 3.2.0 in Buildroot
in commit 69ba1562d5bef8d58b430fd7d67d0f3e77acfefc, which was merged
in 2023.02.

Fixes:

  http://autobuild.buildroot.net/results/2c91243b440087bbc7d051d65f553f59d05dd207/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...ta_files-installs-LICENSE-to-incorre.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch

diff --git a/package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch b/package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch
new file mode 100644
index 0000000000..4bc005f448
--- /dev/null
+++ b/package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch
@@ -0,0 +1,40 @@
+From 662cd67695c31126d72035a818b0f5f1da5a31ca Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Sat, 17 Aug 2024 12:24:28 +0200
+Subject: [PATCH] setup.py: drop data_files, installs LICENSE to incorrect
+ place
+
+As reported in issue
+https://github.com/xmlrunner/unittest-xml-reporting/issues/284, the
+data_files statement in the setup() calls installs the LICENSE file in
+the wrong place: in /usr/LICENSE, or even /LICENSE depending on the
+configuration.
+
+So let's drop this, and let setuptools install the LICENSE file
+automatically: since setuptools v56, the license_files attribute is
+automatically assigned to a default value, which includes "LICENSE",
+so there is in fact nothing to do to the get the LICENSE file
+installed at the correct location. See
+https://setuptools.pypa.io/en/latest/history.html#v56-0-0.
+
+Upstream: https://github.com/xmlrunner/unittest-xml-reporting/pull/287
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index c524ed4..afa5925 100755
+--- a/setup.py
++++ b/setup.py
+@@ -27,7 +27,6 @@ setup(
+     description = 'unittest-based test runner with Ant/JUnit like XML reporting.',
+     long_description = long_description,
+     long_description_content_type = 'text/markdown',
+-    data_files = [('', ['LICENSE'])],
+     install_requires = ['lxml'],
+     license = 'BSD',
+     platforms = ['Any'],
+-- 
+2.46.0
+
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/python-unittest-xml-reporting: add patch to fix LICENSE file installation
  2024-08-17 10:33 [Buildroot] [PATCH] package/python-unittest-xml-reporting: add patch to fix LICENSE file installation Thomas Petazzoni via buildroot
@ 2024-08-18  7:30 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2024-08-18  7:30 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: James Hilliard, Asaf Kahlon, buildroot

Thomas, All,

On 2024-08-17 12:33 +0200, Thomas Petazzoni via buildroot spake thusly:
> The LICENSE file gets installed directly to the root of $(TARGET_DIR),
> which clashes with other packages:
> 
> FileExistsError: File already exists: /home/autobuild/autobuild/instance-3/output-1/target/LICENSE
> 
> This commit fixes this issue for the python-unittest-xml-reporting
> package. Other fixes will be needed for the other patches.
> 
> The issue in python-unittest-xml-reporting was introduced in upstream
> commit c43427611390fba83ca13fbb5311bd8fece5048f, which first appeared
> in v3.1.0. We switched from a pre-3.1.0 version to 3.2.0 in Buildroot
> in commit 69ba1562d5bef8d58b430fd7d67d0f3e77acfefc, which was merged
> in 2023.02.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/2c91243b440087bbc7d051d65f553f59d05dd207/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...ta_files-installs-LICENSE-to-incorre.patch | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch
> 
> diff --git a/package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch b/package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch
> new file mode 100644
> index 0000000000..4bc005f448
> --- /dev/null
> +++ b/package/python-unittest-xml-reporting/0001-setup.py-drop-data_files-installs-LICENSE-to-incorre.patch
> @@ -0,0 +1,40 @@
> +From 662cd67695c31126d72035a818b0f5f1da5a31ca Mon Sep 17 00:00:00 2001
> +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +Date: Sat, 17 Aug 2024 12:24:28 +0200
> +Subject: [PATCH] setup.py: drop data_files, installs LICENSE to incorrect
> + place
> +
> +As reported in issue
> +https://github.com/xmlrunner/unittest-xml-reporting/issues/284, the
> +data_files statement in the setup() calls installs the LICENSE file in
> +the wrong place: in /usr/LICENSE, or even /LICENSE depending on the
> +configuration.
> +
> +So let's drop this, and let setuptools install the LICENSE file
> +automatically: since setuptools v56, the license_files attribute is
> +automatically assigned to a default value, which includes "LICENSE",
> +so there is in fact nothing to do to the get the LICENSE file
> +installed at the correct location. See
> +https://setuptools.pypa.io/en/latest/history.html#v56-0-0.
> +
> +Upstream: https://github.com/xmlrunner/unittest-xml-reporting/pull/287
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +---
> + setup.py | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/setup.py b/setup.py
> +index c524ed4..afa5925 100755
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -27,7 +27,6 @@ setup(
> +     description = 'unittest-based test runner with Ant/JUnit like XML reporting.',
> +     long_description = long_description,
> +     long_description_content_type = 'text/markdown',
> +-    data_files = [('', ['LICENSE'])],
> +     install_requires = ['lxml'],
> +     license = 'BSD',
> +     platforms = ['Any'],
> +-- 
> +2.46.0
> +
> -- 
> 2.46.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-08-18  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-17 10:33 [Buildroot] [PATCH] package/python-unittest-xml-reporting: add patch to fix LICENSE file installation Thomas Petazzoni via buildroot
2024-08-18  7:30 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox