Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17
@ 2016-08-13 17:06 Yann E. MORIN
  2016-08-13 17:06 ` [Buildroot] [PATCH 2/2] package/systemd-bootchart: don't build manpages Yann E. MORIN
  2016-08-14 14:03 ` [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17 Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Yann E. MORIN @ 2016-08-13 17:06 UTC (permalink / raw)
  To: buildroot

It uses GRND_NONBLOCK, introduced in 3.17.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/systemd-bootchart/Config.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/systemd-bootchart/Config.in b/package/systemd-bootchart/Config.in
index 2a70b8d..8deb6b9 100644
--- a/package/systemd-bootchart/Config.in
+++ b/package/systemd-bootchart/Config.in
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_SYSTEMD_BOOTCHART
 	bool "systemd-bootchart"
 	depends on BR2_INIT_SYSTEMD
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
 	help
 	  systemd-bootchart is a tool, usually run at system startup,
 	  that collects the CPU load, disk load, memory usage, as well
@@ -19,3 +20,7 @@ config BR2_PACKAGE_SYSTEMD_BOOTCHART
 	  these options are enabled.
 
 	  http://www.freedesktop.org/software/systemd/man/systemd-bootchart.html
+
+comment "systemd-bootchart needs a toolchain w/ headers >= 3.17"
+	depends on BR2_INIT_SYSTEMD
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
-- 
2.7.4

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

* [Buildroot] [PATCH 2/2] package/systemd-bootchart: don't build manpages
  2016-08-13 17:06 [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17 Yann E. MORIN
@ 2016-08-13 17:06 ` Yann E. MORIN
  2016-08-14 14:05   ` Thomas Petazzoni
  2016-08-14 14:03 ` [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17 Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2016-08-13 17:06 UTC (permalink / raw)
  To: buildroot

Building the man pages requires xsltproc, which is not always available
on the build machine, so the build fails at configure:
    configure: error: *** xsltproc is required for man pages

But then, even when xsltproc is present, it can't actually build the man
pages, because it can't "download external entities":
    I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
    warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
    compilation error: file ./man/custom-man.xsl line 27 element import

Add a patch (sent upstream) to allow not building the man pages.

Fixes:
    http://autobuild.buildroot.org/results/e2a/e2ae38775b6acff3c3a8ea233ec70dd68b017319/
    http://autobuild.buildroot.org/results/66d/66d85622db9f7ff5a4e8d6eed3fd3b32959685cf/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 ...onfigure-add-option-to-not-build-manpages.patch | 59 ++++++++++++++++++++++
 package/systemd-bootchart/systemd-bootchart.mk     | 11 +++-
 2 files changed, 69 insertions(+), 1 deletion(-)
 create mode 100644 package/systemd-bootchart/0001-configure-add-option-to-not-build-manpages.patch

diff --git a/package/systemd-bootchart/0001-configure-add-option-to-not-build-manpages.patch b/package/systemd-bootchart/0001-configure-add-option-to-not-build-manpages.patch
new file mode 100644
index 0000000..ea9f8f2
--- /dev/null
+++ b/package/systemd-bootchart/0001-configure-add-option-to-not-build-manpages.patch
@@ -0,0 +1,59 @@
+From 60a581253331ac38721a12495909d073eff703b7 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Sat, 13 Aug 2016 18:47:17 +0200
+Subject: [PATCH] configure: add option to not build manpages
+
+Man pages are not always needed, especially on embedded systems.
+
+Add a configure option to not build them; by default, build them.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+Patch sent upstream:
+    https://github.com/systemd/systemd-bootchart/pull/14
+---
+ Makefile.am  |  5 ++++-
+ configure.ac | 10 +++++++++-
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a71f8d8..e6510d5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -74,7 +74,10 @@ EXTRA_DIST = \
+ MANPAGES = man/bootchart.conf.5 man/systemd-bootchart.1
+ MANPAGES_ALIAS = man/bootchart.conf.d.5
+ 
+-man_MANS = $(MANPAGES) $(MANPAGES_ALIAS)
++if COND_man
++MAYBE_MANPAGES = $(MANPAGES) $(MANPAGES_ALIAS)
++endif
++man_MANS = $(MAYBE_MANPAGES)
+ 
+ man/bootchart.conf.d.5: man/bootchart.conf.5
+ 
+diff --git a/configure.ac b/configure.ac
+index f8e62d8..90e8b03 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -167,8 +167,16 @@ AC_ARG_WITH([rootlibdir],
+ AC_SUBST([rootprefix], [$with_rootprefix])
+ AC_SUBST([rootlibdir], [$with_rootlibdir])
+ 
++AC_ARG_ENABLE([man],
++        AS_HELP_STRING([--diable-man],[Build the man pages (default: yes)]),
++        [build_man=$enableval],
++        [build_man=yes])
++
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+-AS_IF([test -z "$XSLTPROC"], AC_MSG_ERROR([*** xsltproc is required for man pages]))
++AS_IF([test -z "$XSLTPROC" -a "$build_man" = "yes"],
++                [AC_MSG_ERROR([*** xsltproc is required for man pages])])
++
++AM_CONDITIONAL([COND_man],[test "$build_man" = "yes"])
+ 
+ AC_CONFIG_FILES([
+         Makefile
+-- 
+2.7.4
+
diff --git a/package/systemd-bootchart/systemd-bootchart.mk b/package/systemd-bootchart/systemd-bootchart.mk
index 4fdd712..3d91b05 100644
--- a/package/systemd-bootchart/systemd-bootchart.mk
+++ b/package/systemd-bootchart/systemd-bootchart.mk
@@ -11,6 +11,15 @@ SYSTEMD_BOOTCHART_SOURCE = systemd-bootchart-$(SYSTEMD_BOOTCHART_VERSION).tar.xz
 SYSTEMD_BOOTCHART_SITE = https://github.com/systemd/systemd-bootchart/releases/download/v$(SYSTEMD_BOOTCHART_VERSION)
 SYSTEMD_BOOTCHART_LICENSE = LGPLv2.1+
 SYSTEMD_BOOTCHART_LICENSE_FILES = LICENSE.LGPL2.1
-SYSTEMD_BOOTCHART_DEPENDENCIES = systemd
+SYSTEMD_BOOTCHART_DEPENDENCIES = host-intltool systemd
+
+# 0001-configure-add-option-to-not-build-manpages.patch
+SYSTEMD_BOOTCHART_AUTORECONF = YES
+SYSTEMD_BOOTCHART_CONF_OPTS = --disable-man
+
+define SYSTEMD_BOOTCHART_INTLTOOLIZE
+        cd $(@D) && $(HOST_DIR)/usr/bin/intltoolize --force --automake
+endef
+SYSTEMD_BOOTCHART_PRE_CONFIGURE_HOOKS = SYSTEMD_BOOTCHART_INTLTOOLIZE
 
 $(eval $(autotools-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17
  2016-08-13 17:06 [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17 Yann E. MORIN
  2016-08-13 17:06 ` [Buildroot] [PATCH 2/2] package/systemd-bootchart: don't build manpages Yann E. MORIN
@ 2016-08-14 14:03 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-08-14 14:03 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 13 Aug 2016 19:06:58 +0200, Yann E. MORIN wrote:
> It uses GRND_NONBLOCK, introduced in 3.17.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
>  package/systemd-bootchart/Config.in | 5 +++++
>  1 file changed, 5 insertions(+)

Applied to master, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 2/2] package/systemd-bootchart: don't build manpages
  2016-08-13 17:06 ` [Buildroot] [PATCH 2/2] package/systemd-bootchart: don't build manpages Yann E. MORIN
@ 2016-08-14 14:05   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-08-14 14:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 13 Aug 2016 19:06:59 +0200, Yann E. MORIN wrote:
> Building the man pages requires xsltproc, which is not always available
> on the build machine, so the build fails at configure:
>     configure: error: *** xsltproc is required for man pages
> 
> But then, even when xsltproc is present, it can't actually build the man
> pages, because it can't "download external entities":
>     I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
>     warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
>     compilation error: file ./man/custom-man.xsl line 27 element import
> 
> Add a patch (sent upstream) to allow not building the man pages.
> 
> Fixes:
>     http://autobuild.buildroot.org/results/e2a/e2ae38775b6acff3c3a8ea233ec70dd68b017319/
>     http://autobuild.buildroot.org/results/66d/66d85622db9f7ff5a4e8d6eed3fd3b32959685cf/
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>

Applied to master, thanks!

I was going to suggest that instead of adding a configure option to
decide whether to build man pages or not, you could have decided
depending on the availability of xsltproc. Except that, as you
explained in the commit log, xsltproc might be available, but still
building the man pages might fail.

So, I've applied. Hopefully, upstream will accept this solution.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-08-14 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-13 17:06 [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17 Yann E. MORIN
2016-08-13 17:06 ` [Buildroot] [PATCH 2/2] package/systemd-bootchart: don't build manpages Yann E. MORIN
2016-08-14 14:05   ` Thomas Petazzoni
2016-08-14 14:03 ` [Buildroot] [PATCH 1/2] package/systemd-bootchart: needs headers >= 3.17 Thomas Petazzoni

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