All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] package/gnmupg2: build fixes
@ 2015-12-16 21:44 Yann E. MORIN
  2015-12-16 21:44 ` [Buildroot] [PATCH 1/2] package/gnupg2: fix build with musl Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yann E. MORIN @ 2015-12-16 21:44 UTC (permalink / raw)
  To: buildroot

Hello All!

This series fixes two build issues with gnupg2:
  - build failure with musl  (missing #include),
  - really not running tests in cross-compilation.

Regards,
Yann E. MORIN.


The following changes since commit 4cb010a5f1773d11c0dadcb3ac5ffa6e154fa113:

  package/libhdhomerun: new package (2015-12-16 22:11:33 +0100)

are available in the git repository at:

  git://git.busybox.net/~ymorin/git/buildroot yem/gnupg2

for you to fetch changes up to c7dd2e8bb5db5e326a7a4e7cb3611b8a0eea0e68:

  package/gnupg2: really do not run tests in cross-compilation (2015-12-16 22:42:36 +0100)

----------------------------------------------------------------
Yann E. MORIN (2):
      package/gnupg2: fix build with musl
      package/gnupg2: really do not run tests in cross-compilation

 .../0000-silence-git-when-not-in-git-tree.patch    | 26 +++++++++++++++
 package/gnupg2/0001-fix-pth-config-usage.patch     | 29 ++++++++--------
 package/gnupg2/0002-missing-include.patch          | 15 +++++++++
 package/gnupg2/0003-dont-run-tests.patch           | 39 ++++++++++++++++++++++
 package/gnupg2/gnupg2.mk                           |  4 +++
 5 files changed, 97 insertions(+), 16 deletions(-)
 create mode 100644 package/gnupg2/0000-silence-git-when-not-in-git-tree.patch
 create mode 100644 package/gnupg2/0002-missing-include.patch
 create mode 100644 package/gnupg2/0003-dont-run-tests.patch

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/2] package/gnupg2: fix build with musl
  2015-12-16 21:44 [Buildroot] [pull request] package/gnmupg2: build fixes Yann E. MORIN
@ 2015-12-16 21:44 ` Yann E. MORIN
  2015-12-16 21:44 ` [Buildroot] [PATCH 2/2] package/gnupg2: really do not run tests in cross-compilation Yann E. MORIN
  2015-12-16 22:43 ` [Buildroot] [pull request] package/gnmupg2: build fixes Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2015-12-16 21:44 UTC (permalink / raw)
  To: buildroot

Add a missing include to get select().

Fixes:
    http://autobuild.buildroot.org/results/8b2/8b282f546dc36f4bf9c25721cdf922c7a7ba340b/
    http://autobuild.buildroot.org/results/dc1/dc192255b1fcae18db8b98e65309e5c1493bdbc1/
    http://autobuild.buildroot.org/results/4c0/4c0ab2b28500a28945da3f4df742d8c2e2f21cd0/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/gnupg2/0002-missing-include.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 package/gnupg2/0002-missing-include.patch

diff --git a/package/gnupg2/0002-missing-include.patch b/package/gnupg2/0002-missing-include.patch
new file mode 100644
index 0000000..f20994c
--- /dev/null
+++ b/package/gnupg2/0002-missing-include.patch
@@ -0,0 +1,15 @@
+tools/watchgnupg: select() is from sys/select.h
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN gnupg2-2.0.29.orig/tools/watchgnupg.c gnupg2-2.0.29/tools/watchgnupg.c
+--- gnupg2-2.0.29.orig/tools/watchgnupg.c	2015-09-08 14:39:24.000000000 +0200
++++ gnupg2-2.0.29/tools/watchgnupg.c	2015-12-16 18:17:17.758057787 +0100
+@@ -32,6 +32,7 @@
+ #include <sys/un.h>
+ #include <fcntl.h>
+ #include <time.h>
++#include <sys/select.h>
+ 
+ #define PGM "watchgnupg"
+ 
-- 
1.9.1

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

