Skip to contentSkip to conversation

libtevent: Add back the dependency on libcap

PATCH In review [email protected] 2 participants 3 messages Jun 28, 2016 – Jun 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtevent: Add back the dependency on libcap

From: Jackie Huang <[email protected]>

The dependency on libcap was removed by:
418d59459148621d593054dc397335d24165a655 "libtevent: rework dependencies for deterministic build"

but in fact there was not a patch to properly avoid dependency on libcap then we got error:

|In file included from ../lib/replace/test/testsuite.c:34:0:
|../lib/replace/system/capability.h:40:28: fatal error: sys/capability.h: No such file or directory
|compilation terminated.

so add the dependency back.

---
 meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb +1 -1
index 3f5d7f4..28759ec 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://tevent.samba.org"
 SECTION = "libs"
 LICENSE = "LGPLv3+"
 
-DEPENDS += "libaio libbsd libtalloc"
+DEPENDS += "libaio libbsd libtalloc libcap"
 RDEPENDS_python-tevent = "python"
 
 SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz"
Signature · 1 line
2.8.1
#1 lore raw
Quoted 9 lines · On 2016-06-28 01:52 AM, [email protected] wrote:

From: Jackie Huang <[email protected]>

The dependency on libcap was removed by:
418d59459148621d593054dc397335d24165a655 "libtevent: rework dependencies for deterministic build"

but in fact there was not a patch to properly avoid dependency on libcap then we got error:
|In file included from ../lib/replace/test/testsuite.c:34:0:

The error appears to be generated by test code only:
test/testsuite.c

