[OE-core] [morty][PATCH] glibc: Fix use after free in pthread_create()
[BZ 20116] -- https://sourceware.org/bugzilla/show_bug.cgi?id=20116 The commit documents the ownership rules around 'struct pthread' and when a thread can read or write to the descriptor. With those ownership rules in place it becomes obvious that pd->stopped_start should not be touched in several of the paths during thread startup, particularly so for detached threads. In the case of detached threads, between the time the thread is created by the OS kernel and the creating thread checks pd->stopped_start, the detached thread might have already exited and the memory for pd unmapped. As a regression test we add a simple test which exercises this exact case by quickly creating detached threads with large enough stacks to ensure the thread stack cache is bypassed and the stacks are unmapped. Before the fix the testcase segfaults, after the fix it works correctly and completes without issue. For a detailed discussion see: https://www.sourceware.org/ml/libc-alpha/2017-01/msg00505.html (cherry-picked from commit f8bf15febcaf137bbec5a61101e88cd5a9d56ca8) Signed-off-by: Yuanjie Huang --- ...0116-Fix-use-after-free-in-pthread_create.patch | 668 + meta/recipes-core/glibc/glibc_2.24.bb | 1 + 2 files changed, 669 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0028-Bug-20116-Fix-use-after-free-in-pthread_create.patch diff --git a/meta/recipes-core/glibc/glibc/0028-Bug-20116-Fix-use-after-free-in-pthread_create.patch b/meta/recipes-core/glibc/glibc/0028-Bug-20116-Fix-use-after-free-in-pthread_create.patch new file mode 100644 index 00..66f1fcd0f0 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0028-Bug-20116-Fix-use-after-free-in-pthread_create.patch @@ -0,0 +1,668 @@ +From e7ba24f05d86acf7072e066ea6d7b235a106688c Mon Sep 17 00:00:00 2001 +From: Carlos O'Donell +Date: Sat, 28 Jan 2017 19:13:34 -0500 +Subject: [PATCH] Bug 20116: Fix use after free in pthread_create() + +The commit documents the ownership rules around 'struct pthread' and +when a thread can read or write to the descriptor. With those ownership +rules in place it becomes obvious that pd->stopped_start should not be +touched in several of the paths during thread startup, particularly so +for detached threads. In the case of detached threads, between the time +the thread is created by the OS kernel and the creating thread checks +pd->stopped_start, the detached thread might have already exited and the +memory for pd unmapped. As a regression test we add a simple test which +exercises this exact case by quickly creating detached threads with +large enough stacks to ensure the thread stack cache is bypassed and the +stacks are unmapped. Before the fix the testcase segfaults, after the +fix it works correctly and completes without issue. + +For a detailed discussion see: +https://www.sourceware.org/ml/libc-alpha/2017-01/msg00505.html + +(cherry-picked from commit f8bf15febcaf137bbec5a61101e88cd5a9d56ca8) + +Upstream-Status: Backport [master] +Signed-off-by: Yuanjie Huang +--- + ChangeLog | 23 + nptl/Makefile | 3 +- + nptl/createthread.c| 10 +- + nptl/pthread_create.c | 207 +++-- + nptl/pthread_getschedparam.c | 1 + + nptl/pthread_setschedparam.c | 1 + + nptl/pthread_setschedprio.c| 1 + + nptl/tpp.c | 2 + + nptl/tst-create-detached.c | 137 ++ + sysdeps/nacl/createthread.c| 10 +- + sysdeps/unix/sysv/linux/createthread.c | 16 ++- + 11 files changed, 356 insertions(+), 55 deletions(-) + create mode 100644 nptl/tst-create-detached.c + +diff --git a/ChangeLog b/ChangeLog +index 84ae7a7af8..0fbda9020e 100644 +--- a/ChangeLog b/ChangeLog +@@ -1,3 +1,26 @@ ++2016-01-28 Carlos O'Donell ++ Alexey Makhalov ++ Florian Weimer ++ ++ [BZ #20116] ++ * nptl/pthread_create.c: Document concurrency notes. ++ Enhance thread creation notes. ++ (create_thread): Use bool *stopped_start. ++ (START_THREAD_DEFN): Comment ownership of PD. ++ (__pthread_create_2_1): Add local bool stopped_start and use ++ that instead of pd->stopped_start where appropriate. ++ * nptl/createthread.c (create_thread): Use bool *stopped_start. ++ * sysdeps/nacl/createthread.c (create_thread): Use bool *stopped_start. ++ * sysdeps/unix/sysv/linux/createthread.c (create_thread): Likewise. ++ * nptl/tst-create-detached.c: New file. ++ * nptl/Makefile (tests): Add tst-create-detached. ++ * nptl/pthread_getschedparam.c (__pthread_getschedparam): ++ Reference the enhanced thread creation notes. ++ * nptl/pthread_setschedparam.c (__pthread_setschedparam): Likewise. ++ * nptl/pthread_setschedprio.c (pthread_setschedprio): Likewise. ++ * nptl/tpp.c (__pthread_tpp_change_priority): Likewise. ++
Re: [OE-core] [PATCH] libxslt: Add PACKAGECONFIG support for python
Hi Andre, Ross, On Thu, 2017-03-23 at 18:39 -0700, Andre McCurdy wrote: > On Thu, Mar 23, 2017 at 5:00 PM, Vedang Patel m> wrote: > > > > Add support to enable python bindings for libxslt using > > PACKAGECONFIG. > > This will include --with-python argument while compiling the > > package. > > The support is disabled by default. > > > > Signed-off-by: Vedang Patel > > --- > > meta/recipes-support/libxslt/libxslt_1.1.29.bb | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/meta/recipes-support/libxslt/libxslt_1.1.29.bb > > b/meta/recipes-support/libxslt/libxslt_1.1.29.bb > > index be747e608d9d..707f2f97b7fc 100644 > > --- a/meta/recipes-support/libxslt/libxslt_1.1.29.bb > > +++ b/meta/recipes-support/libxslt/libxslt_1.1.29.bb > > @@ -22,7 +22,7 @@ S = "${WORKDIR}/libxslt-${PV}" > > > > BINCONFIG = "${bindir}/xslt-config" > > > > -inherit autotools pkgconfig binconfig-disabled lib_package > > +inherit autotools pkgconfig binconfig-disabled lib_package > > distutils-common-base > > > > # We don't DEPEND on binutils for ansidecl.h so ensure we don't > > use the header > > do_configure_prepend () { > > @@ -33,7 +33,9 @@ do_configure_prepend () { > > touch ${S}/doc/xsltproc.1 > > } > > > > -EXTRA_OECONF = "--without-python --without-debug --without-mem- > > debug --without-crypto" > > +EXTRA_OECONF = "--without-debug --without-mem-debug --without- > > crypto" > > +PACKAGECONFIG[python] = "--with-python=${PYTHON_BASE_VERSION}, -- > > without-python" > The more conventional way to order these lines would be: > > PACKAGECONFIG ?= "" > PACKAGECONFIG[python] = "--with-python=${PYTHON_BASE_VERSION}, > --without-python" > > EXTRA_OECONF = "--without-debug --without-mem-debug --without- > crypto" > > The python PACKAGECONFIG option probably needs to include a > dependency > on python. > I will make the proposed changes in the arrangement of the statements. Regarding the python dependency, the feedback from Andre is the opposite of what Ross gave me in one of the previous emails where he told not to include the python dependency in PACKAGECONFIG. He asked to make sure that the python module is packaged seperately. (Just FYI: Here, libxslt has a hard dependency on python-2.7.) Also, the --with-python argument will only adding python bindings to libxslt. Is it a good idea to move that to a subpackage? If so, can you point me to a good example for that Thanks, Vedang Patel Software Engineer Intel Corporation > > > > # older versions of this recipe had ${PN}-utils > > RPROVIDES_${PN}-bin += "${PN}-utils" > > RCONFLICTS_${PN}-bin += "${PN}-utils" > > -- > > 2.7.3 > > > > -- > > ___ > > Openembedded-core mailing list > > Openembedded-core@lists.openembedded.org > > http://lists.openembedded.org/mailman/listinfo/openembedded-core -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] glibc: Support building with 2.6.32 kernels on x86 / x86_64
On 3/28/17 11:57 AM, Serhii Popovych wrote: > While glibc states that 2.6.32 kernels still supported > for x86 / x86_64 builds are failing due to out of date > LIBC_LINUX_VERSION macro checks for such architectures. > > This macro statically defined to 3.2.0 with commit 5b4ecd3 > (Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.) > and additionally checked before --enable-kernel. > > Since both --enable-kernel and LIBC_LINUX_VERSION checks > are the same and there is no users of last one we can > safely get rid of it enabling glibc builds with 2.6.32 > kernel headers. > > Also add --enable-kernel to glibc-initial build so that we > build it correctly with old headers. > > Cc: XE-Linux > Signed-off-by: Serhii Popovych > --- > meta/recipes-core/glibc/glibc-initial.inc | 1 + > .../glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch | 113 > + > meta/recipes-core/glibc/glibc_2.25.bb | 1 + > 3 files changed, 115 insertions(+) > create mode 100644 > meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch > > diff --git a/meta/recipes-core/glibc/glibc-initial.inc > b/meta/recipes-core/glibc/glibc-initial.inc > index f94603c..60b25dd 100644 > --- a/meta/recipes-core/glibc/glibc-initial.inc > +++ b/meta/recipes-core/glibc/glibc-initial.inc > @@ -12,6 +12,7 @@ do_configure () { > find ${S} -name "configure" | xargs touch > cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', > '.'))"`/configure > $cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \ > + --enable-kernel=${OLDEST_KERNEL} \ > --prefix=/usr \ > --without-cvs --disable-sanity-checks \ > --with-headers=${STAGING_DIR_TARGET}${includedir} \ > diff --git > a/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch > b/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch > new file mode 100644 > index 000..f5eaf1c > --- /dev/null > +++ b/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch > @@ -0,0 +1,113 @@ > +From 88f83e4b5a8929dac9095ed264700fcb62d5e4dd Mon Sep 17 00:00:00 2001 > +From: Serhii Popovych > +Date: Fri, 17 Mar 2017 15:48:34 + > +Subject: Kill LIBC_LINUX_VERSION macro > + > +After commit 5b4ecd3 (Require Linux 3.2 except on x86 / x86_64, > +3.2 headers everywhere.) minimal kernel version raised from > +2.6.32 to 3.2.0 for all architectures except x86 and x86_64 > +unless newer already used for architecture. > + > +However LIBC_LINUX_VERSION macro still is in effect and fails > +configure even with --enable-kernel=2.6.32. > + > +While it is present in configure.ac it does not affect anything > +except LINUX_VERSION_CODE check which already performed by > +--enable-kernel. > + --enable-kernel is forces the minimum kernel for glibc to configure for kernel interfaces if not set it defaults to arch specific value but it wont check for version of linux headers during compile time. Whereas this check is checking and errors out during build time if minimum kernel version is not met. If you were to make the LIBC_LINUX_VERSION have a value that matches the arch_minimum_kernel version that would be an improvement. As such if you want to do quick fix then lower the value of LIBC_LINUX_VERSION to 2.6.32 when building for x86/x86_64, we can accept such a patch with a bit less happiness. > +Upstream-Status: Pending > +Signed-off-by: Serhii Popovych > +--- > + sysdeps/unix/sysv/linux/configure| 39 > > + sysdeps/unix/sysv/linux/configure.ac | 21 --- > + 2 files changed, 60 deletions(-) > + > +diff --git a/sysdeps/unix/sysv/linux/configure > b/sysdeps/unix/sysv/linux/configure > +index cace758..ab5fabe 100644 > +--- a/sysdeps/unix/sysv/linux/configure > b/sysdeps/unix/sysv/linux/configure > +@@ -6,45 +6,6 @@ if test -n "$sysheaders"; then > + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" > + fi > + > +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel > header files" >&5 > +-$as_echo_n "checking installed Linux kernel header files... " >&6; } > +-if ${libc_cv_linux320+:} false; then : > +- $as_echo_n "(cached) " >&6 > +-else > +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +-/* end confdefs.h. */ > +-#include > +-#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (3 *65536+ 2 *256+ > 0) /* 3.2.0 */ > +-# error kernel headers missing or too old > +-#endif > +-int > +-main () > +-{ > +- > +- ; > +- return 0; > +-} > +-_ACEOF > +-if ac_fn_c_try_compile "$LINENO"; then : > +- libc_cv_linux320='3.2.0 or later' > +-else > +- libc_cv_linux320='missing or too old!' > +-fi > +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > +-fi > +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux320" >&5 > +-$as_echo "$libc_cv_linux320" >&6; } > +-if test "$libc_cv_linux320" != '3.2.0 or later'; then > +- as_fn_error $? "GNU
Re: [OE-core] [PATCH] busybox: move default config fragments to defconfig
On Tue, 2017-03-28 at 22:08 +0200, Peter Bergin wrote: > Move config fragments that are unconditionally and always applied > to the configuration to the default defconfig file. This will > make it easier to provide your own defconfig file for your target. > > The problem this commit will solve is that if you provide your own > defconfig file for your target it will be tampered with by the > configuration fragments in SRC_URI. If you not want those > configurations in your own setup you have to modify SRC_URI > variable in your setup. As those confguration fragment was always > applied it is a better solution to have them in the default > defconfig file instead. This basically removes any standard feature grouping from being used in the base busybox recipe. I don't think this is something we want to encourage, I'd actually like to see more feature group usage. So we need to find some other way of solving your issue. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] util-linux: make blkdiscard a separate package
From: Stefan Agner Busybox doesn't provide a similar tool so having it in a separate package allows to use it in addition to busybox without having to include all of util-linux. Before it was part of the top level util-linux package. Now it is a separate package util-linux-blkdiscard but the top level package still RRECOMMENDS it so for most users nothing should change. Signed-off-by: Stefan Agner --- meta/recipes-core/util-linux/util-linux.inc | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 63302a9..c07417f 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -30,8 +30,8 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd util-linux-swaponoff util-linux-losetup util-linux-umount \ util-linux-mount util-linux-readprofile util-linux-uuidd \ util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs util-linux-fsck \ - util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \ - util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \ + util-linux-blkdiscard util-linux-blkid util-linux-mkfs util-linux-mcookie \ + util-linux-reset util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \ util-linux-partx util-linux-hwclock util-linux-mountpoint \ util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit" PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" @@ -112,6 +112,8 @@ FILES_util-linux-blkid = "${base_sbindir}/blkid*" RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" RREPLACES_util-linux-blkid = "e2fsprogs-blkid" +FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard" + # reset calls 'tput' RDEPENDS_util-linux-reset += "ncurses" @@ -120,7 +122,7 @@ RDEPENDS_util-linux-runuser += "libpam" RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}" -RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit" +RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit util-linux-blkdiscard" RRECOMMENDS_${PN}_class-native = "" RRECOMMENDS_${PN}_class-nativesdk = "" -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] glibc: Support building with 2.6.32 kernels on x86 / x86_64
On Tue, 2017-03-28 at 18:57 +, Serhii Popovych wrote: > While glibc states that 2.6.32 kernels still supported > for x86 / x86_64 builds are failing due to out of date > LIBC_LINUX_VERSION macro checks for such architectures. > > This macro statically defined to 3.2.0 with commit 5b4ecd3 > (Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.) > and additionally checked before --enable-kernel. > > Since both --enable-kernel and LIBC_LINUX_VERSION checks > are the same and there is no users of last one we can > safely get rid of it enabling glibc builds with 2.6.32 > kernel headers. > > Also add --enable-kernel to glibc-initial build so that we > build it correctly with old headers. > > Cc: XE-Linux > Signed-off-by: Serhii Popovych > --- > meta/recipes-core/glibc/glibc-initial.inc | 1 + > .../glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch | 113 > + > meta/recipes-core/glibc/glibc_2.25.bb | 1 + > 3 files changed, 115 insertions(+) > create mode 100644 meta/recipes-core/glibc/glibc/0028-Kill- > LIBC_LINUX_VERSION-macro.patch > > diff --git a/meta/recipes-core/glibc/glibc-initial.inc > b/meta/recipes-core/glibc/glibc-initial.inc > index f94603c..60b25dd 100644 > --- a/meta/recipes-core/glibc/glibc-initial.inc > +++ b/meta/recipes-core/glibc/glibc-initial.inc > @@ -12,6 +12,7 @@ do_configure () { > find ${S} -name "configure" | xargs touch > cfgscript=`python3 -c "import os; > print(os.path.relpath('${S}', '.'))"`/configure > $cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \ > + --enable-kernel=${OLDEST_KERNEL} \ > --prefix=/usr \ > --without-cvs --disable-sanity-checks \ > --with-headers=${STAGING_DIR_TARGET}${includedir} \ > diff --git a/meta/recipes-core/glibc/glibc/0028-Kill- > LIBC_LINUX_VERSION-macro.patch b/meta/recipes-core/glibc/glibc/0028- > Kill-LIBC_LINUX_VERSION-macro.patch > new file mode 100644 > index 000..f5eaf1c > --- /dev/null > +++ b/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION- > macro.patch > @@ -0,0 +1,113 @@ > +From 88f83e4b5a8929dac9095ed264700fcb62d5e4dd Mon Sep 17 00:00:00 > 2001 > +From: Serhii Popovych > +Date: Fri, 17 Mar 2017 15:48:34 + > +Subject: Kill LIBC_LINUX_VERSION macro > + > +After commit 5b4ecd3 (Require Linux 3.2 except on x86 / x86_64, > +3.2 headers everywhere.) minimal kernel version raised from > +2.6.32 to 3.2.0 for all architectures except x86 and x86_64 > +unless newer already used for architecture. > + > +However LIBC_LINUX_VERSION macro still is in effect and fails > +configure even with --enable-kernel=2.6.32. > + > +While it is present in configure.ac it does not affect anything > +except LINUX_VERSION_CODE check which already performed by > +--enable-kernel. > + > +Upstream-Status: Pending > +Signed-off-by: Serhii Popovych > +--- > + sysdeps/unix/sysv/linux/configure| 39 --- > - > + sysdeps/unix/sysv/linux/configure.ac | 21 --- > + 2 files changed, 60 deletions(-) > + > +diff --git a/sysdeps/unix/sysv/linux/configure > b/sysdeps/unix/sysv/linux/configure This is presumably a generated file. We should only patch configure.ac as otherwise the potential timestamp differences between these can cause problems (we've been burnt before). The configure version will get updated when we reautoconf. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] is there OE support for building multi-image/component FIT image files?
not sure i even know if i'm asking the right question, but i already know that i can build a *basic* FIT image file for (as an example) a mpc8315e-rdb target, just goofing around. the .its file contains a node for the kernel, and the dtb file, and the corresponding configuration node, so everything is fine. however, let's say i was building for a beaglebone black, for which, when you build the kernel. you get *multiple* dtb files for numerous related targets. is there OE support for defining .its files that contain multiple kernels, and/or multiple dtb files, that automatically generates multiple configurations nodes to cover those possibilities? i realize you can do all that manually with the "mkimage" command, i'm just not sure how far you can push creating FIT image files with stock OE support. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] ✗ patchtest: failure for util-linux: make blkdiscard a separate package
== Series Details == Series: util-linux: make blkdiscard a separate package Revision: 1 URL : https://patchwork.openembedded.org/series/6038/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Series does not apply on top of target branch [test_series_merge_on_head] Suggested fixRebase your series on top of targeted branch Targeted branch master (currently at d68a86d87a) If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] util-linux: make blkdiscard a separate package
From: Stefan Agner Busybox doesn't provide a similar tool so having it in a separate package allows to use it in addition to busybox without having to include all of util-linux. Before it was part of the top level util-linux package. Now it is a separate package util-linux-blkdiscard but the top level package still RRECOMMENDS it so for most users nothing should change. Signed-off-by: Stefan Agner --- meta/recipes-core/util-linux/util-linux.inc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 21815fb..434c453 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -30,6 +30,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd util-linux-swaponoff util-linux-losetup util-linux-umount \ util-linux-mount util-linux-readprofile util-linux-uuidd \ util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \ + util-linux-blkdiscard \ util-linux-mkfs util-linux-mcookie util-linux-reset \ util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \ util-linux-partx util-linux-hwclock util-linux-mountpoint \ @@ -111,6 +112,8 @@ FILES_util-linux-blkid = "${base_sbindir}/blkid*" RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" RREPLACES_util-linux-blkid = "e2fsprogs-blkid" +FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard" + # reset calls 'tput' RDEPENDS_util-linux-reset += "ncurses" @@ -119,7 +122,7 @@ RDEPENDS_util-linux-runuser += "libpam" RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin" RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}" -RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit" +RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit util-linux-blkdiscard" RRECOMMENDS_${PN}_class-native = "" RRECOMMENDS_${PN}_class-nativesdk = "" -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] ca-certificates: Fix symlinks to the certificates in nativesdk
On Tue, Mar 28, 2017 at 5:12 PM, Christopher Larson wrote: > We actually run a script against the entire sdk sysroot to convert all > absolute links to relative (see `POPULATE_SDK_POST_TARGET_COMMAND += > “rootfs_sysroot_relativelinks;` in image.bbclass and > rootfs_sysroot_relativelinks in rootfs-postcommands.bbclass), but this > script had a bug. I recently sent a patch (this morning) to it to fix this > exact issue. Of course, it wouldn’t hurt to also change the behavior in the > recipe, but it’s not necessary with the script fixed. I prefer to keep it in a single place instead of multiple recipe doing the same. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] ca-certificates: Fix symlinks to the certificates in nativesdk
On Tue, Mar 28, 2017 at 12:00 PM, Serhii Popovych wrote: > Symlinks to certificates in buildtools-tarball at /etc/ssl/certs > installed with absolute pathes making these sumlinks pointing > outside of toolchain to the host system locations. > > These locations may not contain some certificates (thus link to > the certificate in toolchain is broken) or host system > certificate may be revoked by CRL or outdated. > > Since this change seems non intrusive for target package apply > patch for all builds. > > Cc: XE-Linux > Signed-off-by: Serhii Popovych > We actually run a script against the entire sdk sysroot to convert all absolute links to relative (see `POPULATE_SDK_POST_TARGET_COMMAND += “rootfs_sysroot_relativelinks;` in image.bbclass and rootfs_sysroot_relativelinks in rootfs-postcommands.bbclass), but this script had a bug. I recently sent a patch (this morning) to it to fix this exact issue. Of course, it wouldn’t hurt to also change the behavior in the recipe, but it’s not necessary with the script fixed. -- Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] busybox: move default config fragments to defconfig
Move config fragments that are unconditionally and always applied to the configuration to the default defconfig file. This will make it easier to provide your own defconfig file for your target. The problem this commit will solve is that if you provide your own defconfig file for your target it will be tampered with by the configuration fragments in SRC_URI. If you not want those configurations in your own setup you have to modify SRC_URI variable in your setup. As those confguration fragment was always applied it is a better solution to have them in the default defconfig file instead. Signed-off-by: Peter Bergin --- meta/recipes-core/busybox/busybox/defconfig| 64 +++--- meta/recipes-core/busybox/busybox/getopts.cfg | 3 - .../busybox/busybox/login-utilities.cfg| 13 - .../busybox/busybox/mount-via-label.cfg| 9 --- meta/recipes-core/busybox/busybox/resize.cfg | 2 - meta/recipes-core/busybox/busybox/sha1sum.cfg | 1 - meta/recipes-core/busybox/busybox/sha256sum.cfg| 1 - meta/recipes-core/busybox/busybox_1.24.1.bb| 6 -- 8 files changed, 32 insertions(+), 67 deletions(-) delete mode 100644 meta/recipes-core/busybox/busybox/getopts.cfg delete mode 100644 meta/recipes-core/busybox/busybox/login-utilities.cfg delete mode 100644 meta/recipes-core/busybox/busybox/mount-via-label.cfg delete mode 100644 meta/recipes-core/busybox/busybox/resize.cfg delete mode 100644 meta/recipes-core/busybox/busybox/sha1sum.cfg delete mode 100644 meta/recipes-core/busybox/busybox/sha256sum.cfg diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig index f649738..4e49b15 100644 --- a/meta/recipes-core/busybox/busybox/defconfig +++ b/meta/recipes-core/busybox/busybox/defconfig @@ -273,8 +273,8 @@ CONFIG_RM=y CONFIG_RMDIR=y # CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set CONFIG_SEQ=y -# CONFIG_SHA1SUM is not set -# CONFIG_SHA256SUM is not set +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y # CONFIG_SHA512SUM is not set # CONFIG_SHA3SUM is not set CONFIG_SLEEP=y @@ -346,8 +346,8 @@ CONFIG_LOADFONT=y CONFIG_LOADKMAP=y CONFIG_OPENVT=y CONFIG_RESET=y -# CONFIG_RESIZE is not set -# CONFIG_FEATURE_RESIZE_PRINT is not set +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y CONFIG_SETCONSOLE=y # CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set # CONFIG_SETFONT is not set @@ -473,39 +473,39 @@ CONFIG_MESG=y # # CONFIG_ADD_SHELL is not set # CONFIG_REMOVE_SHELL is not set -# CONFIG_FEATURE_SHADOWPASSWDS is not set +CONFIG_FEATURE_SHADOWPASSWDS=y # CONFIG_USE_BB_PWD_GRP is not set # CONFIG_USE_BB_SHADOW is not set CONFIG_USE_BB_CRYPT=y # CONFIG_USE_BB_CRYPT_SHA is not set -# CONFIG_ADDUSER is not set -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +CONFIG_ADDUSER=y +CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y # CONFIG_FEATURE_CHECK_NAMES is not set CONFIG_LAST_ID=6 CONFIG_FIRST_SYSTEM_ID=100 CONFIG_LAST_SYSTEM_ID=999 -# CONFIG_ADDGROUP is not set -# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +CONFIG_ADDGROUP=y +CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y # CONFIG_FEATURE_ADDUSER_TO_GROUP is not set -# CONFIG_DELUSER is not set -# CONFIG_DELGROUP is not set +CONFIG_DELUSER=y +CONFIG_DELGROUP=y # CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_GETTY is not set -# CONFIG_LOGIN is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y # CONFIG_LOGIN_SESSION_AS_CHILD is not set # CONFIG_LOGIN_SCRIPTS is not set # CONFIG_FEATURE_NOLOGIN is not set # CONFIG_FEATURE_SECURETTY is not set -# CONFIG_PASSWD is not set +CONFIG_PASSWD=y # CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set # CONFIG_CRYPTPW is not set # CONFIG_CHPASSWD is not set CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="" -# CONFIG_SU is not set +CONFIG_SU=y # CONFIG_FEATURE_SU_SYSLOG is not set # CONFIG_FEATURE_SU_CHECKS_SHELLS is not set -# CONFIG_SULOGIN is not set -# CONFIG_VLOCK is not set +CONFIG_SULOGIN=y +CONFIG_VLOCK=y # # Linux Ext2 FS Progs @@ -562,7 +562,7 @@ CONFIG_MOUNT=y # CONFIG_FEATURE_MOUNT_FAKE is not set # CONFIG_FEATURE_MOUNT_VERBOSE is not set # CONFIG_FEATURE_MOUNT_HELPERS is not set -# CONFIG_FEATURE_MOUNT_LABEL is not set +CONFIG_FEATURE_MOUNT_LABEL=y # CONFIG_FEATURE_MOUNT_NFS is not set # CONFIG_FEATURE_MOUNT_CIFS is not set CONFIG_FEATURE_MOUNT_FLAGS=y @@ -572,8 +572,8 @@ CONFIG_FEATURE_MOUNT_FSTAB=y # CONFIG_UEVENT is not set # CONFIG_ACPID is not set # CONFIG_FEATURE_ACPID_COMPAT is not set -# CONFIG_BLKID is not set -# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_BLKID=y +CONFIG_FEATURE_BLKID_TYPE=y CONFIG_DMESG=y CONFIG_FEATURE_DMESG_PRETTY=y CONFIG_FBSET=y @@ -599,8 +599,8 @@ CONFIG_FLOCK=y # CONFIG_FEATURE_MINIX2 is not set # CONFIG_MKFS_REISER is not set # CONFIG_MKFS_VFAT is not set -# CONFIG_GETOPT is not set -# CONFIG_FEATURE_GETOPT_LONG is not set +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y CONFIG_HEXDUMP=y # CONFIG_FEATURE_HEXDUMP_REVERSE is not set # CONFIG_HD is not set @@ -636,1
[OE-core] [PATCH v2 2/2] distutils3.bbclass: Fix path to python for scripts
This change is similar to the recently introduced change to the distutils.bbclass fixing shebang line in python scripts for nativesdk class builds. v2: Rebased on top of new head. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/classes/distutils3.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass index 01ef72a..6c30306 100644 --- a/meta/classes/distutils3.bbclass +++ b/meta/classes/distutils3.bbclass @@ -47,14 +47,14 @@ distutils3_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ -sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i +sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi if test -e ${D}${sbindir}; then for i in ${D}${sbindir}/* ; do \ -sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i +sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2 0/2] distutils: correct path to python for nativesdk
Hi, Here is another small set of similar changes. While for target path to python interpreter is fixed a while ago, for nativesdk it points to env(1) utility with absolute path in SDK where it might not be present. Also this absolute path might be too long. Use ${USRBINPATH} instead of ${bindir} to correctly configure path to env(1). Please review. Thanks. Cc: XE-Linux Serhii Popovych (2): distutils.bbclass: Fix path to python for scripts distutils3.bbclass: Fix path to python for scripts meta/classes/distutils.bbclass | 4 ++-- meta/classes/distutils3.bbclass | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2 1/2] distutils.bbclass: Fix path to python for scripts
Commit 11229de (distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup) replaces path to python-native with path to the python interpreter in the target image. However on nativesdk builds ${bindir} expanded to the ${SDKPATHNATIVE}${prefix_nativesdk} making shebang line pointing to the absolute path to env(1) in SDKPATHNATIVE which may not be present if coreutils isn't part of nativesdk. On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH globally instead of individually) introduces USRBINPATH variable which has correct value regarding build class and intended for this use case. v2: Rebased on top of new head. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/classes/distutils.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index e5abdd1..1930c35 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass @@ -44,7 +44,7 @@ distutils_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done @@ -53,7 +53,7 @@ distutils_do_install() { if [ -e ${D}${sbindir} ]; then for i in ${D}${sbindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v3 1/2] autoconf: Adjust shebang lines to remove interpreter path hardcode
If build host perl (and other tools) is old and we use some kind of toolchain to provide recent perl/python/etc to the OE build we still locked to use build host perl due to hardcoded shebang lines in autoconf scripts. Behaviour was observed with Enterprise Linux 6 and devtoolset toolchain from SCL (Software Collections) used to provide recent version of perl (not provided with default buildtools-tarball). Pass /usr/bin/env perl in ac_cv_path_PERL configuration variables for class-native and class-nativesdk. Use patch to autoconf to replace -w option in shebang line with modern way to enable warnings on perl (i.e. "use warnings"). Note that ac_cv_path_PERL must be valid perl interpreter path since configure will check perl version and Flock implementation. It is not possible currently to use nativeperl from native sysroot because autoconf does not DE OBPENDS on perl-native (and doing so fails due to circular dependencies). Only possible solution is to overwrite shebangs with nativeperl somewhere at do_install() and update RDEPENDS for class-native. Or add perl symlinks to nativeperl in sysroot. For now it seems good to use perl found by /usr/bin/env from autoconf-native. Also add RDEPENDS for class-nativesdk and add nativesdk-perl to them. v3: Corrected Upstream-Status tag. v2: Just realized that files in quilt directory (.pc) patched unnecessarily. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/recipes-devtools/autoconf/autoconf.inc| 7 +- ...tion-in-shebangs-with-modern-use-warnings.patch | 120 + meta/recipes-devtools/autoconf/autoconf_2.69.bb| 1 + 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc index b4e3356..408c5c9 100644 --- a/meta/recipes-devtools/autoconf/autoconf.inc +++ b/meta/recipes-devtools/autoconf/autoconf.inc @@ -27,13 +27,18 @@ RDEPENDS_${PN} = "m4 gnu-config \ perl-module-data-dumper \ " RDEPENDS_${PN}_class-native = "m4-native gnu-config-native" +RDEPENDS_${PN}_class-nativesdk = "nativesdk-m4 nativesdk-gnu-config nativesdk-perl" SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.gz \ file://program_prefix.patch" inherit autotools texinfo -CACHED_CONFIGUREVARS += "ac_cv_path_PERL=${USRBINPATH}/perl" +PERL = "${USRBINPATH}/perl" +PERL_class-native = "/usr/bin/env perl" +PERL_class-nativesdk = "/usr/bin/env perl" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'" do_configure() { oe_runconf diff --git a/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch new file mode 100644 index 000..ae0e382 --- /dev/null +++ b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch @@ -0,0 +1,120 @@ +From 236552ff5b9f1ebf666d8d0e9850007dcce03d26 Mon Sep 17 00:00:00 2001 +From: Serhii Popovych +Date: Wed, 10 Feb 2016 16:32:44 + +Subject: [PATCH] perl: Replace -w option in shebangs with modern "use + warnings" + +In some builds we might provide ac_cv_path_PERL as /usr/bin/env perl +to use newer version of the perl from users PATH rather than +older from standard system path. + +However using /usr/bin/env perl -w from shebang line isn't +possible because it translates to something like +/usr/bin/env -w perl and env complains about illegal option. + +To address this we can remove -w option from perl shebang +line and add "use warnings" statement. + +Upstream-Status: Pending +Signed-off-by: Serhii Popovych +--- + bin/autom4te.in | 3 ++- + bin/autoreconf.in| 3 ++- + bin/autoscan.in | 3 ++- + bin/autoupdate.in| 3 ++- + bin/ifnames.in | 3 ++- + 5 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/bin/autom4te.in b/bin/autom4te.in +index 11773c9..a8f5e41 100644 +--- a/bin/autom4te.in b/bin/autom4te.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -42,6 +42,7 @@ use Autom4te::General; + use Autom4te::XFile; + use File::Basename; + use strict; ++use warnings; + + # Data directory. + my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@'; +diff --git a/bin/autoreconf.in b/bin/autoreconf.in +index e245db4..1a318cb 100644 +--- a/bin/autoreconf.in b/bin/autoreconf.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -45,6 +45,7 @@ use Autom4te::XFile; + # Do not use Cwd::chdir, since it might hang. + use Cwd 'cwd'; + use
[OE-core] [PATCH v2 0/2] automake/autoconf: avoid path to perl interpreter hardcoding
Hi, In this small series I would like to address build host perl interpreter hardcoding in shebang lines of various automake/autoconf scripts. This allows to use newer version of perl interpreter from some toolchain (e.g. devtoolset from SCL on RHEL6) when build host version is quite old to be used with automake/autoconf. Please review. Thanks. Cc: XE-Linux Serhii Popovych (2): autoconf: Adjust shebang lines to remove interpreter path hardcode automake: Adjust shebang lines to remove interpreter path hardcode meta/recipes-devtools/autoconf/autoconf.inc| 7 +- ...tion-in-shebangs-with-modern-use-warnings.patch | 120 + meta/recipes-devtools/autoconf/autoconf_2.69.bb| 1 + ...tion-in-shebangs-with-modern-use-warnings.patch | 99 + meta/recipes-devtools/automake/automake_1.15.bb| 13 ++- 5 files changed, 236 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch create mode 100644 meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2 2/2] automake: Adjust shebang lines to remove interpreter path hardcode
If build host perl (and other tools) is old and we use some kind of toolchain to provide recent perl/python/etc to the OE build we still locked to use build host perl due to hardcoded shebang lines in automake scripts. Behaviour was observed with Enterprise Linux 6 and devtoolset toolchain from SCL (Software Collections) used to provide recent version of perl (not provided with default buildtools-tarball). Pass /usr/bin/env perl in ac_cv_path_PERL configuration variables for class-native and class-nativesdk. Use patch to automake to replace -w option in shebang line with modern way to enable warnings on perl (i.e. "use warnings"). Note that ac_cv_path_PERL must be valid perl interpreter path since configure will check perl version and Flock implementation. It is not possible currently to use nativeperl from native sysroot because automake does not DEPENDS on perl-native (and doing so fails due to circular dependencies). Only possible solution is to overwrite shebangs with nativeperl somewhere at do_install() and update RDEPENDS for class-native. Or add perl symlinks to nativeperl in sysroot. For now it seems good to use perl found by /usr/bin/env from automake-native. Also add RDEPENDS for class-nativesdk and add nativesdk-perl to them. v2: Corrected Upstream-Status tag. Cc: XE-Linux Signed-off-by: Serhii Popovych --- ...tion-in-shebangs-with-modern-use-warnings.patch | 99 ++ meta/recipes-devtools/automake/automake_1.15.bb| 13 ++- 2 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch diff --git a/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch new file mode 100644 index 000..64eb253 --- /dev/null +++ b/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch @@ -0,0 +1,99 @@ +From 41e06b7a354774913dcd2e32a35440e407843357 Mon Sep 17 00:00:00 2001 +From: Serhii Popovych +Date: Wed, 10 Feb 2016 17:07:32 + +Subject: [PATCH] perl: Replace -w option in shebangs with modern "use + warnings" In some builds we might provide ac_cv_path_PERL as /usr/bin/env + perl to use newer version of the perl from users PATH rather than older from + standard system path. + +However using /usr/bin/env perl -w from shebang line isn't +possible because it translates to something like +/usr/bin/env -w perl and env complains about illegal option. + +To address this we can remove -w option from perl shebang +line and add "use warnings" statement. + +Upstream-Status: Pending +Signed-off-by: Serhii Popovych +--- + bin/aclocal.in | 3 ++- + bin/automake.in| 3 ++- + t/wrap/aclocal.in | 3 ++- + t/wrap/automake.in | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/bin/aclocal.in b/bin/aclocal.in +index 349f24a..50cb8d3 100644 +--- a/bin/aclocal.in b/bin/aclocal.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -33,6 +33,7 @@ BEGIN + } + + use strict; ++use warnings; + + use Automake::Config; + use Automake::General; +diff --git a/bin/automake.in b/bin/automake.in +index eedc8bc..e0a01cf 100644 +--- a/bin/automake.in b/bin/automake.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + package Automake; + + use strict; ++use warnings; + + BEGIN + { +diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in +index e64b546..9996899 100644 +--- a/t/wrap/aclocal.in b/t/wrap/aclocal.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # @configure_input@ + + # Copyright (C) 2012-2014 Free Software Foundation, Inc. +@@ -19,6 +19,7 @@ + BEGIN + { + use strict; ++ use warnings; + @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib' + if '@srcdir@' ne '.'; +diff --git a/t/wrap/automake.in b/t/wrap/automake.in +index 8b943b1..be61226 100644 +--- a/t/wrap/automake.in b/t/wrap/automake.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # @configure_input@ + + # Copyright (C) 2012-2014 Free Software Foundation, Inc. +@@ -19,6 +19,7 @@ + BEGIN + { + use strict; ++ use warnings; + @Automake::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib' + if '@srcdir@' ne '.'; +-- +2.3.0 + diff --git a/meta/recipes-devtools/automake/automake_1.15.bb b/meta/recipes-devtools/automake/automake_1.15.bb index a3c72fd..442d093 100644 --- a/meta/recipes-devtools/automake/automake_1.15.bb +++ b/meta/recipes-devtools/automake/automake_1.15.bb @@ -17,16 +17,23 @@ RDEPENDS_${PN} += "\ perl-module-vars " RDEPENDS_${PN}_class-native = "autoc
[OE-core] ✗ patchtest: failure for automake/autoconf: avoid path to perl interpreter hardcoding
== Series Details == Series: automake/autoconf: avoid path to perl interpreter hardcoding Revision: 1 URL : https://patchwork.openembedded.org/series/6028/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Upstream-Status is in incorrect format [test_upstream_status_format] Suggested fixFix Upstream-Status format in meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch so it is one of: Pending, Submitted, Accepted, Backport, Denied, Inappropriate If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] perl-native: Bring build dependencies inline with target perl package
Make sure we have all build time dependencies of perl-native satisfied before we start building it. Behaviour was observed with RHEL6 build hosts where perl-native build fails at linging stage when attempting to link to the build hosts old Berkley DB because virtual/db-native is missing in native sysroot. Add dependencies to the native packages taken from perl recipe. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/recipes-devtools/perl/perl-native_5.24.1.bb | 4 1 file changed, 4 insertions(+) diff --git a/meta/recipes-devtools/perl/perl-native_5.24.1.bb b/meta/recipes-devtools/perl/perl-native_5.24.1.bb index 896a379..e01d11f 100644 --- a/meta/recipes-devtools/perl/perl-native_5.24.1.bb +++ b/meta/recipes-devtools/perl/perl-native_5.24.1.bb @@ -1,5 +1,9 @@ require perl.inc +# We need gnugrep (for -I) +DEPENDS = "virtual/db-native grep-native" +DEPENDS += "gdbm-native zlib-native" + EXTRA_OEMAKE = "-e MAKEFLAGS=" SRC_URI += "\ -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] ✗ patchtest: failure for automake/autoconf: avoid path to perl interpreter hardcoding (rev2)
== Series Details == Series: automake/autoconf: avoid path to perl interpreter hardcoding (rev2) Revision: 2 URL : https://patchwork.openembedded.org/series/6028/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Upstream-Status is in incorrect format [test_upstream_status_format] Suggested fixFix Upstream-Status format in meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch so it is one of: Pending, Submitted, Accepted, Backport, Denied, Inappropriate If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] ✗ patchtest: failure for distutils: correct path to python for nativesdk
== Series Details == Series: distutils: correct path to python for nativesdk Revision: 1 URL : https://patchwork.openembedded.org/series/6029/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Series does not apply on top of target branch [test_series_merge_on_head] Suggested fixRebase your series on top of targeted branch Targeted branch master (currently at d68a86d87a) If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] how to specify *just* the KERNEL_IMAGETYPES i want?
On Tue, Mar 28, 2017 at 7:19 AM, Robert P. J. Day wrote: > > playing with building fit images, and i started with mpc8315e-rdb, > built virtual/kernel using all defaults, and got this in images/: > > modules--4.9.8+git0+b65e9b6153_6b67f448d6-r0-mpc8315e-rdb-20170315095945.tgz > uImage--4.9.8+git0+b65e9b6153_6b67f448d6-r0-mpc8315e-rdb-20170315095945.bin > uImage--4.9.8+git0+b65e9b6153_6b67f448d6-r0-mpc8315erdb-20170315095945.dtb > > which is perfectly fine, since the machine conf file for that target > includes the line: > > KERNEL_IMAGETYPE = "uImage" > > now i start another (fresh) build, and add to local.conf the lines: > > KERNEL_CLASSES = "kernel-fitimage" > KERNEL_IMAGETYPES = "fitImage" > > now my use of the above is my (alleged) way of saying, "i only want a > fitImage", but given this snippet from kernel.bbclass: > > # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES > type = d.getVar('KERNEL_IMAGETYPE') or "" > alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or "" > types = d.getVar('KERNEL_IMAGETYPES') or "" > if type not in types.split(): > types = (type + ' ' + types).strip() > > i apparently get both the default as specified in the machine .conf > file, *as well as* the fitImage i ask for. and, sure enough, in my > images/ directory, i have uImages and fitImages (and zImages, but i > believe that's because fitImages require them, so no big deal). > > i suspect i could prevent the generation of uImages by using: > > KERNEL_IMAGETYPE_mpc8315e-rdb = "fitImage" > > but from a clarity point of view, would it not make more sense that if > someone had a line: > > KERNEL_IMAGETYPES = " ... list of types ..." > > that should override whatever KERNEL_IMAGETYPE is in the machine conf > file and generate *just* those images? or am i missing something here? KERNEL_IMAGETYPE is the legacy variable and it's added to KERNEL_IMAGETYPES for backwards compatibility. If you update your machine config and local.conf over-rides etc to all consistently use KERNEL_IMAGETYPES then the behaviour should be closer to what you expect. > rday > > -- > > > Robert P. J. Day Ottawa, Ontario, CANADA > http://crashcourse.ca > > Twitter: http://twitter.com/rpjday > LinkedIn: http://ca.linkedin.com/in/rpjday > > > > -- > ___ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] ca-certificates: Fix symlinks to the certificates in nativesdk
Symlinks to certificates in buildtools-tarball at /etc/ssl/certs installed with absolute pathes making these sumlinks pointing outside of toolchain to the host system locations. These locations may not contain some certificates (thus link to the certificate in toolchain is broken) or host system certificate may be revoked by CRL or outdated. Since this change seems non intrusive for target package apply patch for all builds. Cc: XE-Linux Signed-off-by: Serhii Popovych --- ...ertificates-Use-relative-paths-when-linki.patch | 38 ++ .../ca-certificates/ca-certificates_20161130.bb| 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-Use-relative-paths-when-linki.patch diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-Use-relative-paths-when-linki.patch b/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-Use-relative-paths-when-linki.patch new file mode 100644 index 000..8666e30 --- /dev/null +++ b/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-Use-relative-paths-when-linki.patch @@ -0,0 +1,38 @@ +From 912e7be8e7151bd4a2feed6d34f927d42b12bb7e Mon Sep 17 00:00:00 2001 +From: Serhii Popovych +Date: Wed, 16 Dec 2015 16:48:03 +0200 +Subject: [PATCH] update-ca-certificates: Use relative paths when linking certs + +Creating links in $ETCCERTSDIR (/etc/ssl/certs) with absolute +path could broke paths to the certificates in toolchains by +pointing to the outside of toolchain root directory. These +absolute paths may not exist in the host system or contain +certificates older than provided within toolchain. + +Use absolute pathes when creating symbolic links to the +certificates to ensure we always pointing to the toolchain +provied certificates. + +Upstream-Status: Pending + +Signed-off-by: Serhii Popovych +--- + sbin/update-ca-certificates | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates +index 3a5ffd3..cb3c1f1 100755 +--- a/sbin/update-ca-certificates b/sbin/update-ca-certificates +@@ -94,7 +94,7 @@ add() { + -e 's/,/_/g').pem" + if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ] + then +-ln -sf "${CERT##$SYSROOT}" "$PEM" ++ln -sf "$(echo "${ETCCERTSDIR##$SYSROOT}" | sed -e 's/\/[^/]\+/..\//g')${CERT##$SYSROOT/}" "$PEM" + echo "+$PEM" >> "$ADDED" + fi + # Add trailing newline to certificate, if it is missing (#635570) +-- +2.3.0 + diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20161130.bb b/meta/recipes-support/ca-certificates/ca-certificates_20161130.bb index 42088b9..e6e17de 100644 --- a/meta/recipes-support/ca-certificates/ca-certificates_20161130.bb +++ b/meta/recipes-support/ca-certificates/ca-certificates_20161130.bb @@ -17,6 +17,7 @@ SRCREV = "61b70a1007dc269d56881a0d480fc841daacc77c" SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \ file://0002-update-ca-certificates-use-SYSROOT.patch \ + file://0003-update-ca-certificates-Use-relative-paths-when-linki.patch \ file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \ file://update-ca-certificates-support-Toybox.patch \ file://default-sysroot.patch \ -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] glibc: Support building with 2.6.32 kernels on x86 / x86_64
While glibc states that 2.6.32 kernels still supported for x86 / x86_64 builds are failing due to out of date LIBC_LINUX_VERSION macro checks for such architectures. This macro statically defined to 3.2.0 with commit 5b4ecd3 (Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.) and additionally checked before --enable-kernel. Since both --enable-kernel and LIBC_LINUX_VERSION checks are the same and there is no users of last one we can safely get rid of it enabling glibc builds with 2.6.32 kernel headers. Also add --enable-kernel to glibc-initial build so that we build it correctly with old headers. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/recipes-core/glibc/glibc-initial.inc | 1 + .../glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch | 113 + meta/recipes-core/glibc/glibc_2.25.bb | 1 + 3 files changed, 115 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc index f94603c..60b25dd 100644 --- a/meta/recipes-core/glibc/glibc-initial.inc +++ b/meta/recipes-core/glibc/glibc-initial.inc @@ -12,6 +12,7 @@ do_configure () { find ${S} -name "configure" | xargs touch cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', '.'))"`/configure $cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \ + --enable-kernel=${OLDEST_KERNEL} \ --prefix=/usr \ --without-cvs --disable-sanity-checks \ --with-headers=${STAGING_DIR_TARGET}${includedir} \ diff --git a/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch b/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch new file mode 100644 index 000..f5eaf1c --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch @@ -0,0 +1,113 @@ +From 88f83e4b5a8929dac9095ed264700fcb62d5e4dd Mon Sep 17 00:00:00 2001 +From: Serhii Popovych +Date: Fri, 17 Mar 2017 15:48:34 + +Subject: Kill LIBC_LINUX_VERSION macro + +After commit 5b4ecd3 (Require Linux 3.2 except on x86 / x86_64, +3.2 headers everywhere.) minimal kernel version raised from +2.6.32 to 3.2.0 for all architectures except x86 and x86_64 +unless newer already used for architecture. + +However LIBC_LINUX_VERSION macro still is in effect and fails +configure even with --enable-kernel=2.6.32. + +While it is present in configure.ac it does not affect anything +except LINUX_VERSION_CODE check which already performed by +--enable-kernel. + +Upstream-Status: Pending +Signed-off-by: Serhii Popovych +--- + sysdeps/unix/sysv/linux/configure| 39 + sysdeps/unix/sysv/linux/configure.ac | 21 --- + 2 files changed, 60 deletions(-) + +diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure +index cace758..ab5fabe 100644 +--- a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure +@@ -6,45 +6,6 @@ if test -n "$sysheaders"; then + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" + fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5 +-$as_echo_n "checking installed Linux kernel header files... " >&6; } +-if ${libc_cv_linux320+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (3 *65536+ 2 *256+ 0) /* 3.2.0 */ +-# error kernel headers missing or too old +-#endif +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- libc_cv_linux320='3.2.0 or later' +-else +- libc_cv_linux320='missing or too old!' +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux320" >&5 +-$as_echo "$libc_cv_linux320" >&6; } +-if test "$libc_cv_linux320" != '3.2.0 or later'; then +- as_fn_error $? "GNU libc requires kernel header files from +-Linux 3.2.0 or later to be installed before configuring. +-The kernel header files are found usually in /usr/include/asm and +-/usr/include/linux; make sure these directories use files from +-Linux 3.2.0 or later. This check uses , so +-make sure that file was built correctly when installing the kernel header +-files. To use kernel headers not from /usr/include/linux, use the +-configure option --with-headers." "$LINENO" 5 +-fi +- + # If the user gave a minimal version number test whether the available + # kernel headers are young enough. Additionally we have minimal + # kernel versions for some architectures. If a previous configure fragment +diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac +index 13abda0..5b47db5 100644 +--- a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/u
[OE-core] [PATCH 0/2] distutils: correct path to python for nativesdk
Hi, Here is another small set of similar changes. While for target path to python interpreter is fixed a while ago, for nativesdk it points to env(1) utility with absolute path in SDK where it might not be present. Also this absolute path might be too long. Use ${USRBINPATH} instead of ${bindir} to correctly configure path to env(1). Please review. Thanks. Cc: XE-Linux Serhii Popovych (2): distutils.bbclass: Fix path to python for scripts distutils3.bbclass: Fix path to python for scripts meta/classes/distutils.bbclass | 4 ++-- meta/classes/distutils3.bbclass | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] distutils3.bbclass: Fix path to python for scripts
This change is similar to the recently introduced change to the distutils.bbclass fixing shebang line in python scripts for nativesdk class builds. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/classes/distutils3.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass index a6720c5..5950606 100644 --- a/meta/classes/distutils3.bbclass +++ b/meta/classes/distutils3.bbclass @@ -47,14 +47,14 @@ distutils3_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ -sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i +sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi if test -e ${D}${sbindir}; then for i in ${D}${sbindir}/* ; do \ -sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i +sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done fi -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] distutils.bbclass: Fix path to python for scripts
Commit 11229de (distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup) replaces path to python-native with path to the python interpreter in the target image. However on nativesdk builds ${bindir} expanded to the ${SDKPATHNATIVE}${prefix_nativesdk} making shebang line pointing to the absolute path to env(1) in SDKPATHNATIVE which may not be present if coreutils isn't part of nativesdk. On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH globally instead of individually) introduces USRBINPATH variable which has correct value regarding build class and intended for this use case. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/classes/distutils.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index 857572d..4637c23 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass @@ -44,7 +44,7 @@ distutils_do_install() { if test -e ${D}${bindir} ; then for i in ${D}${bindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done @@ -53,7 +53,7 @@ distutils_do_install() { if test -e ${D}${sbindir}; then for i in ${D}${sbindir}/* ; do \ if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i + sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i fi sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i done -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2 2/2] autoconf: Adjust shebang lines to remove interpreter path hardcode
If build host perl (and other tools) is old and we use some kind of toolchain to provide recent perl/python/etc to the OE build we still locked to use build host perl due to hardcoded shebang lines in autoconf scripts. Behaviour was observed with Enterprise Linux 6 and devtoolset toolchain from SCL (Software Collections) used to provide recent version of perl (not provided with default buildtools-tarball). Pass /usr/bin/env perl in ac_cv_path_PERL configuration variables for class-native and class-nativesdk. Use patch to autoconf to replace -w option in shebang line with modern way to enable warnings on perl (i.e. "use warnings"). Note that ac_cv_path_PERL must be valid perl interpreter path since configure will check perl version and Flock implementation. It is not possible currently to use nativeperl from native sysroot because autoconf does not DEPENDS on perl-native (and doing so fails due to circular dependencies). Only possible solution is to overwrite shebangs with nativeperl somewhere at do_install() and update RDEPENDS for class-native. Or add perl symlinks to nativeperl in sysroot. For now it seems good to use perl found by /usr/bin/env from autoconf-native. Also add RDEPENDS for class-nativesdk and add nativesdk-perl to them. v2: Just realized that files in quilt directory (.pc) patched unnecessarily. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/recipes-devtools/autoconf/autoconf.inc| 7 +- ...tion-in-shebangs-with-modern-use-warnings.patch | 120 + meta/recipes-devtools/autoconf/autoconf_2.69.bb| 1 + 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc index b4e3356..408c5c9 100644 --- a/meta/recipes-devtools/autoconf/autoconf.inc +++ b/meta/recipes-devtools/autoconf/autoconf.inc @@ -27,13 +27,18 @@ RDEPENDS_${PN} = "m4 gnu-config \ perl-module-data-dumper \ " RDEPENDS_${PN}_class-native = "m4-native gnu-config-native" +RDEPENDS_${PN}_class-nativesdk = "nativesdk-m4 nativesdk-gnu-config nativesdk-perl" SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.gz \ file://program_prefix.patch" inherit autotools texinfo -CACHED_CONFIGUREVARS += "ac_cv_path_PERL=${USRBINPATH}/perl" +PERL = "${USRBINPATH}/perl" +PERL_class-native = "/usr/bin/env perl" +PERL_class-nativesdk = "/usr/bin/env perl" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'" do_configure() { oe_runconf diff --git a/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch new file mode 100644 index 000..38457d1 --- /dev/null +++ b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch @@ -0,0 +1,120 @@ +From 236552ff5b9f1ebf666d8d0e9850007dcce03d26 Mon Sep 17 00:00:00 2001 +From: Serhii Popovych +Date: Wed, 10 Feb 2016 16:32:44 + +Subject: [PATCH] perl: Replace -w option in shebangs with modern "use + warnings" + +In some builds we might provide ac_cv_path_PERL as /usr/bin/env perl +to use newer version of the perl from users PATH rather than +older from standard system path. + +However using /usr/bin/env perl -w from shebang line isn't +possible because it translates to something like +/usr/bin/env -w perl and env complains about illegal option. + +To address this we can remove -w option from perl shebang +line and add "use warnings" statement. + +Upstream-Status: Penging +Signed-off-by: Serhii Popovych +--- + bin/autom4te.in | 3 ++- + bin/autoreconf.in| 3 ++- + bin/autoscan.in | 3 ++- + bin/autoupdate.in| 3 ++- + bin/ifnames.in | 3 ++- + 5 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/bin/autom4te.in b/bin/autom4te.in +index 11773c9..a8f5e41 100644 +--- a/bin/autom4te.in b/bin/autom4te.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -42,6 +42,7 @@ use Autom4te::General; + use Autom4te::XFile; + use File::Basename; + use strict; ++use warnings; + + # Data directory. + my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@'; +diff --git a/bin/autoreconf.in b/bin/autoreconf.in +index e245db4..1a318cb 100644 +--- a/bin/autoreconf.in b/bin/autoreconf.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -45,6 +45,7 @@ use Autom4te::XFile; + # Do not use Cwd::chdir, since it might hang. + use Cwd 'cwd'; + use strict; ++use warnings; + + ## --
[OE-core] [PATCH 1/2] autoconf: Adjust shebang lines to remove interpreter path hardcode
If build host perl (and other tools) is old and we use some kind of toolchain to provide recent perl/python/etc to the OE build we still locked to use build host perl due to hardcoded shebang lines in autoconf scripts. Behaviour was observed with Enterprise Linux 6 and devtoolset toolchain from SCL (Software Collections) used to provide recent version of perl (not provided with default buildtools-tarball). Pass /usr/bin/env perl in ac_cv_path_PERL configuration variables for class-native and class-nativesdk. Use patch to autoconf to replace -w option in shebang line with modern way to enable warnings on perl (i.e. "use warnings"). Note that ac_cv_path_PERL must be valid perl interpreter path since configure will check perl version and Flock implementation. It is not possible currently to use nativeperl from native sysroot because autoconf does not DEPENDS on perl-native (and doing so fails due to circular dependencies). Only possible solution is to overwrite shebangs with nativeperl somewhere at do_install() and update RDEPENDS for class-native. Or add perl symlinks to nativeperl in sysroot. For now it seems good to use perl found by /usr/bin/env from autoconf-native. Also add RDEPENDS for class-nativesdk and add nativesdk-perl to them. Cc: XE-Linux Signed-off-by: Serhii Popovych --- meta/recipes-devtools/autoconf/autoconf.inc| 7 +- ...tion-in-shebangs-with-modern-use-warnings.patch | 196 + meta/recipes-devtools/autoconf/autoconf_2.69.bb| 1 + 3 files changed, 203 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc index b4e3356..408c5c9 100644 --- a/meta/recipes-devtools/autoconf/autoconf.inc +++ b/meta/recipes-devtools/autoconf/autoconf.inc @@ -27,13 +27,18 @@ RDEPENDS_${PN} = "m4 gnu-config \ perl-module-data-dumper \ " RDEPENDS_${PN}_class-native = "m4-native gnu-config-native" +RDEPENDS_${PN}_class-nativesdk = "nativesdk-m4 nativesdk-gnu-config nativesdk-perl" SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.gz \ file://program_prefix.patch" inherit autotools texinfo -CACHED_CONFIGUREVARS += "ac_cv_path_PERL=${USRBINPATH}/perl" +PERL = "${USRBINPATH}/perl" +PERL_class-native = "/usr/bin/env perl" +PERL_class-nativesdk = "/usr/bin/env perl" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'" do_configure() { oe_runconf diff --git a/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch new file mode 100644 index 000..c3dff2d --- /dev/null +++ b/meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch @@ -0,0 +1,196 @@ +From 236552ff5b9f1ebf666d8d0e9850007dcce03d26 Mon Sep 17 00:00:00 2001 +From: Serhii Popovych +Date: Wed, 10 Feb 2016 16:32:44 + +Subject: [PATCH] perl: Replace -w option in shebangs with modern "use + warnings" + +In some builds we might provide ac_cv_path_PERL as /usr/bin/env perl +to use newer version of the perl from users PATH rather than +older from standard system path. + +However using /usr/bin/env perl -w from shebang line isn't +possible because it translates to something like +/usr/bin/env -w perl and env complains about illegal option. + +To address this we can remove -w option from perl shebang +line and add "use warnings" statement. + +Upstream-Status: Penging +Signed-off-by: Serhii Popovych +--- + .pc/autoreconf-exclude.patch/bin/autoreconf.in | 3 ++- + .pc/autoreconf-gnuconfigize.patch/bin/autoreconf.in | 3 ++- + .pc/autoreconf-include.patch/bin/autoreconf.in | 3 ++- + .pc/check-automake-cross-warning.patch/bin/autoreconf.in | 3 ++- + bin/autom4te.in | 3 ++- + bin/autoreconf.in| 3 ++- + bin/autoscan.in | 3 ++- + bin/autoupdate.in| 3 ++- + bin/ifnames.in | 3 ++- + 9 files changed, 18 insertions(+), 9 deletions(-) + +diff --git a/.pc/autoreconf-exclude.patch/bin/autoreconf.in b/.pc/autoreconf-exclude.patch/bin/autoreconf.in +index 060cec7..b77b317 100644 +--- a/.pc/autoreconf-exclude.patch/bin/autoreconf.in b/.pc/autoreconf-exclude.patch/bin/autoreconf.in +@@ -1,4 +1,4 @@ +-#! @PERL@ -w ++#! @PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -45,6 +45,7 @@ use Autom4te::XFile; + # Do not use Cwd::chdir, since it might hang. + use Cwd 'cwd'; + use strict; ++use warnings; + + ## --- ## + ## Variables. ## +diff --git a/.pc/autoreconf-gnuconfigize.patch/bin/autoreconf.in b/.pc/auto
[OE-core] [PATCH 2/2] automake: Adjust shebang lines to remove interpreter path hardcode
If build host perl (and other tools) is old and we use some kind of toolchain to provide recent perl/python/etc to the OE build we still locked to use build host perl due to hardcoded shebang lines in automake scripts. Behaviour was observed with Enterprise Linux 6 and devtoolset toolchain from SCL (Software Collections) used to provide recent version of perl (not provided with default buildtools-tarball). Pass /usr/bin/env perl in ac_cv_path_PERL configuration variables for class-native and class-nativesdk. Use patch to automake to replace -w option in shebang line with modern way to enable warnings on perl (i.e. "use warnings"). Note that ac_cv_path_PERL must be valid perl interpreter path since configure will check perl version and Flock implementation. It is not possible currently to use nativeperl from native sysroot because automake does not DEPENDS on perl-native (and doing so fails due to circular dependencies). Only possible solution is to overwrite shebangs with nativeperl somewhere at do_install() and update RDEPENDS for class-native. Or add perl symlinks to nativeperl in sysroot. For now it seems good to use perl found by /usr/bin/env from automake-native. Also add RDEPENDS for class-nativesdk and add nativesdk-perl to them. Cc: XE-Linux Signed-off-by: Serhii Popovych --- ...tion-in-shebangs-with-modern-use-warnings.patch | 99 ++ meta/recipes-devtools/automake/automake_1.15.bb| 13 ++- 2 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch diff --git a/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch new file mode 100644 index 000..cae5ab9 --- /dev/null +++ b/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch @@ -0,0 +1,99 @@ +From 41e06b7a354774913dcd2e32a35440e407843357 Mon Sep 17 00:00:00 2001 +From: Serhii Popovych +Date: Wed, 10 Feb 2016 17:07:32 + +Subject: [PATCH] perl: Replace -w option in shebangs with modern "use + warnings" In some builds we might provide ac_cv_path_PERL as /usr/bin/env + perl to use newer version of the perl from users PATH rather than older from + standard system path. + +However using /usr/bin/env perl -w from shebang line isn't +possible because it translates to something like +/usr/bin/env -w perl and env complains about illegal option. + +To address this we can remove -w option from perl shebang +line and add "use warnings" statement. + +Upstream-Status: Penging +Signed-off-by: Serhii Popovych +--- + bin/aclocal.in | 3 ++- + bin/automake.in| 3 ++- + t/wrap/aclocal.in | 3 ++- + t/wrap/automake.in | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/bin/aclocal.in b/bin/aclocal.in +index 349f24a..50cb8d3 100644 +--- a/bin/aclocal.in b/bin/aclocal.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -33,6 +33,7 @@ BEGIN + } + + use strict; ++use warnings; + + use Automake::Config; + use Automake::General; +diff --git a/bin/automake.in b/bin/automake.in +index eedc8bc..e0a01cf 100644 +--- a/bin/automake.in b/bin/automake.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # -*- perl -*- + # @configure_input@ + +@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + package Automake; + + use strict; ++use warnings; + + BEGIN + { +diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in +index e64b546..9996899 100644 +--- a/t/wrap/aclocal.in b/t/wrap/aclocal.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # @configure_input@ + + # Copyright (C) 2012-2014 Free Software Foundation, Inc. +@@ -19,6 +19,7 @@ + BEGIN + { + use strict; ++ use warnings; + @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib' + if '@srcdir@' ne '.'; +diff --git a/t/wrap/automake.in b/t/wrap/automake.in +index 8b943b1..be61226 100644 +--- a/t/wrap/automake.in b/t/wrap/automake.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # @configure_input@ + + # Copyright (C) 2012-2014 Free Software Foundation, Inc. +@@ -19,6 +19,7 @@ + BEGIN + { + use strict; ++ use warnings; + @Automake::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib' + if '@srcdir@' ne '.'; +-- +2.3.0 + diff --git a/meta/recipes-devtools/automake/automake_1.15.bb b/meta/recipes-devtools/automake/automake_1.15.bb index a3c72fd..442d093 100644 --- a/meta/recipes-devtools/automake/automake_1.15.bb +++ b/meta/recipes-devtools/automake/automake_1.15.bb @@ -17,16 +17,23 @@ RDEPENDS_${PN} += "\ perl-module-vars " RDEPENDS_${PN}_class-native = "autoconf-native hostperl-runtime-native"
[OE-core] [PATCH 0/2] automake/autoconf: avoid path to perl interpreter hardcoding
Hi, In this small series I would like to address build host perl interpreter hardcoding in shebang lines of various automake/autoconf scripts. This allows to use newer version of perl interpreter from some toolchain (e.g. devtoolset from SCL on RHEL6) when build host version is quite old to be used with automake/autoconf. Please review. Thanks. Cc: XE-Linux Serhii Popovych (2): autoconf: Adjust shebang lines to remove interpreter path hardcode automake: Adjust shebang lines to remove interpreter path hardcode meta/recipes-devtools/autoconf/autoconf.inc| 7 +- ...tion-in-shebangs-with-modern-use-warnings.patch | 196 + meta/recipes-devtools/autoconf/autoconf_2.69.bb| 1 + ...tion-in-shebangs-with-modern-use-warnings.patch | 99 +++ meta/recipes-devtools/automake/automake_1.15.bb| 13 +- 5 files changed, 312 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-devtools/autoconf/autoconf/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch create mode 100644 meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] f2fs-tools: Update to Version 1.8.0
On 3/27/17 9:02 PM, Yong, Jonathan wrote: > Signed-off-by: Yong, Jonathan > --- > .../0002-Fix-mkfs-out-of-tree-builds.patch | 27 > ++ > .../{f2fs-tools_1.4.0.bb => f2fs-tools_1.8.0.bb} | 5 ++-- > 2 files changed, 30 insertions(+), 2 deletions(-) > create mode 100644 > meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-Fix-mkfs-out-of-tree-builds.patch > rename meta-filesystems/recipes-utils/f2fs-tools/{f2fs-tools_1.4.0.bb => > f2fs-tools_1.8.0.bb} (81%) > > diff --git > a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-Fix-mkfs-out-of-tree-builds.patch > > b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-Fix-mkfs-out-of-tree-builds.patch > new file mode 100644 > index 000..3aadf3c > --- /dev/null > +++ > b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-Fix-mkfs-out-of-tree-builds.patch > @@ -0,0 +1,27 @@ > +From 1d4f6b6a945eabb364a2035d5ef0b69f68a87f74 Mon Sep 17 00:00:00 2001 > +From: "Yong, Jonathan" > +Date: Mon, 27 Mar 2017 08:34:06 + > +Subject: [PATCH] Fix mkfs out of tree builds > + > +Libraries are built in builddir, not srcdir, fix Makefile.am > +accordingly. This patch should also be upstreamed into f2fs > + > +Signed-off-by: Yong, Jonathan > +--- > + mkfs/Makefile.am | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am > +index 8b4c16c..ae211b2 100644 > +--- a/mkfs/Makefile.am > b/mkfs/Makefile.am > +@@ -10,5 +10,5 @@ lib_LTLIBRARIES = libf2fs_format.la > + libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c > f2fs_format_utils.c > + libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD > + libf2fs_format_la_CPPFLAGS = -I$(top_srcdir)/include > +-libf2fs_format_la_LDFLAGS = -luuid -L$(top_srcdir)/lib -lf2fs \ > ++libf2fs_format_la_LDFLAGS = -luuid -L$(top_builddir)/lib -lf2fs \ > + -version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE) > +-- > +2.10.2 > + > diff --git a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.4.0.bb > b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.8.0.bb > similarity index 81% > rename from meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.4.0.bb > rename to meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.8.0.bb > index 1a558e7..691cb6e 100644 > --- a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.4.0.bb > +++ b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.8.0.bb > @@ -7,9 +7,10 @@ LIC_FILES_CHKSUM = > "file://COPYING;md5=362b4b2594cd362b874a97718faa51d3" > # to provide libuuid > DEPENDS = "util-linux" > > -SRCREV = "baac4b4e6f41ceb02511da49dd3707674f3fea21" > +SRCREV = "1e7aedf99b85d16f94d1d8ad2fcf846403bb2174" > SRC_URI = > "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git \ > -file://0001-Remove-AC_CHECK_FILE-for-cross-compilation.patch" > +file://0001-Remove-AC_CHECK_FILE-for-cross-compilation.patch \ > +file://0002-Fix-mkfs-out-of-tree-builds.patch" > S = "${WORKDIR}/git" > > inherit pkgconfig autotools > signature.asc Description: OpenPGP digital signature -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2 1/2] recipes-core: busybox: setup "cron" sub-package
ping On Tue, 2017-03-07 at 15:55 -0500, Sylvain Lemieux wrote: > From: Sylvain Lemieux > > Setup "cron" as a sub-package in "busybox" and > add the support to install "cron" as a startup script. > > Signed-off-by: Sylvain Lemieux > --- > Changes from v1 to v2: > * Rebased on latest master. > > meta/recipes-core/busybox/busybox.inc | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/meta/recipes-core/busybox/busybox.inc > b/meta/recipes-core/busybox/busybox.inc > index 39c2eef082..3bede6307c 100644 > --- a/meta/recipes-core/busybox/busybox.inc > +++ b/meta/recipes-core/busybox/busybox.inc > @@ -21,7 +21,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}" > # We don't want '-e MAKEFLAGS=' in EXTRA_OEMAKE > EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} > CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' > HOSTCPP='${BUILD_CPP}'" > > -PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev > ${PN}-hwclock" > +PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev > ${PN}-hwclock ${PN}-cron" > > FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" > FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* > ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* > ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" > @@ -29,8 +29,9 @@ FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev > ${sysconfdir}/mdev.conf ${sysconfd > FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" > FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" > FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh" > +FILES_${PN}-cron = "${sysconfdir}/init.d/busybox-cron" > > -INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev > ${PN}-hwclock" > +INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev > ${PN}-hwclock ${PN}-cron" > > INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" > INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" > @@ -38,6 +39,7 @@ INITSCRIPT_NAME_${PN}-mdev = "mdev" > INITSCRIPT_PARAMS_${PN}-mdev = "start 04 S ." > INITSCRIPT_NAME_${PN}-syslog = "syslog" > INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" > +INITSCRIPT_NAME_${PN}-cron = "busybox-cron" > > SYSTEMD_PACKAGES = "${PN}-syslog" > SYSTEMD_SERVICE_${PN}-syslog = "busybox-syslog.service" > @@ -45,7 +47,7 @@ SYSTEMD_SERVICE_${PN}-syslog = "busybox-syslog.service" > CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}" > CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" > > -RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" > +RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc ${PN}-cron" > > inherit cml1 systemd update-rc.d ptest > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/2] aws-cli_1.11.66.bb: Initial commit of aws-cli
On Tue, Mar 28, 2017 at 4:40 AM, Elizabeth 'pidge' Flanagan wrote: > With fetch2 supporting s3, having an aws-cli recipe makes sense. > > Signed-off-by: Elizabeth 'pidge' Flanagan > --- > meta/recipes-devtools/aws-cli/aws-cli.inc| 14 ++ > meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb | 5 + > 2 files changed, 19 insertions(+) > create mode 100644 meta/recipes-devtools/aws-cli/aws-cli.inc > create mode 100644 meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb > > diff --git a/meta/recipes-devtools/aws-cli/aws-cli.inc > b/meta/recipes-devtools/aws-cli/aws-cli.inc > new file mode 100644 > index 000..e9a2677 > --- /dev/null > +++ b/meta/recipes-devtools/aws-cli/aws-cli.inc > @@ -0,0 +1,14 @@ > +SUMMARY = "Amazon Web Services Command Line Interface" > +DESCRIPTION = "The AWS Command Line Interface (CLI) is a \ > +unified tool to manage your AWS services." > +HOMEPAGE = "https://aws.amazon.com/cli/"; > +SECTION = "console/utils" > + > +SRC_URI = "https://github.com/aws/${BPN}/archive/${PV}.tar.gz"; > + > +LICENSE = "Apache-2.0" > +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=71a3e14f29ac5c23e1b5b934ca4ddfc9" According to the style guide, LICENSE should come before SRC_URI. > + > +S = "${WORKDIR}/${BPN}-${PV}" That's the default. > + > +BBCLASSEXTEND = "native nativesdk" > diff --git a/meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb > b/meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb > new file mode 100644 > index 000..a96b71e > --- /dev/null > +++ b/meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb > @@ -0,0 +1,5 @@ > +require aws-cli.inc Ross has been merging single use .inc files into their respective recipes. Not sure if we should be creating new ones. > +SRC_URI[md5sum] = "c556adb58d0234eb661520488b9b467f" > +SRC_URI[sha256sum] = > "2c1da406203e0a9b5c717004bd463228e4fa4fa8fe47208f0e1836c02bee6f60" > + > -- > 1.9.1 > > -- > ___ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 3/3] systemd-boot: write startup.nsh
From: Christopher Larson This aligns with the behavior of grub-efi and gummiboot, and is needed to fix auto-boot of intel-corei7-64 for non-GPLv3 builds. Signed-off-by: Christopher Larson --- meta/classes/systemd-boot.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass index 6d002c0e4e..4e69a2c6b5 100644 --- a/meta/classes/systemd-boot.bbclass +++ b/meta/classes/systemd-boot.bbclass @@ -37,6 +37,8 @@ efi_populate() { install -d ${DEST}/loader install -d ${DEST}/loader/entries install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE} +EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') +printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf for i in ${SYSTEMD_BOOT_ENTRIES}; do install -m 0644 ${i} ${DEST}/loader/entries -- 2.11.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/3] sysroot-relativelinks: also consider links to dirs on the host
From: Christopher Larson Dead symlinks, or symlinks to existing files will show up in 'files' of an os.walk, but symlinks to existing directories show up in 'dirs', so we need to consider both. As one example where this is an issue, the symlink from /usr/lib/ssl/certs was left pointing to /etc/ssl/certs rather than the relative path when the sdk was built on hosts where the latter exists. Signed-off-by: Christopher Larson --- scripts/sysroot-relativelinks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sysroot-relativelinks.py b/scripts/sysroot-relativelinks.py index e44eba2b11..ffe254728b 100755 --- a/scripts/sysroot-relativelinks.py +++ b/scripts/sysroot-relativelinks.py @@ -24,7 +24,7 @@ def handlelink(filep, subdir): os.symlink(os.path.relpath(topdir+link, subdir), filep) for subdir, dirs, files in os.walk(topdir): -for f in files: +for f in dirs + files: filep = os.path.join(subdir, f) if os.path.islink(filep): #print("Considering %s" % filep) -- 2.11.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/3] update_gio_module_cache: fix host user contamination
From: Abdur Rehman update_gio_module_cache intercept creates file: $D${libdir}/gio/modules/giomodule.cache Change ownership of this file to root:root to avoid user contamination by host. Signed-off-by: Abdur Rehman Signed-off-by: Christopher Larson --- scripts/postinst-intercepts/update_gio_module_cache | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/postinst-intercepts/update_gio_module_cache b/scripts/postinst-intercepts/update_gio_module_cache index fe468092cf..92092f2144 100644 --- a/scripts/postinst-intercepts/update_gio_module_cache +++ b/scripts/postinst-intercepts/update_gio_module_cache @@ -5,3 +5,5 @@ set -e PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/ +chown root:root $D${libdir}/gio/modules/giomodule.cache + -- 2.11.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/3] A few misc fixes Mentor is carrying
From: Christopher Larson The following changes since commit d68a86d87aa017dd0fecb0f626d22711efefcd3f: dnf: remove systemd units in nativesdk builds (2017-03-28 10:34:26 +0100) are available in the git repository at: g...@github.com:kergoth/openembedded-core.git misc-fixes for you to fetch changes up to 571fe26dcf1d704cc97e834b19adb51b782b4cca: systemd-boot: write startup.nsh (2017-03-28 21:12:18 +0500) Abdur Rehman (1): update_gio_module_cache: fix host user contamination Christopher Larson (2): sysroot-relativelinks: also consider links to dirs on the host systemd-boot: write startup.nsh meta/classes/systemd-boot.bbclass | 2 ++ scripts/postinst-intercepts/update_gio_module_cache | 2 ++ scripts/sysroot-relativelinks.py| 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) -- 2.11.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines
On Tue, 28 Mar 2017, Peter Kjellerstedt wrote: > > -Original Message- > > From: openembedded-core-boun...@lists.openembedded.org > > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > > Robert P. J. Day > > Sent: den 28 mars 2017 12:51 > > To: OE Core mailing list > > Subject: [OE-core] [PATCH] classes: Standardize strings tests, and join > > some if/then/while/do lines > > > > > > For better or worse, two types of cleanup in meta/classes directory: > > > > * Replace old-style 'x${VAR} = x' tests with -n/-z string tests > > * Unsplit lines to keep if/then, while/do on same line > > > > Signed-off-by: Robert P. J. Day > > > > --- > > > > i realize there are two types of tidying here -- if that offends > > people, i can split it into two separate submissions. nothing here > > should affect execution, but it's always possible i screwed something > > up, not sure how to rigourously test these changes. > > > > also, when i did change a shell string test, i added {} around the > > variable name, it's just a standard i like for visual clarity. apply > > all or part of what seems useful. > > You should absolutely not do this, especially if you want visual clarity > in a BitBake recipe. This makes the variable look like a BitBake variable > instead of a shell variable, and not just to us humans, but to bitbake > as well... yes, ross just pointed that out, i had totally forgotten about that. so scrap what i sent in earlier. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines
> -Original Message- > From: openembedded-core-boun...@lists.openembedded.org > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > Robert P. J. Day > Sent: den 28 mars 2017 12:51 > To: OE Core mailing list > Subject: [OE-core] [PATCH] classes: Standardize strings tests, and join > some if/then/while/do lines > > > For better or worse, two types of cleanup in meta/classes directory: > > * Replace old-style 'x${VAR} = x' tests with -n/-z string tests > * Unsplit lines to keep if/then, while/do on same line > > Signed-off-by: Robert P. J. Day > > --- > > i realize there are two types of tidying here -- if that offends > people, i can split it into two separate submissions. nothing here > should affect execution, but it's always possible i screwed something > up, not sure how to rigourously test these changes. > > also, when i did change a shell string test, i added {} around the > variable name, it's just a standard i like for visual clarity. apply > all or part of what seems useful. You should absolutely not do this, especially if you want visual clarity in a BitBake recipe. This makes the variable look like a BitBake variable instead of a shell variable, and not just to us humans, but to bitbake as well. It will cause bitbake to put an unnecessary dependency on the (typically non-existent) BitBake variable ${VAR} in the state signature for the shell function. Which, as Ross pointed out, will cause problems in the case where there actually are both a BitBake variable and a shell variable with the same name. In addition to that, you would throw at least our company's shell expert into a fit if you tried to do that in any shell code at all. ;) //Peter -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] how to specify *just* the KERNEL_IMAGETYPES i want?
playing with building fit images, and i started with mpc8315e-rdb, built virtual/kernel using all defaults, and got this in images/: modules--4.9.8+git0+b65e9b6153_6b67f448d6-r0-mpc8315e-rdb-20170315095945.tgz uImage--4.9.8+git0+b65e9b6153_6b67f448d6-r0-mpc8315e-rdb-20170315095945.bin uImage--4.9.8+git0+b65e9b6153_6b67f448d6-r0-mpc8315erdb-20170315095945.dtb which is perfectly fine, since the machine conf file for that target includes the line: KERNEL_IMAGETYPE = "uImage" now i start another (fresh) build, and add to local.conf the lines: KERNEL_CLASSES = "kernel-fitimage" KERNEL_IMAGETYPES = "fitImage" now my use of the above is my (alleged) way of saying, "i only want a fitImage", but given this snippet from kernel.bbclass: # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES type = d.getVar('KERNEL_IMAGETYPE') or "" alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or "" types = d.getVar('KERNEL_IMAGETYPES') or "" if type not in types.split(): types = (type + ' ' + types).strip() i apparently get both the default as specified in the machine .conf file, *as well as* the fitImage i ask for. and, sure enough, in my images/ directory, i have uImages and fitImages (and zImages, but i believe that's because fitImages require them, so no big deal). i suspect i could prevent the generation of uImages by using: KERNEL_IMAGETYPE_mpc8315e-rdb = "fitImage" but from a clarity point of view, would it not make more sense that if someone had a line: KERNEL_IMAGETYPES = " ... list of types ..." that should override whatever KERNEL_IMAGETYPE is in the machine conf file and generate *just* those images? or am i missing something here? rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Replace "if test" file tests with POSIX file tests
On Tue, 2017-03-28 at 06:54 -0400, Robert P. J. Day wrote: > i'm fine with that, as long as it's officially POSIX. that also > suggests the alternate tests: > > [ "${VAR}" ] > [ ! "${VAR}" ] I personally prefer this. ! instead of -z feels more consistent (when not using the special "-n", let's also avoid the special "-z" and use the more general "!" instead. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 2/2] bitbake.conf: Add aws-cli support
On Tue, 2017-03-28 at 13:40 +0200, Elizabeth 'pidge' Flanagan wrote: > This commit adds aws-cli support to bitbake in order to support > the s3 fetcher in bitbake. > > Signed-off-by: Elizabeth 'pidge' Flanagan > --- > meta/conf/bitbake.conf | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf > index fa5445b..f21b8d3 100644 > --- a/meta/conf/bitbake.conf > +++ b/meta/conf/bitbake.conf > @@ -458,8 +458,8 @@ HOSTTOOLS += " \ > bash sh cut sed gcc ld git rm install which find xargs cat true mktemp \ > grep tar gzip touch cp mv basename dirname tr getopt sort awk head tail \ > mkdir patch uniq perl python chmod python3 ar strip expr ls make as \ > -ranlib egrep echo chown cpio tee wc wget bzip2 stat date rmdir od diff \ > -md5sum dd chrpath file pod2man gunzip python2.7 ln g++ [ false true \ > +ranlib egrep echo chown cpio tee wc wget aws bzip2 stat date rmdir \ > +od diff md5sum dd chrpath file pod2man gunzip python2.7 ln g++ [ false > true \ > uname test hostname nm objdump objcopy cmp printf env readlink gawk > fgrep \ > expand pwd sleep diffstat chgrp flock ldd strings rpcgen du makeinfo \ > getconf mknod cpp readelf split \ Adding to HOSTTOOLS means *all* systems have to have this available else the build fails. This for example would breaks all our autobuilders. Past feature freeze point this tends to upset me a bit even more than usual. You want to add this to HOSTTOOLS_NONFATAL below. Your patch also doesn't apply against master either. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2] eudev: restore userspace firmware loading support
On Mon, Mar 27, 2017 at 8:16 PM, Jonathan Liu wrote: ... > It may be a good idea to submit a pull request at > https://github.com/gentoo/eudev/ to upstream this into eudev as Gentoo users > have also experienced this issue in the past - > https://forums.gentoo.org/viewtopic-t-1011456.html. One of the goals of the > eudev fork is obtaining better compatibility with older kernels. This is something so simple; why it has not been reverted yet in upstream. I am afraid they prefer to have this off. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 5/5] linux-yocto: drop 4.8 recipes
We have 4.1 (LTSI), 4.4 (LTS), 4.9 (LTS/LTSI) and 4.10 available in master. 4.8 is no longer required, so we drop the recipe to keep the version selection under control. Signed-off-by: Bruce Ashfield --- meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb | 38 meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb | 25 - meta/recipes-kernel/linux/linux-yocto_4.8.bb | 44 --- 3 files changed, 107 deletions(-) delete mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb delete mode 100644 meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb delete mode 100644 meta/recipes-kernel/linux/linux-yocto_4.8.bb diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb deleted file mode 100644 index f99f200598d3.. --- a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb +++ /dev/null @@ -1,38 +0,0 @@ -KBRANCH ?= "standard/preempt-rt/base" - -require recipes-kernel/linux/linux-yocto.inc - -# Skip processing of this recipe if it is not explicitly specified as the -# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying -# to build multiple virtual/kernel providers, e.g. as dependency of -# core-image-rt-sdk, core-image-rt. -python () { -if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": -raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") -} - -SRCREV_machine ?= "ffd0a071c2df55ecb2bb1f101465df93a81093b5" -SRCREV_meta ?= "ea8a679c9542ab214e4afebcbc82a929624daeb5" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.8.18" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -LINUX_KERNEL_TYPE = "preempt-rt" - -COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)" - -KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc" -KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" -KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc" -KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc" -KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb deleted file mode 100644 index 18ef51788fd3.. --- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb +++ /dev/null @@ -1,25 +0,0 @@ -KBRANCH ?= "standard/tiny/common-pc" -LINUX_KERNEL_TYPE = "tiny" -KCONFIG_MODE = "--allnoconfig" - -require recipes-kernel/linux/linux-yocto.inc - -LINUX_VERSION ?= "4.8.18" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -SRCREV_machine ?= "db2e91ce904f32347ccf739de969b4216cbcaf92" -SRCREV_meta ?= "ea8a679c9542ab214e4afebcbc82a929624daeb5" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}" - -COMPATIBLE_MACHINE = "(qemux86$)" - -# Functionality flags -KERNEL_FEATURES = "" - -KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb" diff --git a/meta/recipes-kernel/linux/linux-yocto_4.8.bb b/meta/recipes-kernel/linux/linux-yocto_4.8.bb deleted file mode 100644 index 4c89183a3512.. --- a/meta/recipes-kernel/linux/linux-yocto_4.8.bb +++ /dev/null @@ -1,44 +0,0 @@ -KBRANCH ?= "standard/base" - -require recipes-kernel/linux/linux-yocto.inc - -# board specific branches -KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs" -KBRANCH_qemuarm64 ?= "standard/qemuarm64" -KBRANCH_qemumips ?= "standard/mti-malta32" -KBRANCH_qemuppc ?= "standard/qemuppc" -KBRANCH_qemux86 ?= "standard/base" -KBRANCH_qemux86-64 ?= "standard/base" -KBRANCH_qemumips64 ?= "standard/mti-malta64" - -SRCREV_machine_qemuarm ?= "c0123490bb9b454a43c3573e2573b491e0c09701" -SRCREV_machine_qemuarm64 ?= "304f750aa5be0bf66f70720d68f16865d912ff9f" -SRCREV_machine_qemumips ?= "aa15b7a291ca18d08fd640932efad673f6b278c3" -SRCREV_machine_qemuppc ?= "d2c3ea488fe179898ae853cb9565cb7ac62291c6" -SRCREV_machine_qemux86 ?= "c50f695341260d4757af64d809390610aae213e1" -SRCREV_machine_qemux86-64 ?= "c50f695341260d4757af64d809390610aae213e1" -SRCREV_machine_qemumips64 ?= "40a880b0f21aa09f3b52d68969339d80f9cc10ad" -SRCREV_machine ?= "c50f695341260d4757af64d809390610aae213e1" -SRCREV_meta ?= "ea8a679c9542ab214e4afebcbc82a929624daeb5" - -SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.8.18" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA =
[OE-core] [PATCH 3/5] linux-yocto/4.4: update to v4.4.56
Integrating the korg release with the following shortlog: 0136bca4e0f6 Linux 4.4.56 99d403faba47 futex: Add missing error handling to FUTEX_REQUEUE_PI 44854c191e2c futex: Fix potential use-after-free in FUTEX_REQUEUE_PI 62f57041fbdf x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm 8e0ec20539f8 x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y 3a19419c50c6 fscrypto: lock inode while setting encryption policy fd74e8d258da fscrypt: fix renaming and linking special files c10ffe988f15 net sched actions: decrement module reference count after table flush. 676fe978525d dccp: fix memory leak during tear-down of unsuccessful connection request 4ab956b56133 dccp/tcp: fix routing redirect race 56f9b9502f2d bridge: drop netfilter fake rtable unconditionally aed728c38c48 ipv6: avoid write to a possibly cloned skb 5f8bc3856e28 ipv6: make ECMP route replacement less greedy b57955ea30e1 mpls: Send route delete notifications when router module is unloaded 710fbeb3f5c5 act_connmark: avoid crashing on malformed nlattrs with null parms 6c72458ab428 uapi: fix linux/packet_diag.h userspace compilation error e671f1cc588f vrf: Fix use-after-free in vrf_xmit d0ebde92fbeb dccp: fix use-after-free in dccp_feat_activate_values ec4d8692b76e net: fix socket refcounting in skb_complete_tx_timestamp() 9e7683301bee net: fix socket refcounting in skb_complete_wifi_ack() 2681a7853ad7 tcp: fix various issues for sockets morphing to listen state 9216632bf4a0 dccp: Unlock sock before calling sk_free() a70c32859704 net: net_enable_timestamp() can be called from irq contexts f331d6445a3e net: don't call strlen() on the user buffer in packet_bind_spkt() 2cd0afc64e33 l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv 354f79125f12 ipv4: mask tos for input route f1b3aae1f1bf vti6: return GRE_KEY for vti6 51a219a1371e vxlan: correctly validate VXLAN ID against VXLAN_N_VID 0c0be310ba29 netlink: remove mmapped netlink support 28ec98bc2e4a Linux 4.4.55 1c5265be54d3 ext4: don't BUG when truncating encrypted inodes on the orphan list cd8ad4d9eb6d dm: flush queued bios when process blocks to avoid deadlock 66dd58f56eab nfit, libnvdimm: fix interleave set cookie calculation a084aeef5633 s390/kdump: Use "LINUX" ELF note name instead of "CORE" b0e85701a776 KVM: s390: Fix guest migration for huge guests resulting in panic 61fbad6a28fd mvsas: fix misleading indentation 72ca0ab30680 serial: samsung: Continue to work if DMA request fails 72bb2b96b856 USB: serial: io_ti: fix information leak in completion handler e71c7bad6844 USB: serial: io_ti: fix NULL-deref in interrupt callback 6498086195b9 USB: iowarrior: fix NULL-deref in write 179295c38d23 USB: iowarrior: fix NULL-deref at probe 54f11a9662b6 USB: serial: omninet: fix reference leaks at open 3cdc94638746 USB: serial: safe_serial: fix information leak in completion handler cf09c7d60ccc usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers 40c5634ffe3d usb: host: xhci-dbg: HCIVERSION should be a binary number 4a1a3bb70fb4 usb: gadget: function: f_fs: pass companion descriptor along 10af24856503 usb: dwc3: gadget: make Set Endpoint Configuration macros safe f47b97f2cdaa usb: gadget: dummy_hcd: clear usb_gadget region before registration 2ca39d130015 powerpc: Emulation support for load/store instructions on LE 074893495b72 tracing: Add #undef to fix compile error 127651058594 MIPS: Netlogic: Fix CP0_EBASE redefinition warnings 2e4aff2405af MIPS: DEC: Avoid la pseudo-instruction in delay slots 5fad17434465 mm: memcontrol: avoid unused function warning 5e45d834f762 cpmac: remove hopeless #warning 32883383f5e0 MIPS: ralink: Remove unused rt*_wdt_reset functions 4b91e7a2a9a7 MIPS: ralink: Cosmetic change to prom_init(). 3dc8f1e3a8f2 mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy d2a8d746ae95 MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change c018595d83a3 MIPS: ip22: Fix ip28 build for modern gcc 7a6a965f350e MIPS: Update ip27_defconfig for SCSI_DH change 8ed0fdcc0c11 MIPS: ip27: Disable qlge driver in defconfig adc48c710b7e MIPS: Update defconfigs for NF_CT_PROTO_DCCP/UDPLITE change e041ad066440 crypto: improve gcc optimization flags for serpent and wp512 a8cb5c02a20f USB: serial: digi_acceleport: fix OOB-event processing 4d95645f3dd5 USB: serial: digi_acceleport: fix OOB data sanity check Signed-off-by: Bruce Ashfield --- meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb | 6 +++--- meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb | 6 +++--- meta/recipes-kernel/linux/linux-yocto_4.4.bb | 20 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb index 390b0b72c137..278a900c16b2 100644 --- a/meta/re
[OE-core] [PATCH 2/5] linux-yocto/4.9: update to v4.9.17
Integrating the korg -stable release with the following shortlogs: c3825da143fc Linux 4.9.17 ecdc5b12d7a0 crypto: powerpc - Fix initialisation of crc32c context c40609652267 locking/rwsem: Fix down_write_killable() for CONFIG_RWSEM_GENERIC_SPINLOCK=y 1522181f4bc1 futex: Add missing error handling to FUTEX_REQUEUE_PI 6244ffc5a122 futex: Fix potential use-after-free in FUTEX_REQUEUE_PI 9f9115b67aa5 x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm 24ba2842a49d x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y 5ec98e6ffdce x86/tsc: Fix ART for TSC_KNOWN_FREQ 095635be809a irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065 61e79860b4bc arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs 8ca7ef0d9af9 drm/vc4: Fix ->clock_select setting for the VEC encoder 6b3306706733 drm/vc4: Fix race between page flip completion event and clean-up f4d40cfd61ea clk: bcm2835: Fix ->fixed_divider of pllh_aux 7885195b9177 powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y ce7aeffe7596 usb: gadget: udc: atmel: remove memory leak 4fa1c65cf040 serial: 8250_pci: Detach low-level driver during PCI error recovery 56c28e7983a8 ACPI / blacklist: Make Dell Latitude 3350 ethernet work 5c19e9070df8 ACPI / blacklist: add _REV quirks for Dell Precision 5520 and 3520 bc01eb939899 slub: move synchronize_sched out of slab_mutex on shrink bd2de45031b9 uvcvideo: uvc_scan_fallback() for webcams with broken chain e627116c0c35 s390/zcrypt: Introduce CEX6 toleration 61a153d06ef4 block: allow WRITE_SAME commands with the SG_IO ioctl 0042afe117c6 drm/nouveau/disp/nv50-: specify ctrl/user separately when constructing classes 5001756c1c70 drm/nouveau/disp/nv50-: split chid into chid.ctrl and chid.user ddc23b5212b9 drm/nouveau/disp/gp102: fix cursor/overlay immediate channel indices 53e18968a9c0 vfio/spapr: Postpone default window creation 2e60baca235b vfio/spapr: Add a helper to create default DMA window 080eb13542a8 powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown 92e44bcd71ae vfio/spapr: Reference mm in tce_container 5b34666bd2e7 powerpc/iommu: Stop using @current in mm_iommu_xxx 2ba7ef21820e powerpc/iommu: Pass mm_struct to init/cleanup helpers 5d8b3e755974 vfio/spapr: Postpone allocation of userspace version of TCE table 3c0cbb47a8d6 Drivers: hv: ring_buffer: count on wrap around mappings in get_next_pkt_raw() (v2) 3e5a7f5b95f0 ibmveth: calculate gso_segs for large packets fb7c521a1460 PCI: Do any VF BAR updates before enabling the BARs 3d58444dea81 PCI: Ignore BAR updates on virtual functions 74cce811a4b6 PCI: Update BARs using property bits appropriate for type a38012dc69eb PCI: Don't update VF BARs while VF memory space is enabled bb479246bb3e PCI: Decouple IORESOURCE_ROM_ENABLE and PCI_ROM_ADDRESS_ENABLE ed09d211d28e PCI: Add comments about ROM BAR updating 7b65c3a84311 PCI: Remove pci_resource_bar() and pci_iov_resource_bar() 6a5f3e664ac7 PCI: Separate VF BAR updates from standard BAR updates 29d928785f5e x86/hyperv: Handle unknown NMIs on one CPU when unknown_nmi_panic 456be98b4e79 scsi: ibmvscsis: Synchronize cmds at remove time 94700877c25f scsi: ibmvscsis: Synchronize cmds at tpg_enable_store time 189491f81cf6 scsi: ibmvscsis: Rearrange functions for future patches 4d36f4859fa4 scsi: ibmvscsis: Clean up properly if target_submit_cmd/tmr fails 29022860df8e scsi: ibmvscsis: Return correct partition name/# to client 0ad1d7660a57 scsi: ibmvscsis: Issues from Dan Carpenter/Smatch 61229e62c1aa igb: add i211 to i210 PHY workaround 15ffc931eeb9 igb: Workaround for igb i210 firmware issue 4b40611a9b7e xen: do not re-use pirq number cached in pci device msi msg data 2382c1486c62 dmaengine: iota: ioat_alloc_chan_resources should not perform sleeping allocations. 0e0f1d6fdb35 bpf: fix mark_reg_unknown_value for spilled regs on map value marking 1889d6d9b5e7 bpf: fix regression on verifier pruning wrt map lookups b7f5aa1ca0be bpf: fix state equivalence 1411707acb85 bpf: Detect identical PTR_TO_MAP_VALUE_OR_NULL registers 9e38375a4b17 dccp: fix memory leak during tear-down of unsuccessful connection request beaa66cce556 tun: fix premature POLLOUT notification on tun devices 98933eb36dd2 dccp/tcp: fix routing redirect race 9bce26f224d8 bridge: drop netfilter fake rtable unconditionally 683100ed4576 ipv6: avoid write to a possibly cloned skb 4a8d3bb73a82 ipv6: make ECMP route replacement less greedy 87c0286a07f9 mpls: Do not decrement alive counter for unregister events b61206e25302 mpls: Send route delete notifications when router module is unloaded 47c8dc47c008 act_connmark: avoid crashing on malformed nlattrs with null parms ccb65adc6ca6 uapi: fix linux/packet_diag.h userspace compilation error b07eed8f7119 net/tunnel: set inner protocol in network gro hooks
[OE-core] [PATCH 4/5] linux-yocto/4.9: integrate 4.9-rt12
Paul Gortmaker has made the 4.9-rt12 available to linux-yocto, so we integrate it here and update the SRCREVs. Signed-off-by: Bruce Ashfield --- meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb | 4 ++-- meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb | 2 +- meta/recipes-kernel/linux/linux-yocto_4.9.bb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb index e5f8e1d44ce2..63a8a3412d80 100644 --- a/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb +++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb @@ -11,8 +11,8 @@ python () { raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "66f4ce788d6bd16e858ec3d32b8b0f91619eb356" -SRCREV_meta ?= "0e129b67b7c540f2137f8fdbced06d122475" +SRCREV_machine ?= "95acaf7dbc800201295e6eb9f9a37ac24c53001b" +SRCREV_meta ?= "8b97a445fab217b545fff10c27be8f60853f29de" SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb index fefe309b0f38..2dc233e57d11 100644 --- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb @@ -10,7 +10,7 @@ KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" SRCREV_machine ?= "e675c4ecccb9dd9dd637f104e32b7808b4d56846" -SRCREV_meta ?= "0e129b67b7c540f2137f8fdbced06d122475" +SRCREV_meta ?= "8b97a445fab217b545fff10c27be8f60853f29de" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/meta/recipes-kernel/linux/linux-yocto_4.9.bb b/meta/recipes-kernel/linux/linux-yocto_4.9.bb index 17bbdbabb2f2..54fafae66305 100644 --- a/meta/recipes-kernel/linux/linux-yocto_4.9.bb +++ b/meta/recipes-kernel/linux/linux-yocto_4.9.bb @@ -19,7 +19,7 @@ SRCREV_machine_qemux86 ?= "e675c4ecccb9dd9dd637f104e32b7808b4d56846" SRCREV_machine_qemux86-64 ?= "e675c4ecccb9dd9dd637f104e32b7808b4d56846" SRCREV_machine_qemumips64 ?= "c7eee598e73eb4b6eb1e9d203e6e84e63a4a278a" SRCREV_machine ?= "e675c4ecccb9dd9dd637f104e32b7808b4d56846" -SRCREV_meta ?= "0e129b67b7c540f2137f8fdbced06d122475" +SRCREV_meta ?= "8b97a445fab217b545fff10c27be8f60853f29de" SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;name=machine;branch=${KBRANCH}; \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" -- 2.5.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/5] linux-yocto/4.10: update to v4.10.5
Integrating the korg -stable release with the following shortlog summary: 034612ee057c Linux 4.10.5 7814c9bd217a crypto: s5p-sss - Fix spinlock recursion on LRW(AES) 4310604e21dd crypto: powerpc - Fix initialisation of crc32c context de3c88fa6a29 locking/rwsem: Fix down_write_killable() for CONFIG_RWSEM_GENERIC_SPINLOCK=y d80e46d90742 futex: Add missing error handling to FUTEX_REQUEUE_PI 575caefc01f3 futex: Fix potential use-after-free in FUTEX_REQUEUE_PI 57ad6c8ecb1f x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm 343146100991 x86/intel_rdt: Put group node in rdtgroup_kn_unlock 7621600b480e x86/kasan: Fix boot with KASAN=y and PROFILE_ANNOTATED_BRANCHES=y bd5ee529d0be x86/tsc: Fix ART for TSC_KNOWN_FREQ a0256e0c0dc6 x86/unwind: Fix last frame check for aligned function stacks 5b115b8b53d8 drm/i915/lspcon: Fix resume time initialization due to unasserted HPD ebd9dbabb5fc drm/i915/gen9+: Enable hotplug detection early b9208ab35001 drm/i915/lspcon: Enable AUX interrupts for resume time initialization 1740a61cf09e irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065 ef217ea7f1fb arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs f70ce6c63e02 dccp: fix memory leak during tear-down of unsuccessful connection request a79fa23c82a1 tun: fix premature POLLOUT notification on tun devices b34c9f7fe45e dccp/tcp: fix routing redirect race 7ebf301d8476 net: use net->count to check whether a netns is alive or not 47808872e25b bridge: drop netfilter fake rtable unconditionally fdb09132bdea ipv6: avoid write to a possibly cloned skb b74b74e2087e ipv6: make ECMP route replacement less greedy ed44bf89ab5f mpls: Do not decrement alive counter for unregister events 61cc1778ad62 mpls: Send route delete notifications when router module is unloaded 8e9bacd9add7 act_connmark: avoid crashing on malformed nlattrs with null parms cdb9caeb7177 amd-xgbe: Enable IRQs only if napi_complete_done() is true 110e7778ea32 uapi: fix linux/packet_diag.h userspace compilation error 5344ec08726a net/tunnel: set inner protocol in network gro hooks 7360a1fda857 vrf: Fix use-after-free in vrf_xmit be18cce7e665 team: use ETH_MAX_MTU as max mtu 92ab4dea27c1 dccp: fix use-after-free in dccp_feat_activate_values a6ff06211b84 net/sched: act_skbmod: remove unneeded rcu_read_unlock in tcf_skbmod_dump 27d0c80f1089 net: fix socket refcounting in skb_complete_tx_timestamp() 80691f3808fc net: fix socket refcounting in skb_complete_wifi_ack() 81a43770b456 tcp: fix various issues for sockets morphing to listen state 178e86ff331d strparser: destroy workqueue on module exit aa677aafef5c bonding: use ETH_MAX_MTU as max mtu 0ee7666f639a amd-xgbe: Don't overwrite SFP PHY mod_absent settings 9919f222968c amd-xgbe: Be sure to set MDIO modes on device (re)start 4381ffdfb32b amd-xgbe: Stop the PHY before releasing interrupts 7558c56cfe35 dccp: Unlock sock before calling sk_free() a8ee7ed1b03d ipv6: orphan skbs in reassembly unit eb39579a675a net: net_enable_timestamp() can be called from irq contexts fa8bc7b48168 net: don't call strlen() on the user buffer in packet_bind_spkt() e89adaa7d0cf net: bridge: allow IPv6 when multicast flood is disabled da2da823497c tcp/dccp: block BH for SYN processing 8f05976cbfba mlxsw: spectrum_router: Avoid potential packets loss 40f9f783920f geneve: lock RCU on TX path d6705c8c0cb0 vxlan: lock RCU on TX path 4c94beba3aee l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv 639fdd961af0 net sched actions: decrement module reference count after table flush. 467bec3656bd sctp: set sin_port for addr param when checking duplicate address 91f4f5bfaa29 ipv4: mask tos for input route 0a33d62a6f9d ipv4: add missing initialization for flowi4_uid 2b5a48d6c6eb vxlan: don't allow overwrite of config src addr fef3f97a58b2 vti6: return GRE_KEY for vti6 36ec2150ae0a vxlan: correctly validate VXLAN ID against VXLAN_N_VID f44877534257 sctp: deny peeloff operation on asocs with threads sleeping on it 55bb0dd0256c net/mlx5e: Fix wrong CQE decompression c0dc4855e92b net/mlx5e: Update MPWQE stride size when modifying CQE compress state c34c17861ab1 net/mlx5e: Fix broken CQE compression initialization 850a1bfbf35d net/mlx5e: Do not reduce LRO WQE size when not using build_skb 96b457b80526 net/mlx5e: Register/unregister vport representors on interface attach/detach 8ea22fb3114d Linux 4.10.4 42b16fffb79b IB/mlx5: Verify that Q counters are supported dc37bb8db47b ext4: don't BUG when truncating encrypted inodes on the orphan list 1cda29082a30 rc: raw decoder for keymap protocol is not loaded on register 22fc2f9efa27 dm: flush queued bios when process blocks to avoid deadlock 2030aedc5404 serial_ir: ensure we're ready to receive interrupts 81383a00ce83 drm/i915/gvt: Fix superfluous newline in GVT_DIS
[OE-core] [PATCH 0/5] linux-yocto: -stable, -rt updates and 4.8 removal
Hi all, These are updates to the 4.4, 4.9 and 4.10 linux-yocto kernel trees to the latest -stable and -rt releases. Nothing particular ground breaking here, but they are the usual set of CVE and bug fixes. Everything built and booted fine for me. I'm also removing the 4.8 linux-yocto recipe from master, since we are adding 4.10 for this release. I'll still be doing updates to 4.8, just not sending SRCREV updates to master. Cheers, Bruce The following changes since commit 49c2df5652d25e6e9b2a4976658ab9bb17fe6694: meta-yocto-bsp: Remove superfluous OVERRIDES in machine conf files (2017-03-22 11:35:23 +) are available in the git repository at: git://git.pokylinux.org/poky-contrib zedd/kernel http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel Bruce Ashfield (5): linux-yocto/4.10: update to v4.10.5 linux-yocto/4.9: update to v4.9.17 linux-yocto/4.4: update to v4.4.56 linux-yocto/4.9: integrate 4.9-rt12 linux-yocto: drop 4.8 recipes meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb | 6 +-- meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb| 6 +-- meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb| 38 --- meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb| 6 +-- meta/recipes-kernel/linux/linux-yocto-tiny_4.10.bb | 6 +-- meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb | 6 +-- meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb | 25 meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb | 6 +-- meta/recipes-kernel/linux/linux-yocto_4.10.bb | 20 +- meta/recipes-kernel/linux/linux-yocto_4.4.bb | 20 +- meta/recipes-kernel/linux/linux-yocto_4.8.bb | 44 -- meta/recipes-kernel/linux/linux-yocto_4.9.bb | 20 +- 12 files changed, 48 insertions(+), 155 deletions(-) delete mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb delete mode 100644 meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb delete mode 100644 meta/recipes-kernel/linux/linux-yocto_4.8.bb -- 2.5.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 7/9] wic: remove runner.show API
Replaced runner.show call to exec_cmd call in bootimg-pcbios plugin. Removed runner.show API as it's not used anywhere else. [YOCTO #10618] Signed-off-by: Ed Bartosh --- scripts/lib/wic/plugins/source/bootimg-pcbios.py | 6 ++ scripts/lib/wic/utils/runner.py | 24 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index bfb8ff5..5890c12 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py @@ -81,10 +81,8 @@ class BootimgPcbiosPlugin(SourcePlugin): logger.debug("Installing MBR on disk %s as %s with size %s bytes", disk_name, full_path, disk.min_size) -rcode = runner.show(['dd', 'if=%s' % mbrfile, - 'of=%s' % full_path, 'conv=notrunc']) -if rcode != 0: -raise WicError("Unable to set MBR to %s" % full_path) +dd_cmd = "dd if=%s of=%s conv=notrunc" % (mbrfile, full_path) +exec_cmd(dd_cmd, native_sysroot) @classmethod def do_configure_partition(cls, part, source_params, creator, cr_workdir, diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py index 56d7ea3..348557a 100644 --- a/scripts/lib/wic/utils/runner.py +++ b/scripts/lib/wic/utils/runner.py @@ -82,30 +82,6 @@ def runtool(cmdln_or_args, catch=1): return (process.returncode, out) -def show(cmdln_or_args): -"""Show all messages using logger.debug.""" - -rcode, out = runtool(cmdln_or_args, catch=3) - -if isinstance(cmdln_or_args, list): -cmd = ' '.join(cmdln_or_args) -else: -cmd = cmdln_or_args - -msg = 'running command: "%s"' % cmd -if out: -out = out.strip() -if out: -msg += ', with output::' -msg += '\n +' -for line in out.splitlines(): -msg += '\n | %s' % line -msg += '\n +' - -logger.debug(msg) - -return rcode - def outs(cmdln_or_args, catch=1): # get the outputs of tools return runtool(cmdln_or_args, catch)[1].strip() -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] fetch2: Create/replace symbolic links atomically
On Tue, 2017-03-28 at 14:30 +0200, Peter Kjellerstedt wrote: > Under rare circumstances, creating symbolic links could fail because > the link already exists. At first glance the code seemed to protect > against this, but there was a small window where two separate tasks > could decide that a symbolic link needed to be created and then the > first task would create it and the second task would fail. > > Signed-off-by: Peter Kjellerstedt > --- > bitbake/lib/bb/fetch2/__init__.py | 20 +--- > 1 file changed, 13 insertions(+), 7 deletions(-) As Ross says, this needs to go to the bitbake list. I'm also curious why not watch for the "AlreadyExists" exception (whatever it really is) and then simply pass over the error assuming the symlink points to the same place? That saves messing with temporary files. I also worry a little about the locking? Why have you two fetch processes which are changing the same files but not covered by the same lock file? :/ Cheers, Richard > diff --git a/bitbake/lib/bb/fetch2/__init__.py > b/bitbake/lib/bb/fetch2/__init__.py > index 464e66b98a..f891e34eab 100644 > --- a/bitbake/lib/bb/fetch2/__init__.py > +++ b/bitbake/lib/bb/fetch2/__init__.py > @@ -25,7 +25,7 @@ BitBake build tools. > # > # Based on functions from the base bb module, Copyright 2003 Holger > Schurig > > -import os, re > +import os, re, tempfile > import signal > import logging > import urllib.request, urllib.parse, urllib.error > @@ -946,6 +946,16 @@ def rename_bad_checksum(ud, suffix): > bb.warn("Renaming %s to %s" % (ud.localpath, new_localpath)) > bb.utils.movefile(ud.localpath, new_localpath) > > +def atomic_symlink(src, dst): > +"""Create/replace a symbolic link atomically.""" > + > +tmpname = tempfile.mktemp(prefix=dst) > +os.symlink(src, tmpname) > +try: > +os.rename(tmpname, dst) > +except OSError: > +os.remove(tmpname) > +raise > > def try_mirror_url(fetch, origud, ud, ld, check = False): > # Return of None or a value means we're finished > @@ -983,7 +993,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = > False): > open(ud.donestamp, 'w').close() > dest = os.path.join(dldir, > os.path.basename(ud.localpath)) > if not os.path.exists(dest): > -os.symlink(ud.localpath, dest) > +atomic_symlink(ud.localpath, dest) > if not verify_donestamp(origud, ld) or > origud.method.need_update(origud, ld): > origud.method.download(origud, ld) > if hasattr(origud.method,"build_mirror_data"): > @@ -991,11 +1001,7 @@ def try_mirror_url(fetch, origud, ud, ld, check > = False): > return origud.localpath > # Otherwise the result is a local file:// and we symlink to > it > if not os.path.exists(origud.localpath): > -if os.path.islink(origud.localpath): > -# Broken symbolic link > -os.unlink(origud.localpath) > - > -os.symlink(ud.localpath, origud.localpath) > +atomic_symlink(ud.localpath, origud.localpath) > update_stamp(origud, ld) > return ud.localpath > > -- > 2.12.0 > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 5/9] wic: remove fsimage plugin
Removed fsimage plugin and prepare_rootfs_from_fs_image API as they duplicate functionality of rawcopy plugin. Fsimage plugin makes wic to remove the image artifact from deployment directory, which can cause problems too. [YOCTO #10618] Signed-off-by: Ed Bartosh --- scripts/lib/wic/partition.py | 13 --- scripts/lib/wic/plugins/source/fsimage.py | 56 --- 2 files changed, 69 deletions(-) delete mode 100644 scripts/lib/wic/plugins/source/fsimage.py diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 8e32afc..647a6fb 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -193,19 +193,6 @@ class Partition(): "larger (%d kB) than its allowed size %d kB" % (self.mountpoint, self.size, self.fixed_size)) -def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir, - rootfs_dir): -""" -Handle an already-created partition e.g. xxx.ext3 -""" -rootfs = oe_builddir -du_cmd = "du -Lbks %s" % rootfs -out = exec_cmd(du_cmd) -rootfs_size = out.split()[0] - -self.size = int(rootfs_size) -self.source_file = rootfs - def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir, native_sysroot): """ diff --git a/scripts/lib/wic/plugins/source/fsimage.py b/scripts/lib/wic/plugins/source/fsimage.py deleted file mode 100644 index f781499..000 --- a/scripts/lib/wic/plugins/source/fsimage.py +++ /dev/null @@ -1,56 +0,0 @@ -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -import logging -import os - -from wic import WicError -from wic.pluginbase import SourcePlugin -from wic.utils.misc import get_bitbake_var - -logger = logging.getLogger('wic') - -class FSImagePlugin(SourcePlugin): -""" -Add an already existing filesystem image to the partition layout. -""" - -name = 'fsimage' - -@classmethod -def do_prepare_partition(cls, part, source_params, cr, cr_workdir, - oe_builddir, bootimg_dir, kernel_dir, - rootfs_dir, native_sysroot): -""" -Called to do the actual content population for a partition i.e. it -'prepares' the partition to be incorporated into the image. -""" -if not bootimg_dir: -bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") -if not bootimg_dir: -raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting") - -logger.debug('Bootimg dir: %s', bootimg_dir) - -if 'file' not in source_params: -raise WicError("No file specified") - -src = os.path.join(bootimg_dir, source_params['file']) - - -logger.debug('Preparing partition using image %s', src) -part.prepare_rootfs_from_fs_image(cr_workdir, src, "") -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 8/9] wic: remove unused code from runner module
Removed unused APIs 'outs' and 'quiet'. Removed 'catch' parameter from runner.runtool API as wic uses only one value of it. Removed the code that handles unused values of 'catch' parameter. [YOCTO #10618] Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/misc.py | 14 ++-- scripts/lib/wic/utils/runner.py | 50 + 2 files changed, 13 insertions(+), 51 deletions(-) diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py index c941112..307779a 100644 --- a/scripts/lib/wic/utils/misc.py +++ b/scripts/lib/wic/utils/misc.py @@ -59,7 +59,7 @@ NATIVE_RECIPES = {"bmaptool": "bmap-tools", "syslinux": "syslinux" } -def _exec_cmd(cmd_and_args, as_shell=False, catch=3): +def _exec_cmd(cmd_and_args, as_shell=False): """ Execute command, catching stderr, stdout @@ -70,9 +70,9 @@ def _exec_cmd(cmd_and_args, as_shell=False, catch=3): logger.debug(args) if as_shell: -ret, out = runner.runtool(cmd_and_args, catch) +ret, out = runner.runtool(cmd_and_args) else: -ret, out = runner.runtool(args, catch) +ret, out = runner.runtool(args) out = out.strip() if ret != 0: raise WicError("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" % \ @@ -84,14 +84,14 @@ def _exec_cmd(cmd_and_args, as_shell=False, catch=3): return ret, out -def exec_cmd(cmd_and_args, as_shell=False, catch=3): +def exec_cmd(cmd_and_args, as_shell=False): """ Execute command, return output """ -return _exec_cmd(cmd_and_args, as_shell, catch)[1] +return _exec_cmd(cmd_and_args, as_shell)[1] -def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""): +def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""): """ Execute native command, catching stderr, stdout @@ -118,7 +118,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""): # If the command isn't in the native sysroot say we failed. if spawn.find_executable(args[0], native_paths): -ret, out = _exec_cmd(native_cmd_and_args, True, catch) +ret, out = _exec_cmd(native_cmd_and_args, True) else: ret = 127 out = "can't find native executable %s in %s" % (args[0], native_paths) diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py index 348557a..4aa00fb 100644 --- a/scripts/lib/wic/utils/runner.py +++ b/scripts/lib/wic/utils/runner.py @@ -14,32 +14,17 @@ # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -import logging -import os import subprocess from wic import WicError -logger = logging.getLogger('wic') - -def runtool(cmdln_or_args, catch=1): +def runtool(cmdln_or_args): """ wrapper for most of the subprocess calls input: cmdln_or_args: can be both args and cmdln str (shell=True) -catch: 0, quitely run - 1, only STDOUT - 2, only STDERR - 3, both STDOUT and STDERR return: -(rc, output) -if catch==0: the output will always None +rc, output """ - -if catch not in (0, 1, 2, 3): -# invalid catch selection, will cause exception, that's good -return None - if isinstance(cmdln_or_args, list): cmd = cmdln_or_args[0] shell = False @@ -48,26 +33,13 @@ def runtool(cmdln_or_args, catch=1): cmd = shlex.split(cmdln_or_args)[0] shell = True -if catch != 3: -dev_null = os.open("/dev/null", os.O_WRONLY) - -if catch == 0: -sout = dev_null -serr = dev_null -elif catch == 1: -sout = subprocess.PIPE -serr = dev_null -elif catch == 2: -sout = dev_null -serr = subprocess.PIPE -elif catch == 3: -sout = subprocess.PIPE -serr = subprocess.STDOUT +sout = subprocess.PIPE +serr = subprocess.STDOUT try: process = subprocess.Popen(cmdln_or_args, stdout=sout, stderr=serr, shell=shell) -(sout, serr) = process.communicate() +sout, serr = process.communicate() # combine stdout and stderr, filter None out and decode out = ''.join([out.decode('utf-8') for out in [sout, serr] if out]) except OSError as err: @@ -76,15 +48,5 @@ def runtool(cmdln_or_args, catch=1): raise WicError('Cannot run command: %s, lost dependency?' % cmd) else: raise # relay -finally: -if catch != 3: -os.close(dev_null) - -return (process.returncode, out) - -def outs(cmdln_or_args, catch=1): -# get the outputs of tools -return runtool(cmdln_or_args, catch)[1].strip() -def quiet(cmdln_or_args): -return runtool(cmdln_or_args, catch=0)[0] +
[OE-core] [PATCH 6/9] wic: use wic-tools STAGING_DATADIR as bootimg_dir
If bootloader artifacts are not found in default bootimg_dir use wic-tools sysroot for the same purpose. This should prevent wic from failing if bootloader artifacts can't be found in image native sysroot. Signed-off-by: Ed Bartosh --- scripts/lib/wic/plugins/source/bootimg-pcbios.py | 42 +++- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index 11db304..bfb8ff5 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py @@ -44,19 +44,16 @@ class BootimgPcbiosPlugin(SourcePlugin): name = 'bootimg-pcbios' @classmethod -def _get_syslinux_dir(cls, bootimg_dir): +def _get_bootimg_dir(cls, bootimg_dir, dirname): """ -Get path to syslinux from either default bootimg_dir -or wic-tools STAGING_DIR. +Check if dirname exists in default bootimg_dir or +in wic-tools STAGING_DIR. """ -for path in (bootimg_dir, get_bitbake_var("STAGING_DATADIR", "wic-tools")): -if not path: -continue -syslinux_dir = os.path.join(path, 'syslinux') -if os.path.exists(syslinux_dir): -return syslinux_dir +for result in (bootimg_dir, get_bitbake_var("STAGING_DATADIR", "wic-tools")): +if os.path.exists("%s/%s" % (result, dirname)): +return result -raise WicError("Couldn't find syslinux directory, exiting") +raise WicError("Couldn't find correct bootimg_dir, exiting") @classmethod def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir, @@ -65,11 +62,12 @@ class BootimgPcbiosPlugin(SourcePlugin): Called after all partitions have been prepared and assembled into a disk image. In this case, we install the MBR. """ -syslinux_dir = cls._get_syslinux_dir(bootimg_dir) +bootimg_dir = cls._get_bootimg_dir(bootimg_dir, 'syslinux') +mbrfile = "%s/syslinux/" % bootimg_dir if creator.ptable_format == 'msdos': -mbrfile = os.path.join(syslinux_dir, "mbr.bin") +mbrfile += "mbr.bin" elif creator.ptable_format == 'gpt': -mbrfile = os.path.join(syslinux_dir, "gptmbr.bin") +mbrfile += "gptmbr.bin" else: raise WicError("Unsupported partition table: %s" % creator.ptable_format) @@ -155,7 +153,7 @@ class BootimgPcbiosPlugin(SourcePlugin): 'prepares' the partition to be incorporated into the image. In this case, prepare content for legacy bios boot partition. """ -syslinux_dir = cls._get_syslinux_dir(bootimg_dir) +bootimg_dir = cls._get_bootimg_dir(bootimg_dir, 'syslinux') staging_kernel_dir = kernel_dir @@ -163,14 +161,14 @@ class BootimgPcbiosPlugin(SourcePlugin): cmds = ("install -m 0644 %s/bzImage %s/vmlinuz" % (staging_kernel_dir, hdddir), -"install -m 444 %s/ldlinux.sys %s/ldlinux.sys" % -(syslinux_dir, hdddir), -"install -m 0644 %s/vesamenu.c32 %s/vesamenu.c32" % -(syslinux_dir, hdddir), -"install -m 444 %s/libcom32.c32 %s/libcom32.c32" % -(syslinux_dir, hdddir), -"install -m 444 %s/libutil.c32 %s/libutil.c32" % -(syslinux_dir, hdddir)) +"install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" % +(bootimg_dir, hdddir), +"install -m 0644 %s/syslinux/vesamenu.c32 %s/vesamenu.c32" % +(bootimg_dir, hdddir), +"install -m 444 %s/syslinux/libcom32.c32 %s/libcom32.c32" % +(bootimg_dir, hdddir), +"install -m 444 %s/syslinux/libutil.c32 %s/libutil.c32" % +(bootimg_dir, hdddir)) for install_cmd in cmds: exec_cmd(install_cmd) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 9/9] oe-selftest: add test_image_bootpart_globbed test for wic
Test image-bootpart wic plugin with globbed value of IMAGE_BOOT_FILES variable to increase test coverage. [YOCTO #10618] Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index f0d9dd9..2401aaa 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py @@ -748,3 +748,13 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r wksname = os.path.splitext(os.path.basename(wks.name))[0] out = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(out)) + +def test_image_bootpart_globbed(self): +"""Test globbed sources with image-bootpart plugin""" +img = "core-image-minimal" +cmd = "wic create sdimage-bootpart -e %s -o %s" % (img, self.resultdir) +config = 'IMAGE_BOOT_FILES = "%s*"' % get_bb_var('KERNEL_IMAGETYPE', img) +self.append_config(config) +self.assertEqual(0, runCmd(cmd).status) +self.remove_config(config) +self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct"))) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 4/9] oe-selftest: add kickstart_parser test case
Added test_kickstart_parser test case to test wks parser options not yet covered by tests. [YOCTO #10618] Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 12 1 file changed, 12 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 2af3bf5..f0d9dd9 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py @@ -736,3 +736,15 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r wksname = os.path.splitext(os.path.basename(wks.name))[0] out = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(out)) + +def test_kickstart_parser(self): +"""Test wks parser options""" +with NamedTemporaryFile("w", suffix=".wks") as wks: +wks.writelines(['part / --fstype ext3 --source rootfs --system-id 0xFF '\ +'--overhead-factor 1.2 --size 100k\n']) +wks.flush() +cmd = "wic create %s -e core-image-minimal -o %s" % (wks.name, self.resultdir) +self.assertEqual(0, runCmd(cmd).status) +wksname = os.path.splitext(os.path.basename(wks.name))[0] +out = glob(self.resultdir + "%s-*direct" % wksname) +self.assertEqual(1, len(out)) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/9] oe-selftest: add wic test case test_fs_types
Added wic test case to test all possible filesystem types for empty and not empty partitions. [YOCTO #10618] Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 19 +++ 1 file changed, 19 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index ee633f8..2af3bf5 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py @@ -717,3 +717,22 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r wksname = os.path.splitext(os.path.basename(wks.name))[0] out = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(out)) + +def test_fs_types(self): +"""Test filesystem types for empty and not empty partitions""" +img = 'core-image-minimal' +with NamedTemporaryFile("w", suffix=".wks") as wks: +wks.writelines(['part ext2 --fstype ext2 --source rootfs\n', +'part btrfs --fstype btrfs--source rootfs --size 40M\n', +'part squash --fstype squashfs --source rootfs\n', +'part swap --fstype swap --size 1M\n', +'part emptyvfat --fstype vfat --size 1M\n', +'part emptyext2 --fstype ext2 --size 1M\n', +'part emptybtrfs --fstype btrfs --size 100M\n', +'part emptysquash --fstype squash --size 1M\n']) +wks.flush() +cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) +self.assertEqual(0, runCmd(cmd).status) +wksname = os.path.splitext(os.path.basename(wks.name))[0] +out = glob(self.resultdir + "%s-*direct" % wksname) +self.assertEqual(1, len(out)) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 3/9] filemap: remove FilemapSeek class
FIEMAP API was added to Linux kernel 2.6.28 back in 2008 SEEK_HOLE and SEEK_DATA API was added much letter. As FIEMAP is used by filemap module as a default API it's safe to remove FileMpSeek class as it's never used. [YOCTO #10618] Signed-off-by: Ed Bartosh --- scripts/lib/wic/filemap.py | 309 +++-- 1 file changed, 49 insertions(+), 260 deletions(-) diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py index 080668e..34523c0 100644 --- a/scripts/lib/wic/filemap.py +++ b/scripts/lib/wic/filemap.py @@ -54,24 +54,46 @@ class Error(Exception): """A class for all the other exceptions raised by this module.""" pass +# Below goes the FIEMAP ioctl implementation, which is not very readable +# because it deals with the rather complex FIEMAP ioctl. To understand the +# code, you need to know the FIEMAP interface, which is documented in the +# "Documentation/filesystems/fiemap.txt" file in the Linux kernel sources. + +# Format string for 'struct fiemap' +_FIEMAP_FORMAT = "=QQ" +# sizeof(struct fiemap) +_FIEMAP_SIZE = struct.calcsize(_FIEMAP_FORMAT) +# Format string for 'struct fiemap_extent' +_FIEMAP_EXTENT_FORMAT = "=Q" +# sizeof(struct fiemap_extent) +_FIEMAP_EXTENT_SIZE = struct.calcsize(_FIEMAP_EXTENT_FORMAT) +# The FIEMAP ioctl number +_FIEMAP_IOCTL = 0xC020660B +# This FIEMAP ioctl flag which instructs the kernel to sync the file before +# reading the block map +_FIEMAP_FLAG_SYNC = 0x0001 +# Size of the buffer for 'struct fiemap_extent' elements which will be used +# when invoking the FIEMAP ioctl. The larger is the buffer, the less times the +# FIEMAP ioctl will be invoked. +_FIEMAP_BUFFER_SIZE = 256 * 1024 -class _FilemapBase(object): +class FilemapFiemap: """ -This is a base class for a couple of other classes in this module. This -class simply performs the common parts of the initialization process: opens -the image file, gets its size, etc. The 'log' parameter is the logger object -to use for printing messages. +This class provides API to the FIEMAP ioctl. Namely, it allows to iterate +over all mapped blocks and over all holes. + +This class synchronizes the image file every time it invokes the FIEMAP +ioctl in order to work-around early FIEMAP implementation kernel bugs. """ -def __init__(self, image, log=None): +def __init__(self, image): """ -Initialize a class instance. The 'image' argument is full path to the -file or file object to operate on. +Initialize a class instance. The 'image' argument is full the file +object to operate on. """ +self._log = logging.getLogger(__name__) -self._log = log -if self._log is None: -self._log = logging.getLogger(__name__) +self._log.debug("FilemapFiemap: initializing") self._f_image_needs_close = False @@ -113,240 +135,6 @@ class _FilemapBase(object): self._log.debug("block size %d, blocks count %d, image size %d" % (self.block_size, self.blocks_cnt, self.image_size)) -def __del__(self): -"""The class destructor which just closes the image file.""" -if self._f_image_needs_close: -self._f_image.close() - -def _open_image_file(self): -"""Open the image file.""" -try: -self._f_image = open(self._image_path, 'rb') -except IOError as err: -raise Error("cannot open image file '%s': %s" -% (self._image_path, err)) - -self._f_image_needs_close = True - -def block_is_mapped(self, block): # pylint: disable=W0613,R0201 -""" -This method has has to be implemented by child classes. It returns -'True' if block number 'block' of the image file is mapped and 'False' -otherwise. -""" - -raise Error("the method is not implemented") - -def block_is_unmapped(self, block): # pylint: disable=W0613,R0201 -""" -This method has has to be implemented by child classes. It returns -'True' if block number 'block' of the image file is not mapped (hole) -and 'False' otherwise. -""" - -raise Error("the method is not implemented") - -def get_mapped_ranges(self, start, count): # pylint: disable=W0613,R0201 -""" -This method has has to be implemented by child classes. This is a -generator which yields ranges of mapped blocks in the file. The ranges -are tuples of 2 elements: [first, last], where 'first' is the first -mapped block and 'last' is the last mapped block. - -The ranges are yielded for the area of the file of size 'count' blocks, -starting from block 'start'. -""" - -raise Error("the method is not implemented") - -def get_unmapped_ranges(self, start, count): # pylint: disable=W0613,R0201 -""" -Th
[OE-core] [PATCH 1/9] wic-tools: add btrfs-tools squashfs-tools to DEPENDS
Added btrfs-tools-native and squashfs-tools-native to DEPENDS as wic uses these tools to support btrfs and squashfs filesystems. Signed-off-by: Ed Bartosh --- meta/recipes-core/meta/wic-tools.bb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/wic-tools.bb index bd4319a..cd494ec 100644 --- a/meta/recipes-core/meta/wic-tools.bb +++ b/meta/recipes-core/meta/wic-tools.bb @@ -2,7 +2,11 @@ SUMMARY = "A meta recipe to build native tools used by wic." LICENSE = "MIT" -DEPENDS = "parted-native syslinux-native gptfdisk-native dosfstools-native mtools-native bmap-tools-native grub-efi-native cdrtools-native" +DEPENDS = "\ + parted-native syslinux-native gptfdisk-native dosfstools-native \ + mtools-native bmap-tools-native grub-efi-native cdrtools-native \ + btrfs-tools-native squashfs-tools-native \ + " DEPENDS_append_x86 = " syslinux grub-efi systemd-boot" DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot" -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/9] #10618: Increase oe-selftest coverage of wic codebase (last part)
Hi, Increased test coverage of the wic codebase to 81%: - tested partitions with various fs types(btrfs, squashfs, etc) - removed fsimage plugin - removed not used code from filemap.py and runner.py - tested globbed source spec of image-bootpart plugin The following changes since commit 415b72ffcbd26e5f3664370d8b2a9b8105fb6342: dnf: remove systemd units in nativesdk builds (2017-03-28 10:34:37 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wic/wip http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip Ed Bartosh (9): wic-tools: add btrfs-tools squashfs-tools to DEPENDS oe-selftest: add wic test case test_fs_types filemap: remove FilemapSeek class oe-selftest: add kickstart_parser test case wic: remove fsimage plugin wic: use wic-tools STAGING_DATADIR as bootimg_dir wic: remove runner.show API wic: remove unused code from runner module oe-selftest: add test_image_bootpart_globbed test for wic meta/lib/oeqa/selftest/wic.py| 41 +++ meta/recipes-core/meta/wic-tools.bb | 6 +- scripts/lib/wic/filemap.py | 309 --- scripts/lib/wic/partition.py | 13 - scripts/lib/wic/plugins/source/bootimg-pcbios.py | 48 ++-- scripts/lib/wic/plugins/source/fsimage.py| 56 scripts/lib/wic/utils/misc.py| 14 +- scripts/lib/wic/utils/runner.py | 74 +- 8 files changed, 130 insertions(+), 431 deletions(-) delete mode 100644 scripts/lib/wic/plugins/source/fsimage.py -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] fetch2: Create/replace symbolic links atomically
On 28 March 2017 at 13:30, Peter Kjellerstedt wrote: > Under rare circumstances, creating symbolic links could fail because > the link already exists. At first glance the code seemed to protect > against this, but there was a small window where two separate tasks > could decide that a symbolic link needed to be created and then the > first task would create it and the second task would fail. > > Signed-off-by: Peter Kjellerstedt > Bitbake has its own list, can you resend to bitbake-de...@lists.openembedded.org? Cheers, Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] ✗ patchtest: failure for Create symbolic links atomically in the fetcher
== Series Details == Series: Create symbolic links atomically in the fetcher Revision: 1 URL : https://patchwork.openembedded.org/series/6022/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Series does not apply on top of target branch [test_series_merge_on_head] Suggested fixRebase your series on top of targeted branch Targeted branch master (currently at d68a86d87a) If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/1] fetch2: Create/replace symbolic links atomically
Under rare circumstances, creating symbolic links could fail because the link already exists. At first glance the code seemed to protect against this, but there was a small window where two separate tasks could decide that a symbolic link needed to be created and then the first task would create it and the second task would fail. Signed-off-by: Peter Kjellerstedt --- bitbake/lib/bb/fetch2/__init__.py | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 464e66b98a..f891e34eab 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -25,7 +25,7 @@ BitBake build tools. # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re +import os, re, tempfile import signal import logging import urllib.request, urllib.parse, urllib.error @@ -946,6 +946,16 @@ def rename_bad_checksum(ud, suffix): bb.warn("Renaming %s to %s" % (ud.localpath, new_localpath)) bb.utils.movefile(ud.localpath, new_localpath) +def atomic_symlink(src, dst): +"""Create/replace a symbolic link atomically.""" + +tmpname = tempfile.mktemp(prefix=dst) +os.symlink(src, tmpname) +try: +os.rename(tmpname, dst) +except OSError: +os.remove(tmpname) +raise def try_mirror_url(fetch, origud, ud, ld, check = False): # Return of None or a value means we're finished @@ -983,7 +993,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): open(ud.donestamp, 'w').close() dest = os.path.join(dldir, os.path.basename(ud.localpath)) if not os.path.exists(dest): -os.symlink(ud.localpath, dest) +atomic_symlink(ud.localpath, dest) if not verify_donestamp(origud, ld) or origud.method.need_update(origud, ld): origud.method.download(origud, ld) if hasattr(origud.method,"build_mirror_data"): @@ -991,11 +1001,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): return origud.localpath # Otherwise the result is a local file:// and we symlink to it if not os.path.exists(origud.localpath): -if os.path.islink(origud.localpath): -# Broken symbolic link -os.unlink(origud.localpath) - -os.symlink(ud.localpath, origud.localpath) +atomic_symlink(ud.localpath, origud.localpath) update_stamp(origud, ld) return ud.localpath -- 2.12.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 0/1] Create symbolic links atomically in the fetcher
We have occasional failures in our autobuilders where a setscene task fails, causing the original task to be run instead, but bitbake still fails with an error code in the end, causing unnecessary grief. One such case has been identified through the following error log: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: 0001: *** 0002:do_package_write_rpm_setscene(d) 0003: File: '${COREBASE}/meta/classes/package_rpm.bbclass', lineno: 757, function: do_package_write_rpm_setscene 0753:# but we need to stop the rootfs/solver from running while we do... 0754:do_package_write_rpm[sstate-lockfile-shared] += "${DEPLOY_DIR_RPM}/rpm.lock" 0755: 0756:python do_package_write_rpm_setscene () { *** 0757:sstate_setscene(d) 0758:} 0759:addtask do_package_write_rpm_setscene 0760: 0761:python do_package_write_rpm () { File: '${COREBASE}/meta/classes/sstate.bbclass', lineno: 648, function: sstate_setscene 0644:break 0645: 0646:def sstate_setscene(d): 0647:shared_state = sstate_state_fromvars(d) *** 0648:accelerate = sstate_installpkg(shared_state, d) 0649:if not accelerate: 0650:raise bb.build.FuncFailed("No suitable staging package found") 0651: 0652:python sstate_task_prefunc () { File: '${COREBASE}/meta/classes/sstate.bbclass', lineno: 297, function: sstate_installpkg 0293:sstatefetch = d.getVar('SSTATE_PKGNAME', True) + '_' + ss['task'] + ".tgz" 0294:sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['task'] + ".tgz" 0295: 0296:if not os.path.exists(sstatepkg): *** 0297:pstaging_fetch(sstatefetch, sstatepkg, d) 0298: 0299:if not os.path.isfile(sstatepkg): 0300:bb.note("Staging package %s does not exist" % sstatepkg) 0301:return False File: '${COREBASE}/meta/classes/sstate.bbclass', lineno: 635, function: pstaging_fetch 0631:for srcuri in uris: 0632:localdata.setVar('SRC_URI', srcuri) 0633:try: 0634:fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False) *** 0635:fetcher.download() 0636: 0637:# Need to optimise this, if using file:// urls, the fetcher just changes the local path 0638:# For now work around by symlinking 0639:localpath = bb.data.expand(fetcher.localpath(srcuri), localdata) File: '${COREBASE}/poky/bitbake/lib/bb/fetch2/__init__.py', lineno: 1572, function: download 1568:localpath = ud.localpath 1569:elif m.try_premirror(ud, self.d): 1570:logger.debug(1, "Trying PREMIRRORS") 1571:mirrors = mirror_from_string(self.d.getVar('PREMIRRORS', True)) *** 1572:localpath = try_mirrors(self, self.d, ud, mirrors, False) 1573: 1574:if premirroronly: 1575:self.d.setVar("BB_NO_NETWORK", "1") 1576: File: '${COREBASE}/poky/bitbake/lib/bb/fetch2/__init__.py', lineno: 1020, function: try_mirrors 1016: 1017:uris, uds = build_mirroruris(origud, mirrors, ld) 1018: 1019:for index, uri in enumerate(uris): *** 1020:ret = try_mirror_url(fetch, origud, uds[index], ld, check) 1021:if ret != False: 1022:return ret 1023:return None 1024: File: '${COREBASE}/poky/bitbake/lib/bb/fetch2/__init__.py', lineno: 978, function: try_mirror_url 0974:if os.path.islink(origud.localpath): 0975:# Broken symbolic link 0976:os.unlink(origud.localpath) 0977: *** 0978:os.symlink(ud.localpath, origud.localpath) 0979:update_stamp(origud, ld) 0980:return ud.localpath 0981: 0982:except bb.fetch2.NetworkAccess: Exception: OSError: [Errno 17] File exists What happens here is that two tasks simultaneously decide to download something, and both come to the conclusion that they need to create a symbolic link. And even if there is a check for whether the link already exists, there is a small window of time where both tasks see the missing link and tries to create it with the result that the second task fails as per above. The change provided here causes the link creation to be made in an atomic way so that even if two tasks actually do decide that they need to create the same link, neither of them will fail. I do not know if this solves the same problem that is solved by commit b8b14d975a25461ba857fc6fb8c725de8874 on the master-next branch in the bitbake repository. Since I have no way to recreate the failure in a controlled way, I cannot test if the change on the master-next branch also solves it or not. Its description does not exactly match our situation (we
Re: [OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines
On 28 March 2017 at 13:18, Robert P. J. Day wrote: > ok, i thought i knew what you meant but now, i'm just drawing a > blank. in what way is that not testing for a non-empty string as the > value of D? what painfully obvious clue am i missing? > The gconf_postinst is shell to be executed in the package management postinst code, so either at rootfs time, or first boot for the ones that didn't work at rootfs, or when the package is installed on the target. The postinst can tell those apart by inspecting the value of the environment variable $D, which if set means the postinst is running on the host in the rootfs context, so should prefix all paths with $D. $D *needs* to be fetched from the environment when the script is executing, and using ${D} will result in *bitbake* expanding it whilst writing the package, where it is the path to the package staging directory. (yes, using a different variable name that wasn't overloaded wouldn't cause this problem) Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines
On Tue, 28 Mar 2017, Burton, Ross wrote: > > On 28 March 2017 at 11:50, Robert P. J. Day wrote: > gconf_postinst() { > -if [ "x$D" != "x" ]; then > +if [ -n "${D}" ]; then > > > This totally changes how the postinst behaves. I'll leave > understanding how as an exercise to the reader. :) ok, i thought i knew what you meant but now, i'm just drawing a blank. in what way is that not testing for a non-empty string as the value of D? what painfully obvious clue am i missing? rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines
On Tue, 28 Mar 2017, Burton, Ross wrote: > > On 28 March 2017 at 11:50, Robert P. J. Day wrote: > gconf_postinst() { > -if [ "x$D" != "x" ]; then > +if [ -n "${D}" ]; then > > > This totally changes how the postinst behaves. I'll leave > understanding how as an exercise to the reader. :) *sigh* ... my bad. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] lsb: Avoid using double slashes in paths
Use ${D}${var} rather than ${D}/${var} for variables where ${var} contains an absolute path. Signed-off-by: Peter Kjellerstedt --- meta/recipes-extended/lsb/lsb_4.1.bb | 49 ++-- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb index 39cb5445e2..2eb67b8c3a 100644 --- a/meta/recipes-extended/lsb/lsb_4.1.bb +++ b/meta/recipes-extended/lsb/lsb_4.1.bb @@ -33,10 +33,10 @@ S = "${WORKDIR}/lsb-release-1.4" CLEANBROKEN = "1" -do_install(){ - oe_runmake install prefix=${D}/${base_prefix} mandir=${D}/${datadir}/man/ DESTDIR=${D} +do_install() { + oe_runmake install prefix=${D}${base_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D} - # this 2 dirs are needed by package lsb-dist-checker + # these two dirs are needed by package lsb-dist-checker mkdir -p ${D}${sysconfdir}/opt mkdir -p ${D}${localstatedir}/opt @@ -44,7 +44,7 @@ do_install(){ mkdir -p ${D}${sysconfdir}/lsb-release.d printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release - if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then + if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release else printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release @@ -57,73 +57,74 @@ do_install(){ fi echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release - if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then + if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then mkdir -p ${D}${sysconfdir}/lsb-release.d touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32 - elif [ "${TARGET_ARCH}" = "x86_64" ];then + elif [ "${TARGET_ARCH}" = "x86_64" ]; then touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64 fi - if [ "${TARGET_ARCH}" = "powerpc" ];then + if [ "${TARGET_ARCH}" = "powerpc" ]; then touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32 - elif [ "${TARGET_ARCH}" = "powerpc64" ];then + elif [ "${TARGET_ARCH}" = "powerpc64" ]; then touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64 fi } -do_install_append(){ +do_install_append() { install -d ${D}${sysconfdir}/core-lsb for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon do - install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb + install -m 0755 ${WORKDIR}/$i ${D}${sysconfdir}/core-lsb done - install -d ${D}/${nonarch_base_libdir}/lsb - install -m 0755 ${WORKDIR}/init-functions ${D}/${nonarch_base_libdir}/lsb + install -d ${D}${nonarch_base_libdir}/lsb + install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb - # creat links for LSB test + # create links for LSB test if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then - install -d ${D}/${nonarch_libdir}/lsb + install -d ${D}${nonarch_libdir}/lsb fi - ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/install_initd - ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/remove_initd + ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd + ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd - if [ "${TARGET_ARCH}" = "x86_64" ];then + if [ "${TARGET_ARCH}" = "x86_64" ]; then if [ "${baselib}" != "lib64" ]; then lnr ${D}${base_libdir} ${D}/lib64 fi - cd ${D}/${base_libdir} + cd ${D}${base_libdir} ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 fi - if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then - cd ${D}/${base_libdir} + if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ]; then + cd ${D}${base_libdir}
[OE-core] ✗ patchtest: failure for "aws-cli_1.11.66.bb: Initial co..." and 1 more
== Series Details == Series: "aws-cli_1.11.66.bb: Initial co..." and 1 more Revision: 1 URL : https://patchwork.openembedded.org/series/6019/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Series does not apply on top of target branch [test_series_merge_on_head] Suggested fixRebase your series on top of targeted branch Targeted branch master (currently at d68a86d87a) If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] lsb: Create ${base_prefix}/lib64 correctly when needed
There were two remaining cases that could end up creating /lib64 rather than ${base_prefix}/lib64. The difference matters when building with usrmerge. Signed-off-by: Peter Kjellerstedt --- meta/recipes-extended/lsb/lsb_4.1.bb | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb index 2eb67b8c3a..cedf39eb65 100644 --- a/meta/recipes-extended/lsb/lsb_4.1.bb +++ b/meta/recipes-extended/lsb/lsb_4.1.bb @@ -97,8 +97,8 @@ do_install_append() { ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd if [ "${TARGET_ARCH}" = "x86_64" ]; then - if [ "${baselib}" != "lib64" ]; then - lnr ${D}${base_libdir} ${D}/lib64 + if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then + lnr ${D}${base_libdir} ${D}${base_prefix}/lib64 fi cd ${D}${base_libdir} ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2 @@ -111,8 +111,8 @@ do_install_append() { fi if [ "${TARGET_ARCH}" = "powerpc64" ]; then - if [ "${baselib}" != "lib64" ]; then - lnr ${D}${base_libdir} ${D}/lib64 + if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then + lnr ${D}${base_libdir} ${D}${base_prefix}/lib64 fi cd ${D}${base_libdir} ln -sf ld64.so.1 ld-lsb-ppc64.so.2 @@ -125,7 +125,7 @@ do_install_append() { fi } -FILES_${PN} += "${@'/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${baselib}' != 'lib64' else ''} \ +FILES_${PN} += "${@'${base_prefix}/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${base_libdir}' != '${base_prefix}/lib64' else ''} \ ${base_libdir} \ ${nonarch_libdir}/lsb \ ${nonarch_base_libdir}/lsb/* \ -- 2.12.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] aws-cli_1.11.66.bb: Initial commit of aws-cli
With fetch2 supporting s3, having an aws-cli recipe makes sense. Signed-off-by: Elizabeth 'pidge' Flanagan --- meta/recipes-devtools/aws-cli/aws-cli.inc| 14 ++ meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb | 5 + 2 files changed, 19 insertions(+) create mode 100644 meta/recipes-devtools/aws-cli/aws-cli.inc create mode 100644 meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb diff --git a/meta/recipes-devtools/aws-cli/aws-cli.inc b/meta/recipes-devtools/aws-cli/aws-cli.inc new file mode 100644 index 000..e9a2677 --- /dev/null +++ b/meta/recipes-devtools/aws-cli/aws-cli.inc @@ -0,0 +1,14 @@ +SUMMARY = "Amazon Web Services Command Line Interface" +DESCRIPTION = "The AWS Command Line Interface (CLI) is a \ +unified tool to manage your AWS services." +HOMEPAGE = "https://aws.amazon.com/cli/"; +SECTION = "console/utils" + +SRC_URI = "https://github.com/aws/${BPN}/archive/${PV}.tar.gz"; + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=71a3e14f29ac5c23e1b5b934ca4ddfc9" + +S = "${WORKDIR}/${BPN}-${PV}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb b/meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb new file mode 100644 index 000..a96b71e --- /dev/null +++ b/meta/recipes-devtools/aws-cli/aws-cli_1.11.66.bb @@ -0,0 +1,5 @@ +require aws-cli.inc + +SRC_URI[md5sum] = "c556adb58d0234eb661520488b9b467f" +SRC_URI[sha256sum] = "2c1da406203e0a9b5c717004bd463228e4fa4fa8fe47208f0e1836c02bee6f60" + -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] bitbake.conf: Add aws-cli support
This commit adds aws-cli support to bitbake in order to support the s3 fetcher in bitbake. Signed-off-by: Elizabeth 'pidge' Flanagan --- meta/conf/bitbake.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index fa5445b..f21b8d3 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -458,8 +458,8 @@ HOSTTOOLS += " \ bash sh cut sed gcc ld git rm install which find xargs cat true mktemp \ grep tar gzip touch cp mv basename dirname tr getopt sort awk head tail \ mkdir patch uniq perl python chmod python3 ar strip expr ls make as \ -ranlib egrep echo chown cpio tee wc wget bzip2 stat date rmdir od diff \ -md5sum dd chrpath file pod2man gunzip python2.7 ln g++ [ false true \ +ranlib egrep echo chown cpio tee wc wget aws bzip2 stat date rmdir \ +od diff md5sum dd chrpath file pod2man gunzip python2.7 ln g++ [ false true \ uname test hostname nm objdump objcopy cmp printf env readlink gawk fgrep \ expand pwd sleep diffstat chgrp flock ldd strings rpcgen du makeinfo \ getconf mknod cpp readelf split \ @@ -640,6 +640,7 @@ FETCHCMD_cvs = "/usr/bin/env cvs" FETCHCMD_wget = "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate" FETCHCMD_bzr = "/usr/bin/env bzr" FETCHCMD_hg = "/usr/bin/env hg" +FETCHCMD_s3 = "/usr/bin/env aws s3" SRCDATE = "${DATE}" SRCREV ??= "INVALID" -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines
On 28 March 2017 at 11:50, Robert P. J. Day wrote: > gconf_postinst() { > -if [ "x$D" != "x" ]; then > +if [ -n "${D}" ]; then > This totally changes how the postinst behaves. I'll leave understanding how as an exercise to the reader. :) Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] u-boot: Update to 2017.03 release
Some background is needed Marex sent in the 2017.01 update after discussions in irc about timing of u-boot releases and the YP release schedule. The 2017.03 release would happen after oe-core passed the feature freeze. So, at the time people felt the release should have 2017.01. People consuming the u-boot recipe via a bbappends have been using 2017.01 for their bsp's. Changing at this time is potentially a pain point, and has some technical risk on the release schedule. On the other hand, people working to get their code upstream, might be frustrated having to wait until fall to use a current u-boot release. Should we go ahead and add the 2017.03 recipe and use DEFAULT_PREFERENCE to turn it off? Also, this would be a good time to determine who the maintainers of the recipes are. Philip On 03/27/2017 10:32 AM, Marek Vasut wrote: > Upgrade U-Boot to the latest version. > > Signed-off-by: Marek Vasut > Cc: Denys Dmytriyenko > Cc: Richard Purdie > Cc: Ross Burton > --- > .../u-boot/{u-boot-common_2017.01.inc => u-boot-common_2017.03.inc} | 2 > +- > .../u-boot/{u-boot-fw-utils_2017.01.bb => u-boot-fw-utils_2017.03.bb} | 0 > .../u-boot/{u-boot-mkimage_2017.01.bb => u-boot-mkimage_2017.03.bb} | 0 > meta/recipes-bsp/u-boot/{u-boot_2017.01.bb => u-boot_2017.03.bb}| 0 > 4 files changed, 1 insertion(+), 1 deletion(-) > rename meta/recipes-bsp/u-boot/{u-boot-common_2017.01.inc => > u-boot-common_2017.03.inc} (86%) > rename meta/recipes-bsp/u-boot/{u-boot-fw-utils_2017.01.bb => > u-boot-fw-utils_2017.03.bb} (100%) > rename meta/recipes-bsp/u-boot/{u-boot-mkimage_2017.01.bb => > u-boot-mkimage_2017.03.bb} (100%) > rename meta/recipes-bsp/u-boot/{u-boot_2017.01.bb => u-boot_2017.03.bb} > (100%) > > diff --git a/meta/recipes-bsp/u-boot/u-boot-common_2017.01.inc > b/meta/recipes-bsp/u-boot/u-boot-common_2017.03.inc > similarity index 86% > rename from meta/recipes-bsp/u-boot/u-boot-common_2017.01.inc > rename to meta/recipes-bsp/u-boot/u-boot-common_2017.03.inc > index df24c853dd..c115f36831 100644 > --- a/meta/recipes-bsp/u-boot/u-boot-common_2017.01.inc > +++ b/meta/recipes-bsp/u-boot/u-boot-common_2017.03.inc > @@ -7,7 +7,7 @@ PE = "1" > > # We use the revision in order to avoid having to fetch it from the > # repo during parse > -SRCREV = "a705ebc81b7f91bbd0ef7c634284208342901149" > +SRCREV = "8537ddd769f460d7fb7a62a3dcc9669049702e51" > > SRC_URI = "git://git.denx.de/u-boot.git" > > diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.01.bb > b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.03.bb > similarity index 100% > rename from meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.01.bb > rename to meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.03.bb > diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.01.bb > b/meta/recipes-bsp/u-boot/u-boot-mkimage_2017.03.bb > similarity index 100% > rename from meta/recipes-bsp/u-boot/u-boot-mkimage_2017.01.bb > rename to meta/recipes-bsp/u-boot/u-boot-mkimage_2017.03.bb > diff --git a/meta/recipes-bsp/u-boot/u-boot_2017.01.bb > b/meta/recipes-bsp/u-boot/u-boot_2017.03.bb > similarity index 100% > rename from meta/recipes-bsp/u-boot/u-boot_2017.01.bb > rename to meta/recipes-bsp/u-boot/u-boot_2017.03.bb > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v3, 1/2] lib/oe/sdk: Add get_extra_sdk_info to reuse code in buildhistory
On Tue, 2017-03-28 at 00:15 -0700, Francisco Pedraza wrote: > This function is going to be used for generating the target and host > manifest files packages for eSDK. > [YOCTO #9038] > > Signed-off-by: Francisco Pedraza com> > --- > meta/classes/buildhistory.bbclass | 16 > meta/lib/oe/sdk.py| 16 > 2 files changed, 20 insertions(+), 12 deletions(-) > > diff --git a/meta/classes/buildhistory.bbclass > b/meta/classes/buildhistory.bbclass > index 109b375..ab04db7 100644 > --- a/meta/classes/buildhistory.bbclass > +++ b/meta/classes/buildhistory.bbclass > @@ -554,25 +554,17 @@ END > python buildhistory_get_extra_sdkinfo() { > import operator > import math I don't think we need to import math here anymore? > +# importing oe.sdk due package information req. No need for this comment. > +from oe.sdk import get_extra_sdkinfo > > if d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext' and \ > "sdk" in (d.getVar('BUILDHISTORY_FEATURES') or > "").split(): > -tasksizes = {} > -filesizes = {} > -for root, _, files in > os.walk(d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')): > -for fn in files: > -if fn.endswith('.tgz'): > -fsize = > int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024)) > -task = fn.rsplit(':', 1)[1].split('_', > 1)[1].split('.')[0] > -origtotal = tasksizes.get(task, 0) > -tasksizes[task] = origtotal + fsize > -filesizes[fn] = fsize > with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package- > sizes.txt'), 'w') as f: > -filesizes_sorted = sorted(filesizes.items(), > key=operator.itemgetter(1, 0), reverse=True) > +filesizes_sorted = > sorted(extra_info['filesizes'].items(), key=operator.itemgetter(1, > 0), reverse=True) > for fn, size in filesizes_sorted: > f.write('%10d KiB %s\n' % (size, fn)) > with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task- > sizes.txt'), 'w') as f: > -tasksizes_sorted = sorted(tasksizes.items(), > key=operator.itemgetter(1, 0), reverse=True) > + tasksizes_sorted = > sorted(extra_info['tasksizes'].items(), key=operator.itemgetter(1, > 0), reverse=True) It looks like the indentation changes here? > for task, size in tasksizes_sorted: > f.write('%10d KiB %s\n' % (size, task)) > } > diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py > index deb823b..d101bf0 100644 > --- a/meta/lib/oe/sdk.py > +++ b/meta/lib/oe/sdk.py > @@ -372,5 +372,21 @@ def populate_sdk(d, manifest_dir=None): > os.environ.clear() > os.environ.update(env_bkp) > > +def get_extra_sdk_info(sstate_dir): > +import operator I don't think we need operator here? A docstring for this function would be nice. > +import math > + > +extra_info = {} > +extra_info['tasksizes'] > +for root, _, files in os.walk(sstate_dir): > +for fn in files: > +if fn.endswith('.tgz'): > +fsize = > int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024)) > +task = > fn.rsplit(':',1)[1].split('_',1)[1].split(',')[0] > +origtotal = extra_info['tasksizes'].get(task, 0) > +extra_info['tasksizes'][task] = origtotal + fsize > +extra_info['filesizes'][fn] = fsize > +return extra_info > + > if __name__ == "__main__": > pass > -- > 1.8.3.1 > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Replace "if test" file tests with POSIX file tests
On Tue, 28 Mar 2017, Peter Kjellerstedt wrote: > > -Original Message- > > From: openembedded-core-boun...@lists.openembedded.org > > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > > Robert P. J. Day > > Sent: den 28 mars 2017 11:57 > > To: Richard Purdie > > Cc: OE Core mailing list > > Subject: Re: [OE-core] [PATCH] classes: Replace "if test" file tests > > with POSIX file tests > > > > On Mon, 27 Mar 2017, Richard Purdie wrote: > > > > > On Sat, 2017-03-25 at 14:03 -0400, Robert P. J. Day wrote: > > > > In entire meta/classes/ directory, replace shell tests of the form > > > > "if test -? ..." with POSIX tests of the form "if [ -? ... > > > > > > > > Signed-off-by: Robert P. J. Day > > > > > > > > --- > > > > > > > > as i cannot abide those silly "if test" constructs, i zipped > > > > through > > > > and changed them to POSIX form. is there any objection to this kind > > > > of > > > > cleanup? next up ... all those "x${VAR} = x" tests ... > > > > > > I've merged most of this. There were pieces of the diff that simply > > > didn't apply so I skipped them. > > > > > > The reason I've taken what applied is that this is very expensive > > > for us to test right now and I made the most of the testing time I > > > had on the weekend. The issue is changes to the core classes rebuild > > > everything so we can't reuse sstate and the tests are much slower. > > > > > > We're running late with M3 rc2 but just about to build it and I > > > thought it was worth getting some of this in rather none at all. > > > Please do figure out the remaining pieces and send them and we may > > > or may not tweak the remaining bits in M4. > > > > my next cleanup was going to be (as mentioned above) replace all > > those silly "x${VAR} = x" string tests with either of: > > > > [ -z "${VAR}" ] > > [ -n "${VAR}" ] > > There is no reason to have the -n in there. This is better: > > [ -z "${VAR}" ] > [ "${VAR}" ] i'm fine with that, as long as it's officially POSIX. that also suggests the alternate tests: [ "${VAR}" ] [ ! "${VAR}" ] i am happy to defer to the will of the masses, it's just nice to have a style standard one way or the other. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines
For better or worse, two types of cleanup in meta/classes directory: * Replace old-style 'x${VAR} = x' tests with -n/-z string tests * Unsplit lines to keep if/then, while/do on same line Signed-off-by: Robert P. J. Day --- i realize there are two types of tidying here -- if that offends people, i can split it into two separate submissions. nothing here should affect execution, but it's always possible i screwed something up, not sure how to rigourously test these changes. also, when i did change a shell string test, i added {} around the variable name, it's just a standard i like for visual clarity. apply all or part of what seems useful. diff --git a/meta/classes/extrausers.bbclass b/meta/classes/extrausers.bbclass index 7709407..9169061 100644 --- a/meta/classes/extrausers.bbclass +++ b/meta/classes/extrausers.bbclass @@ -26,7 +26,7 @@ set_user_group () { export PSEUDO="${FAKEROOTENV} ${STAGING_DIR_NATIVE}${bindir}/pseudo" setting=`echo $user_group_settings | cut -d ';' -f1` remaining=`echo $user_group_settings | cut -d ';' -f2-` - while test "x$setting" != "x"; do + while [ -n "${setting}" ]; do cmd=`echo $setting | cut -d ' ' -f1` opts=`echo $setting | cut -d ' ' -f2-` # Different from useradd.bbclass, there's no file locking issue here, as diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass index 4e0ee2e..e8e3f34 100644 --- a/meta/classes/gconf.bbclass +++ b/meta/classes/gconf.bbclass @@ -15,7 +15,7 @@ EXTRA_OECONF += "--disable-schemas-install" export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL = "1" gconf_postinst() { -if [ "x$D" != "x" ]; then +if [ -n "${D}" ]; then export GCONF_CONFIG_SOURCE="xml::$D${sysconfdir}/gconf/gconf.xml.defaults" else export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` diff --git a/meta/classes/gio-module-cache.bbclass b/meta/classes/gio-module-cache.bbclass index a8190b7..857422c 100644 --- a/meta/classes/gio-module-cache.bbclass +++ b/meta/classes/gio-module-cache.bbclass @@ -4,7 +4,7 @@ inherit qemu GIO_MODULE_PACKAGES ??= "${PN}" gio_module_cache_common() { -if [ "x$D" != "x" ]; then +if [ -n "${D}" ]; then $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \ mlprefix=${MLPREFIX} \ binprefix=${MLPREFIX} \ diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass index d87167a..feda0e7 100644 --- a/meta/classes/gtk-icon-cache.bbclass +++ b/meta/classes/gtk-icon-cache.bbclass @@ -5,7 +5,7 @@ DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk PACKAGE_WRITE_DEPS += "gtk-icon-utils-native gdk-pixbuf-native" gtk_icon_cache_postinst() { -if [ "x$D" != "x" ]; then +if [ -n "${D}" ]; then $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \ mlprefix=${MLPREFIX} \ libdir_native=${libdir_native} @@ -23,7 +23,7 @@ fi } gtk_icon_cache_postrm() { -if [ "x$D" != "x" ]; then +if [ -n "${D}" ]; then $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \ mlprefix=${MLPREFIX} \ libdir=${libdir} diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass index 3d82dbe..3302a6b 100644 --- a/meta/classes/gtk-immodules-cache.bbclass +++ b/meta/classes/gtk-immodules-cache.bbclass @@ -9,7 +9,7 @@ inherit qemu GTKIMMODULES_PACKAGES ?= "${PN}" gtk_immodule_cache_postinst() { -if [ "x$D" != "x" ]; then +if [ -n "${D}" ]; then if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so) ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \ @@ -35,7 +35,7 @@ fi } gtk_immodule_cache_postrm() { -if [ "x$D" != "x" ]; then +if [ -n "${D}" ]; then if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so) ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \ diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 8a351cf..0d0ae3a 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass @@ -236,11 +236,9 @@ wait_for_file() { local TIME_ELAPSED=0 local FILE_TO_TEST=$1 local TIMEOUT=$2 -until [ -f "$FILE_TO_TEST" ] -do +until [ -f "$FILE_TO_TEST" ]; do TIME_ELAPSED=`expr $TIME_ELAPSED + 1` -if [ $TIME_ELAPSED -gt $TIMEOUT ] -then +if [ $TIME_ELAPSED -gt $TIMEOUT ]; then return 1 fi sleep 1 @@ -252,20 +250,17 @@ def set_icecc_env(): return set_icecc_env() { -if [ "${@use_icecc(bb, d)}" = "no" ] -then +if [ "${@use_icecc(bb, d)}" = "no" ]; then return fi ICECC_VERSION="${@icecc_version(bb, d)}" -if [ "x${ICECC_VERSION}" = "x" ] -then +if [ -z "${ICECC_VERSION}" ]; th
Re: [OE-core] [PATCH] classes: Replace "if test" file tests with POSIX file tests
On Tue, 2017-03-28 at 05:56 -0400, Robert P. J. Day wrote: > On Mon, 27 Mar 2017, Richard Purdie wrote: > > > > > On Sat, 2017-03-25 at 14:03 -0400, Robert P. J. Day wrote: > > > > > > In entire meta/classes/ directory, replace shell tests of the > > > form > > > "if test -? ..." with POSIX tests of the form "if [ -? ... > > > > > > Signed-off-by: Robert P. J. Day > > > > > > --- > > > > > > as i cannot abide those silly "if test" constructs, i zipped > > > through > > > and changed them to POSIX form. is there any objection to this > > > kind > > > of > > > cleanup? next up ... all those "x${VAR} = x" tests ... > > I've merged most of this. There were pieces of the diff that simply > > didn't apply so I skipped them. > > > > The reason I've taken what applied is that this is very expensive > > for us to test right now and I made the most of the testing time I > > had on the weekend. The issue is changes to the core classes > > rebuild > > everything so we can't reuse sstate and the tests are much slower. > > > > We're running late with M3 rc2 but just about to build it and I > > thought it was worth getting some of this in rather none at all. > > Please do figure out the remaining pieces and send them and we may > > or may not tweak the remaining bits in M4. > my next cleanup was going to be (as mentioned above) replace all > those silly "x${VAR} = x" string tests with either of: > > [ -z "${VAR}" ] > [ -n "${VAR}" ] > > is there time to get that in before the next freeze? if so, i can do > it quickly for testing; if not, i guess it can just wait. I think that needs to wait for 2.4 but I agree its worth cleaning that up. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Replace "if test" file tests with POSIX file tests
> -Original Message- > From: openembedded-core-boun...@lists.openembedded.org > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of > Robert P. J. Day > Sent: den 28 mars 2017 11:57 > To: Richard Purdie > Cc: OE Core mailing list > Subject: Re: [OE-core] [PATCH] classes: Replace "if test" file tests > with POSIX file tests > > On Mon, 27 Mar 2017, Richard Purdie wrote: > > > On Sat, 2017-03-25 at 14:03 -0400, Robert P. J. Day wrote: > > > In entire meta/classes/ directory, replace shell tests of the form > > > "if test -? ..." with POSIX tests of the form "if [ -? ... > > > > > > Signed-off-by: Robert P. J. Day > > > > > > --- > > > > > > as i cannot abide those silly "if test" constructs, i zipped > > > through > > > and changed them to POSIX form. is there any objection to this kind > > > of > > > cleanup? next up ... all those "x${VAR} = x" tests ... > > > > I've merged most of this. There were pieces of the diff that simply > > didn't apply so I skipped them. > > > > The reason I've taken what applied is that this is very expensive > > for us to test right now and I made the most of the testing time I > > had on the weekend. The issue is changes to the core classes rebuild > > everything so we can't reuse sstate and the tests are much slower. > > > > We're running late with M3 rc2 but just about to build it and I > > thought it was worth getting some of this in rather none at all. > > Please do figure out the remaining pieces and send them and we may > > or may not tweak the remaining bits in M4. > > my next cleanup was going to be (as mentioned above) replace all > those silly "x${VAR} = x" string tests with either of: > > [ -z "${VAR}" ] > [ -n "${VAR}" ] There is no reason to have the -n in there. This is better: [ -z "${VAR}" ] [ "${VAR}" ] > is there time to get that in before the next freeze? if so, i can do > it quickly for testing; if not, i guess it can just wait. > > rday //Peter -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] ✗ patchtest: failure for dnf: remove systemd units in nativesdk builds
== Series Details == Series: dnf: remove systemd units in nativesdk builds Revision: 1 URL : https://patchwork.openembedded.org/series/6017/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Series does not apply on top of target branch [test_series_merge_on_head] Suggested fixRebase your series on top of targeted branch Targeted branch master (currently at d68a86d87a) If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] classes: Replace "if test" file tests with POSIX file tests
On Mon, 27 Mar 2017, Richard Purdie wrote: > On Sat, 2017-03-25 at 14:03 -0400, Robert P. J. Day wrote: > > In entire meta/classes/ directory, replace shell tests of the form > > "if test -? ..." with POSIX tests of the form "if [ -? ... > > > > Signed-off-by: Robert P. J. Day > > > > --- > > > > as i cannot abide those silly "if test" constructs, i zipped > > through > > and changed them to POSIX form. is there any objection to this kind > > of > > cleanup? next up ... all those "x${VAR} = x" tests ... > > I've merged most of this. There were pieces of the diff that simply > didn't apply so I skipped them. > > The reason I've taken what applied is that this is very expensive > for us to test right now and I made the most of the testing time I > had on the weekend. The issue is changes to the core classes rebuild > everything so we can't reuse sstate and the tests are much slower. > > We're running late with M3 rc2 but just about to build it and I > thought it was worth getting some of this in rather none at all. > Please do figure out the remaining pieces and send them and we may > or may not tweak the remaining bits in M4. my next cleanup was going to be (as mentioned above) replace all those silly "x${VAR} = x" string tests with either of: [ -z "${VAR}" ] [ -n "${VAR}" ] is there time to get that in before the next freeze? if so, i can do it quickly for testing; if not, i guess it can just wait. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] how does files/fs-perms.txt affect building base-files rpm?
On Mon, 13 Mar 2017, Mark Hatle wrote: > On 3/11/17 3:57 AM, Robert P. J. Day wrote: > > On Sat, 11 Mar 2017, Khem Raj wrote: > > > >> On 3/11/17 12:30 AM, Robert P. J. Day wrote: > >>> > >>> potentially a dumb question, but do the settings in > >>> files/fs-perms.txt affect the building of the base-files rpm just > >>> as they would affect the building of any other rpm? > >> > >> it should be executing fixup_perms() in PKGD before splitting the > >> package, so yes it should run for all recipes. > > > > so it is possible that, despite the manual settings in the > > base-files do_install() task, fs-perms.txt might override some of > > those settings. i'm not saying i've seen anything like that, just > > clarifying the possibility. > > Yes, same for all packages. > > At one point I thought there was a comment in both the base-files > and fs-perms.txt files reminding people they should be kept in sync. > I am not finding that comment. that would seem to be an important comment to have ... i'll let someone else decide on the wording and add it. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] f2fs-tools: Update to Version 1.8.0
This should go to openembedded-de...@lists.openembedded.org, as per the README in meta-filesystems. Ross On 28 March 2017 at 05:02, Yong, Jonathan wrote: > Signed-off-by: Yong, Jonathan > --- > .../0002-Fix-mkfs-out-of-tree-builds.patch | 27 > ++ > .../{f2fs-tools_1.4.0.bb => f2fs-tools_1.8.0.bb} | 5 ++-- > 2 files changed, 30 insertions(+), 2 deletions(-) > create mode 100644 meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/ > 0002-Fix-mkfs-out-of-tree-builds.patch > rename meta-filesystems/recipes-utils/f2fs-tools/{f2fs-tools_1.4.0.bb => > f2fs-tools_1.8.0.bb} (81%) > > diff --git a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/ > 0002-Fix-mkfs-out-of-tree-builds.patch b/meta-filesystems/recipes- > utils/f2fs-tools/f2fs-tools/0002-Fix-mkfs-out-of-tree-builds.patch > new file mode 100644 > index 000..3aadf3c > --- /dev/null > +++ b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/ > 0002-Fix-mkfs-out-of-tree-builds.patch > @@ -0,0 +1,27 @@ > +From 1d4f6b6a945eabb364a2035d5ef0b69f68a87f74 Mon Sep 17 00:00:00 2001 > +From: "Yong, Jonathan" > +Date: Mon, 27 Mar 2017 08:34:06 + > +Subject: [PATCH] Fix mkfs out of tree builds > + > +Libraries are built in builddir, not srcdir, fix Makefile.am > +accordingly. > + > +Signed-off-by: Yong, Jonathan > +--- > + mkfs/Makefile.am | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am > +index 8b4c16c..ae211b2 100644 > +--- a/mkfs/Makefile.am > b/mkfs/Makefile.am > +@@ -10,5 +10,5 @@ lib_LTLIBRARIES = libf2fs_format.la > + libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c > f2fs_format_utils.c > + libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD > + libf2fs_format_la_CPPFLAGS = -I$(top_srcdir)/include > +-libf2fs_format_la_LDFLAGS = -luuid -L$(top_srcdir)/lib -lf2fs \ > ++libf2fs_format_la_LDFLAGS = -luuid -L$(top_builddir)/lib -lf2fs \ > + -version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE) > +-- > +2.10.2 > + > diff --git a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.4.0.bb > b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.8.0.bb > similarity index 81% > rename from meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.4.0.bb > rename to meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.8.0.bb > index 1a558e7..691cb6e 100644 > --- a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.4.0.bb > +++ b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.8.0.bb > @@ -7,9 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5= > 362b4b2594cd362b874a97718faa51d3" > # to provide libuuid > DEPENDS = "util-linux" > > -SRCREV = "baac4b4e6f41ceb02511da49dd3707674f3fea21" > +SRCREV = "1e7aedf99b85d16f94d1d8ad2fcf846403bb2174" > SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs- > tools.git \ > -file://0001-Remove-AC_CHECK_FILE-for-cross-compilation.patch" > +file://0001-Remove-AC_CHECK_FILE-for-cross-compilation.patch \ > +file://0002-Fix-mkfs-out-of-tree-builds.patch" > S = "${WORKDIR}/git" > > inherit pkgconfig autotools > -- > 2.10.2 > > -- > ___ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] dnf: remove systemd units in nativesdk builds
If the DISTRO_FEATURES contain systemd then the systemd class won't delete the units for us. Until the class is fixed to do this automatically, delete them explicitly. Signed-off-by: Ross Burton --- meta/recipes-devtools/dnf/dnf_git.bb | 6 ++ 1 file changed, 6 insertions(+) diff --git a/meta/recipes-devtools/dnf/dnf_git.bb b/meta/recipes-devtools/dnf/dnf_git.bb index 7d7f597..b6b6cea 100644 --- a/meta/recipes-devtools/dnf/dnf_git.bb +++ b/meta/recipes-devtools/dnf/dnf_git.bb @@ -42,6 +42,12 @@ do_install_append_class-native() { RPM_NO_CHROOT_FOR_SCRIPTS=1 } +# If the distro uses systemd then these won't be deleted by systemd.bbclass +do_install_append_class-nativesdk() { +rm -rf ${D}/${systemd_unitdir} +rmdir --ignore-fail-on-non-empty ${D}${nonarch_base_libdir} +} + SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \ dnf-automatic-download.service dnf-automatic-download.timer \ dnf-automatic-install.service dnf-automatic-install.timer \ -- 2.8.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v5 1/3] oeqa: allow extending qemuparams="..."
Sometimes it is useful to reconfigure the qemu virtual machine directly. runqemu has the "qemuparams" parameter for that, and the underlying start() methods also supported modifying that via their "params" parameter. Only the runqemu() wrapper function lacked a way to specify additional parameters. One potential usage is to attach additional disks. Signed-off-by: Patrick Ohly --- meta/lib/oeqa/utils/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index cd7a5e3..3dfff0f 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -225,7 +225,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= @contextlib.contextmanager -def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None): +def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None): """ launch_cmd means directly run the command, don't need set rootfs or env vars. """ @@ -276,7 +276,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None): try: qemu.deploy() try: -qemu.start(ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd) +qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd) except bb.build.FuncFailed: raise Exception('Failed to start QEMU - see the logs in %s' % logdir) -- git-series 0.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v5 2/3] oeqa: allow customizing image used by runqemu()
runqemu() takes all parameters for the virtual machine from the variables of the given recipe. By allowing the caller to provide a hash with variables that get applied locally, the caller gets more control. Here's the intended usage: overrides = { 'DEPLOY_DIR_IMAGE': self.resultdir, 'IMAGE_LINK_NAME': 'internal-image-%s' % self.image_arch, } with runqemu('refkit-installer-image', ssh=False, overrides=overrides) as qemu: This can be used to replace the image completely with something else or to copy it before allowing runqemu() to write into it. Signed-off-by: Patrick Ohly --- meta/lib/oeqa/utils/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 3dfff0f..88c9bb1 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -225,7 +225,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= @contextlib.contextmanager -def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None): +def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}): """ launch_cmd means directly run the command, don't need set rootfs or env vars. """ @@ -247,6 +247,8 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, tinfoil.config_data.setVar("FIND_ROOTFS", '1') recipedata = tinfoil.parse_recipe(pn) +for key, value in overrides.items(): +recipedata.setVar(key, value) # The QemuRunner log is saved out, but we need to ensure it is at the right # log level (and then ensure that since it's a child of the BitBake logger, -- git-series 0.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v5 3/3] oeqa: allow persistent image writes in runqemu()
By default, QemuRunner avoids modifying the image files that it boots into by enabling the qemu snapshot mode. However, some tests may want to test changes that must persists across reboots, so this mode should be optional. This can be combined by copying the image file to a temporary location first and then booting with that copy. It's also useful when testing with additional drives attached to a virtual machine. QemuTinyRunner doesn't use the snapshot parameter and therefore ignores the new parameter. Long term, a better way of passing these various configuration parameters should be used, and perhaps QemuRunner and QemuTinyRunner can be merged into one again to avoid code duplication. But for now the patch follows the exiting style. Also beware that QemuTarget.start() now acts in two different modes (with or without explicit launch command), and depending on that mode parameters like discard_writes must be ignored, i.e. not get passed to launch(). Signed-off-by: Patrick Ohly --- meta/lib/oeqa/targetcontrol.py| 4 ++-- meta/lib/oeqa/utils/commands.py | 4 ++-- meta/lib/oeqa/utils/qemurunner.py | 4 ++-- meta/lib/oeqa/utils/qemutinyrunner.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 40a2589..57fd3b8 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py @@ -182,11 +182,11 @@ class QemuTarget(BaseTarget): logger.info("Qemu log file: %s" % self.qemulog) super(QemuTarget, self).deploy() -def start(self, params=None, ssh=True, extra_bootparams='', runqemuparams='', launch_cmd=''): +def start(self, params=None, ssh=True, extra_bootparams='', runqemuparams='', launch_cmd='', discard_writes=True): if launch_cmd: start = self.runner.launch(get_ip=ssh, launch_cmd=launch_cmd) else: -start = self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams) +start = self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams, discard_writes=discard_writes) if start: if ssh: diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 88c9bb1..2951dfb 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -225,7 +225,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= @contextlib.contextmanager -def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}): +def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True): """ launch_cmd means directly run the command, don't need set rootfs or env vars. """ @@ -278,7 +278,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, try: qemu.deploy() try: -qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd) +qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes) except bb.build.FuncFailed: raise Exception('Failed to start QEMU - see the logs in %s' % logdir) diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 95f5925..cd79f21 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -97,7 +97,7 @@ class QemuRunner: self._dump_host() raise SystemExit -def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams='', launch_cmd=None): +def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams='', launch_cmd=None, discard_writes=True): if self.display: os.environ["DISPLAY"] = self.display # Set this flag so that Qemu doesn't do any grabs as SDL grabs @@ -118,7 +118,7 @@ class QemuRunner: os.environ["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image if not launch_cmd: -launch_cmd = 'runqemu snapshot %s' % runqemuparams +launch_cmd = 'runqemu %s %s ' % ('snapshot' if discard_writes else '', runqemuparams) if self.use_kvm: logger.info('Using kvm for runqemu') launch_cmd += ' kvm' diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py index b1009a0..34cb912 100644 --- a/meta/lib/oeqa/utils/qemutinyrunner.py +++ b/meta/lib/oeqa/utils/qemutinyrunner.py @@ -60,7 +60,7 @@ class QemuTinyRunner(QemuRunner): with open(self.logfile, "a") as f: f.write("%s" % msg) -def start(self, qemuparams = None, ssh=True, extra_bootparams=None, runqemuparams=''): +def
[OE-core] [PATCH v5 0/3] oeqa: more control over qemu
I'm currently working on testing an installer image. During that test I need to: - boot with two drives attached to the virtual machine (installer image and internal disk) - install to internal disk - reboot with just the internal disk There were several problems doing that: - attaching second disk via qemuparams was not possible - run_serial() timed out too early during the long-running install command - writes to the internal disks were discarded - booting with only the non-standard internal disk instead of the recipe's image was not possible V2: rebased on top of master-next + Robert's "runqemu: add selftest" series, no other changes (merge V1 if not taking Robert's patches first) V3: rebased on top of current master V4: QemuTinyRunner.start() also needs to accept the new "discard_writes" parameter V5: discard_writes must not be passed to launch() Patrick Ohly (3): oeqa: allow extending qemuparams="..." oeqa: allow customizing image used by runqemu() oeqa: allow persistent image writes in runqemu() meta/lib/oeqa/targetcontrol.py| 4 ++-- meta/lib/oeqa/utils/commands.py | 6 -- meta/lib/oeqa/utils/qemurunner.py | 4 ++-- meta/lib/oeqa/utils/qemutinyrunner.py | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) base-commit: b2a785f19fe25d244179b8672c846925da6d455a -- git-series 0.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/2] boost: build context and coroutine on ARM
On Mon, 2017-03-27 at 16:26 +0100, Ross Burton wrote: > With the right flags to the build, the context library can be built > on ARM. > > [ YOCTO #11253 ] > > Signed-off-by: Ross Burton > --- > meta/recipes-support/boost/boost.inc | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) Sorry, but: https://autobuilder.yocto.io/builders/nightly-arm/builds/270 https://autobuilder.yocto.io/builders/nightly-arm-lsb/builds/218 Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v3, 2/2] meta/classes/populate_sdk: Adds support for generating eSDK manifest files
The functionalities to generate SDK and eSDK manifest files are different, the SDK comes from package information and the eSDK comes from sstate artifacts. Only execute write_sdk_{host, target}_manifest when is on populate_sdk class. Adds new functions write_sdk{host, target}_ext_manifest to execute on postprocess in populate_sdk_ext because at the end we have all the sstate artifacts to generate the manifest. [YOCTO #9038] Signed-off-by: Francisco Pedraza --- meta/classes/populate_sdk_base.bbclass | 6 +++--- meta/classes/populate_sdk_ext.bbclass | 27 +++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 563582e..6928d02 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass @@ -87,9 +87,9 @@ python write_host_sdk_manifest () { with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output: output.write(format_pkg_list(pkgs, 'ver')) } - -POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; write_sdk_test_data ; " -POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; " +POPULATE_SDK_POST_TARGET_COMMAND_append = " write_sdk_test_data ; " +POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest ; " +POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " write_host_sdk_manifest; " SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}" SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK_PACKAGING_COMMAND} " diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 3bccb14..81d0050 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass @@ -83,6 +83,33 @@ TOOLCHAIN_OUTPUTNAME_task-populate-sdk-ext = "${TOOLCHAINEXT_OUTPUTNAME}" SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest" SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" +python write_target_sdk_ext_manifest () { +from oe.sdk import get_extra_sdkinfo +sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') +extra_info = get_extra_sdkinfo(sstate_dir) +target = d.getVar('TARGET_SYS') +target_multimach = d.getVar('MULTIMACH_TARGET_SYS') +with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f: +for fn in extra_info['filesizes']: +info = fn.split(':') #added +if info[2] in (target, target_multimach): +f.write("%s %s %s\n" % (info[1], info[2], info[3])) +} + +python write_host_sdk_ext_manifest () { +from oe.sdk import get_extra_sdkinfo +sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') +extra_info = get_extra_sdkinfo(sstate_dir) +host = d.getVar('BUILD_SYS') +with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f: +for fn in extra_info['filesizes']: +info = fn.split(':') #added +if info[2] == host: +f.write("%s %s %s\n" % (info[1], info[2], info[3])) +} + +SDK_POSTPROCESS_COMMAND_append_task-populate-sdk-ext = "write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; " + SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" def clean_esdk_builddir(d, sdkbasepath): -- 1.8.3.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v3, 1/2] lib/oe/sdk: Add get_extra_sdk_info to reuse code in buildhistory
This function is going to be used for generating the target and host manifest files packages for eSDK. [YOCTO #9038] Signed-off-by: Francisco Pedraza --- meta/classes/buildhistory.bbclass | 16 meta/lib/oe/sdk.py| 16 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 109b375..ab04db7 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -554,25 +554,17 @@ END python buildhistory_get_extra_sdkinfo() { import operator import math +# importing oe.sdk due package information req. +from oe.sdk import get_extra_sdkinfo if d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext' and \ "sdk" in (d.getVar('BUILDHISTORY_FEATURES') or "").split(): -tasksizes = {} -filesizes = {} -for root, _, files in os.walk(d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')): -for fn in files: -if fn.endswith('.tgz'): -fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024)) -task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0] -origtotal = tasksizes.get(task, 0) -tasksizes[task] = origtotal + fsize -filesizes[fn] = fsize with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f: -filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1, 0), reverse=True) +filesizes_sorted = sorted(extra_info['filesizes'].items(), key=operator.itemgetter(1, 0), reverse=True) for fn, size in filesizes_sorted: f.write('%10d KiB %s\n' % (size, fn)) with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 'w') as f: -tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1, 0), reverse=True) + tasksizes_sorted = sorted(extra_info['tasksizes'].items(), key=operator.itemgetter(1, 0), reverse=True) for task, size in tasksizes_sorted: f.write('%10d KiB %s\n' % (size, task)) } diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py index deb823b..d101bf0 100644 --- a/meta/lib/oe/sdk.py +++ b/meta/lib/oe/sdk.py @@ -372,5 +372,21 @@ def populate_sdk(d, manifest_dir=None): os.environ.clear() os.environ.update(env_bkp) +def get_extra_sdk_info(sstate_dir): +import operator +import math + +extra_info = {} +extra_info['tasksizes'] +for root, _, files in os.walk(sstate_dir): +for fn in files: +if fn.endswith('.tgz'): +fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024)) +task = fn.rsplit(':',1)[1].split('_',1)[1].split(',')[0] +origtotal = extra_info['tasksizes'].get(task, 0) +extra_info['tasksizes'][task] = origtotal + fsize +extra_info['filesizes'][fn] = fsize +return extra_info + if __name__ == "__main__": pass -- 1.8.3.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core