Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] libgcrypt: Revert to inheriting from binconfig
@ 2017-05-24 13:23 Mike Crowe
  2017-05-24 13:28 ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Crowe @ 2017-05-24 13:23 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

Commit 5870bd272b0b077d0826fb900b251884c1c05061 introduced
binconfig-disabled and enabled it for libgcrypt. This intentionally broke
the old-style libgcrypt-config binary since packages should be using the
pkg-config instead.

oe-core patches libgcrypt itself in order to generate a .pc file. This
patch was not accepted upstream because they do not wish to depend on
pkg-config. This means that upstream libgcrypt continues to ship with an
autoconf snippet that expects the libgcrypt-config binary so the configure
scripts shipped with other upstream projects (e.g. libmicrohttpd) also
expect to be able to find the libgcrypt-config binary.

If libgcrypt upstream doesn't generate a .pc file by default, then we
shouldn't expect other upstreams to make use of one. So, I think it makes
most sense to go back to installing a working libgcrypt-config binary until
that situation changes.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/recipes-support/libgcrypt/libgcrypt.inc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc
index 84c1cc018b..569e102c01 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -22,9 +22,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
            file://fix-undefined-reference-to-pthread.patch \
 "
 
-BINCONFIG = "${bindir}/libgcrypt-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
+inherit autotools texinfo binconfig pkgconfig
 
 EXTRA_OECONF = "--disable-asm"
 
-- 
2.11.0



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

* Re: [PATCH] libgcrypt: Revert to inheriting from binconfig
  2017-05-24 13:23 [PATCH] libgcrypt: Revert to inheriting from binconfig Mike Crowe
@ 2017-05-24 13:28 ` Burton, Ross
  2017-05-24 13:52   ` Mike Crowe
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-05-24 13:28 UTC (permalink / raw)
  To: Mike Crowe; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On 24 May 2017 at 14:23, Mike Crowe <mac@mcrowe.com> wrote:

> If libgcrypt upstream doesn't generate a .pc file by default, then we
> shouldn't expect other upstreams to make use of one. So, I think it makes
> most sense to go back to installing a working libgcrypt-config binary until
> that situation changes.
>

The flip side of this being that we disabled the script because those sort
of scripts have terrible failure modes when cross-compiling...

Ross