* [Buildroot] [PATCH 2/2] package/gnupg2: really do not run tests in cross-compilation
  2015-12-16 21:44 [Buildroot] [pull request] package/gnmupg2: build fixes Yann E. MORIN
  2015-12-16 21:44 ` [Buildroot] [PATCH 1/2] package/gnupg2: fix build with musl Yann E. MORIN
@ 2015-12-16 21:44 ` Yann E. MORIN
  2015-12-16 22:16   ` Arnout Vandecappelle
  2015-12-16 22:43 ` [Buildroot] [pull request] package/gnmupg2: build fixes Thomas Petazzoni
  2 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2015-12-16 21:44 UTC (permalink / raw)
  To: buildroot

gnupg2 still tries to run test even if it tries to avoid it in
cross-compilation.

Really disable running the tests.

Since that requires a complete autoreconf, the existing patch against
configure is turned into a patch against the m4 macro.

since we autoreconf, we slightly patch configure.ac to not emit git
errors on stderr because it is not in a git tree.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0000-silence-git-when-not-in-git-tree.patch    | 26 +++++++++++++++
 package/gnupg2/0001-fix-pth-config-usage.patch     | 29 ++++++++--------
 package/gnupg2/0003-dont-run-tests.patch           | 39 ++++++++++++++++++++++
 package/gnupg2/gnupg2.mk                           |  4 +++
 4 files changed, 82 insertions(+), 16 deletions(-)
 create mode 100644 package/gnupg2/0000-silence-git-when-not-in-git-tree.patch
 create mode 100644 package/gnupg2/0003-dont-run-tests.patch

