[poky] Small Patches to Poky
Michael Eden
themichaeleden at gmail.com
Wed Nov 28 07:45:38 PST 2018
Hi all,
Forgive me because I'm new, but I'm currently I'm maintaining 2
patches to issues that I'd like to officially fix.
The first is more of a convenience and changes `cp` to `cp -f` since
I've noticed that this operation sometimes fails (if the file already
exists):
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index cc857acc3e..0e234fae42 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -202,7 +202,7 @@ autotools_do_configure() {
fi
elif [ "${BPN}" != "gettext" ] && grep -q
"^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
# We'd call gettextize here if it wasn't so broken...
- cp
${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
+ cp -f
${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
if [ -d ${S}/po/ ]; then
cp -f
${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
if [ ! -e ${S}/po/remove-potcdate.sin ]; then
The second is more complex and I've been using the following workaround:
diff --git a/meta/classes/useradd_base.bbclass
b/meta/classes/useradd_base.bbclass
index 551c82c322..ef27ae6cae 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -34,6 +34,7 @@ perform_useradd () {
local username=`echo "$opts" | awk '{ print $NF }'`
local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
if test "x$user_exists" = "x"; then
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib"
eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO
useradd \$opts\" || true
user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
if test "x$user_exists" = "x"; then
The above is needed because useradd (native) depends on libattr.so.1
which is _not_ built and put in the native-sysroot.
Somewhere an attr-native dependency has to be added but I'm not sure
where since this is a class that can be inherited into many recipes.
I worked around this by installing attr on my machine and adding the
correct path to LD_LIBRARY_PATH.
I'd appreciate help in debugging and submitting the updated useradd
class to sumo.
Best,
Michael Eden
More information about the poky
mailing list