[-- Attachment #2: Type: text/html, Size: 882 bytes --]

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

* Re: [PATCH] libgcrypt: Revert to inheriting from binconfig
  2017-05-24 13:28 ` Burton, Ross
@ 2017-05-24 13:52   ` Mike Crowe
  2017-05-24 16:25     ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Crowe @ 2017-05-24 13:52 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Wednesday 24 May 2017 at 14:28:11 +0100, Burton, Ross wrote:
> On 24 May 2017 at 14:23, Mike Crowe <mac@mcrowe.com> wrote:
> 
> > If libgcrypt upstream doesn't generate a .pc file by default, then we
> > shouldn't expect other upstreams to make use of one. So, I think it makes
> > most sense to go back to installing a working libgcrypt-config binary until
> > that situation changes.
> >
> 
> The flip side of this being that we disabled the script because those sort
> of scripts have terrible failure modes when cross-compiling...

Oh, I thought that binconfig.bbclass swung through hoops in order to make
the scripts work well enough. Is that not true?

Many other recipes are still inheriting binconfig rather than
binconfig-disabled: apr, curl, gnutls, libtasn1.

Mike.


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

* Re: [PATCH] libgcrypt: Revert to inheriting from binconfig
  2017-05-24 13:52   ` Mike Crowe
@ 2017-05-24 16:25     ` Burton, Ross
  2017-05-24 22:44       ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-05-24 16:25 UTC (permalink / raw)
  To: Mike Crowe, Purdie, Richard; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

On 24 May 2017 at 14:52, Mike Crowe <mac@mcrowe.com> wrote:

> Oh, I thought that binconfig.bbclass swung through hoops in order to make
> the scripts work well enough. Is that not true?
>
> Many other recipes are still inheriting binconfig rather than
> binconfig-disabled: apr, curl, gnutls, libtasn1.
>

binconfig goes through hoops that are just not required with pkgconfig, and
the hoops are hacks which may not be reliable.  I can't remember the
details but I do remember that libgcrypt/gnupg was a worst offender here.

CCing Richard to see if he can remember why.

In the glorious future removing all binconfig scripts would be the ideal,
in my opinion.  Alternatively replacing them with glorified pkgconfig
wrappers.

Ross

[-- Attachment #2: Type: text/html, Size: 1285 bytes --]

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

* Re: [PATCH] libgcrypt: Revert to inheriting from binconfig
  2017-05-24 16:25     ` Burton, Ross
@ 2017-05-24 22:44       ` Richard Purdie
  2017-05-25 16:37         ` Mike Crowe
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2017-05-24 22:44 UTC (permalink / raw)
  To: Burton, Ross, Mike Crowe; +Cc: OE-core

On Wed, 2017-05-24 at 17:25 +0100, Burton, Ross wrote:
> 
> On 24 May 2017 at 14:52, Mike Crowe <mac@mcrowe.com> wrote:
> > Oh, I thought that binconfig.bbclass swung through hoops in order
> > to make
> > the scripts work well enough. Is that not true?
> > 
> > Many other recipes are still inheriting binconfig rather than
> > binconfig-disabled: apr, curl, gnutls, libtasn1.
> > 
> binconfig goes through hoops that are just not required with
> pkgconfig, and the hoops are hacks which may not be reliable.  I
> can't remember the details but I do remember that libgcrypt/gnupg was
> a worst offender here.
> 
> CCing Richard to see if he can remember why.
> 
> In the glorious future removing all binconfig scripts would be the
> ideal, in my opinion.  Alternatively replacing them with glorified
> pkgconfig wrappers.

We made a choice back then to go ahead and migrate these pieces to pkg-
config regardless of upstream's views since its so much cleaner and
less error prone than -config shell scripts which need hacking. We do
also patch the autoconf macros those pieces of software ship so that
pkg-config is used by the standard macros which covers most users
(since we reautoconf software).

Yes, binconfig.bbclass does have code which goes through hoops but I
don't think anyone would argue that code is pleasant or even scalable.
You can't easily change any of the sed expressions since you can't
easily know what set of file content they operate on and what side
effects any given change might have. The upstreams do change the
contents of the files over time and we can't really know if any given
replacements are still needed or if a new replacement may break other
files. Its also bad in that the on target versions need to differ to
the version used during cross building so you can't even have one
version of the file. I've seen these problems happen, my patches in the
past were after being burnt by that code.

For those reasons I believe we should be removing usage of
binconfig.bbclass from the system where we can if at all possible and
replacing it, even if it increases our custom patch load a little. I
know its used in a few places and I never did completely get rid of all
the config files but I still believe doing so would in fact be a
worthwhile effort.

I appreciate that does cause some pain as we're doing something
differently but I also believe it is justified. I would suggest
reminding these upstreams who won't at least allow pkg-config in
parallel that this does cause pain in the hope that if multiple people
report it, they may rethink things.

Cheers,

Richard




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

* Re: [PATCH] libgcrypt: Revert to inheriting from binconfig
  2017-05-24 22:44       ` Richard Purdie
@ 2017-05-25 16:37         ` Mike Crowe
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Crowe @ 2017-05-25 16:37 UTC (permalink / raw)
  To: Richard Purdie, Burton, Ross; +Cc: OE-core

On Wednesday 24 May 2017 at 23:44:49 +0100, Richard Purdie wrote:
> On Wed, 2017-05-24 at 17:25 +0100, Burton, Ross wrote:
> > 
> > On 24 May 2017 at 14:52, Mike Crowe <mac@mcrowe.com> wrote:
> > > Oh, I thought that binconfig.bbclass swung through hoops in order
> > > to make
> > > the scripts work well enough. Is that not true?
> > > 
> > > Many other recipes are still inheriting binconfig rather than
> > > binconfig-disabled: apr, curl, gnutls, libtasn1.
> > > 
> > binconfig goes through hoops that are just not required with
> > pkgconfig, and the hoops are hacks which may not be reliable.  I
> > can't remember the details but I do remember that libgcrypt/gnupg was
> > a worst offender here.
> > 
> > CCing Richard to see if he can remember why.
> > 
> > In the glorious future removing all binconfig scripts would be the
> > ideal, in my opinion.  Alternatively replacing them with glorified
> > pkgconfig wrappers.
> 
> We made a choice back then to go ahead and migrate these pieces to pkg-
> config regardless of upstream's views since its so much cleaner and
> less error prone than -config shell scripts which need hacking. We do
> also patch the autoconf macros those pieces of software ship so that
> pkg-config is used by the standard macros which covers most users
> (since we reautoconf software).

[snip]

> I appreciate that does cause some pain as we're doing something
> differently but I also believe it is justified. I would suggest
> reminding these upstreams who won't at least allow pkg-config in
> parallel that this does cause pain in the hope that if multiple people
> report it, they may rethink things.

I was unaware that oe-core's libgcrypt recipe provides a modified
libgcrypt.m4 in share/aclocal/ that uses pkg-config.

Inspired by the oe-core gnupg recipe, I deleted m4/libgcrypt.m4 from the
libmicrohttpd source directory in a do_configure_prepend and everything now
seems happy.

Thanks, and sorry for the unnecessary diversion.

Mike.


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

end of thread, other threads:[~2017-05-25 16:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 13:23 [PATCH] libgcrypt: Revert to inheriting from binconfig Mike Crowe
2017-05-24 13:28 ` Burton, Ross
2017-05-24 13:52   ` Mike Crowe
2017-05-24 16:25     ` Burton, Ross
2017-05-24 22:44       ` Richard Purdie
2017-05-25 16:37         ` Mike Crowe

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