Re: [OE-core] [PATCH RESEND] openssl: pass PERL=perl environment variable to configurator

2020-03-10 Thread Ruslan Bilovol via Openembedded-core

On 3/7/20 12:19 AM, Martin Jansa wrote:

This breaks c_rehash calls from dash (works fine with bash)


Yes, we use bach during our builds



dash doesn't like
#!perl
shebang, would
PERL="/usr/bin/env perl"
work for you?

But unfortunately just passing PERL like this doesn't pass do_configure:
Creating Makefile
sh: 1: /usr/bin/env perl: not found
WARNING: exit code 1 from a shell command.

But passing it as:
HASHBANGPERL="/usr/bin/env perl" PERL=perl
seems to work.


Will check this suggestion

Thanks,
Ruslan



On Thu, Mar 5, 2020 at 12:55 PM Ruslan Bilovol via Openembedded-core 
<mailto:openembedded-core@lists.openembedded.org>> wrote:


In our build environment we use wrapper script
for perl in non-standard configuration with
extra variables set (provided by custom
buildtools-tarball).

In this case openssl fails to build because
by default it's Configure script detects and uses
perl executable directly (with absolute path)
obviously missing extra settings from wrapper
script.

Pass PERL=perl environment variable to Configure,
so it won't try to use perl executable directly
but will use what is provided from environment.

Signed-off-by: Ruslan Bilovol mailto:rbilo...@cisco.com>>
---
  meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
<http://openssl_1.1.1d.bb> | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
<http://openssl_1.1.1d.bb>
b/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
<http://openssl_1.1.1d.bb>
index c2ba005f47..d4871fe973 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
<http://openssl_1.1.1d.bb>
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
<http://openssl_1.1.1d.bb>
@@ -123,7 +123,7 @@ do_configure () {
         fi
         # WARNING: do not set compiler/linker flags (-I/-D etc.) in
EXTRA_OECONF, as they will fully replace the
         # environment variables set by bitbake. Adjust the
environment variables instead.
-       PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
+       PERL=perl
PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
         perl ${S}/Configure ${EXTRA_OECONF}
${PACKAGECONFIG_CONFARGS} --prefix=$useprefix
--openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
         perl ${B}/configdata.pm <http://configdata.pm> --dump
  }
-- 
2.17.1


-- 
___

Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
<mailto:Openembedded-core@lists.openembedded.org>
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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


[OE-core] [PATCH RESEND] openssl: pass PERL=perl environment variable to configurator

2020-03-05 Thread Ruslan Bilovol via Openembedded-core
In our build environment we use wrapper script
for perl in non-standard configuration with
extra variables set (provided by custom
buildtools-tarball).

In this case openssl fails to build because
by default it's Configure script detects and uses
perl executable directly (with absolute path)
obviously missing extra settings from wrapper
script.

Pass PERL=perl environment variable to Configure,
so it won't try to use perl executable directly
but will use what is provided from environment.

Signed-off-by: Ruslan Bilovol 
---
 meta/recipes-connectivity/openssl/openssl_1.1.1d.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb 
b/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
index c2ba005f47..d4871fe973 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb
@@ -123,7 +123,7 @@ do_configure () {
fi
# WARNING: do not set compiler/linker flags (-I/-D etc.) in 
EXTRA_OECONF, as they will fully replace the
# environment variables set by bitbake. Adjust the environment 
variables instead.
-   PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
+   PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} 
--prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
perl ${B}/configdata.pm --dump
 }
-- 
2.17.1

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


Re: [OE-core] [PATCH] openssl: pass PERL=perl environment variable to configurator

2020-03-05 Thread Ruslan Bilovol via Openembedded-core

It seems this patch was forgotten and master moved forward.

Will resend it from latest master

Thanks,
Ruslan

On 12/21/18 11:33 PM, Ruslan Bilovol wrote:

In our build environment we use wrapper script
for perl in non-standard configuration with
extra variables set (provided by custom
buildtools-tarball).

In this case openssl fails to build because
by default it's Configure script detects and uses
perl executable directly (with absolute path)
obviously missing extra settings from wrapper
script.

Pass PERL=perl environment variable to Configure,
so it won't try to use perl executable directly
but will use what is provided from environment.

Signed-off-by: Ruslan Bilovol 
---
  meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb 
b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index 5c4e69c..6a72b5c 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -112,7 +112,7 @@ do_configure () {
fi
# WARNING: do not set compiler/linker flags (-I/-D etc.) in 
EXTRA_OECONF, as they will fully replace the
# environment variables set by bitbake. Adjust the environment 
variables instead.
-   PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
+   PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} 
--prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
perl ${B}/configdata.pm --dump
  }


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


Re: [OE-core] [PATCH] kernel-devsrc: support 4.4+ ARM/ARM64 kernels

2020-03-02 Thread Ruslan Bilovol via Openembedded-core

Gentle ping

On 2/14/20 9:24 PM, Ruslan Bilovol wrote:

Linux Kernel 4.4 is an LTS kernel so people may still
build it with OE.

Thus make copying of some files optional:
  - arm64 module.lds file first appeared with kernel v4.6 commit