diff --git a/package/gnupg2/0000-silence-git-when-not-in-git-tree.patch b/package/gnupg2/0000-silence-git-when-not-in-git-tree.patch
new file mode 100644
index 0000000..5eaefe4
--- /dev/null
+++ b/package/gnupg2/0000-silence-git-when-not-in-git-tree.patch
@@ -0,0 +1,26 @@
+configure: silence autoreconf when not in a git tree
+
+When autoreconfiguring ourside of a git tree, the output is verbose
+with git errors.
+
+Silence that by consigning stderr to oblivion.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN gnupg2-2.0.29.orig/configure.ac gnupg2-2.0.29/configure.ac
+--- gnupg2-2.0.29.orig/configure.ac	2015-09-08 14:39:24.000000000 +0200
++++ gnupg2-2.0.29/configure.ac	2015-12-16 18:34:47.099493863 +0100
+@@ -33,11 +33,11 @@
+ # flag indicating a development version (mym4_isgit).  Note that the
+ # m4 processing is done by autoconf and not during the configure run.
+ m4_define([mym4_revision],
+-          m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
++          m4_esyscmd([git rev-parse --short HEAD 2>/dev/null | tr -d '\n\r']))
+ m4_define([mym4_revision_dec],
+           m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
+ m4_define([mym4_betastring],
+-          m4_esyscmd_s([git describe --match 'gnupg-2.[0-9].*[0-9]' --long|\
++          m4_esyscmd_s([git describe --match 'gnupg-2.[0-9].*[0-9]' --long 2>/dev/null |\
+                         awk -F- '$3!=0{print"-beta"$3}']))
+ m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
+ m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
diff --git a/package/gnupg2/0001-fix-pth-config-usage.patch b/package/gnupg2/0001-fix-pth-config-usage.patch
index e58aad3..756d351 100644
--- a/package/gnupg2/0001-fix-pth-config-usage.patch
+++ b/package/gnupg2/0001-fix-pth-config-usage.patch
@@ -6,22 +6,19 @@ original one when reporting the version number. This patch to gnupg2's
 configure script adjusts the version checking to support this
 difference, since Buildroot uses pth-config from pthsem.
 
-We patch directly the configure script, because triggering the entire
-autoreconf dance for just a one byte change in the configure script
-seems a bit silly.
-
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[yann.morin.1998 at free.fr: adapt to patch m4 macro for autoreconfiguring]
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 
-Index: b/configure
-===================================================================
---- a/configure
-+++ b/configure
-@@ -8346,7 +8346,7 @@
-   tmp=1.3.7
-   if test "$PTH_CONFIG" != "no"; then
+diff -durN gnupg2-2.0.29.orig/m4/gnupg-pth.m4 gnupg2-2.0.29/m4/gnupg-pth.m4
+--- gnupg2-2.0.29.orig/m4/gnupg-pth.m4	2015-09-08 14:39:24.000000000 +0200
++++ gnupg2-2.0.29/m4/gnupg-pth.m4	2015-12-16 18:30:54.336513493 +0100
+@@ -17,7 +17,7 @@
+ # Taken and modified from the m4 macros which come with Pth.
+ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+   [
+-    _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'`
++    _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]2}'`
+     _req_version="ifelse([$1],,1.2.0,$1)"
  
--    _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print $3}'`
-+    _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print $2}'`
-     _req_version="$tmp"
- 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTH - version >= $_req_version" >&5
+     AC_MSG_CHECKING(for PTH - version >= $_req_version)
diff --git a/package/gnupg2/0003-dont-run-tests.patch b/package/gnupg2/0003-dont-run-tests.patch
new file mode 100644
index 0000000..1858a0d
--- /dev/null
+++ b/package/gnupg2/0003-dont-run-tests.patch
@@ -0,0 +1,39 @@
+tests: really don't run tests in cross-compilation
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN gnupg2-2.0.29.orig/tests/Makefile.am gnupg2-2.0.29/tests/Makefile.am
+--- gnupg2-2.0.29.orig/tests/Makefile.am	2015-09-08 14:39:24.000000000 +0200
++++ gnupg2-2.0.29/tests/Makefile.am	2015-12-16 18:27:55.778227183 +0100
+@@ -64,6 +64,7 @@
+ asschk_SOURCES = asschk.c
+ 
+ 
++if RUN_GPG_TESTS
+ all-local: inittests.stamp
+ 
+ clean-local:
+@@ -72,4 +73,5 @@
+ inittests.stamp: inittests
+ 	srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests
+ 	echo timestamp >./inittests.stamp
++endif # RUN_GPG_TESTS
+ 
+diff -durN gnupg2-2.0.29.orig/tests/pkits/Makefile.am gnupg2-2.0.29/tests/pkits/Makefile.am
+--- gnupg2-2.0.29.orig/tests/pkits/Makefile.am	2015-09-01 08:52:21.000000000 +0200
++++ gnupg2-2.0.29/tests/pkits/Makefile.am	2015-12-16 18:44:06.422655594 +0100
+@@ -52,6 +52,7 @@
+ 
+ DISTCLEANFILES = pubring.kbx~ random_seed
+ 
++if RUN_GPG_TESTS
+ all-local: inittests.stamp
+ 
+ clean-local:
+@@ -71,5 +72,5 @@
+            elif test $$? -eq 77; then echo "- SKIP $$tst"; \
+ 	   fi; \
+          done
+-
++endif # RUN_GPG_TESTS
+ 
diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk
index 6d279fd..2e1f067 100644
--- a/package/gnupg2/gnupg2.mk
+++ b/package/gnupg2/gnupg2.mk
@@ -11,6 +11,10 @@ GNUPG2_LICENSE = GPLv3+
 GNUPG2_LICENSE_FILES = COPYING
 GNUPG2_DEPENDENCIES = zlib libgpg-error libgcrypt libassuan libksba libpthsem \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
+
+# Patching configure.ac and m4 macros, as well as Makefile.am
+GNUPG2_AUTORECONF = YES
+
 GNUPG2_CONF_OPTS = \
 	--disable-rpath --disable-regex --disable-doc \
 	--with-libgpg-error-prefix=$(STAGING_DIR)/usr \
-- 
1.9.1

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

* [Buildroot] [PATCH 2/2] package/gnupg2: really do not run tests in cross-compilation
  2015-12-16 21:44 ` [Buildroot] [PATCH 2/2] package/gnupg2: really do not run tests in cross-compilation Yann E. MORIN
@ 2015-12-16 22:16   ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2015-12-16 22:16 UTC (permalink / raw)
  To: buildroot

On 16-12-15 22:44, Yann E. MORIN wrote:
> gnupg2 still tries to run test even if it tries to avoid it in
> cross-compilation.
> 
> Really disable running the tests.
> 
> Since that requires a complete autoreconf, the existing patch against
> configure is turned into a patch against the m4 macro.
> 
> since we autoreconf, we slightly patch configure.ac to not emit git
> errors on stderr because it is not in a git tree.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 but minor nits.

> ---
>  .../0000-silence-git-when-not-in-git-tree.patch    | 26 +++++++++++++++

 I would have prefered to renumber the patches rather than adding a 0000. And
anyway it's not necessary to add it as the first patch, you can add it as a 0004
as well.

>  package/gnupg2/0001-fix-pth-config-usage.patch     | 29 ++++++++--------
>  package/gnupg2/0003-dont-run-tests.patch           | 39 ++++++++++++++++++++++
>  package/gnupg2/gnupg2.mk                           |  4 +++
>  4 files changed, 82 insertions(+), 16 deletions(-)
>  create mode 100644 package/gnupg2/0000-silence-git-when-not-in-git-tree.patch
>  create mode 100644 package/gnupg2/0003-dont-run-tests.patch
> 
> diff --git a/package/gnupg2/0000-silence-git-when-not-in-git-tree.patch b/package/gnupg2/0000-silence-git-when-not-in-git-tree.patch
> new file mode 100644
> index 0000000..5eaefe4
> --- /dev/null
> +++ b/package/gnupg2/0000-silence-git-when-not-in-git-tree.patch
> @@ -0,0 +1,26 @@
> +configure: silence autoreconf when not in a git tree
> +
> +When autoreconfiguring ourside of a git tree, the output is verbose
> +with git errors.
> +
> +Silence that by consigning stderr to oblivion.
> +
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

 Is this upstreamable?


 Regards,
 Arnout


> +
> +diff -durN gnupg2-2.0.29.orig/configure.ac gnupg2-2.0.29/configure.ac
> +--- gnupg2-2.0.29.orig/configure.ac	2015-09-08 14:39:24.000000000 +0200
> ++++ gnupg2-2.0.29/configure.ac	2015-12-16 18:34:47.099493863 +0100
> +@@ -33,11 +33,11 @@
> + # flag indicating a development version (mym4_isgit).  Note that the
> + # m4 processing is done by autoconf and not during the configure run.
> + m4_define([mym4_revision],
> +-          m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
> ++          m4_esyscmd([git rev-parse --short HEAD 2>/dev/null | tr -d '\n\r']))
> + m4_define([mym4_revision_dec],
> +           m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
> + m4_define([mym4_betastring],
> +-          m4_esyscmd_s([git describe --match 'gnupg-2.[0-9].*[0-9]' --long|\
> ++          m4_esyscmd_s([git describe --match 'gnupg-2.[0-9].*[0-9]' --long 2>/dev/null |\
> +                         awk -F- '$3!=0{print"-beta"$3}']))
> + m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
> + m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
[snip]


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [pull request] package/gnmupg2: build fixes
  2015-12-16 21:44 [Buildroot] [pull request] package/gnmupg2: build fixes Yann E. MORIN
  2015-12-16 21:44 ` [Buildroot] [PATCH 1/2] package/gnupg2: fix build with musl Yann E. MORIN
  2015-12-16 21:44 ` [Buildroot] [PATCH 2/2] package/gnupg2: really do not run tests in cross-compilation Yann E. MORIN
@ 2015-12-16 22:43 ` Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2015-12-16 22:43 UTC (permalink / raw)
  To: buildroot

Yann,

On Wed, 16 Dec 2015 22:44:26 +0100, Yann E. MORIN wrote:

> Yann E. MORIN (2):
>       package/gnupg2: fix build with musl
>       package/gnupg2: really do not run tests in cross-compilation

Both applied. On patch 2, as suggested by Arnout, I have renamed patch
0000 to 0004.

As suggested by Arnout as well, please submit the patches upstream :-)

Thanks!

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

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

end of thread, other threads:[~2015-12-16 22:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-16 21:44 [Buildroot] [pull request] package/gnmupg2: build fixes Yann E. MORIN
2015-12-16 21:44 ` [Buildroot] [PATCH 1/2] package/gnupg2: fix build with musl Yann E. MORIN
2015-12-16 21:44 ` [Buildroot] [PATCH 2/2] package/gnupg2: really do not run tests in cross-compilation Yann E. MORIN
2015-12-16 22:16   ` Arnout Vandecappelle
2015-12-16 22:43 ` [Buildroot] [pull request] package/gnmupg2: build fixes Thomas Petazzoni

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.