All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serf: cleanup recipe
@ 2019-06-13  0:01 Anuj Mittal
  2019-06-17 18:59 ` Martin Jansa
  2019-06-18 19:30 ` ✗ patchtest: failure for serf: cleanup recipe (rev2) Patchwork
  0 siblings, 2 replies; 8+ messages in thread
From: Anuj Mittal @ 2019-06-13  0:01 UTC (permalink / raw)
  To: openembedded-core

* Inherit scons bbclass and use the task definitions from there.
* Remove the DEPENDS on python3-scons-native that is already present in
scons class.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 meta/recipes-support/serf/serf_1.3.9.bb | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb
index 706c86be47..92cd5ca061 100644
--- a/meta/recipes-support/serf/serf_1.3.9.bb
+++ b/meta/recipes-support/serf/serf_1.3.9.bb
@@ -14,18 +14,19 @@ SRC_URI[sha256sum] = "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
-DEPENDS = "python3-scons-native openssl apr apr-util util-linux expat"
+inherit scons
 
-do_compile() {
-	${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
-		CC="${CC}" \
-		APR=`which apr-1-config` APU=`which apu-1-config` \
-		CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
-		OPENSSL="${STAGING_EXECPREFIXDIR}"
-}
+DEPENDS += " openssl apr apr-util util-linux expat"
 
-do_install() {
-	${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} LIBDIR=${D}${libdir} install
-}
+EXTRA_OESCONS = " \
+                  LIBDIR=${libdir} \
+                  --install-sandbox=${D} \
+                  CC="${CC}" \
+                  CFLAGS="${CFLAGS}" \
+                  LINKFLAGS="${LDFLAGS}" \
+                  APR=`which apr-1-config` \
+                  APU=`which apu-1-config` \
+                  OPENSSL="${STAGING_EXECPREFIXDIR}" \
+                  "
 
 BBCLASSEXTEND = "native"
-- 
2.20.1



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

* Re: [PATCH] serf: cleanup recipe
  2019-06-13  0:01 [PATCH] serf: cleanup recipe Anuj Mittal
@ 2019-06-17 18:59 ` Martin Jansa
  2019-06-18 19:09   ` [PATCH] serf: stop scons trying to create directories in hosts rootfs Martin Jansa
  2019-06-18 21:45   ` [PATCHv2] " Martin Jansa
  2019-06-18 19:30 ` ✗ patchtest: failure for serf: cleanup recipe (rev2) Patchwork
  1 sibling, 2 replies; 8+ messages in thread
From: Martin Jansa @ 2019-06-17 18:59 UTC (permalink / raw)
  To: Anuj Mittal; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 5762 bytes --]

Hello, now serf is failing to build here:


DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are
['TOPDIR/oe-core/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-core/util-linux/util-linux_2.33.2.bb:do_populate_sysroot',
'virtual:native:TOPDIR/oe-core/meta/recipes-devtools/python/python3_3.7.3.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-core/expat/expat_2.2.6.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-core/glibc/glibc_2.29.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-support/apr/apr_1.7.0.bb:do_populate_sysroot',
'virtual:native:TOPDIR/oe-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-devtools/gcc/gcc-cross_9.1.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-support/apr/apr-util_1.6.1.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-devtools/python/python3-scons-native_3.0.5.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb:do_populate_sysroot',
'TOPDIR/oe-core/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot',
'virtual:native:TOPDIR/oe-core/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb:
do_populate_sysroot']
NOTE: Installed into sysroot: ['pseudo-native']
NOTE: Skipping as already exists in sysroot: ['gcc-runtime', 'util-linux',
'python3-native', 'expat', 'glibc', 'apr', 'gcc-cross-x86_64', 'apr-util',
'python3-scons-native', 'openssl', 'quilt-native',
'icecc-create-env-native', 'linux-libc-headers', 'libgcc',
'bash-completion', 'zlib', 'opkg-utils', 'libxcrypt', 'ncurses',
'gmp-native', 'libmpc-native', 'autoconf-native', 'zlib-native',
'mpfr-native', 'gnu-config-native', 'automake-native', 'libtool-native',
'xz-native', 'binutils-cross-x86_64', 'texinfo-dummy-native',
'flex-native', 'gdbm', 'libtirpc-native', 'sqlite3-native',
'util-linux-native', 'libffi-native', 'gdbm-native', 'bzip2-native',
'pkgconfig-native', 'readline-native', 'openssl-native', 'libnsl2-native',
'm4-native', 'gettext-minimal-native', 'ncurses-native']
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_install
scons: Reading SConscript files ...
PermissionError: [Errno 13] Permission denied: '/usr/lib64':
  File
"TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct",
line 158:
    ENV = os.environ,
  File
"/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py",
line 965:
    variables.Update(self)
  File
"/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py",
line 227:
    option.validator(option.key, env.subst('${%s}'%option.key), env)
  File
"TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct",
line 60:
    return PathVariable.PathIsDirCreate(key, val, env)
  File
"/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py",
line 101:
    os.makedirs(val)
  File
"TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py",
line 221:
    mkdir(name, mode)
ERROR: scons install execution failed.
WARNING: exit code 1 from a shell command.

Maybe it fails only with multilib enabled, but it wasn't failing before the
cleanup.

Anyone else seeing this?

On Thu, Jun 13, 2019 at 2:01 AM Anuj Mittal <anuj.mittal@intel.com> wrote:

> * Inherit scons bbclass and use the task definitions from there.
> * Remove the DEPENDS on python3-scons-native that is already present in
> scons class.
>
> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> ---
>  meta/recipes-support/serf/serf_1.3.9.bb | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/meta/recipes-support/serf/serf_1.3.9.bb
> b/meta/recipes-support/serf/serf_1.3.9.bb
> index 706c86be47..92cd5ca061 100644
> --- a/meta/recipes-support/serf/serf_1.3.9.bb
> +++ b/meta/recipes-support/serf/serf_1.3.9.bb
> @@ -14,18 +14,19 @@ SRC_URI[sha256sum] =
> "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf
>  LICENSE = "Apache-2.0"
>  LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
>
> -DEPENDS = "python3-scons-native openssl apr apr-util util-linux expat"
> +inherit scons
>
> -do_compile() {
> -       ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
> -               CC="${CC}" \
> -               APR=`which apr-1-config` APU=`which apu-1-config` \
> -               CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
> -               OPENSSL="${STAGING_EXECPREFIXDIR}"
> -}
> +DEPENDS += " openssl apr apr-util util-linux expat"
>
> -do_install() {
> -       ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix}
> LIBDIR=${D}${libdir} install
> -}
> +EXTRA_OESCONS = " \
> +                  LIBDIR=${libdir} \
> +                  --install-sandbox=${D} \
> +                  CC="${CC}" \
> +                  CFLAGS="${CFLAGS}" \
> +                  LINKFLAGS="${LDFLAGS}" \
> +                  APR=`which apr-1-config` \
> +                  APU=`which apu-1-config` \
> +                  OPENSSL="${STAGING_EXECPREFIXDIR}" \
> +                  "
>
>  BBCLASSEXTEND = "native"
> --
> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 7651 bytes --]

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

