diff mbox series

[v2,01/13] package/libglib2/0003-disable-building-docs.patch: new patch

Message ID 20230425171454.48802-2-aduskett@gmail.com
State Accepted
Headers show
Series Selinux: bump to 3.5 | expand

Commit Message

Adam Duskett April 25, 2023, 5:14 p.m. UTC
If rst2html5 is installed on a host system, meson will attempt to build
html5 documentation from the docs directory, resulting in the following
error:

/usr/local/bin/rst2html5.py
Traceback (most recent call last):
  File "/usr/local/bin/rst2html5.py", line 27, in <module>
    from docutils.core import publish_cmdline, default_description
ModuleNotFoundError: No module named 'docutils'

Since we don't need, nor want to build the documentation, remove the docs
subdirectory from being built entirely.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 .../libglib2/0003-disable-building-docs.patch | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/libglib2/0003-disable-building-docs.patch

Comments

Peter Seiderer April 25, 2023, 9:03 p.m. UTC | #1
Hello Adam,

On Tue, 25 Apr 2023 10:14:42 -0700, Adam Duskett <aduskett@gmail.com> wrote:

> If rst2html5 is installed on a host system, meson will attempt to build
> html5 documentation from the docs directory, resulting in the following
> error:
>
> /usr/local/bin/rst2html5.py
> Traceback (most recent call last):
>   File "/usr/local/bin/rst2html5.py", line 27, in <module>
>     from docutils.core import publish_cmdline, default_description
> ModuleNotFoundError: No module named 'docutils'
>
> Since we don't need, nor want to build the documentation, remove the docs
> subdirectory from being built entirely.
>
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
>  .../libglib2/0003-disable-building-docs.patch | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 package/libglib2/0003-disable-building-docs.patch
>
> diff --git a/package/libglib2/0003-disable-building-docs.patch b/package/libglib2/0003-disable-building-docs.patch
> new file mode 100644
> index 0000000000..27a540bf61
> --- /dev/null
> +++ b/package/libglib2/0003-disable-building-docs.patch
> @@ -0,0 +1,38 @@
> +From f3b8515471aaa452f06d84da68372fcead8637d2 Mon Sep 17 00:00:00 2001
> +From: Adam Duskett <aduskett@gmail.com>
> +Date: Mon, 24 Apr 2023 11:52:24 -0700
> +Subject: [PATCH 1/1] disable building docs
> +
> +If rst2html5 is installed on a host system, meson will attempt to build
> +html5 documentation from the docs directory, resulting in the following
> +error:
> +
> +/usr/local/bin/rst2html5.py
> +Traceback (most recent call last):
> +  File "/usr/local/bin/rst2html5.py", line 27, in <module>
> +    from docutils.core import publish_cmdline, default_description
> +ModuleNotFoundError: No module named 'docutils'
> +
> +Since we don't need, nor want to build the documentation, remove the docs
> +subdirectory from being built entirely.
> +
> +Signed-off-by: Adam Duskett <aduskett@gmail.com>
> +---
> + meson.build | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 0cbc968..28e1147 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -2442,7 +2442,6 @@ if get_option('man')
> + endif
> +
> + gnome = import('gnome')
> +-subdir('docs/reference')

As far as I read the meson.build files all actions in docs/reference
are protected by the options 'gtk_doc' or 'man', is disabling this
ones not enough?

Regards,
Peter

