All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess
@ 2015-11-13 15:53 Jens Rehsack
  2015-11-13 16:56 ` Christopher Larson
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Rehsack @ 2015-11-13 15:53 UTC (permalink / raw)
  To: openembedded-devel


To avoid errors when building dev-images (talloc-dev is missing), and to avoid
insane empty packages for that, rename talloc -> libtalloc as libtevent shows.

With that, remove dependencies to attr/xattr and libbsd - unless explicitely
enabled via PACKAGECONFIG.

Signed-off-by: Jens Rehsack <sno@netbsd.org>
---
 .../libtalloc/avoid-attr-unless-wanted.patch       | 20 +++++++++++++++++
 .../libtalloc/avoid-libbsd-unless-wanted.patch     | 10 +++++++++
 .../libtalloc_2.1.1.bb}                            | 25 +++++++++-------------
 .../recipes-support/libtevent/libtevent_0.9.21.bb  |  3 +--
 4 files changed, 41 insertions(+), 17 deletions(-)
 create mode 100644 meta-oe/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
 create mode 100644 meta-oe/recipes-support/libtalloc/libtalloc/avoid-libbsd-unless-wanted.patch
 rename meta-oe/recipes-support/{talloc/talloc_2.1.1.bb => libtalloc/libtalloc_2.1.1.bb} (70%)

diff --git a/meta-oe/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch b/meta-oe/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
new file mode 100644
index 0000000..a3ee9cc
--- /dev/null
+++ b/meta-oe/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
@@ -0,0 +1,20 @@
+--- a/lib/replace/wscript	2015-11-13 16:04:04.000000000 +0100
++++ b/lib/replace/wscript	2015-11-13 16:23:20.000000000 +0100
+@@ -636,8 +636,6 @@
+     if not bld.CONFIG_SET('HAVE_INET_ATON'):     REPLACE_SOURCE += ' inet_aton.c'
+     if not bld.CONFIG_SET('HAVE_INET_NTOP'):     REPLACE_SOURCE += ' inet_ntop.c'
+     if not bld.CONFIG_SET('HAVE_INET_PTON'):     REPLACE_SOURCE += ' inet_pton.c'
+-    if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'):
+-                                                 REPLACE_SOURCE += ' xattr.c'
+ 
+     bld.SAMBA_LIBRARY('replace',
+                       source=REPLACE_SOURCE,
+@@ -648,7 +646,7 @@
+                       # at the moment:
+                       # hide_symbols=bld.BUILTIN_LIBRARY('replace'),
+                       private_library=True,
+-                      deps='crypt dl nsl socket rt attr' + extra_libs)
++                      deps='crypt dl nsl socket rt ' + extra_libs)
+ 
+     bld.SAMBA_SUBSYSTEM('replace-test',
+                       source='''test/testsuite.c test/strptime.c
diff --git a/meta-oe/recipes-support/libtalloc/libtalloc/avoid-libbsd-unless-wanted.patch b/meta-oe/recipes-support/libtalloc/libtalloc/avoid-libbsd-unless-wanted.patch
new file mode 100644
index 0000000..292bdfd
--- /dev/null
+++ b/meta-oe/recipes-support/libtalloc/libtalloc/avoid-libbsd-unless-wanted.patch
@@ -0,0 +1,10 @@
+--- a/lib/replace/wscript	2015-11-13 16:26:06.000000000 +0100
++++ b/lib/replace/wscript	2015-11-13 16:26:12.000000000 +0100
+@@ -610,7 +610,6 @@
+                 break
+ 
+     extra_libs = ''
+-    if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
+ 
+     bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
+         REPLACE_HOSTCC_SOURCE,
diff --git a/meta-oe/recipes-support/talloc/talloc_2.1.1.bb b/meta-oe/recipes-support/libtalloc/libtalloc_2.1.1.bb
similarity index 70%
rename from meta-oe/recipes-support/talloc/talloc_2.1.1.bb
rename to meta-oe/recipes-support/libtalloc/libtalloc_2.1.1.bb
index 89c390f..7f0e6ae 100644
--- a/meta-oe/recipes-support/talloc/talloc_2.1.1.bb
+++ b/meta-oe/recipes-support/libtalloc/libtalloc_2.1.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://talloc.samba.org"
 SECTION = "libs"
 LICENSE = "LGPL-3.0+ & GPL-3.0+"
 
-SRC_URI = "http://samba.org/ftp/${BPN}/${BPN}-${PV}.tar.gz"
+SRC_URI = "http://samba.org/ftp/${BPN}/talloc-${PV}.tar.gz"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
                     file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
 
@@ -12,6 +12,14 @@ SRC_URI[sha256sum] = "3e29ce6c3ba3c4f7c2d57ce8cf0fbc24c86618c519f2b2fb6a45902548
 
 inherit waf-samba
 
+PACKAGECONFIG[attr] = ",,attr"
+PACKAGECONFIG[libbsd] = ",,libbsd"
+
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', 'avoid-attr-unless-wanted.patch', '', d)}"
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'libbsd', 'avoid-libbsd-unless-wanted.patch', '', d)}"
+
+S = "${WORKDIR}/talloc-${PV}"
+
 EXTRA_OECONF += "--disable-rpath \
                  --disable-rpath-install \
                  --bundled-libraries=NONE \
@@ -20,20 +28,7 @@ EXTRA_OECONF += "--disable-rpath \
                  --with-libiconv=${STAGING_DIR_HOST}${prefix}\
                 "
 
-PACKAGES += "libtalloc libtalloc-dbg libtalloc-dev pytalloc pytalloc-dbg pytalloc-dev"
-
-#ALLOW_EMPTY_${PN} = "1"
-FILES_${PN} = ""
-FILES_${PN}-dev = ""
-FILES_${PN}-dbg = ""
-
-FILES_libtalloc = "${libdir}/libtalloc.so.2 \
-                   ${libdir}/libtalloc.so.2.1.1"
-FILES_libtalloc-dbg = "/usr/src/debug/ \
-                   ${libdir}/.debug/libtalloc.so.2.1.1"
-FILES_libtalloc-dev = "${includedir}/ \
-                   ${libdir}/libtalloc.so \
-                   ${libdir}/pkgconfig/"
+PACKAGES += "pytalloc pytalloc-dbg pytalloc-dev"
 
 FILES_pytalloc = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
                   ${libdir}/libpytalloc-util.so.2 \
diff --git a/meta-oe/recipes-support/libtevent/libtevent_0.9.21.bb b/meta-oe/recipes-support/libtevent/libtevent_0.9.21.bb
index f297f30..36ce7d6 100644
--- a/meta-oe/recipes-support/libtevent/libtevent_0.9.21.bb
+++ b/meta-oe/recipes-support/libtevent/libtevent_0.9.21.bb
@@ -3,8 +3,7 @@ HOMEPAGE = "http://tevent.samba.org"
 SECTION = "libs"
 LICENSE = "LGPLv3+"
 
-DEPENDS += "talloc libcap"
-RDEPENDS_${PN} += "libtalloc"
+DEPENDS += "libtalloc libcap"
 RDEPENDS_python-tevent = "python"
 
 SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz"
-- 
2.4.9 (Apple Git-60)

I would work on all the waf-packages in a similar way, if this is reasonable.

Cheers
-- 
Jens Rehsack - rehsack@gmail.com



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

* Re: [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess
  2015-11-13 15:53 [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess Jens Rehsack
@ 2015-11-13 16:56 ` Christopher Larson
  2015-11-13 17:01   ` Christopher Larson
  2015-11-13 17:03   ` Jens Rehsack
  0 siblings, 2 replies; 7+ messages in thread
From: Christopher Larson @ 2015-11-13 16:56 UTC (permalink / raw)
  To: Jens Rehsack; +Cc: openembedded-devel

On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <rehsack@gmail.com> wrote:

> To avoid errors when building dev-images (talloc-dev is missing), and to
> avoid
> insane empty packages for that, rename talloc -> libtalloc as libtevent
> shows.
>
> With that, remove dependencies to attr/xattr and libbsd - unless
> explicitely
> enabled via PACKAGECONFIG.
>
> Signed-off-by: Jens Rehsack <sno@netbsd.org>
>

Our recipe names should be named based on the upstream project name, not
the library they happen to ship.

Instead, either we could we should kill all the libtalloc bits in the
PACKAGES var, and let the debian shlib renaming handle renaming talloc* to
libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


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

* Re: [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess
  2015-11-13 16:56 ` Christopher Larson
@ 2015-11-13 17:01   ` Christopher Larson
  2015-11-13 17:08     ` Jens Rehsack
  2015-11-13 17:03   ` Jens Rehsack
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher Larson @ 2015-11-13 17:01 UTC (permalink / raw)
  To: Jens Rehsack; +Cc: openembedded-devel

On Fri, Nov 13, 2015 at 9:56 AM, Christopher Larson <kergoth@gmail.com>
wrote:

> On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <rehsack@gmail.com> wrote:
>
>> To avoid errors when building dev-images (talloc-dev is missing), and to
>> avoid
>> insane empty packages for that, rename talloc -> libtalloc as libtevent
>> shows.
>>
>> With that, remove dependencies to attr/xattr and libbsd - unless
>> explicitely
>> enabled via PACKAGECONFIG.
>>
>> Signed-off-by: Jens Rehsack <sno@netbsd.org>
>>
>
> Our recipe names should be named based on the upstream project name, not
> the library they happen to ship.
>
> Instead, either we could we should kill all the libtalloc bits in the
> PACKAGES var, and let the debian shlib renaming handle renaming talloc* to
> libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
>

I just realized this may sound critical, but that wasn't intended. The
other changes look great, thanks for your work on making those dependencies
optional, it's good stuff.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


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

* Re: [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess
  2015-11-13 16:56 ` Christopher Larson
  2015-11-13 17:01   ` Christopher Larson
@ 2015-11-13 17:03   ` Jens Rehsack
  1 sibling, 0 replies; 7+ messages in thread
From: Jens Rehsack @ 2015-11-13 17:03 UTC (permalink / raw)
  To: Christopher Larson; +Cc: openembedded-devel


> Am 13.11.2015 um 17:56 schrieb Christopher Larson <kergoth@gmail.com>:
> 
> On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <rehsack@gmail.com> wrote:
> To avoid errors when building dev-images (talloc-dev is missing), and to avoid
> insane empty packages for that, rename talloc -> libtalloc as libtevent shows.
> 
> With that, remove dependencies to attr/xattr and libbsd - unless explicitely
> enabled via PACKAGECONFIG.
> 
> Signed-off-by: Jens Rehsack <sno@netbsd.org>
> 
> Our recipe names should be named based on the upstream project name, not the library they happen to ship.
> 
> Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.

libtevent does it the same way - neither is ideal, but the original behaviour results in unbuildable -dev images with talloc (samba) in it.

Beside of the rename, what's with the rest?

Cheers
-- 
Jens Rehsack - rehsack@gmail.com



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

* Re: [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess
  2015-11-13 17:01   ` Christopher Larson
@ 2015-11-13 17:08     ` Jens Rehsack
  2015-11-18  2:08       ` Christopher Larson
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Rehsack @ 2015-11-13 17:08 UTC (permalink / raw)
  To: Christopher Larson; +Cc: openembedded-devel


> Am 13.11.2015 um 18:01 schrieb Christopher Larson <kergoth@gmail.com>:
> 
> On Fri, Nov 13, 2015 at 9:56 AM, Christopher Larson <kergoth@gmail.com> wrote:
> On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <rehsack@gmail.com> wrote:
> To avoid errors when building dev-images (talloc-dev is missing), and to avoid
> insane empty packages for that, rename talloc -> libtalloc as libtevent shows.
> 
> With that, remove dependencies to attr/xattr and libbsd - unless explicitely
> enabled via PACKAGECONFIG.
> 
> Signed-off-by: Jens Rehsack <sno@netbsd.org>
> 
> Our recipe names should be named based on the upstream project name, not the library they happen to ship.
> 
> Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
> 
> I just realized this may sound critical, but that wasn't intended. The other changes look great, thanks for your work on making those dependencies optional, it's good stuff.

In that case - please take me by the hand and explain a bit more detailed 

> Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*

since I have no clue what you try to guide me.

Cheers
-- 
Jens Rehsack - rehsack@gmail.com



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

* Re: [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess
  2015-11-13 17:08     ` Jens Rehsack
@ 2015-11-18  2:08       ` Christopher Larson
  2015-11-18 10:37         ` Jens Rehsack
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Larson @ 2015-11-18  2:08 UTC (permalink / raw)
  To: Jens Rehsack; +Cc: openembedded-devel

On Fri, Nov 13, 2015 at 10:08 AM, Jens Rehsack <rehsack@gmail.com> wrote:

> > Am 13.11.2015 um 18:01 schrieb Christopher Larson <kergoth@gmail.com>:
> >
> > On Fri, Nov 13, 2015 at 9:56 AM, Christopher Larson <kergoth@gmail.com>
> wrote:
> > On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <rehsack@gmail.com> wrote:
> > To avoid errors when building dev-images (talloc-dev is missing), and to
> avoid
> > insane empty packages for that, rename talloc -> libtalloc as libtevent
> shows.
> >
> > With that, remove dependencies to attr/xattr and libbsd - unless
> explicitely
> > enabled via PACKAGECONFIG.
> >
> > Signed-off-by: Jens Rehsack <sno@netbsd.org>
> >
> > Our recipe names should be named based on the upstream project name, not
> the library they happen to ship.
> >
> > Instead, either we could we should kill all the libtalloc bits in the
> PACKAGES var, and let the debian shlib renaming handle renaming talloc* to
> libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
> >
> > I just realized this may sound critical, but that wasn't intended. The
> other changes look great, thanks for your work on making those dependencies
> optional, it's good stuff.
>
> In that case - please take me by the hand and explain a bit more detailed
>
> > Instead, either we could we should kill all the libtalloc bits in the
> PACKAGES var, and let the debian shlib renaming handle renaming talloc* to
> libtalloc*
>
> since I have no clue what you try to guide me.


I'm not able to reproduce any error when building an image. Add libtalloc
and dev-pkgs, and it builds just fine. You can't add talloc, as there is no
talloc package emitted.

That said, what I was suggesting was something along the lines of
https://gist.github.com/kergoth/ead0e1d2682a9e9fcd59 -- debian.bbclass will
automatically rename the ${PN}, ${PN}-dev, and ${PN}-dbg packages based on
the library soname, so will end up named libtalloc* anyway if you use it.
Since the main packages weren't emitted at all, it was pointless complexity
in the packaging to add libtalloc* explicitly.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


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

* Re: [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess
  2015-11-18  2:08       ` Christopher Larson
@ 2015-11-18 10:37         ` Jens Rehsack
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Rehsack @ 2015-11-18 10:37 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Matthias Rabe, openembedded-devel


> Am 18.11.2015 um 03:08 schrieb Christopher Larson <kergoth@gmail.com>:
> 
> 
> On Fri, Nov 13, 2015 at 10:08 AM, Jens Rehsack <rehsack@gmail.com> wrote:
> > Am 13.11.2015 um 18:01 schrieb Christopher Larson <kergoth@gmail.com>:
> >
> > On Fri, Nov 13, 2015 at 9:56 AM, Christopher Larson <kergoth@gmail.com> wrote:
> > On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <rehsack@gmail.com> wrote:
> > To avoid errors when building dev-images (talloc-dev is missing), and to avoid
> > insane empty packages for that, rename talloc -> libtalloc as libtevent shows.
> >
> > With that, remove dependencies to attr/xattr and libbsd - unless explicitely
> > enabled via PACKAGECONFIG.
> >
> > Signed-off-by: Jens Rehsack <sno@netbsd.org>
> >
> > Our recipe names should be named based on the upstream project name, not the library they happen to ship.
> >
> > Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
> >
> > I just realized this may sound critical, but that wasn't intended. The other changes look great, thanks for your work on making those dependencies optional, it's good stuff.
> 
> In that case - please take me by the hand and explain a bit more detailed
> 
> > Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*
> 
> since I have no clue what you try to guide me.
> 
> I'm not able to reproduce any error when building an image. Add libtalloc and dev-pkgs, and it builds just fine. You can't add talloc, as there is no talloc package emitted.
> 
> That said, what I was suggesting was something along the lines of https://gist.github.com/kergoth/ead0e1d2682a9e9fcd59 -- debian.bbclass will automatically rename the ${PN}, ${PN}-dev, and ${PN}-dbg packages based on the library soname, so will end up named libtalloc* anyway if you use it. Since the main packages weren't emitted at all, it was pointless complexity in the packaging to add libtalloc* explicitly.

Well, I had the problem and one of our contributors either that samba's dependency on talloc prevents creating a dev-image (not a regular image!), because no -dev image was emitted but talloc-dev was added as RDEPENDS automatically because it might contain header files or so (no idea).

I don't see the win in https://gist.github.com/kergoth/ead0e1d2682a9e9fcd59#file-talloc-patch-L25-L34 vs. renaming the recipe, but during meta-java cleanup and packaging openjdk-8 I encountered lot's of issues with RPROVIDES - so I try to avoid it where possible. And - as said - libtevent (http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/libtevent) is currently there and accepted, don't see adopting talloc -> libtalloc doing similar.

You can HL me in #yocto if I miss something which might be clarified in a short talk.

Cheers
-- 
Jens Rehsack - rehsack@gmail.com



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

end of thread, other threads:[~2015-11-18 10:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13 15:53 [meta-oe][PATCH] talloc: rename to libtalloc and cleanup dependency mess Jens Rehsack
2015-11-13 16:56 ` Christopher Larson
2015-11-13 17:01   ` Christopher Larson
2015-11-13 17:08     ` Jens Rehsack
2015-11-18  2:08       ` Christopher Larson
2015-11-18 10:37         ` Jens Rehsack
2015-11-13 17:03   ` Jens Rehsack

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.