Various metadata tweaks v3
v3 cover Various metadata tweaks v3
The following series are some tidy ups and changes made whilst porting a distro with systemd and a Weston + Xwayland userland to Jethro.
Please consider them for inclusion.
Changes since v2:
* Backport weston patch to make enabling/disabling of systemd-login explicit
* Mention the change in default behaviour regarding systemds dbus-related tests
Regards,
Joshua
The following changes since commit 10e5df3503632a6e1c54612055b19f7258c3ae2f:
lib/oe/image.py: Fix dependency handling for compressed types (2015-10-14 18:08:22 +0300)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib joshuagl/cleanup
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/cleanup
Alejandro Hernandez (1):
archiver.bbclass: Fixes and improves archiver class for kernel and gcc
packages
Alex Franco (2):
test-empty-image: rename from core-image-empty
sanity.bbclass: expand warning when chmod fails
Benjamin Esquivel (2):
populate SDK: prepare calling of bb.utils for exceptions oeqa/selftest/manifest.py: Test support for manifests
Chen Qi (2):
openssh: fix file permission for /etc/pam.d/sshd
sudo: fix file permission for /etc/pam.d/sudo
Chris Hallinan (1):
image-live: make SYSLINUX_ROOT changable in image recipes
Daniel Istrate (2):
oeqa/selftest/bbtests: Updated bitbake TCs oeqa/selftest/wic: corrected testcase decorator for test18_iso_image
Joe MacDonald (1):
classes/base: provide hints on PACKAGECONFIG error
Joshua Lock (6):
systemd: add PACKAGECONFIG to build with compatibility libraries
weston: add PACKAGECONFIG to build with systemd-login support
systemd: make dbus an optional build time dependency
weston: add a PACKAGECONFIG option for xwayland support
xserver-xorg: add Xwayland RRECOMMENDS
xserver-xorg: drop empty ${PN}-security-policy package
Kai Kang (1):
gcc-4.x: fix wrong warning when using the universal zero initializer
{0}Khem Raj (1):
grub-efi, gummiboot: Emit correct path in startup.nsh
Leonardo Sandoval (3):
oeqa/utils/ftools: Ignore the exception if file does not exist oeqa/utils/ftools: From functions that expect data, check if None oeqa/selftest/buildoptions: Use the correct script for cleaning the
workdir
Mariano Lopez (2):
oetest: Add tearDownLocal class
oeqa/runtime: Fix setUp and tearDown methods
Mark Hatle (1):
gcc-5.2: Fix various _FOR_BUILD and related variables
Matt Madison (1):
i2c-tools: fix inverted RDEPENDS
Maxin B. John (1):
toolchain-shar-extract.sh: provide proper path for env_setup_script
Paul Eggleton (11):
common-licenses: use correct GFDL-1.1 license text
build-compare: drop PATCHTOOL setting
tzdata: reinstate changes reverted in 2014c upgrade
devtool: extract: fix error handling scripts/gen-lockedsig-cache: fix race with temp file creation classes/populate_sdk_ext: consistent indentation classes/populate_sdk_ext: prevent image construction from executing on
install
classes/populate_sdk_ext: add note to env setup script classes/populate_sdk_ext: detect and warn if running in OE environment toolchain-shar-extract.sh: print full-length title underline
devtool: handle virtual providers
Peter Kjellerstedt (1):
useradd_base.bbclass: Do not warn without a reason
Richard Purdie (2):
libc-package: Fix localedef multilib dependency issues
build-appliance-image: Update to jethro head revision
Robert Yang (1):
coreutils: fix for native and nativesdk
Ross Burton (10):
linux-yocto-custom: fix typo in Upstream-Status tag
metadata_scm: rewrite git hash logic
rpm: remove spurious build dependencies
qemu: disable Valgrind
oeqa/selftest/bbtests: clean up local DL_DIR/SSTATE_DIR safely oeqa/selftest: verify that devtool can use plugins in other layers oeqa/selftest/wic: fix cleaning
oeqa/selftest: clean up selftest.inc in teardown oeqa/selftest/wic: remove numbers from test names oeqa/selftest: improve config writing and cleanup
meta-selftest/lib/devtool/__init__.py | 0
meta-selftest/lib/devtool/test.py | 11 ++
.../{core-image-empty.bb => test-empty-image.bb} | 1 -
.../0001-linux-version-tweak.patch | 2 +-
meta/classes/archiver.bbclass | 27 ++-
meta/classes/base.bbclass | 3 +-
meta/classes/grub-efi.bbclass | 3 +-
meta/classes/gummiboot.bbclass | 3 +-
meta/classes/image-live.bbclass | 2 +-
meta/classes/libc-package.bbclass | 4 +-
meta/classes/metadata_scm.bbclass | 23 +--
meta/classes/populate_sdk_ext.bbclass | 18 +-
meta/classes/sanity.bbclass | 4 +-
meta/classes/useradd_base.bbclass | 6 +-
meta/files/common-licenses/GFDL-1.1 | 206 ++++++++-------------
meta/files/ext-sdk-prepare.sh | 20 ++
meta/files/toolchain-shar-extract.sh | 7 +-
meta/lib/oe/recipeutils.py | 6 +-
meta/lib/oe/sdk.py | 76 +++++---
meta/lib/oeqa/oetest.py | 6 +
meta/lib/oeqa/runtime/_ptest.py | 2 +-
meta/lib/oeqa/runtime/date.py | 4 +-
meta/lib/oeqa/runtime/kernelmodule.py | 4 +-
meta/lib/oeqa/runtime/scanelf.py | 2 +-
meta/lib/oeqa/selftest/base.py | 2 +-
meta/lib/oeqa/selftest/bbtests.py | 60 ++++--
meta/lib/oeqa/selftest/buildoptions.py | 8 +-
meta/lib/oeqa/selftest/devtool.py | 44 +++++
meta/lib/oeqa/selftest/imagefeatures.py | 16 +-
meta/lib/oeqa/selftest/manifest.py | 163 ++++++++++++++++
meta/lib/oeqa/selftest/wic.py | 67 ++++---
meta/lib/oeqa/utils/ftools.py | 20 +-
meta/recipes-connectivity/openssh/openssh_7.1p1.bb | 2 +-
meta/recipes-core/coreutils/coreutils_8.24.bb | 2 +-
.../images/build-appliance-image_12.0.1.bb | 2 +-
meta/recipes-core/systemd/systemd_225.bb | 4 +-
.../build-compare/build-compare_git.bb | 1 -
meta/recipes-devtools/gcc/gcc-4.8.inc | 1 +
...-gcc-483-universal-initializer-no-warning.patch | 107 +++++++++++
meta/recipes-devtools/gcc/gcc-4.9.inc | 1 +
...-gcc-483-universal-initializer-no-warning.patch | 107 +++++++++++
meta/recipes-devtools/gcc/gcc-5.2.inc | 1 +
.../gcc/gcc-5.2/0042-cxxflags-for-build.patch | 123 ++++++++++++
meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb | 3 +-
meta/recipes-devtools/qemu/qemu/no-valgrind.patch | 19 ++
meta/recipes-devtools/qemu/qemu_2.4.0.bb | 1 +
meta/recipes-devtools/rpm/rpm_4.11.2.bb | 2 +-
meta/recipes-extended/sudo/sudo_1.8.14p3.bb | 2 +-
meta/recipes-extended/tzdata/tzdata_2015g.bb | 5 +-
.../weston/explicit-enable-disable-systemd.patch | 70 +++++++
.../wayland/weston/libsystemd.patch | 53 ++++++
meta/recipes-graphics/wayland/weston_1.8.0.bb | 8 +-
.../recipes-graphics/xorg-xserver/xserver-xorg.inc | 8 +-
scripts/gen-lockedsig-cache | 4 +
scripts/lib/devtool/standard.py | 32 +++-
scripts/lib/devtool/upgrade.py | 12 +-
56 files changed, 1101 insertions(+), 289 deletions(-)
create mode 100644 meta-selftest/lib/devtool/__init__.py
create mode 100644 meta-selftest/lib/devtool/test.py
rename meta-selftest/recipes-test/images/{core-image-empty.bb => test-empty-image.bb} (86%)
create mode 100644 meta/files/ext-sdk-prepare.sh
create mode 100644 meta/lib/oeqa/selftest/manifest.py
create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/0051-gcc-483-universal-initializer-no-warning.patch
create mode 100644 meta/recipes-devtools/gcc/gcc-4.9/0065-gcc-483-universal-initializer-no-warning.patch
create mode 100644 meta/recipes-devtools/gcc/gcc-5.2/0042-cxxflags-for-build.patch
create mode 100644 meta/recipes-devtools/qemu/qemu/no-valgrind.patch
create mode 100644 meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch
create mode 100644 meta/recipes-graphics/wayland/weston/libsystemd.patchSignature · 1 line
2.1.4
PATCH v3 1/52 common-licenses: use correct GFDL-1.1 license text
From: Paul Eggleton <[email protected]>
It seems that the GFDL 1.1 license file that was originally committed was actually the 1.2 version. Replace it with the 1.1 version fetched from http://www.gnu.org/licenses/old-licenses/fdl-1.1.txt.
--- meta/files/common-licenses/GFDL-1.1 | 206 ++++++++++++++---------------------- 1 file changed, 82 insertions(+), 124 deletions(-)
meta/files/common-licenses/GFDL-1.1 +82 -124
@@ -1,8 +1,7 @@ - GNU Free Documentation License - Version 1.2, November 2002 + GNU Free Documentation License + Version 1.1, March 2000 - - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
@@ -11,12 +10,12 @@ 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other -functional and useful document "free" in the sense of freedom: to -assure everyone the effective freedom to copy and redistribute it, -with or without modifying it, either commercially or noncommercially. -Secondarily, this License preserves for the author and publisher a way -to get credit for their work, while not being considered responsible -for modifications made by others. +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It
@@ -34,15 +33,11 @@ principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that -contains a notice placed by the copyright holder saying it can be -distributed under the terms of this License. Such a notice grants a -world-wide, royalty-free license, unlimited in duration, to use that -work under the conditions stated herein. The "Document", below, -refers to any such manual or work. Any member of the public is a -licensee, and is addressed as "you". You accept the license if you -copy, modify or distribute the work in a way requiring permission -under copyright law. +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with
@@ -52,7 +47,7 @@ A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly -within that overall subject. (Thus, if the Document is in part a +within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal,
@@ -61,40 +56,33 @@ them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. If a -section does not fit the above definition of Secondary then it is not -allowed to be designated as Invariant. The Document may contain zero -Invariant Sections. If the Document does not identify any Invariant -Sections then there are none. +that says that the Document is released under this License. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. A Front-Cover Text may -be at most 5 words, and a Back-Cover Text may be at most 25 words. +the Document is released under this License. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the -general public, that is suitable for revising the document +general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file -format whose markup, or absence of markup, has been arranged to thwart -or discourage subsequent modification by readers is not Transparent. -An image format is not Transparent if used for any substantial amount -of text. A copy that is not "Transparent" is called "Opaque". +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple -HTML, PostScript or PDF designed for human modification. Examples of -transparent image formats include PNG, XCF and JPG. Opaque formats -include proprietary formats that can be read and edited only by -proprietary word processors, SGML or XML for which the DTD and/or +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the -machine-generated HTML, PostScript or PDF produced by some word -processors for output purposes only. +machine-generated HTML produced by some word processors for output +purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material
@@ -103,21 +91,6 @@ formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose -title either is precisely XYZ or contains XYZ in parentheses following -text that translates XYZ in another language. (Here XYZ stands for a -specific section name mentioned below, such as "Acknowledgements", -"Dedications", "Endorsements", or "History".) To "Preserve the Title" -of such a section when you modify the Document means that it remains a -section "Entitled XYZ" according to this definition. - -The Document may include Warranty Disclaimers next to the notice which -states that this License applies to the Document. These Warranty -Disclaimers are considered to be included by reference in this -License, but only as regards disclaiming warranties: any other -implication that these Warranty Disclaimers may have is void and has -no effect on the meaning of this License. - 2. VERBATIM COPYING
@@ -137,10 +110,9 @@ you may publicly display copies. 3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have -printed covers) of the Document, numbering more than 100, and the -Document's license notice requires Cover Texts, you must enclose the -copies in covers that carry, clearly and legibly, all these Cover +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present
@@ -158,15 +130,16 @@ pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy -a computer-network location from which the general network-using -public has access to download using public-standard network protocols -a complete Transparent copy of the Document, free of added material. -If you use the latter option, you must take reasonably prudent steps, -when you begin distribution of Opaque copies in quantity, to ensure -that this Transparent copy will remain thus accessible at the stated -location until at least one year after the last time you distribute an -Opaque copy (directly or through your agents or retailers) of that -edition to the public. +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give
@@ -190,8 +163,7 @@ A. Use in the Title Page (and on the covers, if any) a title distinct B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has fewer than five), - unless they release you from this requirement. + Document (all of its principal authors, if it has less than five). C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document.
@@ -203,10 +175,10 @@ F. Include, immediately after the copyright notices, a license notice G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. -I. Preserve the section Entitled "History", Preserve its Title, and add - to it an item stating at least the title, year, new authors, and +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If - there is no section Entitled "History" in the Document, create one + there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
@@ -217,18 +189,17 @@ J. Preserve the network location, if any, given in the Document for You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. -K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the section all - the substance and tone of each of the contributor acknowledgements +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. -M. Delete any section Entitled "Endorsements". Such a section +M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. -N. Do not retitle any existing section to be Entitled "Endorsements" +N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material
@@ -237,7 +208,7 @@ of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -You may add a section Entitled "Endorsements", provided it contains +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a
@@ -265,7 +236,7 @@ License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its -license notice, and that you preserve all their Warranty Disclaimers. +license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single
@@ -276,11 +247,11 @@ author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -In the combination, you must combine any sections Entitled "History" -in the various original documents, forming one section Entitled -"History"; likewise combine any sections Entitled "Acknowledgements", -and any sections Entitled "Dedications". You must delete all sections -Entitled "Endorsements". +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS
@@ -301,20 +272,18 @@ other respects regarding verbatim copying of that document. A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or -distribution medium, is called an "aggregate" if the copyright -resulting from the compilation is not used to limit the legal rights -of the compilation's users beyond what the individual works permit. -When the Document is included in an aggregate, this License does not -apply to the other works in the aggregate which are not themselves -derivative works of the Document. +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one half of -the entire aggregate, the Document's Cover Texts may be placed on -covers that bracket the Document within the aggregate, or the -electronic equivalent of covers if the Document is in electronic form. -Otherwise they must appear on printed covers that bracket the whole -aggregate. +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. 8. TRANSLATION
@@ -325,17 +294,10 @@ Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a -translation of this License, and all the license notices in the -Document, and any Warranty Disclaimers, provided that you also include -the original English version of this License and the original versions -of those notices and disclaimers. In case of a disagreement between -the translation and the original version of this License or a notice -or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", -"Dedications", or "History", the requirement (section 4) to Preserve -its Title (section 1) will typically require changing the actual -title. +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. 9. TERMINATION
@@ -373,23 +335,19 @@ To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of
Signature · 1 line
2.1.4
PATCH v3 2/52 build-compare: drop PATCHTOOL setting
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
We don't need PATCHTOOL to be set to git in this recipe, and setting it that way requires that the running user has git user & email configured, which on a build server it might well not be.
--- meta/recipes-devtools/build-compare/build-compare_git.bb | 1 - 1 file changed, 1 deletion(-)
meta/recipes-devtools/build-compare/build-compare_git.bb +0 -1
@@ -10,7 +10,6 @@ SRC_URI = "git://github.com/openSUSE/build-compare.git \ file://Ignore-DWARF-sections.patch;striplevel=1 \ file://0001-Add-support-for-deb-and-ipk-packaging.patch \ " -PATCHTOOL = "git" SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
Signature · 1 line
2.1.4
PATCH v3 3/52 tzdata: reinstate changes reverted in 2014c upgrade
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
OE-Core commit 57af3fb9662106f0a65a1b4edf83e2398be0a8f1 upgraded tzdata but also reverted a couple of changes to SUMMARY and LIC_FILES_CHKSUM. Reinstate these (with an update to the README md5 value since that has changed slightly, without any change to the licensing statements within).
--- meta/recipes-extended/tzdata/tzdata_2015g.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-extended/tzdata/tzdata_2015g.bb +3 -2
@@ -1,8 +1,9 @@ -DESCRIPTION = "Timezone data" +SUMMARY = "Timezone data" HOMEPAGE = "http://www.iana.org/time-zones" SECTION = "base" LICENSE = "PD & BSD" -LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1" +LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1 \ + file://README;md5=d0ff93a73dd5bc3c6e724bb4343760f6" DEPENDS = "tzcode-native" SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
Signature · 1 line
2.1.4
PATCH v3 4/52 gcc-4.x: fix wrong warning when using the universal zero initializer {0}
In reply to Joshua LockFrom: Kai Kang <[email protected]>
When I upgrade efivar to 0.21, it fails to compile with error messages:
| linux.c:850:9: error: missing braces around initializer [-Werror=missing-braces]
| struct ifreq ifr = { 0, };
| ^
It is a known issue of gcc. Backport patch from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
to fix wrong warning when using the universal zero initializer {0}.
--- meta/recipes-devtools/gcc/gcc-4.8.inc | 1 + ...-gcc-483-universal-initializer-no-warning.patch | 107 +++++++++++++++++++++ meta/recipes-devtools/gcc/gcc-4.9.inc | 1 + ...-gcc-483-universal-initializer-no-warning.patch | 107 +++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/0051-gcc-483-universal-initializer-no-warning.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.9/0065-gcc-483-universal-initializer-no-warning.patch
meta/recipes-devtools/gcc/gcc-4.8.inc +1 -0
@@ -69,6 +69,7 @@ SRC_URI = "\ file://0047-repomembug.patch \ file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ file://target-gcc-includedir.patch \ + file://0051-gcc-483-universal-initializer-no-warning.patch \ " SRC_URI[md5sum] = "5a84a30839b2aca22a2d723de2a626ec" SRC_URI[sha256sum] = "4a80aa23798b8e9b5793494b8c976b39b8d9aa2e53cd5ed5534aff662a7f8695"
meta/recipes-devtools/gcc/gcc-4.8/0051-gcc-483-universal-initializer-no-warning.patch new file +107 -0
107 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-4.9.inc +1 -0
@@ -80,6 +80,7 @@ SRC_URI = "\ file://0062-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ file://0063-nativesdk-gcc-support.patch \ file://0064-handle-target-sysroot-multilib.patch \ + file://0065-gcc-483-universal-initializer-no-warning.patch \ " SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327" SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e"
meta/recipes-devtools/gcc/gcc-4.9/0065-gcc-483-universal-initializer-no-warning.patch new file +107 -0
107 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v3 5/52 coreutils: fix for native and nativesdk
In reply to Joshua LockFrom: Robert Yang <[email protected]>
The do_install_append is used for moving/renaming for ALTERNATIVE, but it breaks native and nativesdk, for example there is no ln, but ln.coreutils, that makes coreutils-native or nativesdk-coreutils doesn't work. This patch fixes the problem.
--- meta/recipes-core/coreutils/coreutils_8.24.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/coreutils/coreutils_8.24.bb +1 -1
@@ -62,7 +62,7 @@ do_compile_prepend () { mkdir -p ${B}/src } -do_install_append() { +do_install_append_class-target() { for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done install -d ${D}${base_bindir}
Signature · 1 line
2.1.4
PATCH v3 6/52 grub-efi, gummiboot: Emit correct path in startup.nsh
In reply to Joshua LockFrom: Khem Raj <[email protected]>
when we generate hddimage and use it to prepare SD card using scripts/contrib/mkefidisk.sh as described here
http://elinux.org/Minnowboard:MinnowMaxYoctoProject
The content of startup.nsh contains
bootx64.efi
but this file is actually not in same dir as startup.nsh its in /EFI/BOOT so for this to work entry in startup.nsh should be
fs0:\EFI\BOOT\bootx64.efi
Otherwise the image is D-O-A
--- meta/classes/grub-efi.bbclass | 3 ++- meta/classes/gummiboot.bbclass | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
meta/classes/grub-efi.bbclass +2 -1
@@ -52,7 +52,8 @@ efi_iso_populate() { mkdir -p ${EFIIMGDIR}/${EFIDIR} cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} cp $iso_dir/vmlinuz ${EFIIMGDIR} - echo "${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh + EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') + echo "fs0:${EFIPATH}\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh if [ -f "$iso_dir/initrd" ] ; then cp $iso_dir/initrd ${EFIIMGDIR} fi
meta/classes/gummiboot.bbclass +2 -1
@@ -46,7 +46,8 @@ efi_iso_populate() { mkdir -p ${EFIIMGDIR}/${EFIDIR} cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} cp $iso_dir/vmlinuz ${EFIIMGDIR} - echo "${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh + EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') + echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh if [ -f "$iso_dir/initrd" ] ; then cp $iso_dir/initrd ${EFIIMGDIR} fi
Signature · 1 line
2.1.4
PATCH v3 7/52 linux-yocto-custom: fix typo in Upstream-Status tag
In reply to Joshua LockFrom: Ross Burton <[email protected]>
--- .../linux/linux-yocto-custom/0001-linux-version-tweak.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom/0001-linux-version-tweak.patch +1 -1
@@ -3,7 +3,7 @@ From: Bruce Ashfield <[email protected]> Date: Mon, 11 Jun 2012 15:31:42 -0400 Subject: [PATCH] linux: version tweak -Upstream-Status: Inapproriate [example code] +Upstream-Status: Inappropriate [example code] Signed-off-by: Bruce Ashfield <[email protected]> Signed-off-by: Saul Wold <[email protected]>
Signature · 1 line
2.1.4
PATCH v3 8/52 metadata_scm: rewrite git hash logic
In reply to Joshua LockFrom: Ross Burton <[email protected]>
The code to get the git and branch hash for the current commit in a specific repository was quite complex and prone to breakage, replace it with subprocess and git rev-parse.
--- meta/classes/metadata_scm.bbclass | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
meta/classes/metadata_scm.bbclass +12 -11
@@ -65,18 +65,19 @@ def base_get_metadata_svn_revision(path, d): return revision def base_get_metadata_git_branch(path, d): - branch = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path).read() + import subprocess - if len(branch) != 0: - return branch - return "<unknown>" + try: + return subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"], + cwd=path).strip() + except: + return "<unknown>" def base_get_metadata_git_revision(path, d): - f = os.popen("cd %s; git log -n 1 --pretty=oneline -- 2>&1" % path) - data = f.read() - if f.close() is None: - rev = data.split(" ")[0] - if len(rev) != 0: - return rev - return "<unknown>" + import subprocess + try: + return subprocess.check_output(["git", "rev-parse", "HEAD"], + cwd=path).strip() + except: + return "<unknown>"
Signature · 1 line
2.1.4
PATCH v3 9/52 devtool: extract: fix error handling
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
If recipe parsing fails we need to exit out instead of attempting to use the data object that's set to None, which resulted in a traceback.
--- scripts/lib/devtool/standard.py | 8 ++++++++ 1 file changed, 8 insertions(+)
scripts/lib/devtool/standard.py +8 -0
@@ -225,6 +225,9 @@ def extract(args, config, basepath, workspace): import bb tinfoil = _prep_extract_operation(config, basepath, args.recipename) + if not tinfoil: + # Error already shown + return 1 rd = parse_recipe(config, tinfoil, args.recipename, True) if not rd:
@@ -271,6 +274,8 @@ def _prep_extract_operation(config, basepath, recipename): trying to extract a package. Returns the tinfoil instance to be used.""" tinfoil = setup_tinfoil(basepath=basepath) rd = parse_recipe(config, tinfoil, recipename, True) + if not rd: + return None if bb.data.inherits_class('kernel-yocto', rd): tinfoil.shutdown()
@@ -500,6 +505,9 @@ def modify(args, config, basepath, workspace): args.srctree) if args.extract: tinfoil = _prep_extract_operation(config, basepath, args.recipename) + if not tinfoil: + # Error already shown + return 1 else: tinfoil = setup_tinfoil(basepath=basepath)
Signature · 1 line
2.1.4
PATCH v3 10/52 classes/base: provide hints on PACKAGECONFIG error
In reply to Joshua LockFrom: Joe MacDonald <[email protected]>
Commit 771f89498c introduces an error message that is very rarely hit and when it is, it is usually easy to trace the root cause very quickly. The information provided in the error message isn't enough to lead you back to the actual failure, however, so expand upon it a bit, pinpointing the specific package and flag that fails.
--- meta/classes/base.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/base.bbclass +2 -1
@@ -391,7 +391,8 @@ python () { items = flagval.split(",") num = len(items) if num > 4: - bb.error("Only enable,disable,depend,rdepend can be specified!") + bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend can be specified!" + % (d.getVar('PN', True), flag)) if flag in pkgconfig: if num >= 3 and items[2]:
Signature · 1 line
2.1.4
PATCH v3 11/52 toolchain-shar-extract.sh: provide proper path for env_setup_script
In reply to Joshua LockFrom: "Maxin B. John" <[email protected]>
The toolchain install script suggest the user to source env_setup_script from wrong path now. eg:
" Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /opt/poky/2.0//opt/poky/2.0/environment-setup-armv5e-poky-linux-gnueabi "
fix it.
--- meta/files/toolchain-shar-extract.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-extract.sh +1 -1
@@ -183,7 +183,7 @@ fi echo "SDK has been successfully set up and is ready to be used." echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g." for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do - echo " \$ . $target_sdk_dir/$env_setup_script" + echo " \$ . $env_setup_script" done exit 0
Signature · 1 line
2.1.4
PATCH v3 12/52 image-live: make SYSLINUX_ROOT changable in image recipes
In reply to Joshua LockFrom: Chris Hallinan <[email protected]>
--- meta/classes/image-live.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image-live.bbclass +1 -1
@@ -2,7 +2,7 @@ AUTO_SYSLINUXCFG = "1" INITRD_IMAGE ?= "core-image-minimal-initramfs" INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz" -SYSLINUX_ROOT = "root=/dev/ram0" +SYSLINUX_ROOT ?= "root=/dev/ram0" SYSLINUX_TIMEOUT ?= "50" SYSLINUX_LABELS ?= "boot install" LABELS_append = " ${SYSLINUX_LABELS} "
Signature · 1 line
2.1.4
PATCH v3 13/52 scripts/gen-lockedsig-cache: fix race with temp file creation
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
As part of populating the sstate-cache with an artifact (.tgz file) we create a temp file and then atomically move it to the final name. Due to the glob used in this script such temp files were being matched, and between the time they were matched and the time the script started copying files, the temp file may have vanished.
This fixes random "No such file or directory" failures building the extensible SDK on build setups where the sstate-cache directory is shared amongst multiple build machines.
--- scripts/gen-lockedsig-cache | 4 ++++ 1 file changed, 4 insertions(+)
scripts/gen-lockedsig-cache +4 -0
@@ -34,6 +34,10 @@ for s in sigs: files |= set(glob.glob(p)) for f in files: + _, ext = os.path.splitext(f) + if not ext in ['.tgz', '.siginfo', '.sig']: + # Most likely a temp file, skip it + continue dst = f.replace(sys.argv[2], sys.argv[3]) destdir = os.path.dirname(dst) mkdir(destdir)
Signature · 1 line
2.1.4
PATCH v3 14/52 test-empty-image: rename from core-image-empty
In reply to Joshua LockFrom: Alex Franco <[email protected]>
As the empty image isn't a "core" image, and it's meant for testing
Additionally, don't set LICENSE as it is inherited from image
[YOCTO #7664]
---
.../recipes-test/images/{core-image-empty.bb => test-empty-image.bb} | 1 -
1 file changed, 1 deletion(-)
rename meta-selftest/recipes-test/images/{core-image-empty.bb => test-empty-image.bb} (86%)meta-selftest/recipes-test/images/test-empty-image.bb renamed from meta-selftest/recipes-test/images/core-image-empty.bb +0 -1
@@ -2,6 +2,5 @@ SUMMARY = "An empty image." IMAGE_INSTALL = "" IMAGE_LINGUAS = "" PACKAGE_INSTALL = "" -LICENSE = "MIT" inherit image
Signature · 1 line
2.1.4
PATCH v3 15/52 oetest: Add tearDownLocal class
In reply to Joshua LockFrom: Mariano Lopez <[email protected]>
In the current state there are some runtime test that don't run the tearDown method fromm oeRuntimeTest class because the tearDown class is overwritten in the child class.
This change adds tearDownLocal method in oeRuntimeTest class that will run after tearDown. This method can be overwritten in the child classes to implement specific test functionality.
[YOCTO #8465]
--- meta/lib/oeqa/oetest.py | 6 ++++++ 1 file changed, 6 insertions(+)
meta/lib/oeqa/oetest.py +6 -0
@@ -196,6 +196,12 @@ class oeRuntimeTest(oeTest): print ("%s dump data stored in %s" % (self._testMethodName, self.tc.host_dumper.dump_dir)) + self.tearDownLocal() + + # Method to be run after tearDown and implemented by child classes + def tearDownLocal(self): + pass + #TODO: use package_manager.py to install packages on any type of image def install_packages(self, packagelist): for package in packagelist:
Signature · 1 line
2.1.4
PATCH v3 16/52 oeqa/runtime: Fix setUp and tearDown methods
In reply to Joshua LockFrom: Mariano Lopez <[email protected]>
Currently some of the runtime test overwrites
the setUp and tearDown methods provided by
oeRuntimeTest, this will avoid some checks
required when running the test suit.
This patch changes the setUp and tearDown methods
for their local counterparts, so when these
tests are called, it will run the parent setUp
and tearDown and also the local ones.
[YOCTO #8465]
--- meta/lib/oeqa/runtime/_ptest.py | 2 +- meta/lib/oeqa/runtime/date.py | 4 ++-- meta/lib/oeqa/runtime/kernelmodule.py | 4 ++-- meta/lib/oeqa/runtime/scanelf.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
meta/lib/oeqa/runtime/_ptest.py +1 -1
@@ -98,7 +98,7 @@ class PtestRunnerTest(oeRuntimeTest): return complementary_pkgs.split() - def setUp(self): + def setUpLocal(self): self.ptest_log = os.path.join(oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR",True), "ptest-%s.log" % oeRuntimeTest.tc.d.getVar('DATETIME', True)) @skipUnlessPassed('test_ssh')
meta/lib/oeqa/runtime/date.py +2 -2
@@ -4,11 +4,11 @@ import re class DateTest(oeRuntimeTest): - def setUp(self): + def setUpLocal(self): if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd": self.target.run('systemctl stop systemd-timesyncd') - def tearDown(self): + def tearDownLocal(self): if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", True) == "systemd": self.target.run('systemctl start systemd-timesyncd')
meta/lib/oeqa/runtime/kernelmodule.py +2 -2
@@ -10,7 +10,7 @@ def setUpModule(): class KernelModuleTest(oeRuntimeTest): - def setUp(self): + def setUpLocal(self): self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod.c"), "/tmp/hellomod.c") self.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "hellomod_makefile"), "/tmp/Makefile")
@@ -30,5 +30,5 @@ class KernelModuleTest(oeRuntimeTest): (status, output) = self.target.run(cmd, 900) self.assertEqual(status, 0, msg="\n".join([cmd, output])) - def tearDown(self): + def tearDownLocal(self): self.target.run('rm -f /tmp/Makefile /tmp/hellomod.c')
meta/lib/oeqa/runtime/scanelf.py +1 -1
@@ -8,7 +8,7 @@ def setUpModule(): class ScanelfTest(oeRuntimeTest): - def setUp(self): + def setUpLocal(self): self.scancmd = 'scanelf --quiet --recursive --mount --ldpath --path' @testcase(966)
Signature · 1 line
2.1.4
PATCH v3 17/52 classes/populate_sdk_ext: consistent indentation
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
Make indentation consistent here in preparation for the changes that follow.
--- meta/classes/populate_sdk_ext.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/classes/populate_sdk_ext.bbclass +5 -5
@@ -238,11 +238,11 @@ sdk_ext_postinst() { mv *-nativesdk-libc.tar.* $target_sdk_dir/`dirname ${oe_init_build_env_path}` if [ "$prepare_buildsystem" != "no" ]; then - printf "Preparing build system...\n" - # dash which is /bin/sh on Ubuntu will not preserve the - # current working directory when first ran, nor will it set $1 when - # sourcing a script. That is why this has to look so ugly. - sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && bitbake ${SDK_TARGETS} >> preparing_build_system.log" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; } + printf "Preparing build system...\n" + # dash which is /bin/sh on Ubuntu will not preserve the + # current working directory when first ran, nor will it set $1 when + # sourcing a script. That is why this has to look so ugly. + sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && bitbake ${SDK_TARGETS} >> preparing_build_system.log" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; } fi echo done }
Signature · 1 line
2.1.4
PATCH v3 18/52 classes/populate_sdk_ext: prevent image construction from executing on install
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
In order to prepare the build system within the extensible SDK, we actually go ahead and build the targets specified by SDK_TARGETS (by default the image the SDK was built for). Assuming that's an image, we don't actually need to build the image itself - we just need to have everything done up to the point before building the image, so that we have everything needed in the sysroot.
In order to do this, create temporary bbappends for each of the targets in the workspace layer that stub out do_rootfs and related tasks if they exist. This is a little bit of a hack but is the least intrusive fix at this point. To make things a bit tidier, I have split out the preparation commands into a separate script so we can run that in the appropriate environment rather than all the commands separately.
Fixes [YOCTO #7590].
--- meta/classes/populate_sdk_ext.bbclass | 5 ++++- meta/files/ext-sdk-prepare.sh | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 meta/files/ext-sdk-prepare.sh
meta/classes/populate_sdk_ext.bbclass +4 -1
@@ -203,6 +203,8 @@ install_tools() { install $buildtools_path ${SDK_OUTPUT}/${SDKPATH} install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH} + + install -m 0755 ${COREBASE}/meta/files/ext-sdk-prepare.sh ${SDK_OUTPUT}/${SDKPATH} } # Since bitbake won't run as root it doesn't make sense to try and install
@@ -242,8 +244,9 @@ sdk_ext_postinst() { # dash which is /bin/sh on Ubuntu will not preserve the # current working directory when first ran, nor will it set $1 when # sourcing a script. That is why this has to look so ugly. - sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && bitbake ${SDK_TARGETS} >> preparing_build_system.log" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; } + sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && $target_sdk_dir/ext-sdk-prepare.sh $target_sdk_dir '${SDK_TARGETS}' >> preparing_build_system.log 2>&1" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; } fi + rm -f $target_sdk_dir/ext-sdk-prepare.sh echo done }
meta/files/ext-sdk-prepare.sh new file +20 -0
@@ -0,0 +1,20 @@ +#!/bin/sh + +# Prepare the build system within the extensible SDK + +target_sdk_dir="$1" +sdk_targets="$2" + +# Avoid actually building images during this phase, but still +# ensure all dependencies are extracted from sstate +# This is a hack, to be sure, but we really don't need to do this here +for sdktarget in $sdk_targets ; do + bbappend=`recipetool newappend $target_sdk_dir/workspace $sdktarget` + printf 'python do_rootfs_forcevariable () {\n bb.utils.mkdirhier(d.getVar("IMAGE_ROOTFS", True))\n}\n' > $bbappend + printf 'python do_bootimg () {\n pass\n}\n' >> $bbappend + printf 'python do_bootdirectdisk () {\n pass\n}\n' >> $bbappend + printf 'python do_vmimg () {\n pass\n}\n' >> $bbappend + printf "Created bbappend %s\n" "$bbappend" +done +bitbake $sdk_targets || exit 1 +rm -rf $target_sdk_dir/workspace/appends/*
Signature · 1 line
2.1.4
PATCH v3 19/52 classes/populate_sdk_ext: add note to env setup script
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
Print a note at the end of the environment setup script pointing to devtool.
--- meta/classes/populate_sdk_ext.bbclass | 2 ++ 1 file changed, 2 insertions(+)
meta/classes/populate_sdk_ext.bbclass +2 -0
@@ -236,6 +236,8 @@ sdk_ext_postinst() { # so put it at the end of $PATH. echo "export PATH=\$PATH:$target_sdk_dir/sysroots/${SDK_SYS}/${bindir_nativesdk}" >> $env_setup_script + echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script + # For now this is where uninative.bbclass expects the tarball mv *-nativesdk-libc.tar.* $target_sdk_dir/`dirname ${oe_init_build_env_path}`
Signature · 1 line
2.1.4
PATCH v3 20/52 classes/populate_sdk_ext: detect and warn if running in OE environment
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
If you run the extensible SDK environment setup script in a shell session where oe-init-build-env has been run already, and attempt to use the two together, strange things happen - you may not even be running devtool from the extensible SDK, but the OE tree. This isn't a supported use case anyway, so show a warning recommending starting a new shell session.
--- meta/classes/populate_sdk_ext.bbclass | 3 +++ 1 file changed, 3 insertions(+)
meta/classes/populate_sdk_ext.bbclass +3 -0
@@ -238,6 +238,9 @@ sdk_ext_postinst() { echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script + # Warn if trying to use external bitbake and the ext SDK together + echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script + # For now this is where uninative.bbclass expects the tarball mv *-nativesdk-libc.tar.* $target_sdk_dir/`dirname ${oe_init_build_env_path}`
Signature · 1 line
2.1.4
PATCH v3 21/52 toolchain-shar-extract.sh: print full-length title underline
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
Print a line that's the full length of the title that it's underneath.
--- meta/files/toolchain-shar-extract.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/files/toolchain-shar-extract.sh +3 -2
@@ -68,8 +68,9 @@ while getopts ":yd:nDRS" OPT; do esac done -echo "@SDK_TITLE@ installer version @SDK_VERSION@" -echo "===========================================================" +titlestr="@SDK_TITLE@ installer version @SDK_VERSION@" +printf "%s\n" "$titlestr" +printf "%${#titlestr}s\n" | tr " " "=" if [ $verbose = 1 ] ; then set -x
Signature · 1 line
2.1.4
PATCH v3 22/52 libc-package: Fix localedef multilib dependency issues
In reply to Joshua LockFrom: Richard Purdie <[email protected]>
Building nativesdk-glibc-locale results in many messages like:
QA Issue: nativesdk-locale-base-en-sg rdepends on localedef, but it isn't a build dependency? [build-deps]
It should depend on ${MLPREFIX}localedef, not just localedef to fix these warnings.
--- meta/classes/libc-package.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/libc-package.bbclass +2 -2
@@ -236,8 +236,8 @@ python package_do_split_gconvs () { supported[locale] = charset def output_locale_source(name, pkgname, locale, encoding): - d.setVar('RDEPENDS_%s' % pkgname, 'localedef %s-localedata-%s %s-charmap-%s' % \ - (mlprefix+bpn, legitimize_package_name(locale), mlprefix+bpn, legitimize_package_name(encoding))) + d.setVar('RDEPENDS_%s' % pkgname, '%slocaledef %s-localedata-%s %s-charmap-%s' % \ + (mlprefix, mlprefix+bpn, legitimize_package_name(locale), mlprefix+bpn, legitimize_package_name(encoding))) d.setVar('pkg_postinst_%s' % pkgname, d.getVar('locale_base_postinst', True) \ % (locale, encoding, locale)) d.setVar('pkg_postrm_%s' % pkgname, d.getVar('locale_base_postrm', True) % \
Signature · 1 line
2.1.4
PATCH v3 23/52 devtool: handle virtual providers
In reply to Joshua LockFrom: Paul Eggleton <[email protected]>
For modify / extract / upgrade, if the specified "recipe" is not actually a recipe but a virtual target such as virtual/kernel, map it correctly to the actual recipe and make sure we use that name within the workspace. Thanks to Chris Larson for reminding me this was still broken and for a hint on how to fix it.
--- meta/lib/oe/recipeutils.py | 6 +++++- meta/lib/oeqa/selftest/devtool.py | 32 ++++++++++++++++++++++++++++++++ scripts/lib/devtool/standard.py | 24 ++++++++++++++++++------ scripts/lib/devtool/upgrade.py | 12 +++++++++--- 4 files changed, 64 insertions(+), 10 deletions(-)
meta/lib/oe/recipeutils.py +5 -1
@@ -31,9 +31,13 @@ def pn_to_recipe(cooker, pn): import bb.providers if pn in cooker.recipecache.pkg_pn: - filenames = cooker.recipecache.pkg_pn[pn] best = bb.providers.findBestProvider(pn, cooker.data, cooker.recipecache, cooker.recipecache.pkg_pn) return best[3] + elif pn in cooker.recipecache.providers: + filenames = cooker.recipecache.providers[pn] + eligible, foundUnique = bb.providers.filterProviders(filenames, pn, cooker.expanded_data, cooker.recipecache) + filename = eligible[0] + return filename else: return None
meta/lib/oeqa/selftest/devtool.py +32 -0
@@ -466,6 +466,28 @@ class DevtoolTests(DevtoolBase): # Try building bitbake(testrecipe) + def test_devtool_modify_virtual(self): + # Try modifying a virtual recipe + virtrecipe = 'virtual/libx11' + realrecipe = 'libx11' + tempdir = tempfile.mkdtemp(prefix='devtoolqa') + self.track_for_cleanup(tempdir) + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + result = runCmd('devtool modify %s -x %s' % (virtrecipe, tempdir)) + self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') + self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created') + matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % realrecipe)) + self.assertTrue(matches, 'bbappend not created %s' % result.output) + # Test devtool status + result = runCmd('devtool status') + self.assertNotIn(virtrecipe, result.output) + self.assertIn(realrecipe, result.output) + # Check git repo + self._check_src_repo(tempdir) + # This is probably sufficient + + @testcase(1169) def test_devtool_update_recipe(self): # Check preconditions
@@ -805,6 +827,16 @@ class DevtoolTests(DevtoolBase): self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') self._check_src_repo(tempdir) + def test_devtool_extract_virtual(self): + tempdir = tempfile.mkdtemp(prefix='devtoolqa') + # Try devtool extract + self.track_for_cleanup(tempdir) + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + result = runCmd('devtool extract virtual/libx11 %s' % tempdir) + self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found') + self._check_src_repo(tempdir) + @testcase(1168) def test_devtool_reset_all(self): tempdir = tempfile.mkdtemp(prefix='devtoolqa')
scripts/lib/devtool/standard.py +18 -6
@@ -45,6 +45,10 @@ def add(args, config, basepath, workspace): if reason: raise DevtoolError(reason) + # FIXME this ought to be in validate_pn but we're using that in other contexts + if '/' in args.recipename: + raise DevtoolError('"/" is not a valid character in recipe names') + srctree = os.path.abspath(args.srctree) if os.path.exists(srctree): if args.fetch:
@@ -514,6 +518,14 @@ def modify(args, config, basepath, workspace): rd = parse_recipe(config, tinfoil, args.recipename, True) if not rd: return 1 + + pn = rd.getVar('PN', True) + if pn != args.recipename: + logger.info('Mapping %s to %s' % (args.recipename, pn)) + if pn in workspace: + raise DevtoolError("recipe %s is already in your workspace" % + pn) + recipefile = rd.getVar('FILE', True) appendname = os.path.splitext(os.path.basename(recipefile))[0] if args.wildcard:
@@ -524,9 +536,9 @@ def modify(args, config, basepath, workspace): raise DevtoolError("Another variant of recipe %s is already in your " "workspace (only one variant of a recipe can " "currently be worked on at once)" - % args.recipename) + % pn) - _check_compatible_recipe(args.recipename, rd) + _check_compatible_recipe(pn, rd) initial_rev = None commits = []
@@ -574,11 +586,11 @@ def modify(args, config, basepath, workspace): f.write('\ninherit externalsrc\n') f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n') - f.write('EXTERNALSRC_pn-%s = "%s"\n' % (args.recipename, srctree)) + f.write('EXTERNALSRC_pn-%s = "%s"\n' % (pn, srctree)) b_is_s = use_external_build(args.same_dir, args.no_same_dir, rd) if b_is_s: - f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (args.recipename, srctree)) + f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (pn, srctree)) if bb.data.inherits_class('kernel', rd): f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout do_fetch do_unpack"\n')
@@ -587,9 +599,9 @@ def modify(args, config, basepath, workspace): for commit in commits: f.write('# commit: %s\n' % commit) - _add_md5(config, args.recipename, appendfile) + _add_md5(config, pn, appendfile) - logger.info('Recipe %s now set up to build from %s' % (args.recipename, srctree)) + logger.info('Recipe %s now set up to build from %s' % (pn, srctree)) return 0
scripts/lib/devtool/upgrade.py +9 -3
@@ -300,7 +300,13 @@ def upgrade(args, config, basepath, workspace): if not rd: return 1 - standard._check_compatible_recipe(args.recipename, rd) + pn = rd.getVar('PN', True) + if pn != args.recipename: + logger.info('Mapping %s to %s' % (args.recipename, pn)) + if pn in workspace: + raise DevtoolError("recipe %s is already in your workspace" % pn) + + standard._check_compatible_recipe(pn, rd) if rd.getVar('PV', True) == args.version and rd.getVar('SRCREV', True) == args.srcrev: raise DevtoolError("Current and upgrade versions are the same version" % version)
@@ -315,11 +321,11 @@ def upgrade(args, config, basepath, workspace): _upgrade_error(e, rf, args.srctree) except DevtoolError as e: _upgrade_error(e, rf, args.srctree) - standard._add_md5(config, args.recipename, os.path.dirname(rf)) + standard._add_md5(config, pn, os.path.dirname(rf)) af = _write_append(rf, args.srctree, args.same_dir, args.no_same_dir, rev2, config.workspace_path, rd) - standard._add_md5(config, args.recipename, af) + standard._add_md5(config, pn, af) logger.info('Upgraded source extracted to %s' % args.srctree) return 0
Signature · 1 line
2.1.4
PATCH v3 24/52 populate SDK: prepare calling of bb.utils for exceptions
In reply to Joshua LockFrom: Benjamin Esquivel <[email protected]>
bb.utils.remove, bb.utils.movefile and bb.utils.mkdirhier can throw exceptions that need handling and proper error messages more work is required for these methods to handle properly the exceptions that can be raised within the various OS calls they make but this is a start to at least not hide the errors in the requested operations
[YOCTO#8213]
--- meta/lib/oe/sdk.py | 76 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 24 deletions(-)
meta/lib/oe/sdk.py +52 -24
@@ -5,6 +5,7 @@ from oe.package_manager import * import os import shutil import glob +import traceback class Sdk(object):
@@ -25,7 +26,7 @@ class Sdk(object): else: self.manifest_dir = manifest_dir - bb.utils.remove(self.sdk_output, True) + self.remove(self.sdk_output, True) self.install_order = Manifest.INSTALL_ORDER
@@ -34,29 +35,56 @@ class Sdk(object): pass def populate(self): - bb.utils.mkdirhier(self.sdk_output) + self.mkdirhier(self.sdk_output) # call backend dependent implementation self._populate() # Don't ship any libGL in the SDK - bb.utils.remove(os.path.join(self.sdk_output, self.sdk_native_path, - self.d.getVar('libdir_nativesdk', True).strip('/'), - "libGL*")) + self.remove(os.path.join(self.sdk_output, self.sdk_native_path, + self.d.getVar('libdir_nativesdk', True).strip('/'), + "libGL*")) # Fix or remove broken .la files - bb.utils.remove(os.path.join(self.sdk_output, self.sdk_native_path, - self.d.getVar('libdir_nativesdk', True).strip('/'), - "*.la")) + self.remove(os.path.join(self.sdk_output, self.sdk_native_path, + self.d.getVar('libdir_nativesdk', True).strip('/'), + "*.la")) # Link the ld.so.cache file into the hosts filesystem link_name = os.path.join(self.sdk_output, self.sdk_native_path, self.sysconfdir, "ld.so.cache") - bb.utils.mkdirhier(os.path.dirname(link_name)) + self.mkdirhier(os.path.dirname(link_name)) os.symlink("/etc/ld.so.cache", link_name) execute_pre_post_process(self.d, self.d.getVar('SDK_POSTPROCESS_COMMAND', True)) + def movefile(self, sourcefile, destdir): + try: + # FIXME: this check of movefile's return code to None should be + # fixed within the function to use only exceptions to signal when + # something goes wrong + if (bb.utils.movefile(sourcefile, destdir) == None): + raise OSError("moving %s to %s failed" + %(sourcefile, destdir)) + #FIXME: using umbrella exc catching because bb.utils method raises it + except Exception as e: + bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc()) + bb.error("unable to place %s in final SDK location" % sourcefile) + + def mkdirhier(self, dirpath): + try: + bb.utils.mkdirhier(dirpath) + except OSError as e: + bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc()) + bb.fatal("cannot make dir for SDK: %s" % dirpath) + + def remove(self, path, recurse=False): + try: + bb.utils.remove(path, recurse) + #FIXME: using umbrella exc catching because bb.utils method raises it + except Exception as e: + bb.debug(1, "printing the stack trace\n %s" %traceback.format_exc()) + bb.warn("cannot remove SDK dir: %s" % path) class RpmSdk(Sdk): def __init__(self, d, manifest_dir=None):
@@ -143,15 +171,15 @@ class RpmSdk(Sdk): "lib", "rpm" ) - bb.utils.mkdirhier(native_rpm_state_dir) + self.mkdirhier(native_rpm_state_dir) for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "rpm", "*")): - bb.utils.movefile(f, native_rpm_state_dir) + self.movefile(f, native_rpm_state_dir) - bb.utils.remove(os.path.join(self.sdk_output, "var"), True) + self.remove(os.path.join(self.sdk_output, "var"), True) # Move host sysconfig data native_sysconf_dir = os.path.join(self.sdk_output,
@@ -159,10 +187,10 @@ class RpmSdk(Sdk): self.d.getVar('sysconfdir', True).strip('/'), ) - bb.utils.mkdirhier(native_sysconf_dir) + self.mkdirhier(native_sysconf_dir) for f in glob.glob(os.path.join(self.sdk_output, "etc", "*")): - bb.utils.movefile(f, native_sysconf_dir) - bb.utils.remove(os.path.join(self.sdk_output, "etc"), True) + self.movefile(f, native_sysconf_dir) + self.remove(os.path.join(self.sdk_output, "etc"), True) class OpkgSdk(Sdk):
@@ -219,12 +247,12 @@ class OpkgSdk(Sdk): target_sysconfdir = os.path.join(self.sdk_target_sysroot, self.sysconfdir) host_sysconfdir = os.path.join(self.sdk_host_sysroot, self.sysconfdir) - bb.utils.mkdirhier(target_sysconfdir) + self.mkdirhier(target_sysconfdir) shutil.copy(self.target_conf, target_sysconfdir) os.chmod(os.path.join(target_sysconfdir, os.path.basename(self.target_conf)), 0644) - bb.utils.mkdirhier(host_sysconfdir) + self.mkdirhier(host_sysconfdir) shutil.copy(self.host_conf, host_sysconfdir) os.chmod(os.path.join(host_sysconfdir, os.path.basename(self.host_conf)), 0644)
@@ -232,11 +260,11 @@ class OpkgSdk(Sdk): native_opkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path, self.d.getVar('localstatedir_nativesdk', True).strip('/'), "lib", "opkg") - bb.utils.mkdirhier(native_opkg_state_dir) + self.mkdirhier(native_opkg_state_dir) for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "opkg", "*")): - bb.utils.movefile(f, native_opkg_state_dir) + self.movefile(f, native_opkg_state_dir) - bb.utils.remove(os.path.join(self.sdk_output, "var"), True) + self.remove(os.path.join(self.sdk_output, "var"), True) class DpkgSdk(Sdk):
@@ -264,7 +292,7 @@ class DpkgSdk(Sdk): def _copy_apt_dir_to(self, dst_dir): staging_etcdir_native = self.d.getVar("STAGING_ETCDIR_NATIVE", True) - bb.utils.remove(dst_dir, True) + self.remove(dst_dir, True) shutil.copytree(os.path.join(staging_etcdir_native, "apt"), dst_dir)
@@ -306,11 +334,11 @@ class DpkgSdk(Sdk): native_dpkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path, "var", "lib", "dpkg") - bb.utils.mkdirhier(native_dpkg_state_dir) + self.mkdirhier(native_dpkg_state_dir) for f in glob.glob(os.path.join(self.sdk_output, "var", "lib", "dpkg", "*")): - bb.utils.movefile(f, native_dpkg_state_dir) + self.movefile(f, native_dpkg_state_dir) + self.remove(os.path.join(self.sdk_output, "var"), True) - bb.utils.remove(os.path.join(self.sdk_output, "var"), True) def sdk_list_installed_packages(d, target, format=None, rootfs_dir=None):
Signature · 1 line
2.1.4
PATCH v3 25/52 sanity.bbclass: expand warning when chmod fails
In reply to Joshua LockFrom: Alex Franco <[email protected]>
As suggested, add exception message to warning in
sanity.bbclass when chmod fails on TMPDIR.
[YOCTO #7669]
--- meta/classes/sanity.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/sanity.bbclass +2 -2
@@ -843,8 +843,8 @@ def check_sanity_everybuild(status, d): os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID) os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID) os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX) - except OSError: - bb.warn("Unable to chmod TMPDIR: %s" % tmpdir) + except OSError as exc: + bb.warn("Unable to chmod TMPDIR: %s" % exc) with open(checkfile, "w") as f: f.write(tmpdir)
Signature · 1 line
2.1.4
PATCH v3 26/52 openssh: fix file permission for /etc/pam.d/sshd
In reply to Joshua LockFrom: Chen Qi <[email protected]>
The file permission should be 0644 instead of 0755.
--- meta/recipes-connectivity/openssh/openssh_7.1p1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssh/openssh_7.1p1.bb +1 -1
@@ -87,7 +87,7 @@ do_compile_ptest() { do_install_append () { if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then - install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd + install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd sed -i -e 's:#UsePAM no:UsePAM yes:' ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh/sshd_config fi
Signature · 1 line
2.1.4
PATCH v3 27/52 sudo: fix file permission for /etc/pam.d/sudo
In reply to Joshua LockFrom: Chen Qi <[email protected]>
The file permission should be 0644 instead of 0664.
--- meta/recipes-extended/sudo/sudo_1.8.14p3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/sudo/sudo_1.8.14p3.bb +1 -1
@@ -22,7 +22,7 @@ EXTRA_OECONF += " \ do_install_append () { if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then - install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo + install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo fi chmod 4111 ${D}${bindir}/sudo
Signature · 1 line
2.1.4
PATCH v3 28/52 gcc-5.2: Fix various _FOR_BUILD and related variables
In reply to Joshua LockFrom: Mark Hatle <[email protected]>
When doing a FOR_BUILD thing, you have to override CFLAGS with CFLAGS_FOR_BUILD. And if you use C++, you also have to override CXXFLAGS with CXXFLAGS_FOR_BUILD.
Without this, when building for mingw, you end up trying to use the mingw headers for a host build.
The same goes for other variables as well, such as CPPFLAGS, CPP, and GMPINC.
--- meta/recipes-devtools/gcc/gcc-5.2.inc | 1 + .../gcc/gcc-5.2/0042-cxxflags-for-build.patch | 123 +++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-5.2/0042-cxxflags-for-build.patch
meta/recipes-devtools/gcc/gcc-5.2.inc +1 -0
@@ -73,6 +73,7 @@ SRC_URI = "\ file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ file://0040-nativesdk-gcc-support.patch \ file://0041-handle-target-sysroot-multilib.patch \ + file://0042-cxxflags-for-build.patch \ " BACKPORTS = ""
meta/recipes-devtools/gcc/gcc-5.2/0042-cxxflags-for-build.patch new file +123 -0
123 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v3 29/52 rpm: remove spurious build dependencies
In reply to Joshua LockFrom: Ross Burton <[email protected]>
make, patch and binutils are assumed to exist on the host, so there's no need to have them in DEPENDS and can result in the building of make-native for no good reason.
--- meta/recipes-devtools/rpm/rpm_4.11.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/rpm/rpm_4.11.2.bb +1 -1
@@ -22,7 +22,7 @@ HOMEPAGE = "http://www.rpm.org" LICENSE = "GPL-2.0+" LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils patch attr zlib acl gzip make binutils python" +DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils attr zlib acl gzip python" SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \ file://use-pkgconfig-for-python.patch \
Signature · 1 line
2.1.4
PATCH v3 30/52 i2c-tools: fix inverted RDEPENDS
In reply to Joshua LockFrom: Matt Madison <[email protected]>
The runtime dependency between i2c-tools and i2c-tools-misc was backwards when the packages were split. With this change, including i2c-tools in an image no longer drags in perl.
--- meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb +1 -2
@@ -30,5 +30,4 @@ FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \ ${bindir}/decode-dimms \ ${bindir}/decode-vaio \ " -RDEPENDS_${PN} += "${PN}-misc" -RDEPENDS_${PN}-misc += "perl" +RDEPENDS_${PN}-misc = "${PN} perl"
Signature · 1 line
2.1.4
PATCH v3 31/52 qemu: disable Valgrind
In reply to Joshua LockFrom: Ross Burton <[email protected]>
Qemu has an automatic dependency on valgrind which cannot be disabled, which causes non-deterministic builds and build failures. As Valgrind wasn't enabled previously make this deterministic by forcibly disabling it.
--- meta/recipes-devtools/qemu/qemu/no-valgrind.patch | 19 +++++++++++++++++++ meta/recipes-devtools/qemu/qemu_2.4.0.bb | 1 + 2 files changed, 20 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/no-valgrind.patch
meta/recipes-devtools/qemu/qemu/no-valgrind.patch new file +19 -0
@@ -0,0 +1,19 @@ +There isn't an option to enable or disable valgrind support, so disable it to avoid non-deterministic builds. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <[email protected]> + +diff --git a/configure b/configure +index b3c4f51..4d3929e 100755 +--- a/configure ++++ b/configure +@@ -4193,9 +4192,0 @@ valgrind_h=no +-cat > $TMPC << EOF +-#include <valgrind/valgrind.h> +-int main(void) { +- return 0; +-} +-EOF +-if compile_prog "" "" ; then +- valgrind_h=yes +-fi
meta/recipes-devtools/qemu/qemu_2.4.0.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \ file://smc91c111_fix1.patch \ file://smc91c111_fix2.patch \ file://smc91c111_fix3.patch \ + file://no-valgrind.patch \ " SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2" SRC_URI[md5sum] = "186ee8194140a484a455f8e3c74589f4"
Signature · 1 line
2.1.4
PATCH v3 32/52 useradd_base.bbclass: Do not warn without a reason
In reply to Joshua LockFrom: Peter Kjellerstedt <[email protected]>
In c0da4270c76375a7a8cbcc09319fe4570ebbc5bd two bbwarn were changed to bbnote for the case where an added user or group already exists. The same should have been done for groupmems, groupdel and userdel as well since the warnings that are currently generated are superflouous.
The two remaining similar bbwarn for groupmod and usermod are left as is since there they actually make sense.
--- meta/classes/useradd_base.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/classes/useradd_base.bbclass +3 -3
@@ -104,7 +104,7 @@ perform_groupmems () { sleep $count done else - bbwarn "${PN}: group $groupname already contains $username, not re-adding it" + bbnote "${PN}: group $groupname already contains $username, not re-adding it" fi if test "x$gshadow" = "xno"; then rm -f $rootdir${sysconfdir}/gshadow
@@ -136,7 +136,7 @@ perform_groupdel () { sleep $count done else - bbwarn "${PN}: group $groupname doesn't exist, not removing it" + bbnote "${PN}: group $groupname doesn't exist, not removing it" fi }
@@ -164,7 +164,7 @@ perform_userdel () { sleep $count done else - bbwarn "${PN}: user $username doesn't exist, not removing it" + bbnote "${PN}: user $username doesn't exist, not removing it" fi }
Signature · 1 line
2.1.4
PATCH v3 33/52 oeqa/selftest/manifest.py: Test support for manifests
In reply to Joshua LockFrom: Benjamin Esquivel <[email protected]>
adding support for tests to verify that manifest contents contain entries that exist in an specified pkgdata dir
tests added:
- manifest.VerifyManifest.test_image_manifest_entries
- manifest.VerifyManifest.test_SDK_manifest_entries
test support written for future tests:
-adding a setUpClass that supports other manifest tests -a get dir from bb var function that verifies if the dir exists -a ManifestEntry class defined with missing items list -check for the paths and fail gracefully if not there -debug prints for failure analysis
[YOCTO#8028]
--- meta/lib/oeqa/selftest/manifest.py | 163 +++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 meta/lib/oeqa/selftest/manifest.py
meta/lib/oeqa/selftest/manifest.py new file +163 -0
@@ -0,0 +1,163 @@ +import unittest +import os + +from oeqa.selftest.base import oeSelfTest +from oeqa.utils.commands import get_bb_var, bitbake +from oeqa.utils.decorators import testcase + +class ManifestEntry: + '''A manifest item of a collection able to list missing packages''' + def __init__(self, entry): + self.file = entry + self.missing = [] + +class VerifyManifest(oeSelfTest): + '''Tests for the manifest files and contents of an image''' + + @classmethod + def check_manifest_entries(self, manifest, path): + manifest_errors = [] + try: + with open(manifest, "r") as mfile: + for line in mfile: + manifest_entry = os.path.join(path, line.split()[0]) + self.log.debug("{}: looking for {}"\ + .format(self.classname, manifest_entry)) + if not os.path.isfile(manifest_entry): + manifest_errors.append(manifest_entry) + self.log.debug("{}: {} not found"\ + .format(self.classname, manifest_entry)) + except OSError as e: + self.log.debug("{}: checking of {} failed"\ + .format(self.classname, manifest)) + raise e + + return manifest_errors + + #this will possibly move from here + @classmethod + def get_dir_from_bb_var(self, bb_var, target = None): + target == self.buildtarget if target == None else target + directory = get_bb_var(bb_var, target); + if not directory or not os.path.isdir(directory): + self.log.debug("{}: {} points to {} when target = {}"\ + .format(self.classname, bb_var, directory, target)) + raise OSError + return directory + + @classmethod + def setUpClass(self): + + self.buildtarget = 'core-image-minimal' + self.classname = 'VerifyManifest' + + self.log.info("{}: doing bitbake {} as a prerequisite of the test"\ + .format(self.classname, self.buildtarget)) + if bitbake(self.buildtarget).status: + self.log.debug("{} Failed to setup {}"\ + .format(self.classname, self.buildtarget)) + unittest.SkipTest("{}: Cannot setup testing scenario"\ + .format(self.classname)) + + def test_SDK_manifest_entries(self): + '''Verifying the SDK manifest entries exist, this may take a build''' + + # the setup should bitbake core-image-minimal and here it is required + # to do an additional setup for the sdk + sdktask = '-c populate_sdk' + bbargs = sdktask + ' ' + self.buildtarget + self.log.debug("{}: doing bitbake {} as a prerequisite of the test"\ + .format(self.classname, bbargs)) + if bitbake(bbargs).status: + self.log.debug("{} Failed to bitbake {}"\ + .format(self.classname, bbargs)) + unittest.SkipTest("{}: Cannot setup testing scenario"\ + .format(self.classname)) + + + pkgdata_dir = reverse_dir = {} + mfilename = mpath = m_entry = {} + # get manifest location based on target to query about + d_target= dict(target = self.buildtarget, + host = 'nativesdk-packagegroup-sdk-host') + try: + mdir = self.get_dir_from_bb_var('SDK_DEPLOY', self.buildtarget) + for k in d_target.keys(): + mfilename[k] = "{}-toolchain-{}.{}.manifest".format( + get_bb_var("SDK_NAME", self.buildtarget), + get_bb_var("SDK_VERSION", self.buildtarget), + k) + mpath[k] = os.path.join(mdir, mfilename[k]) + if not os.path.isfile(mpath[k]): + self.log.debug("{}: {} does not exist".format( + self.classname, mpath[k])) + raise IOError + m_entry[k] = ManifestEntry(mpath[k]) + + pkgdata_dir[k] = self.get_dir_from_bb_var('PKGDATA_DIR', + d_target[k]) + reverse_dir[k] = os.path.join(pkgdata_dir[k], + 'runtime-reverse') + if not os.path.exists(reverse_dir[k]): + self.log.debug("{}: {} does not exist".format( + self.classname, reverse_dir[k])) + raise IOError + except OSError: + raise unittest.SkipTest("{}: Error in obtaining manifest dirs"\ + .format(self.classname)) + except IOError: + msg = "{}: Error cannot find manifests in the specified dir:\n{}"\ + .format(self.classname, mdir) + self.fail(msg) + + for k in d_target.keys(): + self.log.debug("{}: Check manifest {}".format( + self.classname, m_entry[k].file)) + + m_entry[k].missing = self.check_manifest_entries(\ + m_entry[k].file,reverse_dir[k]) + if m_entry[k].missing: + msg = '{}: {} Error has the following missing entries'\ + .format(self.classname, m_entry[k].file) + logmsg = msg+':\n'+'\n'.join(m_entry[k].missing) + self.log.debug(logmsg) + self.log.info(msg) + self.fail(logmsg) + + def test_image_manifest_entries(self): + '''Verifying the image manifest entries exist''' + + # get manifest location based on target to query about + try: + mdir = self.get_dir_from_bb_var('DEPLOY_DIR_IMAGE', + self.buildtarget) + mfilename = get_bb_var("IMAGE_LINK_NAME", self.buildtarget)\ + + ".manifest" + mpath = os.path.join(mdir, mfilename) + if not os.path.isfile(mpath): raise IOError + m_entry = ManifestEntry(mpath) + + pkgdata_dir = {} + pkgdata_dir = self.get_dir_from_bb_var('PKGDATA_DIR', + self.buildtarget) + revdir = os.path.join(pkgdata_dir, 'runtime-reverse') + if not os.path.exists(revdir): raise IOError + except OSError: + raise unittest.SkipTest("{}: Error in obtaining manifest dirs"\ + .format(self.classname)) + except IOError: + msg = "{}: Error cannot find manifests in dir:\n{}"\ + .format(self.classname, mdir) + self.fail(msg) + + self.log.debug("{}: Check manifest {}"\ + .format(self.classname, m_entry.file)) + m_entry.missing = self.check_manifest_entries(\ + m_entry.file, revdir) + if m_entry.missing: + msg = '{}: {} Error has the following missing entries'\ + .format(self.classname, m_entry.file) + logmsg = msg+':\n'+'\n'.join(m_entry.missing) + self.log.debug(logmsg) + self.log.info(msg) + self.fail(logmsg)
Signature · 1 line
2.1.4
PATCH v3 34/52 oeqa/utils/ftools: Ignore the exception if file does not exist
In reply to Joshua LockFrom: Leonardo Sandoval <[email protected]>
There may be cases where the configuration file (path) does not exist, thus the remove_from_file should catch this exception. In case the exception is not the latter (errno.ENOENT), then re-raise it.
[YOCTO #8540]
--- meta/lib/oeqa/utils/ftools.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
meta/lib/oeqa/utils/ftools.py +10 -1
@@ -1,5 +1,6 @@ import os import re +import errno def write_file(path, data): wdata = data.rstrip() + "\n"
@@ -18,7 +19,15 @@ def read_file(path): return data def remove_from_file(path, data): - lines = read_file(path).splitlines() + try: + rdata = read_file(path) + except IOError as e: + # if file does not exit, just quit, otherwise raise an exception + if e.errno == errno.ENOENT: + return + else: + raise + lines = rdata.splitlines() rmdata = data.strip().splitlines() for l in rmdata: for c in range(0, lines.count(l)):
Signature · 1 line
2.1.4
PATCH v3 35/52 oeqa/utils/ftools: From functions that expect data, check if None
In reply to Joshua LockFrom: Leonardo Sandoval <[email protected]>
ftools functions that expect data may get 'None'; this patch does this check and return immediately if this is the case.
--- meta/lib/oeqa/utils/ftools.py | 9 +++++++++ 1 file changed, 9 insertions(+)
meta/lib/oeqa/utils/ftools.py +9 -0
@@ -3,11 +3,17 @@ import re import errno def write_file(path, data): + # In case data is None, return immediately + if data is None: + return wdata = data.rstrip() + "\n" with open(path, "w") as f: f.write(wdata) def append_file(path, data): + # In case data is None, return immediately + if data is None: + return wdata = data.rstrip() + "\n" with open(path, "a") as f: f.write(wdata)
@@ -19,6 +25,9 @@ def read_file(path): return data def remove_from_file(path, data): + # In case data is None, return immediately + if data is None: + return try: rdata = read_file(path) except IOError as e:
Signature · 1 line
2.1.4
PATCH v3 36/52 oeqa/selftest/bbtests: clean up local DL_DIR/SSTATE_DIR safely
In reply to Joshua LockFrom: Ross Burton <[email protected]>
Now that the selftests clean selftest.inc in the tearDown using bitbake in a function passed to addCleanup (which happens after teardown) will use the default configuration and not the customised one.
As the intention was to clean away the temporary DL_DIR and SSTATE_DIR, simple use track_for_cleanup to delete the entire directory instead.
--- meta/lib/oeqa/selftest/bbtests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/bbtests.py +5 -1
@@ -101,6 +101,8 @@ class BitbakeTests(oeSelfTest): self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\" SSTATE_DIR = \"${TOPDIR}/download-selftest\" """) + self.track_for_cleanup(os.path.join(self.builddir, "download-selftest")) + bitbake('-ccleanall man') result = bitbake('-c fetch man', ignore_status=True) bitbake('-ccleanall man')
@@ -116,12 +118,13 @@ doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\" SSTATE_DIR = \"${TOPDIR}/download-selftest\" """) + self.track_for_cleanup(os.path.join(self.builddir, "download-selftest")) + data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"' self.write_recipeinc('aspell', data) bitbake('-ccleanall aspell') result = bitbake('-c fetch aspell', ignore_status=True) self.delete_recipeinc('aspell') - self.addCleanup(bitbake, '-ccleanall aspell') self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % result.output) self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz')), msg = "File rename failed. No corresponding test-aspell.tar.gz file found under %s" % str(get_bb_var("DL_DIR"))) self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 'test-aspell.tar.gz.done')), "File rename failed. No corresponding test-aspell.tar.gz.done file found under %s" % str(get_bb_var("DL_DIR")))
@@ -181,6 +184,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\" SSTATE_DIR = \"${TOPDIR}/download-selftest\" """) + self.track_for_cleanup(os.path.join(self.builddir, "download-selftest")) self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" ) runCmd('bitbake -c cleanall man xcursor-transparent-theme') result = runCmd('bitbake man xcursor-transparent-theme -k', ignore_status=True)
Signature · 1 line
2.1.4
PATCH v3 37/52 oeqa/selftest/bbtests: Updated bitbake TCs
In reply to Joshua LockFrom: Daniel Istrate <[email protected]>
- Added new TC test_force_task_1 (1354);
check that do_package_write_rpm() re-executes
upon changes in package image.
- Updated TC test_force_task_2 (163);
changed test recipe to zlib and addeddo_package() to the task execution list.
- Removed unnecessary imports.
Fix for bug [YOCTO #5875].
--- meta/lib/oeqa/selftest/bbtests.py | 45 ++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-)
meta/lib/oeqa/selftest/bbtests.py +35 -10
@@ -1,8 +1,5 @@ -import unittest import os -import logging import re -import shutil import oeqa.utils.ftools as ftools from oeqa.selftest.base import oeSelfTest
@@ -68,15 +65,43 @@ class BitbakeTests(oeSelfTest): bitbake('-cclean man') self.assertTrue("ERROR: Function failed: patch_do_patch" in result.output, msg = "Though no man-1.5h1-make.patch file exists, bitbake didn't output any err. message. bitbake output: %s" % result.output) + @testcase(1354) + def test_force_task_1(self): + # test 1 from bug 5875 + test_recipe = 'zlib' + test_data = "Microsoft Made No Profit From Anyone's Zunes Yo" + image_dir = get_bb_var('D', test_recipe) + pkgsplit_dir = get_bb_var('PKGDEST', test_recipe) + man_dir = get_bb_var('mandir', test_recipe) + + bitbake('-c cleansstate %s' % test_recipe) + bitbake(test_recipe) + self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe) + + man_file = os.path.join(image_dir + man_dir, 'man3/zlib.3') + ftools.append_file(man_file, test_data) + bitbake('-c package -f %s' % test_recipe) + + man_split_file = os.path.join(pkgsplit_dir, 'zlib-doc' + man_dir, 'man3/zlib.3') + man_split_content = ftools.read_file(man_split_file) + self.assertIn(test_data, man_split_content, 'The man file has not changed in packages-split.') + + ret = bitbake(test_recipe) + self.assertIn('task do_package_write_rpm:', ret.output, 'Task do_package_write_rpm did not re-executed.') + @testcase(163) - def test_force_task(self): - bitbake('m4-native') - self.add_command_to_tearDown('bitbake -c clean m4-native') - result = bitbake('-C compile m4-native') - look_for_tasks = ['do_compile', 'do_install', 'do_populate_sysroot'] + def test_force_task_2(self): + # test 2 from bug 5875 + test_recipe = 'zlib' + + bitbake('-c cleansstate %s' % test_recipe) + bitbake(test_recipe) + self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe) + + result = bitbake('-C compile %s' % test_recipe) + look_for_tasks = ['do_compile:', 'do_install:', 'do_populate_sysroot:', 'do_package:'] for task in look_for_tasks: - find_task = re.search("m4-native.*%s" % task, result.output) - self.assertTrue(find_task, msg = "Couldn't find %s task. bitbake output %s" % (task, result.output)) + self.assertIn(task, result.output, msg="Couldn't find %s task.") @testcase(167) def test_bitbake_g(self):
Signature · 1 line
2.1.4
PATCH v3 38/52 oeqa/selftest/buildoptions: Use the correct script for cleaning the workdir
In reply to Joshua LockFrom: Leonardo Sandoval <[email protected]>
The script 'cleanupworkdir' does not exit, so changing it to 'cleanup-workdir'.
--- meta/lib/oeqa/selftest/buildoptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/buildoptions.py +2 -2
@@ -125,7 +125,7 @@ class BuildImagesTest(oeSelfTest): This method is used to test the build of directfb image for arm arch. In essence we build a coreimagedirectfb and test the exitcode of bitbake that in case of success is 0. """ - self.add_command_to_tearDown('cleanupworkdir') + self.add_command_to_tearDown('cleanup-workdir') self.write_config("DISTRO_FEATURES_remove = \"x11\"\nDISTRO_FEATURES_append = \" directfb\"\nMACHINE ??= \"qemuarm\"") res = bitbake("core-image-directfb", ignore_status=True) self.assertEqual(res.status, 0, "\ncoreimagedirectfb failed to build. Please check logs for further details.\nbitbake output %s" % res.output)
@@ -136,7 +136,7 @@ class ArchiverTest(oeSelfTest): """ Test for archiving the work directory and exporting the source files. """ - self.add_command_to_tearDown('cleanupworkdir') + self.add_command_to_tearDown('cleanup-workdir') self.write_config("INHERIT = \"archiver\"\nARCHIVER_MODE[src] = \"original\"\nARCHIVER_MODE[srpm] = \"1\"") res = bitbake("xcursor-transparent-theme", ignore_status=True) self.assertEqual(res.status, 0, "\nCouldn't build xcursortransparenttheme.\nbitbake output %s" % res.output)
Signature · 1 line
2.1.4
PATCH v3 39/52 oeqa/selftest: verify that devtool can use plugins in other layers
In reply to Joshua LockFrom: Ross Burton <[email protected]>
In selftest we want to exercise devtool's ability to use plugins from other layers, so add a basic command to reverse a string to meta-selftest and a test in oe-selftest to call it.
--- meta-selftest/lib/devtool/__init__.py | 0 meta-selftest/lib/devtool/test.py | 11 +++++++++++ meta/lib/oeqa/selftest/devtool.py | 12 ++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 meta-selftest/lib/devtool/__init__.py create mode 100644 meta-selftest/lib/devtool/test.py
meta-selftest/lib/devtool/__init__.py new file +0 -0
meta-selftest/lib/devtool/test.py new file +11 -0
@@ -0,0 +1,11 @@ +import argparse + +def selftest_reverse(args, config, basepath, workspace): + """Reverse the value passed to verify the plugin is executing.""" + print args.value[::-1] + +def register_commands(subparsers, context): + parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser_build.add_argument('value', help='Value to reverse') + parser_build.set_defaults(func=selftest_reverse)
meta/lib/oeqa/selftest/devtool.py +12 -0
@@ -1015,3 +1015,15 @@ class DevtoolTests(DevtoolBase): self.track_for_cleanup(tempdir) self.track_for_cleanup(self.workspacedir) self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + + def test_devtool_layer_plugins(self): + """Test that devtool can use plugins from other layers. + + This test executes the selftest-reverse command from meta-selftest.""" + + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + + s = "Microsoft Made No Profit From Anyone's Zunes Yo" + result = runCmd("devtool --quiet selftest-reverse \"%s\"" % s) + self.assertEqual(result.output, s[::-1])
Signature · 1 line
2.1.4
PATCH v3 40/52 oeqa/selftest/wic: corrected testcase decorator for test18_iso_image
In reply to Joshua LockFrom: Daniel Istrate <[email protected]>
Changed testcase decorator for TC test18_iso_image from 1264 to 1346.
--- meta/lib/oeqa/selftest/wic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/wic.py +1 -1
@@ -190,7 +190,7 @@ class Wic(oeSelfTest): self.assertEqual(1, len(glob(self.resultdir + \ "%(wks)s-*.direct" % vars))) - @testcase(1264) + @testcase(1346) def test18_iso_image(self): """Test creation of hybrid iso image with legacy and EFI boot""" self.assertEqual(0, runCmd("wic create mkhybridiso "
Signature · 1 line
2.1.4
PATCH v3 41/52 oeqa/selftest/wic: fix cleaning
In reply to Joshua LockFrom: Ross Burton <[email protected]>
In some situations the native tools built in setUpClass() are wiped from the sysroot by the time the tests are executed, likely due to the cleanup performed in the base setUp() method.
Avoid this by doing all of the preparatory building in setUpLocal.
--- meta/lib/oeqa/selftest/wic.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
meta/lib/oeqa/selftest/wic.py +8 -11
@@ -38,22 +38,19 @@ class Wic(oeSelfTest): """Wic test class.""" resultdir = "/var/tmp/wic/build/" - - @classmethod - def setUpClass(cls): - """Build wic runtime dependencies.""" - bitbake('syslinux syslinux-native parted-native gptfdisk-native ' - 'dosfstools-native mtools-native') - Wic.image_is_ready = False + image_is_ready = False def setUpLocal(self): """This code is executed before each test method.""" - features = 'IMAGE_FSTYPES += " hddimg"\nMACHINE_FEATURES_append = " efi"\n' - self.append_config(features) + self.write_config('IMAGE_FSTYPES += " hddimg"\nMACHINE_FEATURES_append = " efi"\n') + + # Do this here instead of in setUpClass as the base setUp does some + # clean up which can result in the native tools built earlier in + # setUpClass being unavailable. if not Wic.image_is_ready: - # build core-image-minimal with required features + bitbake('syslinux syslinux-native parted-native gptfdisk-native ' + 'dosfstools-native mtools-native') bitbake('core-image-minimal') - # set this class variable to avoid buiding image many times Wic.image_is_ready = True rmtree(self.resultdir, ignore_errors=True)
Signature · 1 line
2.1.4
PATCH v3 42/52 oeqa/selftest: clean up selftest.inc in teardown
In reply to Joshua LockFrom: Ross Burton <[email protected]>
Test cases may want to do call bitbake in setUpClass() but at that point the previous selftest.inc is still present which could change the build configuration and result in any built artifacts being removed in the next bitbake invocation as part of the sysroot clean up.
Resolve this by cleaning selftest.inc in the tearDown, the clean in setUp should be considered a safety net.
--- meta/lib/oeqa/selftest/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/base.py +1 -1
@@ -31,7 +31,7 @@ class oeSelfTest(unittest.TestCase): self.testinc_bblayers_path = os.path.join(self.builddir, "conf/bblayers.inc") self.testlayer_path = oeSelfTest.testlayer_path self._extra_tear_down_commands = [] - self._track_for_cleanup = [] + self._track_for_cleanup = [self.testinc_path] super(oeSelfTest, self).__init__(methodName) def setUp(self):
Signature · 1 line
2.1.4
PATCH v3 43/52 oeqa/selftest/wic: remove numbers from test names
In reply to Joshua LockFrom: Ross Burton <[email protected]>
There isn't any required ordering of tests, and the numbers meant that the tests didn't appear in oe-selftest --list-classes.
--- meta/lib/oeqa/selftest/wic.py | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-)
meta/lib/oeqa/selftest/wic.py +23 -23
@@ -56,29 +56,29 @@ class Wic(oeSelfTest): rmtree(self.resultdir, ignore_errors=True) @testcase(1208) - def test01_help(self): + def test_help(self): """Test wic --help""" self.assertEqual(0, runCmd('wic --help').status) @testcase(1209) - def test02_createhelp(self): + def test_createhelp(self): """Test wic create --help""" self.assertEqual(0, runCmd('wic create --help').status) @testcase(1210) - def test03_listhelp(self): + def test_listhelp(self): """Test wic list --help""" self.assertEqual(0, runCmd('wic list --help').status) @testcase(1211) - def test04_build_image_name(self): + def test_build_image_name(self): """Test wic create directdisk --image-name core-image-minimal""" self.assertEqual(0, runCmd("wic create directdisk " "--image-name core-image-minimal").status) self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) @testcase(1212) - def test05_build_artifacts(self): + def test_build_artifacts(self): """Test wic create directdisk providing all artifacts.""" vars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \ for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
@@ -92,40 +92,40 @@ class Wic(oeSelfTest): self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) @testcase(1157) - def test06_gpt_image(self): + def test_gpt_image(self): """Test creation of core-image-minimal with gpt table and UUID boot""" self.assertEqual(0, runCmd("wic create directdisk-gpt " "--image-name core-image-minimal").status) self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) @testcase(1213) - def test07_unsupported_subcommand(self): + def test_unsupported_subcommand(self): """Test unsupported subcommand""" self.assertEqual(1, runCmd('wic unsupported', ignore_status=True).status) @testcase(1214) - def test08_no_command(self): + def test_no_command(self): """Test wic without command""" self.assertEqual(1, runCmd('wic', ignore_status=True).status) @testcase(1215) - def test09_help_overview(self): + def test_help_overview(self): """Test wic help overview""" self.assertEqual(0, runCmd('wic help overview').status) @testcase(1216) - def test10_help_plugins(self): + def test_help_plugins(self): """Test wic help plugins""" self.assertEqual(0, runCmd('wic help plugins').status) @testcase(1217) - def test11_help_kickstart(self): + def test_help_kickstart(self): """Test wic help kickstart""" self.assertEqual(0, runCmd('wic help kickstart').status) @testcase(1264) - def test12_compress_gzip(self): + def test_compress_gzip(self): """Test compressing an image with gzip""" self.assertEqual(0, runCmd("wic create directdisk " "--image-name core-image-minimal "
@@ -134,7 +134,7 @@ class Wic(oeSelfTest): "directdisk-*.direct.gz"))) @testcase(1265) - def test13_compress_bzip2(self): + def test_compress_bzip2(self): """Test compressing an image with bzip2""" self.assertEqual(0, runCmd("wic create directdisk " "--image-name core-image-minimal "
@@ -143,7 +143,7 @@ class Wic(oeSelfTest): "directdisk-*.direct.bz2"))) @testcase(1266) - def test14_compress_xz(self): + def test_compress_xz(self): """Test compressing an image with xz""" self.assertEqual(0, runCmd("wic create directdisk " "--image-name core-image-minimal "
@@ -152,14 +152,14 @@ class Wic(oeSelfTest): "directdisk-*.direct.xz"))) @testcase(1267) - def test15_wrong_compressor(self): + def test_wrong_compressor(self): """Test how wic breaks if wrong compressor is provided""" self.assertEqual(2, runCmd("wic create directdisk " "--image-name core-image-minimal " "-c wrong", ignore_status=True).status) @testcase(1268) - def test16_rootfs_indirect_recipes(self): + def test_rootfs_indirect_recipes(self): """Test usage of rootfs plugin with rootfs recipes""" wks = "directdisk-multi-rootfs" self.assertEqual(0, runCmd("wic create %s "
@@ -170,7 +170,7 @@ class Wic(oeSelfTest): self.assertEqual(1, len(glob(self.resultdir + "%s*.direct" % wks))) @testcase(1269) - def test17_rootfs_artifacts(self): + def test_rootfs_artifacts(self): """Test usage of rootfs plugin with rootfs paths""" vars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \ for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
@@ -188,7 +188,7 @@ class Wic(oeSelfTest): "%(wks)s-*.direct" % vars))) @testcase(1346) - def test18_iso_image(self): + def test_iso_image(self): """Test creation of hybrid iso image with legacy and EFI boot""" self.assertEqual(0, runCmd("wic create mkhybridiso " "--image-name core-image-minimal").status)
@@ -196,7 +196,7 @@ class Wic(oeSelfTest): self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.iso"))) @testcase(1347) - def test19_image_env(self): + def test_image_env(self): """Test generation of <image>.env files.""" image = 'core-image-minimal' stdir = get_bb_var('STAGING_DIR_TARGET', image)
@@ -219,7 +219,7 @@ class Wic(oeSelfTest): self.assertTrue(content[var]) @testcase(1351) - def test20_wic_image_type(self): + def test_wic_image_type(self): """Test building wic images by bitbake""" self.assertEqual(0, bitbake('wic-image-minimal').status)
@@ -234,7 +234,7 @@ class Wic(oeSelfTest): self.assertTrue(os.path.isfile(os.path.realpath(path))) @testcase(1348) - def test21_qemux86_directdisk(self): + def test_qemux86_directdisk(self): """Test creation of qemux-86-directdisk image""" image = "qemux86-directdisk" self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
@@ -242,7 +242,7 @@ class Wic(oeSelfTest): self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image))) @testcase(1349) - def test22_mkgummidisk(self): + def test_mkgummidisk(self): """Test creation of mkgummidisk image""" image = "mkgummidisk" self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
@@ -250,7 +250,7 @@ class Wic(oeSelfTest): self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image))) @testcase(1350) - def test23_mkefidisk(self): + def test_mkefidisk(self): """Test creation of mkefidisk image""" image = "mkefidisk" self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
Signature · 1 line
2.1.4
PATCH v3 44/52 oeqa/selftest: improve config writing and cleanup
In reply to Joshua LockFrom: Ross Burton <[email protected]>
The selftest.inc configuration file is deleted in both tearDown() and setUp() so there's no need to use addCleanup() to remove statements from it.
Use write_config instead of append_config if the intention is to start from an empty config file, for clarity.
Finally remove some misleading comments that claim that append_config() writes to local.conf when it doesn't.
--- meta/lib/oeqa/selftest/bbtests.py | 9 +++------ meta/lib/oeqa/selftest/buildoptions.py | 4 ++-- meta/lib/oeqa/selftest/imagefeatures.py | 16 ++++------------ 3 files changed, 9 insertions(+), 20 deletions(-)
meta/lib/oeqa/selftest/bbtests.py +3 -6
@@ -156,8 +156,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" @testcase(1028) def test_environment(self): - self.append_config("TEST_ENV=\"localconf\"") - self.addCleanup(self.remove_config, "TEST_ENV=\"localconf\"") + self.write_config("TEST_ENV=\"localconf\"") result = runCmd('bitbake -e | grep TEST_ENV=') self.assertTrue('localconf' in result.output, msg = "bitbake didn't report any value for TEST_ENV variable. To test, run 'bitbake -e | grep TEST_ENV='")
@@ -184,8 +183,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"") result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=') self.assertTrue('prefile' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration. ") - self.append_config("TEST_PREFILE=\"localconf\"") - self.addCleanup(self.remove_config, "TEST_PREFILE=\"localconf\"") + self.write_config("TEST_PREFILE=\"localconf\"") result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=') self.assertTrue('localconf' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration.")
@@ -194,8 +192,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" postconf = os.path.join(self.builddir, 'conf/postfile.conf') self.track_for_cleanup(postconf) ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"") - self.append_config("TEST_POSTFILE=\"localconf\"") - self.addCleanup(self.remove_config, "TEST_POSTFILE=\"localconf\"") + self.write_config("TEST_POSTFILE=\"localconf\"") result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=') self.assertTrue('postfile' in result.output, "Postconfigure file \"postfile.conf\"was not taken into consideration.")
meta/lib/oeqa/selftest/buildoptions.py +2 -2
@@ -39,7 +39,7 @@ class ImageOptionsTests(oeSelfTest): for image_file in deploydir_files: if imagename in image_file and os.path.islink(os.path.join(deploydir, image_file)): track_original_files.append(os.path.realpath(os.path.join(deploydir, image_file))) - self.append_config("RM_OLD_IMAGE = \"1\"") + self.write_config("RM_OLD_IMAGE = \"1\"") bitbake("-C rootfs core-image-minimal") deploydir_files = os.listdir(deploydir) remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files]
@@ -97,7 +97,7 @@ class SanityOptionsTest(oeSelfTest): @testcase(278) def test_sanity_userspace_dependency(self): - self.append_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"') + self.write_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"') bitbake("-ccleansstate gzip nfs-utils") res = bitbake("gzip nfs-utils") self.assertTrue("WARNING: QA Issue: gzip" in res.output, "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
meta/lib/oeqa/selftest/imagefeatures.py +4 -12
@@ -25,9 +25,7 @@ class ImageFeatures(oeSelfTest): features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh empty-root-password allow-empty-password"\n' features += 'INHERIT += "extrausers"\n' features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user) - - # Append 'features' to local.conf - self.append_config(features) + self.write_config(features) # Build a core-image-minimal bitbake('core-image-minimal')
@@ -53,9 +51,7 @@ class ImageFeatures(oeSelfTest): features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh allow-empty-password"\n' features += 'INHERIT += "extrausers"\n' features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s /bin/sh {};"'.format(self.test_user, self.test_user) - - # Append 'features' to local.conf - self.append_config(features) + self.write_config(features) # Build a core-image-minimal bitbake('core-image-minimal')
@@ -87,9 +83,7 @@ class ImageFeatures(oeSelfTest): features += 'IMAGE_INSTALL_append = " openssh"\n' features += 'EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password package-management"\n' features += 'RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"' - - # Append 'features' to local.conf - self.append_config(features) + self.write_config(features) # Build a core-image-minimal bitbake('core-image-minimal')
@@ -159,9 +153,7 @@ class ImageFeatures(oeSelfTest): features = 'DISTRO_FEATURES_append = " wayland"\n' features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"' - - # Append 'features' to local.conf - self.append_config(features) + self.write_config(features) # Build a core-image-weston bitbake('core-image-weston')
Signature · 1 line
2.1.4
PATCH v3 45/52 archiver.bbclass: Fixes and improves archiver class for kernel and gcc packages
In reply to Joshua LockFrom: Alejandro Hernandez <[email protected]>
gcc packages use a shared source directory, this causes an issue since the archiver will try to patch the same source several times (one for each gcc package), producing an error, the archiver class used stamp-base to check this, nonetheless our gcc packages no longer use stamp-base, they use gcc-shared instead, which is what broke this functionality. This patch adds a check to see whether or not the source should be patched, avoiding patching the source when it shouldn't.
Also, we dont need to create multiple identical tarballs for all gcc packages, this patch fixes this and creates a single source tarball for gcc.
When requesting patched sources, a race condition is created for linux-yocto tasks, unpack_and_patch is executed along with kernel_configme, which most of the time causes errors during configure, since kernel_configme task is specific to the kernel, simply modifying the tasks order by creating a dependency to kernel_configme was impossible, causing errors on all other packages that didnt use kernel_configme, this is fixed by creating a special case for the kernel, adding tasks with correct dependencies, avoiding the race condition and behaving the way it should for all other packages as well.
[YOCTO #8378]
--- meta/classes/archiver.bbclass | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-)
meta/classes/archiver.bbclass +20 -7
@@ -157,7 +157,7 @@ python do_ar_patched() { # Get the ARCHIVER_OUTDIR before we reset the WORKDIR ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) bb.note('Archiving the patched source...') - d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) + d.setVar('WORKDIR', ar_outdir) create_tarball(d, d.getVar('S', True), 'patched', ar_outdir) }
@@ -202,6 +202,10 @@ def create_tarball(d, srcdir, suffix, ar_outdir): """ import tarfile + # Make sure we are only creating a single tarball for gcc sources + if d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True): + return + bb.utils.mkdirhier(ar_outdir) tarname = os.path.join(ar_outdir, '%s-%s.tar.gz' % \ (d.getVar('PF', True), suffix))
@@ -246,11 +250,9 @@ python do_unpack_and_patch() { [ 'patched', 'configured'] and \ d.getVarFlag('ARCHIVER_MODE', 'diff', True) != '1': return - - ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) - # Change the WORKDIR to make do_unpack do_patch run in another dir. - d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) + ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) + d.setVar('WORKDIR', ar_outdir) # The changed 'WORKDIR' also casued 'B' changed, create dir 'B' for the # possibly requiring of the following tasks (such as some recipes's
@@ -270,7 +272,11 @@ python do_unpack_and_patch() { src = d.getVar('S', True).rstrip('/') src_orig = '%s.orig' % src oe.path.copytree(src, src_orig) - bb.build.exec_func('do_patch', d) + + # Make sure gcc sources are patched only once + if not ((d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True))): + bb.build.exec_func('do_patch', d) + # Create the patches if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': bb.note('Creating diff gz...')
@@ -341,7 +347,6 @@ do_deploy_archives[sstate-inputdirs] = "${ARCHIVER_TOPDIR}" do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}" addtask do_ar_original after do_unpack -addtask do_unpack_and_patch after do_patch addtask do_ar_patched after do_unpack_and_patch addtask do_ar_configured after do_unpack_and_patch addtask do_dumpdata
@@ -354,3 +359,11 @@ do_deploy_all_archives[recideptask] = "do_${BB_DEFAULT_TASK}" do_deploy_all_archives() { : } + +python () { + # Add tasks in the correct order, specifically for linux-yocto to avoid race condition + if bb.data.inherits_class('kernel-yocto', d): + bb.build.addtask('do_kernel_configme', 'do_configure', 'do_unpack_and_patch', d) + else: + bb.build.addtask('do_unpack_and_patch', None, 'do_patch', d) +}
Signature · 1 line
2.1.4
PATCH v3 46/52 build-appliance-image: Update to jethro head revision
In reply to Joshua LockFrom: Richard Purdie <[email protected]>
--- meta/recipes-core/images/build-appliance-image_12.0.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/images/build-appliance-image_12.0.1.bb +1 -1
@@ -21,7 +21,7 @@ IMAGE_FSTYPES = "vmdk" inherit core-image -SRCREV ?= "c9bdcf5be7f589ca95ad67d87f71efae41ac7c3e" +SRCREV ?= "7d30d67b26f0d2408540c7bb820e47ce8815d546" SRC_URI = "git://git.yoctoproject.org/poky \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \
Signature · 1 line
2.1.4
PATCH v3 47/52 systemd: add PACKAGECONFIG to build with compatibility libraries
In reply to Joshua LockSystemd < 209 shipped separate pc files for various interfaces, these can still be generated for compatibility with code using the older interfaces.
Add a PACKAGECONFIG option to build systemd with the compatibility pc files.
FIX: systemd-compat
--- meta/recipes-core/systemd/systemd_225.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_225.bb +1 -0
@@ -89,6 +89,7 @@ PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,," PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind" PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode" +PACKAGECONFIG[compat] = "--enable-compat-libs,--disable-compat-libs" CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill" CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
Signature · 1 line
2.1.4
PATCH v3 48/52 weston: add PACKAGECONFIG to build with systemd-login support
In reply to Joshua LockAutomatically enable this support for distributions which have systemd in DISTRO_FEATURES.
We add additional patches to weston, backported from Weston git, to support the newer single libsystemd pkg-config file and to make the enabling of systemd-login support explicit.
--- .../weston/explicit-enable-disable-systemd.patch | 70 ++++++++++++++++++++++ .../wayland/weston/libsystemd.patch | 53 ++++++++++++++++ meta/recipes-graphics/wayland/weston_1.8.0.bb | 5 ++ 3 files changed, 128 insertions(+) create mode 100644 meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch create mode 100644 meta/recipes-graphics/wayland/weston/libsystemd.patch
meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch new file +70 -0
@@ -0,0 +1,70 @@ +From 8e1efcd40b3bad81c83744e2e120d70c2b567ef2 Mon Sep 17 00:00:00 2001 +From: Frederico Cadete <[email protected]> +Date: Mon, 28 Sep 2015 00:30:10 +0200 +Subject: configure.ac: add explicit enable/disable for systemd-login support + +Otherwise, auto-enable depending on whether the system has the necessary +libraries. + +[Updated help text as per pq suggestion -- bwh] + +Reviewed-by: Bryce Harrington <[email protected]> +Reviewed-by: Pekka Paalanen <[email protected]> +Tested-by: Pekka Paalanen <[email protected]> + +Upstream-Status: Backport +Backported from Weston git: +http://cgit.freedesktop.org/wayland/weston/commit/?id=8e1efc + +Signed-off-by: Joshua Lock <[email protected]> + +diff --git a/configure.ac b/configure.ac +index a9cd429..67e80d0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -380,18 +380,30 @@ AC_ARG_ENABLE(resize-optimization, + AS_IF([test "x$enable_resize_optimization" = "xyes"], + [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) + +-PKG_CHECK_MODULES(SYSTEMD_LOGIN, +- [libsystemd >= 209], +- [have_systemd_login_209=yes;have_systemd_login=yes], +- [have_systemd_login_209=no;have_systemd_login=no]) +- +-# Older versions of systemd package systemd-login separately. Fall back on that +-AS_IF([test x$have_systemd_login != xyes],[ +- PKG_CHECK_MODULES(SYSTEMD_LOGIN, +- [libsystemd-login >= 198], +- [have_systemd_login=yes], +- [have_systemd_login=no]) +- ]) ++AC_ARG_ENABLE(systemd-login, ++ AS_HELP_STRING([--enable-systemd-login], ++ [Enable logind support]),, ++ enable_systemd_login=auto) ++if test x$enable_systemd_login != xno; then ++ PKG_CHECK_MODULES(SYSTEMD_LOGIN, ++ [libsystemd >= 209], ++ [have_systemd_login_209=yes;have_systemd_login=yes], ++ [have_systemd_login_209=no;have_systemd_login=no]) ++ ++ # Older versions of systemd package systemd-login separately. Fall back on that ++ AS_IF([test x$have_systemd_login != xyes],[ ++ PKG_CHECK_MODULES(SYSTEMD_LOGIN, ++ [libsystemd-login >= 198], ++ [have_systemd_login=yes], ++ [have_systemd_login=no]) ++ ]) ++else ++ have_systemd_login=no ++fi ++ ++if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then ++ AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209 or libsystemd-login]) ++fi + + AS_IF([test "x$have_systemd_login" = "xyes"], + [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) +-- +cgit v0.10.2 +
meta/recipes-graphics/wayland/weston/libsystemd.patch new file +53 -0
53 lines not on this page · raw message
meta/recipes-graphics/wayland/weston_1.8.0.bb +5 -0
@@ -12,6 +12,8 @@ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://make-libwebp-explicitly-configurable.patch \ file://0001-make-error-portable.patch \ file://parallelmake.patch \ + file://libsystemd.patch \ + file://explicit-enable-disable-systemd.patch \ " SRC_URI[md5sum] = "24cb8a7ed0535b4fc3642643988dab36" SRC_URI[sha256sum] = "8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312"
@@ -39,6 +41,7 @@ EXTRA_OECONF_append_qemux86-64 = "\ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ " # # Compositor choices
@@ -67,6 +70,8 @@ PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" # Weston with unwinding support PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = ",,systemd dbus" do_install_append() { # Weston doesn't need the .la files to load modules, so wipe them
Signature · 1 line
2.1.4
PATCH v3 49/52 systemd: make dbus an optional build time dependency
In reply to Joshua LockThe dbus buildtime dependency is only required in order to build dbus related tests in modern systemd, make this a PACKAGECONFIG option.
This changes the default behaviour to no longer build dbus related tests without explicitly enabling the PACKAGECONFIG.
--- meta/recipes-core/systemd/systemd_225.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_225.bb +2 -1
@@ -18,7 +18,7 @@ PROVIDES = "udev" PE = "1" -DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup qemu-native util-linux" +DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline libcap libcgroup qemu-native util-linux" SECTION = "base/shell"
@@ -90,6 +90,7 @@ PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind" PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode" PACKAGECONFIG[compat] = "--enable-compat-libs,--disable-compat-libs" +PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill" CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
Signature · 1 line
2.1.4
PATCH v3 50/52 weston: add a PACKAGECONFIG option for xwayland support
In reply to Joshua Lock--- meta/recipes-graphics/wayland/weston_1.8.0.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston_1.8.0.bb +2 -1
@@ -24,7 +24,6 @@ DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" DEPENDS += "wayland libinput virtual/egl pango" EXTRA_OECONF = "--enable-setuid-install \ - --disable-xwayland \ --enable-simple-clients \ --enable-clients \ --enable-demo-clients-install \
@@ -72,6 +71,8 @@ PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" # Weston with systemd-login support PACKAGECONFIG[systemd] = ",,systemd dbus" +# Weston with Xwayland support +PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,libxcb libxcursor cairo" do_install_append() { # Weston doesn't need the .la files to load modules, so wipe them
Signature · 1 line
2.1.4
PATCH v3 51/52 xserver-xorg: add Xwayland RRECOMMENDS
In reply to Joshua LockXwayland has the same runtime dependencies as the standard xserver so set RRECOMMENDS the same way.
--- meta/recipes-graphics/xorg-xserver/xserver-xorg.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +3 -1
@@ -72,7 +72,9 @@ PACKAGES =+ "${PN}-security-policy \ SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" INSANE_SKIP_xf86-video-modesetting = "xorg-driver-abi" -RRECOMMENDS_${PN} += "${PN}-security-policy xkeyboard-config rgb xserver-xf86-config xkbcomp" +XSERVER_RRECOMMENDS = "${PN}-security-policy xkeyboard-config rgb xserver-xf86-config xkbcomp" +RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}" +RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}" RDEPENDS_${PN}-xvfb += "xkeyboard-config" RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})"
Signature · 1 line
2.1.4
PATCH v3 52/52 xserver-xorg: drop empty ${PN}-security-policy package
In reply to Joshua LockThe SecurityPolicy hasn't been included since 2007[1] and the last remnants were removed from the code base in 2010[2].
1. http://cgit.freedesktop.org/xorg/xserver/commit/?id=9d03ca
2. http://cgit.freedesktop.org/xorg/xserver/commit/?id=19d03d
--- meta/recipes-graphics/xorg-xserver/xserver-xorg.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +2 -4
@@ -44,8 +44,7 @@ DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util" # libextmod.so # libdbe.so -PACKAGES =+ "${PN}-security-policy \ - ${PN}-sdl \ +PACKAGES =+ "${PN}-sdl \ ${PN}-fbdev \ ${PN}-xvfb \ ${PN}-utils \
@@ -72,7 +71,7 @@ PACKAGES =+ "${PN}-security-policy \ SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" INSANE_SKIP_xf86-video-modesetting = "xorg-driver-abi" -XSERVER_RRECOMMENDS = "${PN}-security-policy xkeyboard-config rgb xserver-xf86-config xkbcomp" +XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp" RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}" RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}" RDEPENDS_${PN}-xvfb += "xkeyboard-config"
@@ -85,7 +84,6 @@ FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \ ${libdir}/xorg/modules/*/.debug \ ${libdir}/xorg/modules/*/*/.debug \ " -FILES_${PN}-security-policy += "${libdir}/xserver/SecurityPolicy" FILES_${PN}-sdl = "${bindir}/Xsdl" FILES_${PN}-fbdev = "${bindir}/Xfbdev" FILES_${PN}-xvfb = "${bindir}/Xvfb"
Signature · 1 line
2.1.4
Quoted 4 lines · Joshua Lock
The following series are some tidy ups and changes made whilst porting a distro with systemd and a Weston + Xwayland userland to Jethro.
Ugh, please ignore - due to user error driving the pull request scripts this series includes a bunch of patches I didn't write that are already merged.
Sincere apologies,
Joshua