fd045f6cd98e arm64: add support for module PLTs"
  - arm32 *.tbl files first appeared in kernel v4.10 in
commit 96a8fae0fe09 "ARM: convert to generated
system call tables"

Signed-off-by: Ruslan Bilovol 
---
  meta/recipes-kernel/linux/kernel-devsrc.bb | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 2fa4be67cc..2ac679e204 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -147,7 +147,7 @@ do_install() {
  cp -a --parents arch/arm64/kernel/vdso/note.S $kerneldir/build/
  cp -a --parents arch/arm64/kernel/vdso/gen_vdso_offsets.sh 
$kerneldir/build/
  
-cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/

+cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/ 
2>/dev/null || :
fi
  
  	if [ "${ARCH}" = "powerpc" ]; then

@@ -187,7 +187,7 @@ do_install() {
  
  	# required for generate missing syscalls prepare phase

cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") 
$kerneldir/build
-   cp -a --parents $(find arch/arm -type f -name "*.tbl") $kerneldir/build
+   cp -a --parents $(find arch/arm -type f -name "*.tbl") $kerneldir/build 
2>/dev/null || :
  
  	if [ "${ARCH}" = "x86" ]; then

# files for 'make prepare' to succeed with kernel-devel


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


[OE-core] [PATCH] kernel-devsrc: support 4.4+ ARM/ARM64 kernels

2020-02-14 Thread Ruslan Bilovol via Openembedded-core
Linux Kernel 4.4 is an LTS kernel so people may still
build it with OE.

Thus make copying of some files optional:
 - arm64 module.lds file first appeared with kernel v4.6 commit
   fd045f6cd98e arm64: add support for module PLTs"
 - arm32 *.tbl files first appeared in kernel v4.10 in
   commit 96a8fae0fe09 "ARM: convert to generated
   system call tables"

Signed-off-by: Ruslan Bilovol 
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 2fa4be67cc..2ac679e204 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -147,7 +147,7 @@ do_install() {
 cp -a --parents arch/arm64/kernel/vdso/note.S $kerneldir/build/
 cp -a --parents arch/arm64/kernel/vdso/gen_vdso_offsets.sh 
$kerneldir/build/
 
-cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/
+cp -a --parents arch/arm64/kernel/module.lds $kerneldir/build/ 
2>/dev/null || :
fi
 
if [ "${ARCH}" = "powerpc" ]; then
@@ -187,7 +187,7 @@ do_install() {
 
# required for generate missing syscalls prepare phase
cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") 
$kerneldir/build
-   cp -a --parents $(find arch/arm -type f -name "*.tbl") $kerneldir/build
+   cp -a --parents $(find arch/arm -type f -name "*.tbl") $kerneldir/build 
2>/dev/null || :
 
if [ "${ARCH}" = "x86" ]; then
# files for 'make prepare' to succeed with kernel-devel
-- 
2.17.1

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


Re: [OE-core] [PATCH] kernel-devsrc: copy mmiowb.h and modpost from ${B} of kernel

2020-01-17 Thread Ruslan Bilovol via Openembedded-core

On 9/11/19 2:36 PM, Bruce Ashfield wrote:

On Wed, Sep 11, 2019 at 5:10 AM Hongzhi, Song
 wrote:



On 9/6/19 11:10 AM, Hongzhi, Song wrote:


On 9/4/19 8:34 PM, Bruce Ashfield wrote:

On Wed, Sep 4, 2019 at 6:07 AM Hongzhi, Song
 wrote:


On 9/4/19 11:55 AM, Bruce Ashfield wrote:

On Tue, Sep 3, 2019 at 9:43 PM Hongzhi.Song
 wrote:

There are two errors when compile an out of tree kernel module
using sdk:


This is not universally true. Can you expand on what kernel version
and architectures you are building ? I'm able to build kernel modules
across all the arches I'm currently testing, so I'd like to capture
your exact config in the long log. Neither is the autobuilder showing
any errors.

Hi Bruce,


kernel version: 5.0.19


I met the same issue with modpost recently. This is because kernel 5.0
commit 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=60df1aee2aecb53efb4218b4dfdf7d6c80a5a3de

moved modpost out of 'scripts' target.


Hi Bruce,

I found 2.7 and 2.6 doc all use "make scripts". And now "make scripts"
doesn't work.

Should the doc be change to "make scripts prepare" ?


Yes they should be. We need to open a bug and get ScottR to look into it.

We've (Richard, myself, and others) have been using make scripts
prepare as a requirement for on kernel building for quite some time
now. The docs should reflect this.



Looking at kernel sources, there is better alternative for "make scripts
prepare" requirement: "modules_prepare". It's a special Linux Kernel
target to prepare building external modules.
What it does is actually "scripts+prepare" for older kernels (like 3.10)
and "prepare" (which has "scripts" as indirect dependency) in recent
kernels (v5.4 for example)

So instead of custom "make scripts prepare" lets change it in the doc to
official "modules_prepare" target for modules building preparations.

Any objections?

Thanks,
Ruslan

























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


Re: [OE-core] [PATCH] gzip: add nativesdk support

2019-09-06 Thread Ruslan Bilovol via Openembedded-core

On 9/4/19 2:01 PM, Ross Burton wrote:
On 04/09/2019 11:41, Denys Zagorui -X (dzagorui - GLOBALLOGIC INC at 
Cisco) via Openembedded-core wrote:

Signed-off-by: Denys Zagorui 


Can you check your mailer configuration, as the From: is the mailing 
list, not your email address.  This means the patch doesn't get your 
authorship.


This is OE mailing list specific issue, we can't fix it unfortunately.

This was discussed multiple times before:
http://lists.openembedded.org/pipermail/openembedded-core/2019-March/280394.html

Richard, do you have any updates on this issue?

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


Re: [OE-core] [PATCH] libnss-nisplus: Add recipe

2019-03-15 Thread Ruslan Bilovol via Openembedded-core

On 3/14/19 11:42 PM, Khem Raj wrote:



On Thu, Mar 14, 2019 at 12:43 PM Ruslan Bilovol > wrote:


Same as with libnss-nis - this will substitute
the glibc nisplus module which has been removed

SRCREV points to 1.3 release plus patch on top which
allows to build with recent glibc versions


This looks okay but not
An Oe core candidate to me


This recipe is very similar to libnss-nis which is a part
of OE-Core. Do you mean we need to move both out of
OE-Core (to meta-oe?)

Thanks,
Ruslan





Signed-off-by: Ruslan Bilovol mailto:rbilo...@cisco.com>>
---
  .../libnss-nisplus/libnss-nisplus.bb    
            | 31 ++

  1 file changed, 31 insertions(+)
  create mode 100644
meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb


diff --git a/meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb

b/meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb

new file mode 100644
index 000..2dbeee7
--- /dev/null
+++ b/meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb

@@ -0,0 +1,31 @@
+# Copyright (C) 2019 Ruslan Bilovol mailto:rbilo...@cisco.com>>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "NSS module for glibc, to provide NIS+ support for glibc"
+
+DESCRIPTION = "This package contains the NSS NIS+ plugin for glibc.\
+This code was formerly part of glibc, but is now standalone to\
+be able to link against TI-RPC for IPv6 support."
+
+HOMEPAGE = "https://github.com/thkukuk/libnss_nisplus;
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM =
"file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+SECTION = "libs"
+DEPENDS += "libtirpc libnsl2"
+
+PV = "1.3+git${SRCPV}"
+
+SRCREV = "c6934373c7bac91499ff7bbe7d2439599325ca63"
+
+SRC_URI = "git://github.com/thkukuk/libnss_nisplus
 \
+          "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND += "native nativesdk"
+#
+# We will skip parsing this packagegeoup for non-glibc systems
+#
+COMPATIBLE_HOST_libc-musl = 'null'
-- 
1.9.1



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


[OE-core] [PATCH] libnss-nisplus: Add recipe

2019-03-14 Thread Ruslan Bilovol via Openembedded-core
Same as with libnss-nis - this will substitute
the glibc nisplus module which has been removed

SRCREV points to 1.3 release plus patch on top which
allows to build with recent glibc versions

Signed-off-by: Ruslan Bilovol 
---
 .../libnss-nisplus/libnss-nisplus.bb   | 31 ++
 1 file changed, 31 insertions(+)
 create mode 100644 meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb

diff --git a/meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb 
b/meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb
new file mode 100644
index 000..2dbeee7
--- /dev/null
+++ b/meta/recipes-extended/libnss-nisplus/libnss-nisplus.bb
@@ -0,0 +1,31 @@
+# Copyright (C) 2019 Ruslan Bilovol 
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "NSS module for glibc, to provide NIS+ support for glibc"
+
+DESCRIPTION = "This package contains the NSS NIS+ plugin for glibc.\
+This code was formerly part of glibc, but is now standalone to\
+be able to link against TI-RPC for IPv6 support."
+
+HOMEPAGE = "https://github.com/thkukuk/libnss_nisplus;
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+SECTION = "libs"
+DEPENDS += "libtirpc libnsl2"
+
+PV = "1.3+git${SRCPV}"
+
+SRCREV = "c6934373c7bac91499ff7bbe7d2439599325ca63"
+
+SRC_URI = "git://github.com/thkukuk/libnss_nisplus \
+  "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND += "native nativesdk"
+#
+# We will skip parsing this packagegeoup for non-glibc systems
+#
+COMPATIBLE_HOST_libc-musl = 'null'
-- 
1.9.1

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


Re: [OE-core] [PATCH v3] systemd: fix remaining issues with statx and glibc 2.28+

2019-01-14 Thread Ruslan Bilovol via Openembedded-core

Hi Chen,

Will you pick up this fix? Still don't see it in the master-next

Thanks,
Ruslan

On 12/22/18 1:48 AM, Khem Raj wrote:

On Fri, Dec 21, 2018 at 11:45 AM Ruslan Bilovol  wrote:


Commit 776d14db9589 "systemd: Detect if statx struct is
defined in sys/stat.h" did only a part of work, and systemd
build fails on src/basic/chattr-util.c compilation due to
same statx redefinition issue.
Backport additional patch from systemd master




LGTM


Signed-off-by: Ruslan Bilovol 
---

v3: rebased to recent OE master (again)

v2: rebased to recent OE master, added signoff

  ...-linux-stat.h-check-with-other-checks-and.patch | 78 ++
  meta/recipes-core/systemd/systemd_239.bb   |  1 +
  2 files changed, 79 insertions(+)
  create mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
new file mode 100644
index 000..0db7fce
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
@@ -0,0 +1,78 @@
+From 9c869d08d82c73f62ab3527567858ce4b0cf1257 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= 
+Date: Wed, 18 Jul 2018 17:26:17 +0200
+Subject: [PATCH] meson: unify linux/stat.h check with other checks and use
+ _GNU_SOURCE
+
+Using _GNU_SOURCE is better because that's how we include the headers in the
+actual build, and some headers define different stuff when it is defined.
+sys/stat.h for example defines 'struct statx' conditionally.
+
+Upstream-Status: Backport
+
+Signed-off-by: Ruslan Bilovol 
+---
+ meson.build | 20 ++--
+ src/basic/missing.h |  2 +-
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 68423bd..99035d2 100644
+--- a/meson.build
 b/meson.build
+@@ -421,11 +421,9 @@ decl_headers = '''
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ '''
+ # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
+-# FIXME: these should use -D_GNU_SOURCE, since that is defined at build time
+
+ foreach decl : ['char16_t',
+ 'char32_t',
+@@ -436,13 +434,23 @@ foreach decl : ['char16_t',
+]
+
+ # We get -1 if the size cannot be determined
+-have = cc.sizeof(decl, prefix : decl_headers) > 0
++have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') 
> 0
++
++if decl == 'struct statx'
++if have
++want_linux_stat_h = false
++else
++have = cc.sizeof(decl,
++ prefix : decl_headers + '#include 
',
++ args : '-D_GNU_SOURCE') > 0
++want_linux_stat_h = have
++endif
++endif
++
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
+ endforeach
+
+-conf.set10('HAVE_STRUCT_STATX_IN_SYS_STAT_H', cc.sizeof('struct statx', 
prefix : '''
+-#include 
+-''', args : '-D_GNU_SOURCE') > 0)
++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
+
+ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
+ ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 14ad3d4..9044683 100644
+--- a/src/basic/missing.h
 b/src/basic/missing.h
+@@ -24,7 +24,7 @@
+ #include 
+ #include 
+
+-#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H
++#if WANT_LINUX_STAT_H
+ #include 
+ #endif
+
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_239.bb 
b/meta/recipes-core/systemd/systemd_239.bb
index 03acce2..91a026d 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -37,6 +37,7 @@ SRC_URI += "file://touchscreen.rules \
 file://0001-timesync-changes-type-of-drift_freq-to-int64_t.patch \
 file://0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch \
 file://0002-core-Fix-use-after-free-case-in-load_from_path.patch \
+   
file://0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch \
 "

  # patches made for musl are only applied on TCLIBC is musl
--
1.9.1


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


[OE-core] [PATCH] gdbm: depend on readline

2018-12-21 Thread Ruslan Bilovol via Openembedded-core
This package depends on readline recipe.
In traditional OE build readline is a dependency
of python3 and few other packages, thus at the time
of gdbm build it is available.

However, if some custom set of recipes is build,
there is a race between gdbm and python3 build
and availability of readline isn't deterministic,
causing next build error:
| ../../gdbm-1.18/src/input-rl.c:18:31: fatal error: readline/readline.h: No 
such file or directory
|  #include 
|^
| compilation terminated.

Thus add readline dependency explicitly.

Cudos to Kostiantyn Iarmak  who
found this issue.

Signed-off-by: Ruslan Bilovol 
---
 meta/recipes-support/gdbm/gdbm_1.18.1.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/gdbm/gdbm_1.18.1.bb 
b/meta/recipes-support/gdbm/gdbm_1.18.1.bb
index 16ecc50..215ae47 100644
--- a/meta/recipes-support/gdbm/gdbm_1.18.1.bb
+++ b/meta/recipes-support/gdbm/gdbm_1.18.1.bb
@@ -15,6 +15,8 @@ SRC_URI[sha256sum] = 
"86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f74
 
 inherit autotools gettext texinfo lib_package ptest
 
+DEPENDS += "readline"
+
 # Needed for dbm python module
 EXTRA_OECONF = "-enable-libgdbm-compat"
 
-- 
1.9.1

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


[OE-core] [PATCH] openssl: pass PERL=perl environment variable to configurator

2018-12-21 Thread Ruslan Bilovol via Openembedded-core
In our build environment we use wrapper script
for perl in non-standard configuration with
extra variables set (provided by custom
buildtools-tarball).

In this case openssl fails to build because
by default it's Configure script detects and uses
perl executable directly (with absolute path)
obviously missing extra settings from wrapper
script.

Pass PERL=perl environment variable to Configure,
so it won't try to use perl executable directly
but will use what is provided from environment.

Signed-off-by: Ruslan Bilovol 
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb 
b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index 5c4e69c..6a72b5c 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -112,7 +112,7 @@ do_configure () {
fi
# WARNING: do not set compiler/linker flags (-I/-D etc.) in 
EXTRA_OECONF, as they will fully replace the
# environment variables set by bitbake. Adjust the environment 
variables instead.
-   PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
+   PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} 
--prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
perl ${B}/configdata.pm --dump
 }
-- 
1.9.1

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


[OE-core] [PATCH v3] systemd: fix remaining issues with statx and glibc 2.28+

2018-12-21 Thread Ruslan Bilovol via Openembedded-core
Commit 776d14db9589 "systemd: Detect if statx struct is
defined in sys/stat.h" did only a part of work, and systemd
build fails on src/basic/chattr-util.c compilation due to
same statx redefinition issue.
Backport additional patch from systemd master

Signed-off-by: Ruslan Bilovol 
---

v3: rebased to recent OE master (again)

v2: rebased to recent OE master, added signoff

 ...-linux-stat.h-check-with-other-checks-and.patch | 78 ++
 meta/recipes-core/systemd/systemd_239.bb   |  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
new file mode 100644
index 000..0db7fce
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
@@ -0,0 +1,78 @@
+From 9c869d08d82c73f62ab3527567858ce4b0cf1257 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= 
+Date: Wed, 18 Jul 2018 17:26:17 +0200
+Subject: [PATCH] meson: unify linux/stat.h check with other checks and use
+ _GNU_SOURCE
+
+Using _GNU_SOURCE is better because that's how we include the headers in the
+actual build, and some headers define different stuff when it is defined.
+sys/stat.h for example defines 'struct statx' conditionally.
+
+Upstream-Status: Backport
+
+Signed-off-by: Ruslan Bilovol 
+---
+ meson.build | 20 ++--
+ src/basic/missing.h |  2 +-
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 68423bd..99035d2 100644
+--- a/meson.build
 b/meson.build
+@@ -421,11 +421,9 @@ decl_headers = '''
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ '''
+ # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
+-# FIXME: these should use -D_GNU_SOURCE, since that is defined at build time
+ 
+ foreach decl : ['char16_t',
+ 'char32_t',
+@@ -436,13 +434,23 @@ foreach decl : ['char16_t',
+]
+ 
+ # We get -1 if the size cannot be determined
+-have = cc.sizeof(decl, prefix : decl_headers) > 0
++have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') 
> 0
++
++if decl == 'struct statx'
++if have
++want_linux_stat_h = false
++else
++have = cc.sizeof(decl,
++ prefix : decl_headers + '#include 
',
++ args : '-D_GNU_SOURCE') > 0
++want_linux_stat_h = have
++endif
++endif
++
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
+ endforeach
+ 
+-conf.set10('HAVE_STRUCT_STATX_IN_SYS_STAT_H', cc.sizeof('struct statx', 
prefix : '''
+-#include 
+-''', args : '-D_GNU_SOURCE') > 0)
++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
+ 
+ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
+ ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 14ad3d4..9044683 100644
+--- a/src/basic/missing.h
 b/src/basic/missing.h
+@@ -24,7 +24,7 @@
+ #include 
+ #include 
+ 
+-#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H
++#if WANT_LINUX_STAT_H
+ #include 
+ #endif
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_239.bb 
b/meta/recipes-core/systemd/systemd_239.bb
index 03acce2..91a026d 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -37,6 +37,7 @@ SRC_URI += "file://touchscreen.rules \
file://0001-timesync-changes-type-of-drift_freq-to-int64_t.patch \
file://0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch \
file://0002-core-Fix-use-after-free-case-in-load_from_path.patch \
+   
file://0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch \
"
 
 # patches made for musl are only applied on TCLIBC is musl
-- 
1.9.1

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


[OE-core] [PATCH v2] systemd: fix remaining issues with statx and glibc 2.28+

2018-12-17 Thread Ruslan Bilovol via Openembedded-core
Commit 776d14db9589 "systemd: Detect if statx struct is
defined in sys/stat.h" did only a part of work, and systemd
build fails on src/basic/chattr-util.c compilation due to
same statx redefinition issue.
Backport additional patch from systemd master

Signed-off-by: Ruslan Bilovol 
---

v2: rebased to recent OE master, added signoff

 ...-linux-stat.h-check-with-other-checks-and.patch | 78 ++
 meta/recipes-core/systemd/systemd_239.bb   |  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
new file mode 100644
index 000..0db7fce
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
@@ -0,0 +1,78 @@
+From 9c869d08d82c73f62ab3527567858ce4b0cf1257 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= 
+Date: Wed, 18 Jul 2018 17:26:17 +0200
+Subject: [PATCH] meson: unify linux/stat.h check with other checks and use
+ _GNU_SOURCE
+
+Using _GNU_SOURCE is better because that's how we include the headers in the
+actual build, and some headers define different stuff when it is defined.
+sys/stat.h for example defines 'struct statx' conditionally.
+
+Upstream-Status: Backport
+
+Signed-off-by: Ruslan Bilovol 
+---
+ meson.build | 20 ++--
+ src/basic/missing.h |  2 +-
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 68423bd..99035d2 100644
+--- a/meson.build
 b/meson.build
+@@ -421,11 +421,9 @@ decl_headers = '''
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ '''
+ # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
+-# FIXME: these should use -D_GNU_SOURCE, since that is defined at build time
+ 
+ foreach decl : ['char16_t',
+ 'char32_t',
+@@ -436,13 +434,23 @@ foreach decl : ['char16_t',
+]
+ 
+ # We get -1 if the size cannot be determined
+-have = cc.sizeof(decl, prefix : decl_headers) > 0
++have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') 
> 0
++
++if decl == 'struct statx'
++if have
++want_linux_stat_h = false
++else
++have = cc.sizeof(decl,
++ prefix : decl_headers + '#include 
',
++ args : '-D_GNU_SOURCE') > 0
++want_linux_stat_h = have
++endif
++endif
++
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
+ endforeach
+ 
+-conf.set10('HAVE_STRUCT_STATX_IN_SYS_STAT_H', cc.sizeof('struct statx', 
prefix : '''
+-#include 
+-''', args : '-D_GNU_SOURCE') > 0)
++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
+ 
+ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
+ ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 14ad3d4..9044683 100644
+--- a/src/basic/missing.h
 b/src/basic/missing.h
+@@ -24,7 +24,7 @@
+ #include 
+ #include 
+ 
+-#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H
++#if WANT_LINUX_STAT_H
+ #include 
+ #endif
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_239.bb 
b/meta/recipes-core/systemd/systemd_239.bb
index a40c899..a286927 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -35,6 +35,7 @@ SRC_URI += "file://touchscreen.rules \

file://0001-dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-o.patch \

file://0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch \
file://0001-timesync-changes-type-of-drift_freq-to-int64_t.patch \
+   
file://0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch \
"
 
 # patches made for musl are only applied on TCLIBC is musl
-- 
1.9.1

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


[OE-core] [PATCH] systemd: fix remaining issues with statx and glibc 2.28+

2018-12-17 Thread Ruslan Bilovol via Openembedded-core
Commit 776d14db9589 "systemd: Detect if statx struct is
defined in sys/stat.h" did only a part of work, and systemd
build fails on src/basic/chattr-util.c compilation due to
same statx redefinition issue.
Backport additional patch from systemd master

Signed-off-by: Ruslan Bilovol 
---
 ...-linux-stat.h-check-with-other-checks-and.patch | 76 ++
 meta/recipes-core/systemd/systemd_239.bb   |  1 +
 2 files changed, 77 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
new file mode 100644
index 000..24c3433
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
@@ -0,0 +1,76 @@
+From 9c869d08d82c73f62ab3527567858ce4b0cf1257 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= 
+Date: Wed, 18 Jul 2018 17:26:17 +0200
+Subject: [PATCH] meson: unify linux/stat.h check with other checks and use
+ _GNU_SOURCE
+
+Using _GNU_SOURCE is better because that's how we include the headers in the
+actual build, and some headers define different stuff when it is defined.
+sys/stat.h for example defines 'struct statx' conditionally.
+
+Upstream-Status: Backport
+---
+ meson.build | 20 ++--
+ src/basic/missing.h |  2 +-
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 68423bd..99035d2 100644
+--- a/meson.build
 b/meson.build
+@@ -421,11 +421,9 @@ decl_headers = '''
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ '''
+ # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
+-# FIXME: these should use -D_GNU_SOURCE, since that is defined at build time
+ 
+ foreach decl : ['char16_t',
+ 'char32_t',
+@@ -436,13 +434,23 @@ foreach decl : ['char16_t',
+]
+ 
+ # We get -1 if the size cannot be determined
+-have = cc.sizeof(decl, prefix : decl_headers) > 0
++have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') 
> 0
++
++if decl == 'struct statx'
++if have
++want_linux_stat_h = false
++else
++have = cc.sizeof(decl,
++ prefix : decl_headers + '#include 
',
++ args : '-D_GNU_SOURCE') > 0
++want_linux_stat_h = have
++endif
++endif
++
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
+ endforeach
+ 
+-conf.set10('HAVE_STRUCT_STATX_IN_SYS_STAT_H', cc.sizeof('struct statx', 
prefix : '''
+-#include 
+-''', args : '-D_GNU_SOURCE') > 0)
++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
+ 
+ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
+ ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 14ad3d4..9044683 100644
+--- a/src/basic/missing.h
 b/src/basic/missing.h
+@@ -24,7 +24,7 @@
+ #include 
+ #include 
+ 
+-#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H
++#if WANT_LINUX_STAT_H
+ #include 
+ #endif
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_239.bb 
b/meta/recipes-core/systemd/systemd_239.bb
index c53ce0d..2d5f94b 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -34,6 +34,7 @@ SRC_URI += "file://touchscreen.rules \

file://0001-chown-recursive-let-s-rework-the-recursive-logic-to-.patch \

file://0001-dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-o.patch \

file://0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch \
+   
file://0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch \
"
 
 # patches made for musl are only applied on TCLIBC is musl
-- 
1.9.1

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


Re: [OE-core] Why openembedded-core mailing list is now author of some patches?

2018-10-12 Thread Ruslan Bilovol via Openembedded-core

[CCing more affected people]

On 10/12/2018 04:13 PM, Burton, Ross wrote:

Ironically, this mail is From: Ruslan Bilovol via Openembedded-core.


:D



This is basically due to SPF, and people sending email from
non-authoritive hosts.  Concrete example: Richard Purdie's mail comes
from a machine which the linuxfoundation.org SPF records doesn't
recognise as an authorised sender.


Hmm.. I've just sent an email from rbilo...@cisco.com to another Gmail
address, and Gmail says SPF checks passed:
 SPF:   PASS with IP 173.38.203.51
 DKIM:  'PASS' with domain cisco.com
 DMARC: 'PASS'

Does it mean oe-core mailing list's software is incorrectly configured,
or there is something else missing on @cisco.com side?


  If mailing list software wasn't
such a pain we could stop it doing that, but apparently it is.
Another option would be to patch git to recognise a "via" From and use
the Reply-to field.

We should have a pre-commit hook to be sure that any instances of this
are caught and fixed before being pushed though.


Yes, that would be great.

Thanks,
Ruslan



Ross
On Fri, 12 Oct 2018 at 14:08, Ruslan Bilovol via Openembedded-core
 wrote:


Hi all,

Looking at OE-core history, I see that in some cases
patch' author is incorrect, and actually is
set to openembedded-core@lists.openembedded.org:
http://git.openembedded.org/openembedded-core/log/?qt=author=openembedded-core%40lists.openembedded.org

Moreover, in patchwork many of these patches are mapped
incorrectly to Andrii Bordunov who isn't actually
related to most of them:
https://patchwork.openembedded.org/project/oe-core/patches/?submitter=12919=*==both=

So is something broken in OE mailing list/patchwork?

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

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


[OE-core] Why openembedded-core mailing list is now author of some patches?

2018-10-12 Thread Ruslan Bilovol via Openembedded-core

Hi all,

Looking at OE-core history, I see that in some cases
patch' author is incorrect, and actually is
set to openembedded-core@lists.openembedded.org:
http://git.openembedded.org/openembedded-core/log/?qt=author=openembedded-core%40lists.openembedded.org

Moreover, in patchwork many of these patches are mapped
incorrectly to Andrii Bordunov who isn't actually
related to most of them:
https://patchwork.openembedded.org/project/oe-core/patches/?submitter=12919=*==both=

So is something broken in OE mailing list/patchwork?

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


Re: [OE-core] [PATCH] relocate_sdk.py: remove hardcoded SDK path

2018-07-26 Thread Ruslan Bilovol via Openembedded-core

Hi Richard,

I see I'm too late and the patch is already reverted. I'll
update it and push again later then.

Thanks,
Ruslan

On 07/25/2018 06:44 PM, Richard Purdie wrote:

Whilst we merged this, it has unfortunately totally broken uninative-
tarball. We're under pressure to update to a new uninative to unbreak
builds on recent distros with sstate sharing and this now blocks doing
so.

I can't add the value to the relocate_sdk.py call from
uninative.bbclass since I don't know what value the tarball would have
been generated with.

I suspect I'll have to revert this and then you can work on a way to
fix this...

Cheers,

Richard

On Tue, 2018-07-17 at 08:22 -0700, Christopher Larson wrote:

IMHO this is a solid improvement that should go in.

On Tue, Jul 17, 2018 at 8:09 AM Ruslan Bilovol via Openembedded-core
 wrote:

Hi all,

Any comments on this patch?

Thanks
Ruslan

On 11/22/2017 01:20 PM, Ruslan Bilovol wrote:

This patch removes hardcodes added to relocate_sdk.py
during SDK build, making it flexible and reusable.
Now default SDK path is passed to the script as
parameter rather then harcoded inside it.

This allows to reuse this script for multiple
relocations, and adds possibility to relocate
SDK multiple times

Signed-off-by: Ruslan Bilovol 
---
   meta/classes/populate_sdk_base.bbclass |  5 -
   meta/files/toolchain-shar-relocate.sh  |  2 +-
   scripts/relocate_sdk.py| 17 +
   3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass

b/meta/classes/populate_sdk_base.bbclass

index 424c63c..e7aa5a8 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -152,11 +152,6 @@ do_populate_sdk[stamp-extra-info] =

"${MACHINE}${SDKMACHINE}"
   
   fakeroot create_sdk_files() {

   cp ${COREBASE}/scripts/relocate_sdk.py

${SDK_OUTPUT}/${SDKPATH}/

-
- # Replace the ##DEFAULT_INSTALL_DIR## with the correct

pattern.

- # Escape special characters like '+' and '.' in the SDKPATH
- escaped_sdkpath=$(echo ${SDKPATH} |sed -e

"s:[\+\.]:\0:g")

- sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:"

${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py

   }
   
   python check_sdk_sysroots() {

diff --git a/meta/files/toolchain-shar-relocate.sh

b/meta/files/toolchain-shar-relocate.sh

index e3c1001..f82ff2b 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -36,7 +36,7 @@ if [ x\${PYTHON} = "x"  ]; then
   echo "SDK could not be relocated.  No python found."
   exit 1
   fi
-\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py

$target_sdk_dir $dl_path $executable_files

+\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py

$DEFAULT_INSTALL_DIR $target_sdk_dir $dl_path $executable_files

   EOF
   
   $SUDO_EXEC mv $tdir/relocate_sdk.sh

${env_setup_script%/*}/relocate_sdk.sh

diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index c752fa2..0d5a6f5 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -38,8 +38,6 @@ else:
   def b(x):
   return x.encode(sys.getfilesystemencoding())
   
-old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##"))

-
   def get_arch():
   f.seek(0)
   e_ident =f.read(16)
@@ -212,19 +210,22 @@ def change_dl_sysdirs(elf_file_name):
   f.write(sysdirslen)
   
   # MAIN

-if len(sys.argv) < 4:
+if len(sys.argv) < 5:
   sys.exit(-1)
   
   # In python > 3, strings may also contain Unicode characters.

So, convert

   # them to bytes
   if sys.version_info < (3,):
-new_prefix = sys.argv[1]
-new_dl_path = sys.argv[2]
+new_prefix = sys.argv[2]
+new_dl_path = sys.argv[3]
   else:
-new_prefix = sys.argv[1].encode()
-new_dl_path = sys.argv[2].encode()
+new_prefix = sys.argv[2].encode()
+new_dl_path = sys.argv[3].encode()
+
+executables_list = sys.argv[4:]
   
-executables_list = sys.argv[3:]

+old_prefix_ne = b(sys.argv[1])
+old_prefix = re.compile(re.escape(old_prefix_ne));
   
   for e in executables_list:

   perms = os.stat(e)[stat.ST_MODE]


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




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


Re: [OE-core] [PATCH] relocate_sdk.py: remove hardcoded SDK path

2018-07-17 Thread Ruslan Bilovol via Openembedded-core

Hi all,

Any comments on this patch?

Thanks
Ruslan

On 11/22/2017 01:20 PM, Ruslan Bilovol wrote:

This patch removes hardcodes added to relocate_sdk.py
during SDK build, making it flexible and reusable.
Now default SDK path is passed to the script as
parameter rather then harcoded inside it.

This allows to reuse this script for multiple
relocations, and adds possibility to relocate
SDK multiple times

Signed-off-by: Ruslan Bilovol 
---
  meta/classes/populate_sdk_base.bbclass |  5 -
  meta/files/toolchain-shar-relocate.sh  |  2 +-
  scripts/relocate_sdk.py| 17 +
  3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index 424c63c..e7aa5a8 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -152,11 +152,6 @@ do_populate_sdk[stamp-extra-info] = 
"${MACHINE}${SDKMACHINE}"
  
  fakeroot create_sdk_files() {

cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
-
-   # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
-   # Escape special characters like '+' and '.' in the SDKPATH
-   escaped_sdkpath=$(echo ${SDKPATH} |sed -e "s:[\+\.]:\0:g")
-   sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" 
${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py
  }
  
  python check_sdk_sysroots() {

diff --git a/meta/files/toolchain-shar-relocate.sh 
b/meta/files/toolchain-shar-relocate.sh
index e3c1001..f82ff2b 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -36,7 +36,7 @@ if [ x\${PYTHON} = "x"  ]; then
echo "SDK could not be relocated.  No python found."
exit 1
  fi
-\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path 
$executable_files
+\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $DEFAULT_INSTALL_DIR 
$target_sdk_dir $dl_path $executable_files
  EOF
  
  $SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh

diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index c752fa2..0d5a6f5 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -38,8 +38,6 @@ else:
  def b(x):
  return x.encode(sys.getfilesystemencoding())
  
-old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##"))

-
  def get_arch():
  f.seek(0)
  e_ident =f.read(16)
@@ -212,19 +210,22 @@ def change_dl_sysdirs(elf_file_name):
  f.write(sysdirslen)
  
  # MAIN

-if len(sys.argv) < 4:
+if len(sys.argv) < 5:
  sys.exit(-1)
  
  # In python > 3, strings may also contain Unicode characters. So, convert

  # them to bytes
  if sys.version_info < (3,):
-new_prefix = sys.argv[1]
-new_dl_path = sys.argv[2]
+new_prefix = sys.argv[2]
+new_dl_path = sys.argv[3]
  else:
-new_prefix = sys.argv[1].encode()
-new_dl_path = sys.argv[2].encode()
+new_prefix = sys.argv[2].encode()
+new_dl_path = sys.argv[3].encode()
+
+executables_list = sys.argv[4:]
  
-executables_list = sys.argv[3:]

+old_prefix_ne = b(sys.argv[1])
+old_prefix = re.compile(re.escape(old_prefix_ne));
  
  for e in executables_list:

  perms = os.stat(e)[stat.ST_MODE]


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