Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V2 0/3] misc IMAGE_FEATURE fixings
@ 2012-06-20  4:25 Lianhao Lu
  2012-06-20  4:25 ` [PATCH V2 1/3] classes/image: Allow openssh empty passwords login Lianhao Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lianhao Lu @ 2012-06-20  4:25 UTC (permalink / raw)
  To: openembedded-core

This patch set fixed the bug [YOCTO #2605].

It allows to login to openssh with empty password if the IMAGE_FEATURE
debug-tweak feature is set.

It processes conflicting IMAGE_FEATURE features, i.e. ssh-server-dropbear 
and ssh-server-openssh.

It also adds a new IMAGE_FEATURE 'eclipse-support' for developing user 
applications using Eclipse plugin.

The following changes since commit 6d761ae17ddbd3d936e7fe985b40825ad62b2418:
  James Limbouris (1):
        debian.bbclass: invoke target objdump

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib llu/bug2605
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/bug2605

Lianhao Lu (3):
  classes/image: Allow openssh empty passwords login.
  image/core-image: Handle conflicting IMAGE_FEATURES.
  core-image/misc: Added new IMAGE_FEATURE eclipse-support.

 meta/classes/core-image.bbclass                    |   15 ++++++++++-
 meta/classes/image.bbclass                         |   26 +++++++++++++++++++-
 meta/conf/multilib.conf                            |    1 +
 .../tasks/task-core-eclipse-support.bb             |   17 +++++++++++++
 meta/recipes-sato/images/core-image-sato-sdk.bb    |    4 ++-
 5 files changed, 60 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-core/tasks/task-core-eclipse-support.bb




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

* [PATCH V2 1/3] classes/image: Allow openssh empty passwords login.
  2012-06-20  4:25 [PATCH V2 0/3] misc IMAGE_FEATURE fixings Lianhao Lu
@ 2012-06-20  4:25 ` Lianhao Lu
  2012-06-20  4:25 ` [PATCH V2 2/3] image/core-image: Handle conflicting IMAGE_FEATURES Lianhao Lu
  2012-06-20  4:25 ` [PATCH V2 3/3] core-image/misc: Added new IMAGE_FEATURE eclipse-support Lianhao Lu
  2 siblings, 0 replies; 5+ messages in thread
From: Lianhao Lu @ 2012-06-20  4:25 UTC (permalink / raw)
  To: openembedded-core

Allow empty passwords login so that the default root user can login in
through openssh.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/classes/core-image.bbclass |    2 ++
 meta/classes/image.bbclass      |    9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index e2ad0fc..25f5c5a 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -69,4 +69,6 @@ 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)}'
+# Allow openssh accept empty password login if both debug-tweaks and ssh-server-openssh are enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks ssh-server-openssh", "openssh_allow_empty_password; ", "",d)}'
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index fb932b9..404bf03 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -318,6 +318,13 @@ zap_root_password () {
 	mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd
 } 
 
