Skip to contentSkip to conversation

Some miscellaneous bugfixes

PATCH Applied Paul Eggleton 2 participants 6 messages Sep 7, 2011

lore
Share & tools
lore
#0 lore raw

cover Some miscellaneous bugfixes

The following changes since commit cb8efc0e1ec00892b46325aabfb1b4020a46c078:

linux-yocto: re-enable utrace (2011-09-07 14:53:38 +0100)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/fixes5
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/fixes5

Paul Eggleton (4):
core-image.bbclass: zap root password if debug-tweaks not enabled sanity.bbclass: re-enable DISTRO check meta/recipes.txt: correct Qt capitalisation base.bbclass: fix substring matching in COMMERCIAL_LICENSE

 meta/classes/base.bbclass       |    4 ++--
 meta/classes/core-image.bbclass |    5 +++++
 meta/classes/sanity.bbclass     |    8 +++++---
 meta/recipes.txt                |    2 +-
 4 files changed, 13 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/4 core-image.bbclass: zap root password if debug-tweaks not enabled

If you do not have debug-tweaks in IMAGE_FEATURES, then zap the root password so that you can't log in as root without a password in an image potentially intended for a production system.

Also mention debug-tweaks in the comments listing IMAGE_FEATURES in this file.

---
 meta/classes/core-image.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
meta/classes/core-image.bbclass +5 -0
index 507d6a6..8e83d4a 100644
@@ -26,6 +26,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 # - nfs-server          - NFS server (exports / over NFS to everybody)
 # - ssh-server-dropbear - SSH server (dropbear)
 # - ssh-server-openssh  - SSH server (openssh)
+# - debug-tweaks        - makes an image suitable for development
 #
 PACKAGE_GROUP_apps-console-core = "task-core-apps-console"
 PACKAGE_GROUP_x11-base = "task-core-x11-base"
@@ -65,3 +66,7 @@ inherit image
 
 # Create /etc/timestamp during image construction to give a reasonably sane default time setting
 ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
+
+# Zap the root password if debug-tweaks feature is not enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_root_password ; ",d)}'
+
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/4 sanity.bbclass: re-enable DISTRO check

In reply to Paul Eggleton

If DISTRO has been specified, ensure it is valid. (Unset or empty string is valid for DISTRO in OE-core by the use of defaultsetup.conf.)

---
 meta/classes/sanity.bbclass |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
meta/classes/sanity.bbclass +5 -3
index 44b0688..93008cc 100644
@@ -269,10 +269,12 @@ def check_sanity(e):
     if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
         messages = messages + "DL_DIR: %s exists but you do not appear to have write access to it. \n" % dldir
     
-    # Check that the DISTRO is valid
+    # Check that the DISTRO is valid, if set
     # need to take into account DISTRO renaming DISTRO
-    #if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
-    #    messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
+    distro = data.getVar('DISTRO', e.data, True)
+    if distro:
+        if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
+            messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
 
     missing = ""
 
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 3/4 meta/recipes.txt: correct Qt capitalisation

In reply to Paul Eggleton

"Qt" is correct according to the documentation.

---
 meta/recipes.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes.txt +1 -1
index 51bb746..bf7f19e 100644
@@ -8,6 +8,6 @@ recipes-gnome        - All things related to the GTK+ application framework
 recipes-graphics     - X and other graphically related system libraries  
 recipes-kernel       - The kernel and generic applications/libraries with strong kernel dependencies
 recipes-multimedia   - Codecs and support utilties for audio, images and video
-recipes-qt           - All things related to the QT application framework
+recipes-qt           - All things related to the Qt application framework
 recipes-sato         - The Sato demo/reference UI/UX, its associated apps and configuration 
 
Signature · 1 line
1.7.4.1
#4 lore raw

PATCH 4/4 base.bbclass: fix substring matching in COMMERCIAL_LICENSE

In reply to Paul Eggleton

Previously, if for example you had a package called "mx", and a second package called "libomxil" listed in COMMERCIAL_LICENSE (without mx being listed there), it would match mx as being commercially licensed because mx is a substring of libomxil. Fix the search to ensure it only matches the listed package name exactly.

---
 meta/classes/base.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/base.bbclass +2 -2
index 3501f4b..104bec8 100644
@@ -340,9 +340,9 @@ python () {
     if license == "INVALID":
         bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
 
-    commercial_license = bb.data.getVar('COMMERCIAL_LICENSE', d, 1)
+    commercial_license = " %s " % bb.data.getVar('COMMERCIAL_LICENSE', d, 1)
     import re
-    pnr = pn.replace('+', "\+")
+    pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
     if commercial_license and re.search(pnr, commercial_license):
         bb.debug(1, "Skipping %s because it's commercially licensed" % pn)
         raise bb.parse.SkipPackage("because it may require a commercial license to ship in a product (listed in COMMERCIAL_LICENSE)")
Signature · 1 line
1.7.4.1
#5 lore raw
In reply to Paul Eggleton
Quoted 8 lines · Paul Eggleton

The following changes since commit cb8efc0e1ec00892b46325aabfb1b4020a46c078:

linux-yocto: re-enable utrace (2011-09-07 14:53:38 +0100)

are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/fixes5
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/fixes5

Quoted 5 lines

Paul Eggleton (4):
core-image.bbclass: zap root password if debug-tweaks not enabled sanity.bbclass: re-enable DISTRO check meta/recipes.txt: correct Qt capitalisation base.bbclass: fix substring matching in COMMERCIAL_LICENSE

Merged to master, thanks.

Richard