[OE-core] [PATCH] pinentry: update 0.9

2014-11-01 Thread Armin Kuster
removed  some EXTRA_OECONF to  fix:
WARNING: QA Issue: pinentry: configure was passed unrecognised options: 
--disable-glibtest --disable-pinentry-gtk --disable-pinentry-qt 
[unknown-configure-option]

Signed-off-by: Armin Kuster 
---
 .../pinentry/{pinentry_0.8.4.bb => pinentry_0.9.0.bb}| 12 
 1 file changed, 4 insertions(+), 8 deletions(-)
 rename meta/recipes-support/pinentry/{pinentry_0.8.4.bb => pinentry_0.9.0.bb} 
(78%)

diff --git a/meta/recipes-support/pinentry/pinentry_0.8.4.bb 
b/meta/recipes-support/pinentry/pinentry_0.9.0.bb
similarity index 78%
rename from meta/recipes-support/pinentry/pinentry_0.8.4.bb
rename to meta/recipes-support/pinentry/pinentry_0.9.0.bb
index acc6992..68d2478 100644
--- a/meta/recipes-support/pinentry/pinentry_0.8.4.bb
+++ b/meta/recipes-support/pinentry/pinentry_0.9.0.bb
@@ -10,17 +10,13 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
 
 inherit autotools-brokensep
 
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
-   "
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2";
 
-SRC_URI[md5sum] = "e2b6f94471ba1e978f6e5bf6b275189b"
-SRC_URI[sha256sum] = 
"359db3bf46cb743ba0b3aeef259f6107271ca888ba3e22c1cba525c9aca35612"
+SRC_URI[md5sum] = "40a05856cb3accf6679987b7899b0f5a"
+SRC_URI[sha256sum] = 
"90045a07ab8e1a8e1ecf5d19b51691f195525e579fa5d71d7e92c120b05490ab"
 
 EXTRA_OECONF = "--disable-rpath \
-   --disable-dependency-tracking \
-   --disable-glibtest \
-   --disable-pinentry-gtk \
-   --disable-pinentry-qt \
+   --disable-dependency-tracking \
"
 
 PACKAGECONFIG ??= "ncurses libcap"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/3] pseudo+image.bbclass: changes to avoid host contamination

2014-11-01 Thread Peter A. Bigot

On 10/31/2014 11:15 PM, Peter A. Bigot wrote:

On 10/13/2014 05:35 PM, Peter Seebach wrote:

On Mon, 13 Oct 2014 17:29:26 -0500
"Peter A. Bigot"  wrote:


Basically, even if "root" is a special case, taking this path means
making assumptions about what the application is doing based on what
system/libc functions it invokes.  Too often when somebody assumes a
general tool will only be used specific ways, somebody else will prove
them wrong.

True.

For the oe-core case, it seems like it might be reasonable for us to set
pseudo up to, by default, get configured with preloaded things which 
match

the expected configuration of base-passwd. If people then go overriding
base-passwd in strange ways, they could break that, but we at least 
know what
the default configuration would be, and could possibly even make 
base-passwd

check whether pseudo's configuration matches its answers, and blow up if
there's a mismatch there.


I've discovered a few more cases where OE packages get the wrong 
target username/group for files, at least in RPM packages.


First, revisiting the discussion above I've played with using 
--without-passwd-fallback and adding base-passwd as an explicit 
dependency. This won't work: glibc-initial requires base-passwd for 
group name lookups, and base-passwd includes update-passwd as an 
executable which requires glibc.


The options seem to be to split base-passwd into separate recipes for 
the data files and the utility to break the circular dependency, or 
having pseudo synthesize a fallback passwd/group. Prior to gaining 
experience I didn't like the second choice, but I like the first even 
less.  As long as pseudo emits a note saying what it's doing so we can 
add the DEPENDS=base-passwd where that's not circular (as with 
tzdata), my vote goes toward pseudo synthesis. I'm hoping somebody 
disagrees and comes up with a better, third alternative.


I did find an alternative, and the patches to enforce 
--without-passwd-fallback have been posted.