$ rgrep capability.h talloc-2.1.6/* | tr ':' '\n'
talloc-2.1.6/lib/replace/test/testsuite.c
#include "system/capability.h"
talloc-2.1.6/lib/replace/system/wscript_configure
conf.CHECK_HEADERS('sys/capability.h')
talloc-2.1.6/lib/replace/system/capability.h
#ifndef _system_capability_h
talloc-2.1.6/lib/replace/system/capability.h
#define _system_capability_h
talloc-2.1.6/lib/replace/system/capability.h
#include <sys/capability.h>
talloc-2.1.6/lib/replace/wscript
    conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h 
sys/capability.h sys/dir.h sys/epoll.h')

So it *looks* like we should be able to split that off into a ptest only dependency. Right? Also, I've not used capabilities myself but from looking at the header, it seems that all functions have a "cap_" prefix and there's no code with that prefix in 2.1.6 or the current 2.1.7 version of talloc.

If you're going to take my suggestions above, please uprev to 2.1.7. It's a minor update:

$ diff -Naur talloc-2.1.6 talloc-2.1.7  | diffstat
 ABI/pytalloc-util-2.1.7.sigs     |   13 +++++++
 ABI/pytalloc-util.py3-2.1.7.sigs |   12 +++++++
 ABI/talloc-2.1.7.sigs            |   65 +++++++++++++++++++++++++++++++
 buildtools/wafsamba/wscript      |   16 +++++++++
 lib/replace/replace.h            |    4 +-
 lib/replace/system/wait.h        |    2 -
 lib/replace/wscript              |   16 ++-------
 talloc.c                         |    2 -
 testsuite.c                      |   10 +++---
 wscript                          |    2 -
 10 files changed, 120 insertions(+), 22 deletions(-)

with no change in capabilities code:

$ diff -Naur talloc-2.1.6 talloc-2.1.7  | grep capa
$ diff -Naur talloc-2.1.6 talloc-2.1.7  | grep cap_

../Randy

Quoted 26 lines

|../lib/replace/system/capability.h:40:28: fatal error: sys/capability.h: No such file or directory |compilation terminated.

so add the dependency back.

---
  meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb +1 -1
index 3f5d7f4..28759ec 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://tevent.samba.org"
  SECTION = "libs"
  LICENSE = "LGPLv3+"
 
-DEPENDS += "libaio libbsd libtalloc"
+DEPENDS += "libaio libbsd libtalloc libcap"
 
 
  RDEPENDS_python-tevent = "python"
  SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz"
Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, Canada, K2K 2W5
#2 lore raw
Quoted 38 lines

-----Original Message-----
From: MacLeod, Randy
Sent: Wednesday, June 29, 2016 4:28 AM
To: [email protected]; Huang, Jie (Jackie)
Subject: Re: [oe] [meta-networking][PATCH] libtevent: Add back the dependency on libcap

Quoted 9 lines · On 2016-06-28 01:52 AM, [email protected] wrote:

From: Jackie Huang <[email protected]>

The dependency on libcap was removed by:
418d59459148621d593054dc397335d24165a655 "libtevent: rework dependencies for deterministic build"

but in fact there was not a patch to properly avoid dependency on libcap then we got error:
|In file included from ../lib/replace/test/testsuite.c:34:0:

The error appears to be generated by test code only:
test/testsuite.c

$ rgrep capability.h talloc-2.1.6/* | tr ':' '\n'
talloc-2.1.6/lib/replace/test/testsuite.c
#include "system/capability.h"
talloc-2.1.6/lib/replace/system/wscript_configure
conf.CHECK_HEADERS('sys/capability.h')
talloc-2.1.6/lib/replace/system/capability.h
#ifndef _system_capability_h
talloc-2.1.6/lib/replace/system/capability.h
#define _system_capability_h
talloc-2.1.6/lib/replace/system/capability.h
#include <sys/capability.h>
talloc-2.1.6/lib/replace/wscript
     conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h
sys/capability.h sys/dir.h sys/epoll.h')
Quoted 8 lines

So it *looks* like we should be able to split that off into a ptest only dependency. Right? Also, I've not used capabilities myself but from looking at the header, it seems that all functions have a "cap_" prefix and there's no code with that prefix in 2.1.6 or the current 2.1.7 version of talloc.

If you're going to take my suggestions above, please uprev to 2.1.7. It's a minor update:

The patch is for libtevent, not for libtalloc, but yes, libtalloc seems to have the same issue, the fact is all packages that inherit waf-samba should have similar issue (not limited to the dependency on libcap) because the the lib/replace are all included, I will dig deeper and figure out a way to avoid such issues for them.

Thanks,
Jackie

Quoted 56 lines
$ diff -Naur talloc-2.1.6 talloc-2.1.7  | diffstat
  ABI/pytalloc-util-2.1.7.sigs     |   13 +++++++
  ABI/pytalloc-util.py3-2.1.7.sigs |   12 +++++++
  ABI/talloc-2.1.7.sigs            |   65 +++++++++++++++++++++++++++++++
  buildtools/wafsamba/wscript      |   16 +++++++++
  lib/replace/replace.h            |    4 +-
  lib/replace/system/wait.h        |    2 -
  lib/replace/wscript              |   16 ++-------
  talloc.c                         |    2 -
  testsuite.c                      |   10 +++---
  wscript                          |    2 -
  10 files changed, 120 insertions(+), 22 deletions(-)

with no change in capabilities code:

$ diff -Naur talloc-2.1.6 talloc-2.1.7  | grep capa
$ diff -Naur talloc-2.1.6 talloc-2.1.7  | grep cap_

../Randy

meta-

Quoted 11 lines

|../lib/replace/system/capability.h:40:28: fatal error: sys/capability.h: No such file or directory |compilation terminated.

so add the dependency back.

---
  meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta- renamed from meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb +0 -0

networking/recipes-support/libtevent/libtevent_0.9.28.bb

Quoted 13 lines

index 3f5d7f4..28759ec 100644

meta-networking/recipes-support/libtevent/libtevent_0.9.28.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "http://tevent.samba.org"
  SECTION = "libs"
  LICENSE = "LGPLv3+"
 
-DEPENDS += "libaio libbsd libtalloc"
+DEPENDS += "libaio libbsd libtalloc libcap"
 
 
  RDEPENDS_python-tevent = "python"
Quoted 2 lines
  SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz"

--
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, Canada, K2K 2W5