public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH 0/2][PROPOSED] libcap fix and update
@ 2016-09-07 21:42 Jianxun Zhang
  2016-09-07 21:42 ` [PATCH 1/2][PROPOSED] libcap: fix compiling issue when not having libpam Jianxun Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jianxun Zhang @ 2016-09-07 21:42 UTC (permalink / raw)
  To: openembedded-core

Need some experts to review this patch series. I am not really
sure for if what I fixed is a valid case or if fix is the best
answer. The validation before submission is very limited too.

I ran into the compiling issue when build an application and
found this recipe cannot be built without specifying anything.
I don't feel the existing options are passed to make with test,
and guess EXTRA_CONF won't work with this makefile-based project.

The second patch is a following-up when I saw there is another
option in the similar situation and seems to be obsolete now.

Jianxun Zhang (2):
  libcap: fix compiling issue when not having libpam
  libcap: remove dependency on attr

 meta/recipes-support/libcap/libcap_2.25.bb | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

-- 
2.7.4



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

* [PATCH 1/2][PROPOSED] libcap: fix compiling issue when not having libpam
  2016-09-07 21:42 [PATCH 0/2][PROPOSED] libcap fix and update Jianxun Zhang
@ 2016-09-07 21:42 ` Jianxun Zhang
  2016-09-07 21:42 ` [PATCH 2/2][PROPOSED] libcap: remove dependency on attr Jianxun Zhang
  2016-09-08  8:43 ` [PATCH 0/2][PROPOSED] libcap fix and update Maxin B. John
  2 siblings, 0 replies; 4+ messages in thread
From: Jianxun Zhang @ 2016-09-07 21:42 UTC (permalink / raw)
  To: openembedded-core

Select a genericx86-64 target and run
bitbake libcap

This error shows up:
-----------------------------------------------------
pam_cap.c:19:34: fatal error: security/pam_modules.h:
No such file or directory
 #include <security/pam_modules.h>
                                  ^
compilation terminated.
Makefile:23: recipe for target 'pam_cap.o' failed
make[1]: *** [pam_cap.o] Error 1
-----------------------------------------------------

The option PAM_CAP=yes/no is not effectively passed to make.
We change to EXTRA_OEMAKE, instead of EXTRA_OECONF which
PACKAGECONFIG deals with, for this Makefile-based project.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
---
Limited test is performed by building this recipe only.
Refer to the cover letter before merge.

 meta/recipes-support/libcap/libcap_2.25.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-support/libcap/libcap_2.25.bb b/meta/recipes-support/libcap/libcap_2.25.bb
index 8f3f11e..bc29310 100644
--- a/meta/recipes-support/libcap/libcap_2.25.bb
+++ b/meta/recipes-support/libcap/libcap_2.25.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://sites.google.com/site/fullycapable/"
 LICENSE = "BSD | GPLv2"
 LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
 
-DEPENDS = "hostperl-runtime-native"
+DEPENDS = "hostperl-runtime-native ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
            file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
@@ -27,18 +27,17 @@ do_configure() {
 	sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
 }
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
 PACKAGECONFIG_class-native ??= ""
 
 PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
-PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
 
 EXTRA_OEMAKE = " \
   INDENT=  \
   lib=${@os.path.basename('${libdir}')} \
   RAISE_SETFCAP=no \
   DYNAMIC=yes \
+  ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM_CAP=yes', 'PAM_CAP=no', d)} \
 "
 
 EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
-- 
2.7.4



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