* [PATCH] serf: stop scons trying to create directories in hosts rootfs
  2019-06-17 18:59 ` Martin Jansa
@ 2019-06-18 19:09   ` Martin Jansa
  2019-06-18 19:13     ` Khem Raj
  2019-06-18 19:23     ` Burton, Ross
  2019-06-18 21:45   ` [PATCHv2] " Martin Jansa
  1 sibling, 2 replies; 8+ messages in thread
From: Martin Jansa @ 2019-06-18 19:09 UTC (permalink / raw)
  To: openembedded-core

* since 1522f09a4d serf: cleanup recipe
  serf.do_install fails in builds with multilib enabled (with
  libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)

DEBUG: Executing shell function do_install
scons: Reading SConscript files ...
PermissionError: [Errno 13] Permission denied: '/usr/lib64':
  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
    ENV = os.environ,
  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
    variables.Update(self)
  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
    option.validator(option.key, env.subst('${%s}'%option.key), env)
  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
    return PathVariable.PathIsDirCreate(key, val, env)
  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
    os.makedirs(val)
  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
    mkdir(name, mode)
ERROR: scons install execution failed.

* I don't know how exactly --install-sandbox is supposed to work but
  in this case it's trying to mkdir /usr/lib64 on the host rootfs
  which is clearly wrong and if I set LIBDIR together with
  --install-sandbox then the install paths are prefixed with $D twice
  in some cases (not for includedir and empty libdir at the end).
  So in the end I think it was an issue caused by the custom path
  validator in serf's SConstruct, removing that stops touching host
  and the installed paths (including the paths inside libserf*.pc)
  look correct

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...ories.without.sandbox-install.prefix.patch | 34 +++++++++++++++++++
 meta/recipes-support/serf/serf_1.3.9.bb       |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch

diff --git a/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
new file mode 100644
index 0000000000..bfb2f5a2aa
--- /dev/null
+++ b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
@@ -0,0 +1,34 @@
+--- ../1.3.9-r0-bad-double/serf-1.3.9/SConstruct	2019-06-18 15:49:19.968961108 +0000
++++ serf-1.3.9/SConstruct	2019-06-18 18:53:21.412337151 +0000
+@@ -51,17 +51,6 @@
+     """
+     return (key, '%s' % (help), default, None, lambda val: _converter(val))
+ 
+-# Custom path validator, creates directory when a specified option is set.
+-# To be used to ensure a PREFIX directory is only created when installing.
+-def createPathIsDirCreateWithTarget(target):
+-  def my_validator(key, val, env):
+-    build_targets = (map(str, BUILD_TARGETS))
+-    if target in build_targets:
+-      return PathVariable.PathIsDirCreate(key, val, env)
+-    else:
+-      return PathVariable.PathAccept(key, val, env)
+-  return my_validator
+-
+ # default directories
+ if sys.platform == 'win32':
+   default_incdir='..'
+@@ -77,11 +66,11 @@
+   PathVariable('PREFIX',
+                'Directory to install under',
+                default_prefix,
+-               createPathIsDirCreateWithTarget('install')),
++               PathVariable.PathAccept),
+   PathVariable('LIBDIR',
+                'Directory to install architecture dependent libraries under',
+                default_libdir,
+-               createPathIsDirCreateWithTarget('install')),
++               PathVariable.PathAccept),
+   PathVariable('APR',
+                "Path to apr-1-config, or to APR's install area",
+                default_incdir,
diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb
index 92cd5ca061..25ccd79e00 100644
--- a/meta/recipes-support/serf/serf_1.3.9.bb
+++ b/meta/recipes-support/serf/serf_1.3.9.bb
@@ -6,6 +6,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \
            file://0003-gen_def.patch \
            file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \
+    file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \
            "
 
 SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
-- 
2.17.1



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

* Re: [PATCH] serf: stop scons trying to create directories in hosts rootfs
  2019-06-18 19:09   ` [PATCH] serf: stop scons trying to create directories in hosts rootfs Martin Jansa
@ 2019-06-18 19:13     ` Khem Raj
  2019-06-18 19:20       ` Martin Jansa
  2019-06-18 19:23     ` Burton, Ross
  1 sibling, 1 reply; 8+ messages in thread
From: Khem Raj @ 2019-06-18 19:13 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Tue, Jun 18, 2019 at 12:09 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * since 1522f09a4d serf: cleanup recipe
>   serf.do_install fails in builds with multilib enabled (with
>   libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)
>
> DEBUG: Executing shell function do_install
> scons: Reading SConscript files ...
> PermissionError: [Errno 13] Permission denied: '/usr/lib64':
>   File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
>     ENV = os.environ,
>   File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
>     variables.Update(self)
>   File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
>     option.validator(option.key, env.subst('${%s}'%option.key), env)
>   File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
>     return PathVariable.PathIsDirCreate(key, val, env)
>   File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
>     os.makedirs(val)
>   File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
>     mkdir(name, mode)
> ERROR: scons install execution failed.
>
> * I don't know how exactly --install-sandbox is supposed to work but
>   in this case it's trying to mkdir /usr/lib64 on the host rootfs
>   which is clearly wrong and if I set LIBDIR together with
>   --install-sandbox then the install paths are prefixed with $D twice
>   in some cases (not for includedir and empty libdir at the end).
>   So in the end I think it was an issue caused by the custom path
>   validator in serf's SConstruct, removing that stops touching host
>   and the installed paths (including the paths inside libserf*.pc)
>   look correct
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  ...ories.without.sandbox-install.prefix.patch | 34 +++++++++++++++++++
>  meta/recipes-support/serf/serf_1.3.9.bb       |  1 +
>  2 files changed, 35 insertions(+)
>  create mode 100644 meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
>
> diff --git a/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> new file mode 100644
> index 0000000000..bfb2f5a2aa
> --- /dev/null
> +++ b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> @@ -0,0 +1,34 @@
> +--- ../1.3.9-r0-bad-double/serf-1.3.9/SConstruct       2019-06-18 15:49:19.968961108 +0000
> ++++ serf-1.3.9/SConstruct      2019-06-18 18:53:21.412337151 +0000
> +@@ -51,17 +51,6 @@
> +     """
> +     return (key, '%s' % (help), default, None, lambda val: _converter(val))
> +
> +-# Custom path validator, creates directory when a specified option is set.
> +-# To be used to ensure a PREFIX directory is only created when installing.
> +-def createPathIsDirCreateWithTarget(target):
> +-  def my_validator(key, val, env):
> +-    build_targets = (map(str, BUILD_TARGETS))
> +-    if target in build_targets:
> +-      return PathVariable.PathIsDirCreate(key, val, env)
> +-    else:
> +-      return PathVariable.PathAccept(key, val, env)
> +-  return my_validator
> +-
> + # default directories
> + if sys.platform == 'win32':
> +   default_incdir='..'
> +@@ -77,11 +66,11 @@
> +   PathVariable('PREFIX',
> +                'Directory to install under',
> +                default_prefix,
> +-               createPathIsDirCreateWithTarget('install')),
> ++               PathVariable.PathAccept),
> +   PathVariable('LIBDIR',
> +                'Directory to install architecture dependent libraries under',
> +                default_libdir,
> +-               createPathIsDirCreateWithTarget('install')),
> ++               PathVariable.PathAccept),
> +   PathVariable('APR',
> +                "Path to apr-1-config, or to APR's install area",
> +                default_incdir,
> diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb
> index 92cd5ca061..25ccd79e00 100644
> --- a/meta/recipes-support/serf/serf_1.3.9.bb
> +++ b/meta/recipes-support/serf/serf_1.3.9.bb
> @@ -6,6 +6,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
>             file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \
>             file://0003-gen_def.patch \
>             file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \
> +    file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \

tabs or spaces mismatch I guess ?

>             "
>
>  SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH] serf: stop scons trying to create directories in hosts rootfs
  2019-06-18 19:13     ` Khem Raj
@ 2019-06-18 19:20       ` Martin Jansa
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2019-06-18 19:20 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 5743 bytes --]

oe-core likes to mix them :)

On Tue, Jun 18, 2019 at 9:14 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Tue, Jun 18, 2019 at 12:09 PM Martin Jansa <martin.jansa@gmail.com>
> wrote:
> >
> > * since 1522f09a4d serf: cleanup recipe
> >   serf.do_install fails in builds with multilib enabled (with
> >   libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)
> >
> > DEBUG: Executing shell function do_install
> > scons: Reading SConscript files ...
> > PermissionError: [Errno 13] Permission denied: '/usr/lib64':
> >   File
> "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct",
> line 158:
> >     ENV = os.environ,
> >   File
> "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py",
> line 965:
> >     variables.Update(self)
> >   File
> "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py",
> line 227:
> >     option.validator(option.key, env.subst('${%s}'%option.key), env)
> >   File
> "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct",
> line 60:
> >     return PathVariable.PathIsDirCreate(key, val, env)
> >   File
> "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py",
> line 101:
> >     os.makedirs(val)
> >   File
> "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py",
> line 221:
> >     mkdir(name, mode)
> > ERROR: scons install execution failed.
> >
> > * I don't know how exactly --install-sandbox is supposed to work but
> >   in this case it's trying to mkdir /usr/lib64 on the host rootfs
> >   which is clearly wrong and if I set LIBDIR together with
> >   --install-sandbox then the install paths are prefixed with $D twice
> >   in some cases (not for includedir and empty libdir at the end).
> >   So in the end I think it was an issue caused by the custom path
> >   validator in serf's SConstruct, removing that stops touching host
> >   and the installed paths (including the paths inside libserf*.pc)
> >   look correct
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  ...ories.without.sandbox-install.prefix.patch | 34 +++++++++++++++++++
> >  meta/recipes-support/serf/serf_1.3.9.bb       |  1 +
> >  2 files changed, 35 insertions(+)
> >  create mode 100644
> meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> >
> > diff --git
> a/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> > new file mode 100644
> > index 0000000000..bfb2f5a2aa
> > --- /dev/null
> > +++
> b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> > @@ -0,0 +1,34 @@
> > +--- ../1.3.9-r0-bad-double/serf-1.3.9/SConstruct       2019-06-18
> 15:49:19.968961108 +0000
> > ++++ serf-1.3.9/SConstruct      2019-06-18 18:53:21.412337151 +0000
> > +@@ -51,17 +51,6 @@
> > +     """
> > +     return (key, '%s' % (help), default, None, lambda val:
> _converter(val))
> > +
> > +-# Custom path validator, creates directory when a specified option is
> set.
> > +-# To be used to ensure a PREFIX directory is only created when
> installing.
> > +-def createPathIsDirCreateWithTarget(target):
> > +-  def my_validator(key, val, env):
> > +-    build_targets = (map(str, BUILD_TARGETS))
> > +-    if target in build_targets:
> > +-      return PathVariable.PathIsDirCreate(key, val, env)
> > +-    else:
> > +-      return PathVariable.PathAccept(key, val, env)
> > +-  return my_validator
> > +-
> > + # default directories
> > + if sys.platform == 'win32':
> > +   default_incdir='..'
> > +@@ -77,11 +66,11 @@
> > +   PathVariable('PREFIX',
> > +                'Directory to install under',
> > +                default_prefix,
> > +-               createPathIsDirCreateWithTarget('install')),
> > ++               PathVariable.PathAccept),
> > +   PathVariable('LIBDIR',
> > +                'Directory to install architecture dependent libraries
> under',
> > +                default_libdir,
> > +-               createPathIsDirCreateWithTarget('install')),
> > ++               PathVariable.PathAccept),
> > +   PathVariable('APR',
> > +                "Path to apr-1-config, or to APR's install area",
> > +                default_incdir,
> > diff --git a/meta/recipes-support/serf/serf_1.3.9.bb
> b/meta/recipes-support/serf/serf_1.3.9.bb
> > index 92cd5ca061..25ccd79e00 100644
> > --- a/meta/recipes-support/serf/serf_1.3.9.bb
> > +++ b/meta/recipes-support/serf/serf_1.3.9.bb
> > @@ -6,6 +6,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
> >
>  file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \
> >             file://0003-gen_def.patch \
> >
>  file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \
> > +
> file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> \
>
> tabs or spaces mismatch I guess ?
>
> >             "
> >
> >  SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
> > --
> > 2.17.1
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 7551 bytes --]

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

* Re: [PATCH] serf: stop scons trying to create directories in hosts rootfs
  2019-06-18 19:09   ` [PATCH] serf: stop scons trying to create directories in hosts rootfs Martin Jansa
  2019-06-18 19:13     ` Khem Raj
@ 2019-06-18 19:23     ` Burton, Ross
  1 sibling, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2019-06-18 19:23 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

No S-o-b in the patch, but more importantly no Upstream-Status.  Have
you reported this upstream?  Or compared what we're doing to what
other distros that package serf do?

Ross

On Tue, 18 Jun 2019 at 20:09, Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * since 1522f09a4d serf: cleanup recipe
>   serf.do_install fails in builds with multilib enabled (with
>   libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)
>
> DEBUG: Executing shell function do_install
> scons: Reading SConscript files ...
> PermissionError: [Errno 13] Permission denied: '/usr/lib64':
>   File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
>     ENV = os.environ,
>   File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
>     variables.Update(self)
>   File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
>     option.validator(option.key, env.subst('${%s}'%option.key), env)
>   File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
>     return PathVariable.PathIsDirCreate(key, val, env)
>   File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
>     os.makedirs(val)
>   File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
>     mkdir(name, mode)
> ERROR: scons install execution failed.
>
> * I don't know how exactly --install-sandbox is supposed to work but
>   in this case it's trying to mkdir /usr/lib64 on the host rootfs
>   which is clearly wrong and if I set LIBDIR together with
>   --install-sandbox then the install paths are prefixed with $D twice
>   in some cases (not for includedir and empty libdir at the end).
>   So in the end I think it was an issue caused by the custom path
>   validator in serf's SConstruct, removing that stops touching host
>   and the installed paths (including the paths inside libserf*.pc)
>   look correct
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  ...ories.without.sandbox-install.prefix.patch | 34 +++++++++++++++++++
>  meta/recipes-support/serf/serf_1.3.9.bb       |  1 +
>  2 files changed, 35 insertions(+)
>  create mode 100644 meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
>
> diff --git a/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> new file mode 100644
> index 0000000000..bfb2f5a2aa
> --- /dev/null
> +++ b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
> @@ -0,0 +1,34 @@
> +--- ../1.3.9-r0-bad-double/serf-1.3.9/SConstruct       2019-06-18 15:49:19.968961108 +0000
> ++++ serf-1.3.9/SConstruct      2019-06-18 18:53:21.412337151 +0000
> +@@ -51,17 +51,6 @@
> +     """
> +     return (key, '%s' % (help), default, None, lambda val: _converter(val))
> +
> +-# Custom path validator, creates directory when a specified option is set.
> +-# To be used to ensure a PREFIX directory is only created when installing.
> +-def createPathIsDirCreateWithTarget(target):
> +-  def my_validator(key, val, env):
> +-    build_targets = (map(str, BUILD_TARGETS))
> +-    if target in build_targets:
> +-      return PathVariable.PathIsDirCreate(key, val, env)
> +-    else:
> +-      return PathVariable.PathAccept(key, val, env)
> +-  return my_validator
> +-
> + # default directories
> + if sys.platform == 'win32':
> +   default_incdir='..'
> +@@ -77,11 +66,11 @@
> +   PathVariable('PREFIX',
> +                'Directory to install under',
> +                default_prefix,
> +-               createPathIsDirCreateWithTarget('install')),
> ++               PathVariable.PathAccept),
> +   PathVariable('LIBDIR',
> +                'Directory to install architecture dependent libraries under',
> +                default_libdir,
> +-               createPathIsDirCreateWithTarget('install')),
> ++               PathVariable.PathAccept),
> +   PathVariable('APR',
> +                "Path to apr-1-config, or to APR's install area",
> +                default_incdir,
> diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb
> index 92cd5ca061..25ccd79e00 100644
> --- a/meta/recipes-support/serf/serf_1.3.9.bb
> +++ b/meta/recipes-support/serf/serf_1.3.9.bb
> @@ -6,6 +6,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
>             file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \
>             file://0003-gen_def.patch \
>             file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \
> +    file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \
>             "
>
>  SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* ✗ patchtest: failure for serf: cleanup recipe (rev2)
  2019-06-13  0:01 [PATCH] serf: cleanup recipe Anuj Mittal
  2019-06-17 18:59 ` Martin Jansa
@ 2019-06-18 19:30 ` Patchwork
  1 sibling, 0 replies; 8+ messages in thread
From: Patchwork @ 2019-06-18 19:30 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

== Series Details ==

Series: serf: cleanup recipe (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/18127/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fix    Sign off the added patch file (meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch)

* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* [PATCHv2] serf: stop scons trying to create directories in hosts rootfs
  2019-06-17 18:59 ` Martin Jansa
  2019-06-18 19:09   ` [PATCH] serf: stop scons trying to create directories in hosts rootfs Martin Jansa
@ 2019-06-18 21:45   ` Martin Jansa
  1 sibling, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2019-06-18 21:45 UTC (permalink / raw)
  To: openembedded-core

* since 1522f09a4d serf: cleanup recipe
  serf.do_install fails in builds with multilib enabled (with
  libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)

DEBUG: Executing shell function do_install
scons: Reading SConscript files ...
PermissionError: [Errno 13] Permission denied: '/usr/lib64':
  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
    ENV = os.environ,
  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
    variables.Update(self)
  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
    option.validator(option.key, env.subst('${%s}'%option.key), env)
  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
    return PathVariable.PathIsDirCreate(key, val, env)
  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
    os.makedirs(val)
  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
    mkdir(name, mode)
ERROR: scons install execution failed.

* I don't know how exactly --install-sandbox is supposed to work but
  in this case it's trying to mkdir /usr/lib64 on the host rootfs
  which is clearly wrong and if I set LIBDIR together with
  --install-sandbox then the install paths are prefixed with $D twice
  in some cases (not for includedir and empty libdir at the end).
  So in the end I think it was an issue caused by the custom path
  validator in serf's SConstruct, removing that stops touching host
  and the installed paths (including the paths inside libserf*.pc)
  look correct

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...ories.without.sandbox-install.prefix.patch | 71 +++++++++++++++++++
 meta/recipes-support/serf/serf_1.3.9.bb       |  1 +
 2 files changed, 72 insertions(+)
 create mode 100644 meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch

diff --git a/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
new file mode 100644
index 0000000000..91640d6044
--- /dev/null
+++ b/meta/recipes-support/serf/serf/SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch
@@ -0,0 +1,71 @@
+stop scons trying to create directories in hosts rootfs
+
+* since 1522f09a4d serf: cleanup recipe
+  serf.do_install fails in builds with multilib enabled (with
+  libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)
+
+DEBUG: Executing shell function do_install
+scons: Reading SConscript files ...
+PermissionError: [Errno 13] Permission denied: '/usr/lib64':
+  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
+    ENV = os.environ,
+  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
+    variables.Update(self)
+  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
+    option.validator(option.key, env.subst('${%s}'%option.key), env)
+  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
+    return PathVariable.PathIsDirCreate(key, val, env)
+  File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
+    os.makedirs(val)
+  File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
+    mkdir(name, mode)
+ERROR: scons install execution failed.
+
+* I don't know how exactly --install-sandbox is supposed to work but
+  in this case it's trying to mkdir /usr/lib64 on the host rootfs
+  which is clearly wrong and if I set LIBDIR together with
+  --install-sandbox then the install paths are prefixed with $D twice
+  in some cases (not for includedir and empty libdir at the end).
+  So in the end I think it was an issue caused by the custom path
+  validator in serf's SConstruct, removing that stops touching host
+  and the installed paths (including the paths inside libserf*.pc)
+  look correct
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- serf-1.3.9/SConstruct	2019-06-18 15:49:19.968961108 +0000
++++ serf-1.3.9b/SConstruct	2019-06-18 18:53:21.412337151 +0000
+@@ -51,17 +51,6 @@
+     """
+     return (key, '%s' % (help), default, None, lambda val: _converter(val))
+ 
+-# Custom path validator, creates directory when a specified option is set.
+-# To be used to ensure a PREFIX directory is only created when installing.
+-def createPathIsDirCreateWithTarget(target):
+-  def my_validator(key, val, env):
+-    build_targets = (map(str, BUILD_TARGETS))
+-    if target in build_targets:
+-      return PathVariable.PathIsDirCreate(key, val, env)
+-    else:
+-      return PathVariable.PathAccept(key, val, env)
+-  return my_validator
+-
+ # default directories
+ if sys.platform == 'win32':
+   default_incdir='..'
+@@ -77,11 +66,11 @@
+   PathVariable('PREFIX',
+                'Directory to install under',
+                default_prefix,
+-               createPathIsDirCreateWithTarget('install')),
++               PathVariable.PathAccept),
+   PathVariable('LIBDIR',
+                'Directory to install architecture dependent libraries under',
+                default_libdir,
+-               createPathIsDirCreateWithTarget('install')),
++               PathVariable.PathAccept),
+   PathVariable('APR',
+                "Path to apr-1-config, or to APR's install area",
+                default_incdir,
diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb
index 92cd5ca061..dd4133a45c 100644
--- a/meta/recipes-support/serf/serf_1.3.9.bb
+++ b/meta/recipes-support/serf/serf_1.3.9.bb
@@ -6,6 +6,7 @@ SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0002-SConstruct-Fix-path-quoting-for-.def-generator.patch \
            file://0003-gen_def.patch \
            file://0004-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch \
+           file://SConstruct.stop.creating.directories.without.sandbox-install.prefix.patch \
            "
 
 SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
-- 
2.17.1



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

end of thread, other threads:[~2019-06-18 21:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13  0:01 [PATCH] serf: cleanup recipe Anuj Mittal
2019-06-17 18:59 ` Martin Jansa
2019-06-18 19:09   ` [PATCH] serf: stop scons trying to create directories in hosts rootfs Martin Jansa
2019-06-18 19:13     ` Khem Raj
2019-06-18 19:20       ` Martin Jansa
2019-06-18 19:23     ` Burton, Ross
2019-06-18 21:45   ` [PATCHv2] " Martin Jansa
2019-06-18 19:30 ` ✗ patchtest: failure for serf: cleanup recipe (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.