> +
> + summary({
> +   'host cpu' : host_machine.cpu_family(),
> +--
> +2.40.0
> +
James Knight April 28, 2023, 1:44 a.m. UTC | #2
Peter, Adam;

On Tue, Apr 25, 2023 at 5:03 PM Peter Seiderer <ps.report@gmx.net> wrote:
> As far as I read the meson.build files all actions in docs/reference
> are protected by the options 'gtk_doc' or 'man', is disabling this
> ones not enough?

GLIB's HTML (gvariant) documentation was not bound to the `gtk_doc` or
`man` options. This has now been addressed upstream [1]. Using the
existing patch or replacing it with the upstream patch will
functionally achieve the same results.

[1]: https://gitlab.gnome.org/GNOME/glib/-/commit/0fa17ec3c7152cf0e1cbf965acf1426ac203bb1d
Yann E. MORIN May 9, 2023, 7:43 p.m. UTC | #3
Adam, All,

On 2023-04-25 10:14 -0700, Adam Duskett spake thusly:
> If rst2html5 is installed on a host system, meson will attempt to build
> html5 documentation from the docs directory, resulting in the following
> error:
> 
> /usr/local/bin/rst2html5.py
> Traceback (most recent call last):
>   File "/usr/local/bin/rst2html5.py", line 27, in <module>
>     from docutils.core import publish_cmdline, default_description
> ModuleNotFoundError: No module named 'docutils'
> 
> Since we don't need, nor want to build the documentation, remove the docs
> subdirectory from being built entirely.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>

As noticed by James, there is an upstream patch that fixes the issue, so
I've instead backported that.

Also, see below...

> ---
>  .../libglib2/0003-disable-building-docs.patch | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 package/libglib2/0003-disable-building-docs.patch
> 
> diff --git a/package/libglib2/0003-disable-building-docs.patch b/package/libglib2/0003-disable-building-docs.patch
> new file mode 100644
> index 0000000000..27a540bf61
> --- /dev/null
> +++ b/package/libglib2/0003-disable-building-docs.patch
> @@ -0,0 +1,38 @@
> +From f3b8515471aaa452f06d84da68372fcead8637d2 Mon Sep 17 00:00:00 2001
> +From: Adam Duskett <aduskett@gmail.com>
> +Date: Mon, 24 Apr 2023 11:52:24 -0700
> +Subject: [PATCH 1/1] disable building docs
> +
> +If rst2html5 is installed on a host system, meson will attempt to build
> +html5 documentation from the docs directory, resulting in the following
> +error:
> +
> +/usr/local/bin/rst2html5.py
> +Traceback (most recent call last):
> +  File "/usr/local/bin/rst2html5.py", line 27, in <module>
> +    from docutils.core import publish_cmdline, default_description
> +ModuleNotFoundError: No module named 'docutils'
> +
> +Since we don't need, nor want to build the documentation, remove the docs
> +subdirectory from being built entirely.
> +
> +Signed-off-by: Adam Duskett <aduskett@gmail.com>

    $ ./utils/docker-run make check-package
    package/libglib2/0003-disable-building-docs.patch:4: generate your patches with 'git format-patch -N'
    package/libglib2/0003-disable-building-docs.patch:0: missing Upstream in the header (http://nightly.buildroot.org/#_additional_patch_documentation)

Since I've replaced your path with a backport, that fixed those
warnings. ;-)

Regards,
Yann E. MORIN.

> +---
> + meson.build | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 0cbc968..28e1147 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -2442,7 +2442,6 @@ if get_option('man')
> + endif
> + 
> + gnome = import('gnome')
> +-subdir('docs/reference')
> + 
> + summary({
> +   'host cpu' : host_machine.cpu_family(),
> +-- 
> +2.40.0
> +
> -- 
> 2.40.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/libglib2/0003-disable-building-docs.patch b/package/libglib2/0003-disable-building-docs.patch
new file mode 100644
index 0000000000..27a540bf61
--- /dev/null
+++ b/package/libglib2/0003-disable-building-docs.patch
@@ -0,0 +1,38 @@ 
+From f3b8515471aaa452f06d84da68372fcead8637d2 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <aduskett@gmail.com>
+Date: Mon, 24 Apr 2023 11:52:24 -0700
+Subject: [PATCH 1/1] disable building docs
+
+If rst2html5 is installed on a host system, meson will attempt to build
+html5 documentation from the docs directory, resulting in the following
+error:
+
+/usr/local/bin/rst2html5.py
+Traceback (most recent call last):
+  File "/usr/local/bin/rst2html5.py", line 27, in <module>
+    from docutils.core import publish_cmdline, default_description
+ModuleNotFoundError: No module named 'docutils'
+
+Since we don't need, nor want to build the documentation, remove the docs
+subdirectory from being built entirely.
+
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ meson.build | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 0cbc968..28e1147 100644
+--- a/meson.build
++++ b/meson.build
+@@ -2442,7 +2442,6 @@ if get_option('man')
+ endif
+ 
+ gnome = import('gnome')
+-subdir('docs/reference')
+ 
+ summary({
+   'host cpu' : host_machine.cpu_family(),
+-- 
+2.40.0
+