However, I've also discovered another issue, possibly related to: 
http://lists.openembedded.org/pipermail/openembedded-core/2011-December/053866.html 



On my development machine my uid:gid are both 1000 and correspond to 
pab:pab.  Using poky master with MACHINE=beaglebone building 
core-image-sato the corresponding user:group is xuser:xuser.


Running the following script:

find tmp/deploy/ -name '*.rpm' \
  | while read f ; do \
rpm -qlvp ${f} 2>/dev/null \
  | awk '$3~/pab|xuser/ || $4~/pab|xuser/ {print;}' \
  > /tmp/c$$ ; \
if [ -s /tmp/c$$ ] ; then \
  echo ; \
  echo $f; \
  cat /tmp/c$$ ; \
fi ; \
  done

I find the following packages include files that are given group or 
user xuser, indicating that the files were installed with user:group 
set to the host value 1000:1000 instead of being remapped to 0:0 by 
pseudo, but when packaging pseudo does "correctly" interpret the 
uid:gid using the target passwd/group files:


tmp/deploy/rpm/cortexa8hf_vfp_neon/attr-ptest-2.4.47-r0.0.cortexa8hf_vfp_neon.rpm 

tmp/deploy/rpm/cortexa8hf_vfp_neon/acl-ptest-2.2.52-r0.0.cortexa8hf_vfp_neon.rpm 

tmp/deploy/rpm/cortexa8hf_vfp_neon/systemd-216+git0+5d0ae62c66-r0.0.cortexa8hf_vfp_neon.rpm 

tmp/deploy/rpm/cortexa8hf_vfp_neon/perl-ptest-5.20.0-r1.0.cortexa8hf_vfp_neon.rpm 



For example:

llc[11]$ rpm -qlvp 
tmp/deploy/rpm/cortexa8hf_vfp_neon/perl-ptest-5.20.0-r1.0.cortexa8hf_vfp_neon.rpm
-r--r--r--1 xuser   xuser   45590 May 26 08:34 
/usr/lib/perl/ptest/AUTHORS
-r--r--r--1 xuser   xuser6321 Jan 31  2014 
/usr/lib/perl/ptest/Artistic
-r--r--r--1 xuser   xuser3168 Jan 31  2014 
/usr/lib/perl/ptest/Changes
-r-xr-xr-x1 xuser   xuser  552838 Oct 31 15:34 
/usr/lib/perl/ptest/Configure


The issue of the underlying gid not being correct are still present.  It 
is non-deterministic, and may or may not be happening with uid as well.  
It does seem to happen most with *-ptest-* recipes and others that 
install files probably whole-directory-at-a-time.



Further, this one even manages to get the user:group names from the host:

llc[12]$ rpm -qlvp 
tmp/deploy/rpm/cortexa8hf_vfp_neon/libgcc-s-dev-4.9.1-r0.0.cortexa8hf_vfp_neon.rpm 
| grep pab
lrwxrwxrwx1 pab pab22 Oct 31 15:17 
/usr/lib/arm-poky-linux -> arm-poky-linux-gnueabi


This problem was fixed by eliminating host fallback.

Peter

My tentative conclusion is that these new behaviors aren't related to 
the pseudo falling back to host /etc files, but probably instead by 
files getting installed (and in one case somehow packaged) without 
using pseudo.  I have no idea why that's happening, but it does appear 
something's not working right.


Peter



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/3] pseudo: provide fallback passwd and group files

2014-11-01 Thread Peter A. Bigot
Normally pseudo is built with --without-passwd-fallback, which requires
that somebody provide target passwd and group files.  Those come from
base-passwd in OE, but base-passwd cannot be built without first
invoking operations under pseudo that require getpw*/getgr*.

Provide the absolute minimum stub files, matching in content what will
eventually be on the target, that can be used in the cases where the
target files are not yet available.  The requirements for minimum stub
are the usernames and groups identified in meta/files/fs-perms.txt.