+# allow openssh accept login with empty password string
+openssh_allow_empty_password () {
+	if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
+		sed -i 's#.*PermitEmptyPasswords.*#PermitEmptyPasswords yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
+	fi
+}
+
 # Turn any symbolic /sbin/init link into a file
 remove_init_link () {
 	if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then
@@ -372,7 +379,7 @@ rootfs_trim_schemas () {
 	done
 }
 
-EXPORT_FUNCTIONS zap_root_password remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup
+EXPORT_FUNCTIONS zap_root_password remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup openssh_allow_empty_password
 
 do_fetch[noexec] = "1"
 do_unpack[noexec] = "1"
-- 
1.7.0.4




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

* [PATCH V2 2/3] image/core-image: Handle conflicting IMAGE_FEATURES.
  2012-06-20  4:25 [PATCH V2 0/3] misc IMAGE_FEATURE fixings Lianhao Lu
  2012-06-20  4:25 ` [PATCH V2 1/3] classes/image: Allow openssh empty passwords login Lianhao Lu
@ 2012-06-20  4:25 ` Lianhao Lu
  2012-06-20  4:25 ` [PATCH V2 3/3] core-image/misc: Added new IMAGE_FEATURE eclipse-support Lianhao Lu
  2 siblings, 0 replies; 5+ messages in thread
From: Lianhao Lu @ 2012-06-20  4:25 UTC (permalink / raw)
  To: openembedded-core

IMAGE_FEATURES such as 'ssh-server-dropbear' and 'ssh-server-openssh'
can't be both enabled. User can use the following variables to define
the relationship of image features:

IMAGE_FEATURES_REPLACES_foo = "bar" means including image feature "foo"
would replace the image feature "bar".

IMAGE_FEATURES_CONFLICTS_foo = "bar" means including both image features
"foo" and "bar" would cause an parsing error.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/classes/core-image.bbclass                 |   11 ++++++++++-
 meta/classes/image.bbclass                      |   17 +++++++++++++++++
 meta/recipes-sato/images/core-image-sato-sdk.bb |    2 ++
 3 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index 25f5c5a..6b207d7 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -47,6 +47,14 @@ PACKAGE_GROUP_ssh-server-openssh = "task-core-ssh-openssh"
 PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"
 PACKAGE_GROUP_qt4-pkgs = "task-core-qt-demos"
 
+
+# IMAGE_FEAETURES_REPLACES_foo = 'bar1 bar2'
+# Including image feature foo would replace the image features bar1 and bar2
+IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear"
+
+# IMAGE_FEATURES_CONFLICTS_foo = 'bar1 bar2'
+# An error exception would be raised if both image features foo and bar1(or bar2) are included
+
 CORE_IMAGE_BASE_INSTALL = '\
     task-core-boot \
     task-base-extended \
@@ -60,7 +68,8 @@ IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
 
 X11_IMAGE_FEATURES  = "x11-base apps-x11-core package-management"
 ENHANCED_IMAGE_FEATURES = "${X11_IMAGE_FEATURES} apps-x11-games apps-x11-pimlico package-management"
-SATO_IMAGE_FEATURES = "${ENHANCED_IMAGE_FEATURES} x11-sato ssh-server-dropbear"
+SSHSERVER_IMAGE_FEATURES ??= "ssh-server-dropbear"
+SATO_IMAGE_FEATURES = "${ENHANCED_IMAGE_FEATURES} x11-sato ${SSHSERVER_IMAGE_FEATURES}"
 
 inherit image
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 404bf03..9c07ceb 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -87,6 +87,23 @@ python () {
         deps += " %s:do_populate_sysroot" % dep
     d.setVarFlag('do_rootfs', 'depends', deps)
 
+    #process IMAGE_FEATURES, we must do this before runtime_mapping_rename
+    #Check for replaces image features
+    features = set(oe.data.typed_value('IMAGE_FEATURES', d))
+    remain_features = features.copy()
+    for feature in features:
+        replaces = set((d.getVar("IMAGE_FEATURES_REPLACES_%s" % feature, True) or "").split())
+        remain_features -= replaces
+
+    #Check for conflict image features
+    for feature in remain_features:
+        conflicts = set((d.getVar("IMAGE_FEATURES_CONFLICTS_%s" % feature, True) or "").split())
+        temp = conflicts & remain_features
+        if temp:
+            raise bb.parse.SkipPackage("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp))))
+
+    d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
+
     # If we don't do this we try and run the mapping hooks while parsing which is slow
     # bitbake should really provide something to let us know this...
     if d.getVar('BB_WORKERCONTEXT', True) is not None:
diff --git a/meta/recipes-sato/images/core-image-sato-sdk.bb b/meta/recipes-sato/images/core-image-sato-sdk.bb
index eed1698..5bb9469 100644
--- a/meta/recipes-sato/images/core-image-sato-sdk.bb
+++ b/meta/recipes-sato/images/core-image-sato-sdk.bb
@@ -8,6 +8,8 @@ form a standalone SDK."
 IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs tools-sdk qt4-pkgs"
 EXTRA_IMAGE_FEATURES += "tools-debug tools-profile tools-testapps debug-tweaks"
 
+SSHSERVER_IMAGE_FEATURES = "ssh-server-openssh"
+
 LICENSE = "MIT"
 
 inherit core-image
-- 
1.7.0.4




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

* [PATCH V2 3/3] core-image/misc: Added new IMAGE_FEATURE eclipse-support.
  2012-06-20  4:25 [PATCH V2 0/3] misc IMAGE_FEATURE fixings Lianhao Lu
  2012-06-20  4:25 ` [PATCH V2 1/3] classes/image: Allow openssh empty passwords login Lianhao Lu
  2012-06-20  4:25 ` [PATCH V2 2/3] image/core-image: Handle conflicting IMAGE_FEATURES Lianhao Lu
@ 2012-06-20  4:25 ` Lianhao Lu
  2012-06-22 18:09   ` Saul Wold
  2 siblings, 1 reply; 5+ messages in thread
From: Lianhao Lu @ 2012-06-20  4:25 UTC (permalink / raw)
  To: openembedded-core

Added a new IMAGE_FEATURES eclipse-support to support developing user
applications through Eclipse plugin.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/classes/core-image.bbclass                    |    2 ++
 meta/conf/multilib.conf                            |    1 +
 .../tasks/task-core-eclipse-support.bb             |   17 +++++++++++++++++
 meta/recipes-sato/images/core-image-sato-sdk.bb    |    2 +-
 4 files changed, 21 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/tasks/task-core-eclipse-support.bb

diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index 6b207d7..8505d6f 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -28,6 +28,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 # - ssh-server-dropbear - SSH server (dropbear)
 # - ssh-server-openssh  - SSH server (openssh)
 # - debug-tweaks        - makes an image suitable for development
+# - eclipse-support     - Support Eclipse plugin
 #
 PACKAGE_GROUP_apps-console-core = "task-core-apps-console"
 PACKAGE_GROUP_x11-mini = "task-core-x11-mini"
@@ -46,6 +47,7 @@ PACKAGE_GROUP_ssh-server-dropbear = "task-core-ssh-dropbear"
 PACKAGE_GROUP_ssh-server-openssh = "task-core-ssh-openssh"
 PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"
 PACKAGE_GROUP_qt4-pkgs = "task-core-qt-demos"
+PACKAGE_GROUP_eclipse-support = "task-core-eclipse-support task-core-tools-debug task-core-tools-profile"
 
 
 # IMAGE_FEAETURES_REPLACES_foo = 'bar1 bar2'
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index cea8694..ee21d40 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -618,6 +618,7 @@ BBCLASSEXTEND_append_pn-task-core-basic = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-task-core-boot = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-task-core-clutter = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-task-core-console = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-task-core-eclipse-support = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-task-core-gtk-directfb = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-task-core-lsb = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-task-core-nfs = " ${MULTILIBS}"
diff --git a/meta/recipes-core/tasks/task-core-eclipse-support.bb b/meta/recipes-core/tasks/task-core-eclipse-support.bb
new file mode 100644
index 0000000..78a21a4
--- /dev/null
+++ b/meta/recipes-core/tasks/task-core-eclipse-support.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Agent for Eclipse plugin task for Poky"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+PR = "r0"
+
+PACKAGES = "\
+    ${PN} \
+    ${PN}-dev \
+    ${PN}-dbg \
+    "
+
+ALLOW_EMPTY = "1"
+
+RDEPENDS_${PN} = "tcf-agent \
+	openssh-sftp-server \
+	"
diff --git a/meta/recipes-sato/images/core-image-sato-sdk.bb b/meta/recipes-sato/images/core-image-sato-sdk.bb
index 5bb9469..0630314 100644
--- a/meta/recipes-sato/images/core-image-sato-sdk.bb
+++ b/meta/recipes-sato/images/core-image-sato-sdk.bb
@@ -5,7 +5,7 @@ DESCRIPTION = "Image with Sato support that includes everything within \
 core-image-sato plus meta-toolchain, development headers and libraries to \
 form a standalone SDK."
 
-IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs tools-sdk qt4-pkgs"
+IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs tools-sdk qt4-pkgs eclipse-support"
 EXTRA_IMAGE_FEATURES += "tools-debug tools-profile tools-testapps debug-tweaks"
 
 SSHSERVER_IMAGE_FEATURES = "ssh-server-openssh"
-- 
1.7.0.4




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

* Re: [PATCH V2 3/3] core-image/misc: Added new IMAGE_FEATURE eclipse-support.
  2012-06-20  4:25 ` [PATCH V2 3/3] core-image/misc: Added new IMAGE_FEATURE eclipse-support Lianhao Lu
@ 2012-06-22 18:09   ` Saul Wold
  0 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-06-22 18:09 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 06/19/2012 09:25 PM, Lianhao Lu wrote:
> Added a new IMAGE_FEATURES eclipse-support to support developing user
> applications through Eclipse plugin.
>
Do we really need a new IMAGE_FEATURE?  We already have tools-debug 
which includes the tcf-agent, can we not just add the 
openssh-sftp-server package to the task-core-tools-debug.bb?  That would 
work and not add yet another IMAGE_FEATURE.

Sau!

> Signed-off-by: Lianhao Lu<lianhao.lu@intel.com>
> ---
>   meta/classes/core-image.bbclass                    |    2 ++
>   meta/conf/multilib.conf                            |    1 +
>   .../tasks/task-core-eclipse-support.bb             |   17 +++++++++++++++++
>   meta/recipes-sato/images/core-image-sato-sdk.bb    |    2 +-
>   4 files changed, 21 insertions(+), 1 deletions(-)
>   create mode 100644 meta/recipes-core/tasks/task-core-eclipse-support.bb
>
> diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
> index 6b207d7..8505d6f 100644
> --- a/meta/classes/core-image.bbclass
> +++ b/meta/classes/core-image.bbclass
> @@ -28,6 +28,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
>   # - ssh-server-dropbear - SSH server (dropbear)
>   # - ssh-server-openssh  - SSH server (openssh)
>   # - debug-tweaks        - makes an image suitable for development
> +# - eclipse-support     - Support Eclipse plugin
>   #
>   PACKAGE_GROUP_apps-console-core = "task-core-apps-console"
>   PACKAGE_GROUP_x11-mini = "task-core-x11-mini"
> @@ -46,6 +47,7 @@ PACKAGE_GROUP_ssh-server-dropbear = "task-core-ssh-dropbear"
>   PACKAGE_GROUP_ssh-server-openssh = "task-core-ssh-openssh"
>   PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"
>   PACKAGE_GROUP_qt4-pkgs = "task-core-qt-demos"
> +PACKAGE_GROUP_eclipse-support = "task-core-eclipse-support task-core-tools-debug task-core-tools-profile"
>
>
>   # IMAGE_FEAETURES_REPLACES_foo = 'bar1 bar2'
> diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
> index cea8694..ee21d40 100644
> --- a/meta/conf/multilib.conf
> +++ b/meta/conf/multilib.conf
> @@ -618,6 +618,7 @@ BBCLASSEXTEND_append_pn-task-core-basic = " ${MULTILIBS}"
>   BBCLASSEXTEND_append_pn-task-core-boot = " ${MULTILIBS}"
>   BBCLASSEXTEND_append_pn-task-core-clutter = " ${MULTILIBS}"
>   BBCLASSEXTEND_append_pn-task-core-console = " ${MULTILIBS}"
> +BBCLASSEXTEND_append_pn-task-core-eclipse-support = " ${MULTILIBS}"
>   BBCLASSEXTEND_append_pn-task-core-gtk-directfb = " ${MULTILIBS}"
>   BBCLASSEXTEND_append_pn-task-core-lsb = " ${MULTILIBS}"
>   BBCLASSEXTEND_append_pn-task-core-nfs = " ${MULTILIBS}"
> diff --git a/meta/recipes-core/tasks/task-core-eclipse-support.bb b/meta/recipes-core/tasks/task-core-eclipse-support.bb
> new file mode 100644
> index 0000000..78a21a4
> --- /dev/null
> +++ b/meta/recipes-core/tasks/task-core-eclipse-support.bb
> @@ -0,0 +1,17 @@
> +DESCRIPTION = "Agent for Eclipse plugin task for Poky"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
> +                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +PR = "r0"
> +
> +PACKAGES = "\
> +    ${PN} \
> +    ${PN}-dev \
> +    ${PN}-dbg \
> +    "
> +
> +ALLOW_EMPTY = "1"
> +
> +RDEPENDS_${PN} = "tcf-agent \
> +	openssh-sftp-server \
> +	"
> diff --git a/meta/recipes-sato/images/core-image-sato-sdk.bb b/meta/recipes-sato/images/core-image-sato-sdk.bb
> index 5bb9469..0630314 100644
> --- a/meta/recipes-sato/images/core-image-sato-sdk.bb
> +++ b/meta/recipes-sato/images/core-image-sato-sdk.bb
> @@ -5,7 +5,7 @@ DESCRIPTION = "Image with Sato support that includes everything within \
>   core-image-sato plus meta-toolchain, development headers and libraries to \
>   form a standalone SDK."
>
> -IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs tools-sdk qt4-pkgs"
> +IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs tools-sdk qt4-pkgs eclipse-support"
>   EXTRA_IMAGE_FEATURES += "tools-debug tools-profile tools-testapps debug-tweaks"
>
>   SSHSERVER_IMAGE_FEATURES = "ssh-server-openssh"



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

end of thread, other threads:[~2012-06-22 18:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20  4:25 [PATCH V2 0/3] misc IMAGE_FEATURE fixings Lianhao Lu
2012-06-20  4:25 ` [PATCH V2 1/3] classes/image: Allow openssh empty passwords login Lianhao Lu
2012-06-20  4:25 ` [PATCH V2 2/3] image/core-image: Handle conflicting IMAGE_FEATURES Lianhao Lu
2012-06-20  4:25 ` [PATCH V2 3/3] core-image/misc: Added new IMAGE_FEATURE eclipse-support Lianhao Lu
2012-06-22 18:09   ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox