[OE-core] [PATCH] perlcross: not break build if already patched

2021-07-27 Thread Yu, Mingli
From: Mingli Yu 

Currently the build will break if the patch already applied
as the return value of "test ! -f $@" is not 0, so make sure
to return 0 if the patch already applied.

Fixes:
 $ bitbake perl-native

 Make a change as below
 $ git diff
 diff --git a/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb 
b/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
 index b77bbd1fd4..4c5e35ab80 100644
 --- a/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
 +++ b/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
 @@ -33,6 +33,7 @@ do_compile () {
  do_install_class-native() {
  mkdir -p ${D}/${datadir}/perl-cross/
  cp -rf ${S}/* ${D}/${datadir}/perl-cross/
 +echo "test" > ${D}/${datadir}/perl-cross/testfile
 }

 $ bitbake perl-native
NOTE: make -j 40
make crosspatch
make[1]: Entering directory 
'/build/tmp-glibc/work/x86_64-linux/perl-native/5.34.0-r0/perl-5.34.0'
test ! -f cnf/diffs/perl5-5.34.0/posix-makefile.applied && (patch -p1 -i 
cnf/diffs/perl5-5.34.0/posix-makefile.patch && touch 
cnf/diffs/perl5-5.34.0/posix-makefile.applied)
test ! -f cnf/diffs/perl5-5.34.0/dynaloader.applied && (patch -p1 -i 
cnf/diffs/perl5-5.34.0/dynaloader.patch && touch 
cnf/diffs/perl5-5.34.0/dynaloader.applied)
make[1]: *** [Makefile:64: cnf/diffs/perl5-5.34.0/posix-makefile.applied] Error 
1
make[1]: *** Waiting for unfinished jobs
make[1]: *** [Makefile:64: cnf/diffs/perl5-5.34.0/dynaloader.applied] Error 1
make[1]: Leaving directory 
'/build/tmp-glibc/work/x86_64-linux/perl-native/5.34.0-r0/perl-5.34.0'
make: *** [Makefile:78: all] Error 2

Signed-off-by: Mingli Yu 
---
 .../files/0001-Makefile-check-the-file-if-patched-or-not.patch  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch
 
b/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch
index fb7b287599..8c8f3b717c 100644
--- 
a/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch
+++ 
b/meta/recipes-devtools/perl-cross/files/0001-Makefile-check-the-file-if-patched-or-not.patch
@@ -22,7 +22,7 @@ index f4a26f5..7bc748e 100644
  # and if that fails, reaching for the source tarball is the safest option.
  $(CROSSPATCHED): %.applied: %.patch
 -  patch -p1 -i $< && touch $@
-+  test ! -f $@ && (patch -p1 -i $< && touch $@)
++  test ! -f $@ && (patch -p1 -i $< && touch $@) || echo "$@ exist"
  
  # ---[ common 
]-
  
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154196): 
https://lists.openembedded.org/g/openembedded-core/message/154196
Mute This Topic: https://lists.openembedded.org/mt/84499498/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [hardknott][PATCH] mklibs: remove recipes and class

2021-07-27 Thread Changqing Li
mklibs-native-0.1.44 do_compile failed on Fedora34: 
mklibs-readelf/elf.hpp:52:56: error: ISO C++17 does not allow dynamic 
exception specifications


so removed it.

On 7/28/21 10:54 AM, Changqing Li wrote:

From: Alexander Kanavin 

This is not enabled or tested by default, and has never been
ported to python 3 upstream[1], which means it doesn't work at all
with plain poky. If you need it, please put it in a separate layer
and/or modernize to work with py3.

https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs

(From OE-Core rev: 908df863b419d1cad7317153101fc827e7e3a354)

Signed-off-by: Alexander Kanavin 
Signed-off-by: Jacob Kroon 
Signed-off-by: Richard Purdie 
---
  meta/classes/image-mklibs.bbclass |  56 --
  meta/conf/distro/include/maintainers.inc  |   1 -
  .../mklibs/files/ac_init_fix.patch|  19 
  ...re-on-symbol-provided-by-application.patch | 103 --
  .../mklibs/files/fix_STT_GNU_IFUNC.patch  |  26 -
  .../mklibs/files/fix_cross_compile.patch  |  81 --
  ...U-unique-symbols-as-provided-symbols.patch |  34 --
  .../mklibs/files/sysrooted-ldso.patch |  18 ---
  .../mklibs/mklibs-native_0.1.44.bb|  22 
  9 files changed, 360 deletions(-)
  delete mode 100644 meta/classes/image-mklibs.bbclass
  delete mode 100644 meta/recipes-devtools/mklibs/files/ac_init_fix.patch
  delete mode 100644 
meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
  delete mode 100644 meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch
  delete mode 100644 meta/recipes-devtools/mklibs/files/fix_cross_compile.patch
  delete mode 100644 
meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch
  delete mode 100644 meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
  delete mode 100644 meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb

diff --git a/meta/classes/image-mklibs.bbclass 
b/meta/classes/image-mklibs.bbclass
deleted file mode 100644
index 68e11d4365..00
--- a/meta/classes/image-mklibs.bbclass
+++ /dev/null
@@ -1,56 +0,0 @@
-do_rootfs[depends] += "mklibs-native:do_populate_sysroot"
-
-IMAGE_PREPROCESS_COMMAND += "mklibs_optimize_image; "
-
-inherit linuxloader
-
-mklibs_optimize_image_doit() {
-   rm -rf ${WORKDIR}/mklibs
-   mkdir -p ${WORKDIR}/mklibs/dest
-   cd ${IMAGE_ROOTFS}
-   du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt
-
-   # Build a list of dynamically linked executable ELF files.
-   # Omit libc/libpthread as a special case because it has an interpreter
-   # but is primarily what we intend to strip down.
-   for i in `find . -type f -executable ! -name 'libc-*' ! -name 
'libpthread-*'`; do
-   file $i | grep -q ELF || continue
-   ${HOST_PREFIX}readelf -l $i | grep -q INTERP || continue
-   echo $i
-   done > ${WORKDIR}/mklibs/executables.list
-
-   dynamic_loader=${@get_linuxloader(d)}
-
-   mklibs -v \
-   --ldlib ${dynamic_loader} \
-   --libdir ${baselib} \
-   --sysroot ${PKG_CONFIG_SYSROOT_DIR} \
-   --gcc-options "--sysroot=${PKG_CONFIG_SYSROOT_DIR}" \
-   --root ${IMAGE_ROOTFS} \
-   --target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \
-   -d ${WORKDIR}/mklibs/dest \
-   `cat ${WORKDIR}/mklibs/executables.list`
-
-   cd ${WORKDIR}/mklibs/dest
-   for i in *
-   do
-   cp $i `find ${IMAGE_ROOTFS} -name $i`
-   done
-
-   cd ${IMAGE_ROOTFS}
-   du -bs > ${WORKDIR}/mklibs/du.after.mklibs.txt
-
-   echo rootfs size before mklibs optimization: `cat 
${WORKDIR}/mklibs/du.before.mklibs.txt`
-   echo rootfs size after mklibs optimization: `cat 
${WORKDIR}/mklibs/du.after.mklibs.txt`
-}
-
-mklibs_optimize_image() {
-   for img in ${MKLIBS_OPTIMIZED_IMAGES}
-   do
-   if [ "${img}" = "${PN}" ] || [ "${img}" = "all" ]
-   then
-   mklibs_optimize_image_doit
-   break
-   fi
-   done
-}
diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index 6276331857..22f873444a 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -502,7 +502,6 @@ RECIPE_MAINTAINER_pn-mingetty = "Yi Zhao 
"
  RECIPE_MAINTAINER_pn-mini-x-session = "Armin Kuster "
  RECIPE_MAINTAINER_pn-minicom = "Anuj Mittal "
  RECIPE_MAINTAINER_pn-mkfontscale = "Armin Kuster "
-RECIPE_MAINTAINER_pn-mklibs-native = "Robert Yang "
  RECIPE_MAINTAINER_pn-mmc-utils = "Anuj Mittal "
  RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Alexander Kanavin 
"
  RECIPE_MAINTAINER_pn-modutils-initscripts = "Yi Zhao "
diff --git a/meta/recipes-devtools/mklibs/files/ac_init_fix.patch 
b/meta/recipes-devtools/mklibs/files/ac_init_fix.patch
deleted file 

[OE-core] [hardknott][PATCH] mklibs: remove recipes and class

2021-07-27 Thread Changqing Li
From: Alexander Kanavin 

This is not enabled or tested by default, and has never been
ported to python 3 upstream[1], which means it doesn't work at all
with plain poky. If you need it, please put it in a separate layer
and/or modernize to work with py3.

https://salsa.debian.org/installer-team/mklibs/-/blob/master/src/mklibs

(From OE-Core rev: 908df863b419d1cad7317153101fc827e7e3a354)

Signed-off-by: Alexander Kanavin 
Signed-off-by: Jacob Kroon 
Signed-off-by: Richard Purdie 
---
 meta/classes/image-mklibs.bbclass |  56 --
 meta/conf/distro/include/maintainers.inc  |   1 -
 .../mklibs/files/ac_init_fix.patch|  19 
 ...re-on-symbol-provided-by-application.patch | 103 --
 .../mklibs/files/fix_STT_GNU_IFUNC.patch  |  26 -
 .../mklibs/files/fix_cross_compile.patch  |  81 --
 ...U-unique-symbols-as-provided-symbols.patch |  34 --
 .../mklibs/files/sysrooted-ldso.patch |  18 ---
 .../mklibs/mklibs-native_0.1.44.bb|  22 
 9 files changed, 360 deletions(-)
 delete mode 100644 meta/classes/image-mklibs.bbclass
 delete mode 100644 meta/recipes-devtools/mklibs/files/ac_init_fix.patch
 delete mode 100644 
meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
 delete mode 100644 meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch
 delete mode 100644 meta/recipes-devtools/mklibs/files/fix_cross_compile.patch
 delete mode 100644 
meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch
 delete mode 100644 meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
 delete mode 100644 meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb

diff --git a/meta/classes/image-mklibs.bbclass 
b/meta/classes/image-mklibs.bbclass
deleted file mode 100644
index 68e11d4365..00
--- a/meta/classes/image-mklibs.bbclass
+++ /dev/null
@@ -1,56 +0,0 @@
-do_rootfs[depends] += "mklibs-native:do_populate_sysroot"
-
-IMAGE_PREPROCESS_COMMAND += "mklibs_optimize_image; "
-
-inherit linuxloader
-
-mklibs_optimize_image_doit() {
-   rm -rf ${WORKDIR}/mklibs
-   mkdir -p ${WORKDIR}/mklibs/dest
-   cd ${IMAGE_ROOTFS}
-   du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt
-
-   # Build a list of dynamically linked executable ELF files.
-   # Omit libc/libpthread as a special case because it has an interpreter
-   # but is primarily what we intend to strip down.
-   for i in `find . -type f -executable ! -name 'libc-*' ! -name 
'libpthread-*'`; do
-   file $i | grep -q ELF || continue
-   ${HOST_PREFIX}readelf -l $i | grep -q INTERP || continue
-   echo $i
-   done > ${WORKDIR}/mklibs/executables.list
-
-   dynamic_loader=${@get_linuxloader(d)}
-
-   mklibs -v \
-   --ldlib ${dynamic_loader} \
-   --libdir ${baselib} \
-   --sysroot ${PKG_CONFIG_SYSROOT_DIR} \
-   --gcc-options "--sysroot=${PKG_CONFIG_SYSROOT_DIR}" \
-   --root ${IMAGE_ROOTFS} \
-   --target `echo ${TARGET_PREFIX} | sed 's/-$//' ` \
-   -d ${WORKDIR}/mklibs/dest \
-   `cat ${WORKDIR}/mklibs/executables.list`
-
-   cd ${WORKDIR}/mklibs/dest
-   for i in *
-   do
-   cp $i `find ${IMAGE_ROOTFS} -name $i`
-   done
-
-   cd ${IMAGE_ROOTFS}
-   du -bs > ${WORKDIR}/mklibs/du.after.mklibs.txt
-
-   echo rootfs size before mklibs optimization: `cat 
${WORKDIR}/mklibs/du.before.mklibs.txt`
-   echo rootfs size after mklibs optimization: `cat 
${WORKDIR}/mklibs/du.after.mklibs.txt`
-}
-
-mklibs_optimize_image() {
-   for img in ${MKLIBS_OPTIMIZED_IMAGES}
-   do
-   if [ "${img}" = "${PN}" ] || [ "${img}" = "all" ]
-   then
-   mklibs_optimize_image_doit
-   break
-   fi
-   done
-}
diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index 6276331857..22f873444a 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -502,7 +502,6 @@ RECIPE_MAINTAINER_pn-mingetty = "Yi Zhao 
"
 RECIPE_MAINTAINER_pn-mini-x-session = "Armin Kuster "
 RECIPE_MAINTAINER_pn-minicom = "Anuj Mittal "
 RECIPE_MAINTAINER_pn-mkfontscale = "Armin Kuster "
-RECIPE_MAINTAINER_pn-mklibs-native = "Robert Yang "
 RECIPE_MAINTAINER_pn-mmc-utils = "Anuj Mittal "
 RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Alexander Kanavin 
"
 RECIPE_MAINTAINER_pn-modutils-initscripts = "Yi Zhao "
diff --git a/meta/recipes-devtools/mklibs/files/ac_init_fix.patch 
b/meta/recipes-devtools/mklibs/files/ac_init_fix.patch
deleted file mode 100644
index 422af10420..00
--- a/meta/recipes-devtools/mklibs/files/ac_init_fix.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Get the version of mklibs by simpler means. The MKLIBS_VERSION string in the 
-configure.ac file is 

[OE-core] [PATCH] archiver.bbclass: fix do_ar_configured failure for kernel

2021-07-27 Thread Changqing Li
From: Changqing Li 

Signed-off-by: Changqing Li 
---
 meta/classes/archiver.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 900268971c..dd31dc0cd8 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -281,7 +281,10 @@ python do_ar_configured() {
 # ${STAGING_DATADIR}/aclocal/libtool.m4, so we can't re-run the
 # do_configure, we archive the already configured ${S} to
 # instead of.
-elif pn != 'libtool-native':
+# The kernel class functions require it to be on work-shared, we
+# don't unpack, patch, configure again, just archive the already
+# configured ${S}
+elif not (pn == 'libtool-native' or is_work_shared(d)):
 def runTask(task):
 prefuncs = d.getVarFlag(task, 'prefuncs') or ''
 for func in prefuncs.split():
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154193): 
https://lists.openembedded.org/g/openembedded-core/message/154193
Mute This Topic: https://lists.openembedded.org/mt/84496615/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 4/6] ffmpeg: fix CVE-2020-22021

2021-07-27 Thread Tony Tascioglu
avfilter/vf_yadif: Fix handing of tiny images

Fixes: out of array access
Fixes: Ticket8240
Fixes: CVE-2020-22021

Signed-off-by: Michael Niedermayer 

CVE: CVE-2020-22021
Upstream-Status: Backport [7971f62120a55c141ec437aa3f0bacc1c1a3526b]

Signed-off-by: Tony Tascioglu 
---
 .../ffmpeg/ffmpeg/fix-CVE-2020-22021.patch| 87 +++
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb  |  1 +
 2 files changed, 88 insertions(+)
 create mode 100644 
meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch 
b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch
new file mode 100644
index 00..6f7fce0e4c
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22021.patch
@@ -0,0 +1,87 @@
+From 7971f62120a55c141ec437aa3f0bacc1c1a3526b Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer 
+Date: Sat, 29 May 2021 11:17:35 +0200
+Subject: [PATCH] avfilter/vf_yadif: Fix handing of tiny images
+
+Fixes: out of array access
+Fixes: Ticket8240
+Fixes: CVE-2020-22021
+
+Signed-off-by: Michael Niedermayer 
+
+CVE: CVE-2020-22021
+Upstream-Status: Backport [7971f62120a55c141ec437aa3f0bacc1c1a3526b]
+
+Signed-off-by: Tony Tascioglu 
+---
+ libavfilter/vf_yadif.c | 32 ++--
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
+index 91cc79ecc3..b0d9fbaf1f 100644
+--- a/libavfilter/vf_yadif.c
 b/libavfilter/vf_yadif.c
+@@ -123,20 +123,22 @@ static void filter_edges(void *dst1, void *prev1, void 
*cur1, void *next1,
+ uint8_t *next2 = parity ? cur  : next;
+ 
+ const int edge = MAX_ALIGN - 1;
++int offset = FFMAX(w - edge, 3);
+ 
+ /* Only edge pixels need to be processed here.  A constant value of false
+  * for is_not_edge should let the compiler ignore the whole branch. */
+-FILTER(0, 3, 0)
++FILTER(0, FFMIN(3, w), 0)
+ 
+-dst  = (uint8_t*)dst1  + w - edge;
+-prev = (uint8_t*)prev1 + w - edge;
+-cur  = (uint8_t*)cur1  + w - edge;
+-next = (uint8_t*)next1 + w - edge;
++dst  = (uint8_t*)dst1  + offset;
++prev = (uint8_t*)prev1 + offset;
++cur  = (uint8_t*)cur1  + offset;
++next = (uint8_t*)next1 + offset;
+ prev2 = (uint8_t*)(parity ? prev : cur);
+ next2 = (uint8_t*)(parity ? cur  : next);
+ 
+-FILTER(w - edge, w - 3, 1)
+-FILTER(w - 3, w, 0)
++FILTER(offset, w - 3, 1)
++offset = FFMAX(offset, w - 3);
++FILTER(offset, w, 0)
+ }
+ 
+ 
+@@ -170,21 +172,23 @@ static void filter_edges_16bit(void *dst1, void *prev1, 
void *cur1, void *next1,
+ uint16_t *next2 = parity ? cur  : next;
+ 
+ const int edge = MAX_ALIGN / 2 - 1;
++int offset = FFMAX(w - edge, 3);
+ 
+ mrefs /= 2;
+ prefs /= 2;
+ 
+-FILTER(0, 3, 0)
++FILTER(0,  FFMIN(3, w), 0)
+ 
+-dst   = (uint16_t*)dst1  + w - edge;
+-prev  = (uint16_t*)prev1 + w - edge;
+-cur   = (uint16_t*)cur1  + w - edge;
+-next  = (uint16_t*)next1 + w - edge;
++dst   = (uint16_t*)dst1  + offset;
++prev  = (uint16_t*)prev1 + offset;
++cur   = (uint16_t*)cur1  + offset;
++next  = (uint16_t*)next1 + offset;
+ prev2 = (uint16_t*)(parity ? prev : cur);
+ next2 = (uint16_t*)(parity ? cur  : next);
+ 
+-FILTER(w - edge, w - 3, 1)
+-FILTER(w - 3, w, 0)
++FILTER(offset, w - 3, 1)
++offset = FFMAX(offset, w - 3);
++FILTER(offset, w, 0)
+ }
+ 
+ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int 
nb_jobs)
+-- 
+2.32.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 786f7abc20..f1b3c027e3 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -28,6 +28,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
file://fix-CVE-2020-20446.patch \
file://fix-CVE-2020-20453.patch \
file://fix-CVE-2020-22015.patch \
+   file://fix-CVE-2020-22021.patch \
"
 SRC_URI[sha256sum] = 
"06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909"
 
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154187): 
https://lists.openembedded.org/g/openembedded-core/message/154187
Mute This Topic: https://lists.openembedded.org/mt/84494526/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 3/6] ffmpeg: fix CVE-2020-22015

2021-07-27 Thread Tony Tascioglu
avformat/movenc: Check pal_size before use

Fixes: assertion failure
Fixes: out of array read
Fixes: Ticket8190
Fixes: CVE-2020-22015

Signed-off-by: Michael Niedermayer 

CVE: CVE-2020-22015
Upstream-Status: Backport [4c1afa292520329eecd1cc7631bc59a8cca95c46]

Signed-off-by: Tony Tascioglu 
---
 .../ffmpeg/ffmpeg/fix-CVE-2020-22015.patch| 44 +++
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb  |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 
meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch 
b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch
new file mode 100644
index 00..5c911299cb
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch
@@ -0,0 +1,44 @@
+From 4c1afa292520329eecd1cc7631bc59a8cca95c46 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer 
+Date: Sat, 29 May 2021 09:22:27 +0200
+Subject: [PATCH] avformat/movenc: Check pal_size before use
+
+Fixes: assertion failure
+Fixes: out of array read
+Fixes: Ticket8190
+Fixes: CVE-2020-22015
+
+Signed-off-by: Michael Niedermayer 
+
+
+CVE: CVE-2020-22015
+Upstream-Status: Backport [4c1afa292520329eecd1cc7631bc59a8cca95c46]
+
+Signed-off-by: Tony Tascioglu 
+---
+ libavformat/movenc.c | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/movenc.c b/libavformat/movenc.c
+index 2ab507df15..7d839f447b 100644
+--- a/libavformat/movenc.c
 b/libavformat/movenc.c
+@@ -2160,11 +2160,13 @@ static int mov_write_video_tag(AVFormatContext *s, 
AVIOContext *pb, MOVMuxContex
+ avio_wb16(pb, 0x18); /* Reserved */
+ 
+ if (track->mode == MODE_MOV && track->par->format == AV_PIX_FMT_PAL8) {
+-int pal_size = 1 << track->par->bits_per_coded_sample;
+-int i;
++int pal_size, i;
+ avio_wb16(pb, 0); /* Color table ID */
+ avio_wb32(pb, 0); /* Color table seed */
+ avio_wb16(pb, 0x8000);/* Color table flags */
++if (track->par->bits_per_coded_sample < 0 || 
track->par->bits_per_coded_sample > 8)
++return AVERROR(EINVAL);
++pal_size = 1 << track->par->bits_per_coded_sample;
+ avio_wb16(pb, pal_size - 1);  /* Color table size (zero-relative) */
+ for (i = 0; i < pal_size; i++) {
+ uint32_t rgb = track->palette[i];
+-- 
+2.32.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 198a44efec..786f7abc20 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -27,6 +27,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \

file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \
file://fix-CVE-2020-20446.patch \
file://fix-CVE-2020-20453.patch \
+   file://fix-CVE-2020-22015.patch \
"
 SRC_URI[sha256sum] = 
"06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909"
 
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154189): 
https://lists.openembedded.org/g/openembedded-core/message/154189
Mute This Topic: https://lists.openembedded.org/mt/84494528/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 5/6] ffmpeg: fix CVE-2020-22033 and CVE-2020-22019

2021-07-27 Thread Tony Tascioglu
avfilter/vf_vmafmotion: Check dimensions

Fixes: out of array access
Fixes: Ticket8241
Fixes: Ticket8246
Fixes: CVE-2020-22019
Fixes: CVE-2020-22033

Signed-off-by: Michael Niedermayer 

CVE: CVE-2020-22033
CVE: CVE-2020-22019
Upstream-Status: Backport [82ad1b76751bcfad5005440db48c46a4de5d6f02]

Signed-off-by: Tony Tascioglu 
---
 .../fix-CVE-2020-22033-CVE-2020-22019.patch   | 40 +++
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb  |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 
meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch

diff --git 
a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch 
b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch
new file mode 100644
index 00..5d979ca3f2
--- /dev/null
+++ 
b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22033-CVE-2020-22019.patch
@@ -0,0 +1,40 @@
+From 82ad1b76751bcfad5005440db48c46a4de5d6f02 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer 
+Date: Sat, 29 May 2021 09:58:31 +0200
+Subject: [PATCH] avfilter/vf_vmafmotion: Check dimensions
+
+Fixes: out of array access
+Fixes: Ticket8241
+Fixes: Ticket8246
+Fixes: CVE-2020-22019
+Fixes: CVE-2020-22033
+
+Signed-off-by: Michael Niedermayer 
+
+
+CVE: CVE-2020-22033
+CVE: CVE-2020-22019
+Upstream-Status: Backport [82ad1b76751bcfad5005440db48c46a4de5d6f02]
+
+Signed-off-by: Tony Tascioglu 
+---
+ libavfilter/vf_vmafmotion.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c
+index 2db4783d8d..454ebb8afa 100644
+--- a/libavfilter/vf_vmafmotion.c
 b/libavfilter/vf_vmafmotion.c
+@@ -238,6 +238,9 @@ int ff_vmafmotion_init(VMAFMotionData *s,
+ int i;
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
+ 
++if (w < 3 || h < 3)
++return AVERROR(EINVAL);
++
+ s->width = w;
+ s->height = h;
+ s->stride = FFALIGN(w * sizeof(uint16_t), 32);
+-- 
+2.32.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index f1b3c027e3..70b1513048 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -29,6 +29,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
file://fix-CVE-2020-20453.patch \
file://fix-CVE-2020-22015.patch \
file://fix-CVE-2020-22021.patch \
+   file://fix-CVE-2020-22033-CVE-2020-22019.patch \
"
 SRC_URI[sha256sum] = 
"06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909"
 
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154191): 
https://lists.openembedded.org/g/openembedded-core/message/154191
Mute This Topic: https://lists.openembedded.org/mt/84494530/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 6/6] ffmpeg: fix CVE-2021-33815

2021-07-27 Thread Tony Tascioglu
avcodec/exr: More strictly check dc_count

Fixes: out of array access
Fixes: exr/deneme

Found-by: Burak Çarıkçı 
Signed-off-by: Michael Niedermayer 

CVE: CVE-2021-33815
Upstream-Status: Backport [26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777]

Signed-off-by: Tony Tascioglu 
---
 .../ffmpeg/ffmpeg/fix-CVE-2021-33815.patch| 44 +++
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb  |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 
meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch 
b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch
new file mode 100644
index 00..51edb76389
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-33815.patch
@@ -0,0 +1,44 @@
+From 26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer 
+Date: Tue, 25 May 2021 19:29:18 +0200
+Subject: [PATCH] avcodec/exr: More strictly check dc_count
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes: out of array access
+Fixes: exr/deneme
+
+Found-by: Burak Çarıkçı 
+Signed-off-by: Michael Niedermayer 
+
+
+CVE: CVE-2021-33815
+Upstream-Status: Backport [26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777]
+
+Signed-off-by: Tony Tascioglu 
+---
+ libavcodec/exr.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/exr.c b/libavcodec/exr.c
+index 9377a89169..4648ed7d62 100644
+--- a/libavcodec/exr.c
 b/libavcodec/exr.c
+@@ -1059,11 +1059,11 @@ static int dwa_uncompress(EXRContext *s, const uint8_t 
*src, int compressed_size
+ bytestream2_skip(, ac_size);
+ }
+ 
+-if (dc_size > 0) {
++{
+ unsigned long dest_len = dc_count * 2LL;
+ GetByteContext agb = gb;
+ 
+-if (dc_count > (6LL * td->xsize * td->ysize + 63) / 64)
++if (dc_count != dc_w * dc_h * 3)
+ return AVERROR_INVALIDDATA;
+ 
+ av_fast_padded_malloc(>dc_data, >dc_size, FFALIGN(dest_len, 
64) * 2);
+-- 
+2.32.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 70b1513048..02af257d0f 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -30,6 +30,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
file://fix-CVE-2020-22015.patch \
file://fix-CVE-2020-22021.patch \
file://fix-CVE-2020-22033-CVE-2020-22019.patch \
+   file://fix-CVE-2021-33815.patch \
"
 SRC_URI[sha256sum] = 
"06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909"
 
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154192): 
https://lists.openembedded.org/g/openembedded-core/message/154192
Mute This Topic: https://lists.openembedded.org/mt/84494531/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/6] ffmpeg: fix CVE-2020-20453

2021-07-27 Thread Tony Tascioglu
avcodec/aacenc: Avoid 0 lambda

Fixes: Ticket8003
Fixes: CVE-2020-20453

Signed-off-by: Michael Niedermayer 

CVE: CVE-2020-20453
Upstream-Status: Backport [a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8]

Signed-off-by: Tony Tascioglu 
---
 .../ffmpeg/ffmpeg/fix-CVE-2020-20453.patch| 42 +++
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb  |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 
meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch 
b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch
new file mode 100644
index 00..b1c94057a3
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch
@@ -0,0 +1,42 @@
+From a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer 
+Date: Fri, 28 May 2021 21:37:26 +0200
+Subject: [PATCH] avcodec/aacenc: Avoid 0 lambda
+
+Fixes: Ticket8003
+Fixes: CVE-2020-20453
+
+Signed-off-by: Michael Niedermayer 
+
+CVE: CVE-2020-20453
+Upstream-Status: Backport [a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8]
+
+Signed-off-by: Tony Tascioglu 
+---
+ libavcodec/aacenc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
+index aa223cf25f..e80591ba86 100644
+--- a/libavcodec/aacenc.c
 b/libavcodec/aacenc.c
+@@ -28,6 +28,7 @@
+  *  TODOs:
+  * add sane pulse detection
+  ***/
++#include 
+ 
+ #include "libavutil/libm.h"
+ #include "libavutil/float_dsp.h"
+@@ -852,7 +853,7 @@ static int aac_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
+ /* Not so fast though */
+ ratio = sqrtf(ratio);
+ }
+-s->lambda = FFMIN(s->lambda * ratio, 65536.f);
++s->lambda = av_clipf(s->lambda * ratio, FLT_MIN, 65536.f);
+ 
+ /* Keep iterating if we must reduce and lambda is in the sky */
+ if (ratio > 0.9f && ratio < 1.1f) {
+-- 
+2.32.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 00640f3cb3..198a44efec 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -26,6 +26,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \

file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \
file://fix-CVE-2020-20446.patch \
+   file://fix-CVE-2020-20453.patch \
"
 SRC_URI[sha256sum] = 
"06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909"
 
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154190): 
https://lists.openembedded.org/g/openembedded-core/message/154190
Mute This Topic: https://lists.openembedded.org/mt/84494529/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/6] ffmpeg: fix-CVE-2020-20446

2021-07-27 Thread Tony Tascioglu
avcodec/aacpsy: Avoid floating point division by 0 of norm_fac

Fixes: Ticket7995
Fixes: CVE-2020-20446

Signed-off-by: Michael Niedermayer 

CVE: CVE-2020-20446
Upstream-Status: Backport [223b5e8ac9f6461bb13ed365419ec485c5b2b002]

Signed-off-by: Tony Tascioglu 
---
 .../ffmpeg/ffmpeg/fix-CVE-2020-20446.patch| 35 +++
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb  |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 
meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch 
b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch
new file mode 100644
index 00..f048c2e715
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20446.patch
@@ -0,0 +1,35 @@
+From 223b5e8ac9f6461bb13ed365419ec485c5b2b002 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer 
+Date: Fri, 28 May 2021 20:18:25 +0200
+Subject: [PATCH] avcodec/aacpsy: Avoid floating point division by 0 of
+ norm_fac
+
+Fixes: Ticket7995
+Fixes: CVE-2020-20446
+
+Signed-off-by: Michael Niedermayer 
+
+CVE: CVE-2020-20446
+Upstream-Status: Backport [223b5e8ac9f6461bb13ed365419ec485c5b2b002]
+
+Signed-off-by: Tony Tascioglu 
+---
+ libavcodec/aacpsy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
+index 482113d427..e51d29750b 100644
+--- a/libavcodec/aacpsy.c
 b/libavcodec/aacpsy.c
+@@ -794,7 +794,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, 
int channel,
+ 
+ if (pe < 1.15f * desired_pe) {
+ /* 6.6.1.3.6 "Final threshold modification by linearization" */
+-norm_fac = 1.0f / norm_fac;
++norm_fac = norm_fac ? 1.0f / norm_fac : 0;
+ for (w = 0; w < wi->num_windows*16; w += 16) {
+ for (g = 0; g < num_bands; g++) {
+ AacPsyBand *band = >band[w+g];
+-- 
+2.32.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 3ed009bbb7..00640f3cb3 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -25,6 +25,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
 SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \

file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \
+   file://fix-CVE-2020-20446.patch \
"
 SRC_URI[sha256sum] = 
"06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909"
 
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154188): 
https://lists.openembedded.org/g/openembedded-core/message/154188
Mute This Topic: https://lists.openembedded.org/mt/84494527/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] use wic to create GPT only

2021-07-27 Thread Vasyl Vavrychuk
Hi,

Can I use wic to create GPT binary only according to WKS file, not complete 
disk.

I need this since I use Android fastboot to flash eMMC, so I can flash it 
partition by partition instead of entire eMMC, but I need some method to 
generate GPT binary.

Thanks,
Vasyl

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154186): 
https://lists.openembedded.org/g/openembedded-core/message/154186
Mute This Topic: https://lists.openembedded.org/mt/84493324/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] license_image: Use sstate to populate license directory

2021-07-27 Thread Douglas via lists.openembedded.org
On Sat, 3 Jul 2021 at 00:35, Alexandre Belloni
 wrote:
> On 02/07/2021 09:44:37+1200, Douglas via lists.openembedded.org wrote:
> > We were getting an endlessly-growing list of directories in
> > build/tmp/deploy/licenses/ of the form myimage-mymachine-20210629010203.
> > Use the normal sstate behaviour to clean them. Brings license_image in
> > line with the do_populate_lic behaviour in license.bbclass.
> >
> > We must only clean the (new) WORKDIR/license-destdir at do_rootfs time,
> > as the write_package_manifest and license_create_manifest rootfs
> > postprocess commands write the package.manifest and license.manifest
> > files at that time. They get stored in the sstate cache at
> > do_populate_lic_deploy time, alongside the image_license.manifest.
> >
> > Looks like this:
> >
> > license-destdir/
> > ├── myimage-mymachine -> myimage-mymachine-20210629025723/
> > └── myimage-mymachine-20210629025723/
> > ├── image_license.manifest
> > ├── license.manifest
> > └── package.manifest
> >
>
> This ran on the autobuilders and I do believe it is the cause of the
> following failures:
>
> https://autobuilder.yoctoproject.org/typhoon/#builders/79/builds/2269/steps/14/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#builders/86/builds/2247/steps/14/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#builders/87/builds/2282/steps/14/logs/stdio
>
> Those seem to be pseudo aborts because the link is changing.

Why would pseudo abort when the link changes? Replacing a symlink
seems harmless enough ... any ideas?


> > Signed-off-by: Douglas Royds 
> > ---
> >  meta/classes/license_image.bbclass | 38 +-
> >  1 file changed, 22 insertions(+), 16 deletions(-)
> >
> > diff --git a/meta/classes/license_image.bbclass 
> > b/meta/classes/license_image.bbclass
> > index 73cebb4d55e..30204b47b1c 100644
> > --- a/meta/classes/license_image.bbclass
> > +++ b/meta/classes/license_image.bbclass
> > @@ -1,8 +1,9 @@
> >  ROOTFS_LICENSE_DIR = "${IMAGE_ROOTFS}/usr/share/common-licenses"
> > +LICSSTATEDIR = "${WORKDIR}/license-destdir/"
> >
> >  python write_package_manifest() {
> >  # Get list of installed packages
> > -license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
> > +license_image_dir = d.expand('${LICSSTATEDIR}/${IMAGE_NAME}')
> >  bb.utils.mkdirhier(license_image_dir)
> >  from oe.rootfs import image_list_installed_packages
> >  from oe.utils import format_pkg_list
> > @@ -32,7 +33,7 @@ python license_create_manifest() {
> >  pkg_lic_name = "LICENSE_" + pkg_name
> >  pkg_dic[pkg_name]["LICENSE"] = pkg_dic[pkg_name][pkg_lic_name]
> >
> > -rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY'),
> > +rootfs_license_manifest = os.path.join(d.getVar('LICSSTATEDIR'),
> >  d.getVar('IMAGE_NAME'), 'license.manifest')
> >  write_license_files(d, rootfs_license_manifest, pkg_dic, rootfs=True)
> >  }
> > @@ -196,23 +197,18 @@ def license_deployed_manifest(d):
> >  key,val = line.split(": ", 1)
> >  man_dic[dep][key] = val[:-1]
> >
> > -lic_manifest_dir = os.path.join(d.getVar('LICENSE_DIRECTORY'),
> > -d.getVar('IMAGE_NAME'))
> > -bb.utils.mkdirhier(lic_manifest_dir)
> > -image_license_manifest = os.path.join(lic_manifest_dir, 
> > 'image_license.manifest')
> > +licsstatedir = d.getVar('LICSSTATEDIR')
> > +image_name = d.getVar('IMAGE_NAME')
> > +image_license_manifest = os.path.join(licsstatedir, image_name, 
> > 'image_license.manifest')
> >  write_license_files(d, image_license_manifest, man_dic, rootfs=False)
> >
> >  link_name = d.getVar('IMAGE_LINK_NAME')
> >  if link_name:
> > -lic_manifest_symlink_dir = 
> > os.path.join(d.getVar('LICENSE_DIRECTORY'),
> > -link_name)
> > -# remove old symlink
> > -if os.path.islink(lic_manifest_symlink_dir):
> > -os.unlink(lic_manifest_symlink_dir)
> > -
> > -# create the image dir symlink
> > -if lic_manifest_dir != lic_manifest_symlink_dir:
> > -os.symlink(lic_manifest_dir, lic_manifest_symlink_dir)
> > +if image_name != link_name:
> > +link_path = os.path.join(licsstatedir, link_name)
> > +if os.path.lexists(link_path):
> > +os.remove(link_path)
> > +os.symlink(image_name, link_path)
> >
> >  def get_deployed_dependencies(d):
> >  """
> > @@ -260,14 +256,24 @@ def get_deployed_files(man_file):
> >  return dep_files
> >
> >  ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; 
> > license_create_manifest; "
> > +do_rootfs[cleandirs] += "${LICSSTATEDIR}"
> >  do_rootfs[recrdeptask] += "do_populate_lic"
> >
> >  python do_populate_lic_deploy() {
> >  license_deployed_manifest(d)
> >  }
> > -
> >  addtask 

[OE-core] [PATCH] stress-ng: Drop defining daddr_t

2021-07-27 Thread Khem Raj
This is fixed differently upstream [1]

[1] 
https://github.com/ColinIanKing/stress-ng/commit/7e150ab18b0e8954ca426eb5366000a8f0d01110
Signed-off-by: Khem Raj 
---
 .../stress-ng/stress-ng/no_daddr_t.patch  | 32 ---
 .../stress-ng/stress-ng_0.12.12.bb|  2 --
 2 files changed, 34 deletions(-)
 delete mode 100644 meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch

diff --git a/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch 
b/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch
deleted file mode 100644
index dba4494b91..00
--- a/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 55e11765af2bdc8adfac87dab1fb2682f7e6c236 Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Tue, 9 Jun 2020 22:10:28 -0700
-Subject: [PATCH] Define daddr_t if __DADDR_T_TYPE is not defined
-
-glibc defined daddr_t but musl does not, ideally it should not be used
-and simple int type is enough. However, its better to leave glibc behavior
-as it is and only define it to int if daddr_t is not provided by libc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj 
-

- stress-ng.h | 4 
- 1 file changed, 4 insertions(+)
-
-diff --git a/stress-ng.h b/stress-ng.h
-index 1a66293..802dc25 100644
 a/stress-ng.h
-+++ b/stress-ng.h
-@@ -3763,6 +3763,10 @@ struct shim_statx {
-   uint64_t __spare2[14];
- };
- 
-+#ifndef __DADDR_T_TYPE
-+typedef int daddr_t;
-+#endif
-+
- /* old ustat struct */
- struct shim_ustat {
- #if defined(HAVE_DADDR_T)
diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.12.12.bb 
b/meta/recipes-extended/stress-ng/stress-ng_0.12.12.bb
index 97eaa75d18..430eac0d87 100644
--- a/meta/recipes-extended/stress-ng/stress-ng_0.12.12.bb
+++ b/meta/recipes-extended/stress-ng/stress-ng_0.12.12.bb
@@ -7,7 +7,6 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRC_URI = "https://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \

file://0001-Do-not-preserve-ownership-when-installing-example-jo.patch \
-   file://no_daddr_t.patch \
"
 SRC_URI[sha256sum] = 
"f27af50f6f2308e707fef927674bdd209a046b116734281b792aeca35a4e4499"
 
@@ -24,4 +23,3 @@ do_install() {
 oe_runmake DESTDIR=${D} install
 ln -s stress-ng ${D}${bindir}/stress
 }
-
-- 
2.32.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154184): 
https://lists.openembedded.org/g/openembedded-core/message/154184
Mute This Topic: https://lists.openembedded.org/mt/84490969/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] systemd: Fix build on musl

2021-07-27 Thread Khem Raj
Latest upgrade to 249 broke a working build on musl, this is incremental
fix to exisiting patches adapted to 249 release

Signed-off-by: Khem Raj 
Cc: Luca Boccassi 
---
 ...002-don-t-use-glibc-specific-qsort_r.patch |  24 +--
 ...missing.h-check-for-missing-strndupa.patch | 173 +-
 .../0006-Include-netinet-if_ether.h.patch | 147 ---
 ...OB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch |  20 +-
 ...T_SYMLINK_NOFOLLOW-flag-to-faccessat.patch |  14 +-
 ...-not-disable-buffer-in-writing-files.patch | 143 ++-
 .../systemd/0026-Handle-missing-gshadow.patch |  18 +-
 7 files changed, 247 insertions(+), 292 deletions(-)

diff --git 
a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch 
b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
index 4cdf66e767..9db22cd9d2 100644
--- 
a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ 
b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
@@ -19,11 +19,9 @@ Signed-off-by: Luca Boccassi 
  src/shared/format-table.c  | 36 --
  3 files changed, 38 insertions(+), 31 deletions(-)
 
-diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
-index 49586a4a24..d92a5ab0ed 100644
 --- a/src/basic/sort-util.h
 +++ b/src/basic/sort-util.h
-@@ -55,18 +55,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, 
size_t size, __compar_f
+@@ -56,18 +56,4 @@ static inline void _qsort_safe(void *bas
  _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) 
_func_); \
  })
  
@@ -42,11 +40,9 @@ index 49586a4a24..d92a5ab0ed 100644
 -})
 -
  int cmp_int(const int *a, const int *b);
-diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c 
b/src/libsystemd/sd-hwdb/hwdb-util.c
-index fd45ff0f54..ac4b63c49b 100644
 a/src/libsystemd/sd-hwdb/hwdb-util.c
-+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
-@@ -126,9 +126,13 @@ static struct trie* trie_free(struct trie *trie) {
+--- a/src/shared/hwdb-util.c
 b/src/shared/hwdb-util.c
+@@ -127,9 +127,13 @@ static struct trie* trie_free(struct tri
  
  DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
  
@@ -63,7 +59,7 @@ index fd45ff0f54..ac4b63c49b 100644
  }
  
  static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -156,7 +160,10 @@ static int trie_node_add_value(struct trie *trie, struct 
trie_node *node,
+@@ -157,7 +161,10 @@ static int trie_node_add_value(struct tr
  .value_off = v,
  };
  
@@ -75,7 +71,7 @@ index fd45ff0f54..ac4b63c49b 100644
  if (val) {
  /* At this point we have 2 identical properties on 
the same match-string.
   * Since we process files in order, we just replace 
the previous value. */
-@@ -182,7 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct 
trie_node *node,
+@@ -183,7 +190,9 @@ static int trie_node_add_value(struct tr
  .line_number = line_number,
  };
  node->values_count++;
@@ -86,11 +82,9 @@ index fd45ff0f54..ac4b63c49b 100644
  return 0;
  }
  
-diff --git a/src/shared/format-table.c b/src/shared/format-table.c
-index dccb796b26..c3ab8ac296 100644
 --- a/src/shared/format-table.c
 +++ b/src/shared/format-table.c
-@@ -1290,30 +1290,32 @@ static int cell_data_compare(TableData *a, size_t 
index_a, TableData *b, size_t
+@@ -1282,30 +1282,32 @@ static int cell_data_compare(TableData *
  return CMP(index_a, index_b);
  }
  
@@ -133,7 +127,7 @@ index dccb796b26..c3ab8ac296 100644
  }
  
  /* Order identical lines by the order there were originally added in 
*/
-@@ -1952,7 +1954,12 @@ int table_print(Table *t, FILE *f) {
+@@ -1944,7 +1946,12 @@ int table_print(Table *t, FILE *f) {
  for (size_t i = 0; i < n_rows; i++)
  sorted[i] = i * t->n_columns;
  
@@ -147,7 +141,7 @@ index dccb796b26..c3ab8ac296 100644
  }
  
  if (t->display_map)
-@@ -2580,7 +2587,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
+@@ -2572,7 +2579,12 @@ int table_to_json(Table *t, JsonVariant
  for (size_t i = 0; i < n_rows; i++)
  sorted[i] = i * t->n_columns;
  
diff --git 
a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
 
b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
index 814c28f5b9..c863fc995c 100644
--- 
a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ 
b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -74,14 +74,14 @@ Signed-off-by: Luca Boccassi 
 
 --- a/meson.build
 +++ b/meson.build
-@@ -550,6 +550,7 @@ foreach ident : [
- ['execveat',  '''#include '''],
- ['close_range',   '''#include '''],
- 

[OE-core] [hardknott][PATCH] glibc: Fix CVE-2021-33574

2021-07-27 Thread Vinay Kumar
Source: https://sourceware.org/git/glibc.git
Tracking -- https://sourceware.org/bugzilla/show_bug.cgi?id=27896

Backported upstream commit 42d359350510506b87101cf77202fefcbfc790cb to
glibc-2.33 source with dependent commit id 
217b6dc298156bdb0d6aea9ea93e7e394a5ff091.

Upstream-Status: Backport 
[https://sourceware.org/git/?p=glibc.git;a=commit;h=42d359350510506b87101cf77202fefcbfc790cb]

Signed-off-by: Vinay Kumar 
---
 .../glibc/glibc/CVE-2021-33574.patch  | 61 +++
 meta/recipes-core/glibc/glibc_2.33.bb |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2021-33574.patch

diff --git a/meta/recipes-core/glibc/glibc/CVE-2021-33574.patch 
b/meta/recipes-core/glibc/glibc/CVE-2021-33574.patch
new file mode 100644
index 00..fd73b23c88
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2021-33574.patch
@@ -0,0 +1,61 @@
+From 42d359350510506b87101cf77202fefcbfc790cb Mon Sep 17 00:00:00 2001
+From: Andreas Schwab 
+Date: Thu, 27 May 2021 12:49:47 +0200
+Subject: [PATCH] Use __pthread_attr_copy in mq_notify (bug 27896)
+
+Make a deep copy of the pthread attribute object to remove a potential
+use-after-free issue.
+
+Upstream-Status: Backport 
[https://sourceware.org/git/?p=glibc.git;a=commit;h=42d359350510506b87101cf77202fefcbfc790cb]
+CVE: CVE-2021-33574
+Signed-off-by: Vinay Kumar 
+---
+diff --git a/sysdeps/unix/sysv/linux/mq_notify.c 
b/sysdeps/unix/sysv/linux/mq_notify.c
+index cc575a0cdd8..6f46d29d1dc 100644
+--- a/sysdeps/unix/sysv/linux/mq_notify.c
 b/sysdeps/unix/sysv/linux/mq_notify.c
+@@ -133,8 +133,11 @@ helper_thread (void *arg)
+   (void) __pthread_barrier_wait (_barrier);
+   }
+   else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED)
+-  /* The only state we keep is the copy of the thread attributes.  */
+-  free (data.attr);
++  {
++/* The only state we keep is the copy of the thread attributes.  */
++pthread_attr_destroy (data.attr);
++free (data.attr);
++  }
+ }
+   return NULL;
+ }
+@@ -255,8 +258,14 @@ mq_notify (mqd_t mqdes, const struct sigevent 
*notification)
+   if (data.attr == NULL)
+   return -1;
+ 
+-  memcpy (data.attr, notification->sigev_notify_attributes,
+-sizeof (pthread_attr_t));
++  int ret = __pthread_attr_copy (data.attr,
++   notification->sigev_notify_attributes);
++  if (ret != 0)
++  {
++free (data.attr);
++__set_errno (ret);
++return -1;
++  }
+ }
+ 
+   /* Construct the new request.  */
+@@ -269,8 +278,11 @@ mq_notify (mqd_t mqdes, const struct sigevent 
*notification)
+   int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, );
+ 
+   /* If it failed, free the allocated memory.  */
+-  if (__glibc_unlikely (retval != 0))
+-free (data.attr);
++  if (retval != 0 && data.attr != NULL)
++{
++  pthread_attr_destroy (data.attr);
++  free (data.attr);
++}
+ 
+   return retval;
+ }
diff --git a/meta/recipes-core/glibc/glibc_2.33.bb 
b/meta/recipes-core/glibc/glibc_2.33.bb
index 75a1f36d6b..4b54a0dd59 100644
--- a/meta/recipes-core/glibc/glibc_2.33.bb
+++ b/meta/recipes-core/glibc/glibc_2.33.bb
@@ -61,6 +61,7 @@ SRC_URI =  "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch \
file://CVE-2021-27645.patch \
file://0001-nptl-Remove-private-futex-optimization-BZ-27304.patch \
+   file://CVE-2021-33574.patch \
"
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build-${TARGET_SYS}"
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154182): 
https://lists.openembedded.org/g/openembedded-core/message/154182
Mute This Topic: https://lists.openembedded.org/mt/84489140/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] glibc: Fix CVE-2021-33574

2021-07-27 Thread Vinay Kumar
Source: https://sourceware.org/git/glibc.git
Tracking -- https://sourceware.org/bugzilla/show_bug.cgi?id=27896

Backported upstream commit 42d359350510506b87101cf77202fefcbfc790cb to
glibc-2.33 source with dependent commit id 
217b6dc298156bdb0d6aea9ea93e7e394a5ff091.

Upstream-Status: Backport 
[https://sourceware.org/git/?p=glibc.git;a=commit;h=42d359350510506b87101cf77202fefcbfc790cb]

Signed-off-by: Vinay Kumar 
---
 .../glibc/glibc/CVE-2021-33574.patch  | 61 +++
 meta/recipes-core/glibc/glibc_2.33.bb |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2021-33574.patch

diff --git a/meta/recipes-core/glibc/glibc/CVE-2021-33574.patch 
b/meta/recipes-core/glibc/glibc/CVE-2021-33574.patch
new file mode 100644
index 00..fd73b23c88
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2021-33574.patch
@@ -0,0 +1,61 @@
+From 42d359350510506b87101cf77202fefcbfc790cb Mon Sep 17 00:00:00 2001
+From: Andreas Schwab 
+Date: Thu, 27 May 2021 12:49:47 +0200
+Subject: [PATCH] Use __pthread_attr_copy in mq_notify (bug 27896)
+
+Make a deep copy of the pthread attribute object to remove a potential
+use-after-free issue.
+
+Upstream-Status: Backport 
[https://sourceware.org/git/?p=glibc.git;a=commit;h=42d359350510506b87101cf77202fefcbfc790cb]
+CVE: CVE-2021-33574
+Signed-off-by: Vinay Kumar 
+---
+diff --git a/sysdeps/unix/sysv/linux/mq_notify.c 
b/sysdeps/unix/sysv/linux/mq_notify.c
+index cc575a0cdd8..6f46d29d1dc 100644
+--- a/sysdeps/unix/sysv/linux/mq_notify.c
 b/sysdeps/unix/sysv/linux/mq_notify.c
+@@ -133,8 +133,11 @@ helper_thread (void *arg)
+   (void) __pthread_barrier_wait (_barrier);
+   }
+   else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED)
+-  /* The only state we keep is the copy of the thread attributes.  */
+-  free (data.attr);
++  {
++/* The only state we keep is the copy of the thread attributes.  */
++pthread_attr_destroy (data.attr);
++free (data.attr);
++  }
+ }
+   return NULL;
+ }
+@@ -255,8 +258,14 @@ mq_notify (mqd_t mqdes, const struct sigevent 
*notification)
+   if (data.attr == NULL)
+   return -1;
+ 
+-  memcpy (data.attr, notification->sigev_notify_attributes,
+-sizeof (pthread_attr_t));
++  int ret = __pthread_attr_copy (data.attr,
++   notification->sigev_notify_attributes);
++  if (ret != 0)
++  {
++free (data.attr);
++__set_errno (ret);
++return -1;
++  }
+ }
+ 
+   /* Construct the new request.  */
+@@ -269,8 +278,11 @@ mq_notify (mqd_t mqdes, const struct sigevent 
*notification)
+   int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, );
+ 
+   /* If it failed, free the allocated memory.  */
+-  if (__glibc_unlikely (retval != 0))
+-free (data.attr);
++  if (retval != 0 && data.attr != NULL)
++{
++  pthread_attr_destroy (data.attr);
++  free (data.attr);
++}
+ 
+   return retval;
+ }
diff --git a/meta/recipes-core/glibc/glibc_2.33.bb 
b/meta/recipes-core/glibc/glibc_2.33.bb
index 925efe8cc6..e9f01a14c5 100644
--- a/meta/recipes-core/glibc/glibc_2.33.bb
+++ b/meta/recipes-core/glibc/glibc_2.33.bb
@@ -57,6 +57,7 @@ SRC_URI =  "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \

file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \
file://mte-backports.patch \
+   file://CVE-2021-33574.patch \
"
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build-${TARGET_SYS}"
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154181): 
https://lists.openembedded.org/g/openembedded-core/message/154181
Mute This Topic: https://lists.openembedded.org/mt/84488573/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [master][PATCH 3/4] bitbake.conf: add DEBUG_PREFIX_MAP to TARGET_LDFLAGS

2021-07-27 Thread Khem Raj



On 7/27/21 6:36 AM, Tony Battersby wrote:

-f*-prefix-map flags are required when linking with LTO enabled to make
the output binary reproducible.

See discussion here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101473

[YOCTO #14481]



Looks ok


Signed-off-by: Tony Battersby 
---

/usr/sbin/lspci from pciutils is a good program to test that shows how
adding -f*-prefix-map to LDFLAGS makes a program binary reproducible
with LTO enabled.

  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 160abf40ee..c0d2e3f82f 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -595,7 +595,7 @@ TARGET_LINK_HASH_STYLE ?= 
"${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_
  ASNEEDED ?= "-Wl,--as-needed"
  
  export LDFLAGS = "${TARGET_LDFLAGS}"

-TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
+TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} 
${DEBUG_PREFIX_MAP}"
  # mips does not support GNU hash style therefore we override
  LINKER_HASH_STYLE_mipsarch_libc-musl = "sysv"
  







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154180): 
https://lists.openembedded.org/g/openembedded-core/message/154180
Mute This Topic: https://lists.openembedded.org/mt/84481698/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [master][PATCH 2/4] gcc: Backport patch to make LTO builds more reproducible

2021-07-27 Thread Khem Raj



On 7/27/21 6:36 AM, Tony Battersby wrote:

Backport ustream gcc patch that enables -fdebug-prefix-map to cover
additional cases with LTO enabled to make LTO builds more reproducible.

[YOCTO #14481]

Signed-off-by: Tony Battersby 
---
  meta/recipes-devtools/gcc/gcc-11.1.inc|  1 +
  ...prefix-maps-before-checksumming-DIEs.patch | 95 +++
  2 files changed, 96 insertions(+)
  create mode 100644 
meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch

diff --git a/meta/recipes-devtools/gcc/gcc-11.1.inc 
b/meta/recipes-devtools/gcc/gcc-11.1.inc
index c21242af58..167fddb65a 100644
--- a/meta/recipes-devtools/gcc/gcc-11.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.1.inc
@@ -72,6 +72,7 @@ SRC_URI = "\
 file://0038-arc-Update-64bit-move-split-patterns.patch \
 file://0039-arc-Fix-u-maddhisi-patterns.patch \
 file://0040-arc-Update-doloop_end-patterns.patch \
+   file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \
  "
  SRC_URI[sha256sum] = 
"4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf"
  SRC_URI[backports.sha256sum] = 
"69274bebd6c069a13443d4af61070e854740a639ec4d66eedf3e80070363587b"
diff --git 
a/meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch
 
b/meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch
new file mode 100644
index 00..c8dcd74b9d
--- /dev/null
+++ 
b/meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch
@@ -0,0 +1,95 @@
+From 7cc2df084b7977653a9b59cbc34a9ad500ae619c Mon Sep 17 00:00:00 2001
+From: Richard Biener 
+Date: Tue, 20 Jul 2021 11:00:33 +0200
+Subject: [PATCH] debug/101473 - apply debug prefix maps before checksumming 
DIEs
+
+The following makes sure to apply the debug prefix maps to filenames
+before checksumming DIEs to create the global symbol for the CU DIE
+used by LTO to link the late debug to the early debug.  This avoids
+binary differences (in said symbol) when compiling with toolchains
+installed under a different path and that compensated with appropriate
+-fdebug-prefix-map options.
+
+The easiest and most scalable way is to record both the unmapped
+and the remapped filename in the dwarf_file_data so the remapping
+process takes place at a single point and only once (otherwise it
+creates GC garbage at each point doing that).
+
+2021-07-20  Richard Biener  
+
+   PR debug/101473
+   * dwarf2out.h (dwarf_file_data): Add key member.
+   * dwarf2out.c (dwarf_file_hasher::equal): Compare key.
+   (dwarf_file_hasher::hash): Hash key.
+   (lookup_filename): Remap the filename and store it in the
+   filename member of dwarf_file_data when creating a new
+   dwarf_file_data.
+   (file_name_acquire): Do not remap the filename again.
+   (maybe_emit_file): Likewise.
+
+[YOCTO #14481]
+
+Upstream-Status: Backport 
[https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7cc2df084b7977653a9b59cbc34a9ad500ae619c]



looks ok.



+
+The upstream patch was modified to compensate for the definition of
+"struct dwarf_file_data" being in dwarf2out.c rather than dwarf2out.h in
+this version of gcc.
+
+Signed-off-by: Tony Battersby 
+---
+diff -urpN a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+--- a/gcc/dwarf2out.c  2021-04-27 06:00:13.0 -0400
 b/gcc/dwarf2out.c  2021-07-23 16:40:06.141886167 -0400
+@@ -1283,6 +1283,7 @@ dwarf2out_switch_text_section (void)
+
+ /* Data about a single source file.  */
+ struct GTY((for_user)) dwarf_file_data {
++  const char * key;
+   const char * filename;
+   int emitted_number;
+ };
+@@ -12334,7 +12335,7 @@ file_name_acquire (dwarf_file_data **slo
+
+   fi = fnad->files + fnad->used_files++;
+
+-  f = remap_debug_filename (d->filename);
++  f = d->filename;
+
+   /* Skip all leading "./".  */
+   while (f[0] == '.' && IS_DIR_SEPARATOR (f[1]))
+@@ -27231,13 +27232,13 @@ dwarf2out_ignore_block (const_tree block
+ bool
+ dwarf_file_hasher::equal (dwarf_file_data *p1, const char *p2)
+ {
+-  return filename_cmp (p1->filename, p2) == 0;
++  return filename_cmp (p1->key, p2) == 0;
+ }
+
+ hashval_t
+ dwarf_file_hasher::hash (dwarf_file_data *p)
+ {
+-  return htab_hash_string (p->filename);
++  return htab_hash_string (p->key);
+ }
+
+ /* Lookup FILE_NAME (in the list of filenames that we know about here in
+@@ -27267,7 +27268,8 @@ lookup_filename (const char *file_name)
+ return *slot;
+
+   created = ggc_alloc ();
+-  created->filename = file_name;
++  created->key = file_name;
++  created->filename = remap_debug_filename (file_name);
+   created->emitted_number = 0;
+   *slot = created;
+   return created;
+@@ -27293,8 +27295,7 @@ maybe_emit_file (struct dwarf_file_data
+   if (output_asm_line_debug_info ())
+   {
+ fprintf (asm_out_file, "\t.file %u ", fd->emitted_number);
+-output_quoted_string (asm_out_file,
+-  

[OE-core][PATCH] mesa: Fix v3d & vc4 dmabuf import

2021-07-27 Thread Joshua Watt
Mesa would unnecessarily fail in the v3d and vc4 driver if a dmabuf
could not imported for scanout. In particular, this meant the
weston-simple-dmabuf-egl test program would fail on a Raspberry Pi.

Signed-off-by: Joshua Watt 
---
 ...mabuf-import-for-non-scanout-buffers.patch | 72 +++
 meta/recipes-graphics/mesa/mesa.inc   |  1 +
 2 files changed, 73 insertions(+)
 create mode 100644 
meta/recipes-graphics/mesa/files/0001-v3d-vc4-Fix-dmabuf-import-for-non-scanout-buffers.patch

diff --git 
a/meta/recipes-graphics/mesa/files/0001-v3d-vc4-Fix-dmabuf-import-for-non-scanout-buffers.patch
 
b/meta/recipes-graphics/mesa/files/0001-v3d-vc4-Fix-dmabuf-import-for-non-scanout-buffers.patch
new file mode 100644
index 00..1a8771028b
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/files/0001-v3d-vc4-Fix-dmabuf-import-for-non-scanout-buffers.patch
@@ -0,0 +1,72 @@
+From 303c02a31df4e2b8f6090e75982922a9cba33e4c Mon Sep 17 00:00:00 2001
+From: Joshua Watt 
+Date: Tue, 27 Jul 2021 11:41:53 -0500
+Subject: [PATCH] v3d, vc4: Fix dmabuf import for non-scanout buffers
+
+Failure to create a buffer for scanout should not be fatal when
+importing a buffer. Buffers allocated from a render-only device may not
+be able to scanned out directly but can still be used for other
+rendering purposes (e.g. as a texture).
+
+Signed-off-by: Joshua Watt 
+Upstream-Status: Submitted 
[https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12081]
+---
+ src/gallium/drivers/v3d/v3d_resource.c | 13 +
+ src/gallium/drivers/vc4/vc4_resource.c |  3 ---
+ 2 files changed, 5 insertions(+), 11 deletions(-)
+
+diff --git a/src/gallium/drivers/v3d/v3d_resource.c 
b/src/gallium/drivers/v3d/v3d_resource.c
+index 602ba6d8447..02dc29ae6a0 100644
+--- a/src/gallium/drivers/v3d/v3d_resource.c
 b/src/gallium/drivers/v3d/v3d_resource.c
+@@ -433,10 +433,11 @@ v3d_resource_get_handle(struct pipe_screen *pscreen,
+ return v3d_bo_flink(bo, >handle);
+ case WINSYS_HANDLE_TYPE_KMS:
+ if (screen->ro) {
+-assert(rsc->scanout);
+-bool ok = renderonly_get_handle(rsc->scanout, 
whandle);
+-whandle->stride = rsc->slices[0].stride;
+-return ok;
++if (renderonly_get_handle(rsc->scanout, whandle)) {
++whandle->stride = rsc->slices[0].stride;
++return true;
++}
++return false;
+ }
+ whandle->handle = bo->handle;
+ return true;
+@@ -929,10 +930,6 @@ v3d_resource_from_handle(struct pipe_screen *pscreen,
+ renderonly_create_gpu_import_for_resource(prsc,
+   screen->ro,
+   NULL);
+-if (!rsc->scanout) {
+-fprintf(stderr, "Failed to create scanout 
resource.\n");
+-goto fail;
+-}
+ }
+ 
+ if (rsc->tiled && whandle->stride != slice->stride) {
+diff --git a/src/gallium/drivers/vc4/vc4_resource.c 
b/src/gallium/drivers/vc4/vc4_resource.c
+index 61e5fd7e5a6..bf3f7656ff8 100644
+--- a/src/gallium/drivers/vc4/vc4_resource.c
 b/src/gallium/drivers/vc4/vc4_resource.c
+@@ -320,7 +320,6 @@ vc4_resource_get_handle(struct pipe_screen *pscreen,
+ return vc4_bo_flink(rsc->bo, >handle);
+ case WINSYS_HANDLE_TYPE_KMS:
+ if (screen->ro) {
+-assert(rsc->scanout);
+ return renderonly_get_handle(rsc->scanout, whandle);
+ }
+ whandle->handle = rsc->bo->handle;
+@@ -689,8 +688,6 @@ vc4_resource_from_handle(struct pipe_screen *pscreen,
+ renderonly_create_gpu_import_for_resource(prsc,
+   screen->ro,
+   NULL);
+-if (!rsc->scanout)
+-goto fail;
+ }
+ 
+ if (rsc->tiled && whandle->stride != slice->stride) {
+-- 
+2.32.0
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 6a0df4fa2e..85a352f736 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -19,6 +19,7 @@ SRC_URI = 
"https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0002-meson.build-make-TLS-ELF-optional.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
+   file://0001-v3d-vc4-Fix-dmabuf-import-for-non-scanout-buffers.patch 
\
"
 
 SRC_URI[sha256sum] = 

Re: [OE-core][dunfell][PATCH v2 1/3] cmake-native: enabled zstd support

2021-07-27 Thread Andre McCurdy
On Tue, Jul 27, 2021 at 12:24 AM Richard Purdie
 wrote:
>
> On Mon, 2021-07-26 at 14:40 -1000, Steve Sakoman wrote:
> > On Mon, Jul 26, 2021 at 12:27 PM Ruslan Babayev (fib)  
> > wrote:
> > >
> > > Hi Steve,
> > >
> > > Thanks for reviewing the patches. I understand the problem of merging this
> > > patch as is.
> > > But Dunfell currently has a host contamination issue on systems with zstd
> > > installed as part of base OS resulting in broken cmake-native recipe. Can
> > > you help bring this up to the attention of the steering committee?
> >
> > Perhaps Richard can comment on this.  You are asking for a feature
> > change to dunfell that involves modifications in both
> > openembedded-core and meta-openembedded. So both technical steering
> > committees would need to agree that this is appropriate.
>
> We don't have to go straight to the TSC, the layer maintainers can try and
> agree a plan first.
>
> I've added Armin as meta-openembedded maintainer for dunfell.
>
> Context: cmake-native suffers host contamination on dunfell due to zstd being
> detected on the host. The upstream cmake community say they don't support
> configuring it without it.
>
> Do we agree we should move zstd from meta-oe to oe-core in dunfell to fix
> this? Should we patch cmake in dunfell to try and use it's own copy of zstd
> internally? The latter is more risky in that we've not tried that and multiple
> configures can be 'fun' in builds. Moving the recipe has a different kind of
> pain.

There's no need to move the recipe, just adding to oe-core should be enough.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154177): 
https://lists.openembedded.org/g/openembedded-core/message/154177
Mute This Topic: https://lists.openembedded.org/mt/84410822/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH pseudo 4/4] Do not return address of local variable

2021-07-27 Thread Seebs
On Tue, 27 Jul 2021 18:30:33 +0200
Damian Wrobel  wrote:

> The returned pointer has to be freed by the caller not by the callee
> function itself.

So, this predates the public release, but long ago, that was indeed
how it worked, and then LONG ago it was changed so that the pseudo_ipc
stuff always used the same object for its returns, so we weren't doing
alloc/free cycles all the time.

Which means that, in every *other* code path, if we return a non-nil
msg, it *must not* be freed.

I think probably the solution is to change that object to be static.
We can't make callers free the results unless we want them ALL to be
freed, which we absolutely don't, that's devastatingly expensive.

There is exactly one call with OP_CHROOT, and all it checks is whether
the return is null or not-null. I'd be mildly surprised by the
theoretically-invalid address of stack garbage actually causing a
problem on most modern systems, except that I think some systems have
started doing stack guards. But all we care about here is that the
address returned be a valid non-null pointer. Heck, we could use
_data, that already exists, is already static, and we don't
care about it.

(The reason the `msg` in that function isn't static is so it gets its
initializer every time. This is not a great reason.)

-s

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154176): 
https://lists.openembedded.org/g/openembedded-core/message/154176
Mute This Topic: https://lists.openembedded.org/mt/84479678/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH pseudo 1/4] Remove -fno-strict-aliasing and -Wno-deprecated-declarations

2021-07-27 Thread Seebs
On Tue, 27 Jul 2021 18:35:50 +0200
"Damian Wrobel"  wrote:

> Based on my experience, It's usually better to see this warning and
> fix the code instead of relying on the back magic.

Yes, but in the case of the strict aliasing stuff and function pointer
stuff, we really, really, *can't* not rely on the magic, because pseudo
*is* the magic.

-s

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154175): 
https://lists.openembedded.org/g/openembedded-core/message/154175
Mute This Topic: https://lists.openembedded.org/mt/84479676/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH pseudo 4/4] Do not return address of local variable

2021-07-27 Thread Damian Wrobel



  On Tue, 27 Jul 2021 17:47:12 +0200 Seebs  wrote 
 > On Tue, 27 Jul 2021 13:49:06 +0200
 > "Damian Wrobel"  wrote:
 > 
 > > Fixes the following warning:
 > >   pseudo_client.c: In function ‘pseudo_client_op’:
 > >   cc1: warning: function may return address of local variable
 > > [-Wreturn-local-addr] pseudo_client.c:1592:22: note: declared here
 > >1592 | pseudo_msg_t msg = { .type = PSEUDO_MSG_OP };
 > > |  ^~~
 > > 
 > > Signed-off-by: Damian Wrobel 
 > > ---
 > >  pseudo_client.c | 2 +-
 > >  1 file changed, 1 insertion(+), 1 deletion(-)
 > > 
 > > diff --git a/pseudo_client.c b/pseudo_client.c
 > > index 2583bca..f1d09ff 100644
 > > --- a/pseudo_client.c
 > > +++ b/pseudo_client.c
 > > @@ -1889,7 +1889,7 @@ pseudo_client_op(pseudo_op_t op, int access,
 > > int fd, int dirfd, const char *path case OP_CHROOT:
 > >  if (pseudo_client_chroot(path) == 0) {
 > >  /* return a non-zero value to show
 > > non-failure */
 > > -result = 
 > > +result = pseudo_msg_dup();
 > 
 > This is a memory leak.

If the function needs to return "pseudo_msg_t *", then it has to return a valid 
pointer.
Returning a pointer to a local non static variable is an error as this address 
becomes invalid immediately after this function returns.
The returned pointer has to be freed by the caller not by the callee function 
itself.

I didn't mention that in the commit message but with this fix I stopped to 
observing mysterious pseudo abort build failures (at least so far).
So I'm curious about your experience with it. In other words the revert made 
here[1] didn't help for our cases.

[1] 
http://git.yoctoproject.org/cgit/cgit.cgi/pseudo/commit/?h=oe-core=b988b0a6b8afd8d459bc9a2528e834f63a3d59b2

--
Regards,
Damian

 > 
 > That said, I have no idea how the underlying bug escaped notice all
 > this time, it's definitely a bug. I think it is actually safe to just
 > make msg be static, because pseudo_client_op is protected by a lock
 > and is never executed more than once at a time.
 > 
 > On reflection: I think the way it worked is that in that case, the
 > actual message isn't looked at, just checked for nullness, but this
 > is still undefined behavior because the result is a pointer to storage
 > after the storage's lifetime, and formally you can't even check those
 > for "is or isn't null".
 > 
 > -s
 > 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154174): 
https://lists.openembedded.org/g/openembedded-core/message/154174
Mute This Topic: https://lists.openembedded.org/mt/84479678/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH pseudo 1/4] Remove -fno-strict-aliasing and -Wno-deprecated-declarations

2021-07-27 Thread Damian Wrobel



  On Tue, 27 Jul 2021 17:49:27 +0200 Seebs  wrote 
 > On Tue, 27 Jul 2021 13:49:03 +0200
 > "Damian Wrobel"  wrote:
 > 
 > > -# no-strict-aliasing is needed for the function pointer trickery.
 > >  pseudo_wrappers.o: $(GUTS) pseudo_wrappers.c pseudo_wrapfuncs.c
 > > pseudo_wrapfuncs.h pseudo_tables.h
 > > -$(CC) -fno-strict-aliasing $(CFLAGS) $(CFLAGS_PSEUDO)
 > > -D_GNU_SOURCE -c -o pseudo_wrappers.o pseudo_wrappers.c
 > 
 > I would be really uncomfortable relying on that not being needed, even
 > if it happened to work in specific cases. The function pointer trickery
 > is black magic and very much undefined behavior, and warning the
 > compiler away from it seems reasonably likely to be advantageous.

Based on my experience, It's usually better to see this warning and fix the 
code instead of relying on the back magic.

--
Regards,
Damian

 > 
 > -s
 > 
 > 
 > 
 > 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154173): 
https://lists.openembedded.org/g/openembedded-core/message/154173
Mute This Topic: https://lists.openembedded.org/mt/84479676/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel-uboot: Handle gzip and lzo compression options

2021-07-27 Thread Marek Vasut
Since 5c72105e29 ("kernel-uboot: allow compression option to be configurable")
it is possible to select kernel compression method, however the resulting
image is always compressed with gzip, so selecting any other method than
gzip results in unbootable images. Add support for lzo for starters, since
that is fast to decompress and useful in low boot time scenarios.

Note that we should likely add some check for unsupported compression
methods. We should also add dependency on lzop-native I think.

Signed-off-by: Marek Vasut 
Cc: Richard Purdie 
Cc: Sinan Kaya 
---
 meta/classes/kernel-uboot.bbclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-uboot.bbclass 
b/meta/classes/kernel-uboot.bbclass
index b1e7ac05c2..2daa068298 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -22,7 +22,11 @@ uboot_prep_kimage() {
[ -n "${vmlinux_path}" ] && ${OBJCOPY} -O binary -R .note -R .comment 
-S "${vmlinux_path}" linux.bin
 
if [ "${linux_comp}" != "none" ] ; then
-   gzip -9 linux.bin
+   if [ "${linux_comp}" = "gzip" ] ; then
+   gzip -9 linux.bin
+   elif [ "${linux_comp}" = "lzo" ] ; then
+   lzop -9 linux.bin
+   fi
mv -f "linux.bin${linux_suffix}" linux.bin
fi
 
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154172): 
https://lists.openembedded.org/g/openembedded-core/message/154172
Mute This Topic: https://lists.openembedded.org/mt/84485611/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] image_types: Restore pre-btrfs-tools 4.14.1 mkfs.btrfs shrink behavior

2021-07-27 Thread Marek Vasut
Currently the mkfs.btrfs generates large images with a lot of wasted
space. This happens since OE-core updated btrfs-tools from 4.13.3 to
4.15.1 in commit 94b645aa77 ("btrfs-tools: update to 4.15.1") .

Note in mkfs.btrfs(8) manpage section -r says the following:
"
  -r|--rootdir 
...
   Note This option may enlarge the image or file to ensure
   it’s big enough to contain the files from rootdir. Since
   version 4.14.1 the filesystem size is not minimized. Please
   see option --shrink if you need that functionality.

  --shrink
 Shrink the filesystem to its minimal size, only works with
 --rootdir option.
...
   Note prior to version 4.14.1, the shrinking was done
   automatically.
"

Add the --shrink option to EXTRA_IMAGECMD_btrfs to reinstate the
original behavior and un-waste the space.

Signed-off-by: Marek Vasut 
Cc: Alexander Kanavin 
Cc: Richard Purdie 
Cc: Ross Burton 
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 954d6739ec..6b28cdbb3c 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -230,7 +230,7 @@ EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} 
--eraseblock=${JFFS2_ERASEBLO
 EXTRA_IMAGECMD_ext2 ?= "-i 4096"
 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
 EXTRA_IMAGECMD_ext4 ?= "-i 4096"
-EXTRA_IMAGECMD_btrfs ?= "-n 4096"
+EXTRA_IMAGECMD_btrfs ?= "-n 4096 --shrink"
 EXTRA_IMAGECMD_f2fs ?= ""
 
 do_image_cpio[depends] += "cpio-native:do_populate_sysroot"
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154171): 
https://lists.openembedded.org/g/openembedded-core/message/154171
Mute This Topic: https://lists.openembedded.org/mt/84485606/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH pseudo 1/4] Remove -fno-strict-aliasing and -Wno-deprecated-declarations

2021-07-27 Thread Seebs
On Tue, 27 Jul 2021 13:49:03 +0200
"Damian Wrobel"  wrote:

> -# no-strict-aliasing is needed for the function pointer trickery.
>  pseudo_wrappers.o: $(GUTS) pseudo_wrappers.c pseudo_wrapfuncs.c
> pseudo_wrapfuncs.h pseudo_tables.h
> - $(CC) -fno-strict-aliasing $(CFLAGS) $(CFLAGS_PSEUDO)
> -D_GNU_SOURCE -c -o pseudo_wrappers.o pseudo_wrappers.c

I would be really uncomfortable relying on that not being needed, even
if it happened to work in specific cases. The function pointer trickery
is black magic and very much undefined behavior, and warning the
compiler away from it seems reasonably likely to be advantageous.

-s

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154170): 
https://lists.openembedded.org/g/openembedded-core/message/154170
Mute This Topic: https://lists.openembedded.org/mt/84479676/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH pseudo 2/4] Do not pass null argument to pseudo_diag()

2021-07-27 Thread Seebs
On Tue, 27 Jul 2021 13:49:04 +0200
"Damian Wrobel"  wrote:

>   pseudo_diag("couldn't allocate absolute path for
> '%s'.\n",
> - path);
> + path ? path : "null");

Is there any actual code path where pseudo_root_path gets called on a
null path? I don't really object to the change, but I think that's
caught by guards elsewhere.

-s

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154169): 
https://lists.openembedded.org/g/openembedded-core/message/154169
Mute This Topic: https://lists.openembedded.org/mt/84479888/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH pseudo 4/4] Do not return address of local variable

2021-07-27 Thread Seebs
On Tue, 27 Jul 2021 13:49:06 +0200
"Damian Wrobel"  wrote:

> Fixes the following warning:
>   pseudo_client.c: In function ‘pseudo_client_op’:
>   cc1: warning: function may return address of local variable
> [-Wreturn-local-addr] pseudo_client.c:1592:22: note: declared here
>1592 | pseudo_msg_t msg = { .type = PSEUDO_MSG_OP };
> |  ^~~
> 
> Signed-off-by: Damian Wrobel 
> ---
>  pseudo_client.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pseudo_client.c b/pseudo_client.c
> index 2583bca..f1d09ff 100644
> --- a/pseudo_client.c
> +++ b/pseudo_client.c
> @@ -1889,7 +1889,7 @@ pseudo_client_op(pseudo_op_t op, int access,
> int fd, int dirfd, const char *path case OP_CHROOT:
>   if (pseudo_client_chroot(path) == 0) {
>   /* return a non-zero value to show
> non-failure */
> - result = 
> + result = pseudo_msg_dup();

This is a memory leak.

That said, I have no idea how the underlying bug escaped notice all
this time, it's definitely a bug. I think it is actually safe to just
make msg be static, because pseudo_client_op is protected by a lock
and is never executed more than once at a time.

On reflection: I think the way it worked is that in that case, the
actual message isn't looked at, just checked for nullness, but this
is still undefined behavior because the result is a pointer to storage
after the storage's lifetime, and formally you can't even check those
for "is or isn't null".

-s

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154168): 
https://lists.openembedded.org/g/openembedded-core/message/154168
Mute This Topic: https://lists.openembedded.org/mt/84479678/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [hardknott][PATCH v4] binutils: Fix CVE-2021-20197

2021-07-27 Thread Anuj Mittal
Hello,

On Mon, 2021-07-26 at 10:08 +0530, Vinay Kumar wrote:
> Hi Anuj,
> 
> Sent patches for review.
> 
> 1.    By splitting in to 3 patches.
>     [hardknott][PATCH v3] binutils: Fix CVE-2021-20197:
>     https://lists.openembedded.org/g/openembedded-core/message/153462

This has already been merged:

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=hardknott=db00b0a059013a19b333fd291bde8cee71fc6a11

Thanks,

Anuj


> 
> 2.    Cherry-pick of master branch
>     [hardknott][PATCH v4] binutils: Fix CVE-2021-20197
>     https://lists.openembedded.org/g/openembedded-core/message/153809
> 
> Please let me know if you feel any more information needed in the
> patches.
> 
> Regards,
> Vinay
> 
> On Tue, Jul 13, 2021 at 7:19 PM Vinay Kumar via lists.openembedded.org
>  wrote:
> > 
> > Hi Anuj,
> > 
> > This patch is a cherry-pick of
> > "f628b052f6c4a957472f2520adfb4b816ef83d95" from master branch.
> > 
> > Regards,
> > Vinay
> > 
> > On Tue, Jul 13, 2021 at 7:16 PM Vinay Kumar via
> > lists.openembedded.org
> >  wrote:
> > > 
> > > Source: git://sourceware.org/git/binutils-gdb.git
> > > Tracking -- https://sourceware.org/bugzilla/show_bug.cgi?id=26945
> > > 
> > > Backported upstream commit d3edaa91d4cf7202ec14342410194841e2f67f12
> > > to
> > > binutils-2.36 source along with commit id dependencies
> > > (8e03235147a9e774d3ba084e93c2da1aa94d1cec and
> > > 8b69e61d4be276bb862698aaafddc3e779d23c8f).
> > > 
> > > Upstream-Status: Backport
> > > [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3edaa91d4cf7202ec14342410194841e2f67f12
> > > ]
> > > 
> > > Signed-off-by: Vinay Kumar 
> > > ---
> > >  .../binutils/binutils-2.36.inc    |   1 +
> > >  .../binutils/binutils/CVE-2021-20197.patch    | 388
> > > ++
> > >  2 files changed, 389 insertions(+)
> > >  create mode 100644 meta/recipes-devtools/binutils/binutils/CVE-
> > > 2021-20197.patch
> > > 
> > > diff --git a/meta/recipes-devtools/binutils/binutils-2.36.inc
> > > b/meta/recipes-devtools/binutils/binutils-2.36.inc
> > > index 2968291889..6d0293b4bc 100644
> > > --- a/meta/recipes-devtools/binutils/binutils-2.36.inc
> > > +++ b/meta/recipes-devtools/binutils/binutils-2.36.inc
> > > @@ -41,5 +41,6 @@ SRC_URI = "\
> > >  
> > > file://0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
> > >   file://0015-sync-with-OE-libtool-changes.patch \
> > >  
> > > file://0016-Check-for-clang-before-checking-gcc-version.patch \
> > > + file://CVE-2021-20197.patch \
> > >  "
> > >  S  = "${WORKDIR}/git"
> > > diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2021-
> > > 20197.patch b/meta/recipes-devtools/binutils/binutils/CVE-2021-
> > > 20197.patch
> > > new file mode 100644
> > > index 00..d6117b65a4
> > > --- /dev/null
> > > +++ b/meta/recipes-devtools/binutils/binutils/CVE-2021-20197.patch
> > > @@ -0,0 +1,388 @@
> > > +From d3edaa91d4cf7202ec14342410194841e2f67f12 Mon Sep 17 00:00:00
> > > 2001
> > > +From: Alan Modra 
> > > +Date: Fri, 26 Feb 2021 11:30:32 +1030
> > > +Subject: [PATCH] Reinstate various pieces backed out from
> > > smart_rename changes
> > > +
> > > +In the interests of a stable release various last minute
> > > smart_rename
> > > +patches were backed out of the 2.36 branch.  The main reason to
> > > +reinstate some of those backed out changes here is to make
> > > necessary
> > > +followup fixes to commit 8e03235147a9 simple cherry-picks from
> > > +mainline.  A secondary reason is that ar -M support isn't fixed
> > > for
> > > +pr26945 without this patch.
> > > +
> > > +    PR 26945
> > > +    * ar.c: Don't include libbfd.h.
> > > +    (write_archive): Replace xmalloc+strcpy with xstrdup.
> > > +    * arsup.c (temp_name, real_ofd): New static variables.
> > > +    (ar_open): Use make_tempname and bfd_fdopenw.
> > > +    (ar_save): Adjust to suit ar_open changes.
> > > +    * objcopy.c: Don't include libbfd.h.
> > > +    * rename.c: Rename and reorder variables.
> > > +
> > > +(cherry picked from commit
> > > 95b91a043aeaeb546d2fea556d84a2de1e917770)
> > > +
> > > +Upstream-Status: Backport
> > > [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3edaa91d4cf7202ec14342410194841e2f67f12
> > > ]
> > > +CVE: CVE-2021-20197
> > > +Signed-off-by: Vinay Kumar 
> > > +---
> > > + binutils/ar.c  |   6 +-
> > > + binutils/arsup.c   |  37 
> > > + binutils/bucomm.h  |   3 +-
> > > + binutils/objcopy.c |   9 +--
> > > + binutils/rename.c  | 148 +++-
> > > -
> > > + 5 files changed, 67 insertions(+), 136 deletions(-)
> > > +
> > > +diff --git a/binutils/ar.c b/binutils/ar.c
> > > +index 45a34e3a6cf..44df48c5c67 100644
> > > +--- a/binutils/ar.c
> > >  b/binutils/ar.c
> > > +@@ -25,7 +25,6 @@
> > > +
> > > + #include "sysdep.h"
> > > + #include "bfd.h"
> > > +-#include "libbfd.h"
> > > + #include "libiberty.h"
> > > + #include "progress.h"
> > > + #include "getopt.h"
> > > 

[OE-core] Yocto Project Status WW30`21

2021-07-27 Thread Stephen Jolley
Current Dev Position: YP 3.4 M3

Next Deadline: 23rd Aug. 2021 YP 3.4 M3 build (Feature Freeze)

 

Next Team Meetings:

*   Bug Triage meeting Thursday July 29th at 7:30am PDT (

https://zoom.us/j/454367603?pwd=ZGxoa2ZXL3FkM3Y0bFd5aVpHVVZ6dz09)
*   Monthly Project Meeting Tuesday Aug. 3rd at 8am PDT (

https://zoom.us/j/990892712?pwd=cHU1MjhoM2x6ck81bkcrYjRrcmJsUT09
 )
*   Weekly Engineering Sync Tuesday July 27th at 8am PDT (

https://zoom.us/j/990892712?pwd=cHU1MjhoM2x6ck81bkcrYjRrcmJsUT09
 )
*   Twitch -  See https://www.twitch.tv/theyoctojester

 

Key Status/Updates:

*   YP 3.4 M2 was built and has been through QA however there were two
reported QA issues which have open questions that are being discussed
*   YP 3.3.2 is being built and YP 3.1.10 will follow that into QA
*   Support for the new override syntax was added to bitbake, for now
just translating to the old syntax. This means we can start converting
metadata to the new format. The plan would be to allow the new syntax with
older bitbake too using the same patch, allowing wider compatibility of
metadata layers.
*   We will likely start converting metadata to the new syntax over the
next week as test builds are starting to be fairly successful with OE-Core.
*   There are proposals to add lz4c, zstd and pzstd as required host
commands which we hope will allow better data archiving for license
information and possibly for bitbake hash debugging too. The groundwork for
this change has merged with the autobuilder workers being updated and the
tools added to buildtools-tarball.
*   The prserv rewrite is making progress but still has some issues with
python asyncio.
*   Intermittent issues are ongoing, particularly ptest ones. Help is
very much welcome on these issues. You can see the list of failures we're
continuing to see by searching for the "AB-INT" tag in bugzilla:

https://bugzilla.yoctoproject.org/buglist.cgi?quicksearch=AB-INT
*   The multiconfig changes in bitbake continue to cause problems, we
still need simpler test cases to reproduce issues rather than huge builds.
The existing patches seem to fix some workloads and break others and current
test cases are very slow to work with.

 

Ways to contribute:

*   There are bugs identified as possible for newcomers to the project:

https://wiki.yoctoproject.org/wiki/Newcomers
*   There are bugs that are currently unassigned for YP 3.4. See:

https://wiki.yoctoproject.org/wiki/Bug_Triage#Medium.2B_3.4_Unassigned_Enhan
cements.2FBugs
*   We'd welcome new maintainers for recipes in OE-Core. Please see the
list at:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/conf/distro/include/main
tainers.inc and discuss with the existing maintainer, or ask on the OE-Core
mailing list. We will likely move a chunk of these to "Unassigned" soon to
help facilitate this.

 

YP 3.4 Milestone Dates:

*   YP 3.4 M2 is out of QA being reviewed.
*   YP 3.4 M3 build date 2021/08/23 (Feature Freeze)
*   YP 3.4 M3 Release date 2021/09/03
*   YP 3.4 M4 build date 2021/10/04
*   YP 3.4 M4 Release date 2021/10/29

 

Planned upcoming dot releases:

*   YP 3.3.2 is being built.
*   YP 3.3.2 release date 2021/07/30
*   YP 3.1.10 build date 2021/07/26
*   YP 3.1.10 release date 2021/08/06
*   YP 3.1.11 build date 2021/09/13
*   YP 3.1.11 release date 2021/9/24

 

Tracking Metrics:

*   WDD 2630 (last week 2653) (

https://wiki.yoctoproject.org/charts/combo.html)
*   OE-Core/Poky Patch Metrics

*   Total patches found: 1286 (last week 1287)
*   Patches in the Pending State: 486 (38%) [last week 483 (38%)]

 

The Yocto Project's technical governance is through its Technical Steering
Committee, more information is available at:

 
https://wiki.yoctoproject.org/wiki/TSC

 

The Status reports are now stored on the wiki at:

https://wiki.yoctoproject.org/wiki/Weekly_Status

 

[If anyone has suggestions for other information you'd like to see on this
weekly status update, let us know!]

 

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

*Cell:(208) 244-4460

* Email:  sjolley.yp...@gmail.com
 

 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all 

[OE-core] [meta-networking][master][PATCH 4/4] net-snmp: fix QA Issue after LDFLAGS change

2021-07-27 Thread Tony Battersby
Adding -f*-prefix-map to LDFLAGS caused the following issue:

QA Issue: netsnmp-agent.pc failed sanity test (tmpdir)

Fix by filtering out -f*-prefix-map from *.pc files.

[YOCTO #14481]

Signed-off-by: Tony Battersby 
---

Note: patches 1-3 of this series are only being sent to the
openembedded-core list.

 meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb 
b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb
index ed7f8428b..aa497c894 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.1.bb
@@ -132,6 +132,11 @@ do_install_append() {
 -e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \
 -i ${D}${bindir}/net-snmp-config
 
+sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \
+-e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
+-e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \
+-i ${D}${libdir}/pkgconfig/netsnmp*.pc
+
 # ${STAGING_DIR_HOST} is empty for native builds, and the sed command below
 # will result in errors if run for native.
 if [ "${STAGING_DIR_HOST}" ]; then
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154165): 
https://lists.openembedded.org/g/openembedded-core/message/154165
Mute This Topic: https://lists.openembedded.org/mt/84481720/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [master][PATCH 3/4] bitbake.conf: add DEBUG_PREFIX_MAP to TARGET_LDFLAGS

2021-07-27 Thread Tony Battersby
-f*-prefix-map flags are required when linking with LTO enabled to make
the output binary reproducible.

See discussion here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101473

[YOCTO #14481]

Signed-off-by: Tony Battersby 
---

/usr/sbin/lspci from pciutils is a good program to test that shows how
adding -f*-prefix-map to LDFLAGS makes a program binary reproducible
with LTO enabled.

 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 160abf40ee..c0d2e3f82f 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -595,7 +595,7 @@ TARGET_LINK_HASH_STYLE ?= 
"${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_
 ASNEEDED ?= "-Wl,--as-needed"
 
 export LDFLAGS = "${TARGET_LDFLAGS}"
-TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
+TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} 
${DEBUG_PREFIX_MAP}"
 # mips does not support GNU hash style therefore we override
 LINKER_HASH_STYLE_mipsarch_libc-musl = "sysv"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154164): 
https://lists.openembedded.org/g/openembedded-core/message/154164
Mute This Topic: https://lists.openembedded.org/mt/84481698/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [master][PATCH 2/4] gcc: Backport patch to make LTO builds more reproducible

2021-07-27 Thread Tony Battersby
Backport ustream gcc patch that enables -fdebug-prefix-map to cover
additional cases with LTO enabled to make LTO builds more reproducible.

[YOCTO #14481]

Signed-off-by: Tony Battersby 
---
 meta/recipes-devtools/gcc/gcc-11.1.inc|  1 +
 ...prefix-maps-before-checksumming-DIEs.patch | 95 +++
 2 files changed, 96 insertions(+)
 create mode 100644 
meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch

diff --git a/meta/recipes-devtools/gcc/gcc-11.1.inc 
b/meta/recipes-devtools/gcc/gcc-11.1.inc
index c21242af58..167fddb65a 100644
--- a/meta/recipes-devtools/gcc/gcc-11.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.1.inc
@@ -72,6 +72,7 @@ SRC_URI = "\
file://0038-arc-Update-64bit-move-split-patterns.patch \
file://0039-arc-Fix-u-maddhisi-patterns.patch \
file://0040-arc-Update-doloop_end-patterns.patch \
+   file://0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch \
 "
 SRC_URI[sha256sum] = 
"4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf"
 SRC_URI[backports.sha256sum] = 
"69274bebd6c069a13443d4af61070e854740a639ec4d66eedf3e80070363587b"
diff --git 
a/meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch
 
b/meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch
new file mode 100644
index 00..c8dcd74b9d
--- /dev/null
+++ 
b/meta/recipes-devtools/gcc/gcc/0041-apply-debug-prefix-maps-before-checksumming-DIEs.patch
@@ -0,0 +1,95 @@
+From 7cc2df084b7977653a9b59cbc34a9ad500ae619c Mon Sep 17 00:00:00 2001
+From: Richard Biener 
+Date: Tue, 20 Jul 2021 11:00:33 +0200
+Subject: [PATCH] debug/101473 - apply debug prefix maps before checksumming 
DIEs
+
+The following makes sure to apply the debug prefix maps to filenames
+before checksumming DIEs to create the global symbol for the CU DIE
+used by LTO to link the late debug to the early debug.  This avoids
+binary differences (in said symbol) when compiling with toolchains
+installed under a different path and that compensated with appropriate
+-fdebug-prefix-map options.
+
+The easiest and most scalable way is to record both the unmapped
+and the remapped filename in the dwarf_file_data so the remapping
+process takes place at a single point and only once (otherwise it
+creates GC garbage at each point doing that).
+
+2021-07-20  Richard Biener  
+
+   PR debug/101473
+   * dwarf2out.h (dwarf_file_data): Add key member.
+   * dwarf2out.c (dwarf_file_hasher::equal): Compare key.
+   (dwarf_file_hasher::hash): Hash key.
+   (lookup_filename): Remap the filename and store it in the
+   filename member of dwarf_file_data when creating a new
+   dwarf_file_data.
+   (file_name_acquire): Do not remap the filename again.
+   (maybe_emit_file): Likewise.
+
+[YOCTO #14481]
+
+Upstream-Status: Backport 
[https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7cc2df084b7977653a9b59cbc34a9ad500ae619c]
+
+The upstream patch was modified to compensate for the definition of
+"struct dwarf_file_data" being in dwarf2out.c rather than dwarf2out.h in
+this version of gcc.
+
+Signed-off-by: Tony Battersby 
+---
+diff -urpN a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+--- a/gcc/dwarf2out.c  2021-04-27 06:00:13.0 -0400
 b/gcc/dwarf2out.c  2021-07-23 16:40:06.141886167 -0400
+@@ -1283,6 +1283,7 @@ dwarf2out_switch_text_section (void)
+ 
+ /* Data about a single source file.  */
+ struct GTY((for_user)) dwarf_file_data {
++  const char * key;
+   const char * filename;
+   int emitted_number;
+ };
+@@ -12334,7 +12335,7 @@ file_name_acquire (dwarf_file_data **slo
+ 
+   fi = fnad->files + fnad->used_files++;
+ 
+-  f = remap_debug_filename (d->filename);
++  f = d->filename;
+ 
+   /* Skip all leading "./".  */
+   while (f[0] == '.' && IS_DIR_SEPARATOR (f[1]))
+@@ -27231,13 +27232,13 @@ dwarf2out_ignore_block (const_tree block
+ bool
+ dwarf_file_hasher::equal (dwarf_file_data *p1, const char *p2)
+ {
+-  return filename_cmp (p1->filename, p2) == 0;
++  return filename_cmp (p1->key, p2) == 0;
+ }
+ 
+ hashval_t
+ dwarf_file_hasher::hash (dwarf_file_data *p)
+ {
+-  return htab_hash_string (p->filename);
++  return htab_hash_string (p->key);
+ }
+ 
+ /* Lookup FILE_NAME (in the list of filenames that we know about here in
+@@ -27267,7 +27268,8 @@ lookup_filename (const char *file_name)
+ return *slot;
+ 
+   created = ggc_alloc ();
+-  created->filename = file_name;
++  created->key = file_name;
++  created->filename = remap_debug_filename (file_name);
+   created->emitted_number = 0;
+   *slot = created;
+   return created;
+@@ -27293,8 +27295,7 @@ maybe_emit_file (struct dwarf_file_data
+   if (output_asm_line_debug_info ())
+   {
+ fprintf (asm_out_file, "\t.file %u ", fd->emitted_number);
+-output_quoted_string (asm_out_file,
+-  remap_debug_filename (fd->filename));
++

[OE-core] [master][PATCH 1/4] lto.inc: disable LTO for grub

2021-07-27 Thread Tony Battersby
With gcc 11.1, compiling grub with LTO causes an internal compiler error
(ICE), and with gcc 10.2, files under /usr/lib/grub/i386-pc/*.mod are not
binary reproducible.

[YOCTO #14490] (gcc 11.1 ICE)
[YOCTO #14481] (LTO and binary reproducibility)

Signed-off-by: Tony Battersby 
---
 meta/conf/distro/include/lto.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/conf/distro/include/lto.inc b/meta/conf/distro/include/lto.inc
index 20895ad40d..5d64452c42 100644
--- a/meta/conf/distro/include/lto.inc
+++ b/meta/conf/distro/include/lto.inc
@@ -22,6 +22,8 @@ LTO_pn-perf = ""
 # webkit is not linking properly with LTO, disable until next time
 LTO_pn-webkitgtk = ""
 LTO_pn-xserver-xorg = ""
+LTO_pn-grub = ""
+LTO_pn-grub-efi = ""
 
 # Custom LTO flags
 # disable partitioning/streaming algorithm since its uses ASM
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154162): 
https://lists.openembedded.org/g/openembedded-core/message/154162
Mute This Topic: https://lists.openembedded.org/mt/84481675/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [master][PATCH 0/4] Reproducible LTO builds

2021-07-27 Thread Tony Battersby
Currently, enabling Link Time Optimization via:

require conf/distro/include/lto.inc
DISTRO_FEATURES_append = " lto"

makes the build non-reproducible (as in
https://reproducible-builds.org/).  This patch set fixes some of the
problems, but is not yet a complete solution.

This patch set addresses the following bugs:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14481
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14490

openembedded-core patches
1/4: lto.inc: disable LTO for grub
2/4: gcc: Backport patch to make LTO builds more reproducible
3/4: bitbake.conf: add DEBUG_PREFIX_MAP to TARGET_LDFLAGS

openembedded-devel patches
4/4: net-snmp: fix QA Issue after LDFLAGS change

Patch 3 adds DEBUG_PREFIX_MAP to TARGET_LDFLAGS (it was already in
TARGET_CFLAGS).  This could possibly be done differently, such as by
removing it from TARGET_CFLAGS and adding it to TOOLCHAIN_OPTIONS,
TARGET_CC_ARCH, or TUNE_CCARGS, but I haven't tested those.  Let me know
if there is a better/preferred way to do it.

The TARGET_LDFLAGS change broke net-snmp from meta-networking, so I have
included a patch to fix that.  Other packages might have been broken as
well, although I haven't found any others.

With all these patches, there are still many shared libraries in /lib
and /usr/lib that are still not reproducible with LTO enabled because
x86_64-poky-linux-libtool filters out the -f*-prefix-map flags added by
patch 3 when linking shared libraries.  /usr/lib/libbz2.so.1.0.6 from
the libbz2 package from the bzip2 recipe is a good example.  I do not
have a patch for that problem.  I will leave that to someone else.

So this is what we need to achieve reproducible LTO builds:
*) This patch set
*) A fix for libtool
*) Add LTO to reproducible builds testing if appropriate (e.g.
meta/lib/oeqa/selftest/cases/reproducible.py, CI on Autobuilder)
*) Fixes for individual packages, if needed
*) Once everything works, update the documentation again (I previously
requested a documentation change for this bug, which will eventually
show up at
http://docs.yoctoproject.org/test-manual/reproducible-builds.html).

Tony Battersby
Cybernetics


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154161): 
https://lists.openembedded.org/g/openembedded-core/message/154161
Mute This Topic: https://lists.openembedded.org/mt/84481652/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH pseudo 2/4] Do not pass null argument to pseudo_diag()

2021-07-27 Thread Damian Wrobel
Fixes the following warning:

 pseudo_client.c: In function ‘pseudo_root_path’:
 pseudo_client.c:848:17: warning: ‘%s’ directive argument is null 
[-Wformat-overflow=]
   848 | pseudo_diag("couldn't allocate absolute path for 
'%s'.\n",
   | 
^~
   849 | path);
   | ~

Signed-off-by: Damian Wrobel 
---
 pseudo_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pseudo_client.c b/pseudo_client.c
index 579db33..2583bca 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -846,7 +846,7 @@ pseudo_root_path(const char *func, int line, int dirfd, 
const char *path, int le
pseudo_magic();
if (!rc) {
pseudo_diag("couldn't allocate absolute path for '%s'.\n",
-   path);
+   path ? path : "null");
}
pseudo_debug(PDBGF_CHROOT, "root_path [%s, %d]: '%s' from '%s'\n",
func, line,
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154160): 
https://lists.openembedded.org/g/openembedded-core/message/154160
Mute This Topic: https://lists.openembedded.org/mt/84479888/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH pseudo 4/4] Do not return address of local variable

2021-07-27 Thread Damian Wrobel
Fixes the following warning:
  pseudo_client.c: In function ‘pseudo_client_op’:
  cc1: warning: function may return address of local variable 
[-Wreturn-local-addr]
  pseudo_client.c:1592:22: note: declared here
   1592 | pseudo_msg_t msg = { .type = PSEUDO_MSG_OP };
|  ^~~

Signed-off-by: Damian Wrobel 
---
 pseudo_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pseudo_client.c b/pseudo_client.c
index 2583bca..f1d09ff 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -1889,7 +1889,7 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int 
dirfd, const char *path
case OP_CHROOT:
if (pseudo_client_chroot(path) == 0) {
/* return a non-zero value to show non-failure */
-   result = 
+   result = pseudo_msg_dup();
}
do_request = 0;
break;
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154159): 
https://lists.openembedded.org/g/openembedded-core/message/154159
Mute This Topic: https://lists.openembedded.org/mt/84479678/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH pseudo 1/4] Remove -fno-strict-aliasing and -Wno-deprecated-declarations

2021-07-27 Thread Damian Wrobel
They seems to be no longer needed. Tested on:

 $ gcc --version
 gcc (GCC) 11.1.1 20210531 (Red Hat 11.1.1-3)

Signed-off-by: Damian Wrobel 
---
 Makefile.in | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 10441ef..1ad8836 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -42,7 +42,7 @@ LOCALSTATE=var/pseudo
 BINDIR=$(PREFIX)/$(BIN)
 LOCALSTATEDIR=$(PREFIX)/$(LOCALSTATE)
 
-CFLAGS_BASE=-pipe -std=gnu99 -Wall -W -Wextra -Wno-deprecated-declarations
+CFLAGS_BASE=-pipe -std=gnu99 -Wall -W -Wextra
 CFLAGS_CODE=-fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE $(ARCH_FLAGS)
 CFLAGS_DEFS=-DPSEUDO_PREFIX='"$(PREFIX)"' -DPSEUDO_SUFFIX='"$(SUFFIX)"' 
-DPSEUDO_BINDIR='"$(BIN)"' -DPSEUDO_LIBDIR='"$(LIB)"' 
-DPSEUDO_LOCALSTATEDIR='"$(LOCALSTATE)"' -DPSEUDO_VERSION='"$(VERSION)"' 
$(SQLITE_MEMORY) $(FORCE_ASYNC) -DPSEUDO_PASSWD_FALLBACK='$(PASSWD_FALLBACK)' 
$(OPTDEFS) $(EPOLL)
 CFLAGS_DEBUG=-O2 -g
@@ -152,9 +152,8 @@ pseudo_tables.c pseudo_tables.h: tables
 pseudo_tables.o: pseudo_tables.c
$(CC) $(CFLAGS) $(CFLAGS_PSEUDO) -c -o pseudo_tables.o pseudo_tables.c
 
-# no-strict-aliasing is needed for the function pointer trickery.
 pseudo_wrappers.o: $(GUTS) pseudo_wrappers.c pseudo_wrapfuncs.c 
pseudo_wrapfuncs.h pseudo_tables.h
-   $(CC) -fno-strict-aliasing $(CFLAGS) $(CFLAGS_PSEUDO) -D_GNU_SOURCE -c 
-o pseudo_wrappers.o pseudo_wrappers.c
+   $(CC) $(CFLAGS) $(CFLAGS_PSEUDO) -D_GNU_SOURCE -c -o pseudo_wrappers.o 
pseudo_wrappers.c
 
 offsets32:
$(CC) -m32 -o offsets32 offsets.c
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154157): 
https://lists.openembedded.org/g/openembedded-core/message/154157
Mute This Topic: https://lists.openembedded.org/mt/84479676/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH pseudo 3/4] Use -pthread instead of -lpthread

2021-07-27 Thread Damian Wrobel
Signed-off-by: Damian Wrobel 
---
 Makefile.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 1ad8836..162e729 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -61,8 +61,8 @@ DBOBJS=pseudo_db.o
 WRAPOBJS=pseudo_wrappers.o
 
 # needed for anything that links with pseduo_client.o, pretty much
-CLIENT_LDFLAGS=-ldl -lpthread
-DB_LDFLAGS=@SQLITE_LDARG@ -lpthread
+CLIENT_LDFLAGS=-ldl -pthread
+DB_LDFLAGS=@SQLITE_LDARG@ -pthread
 
 PSEUDO=$(BIN)/pseudo
 PSEUDODB=$(BIN)/pseudodb
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154158): 
https://lists.openembedded.org/g/openembedded-core/message/154158
Mute This Topic: https://lists.openembedded.org/mt/84479677/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3] rootfs: remove ldconfig auxiliary cache where appropriate

2021-07-27 Thread Damian Wrobel
Removes the /var/cache/ldconfig auxiliary cache directory from
the rootfs when:
 - read-only-rootfs is in IMAGE_FEATURES,
 - ldconfig is not in DISTRO_FEATURES.

In both cases the /var/cache/ldconfig/aux-cache is useless.

Signed-off-by: Damian Wrobel 
---
 meta/lib/oe/rootfs.py | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index ad9fd77c8b..4ea5adb9f4 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -302,6 +302,16 @@ class Rootfs(object, metaclass=ABCMeta):
 self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, '-c',
   'new', '-v', '-X'])
 
+image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
+True, False, self.d)
+ldconfig_in_features = bb.utils.contains("DISTRO_FEATURES", "ldconfig",
+ True, False, self.d)
+if image_rorfs or not ldconfig_in_features:
+ldconfig_cache_dir = os.path.join(self.image_rootfs, 
"var/cache/ldconfig")
+if os.path.exists(ldconfig_cache_dir):
+bb.note("Removing ldconfig auxiliary cache...")
+shutil.rmtree(ldconfig_cache_dir)
+
 def _check_for_kernel_modules(self, modules_dir):
 for root, dirs, files in os.walk(modules_dir, topdown=True):
 for name in files:
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154156): 
https://lists.openembedded.org/g/openembedded-core/message/154156
Mute This Topic: https://lists.openembedded.org/mt/84478420/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] rootfs: remove ldconfig auxiliary cache where appropriate

2021-07-27 Thread Damian Wrobel



  On Fri, 23 Jul 2021 20:21:28 +0200 Andre McCurdy  
wrote 
 > On Fri, Jul 23, 2021 at 2:22 AM Damian Wrobel
 >  wrote:
 > >
 > > Removes the /var/cache/ldconfig auxiliary cache directory from
 > > the rootfs when:
 > >  - read-only-rootfs is in DISTRO_FEATURES,
 > >  - ldconfig is not in DISTRO_FEATURES.
 > 
 > Comments say DISTRO_FEATURES but code is checking IMAGE_FEATURES in both 
 > cases.
 > 
 > ldconfig is a distro feature and read-only-rootfs is an image feature,
 > so both the comments and code seem to be wrong...
Copy-paste side effect. Thanks for pointing this out. Fixed in v3.

--
Regards,
Damian
 > 
 > > In both cases the /var/cache/ldconfig/aux-cache is useless.
 > >
 > > Signed-off-by: Damian Wrobel 
 > > ---
 > >  meta/lib/oe/rootfs.py | 10 ++
 > >  1 file changed, 10 insertions(+)
 > >
 > > diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
 > > index ad9fd77c8b..8e63ebac9b 100644
 > > --- a/meta/lib/oe/rootfs.py
 > > +++ b/meta/lib/oe/rootfs.py
 > > @@ -302,6 +302,16 @@ class Rootfs(object, metaclass=ABCMeta):
 > >  self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, 
 > > '-c',
 > >'new', '-v', '-X'])
 > >
 > > +image_rorfs = bb.utils.contains("IMAGE_FEATURES", 
 > > "read-only-rootfs",
 > > +True, False, self.d)
 > > +ldconfig_in_features = bb.utils.contains("IMAGE_FEATURES", 
 > > "ldconfig",
 > > + True, False, self.d)
 > > +if image_rorfs or not ldconfig_in_features:
 > > +ldconfig_cache_dir = os.path.join(self.image_rootfs, 
 > > "var/cache/ldconfig")
 > > +if os.path.exists(ldconfig_cache_dir):
 > > +bb.note("Removing ldconfig auxiliary cache...")
 > > +shutil.rmtree(ldconfig_cache_dir)
 > > +
 > >  def _check_for_kernel_modules(self, modules_dir):
 > >  for root, dirs, files in os.walk(modules_dir, topdown=True):
 > >  for name in files:
 > > --
 > > 2.31.1
 > >
 > >
 > > 
 > >
 > 
 > 
 > 
 > 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154155): 
https://lists.openembedded.org/g/openembedded-core/message/154155
Mute This Topic: https://lists.openembedded.org/mt/84397515/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2] mtd-utils: upgrade 2.1.2 -> 2.1.3

2021-07-27 Thread Stefano Babic
Drop also --enable-install-tests from configuration options because this
was removed in 2.1.3.

Signed-off-by: Stefano Babic 
CC: David Oberhollenzer 
CC: Alexandre Belloni 
---

Changes since V1:
- remove obsolete option enable-install-tests

 meta/recipes-devtools/mtd/mtd-utils_git.bb | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb 
b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 105a68dad8..d7aa738558 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -11,17 +11,15 @@ inherit autotools pkgconfig update-alternatives
 DEPENDS = "zlib e2fsprogs util-linux"
 RDEPENDS_mtd-utils-tests += "bash"
 
-PV = "2.1.2"
+PV = "2.1.3"
 
-SRCREV = "7b986779342021bda87c04da3bf729718736d8ab"
+SRCREV = "42ea7cd48d2b3c306d59bb6c530d79f8c25bf9f5"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
"
 
 S = "${WORKDIR}/git"
 
-EXTRA_OECONF += "--enable-install-tests"
-
 # xattr support creates an additional compile-time dependency on acl because
 # the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
 # regardless whether acl is enabled or disabled in the distro should be okay.
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154154): 
https://lists.openembedded.org/g/openembedded-core/message/154154
Mute This Topic: https://lists.openembedded.org/mt/84478375/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] mtd-utils: upgrade 2.1.2 -> 2.1.3

2021-07-27 Thread Stefano Babic

Hi Alexandre,

On 27.07.21 01:02, Alexandre Belloni wrote:

Hello Stefano,

On 26/07/2021 09:44:40+0200, Stefano Babic wrote:

Signed-off-by: Stefano Babic 
---
  meta/recipes-devtools/mtd/mtd-utils_git.bb | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb 
b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 105a68dad8..66c27e0ce1 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -11,9 +11,9 @@ inherit autotools pkgconfig update-alternatives
  DEPENDS = "zlib e2fsprogs util-linux"
  RDEPENDS_mtd-utils-tests += "bash"
  
-PV = "2.1.2"

+PV = "2.1.3"
  


This fails with:
ERROR: mtd-utils-native-2.1.3-r0 do_configure: QA Issue: mtd-utils-native: 
configure was passed unrecognised options: --enable-install-tests 
[unknown-configure-option]
ERROR: mtd-utils-native-2.1.3-r0 do_configure: Fatal QA errors found, failing 
task.
ERROR: Logfile of failure stored in: 
/home/pokybuild/yocto-worker/beaglebone/build/build/tmp/work/x86_64-linux/mtd-utils-native/2.1.3-r0/temp/log.do_configure.3957515
NOTE: recipe mtd-utils-native-2.1.3-r0: task do_configure: Failed
ERROR: Task 
(virtual:native:/home/pokybuild/yocto-worker/beaglebone/build/meta/recipes-devtools/mtd/mtd-utils_git.bb:do_configure)
 failed with exit code '1'


Thanks. In fact, I see that 2.1.3 drop the configuration 
--enable-install-tests. I send a V2 dropping the configuration option, 
adding David Gstir in case I am missing something else.


Regards,
Stefano



See:
https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/3761/steps/11/logs/stdio


-SRCREV = "7b986779342021bda87c04da3bf729718736d8ab"
+SRCREV = "42ea7cd48d2b3c306d59bb6c530d79f8c25bf9f5"
  SRC_URI = "git://git.infradead.org/mtd-utils.git \
 file://add-exclusion-to-mkfs-jffs2-git-2.patch \
 "
--
2.25.1

















--
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154153): 
https://lists.openembedded.org/g/openembedded-core/message/154153
Mute This Topic: https://lists.openembedded.org/mt/84454037/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH] netbase: use git fetcher

2021-07-27 Thread Yu, Mingli
From: Mingli Yu 

Use git repo as the the previous URL only stores the latest
source file and fails to locate the source file which isn't
the latest.

Signed-off-by: Mingli Yu 
---
 meta/recipes-core/netbase/netbase_6.2.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/netbase/netbase_6.2.bb 
b/meta/recipes-core/netbase/netbase_6.2.bb
index a54d2e7764..c016d32dd3 100644
--- a/meta/recipes-core/netbase/netbase_6.2.bb
+++ b/meta/recipes-core/netbase/netbase_6.2.bb
@@ -6,11 +6,12 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = 
"file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
 PE = "1"
 
-SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.tar.xz"
+SRC_URI = "git://salsa.debian.org/md/netbase.git;protocol=https"
+SRCREV = "1c892c96a078ef28ec1a94681b3a0da7a3d545f7"
 
 inherit allarch
 
-SRC_URI[sha256sum] = 
"309a24146a06347d654b261e9e07a82fab844b173674a42e223803dd8258541e"
+S = "${WORKDIR}/git"
 
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154152): 
https://lists.openembedded.org/g/openembedded-core/message/154152
Mute This Topic: https://lists.openembedded.org/mt/84477265/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][dunfell][PATCH v2 1/3] cmake-native: enabled zstd support

2021-07-27 Thread Richard Purdie
On Mon, 2021-07-26 at 14:40 -1000, Steve Sakoman wrote:
> On Mon, Jul 26, 2021 at 12:27 PM Ruslan Babayev (fib)  wrote:
> > 
> > Hi Steve,
> > 
> > Thanks for reviewing the patches. I understand the problem of merging this 
> > patch as is.
> > But Dunfell currently has a host contamination issue on systems with zstd 
> > installed as part of base OS resulting in broken cmake-native recipe. Can 
> > you help bring this up to the attention of the steering committee?
> 
> Perhaps Richard can comment on this.  You are asking for a feature
> change to dunfell that involves modifications in both
> openembedded-core and meta-openembedded. So both technical steering
> committees would need to agree that this is appropriate.

We don't have to go straight to the TSC, the layer maintainers can try and
agree a plan first.

I've added Armin as meta-openembedded maintainer for dunfell.

Context: cmake-native suffers host contamination on dunfell due to zstd being
detected on the host. The upstream cmake community say they don't support 
configuring it without it.

Do we agree we should move zstd from meta-oe to oe-core in dunfell to fix 
this? Should we patch cmake in dunfell to try and use it's own copy of zstd 
internally? The latter is more risky in that we've not tried that and multiple
configures can be 'fun' in builds. Moving the recipe has a different kind of
pain.

Thoughts?

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154151): 
https://lists.openembedded.org/g/openembedded-core/message/154151
Mute This Topic: https://lists.openembedded.org/mt/84410822/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-