Signed-off-by: Peter A. Bigot 
---
 meta/recipes-devtools/pseudo/files/fallback-group  | 2 ++
 meta/recipes-devtools/pseudo/files/fallback-passwd | 1 +
 meta/recipes-devtools/pseudo/pseudo_1.6.2.bb   | 8 
 3 files changed, 11 insertions(+)
 create mode 100644 meta/recipes-devtools/pseudo/files/fallback-group
 create mode 100644 meta/recipes-devtools/pseudo/files/fallback-passwd

diff --git a/meta/recipes-devtools/pseudo/files/fallback-group 
b/meta/recipes-devtools/pseudo/files/fallback-group
new file mode 100644
index 000..81bf732
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/fallback-group
@@ -0,0 +1,2 @@
+root:*:0:
+mail:*:8:
diff --git a/meta/recipes-devtools/pseudo/files/fallback-passwd 
b/meta/recipes-devtools/pseudo/files/fallback-passwd
new file mode 100644
index 000..c1458dc
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/fallback-passwd
@@ -0,0 +1 @@
+root::0:0:root:/home/root:/bin/sh
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb 
b/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
index fb85f89..95fd2b8 100644
--- a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
@@ -5,9 +5,17 @@ SRC_URI = " \
 file://0001-pseudo_client.c-protect-pwd_lck-against-magic.patch \
 file://0002-pseudo_util-modify-interface-to-pseudo_etc_file.patch \
 file://0003-pseudo_client.c-support-multiple-directories-in-PSEU.patch \
+file://fallback-passwd \
+file://fallback-group \
 "
 
 SRC_URI[md5sum] = "4d7b4f9d1b4aafa680ce94a5a9a52f1f"
 SRC_URI[sha256sum] = 
"c72be92689511ced7c419149c6aaa1b1a9e4dfc6409d1f16ab72cc35bc1e376a"
 
 PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+
+do_install_append_class-native () {
+   install -d ${D}${sysconfdir}
+   install -m 644 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
+   install -m 644 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
+}
-- 
1.8.5.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3] pseudo: default --without-passwd-fallback

2014-11-01 Thread Peter A. Bigot
No good reason exists to fall back to the build host /etc files when
attempting to resolve user and group information.  Recipe dependencies
should be updated so the correct target files are available.

Signed-off-by: Peter A. Bigot 
---
 meta/recipes-devtools/pseudo/pseudo_1.6.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb 
b/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
index 78eeedf..fb85f89 100644
--- a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
@@ -10,4 +10,4 @@ SRC_URI = " \
 SRC_URI[md5sum] = "4d7b4f9d1b4aafa680ce94a5a9a52f1f"
 SRC_URI[sha256sum] = 
"c72be92689511ced7c419149c6aaa1b1a9e4dfc6409d1f16ab72cc35bc1e376a"
 
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async"
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
-- 
1.8.5.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/3] bitbake.conf: pseudo fall back to last-resort passwd files

2014-11-01 Thread Peter A. Bigot
Recipe packaging for the target requires permissions that are consistent
with meta/files/fs-perms.txt which specifies certain user and group
names.  In the early parts of a target build base-passwd is not yet
available to provide the target /etc files used for user/group lookup.
Allow pseudo to fall-back to the last-resort files it installs if the
target ones aren't there yet.

Signed-off-by: Peter A. Bigot 
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 2a8a37f..0ccaac0 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -586,7 +586,7 @@ SRC_URI = ""
 
 # Use pseudo as the fakeroot implementation
 PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
-PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}"
+PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}"
 export PSEUDO_DISABLED = "1"
 #export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
 #export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
-- 
1.8.5.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/3] prevent pseudo host passwd/group contamination

2014-11-01 Thread Peter A. Bigot
I don't have my -contrib accounts yet so can't do pull requests, but
these are simple.

These patches build on the following unmerged fixes for pseudo's support
for --without-passwd-fallback:

  http://patches.openembedded.org/patch/81591/
  http://patches.openembedded.org/patch/81593/
  http://patches.openembedded.org/patch/81595/