* [PATCH 2/2][PROPOSED] libcap: remove dependency on attr
  2016-09-07 21:42 [PATCH 0/2][PROPOSED] libcap fix and update Jianxun Zhang
  2016-09-07 21:42 ` [PATCH 1/2][PROPOSED] libcap: fix compiling issue when not having libpam Jianxun Zhang
@ 2016-09-07 21:42 ` Jianxun Zhang
  2016-09-08  8:43 ` [PATCH 0/2][PROPOSED] libcap fix and update Maxin B. John
  2 siblings, 0 replies; 4+ messages in thread
From: Jianxun Zhang @ 2016-09-07 21:42 UTC (permalink / raw)
  To: openembedded-core

85f38a573fc47472ab792e813b6f6b6f0b1df112 in libcap drops
this dependency. Not seeing much necessity of using
EXTRA_OECONF (which doesn't seem effective) for the left,
we purge these code in libcap recipe.

Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
---
Limited test is performed by building this recipe individually.
Refer to the cover letter before merge.

 meta/recipes-support/libcap/libcap_2.25.bb | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/recipes-support/libcap/libcap_2.25.bb b/meta/recipes-support/libcap/libcap_2.25.bb
index bc29310..3b7876a 100644
--- a/meta/recipes-support/libcap/libcap_2.25.bb
+++ b/meta/recipes-support/libcap/libcap_2.25.bb
@@ -27,11 +27,8 @@ do_configure() {
 	sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
 }
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
 PACKAGECONFIG_class-native ??= ""
 
-PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
-
 EXTRA_OEMAKE = " \
   INDENT=  \
   lib=${@os.path.basename('${libdir}')} \
@@ -46,12 +43,11 @@ EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
 CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
 
 do_compile() {
-	oe_runmake ${EXTRA_OECONF}
+	oe_runmake
 }
 
 do_install() {
 	oe_runmake install \
-		${EXTRA_OECONF} \
 		DESTDIR="${D}" \
 		prefix="${prefix}" \
 		SBINDIR="${sbindir}"
-- 
2.7.4



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

* Re: [PATCH 0/2][PROPOSED] libcap fix and update
  2016-09-07 21:42 [PATCH 0/2][PROPOSED] libcap fix and update Jianxun Zhang
  2016-09-07 21:42 ` [PATCH 1/2][PROPOSED] libcap: fix compiling issue when not having libpam Jianxun Zhang
  2016-09-07 21:42 ` [PATCH 2/2][PROPOSED] libcap: remove dependency on attr Jianxun Zhang
@ 2016-09-08  8:43 ` Maxin B. John
  2 siblings, 0 replies; 4+ messages in thread
From: Maxin B. John @ 2016-09-08  8:43 UTC (permalink / raw)
  To: Jianxun Zhang; +Cc: openembedded-core

Hi,

On Wed, Sep 07, 2016 at 02:42:37PM -0700, Jianxun Zhang wrote:
> Need some experts to review this patch series. I am not really
> sure for if what I fixed is a valid case or if fix is the best
> answer. The validation before submission is very limited too.
> 
> I ran into the compiling issue when build an application and
> found this recipe cannot be built without specifying anything.
> I don't feel the existing options are passed to make with test,
> and guess EXTRA_CONF won't work with this makefile-based project.
> 
> The second patch is a following-up when I saw there is another
> option in the similar situation and seems to be obsolete now.
> 
> Jianxun Zhang (2):
>   libcap: fix compiling issue when not having libpam
>   libcap: remove dependency on attr

I think the libcap build fix is already in master branch now:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b4f2c760aa4e9a92d5ce829136b60ab0ebed186c

Please use the latest master branch and see if you hit this error again.

>  meta/recipes-support/libcap/libcap_2.25.bb | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)

Best Regards,
Maxin


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

end of thread, other threads:[~2016-09-08  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-07 21:42 [PATCH 0/2][PROPOSED] libcap fix and update Jianxun Zhang
2016-09-07 21:42 ` [PATCH 1/2][PROPOSED] libcap: fix compiling issue when not having libpam Jianxun Zhang
2016-09-07 21:42 ` [PATCH 2/2][PROPOSED] libcap: remove dependency on attr Jianxun Zhang
2016-09-08  8:43 ` [PATCH 0/2][PROPOSED] libcap fix and update Maxin B. John

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