The new patches use --without-passwd-fallback, preventing contamination
from the host files during the early build stages when the target
versions from base-passwd aren't yet available.

Experimentation with adding an explicit DEPENDS="base-passwd" showed
that approach would touch a large number of recipes.  For some of those
recipes, the dependency became circular because base-passwd includes a
target utility program that can't be built without glibc and other files
that can't be installed without the ability to look up user and group
names.

The solution chosen is to use the capability in the previous patches to
install last-resort passwd and group in ${STAGING_DIR_NATIVE}, and use
those only when the files are not present in ${STAGING_DIR_TARGET}.  The
last-resort files must contain the usernames (root) and groups (root,
mail) that are specified in meta/files/fs-perms.txt so that packaging
succeeds.  Only names required for a successful build have been provided
in these fall-back files, and the id values match those in the
base-passwd files.

I've done a clean (no sstate) core-image-sato build in poky for
beaglebone+systemd with no issues.  Further, with this patch the true
host uid/username/gid/groupname contamination noted in my email last
night has been eliminated.  Unfortunately there are still cases where
the build system gid ends up as the gid of installed files.

I believe that any issues that do arise will represent a true dependency
on base-passwd that should be added to the failing recipe.

Peter A. Bigot (3):
  pseudo: default --without-passwd-fallback
  pseudo: provide fallback passwd and group files
  bitbake.conf: pseudo fall back to last-resort passwd files

 meta/conf/bitbake.conf |  2 +-
 meta/recipes-devtools/pseudo/files/fallback-group  |  2 ++
 meta/recipes-devtools/pseudo/files/fallback-passwd |  1 +
 meta/recipes-devtools/pseudo/pseudo_1.6.2.bb   | 10 +-
 4 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/pseudo/files/fallback-group
 create mode 100644 meta/recipes-devtools/pseudo/files/fallback-passwd

-- 
1.8.5.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] package_manager: Fix populate_sdk for dpkg packages

2014-11-01 Thread Ricardo Ribalda Delgado
Without this patch:

ERROR: Unable to install packages. Command 
'/var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/sysroots/x86_64-linux/usr/bin/apt-get
  install --force-yes --allow-unauthenticated nativesdk-packagegroup-sdk-host 
packagegroup-cross-canadian-qt5022' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
W: Unable to read 
/var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/meta-toolchain/1.0-r7/apt-sdk/preferences.d/
 - DirectoryExists (2: No such file or directory)
E: Unable to locate package nativesdk-packagegroup-sdk-host
E: Unable to locate package packagegroup-cross-canadian-qt5022

ERROR: Function failed: do_populate_sdk
ERROR: Logfile of failure stored in: 
/var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/meta-toolchain/1.0-r7/temp/log.do_populate_sdk.4926
NOTE: recipe meta-toolchain-1.0-r7: task do_populate_sdk: Failed
ERROR: Task 7 
(/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/meta/recipes-core/meta/meta-toolchain.bb,
 do_populate_sdk) failed with exit code '1'
Signed-off-by: Ricardo Ribalda Delgado 
---

Tested on yocto 1.7

Only build test, not tested on target.

 meta/lib/oe/package_manager.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 27fdf26..8828bce 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -188,7 +188,7 @@ class DpkgIndexer(Indexer):
 release.write("Label: %s\n" % arch)
 
 cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
-
+
 index_cmds.append(cmd)
 
 deb_dirs_found = True
@@ -1467,6 +1467,7 @@ class DpkgPM(PackageManager):
 def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
 super(DpkgPM, self).__init__(d)
 self.target_rootfs = target_rootfs
+self.pkg_archs = archs
 self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB', True)
 if apt_conf_dir is None:
 self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
@@ -1662,7 +1663,7 @@ class DpkgPM(PackageManager):
 bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/")
 
 arch_list = []
-for arch in self.all_arch_list:
+for arch in self.pkg_archs.split():
 if not os.path.exists(os.path.join(self.deploy_dir, arch)):
 continue
 arch_list.append(arch)
-- 
2.1.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core