Re: [OE-core] [PATCH] kernel-devsrc: Fix backward compaibilty

2016-01-20 Thread Jian Liu



On 2016年01月20日 15:52, Richard Purdie wrote:

On Wed, 2016-01-20 at 13:27 +0800, Jian Liu wrote:

kernel-dev is replaced by kernel-devsrc

No, its not.


, which breaks
backward compaibilty.
  -- add alias for kernel-devsrc
  -- kernel-devsrc provides the kernel-dev.
  -- remove kernel-dev from the sub-packages of linux-windriver

kernel-dev is useful for things like profiling tools where you need
things like system.Map or the kernel configuration without source code.

If you need the "full" source, you can use kernel-devsrc.

I'm not sure we want to remove kernel-dev given it does have a use?

Ok.  I see.

Thanks Richard.



Cheers,

Richard



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] linux-libc-headers: not to create empty rpm

2016-01-20 Thread Jian Liu


On 2016年01月20日 15:49, Richard Purdie wrote:

On Wed, 2016-01-20 at 14:10 +0800, Jian Liu wrote:

linux-libc-headers-dbg is empty and unset ALLOW_EMPTY
for this sub-package.

Signed-off-by: Jian Liu 

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc
-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc
-headers.inc
index 2ba6ed5..75f6899 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -76,3 +76,5 @@ RRECOMMENDS_${PN}-dbg = "${PN}-dev (=
${EXTENDPKGV})"
  
  INHIBIT_DEFAULT_DEPS = "1"

  DEPENDS += "unifdef-native"
+
+ALLOW_EMPTY_${PN}-dbg = "0"

It may be empty but our packaging criteria say we always generate a dbg
package since they can be part of dependency chains and we're
interested in the dependencies.

I appreciate in this case, the libc-headers are a corner case at the
end of the chains so you could argue this one can be skipped for
packaging but the system does assume all -dbg packages exist so I'd
prefer to leave this alone, unless its part of a bigger picture rethink
about -dbg packages.

I see

Thanks very much for reminding me this.



Cheers,

Richard





--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] linux-libc-headers: not to create empty rpm

2016-01-19 Thread Jian Liu
linux-libc-headers-dbg is empty and unset ALLOW_EMPTY
for this sub-package.

Signed-off-by: Jian Liu 

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 2ba6ed5..75f6899 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -76,3 +76,5 @@ RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS += "unifdef-native"
+
+ALLOW_EMPTY_${PN}-dbg = "0"
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] linux-libc-headers: set ALLOW_EMPTY

2016-01-19 Thread Jian Liu



On 2016年01月19日 19:37, Martin Jansa wrote:

On Tue, Jan 19, 2016 at 11:12:18AM +0800, Jian Liu wrote:


On 2016年01月16日 02:17, Richard Purdie wrote:

On Thu, 2016-01-14 at 14:46 +0800, Jian Liu wrote:

If setting IMAGE_INSTALL += "linux-libc-headers", do_rootfs will
cause
error.
ERROR: linux-libc-headers not found in the base feeds

This is because that there is no linux-libc-headers.rpm generated.

There is no point in generating an empty package just for the sake of
it. Surely you just shouldn't put that in IMAGE_INSTALL?

Cheers,

Richard

Yes, I submit this patch just considering that someone who is not
familiar with yocto may be confused
by this behavior. There is linux-libc-headers bb file so IMAGE_INSTALL
+= "linux-libc-headers" is taken for
granted.

This is really not a bug and it is just a usage problem.

And you're making it worse, by allowing such person to install
completely useless empty package assuming that (s)he installed
linux-libc-headers to the image.

Error message is _much_ better than empty useless package.

I understand. Thanks a lot.




diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc
-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc
-headers.inc
index 2ba6ed5..403360b 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -76,3 +76,5 @@ RRECOMMENDS_${PN}-dbg = "${PN}-dev (=
${EXTENDPKGV})"
   
   INHIBIT_DEFAULT_DEPS = "1"

   DEPENDS += "unifdef-native"
+
+ALLOW_EMPTY_${PN} = "1"

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel-devsrc: Fix backward compaibilty

2016-01-19 Thread Jian Liu
kernel-dev is replaced by kernel-devsrc, which breaks
backward compaibilty.
 -- add alias for kernel-devsrc
 -- kernel-devsrc provides the kernel-dev.
 -- remove kernel-dev from the sub-packages of linux-windriver

Signed-off-by: Jian Liu 

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index dee6f7d..84ab078 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -371,11 +371,10 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
 
 # kernel-base becomes kernel-${KERNEL_VERSION}
 # kernel-image becomes kernel-image-${KERNEL_VERISON}
-PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev 
kernel-modules"
+PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-modules"
 FILES_${PN} = ""
 FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order 
/lib/modules/${KERNEL_VERSION}/modules.builtin"
 FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* 
${KERNEL_SRC_PATH} /lib/modules/${KERNEL_VERSION}/build"
 FILES_kernel-vmlinux = "/boot/vmlinux*"
 FILES_kernel-modules = ""
 RDEPENDS_kernel = "kernel-base"
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 7100ed7..07f8fbe 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -16,6 +16,8 @@ BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
 # Set a variable to get to the top of the metadata location
 COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
 
+PREFERRED_PROVIDER_virtual/kernel-dev = "kernel-devsrc"
+
 # opkg-utils is for update-alternatives :(
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
   sysvinit-inittab \
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 196c8c7..fa641f3 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -74,3 +74,9 @@ do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
 PACKAGES = "kernel-devsrc"
 FILES_${PN} = "${KERNEL_SRC_PATH}"
 RDEPENDS_${PN} = "bc"
+
+# For backwards compatibility after rename
+RPROVIDES_${PN} = "kernel-dev"
+RREPLACES_${PN} = "kernel-dev"
+RCONFLICTS_${PN} = "kernel-dev"
+PROVIDES += "kernel-dev"
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] linux-libc-headers: set ALLOW_EMPTY

2016-01-18 Thread Jian Liu



On 2016年01月16日 02:17, Richard Purdie wrote:

On Thu, 2016-01-14 at 14:46 +0800, Jian Liu wrote:

If setting IMAGE_INSTALL += "linux-libc-headers", do_rootfs will
cause
error.
   ERROR: linux-libc-headers not found in the base feeds

This is because that there is no linux-libc-headers.rpm generated.

There is no point in generating an empty package just for the sake of
it. Surely you just shouldn't put that in IMAGE_INSTALL?

Cheers,

Richard


Yes, I submit this patch just considering that someone who is not 
familiar with yocto may be confused
by this behavior. There is linux-libc-headers bb file so IMAGE_INSTALL 
+= "linux-libc-headers" is taken for

granted.

This is really not a bug and it is just a usage problem.

Thanks!

//Jian




Signed-off-by: Jian Liu 

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc
-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc
-headers.inc
index 2ba6ed5..403360b 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -76,3 +76,5 @@ RRECOMMENDS_${PN}-dbg = "${PN}-dev (=
${EXTENDPKGV})"
  
  INHIBIT_DEFAULT_DEPS = "1"

  DEPENDS += "unifdef-native"
+
+ALLOW_EMPTY_${PN} = "1"


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] linux-libc-headers: set ALLOW_EMPTY

2016-01-13 Thread Jian Liu
If setting IMAGE_INSTALL += "linux-libc-headers", do_rootfs will cause
error.
  ERROR: linux-libc-headers not found in the base feeds

This is because that there is no linux-libc-headers.rpm generated.

Signed-off-by: Jian Liu 

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 2ba6ed5..403360b 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -76,3 +76,5 @@ RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS += "unifdef-native"
+
+ALLOW_EMPTY_${PN} = "1"
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] archiver.bbclass: fix an exception of the mode configured

2015-12-21 Thread Jian Liu

Ping

On 2015年11月17日 13:31, Jian Liu wrote:

Hi Ross,

I check the values of d.getVarFlag('do_configure', 'task') and 
d.getVarFlag('do_unpack', 'task') for gcc-source.

But it seems that both values are 1.

I use the following command to get the values,
os.system("echo 'do_unpack=%s, do_configure=%s, noexec=%s, pn=%s' >> 
/tmp/task.txt" %(d.getVarFlag('do_unpack', 
'task'),d.getVarFlag('do_configure', 
'task'),d.getVarFlag('do_configure', 'noexec'),pn))


Does I miss something?

I query several people about how to get the current tasks of a recipe. 
But I get nothing more.


Thanks!
Jian

On 2015年11月16日 23:08, Burton, Ross wrote:


On 16 November 2015 at 05:33, Jian Liu <mailto:jian@windriver.com>> wrote:


+ if d.getVarFlag('do_configure', 'noexec') == '1' or
'do_configure' not in d.getVar('__BBTASKS', False):


__BBTASKS is internal so shouldn't beused unless you have an awesome 
reason.  Richard tells me that d.getVarFlag('do_configure', 'task') 
is probably what you want.


Ross






-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] Fix missing check for permission denied.

2015-12-18 Thread Jian Liu
If the path to "ROOT_SYSCONFDIR /mke2fs.conf" has a permission denied problem,
then the get_dirlist() call will return EACCES. But the code in profile_init
will treat that as a fatal error and all executions will fail with:
  Couldn't init profile successfully (error: 13).

But the problem should not really be visible for the target package as the path
then will be "/etc/mke2fs.conf", and it is not likely that a user have no
permission to read /etc.

Signed-off-by: Jian Liu 
---
 .../fix-missing-check-for-permission-denied.patch  | 23 ++
 .../recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 
meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-missing-check-for-permission-denied.patch

diff --git 
a/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-missing-check-for-permission-denied.patch
 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-missing-check-for-permission-denied.patch
new file mode 100644
index 000..3287eb3
--- /dev/null
+++ 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-missing-check-for-permission-denied.patch
@@ -0,0 +1,23 @@
+Fix missing check for permission denied.
+
+If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem, 
+then the get_dirlist() call will return EACCES. But the code in profile_init 
+will treat that as a fatal error and all executions will fail with: 
+  Couldn't init profile successfully (error: 13).
+
+Upstream-Status: Pending
+
+Written-by: Henrik Wallin 
+
+diff -Nur e2fsprogs-1.42.9.orig/e2fsck/profile.c 
e2fsprogs-1.42.9/e2fsck/profile.c
+--- e2fsprogs-1.42.9.orig/e2fsck/profile.c 2015-12-18 17:29:52.904625948 
+0800
 e2fsprogs-1.42.9/e2fsck/profile.c  2015-12-18 17:31:02.484626433 +0800
+@@ -333,7 +333,7 @@
+   *last = new_file;
+   last = &new_file->next;
+   }
+-  } else if ((retval != ENOTDIR) &&
++  } else if ((retval != ENOTDIR) && (retval != EACCES) &&
+  strcmp(*fs, default_filename))
+   goto errout;
+ 
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index ce7d2e8..961af40 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -25,6 +25,7 @@ SRC_URI += "file://acinclude.m4 \
 
file://0001-libext2fs-fix-potential-buffer-overflow-in-closefs.patch \
 file://copy-in-create-hardlinks-with-the-correct-directory-.patch \
 "
+SRC_URI_append_class-native = " 
file://fix-missing-check-for-permission-denied.patch"
 
 SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"
 SRC_URI[sha256sum] = 
"2f92ac06e92fa00f2ada3ee67dad012d74d685537527ad1241d82f2d041f2802"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] archiver.bbclass: do checkout for kernel

2015-12-17 Thread Jian Liu

Hi Ross,

I test this patch. I seem to have no relationship with my issue. This 
patch just optimizes some tasks.


My problem seems to be gotten around by a patch 
523e4f6a6913b64453579d27a02467e14f7df42e submitted by Bruce.
"bareclone=1" is removed from SRC_URI. So kernel source is not a bare 
repo any more.


I do not know why "bareclone=1" is removed. This option seems to have no 
side effect on kernel.

So I thinks this should be a hidden trouble.

Do you have any ideas?

Thanks!

Jian

On 2015年12月17日 06:29, Burton, Ross wrote:


On 2 November 2015 at 06:23, Jian Liu <mailto:jian@windriver.com>> wrote:


The repo of kernel is bare git repository and we need to checkout
to get
the source code.


A recent patch to archiver ("fix previous issue regarding work-shared 
for linux-yocto") claims to fix this, can you confirm if that fixes 
this problem or if this fixes more edge cases regarding the kernel.


Cheers,
Ross


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] archiver.bbclass: do checkout for kernel

2015-12-13 Thread Jian Liu

Ping

On 2015年11月13日 16:16, Jian Liu wrote:

Hi Raj,

I tried meta-rasberrypi with my patch and it works well.
The tasks of the recipe linux-rasberrypi is similar with linux-yocto 
and linux-rasberrypi also inherits linux-yocto.bbclass


I read the codes of archiver and it seems that kernel is recognised by 
"bb.data.inherits_class('kernel-yocto', d)" when kernel needs to be 
handled specially


What do you think?

Thanks!
Jian

On 2015年11月05日 10:22, Khem Raj wrote:

On Wed, Nov 4, 2015 at 6:14 PM, Jian Liu  wrote:

Hi,

All kernels I list bellow will perform do_fetch(), do_unpack(),
do_kernel_checkout().
do_unpack() will put a bare git repo under WORKDIR and then
do_kernel_checkout()
will move the bare repo to bitbake/tmp/work-share//kernel-source(value of variable S),
then performing "git checkout".

So do_ar_original must wait until do_kernel_checkout() is completed 
and then

make tarball using the code under S.
Do I make that clear?


You refer to kernels other than linux-yocto. Can you give me an 
example?

I do not know how to build such kernel.

Add another BSP layer e.g. meta-raspberrypi to your bblayers.conf
and then MACHINE=raspberrypi2

and see what you are trying to do still holds.


Thanks!
Jian


On 2015年11月04日 13:57, Khem Raj wrote:

On Nov 3, 2015, at 1:22 AM, Jian Liu  wrote:

Hi,

I test linux-dummy linux-yocto-dev linux-yocto-rt 
linux-yocto-tiny and

the result is as follows,

linux-dummy: this package just meets some dependency and there is no
source code for it.
  The patch does not impact it
linux-yocto, linux-yocto-dev, linux-yocto-rt, linux-yocto-tiny: 
The S

variable of all packages is set to STAGING_KERNEK_DIR.
   do_fetch and do_unpack just leave a bare 
git repo

of kernel and do_kernel_checkout gets the source code

does it cover the case when kernel is not linux-yocto was basic 
question,

I am not clear if thats covered in any of above


Thanks!






--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] archiver.bbclass: fix an exception of the mode configured

2015-11-16 Thread Jian Liu

Hi Ross,

I check the values of d.getVarFlag('do_configure', 'task') and 
d.getVarFlag('do_unpack', 'task') for gcc-source.

But it seems that both values are 1.

I use the following command to get the values,
os.system("echo 'do_unpack=%s, do_configure=%s, noexec=%s, pn=%s' >> 
/tmp/task.txt" %(d.getVarFlag('do_unpack', 
'task'),d.getVarFlag('do_configure', 
'task'),d.getVarFlag('do_configure', 'noexec'),pn))


Does I miss something?

I query several people about how to get the current tasks of a recipe. 
But I get nothing more.


Thanks!
Jian

On 2015年11月16日 23:08, Burton, Ross wrote:


On 16 November 2015 at 05:33, Jian Liu <mailto:jian@windriver.com>> wrote:


+ if d.getVarFlag('do_configure', 'noexec') == '1' or
'do_configure' not in d.getVar('__BBTASKS', False):


__BBTASKS is internal so shouldn't beused unless you have an awesome 
reason.  Richard tells me that d.getVarFlag('do_configure', 'task') is 
probably what you want.


Ross


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] archiver.bbclass: fix an exception of the mode configured

2015-11-15 Thread Jian Liu
gcc-source does not have the task do_configure, so if configured mode is set,
the task do_ar_configured depends on do_configure.
This will cause an error.

Signed-off-by: Jian Liu 
---
 archiver.bbclass |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 41a552c..76571fb 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -73,8 +73,14 @@ python () {
 # We can't use "addtask do_ar_configured after do_configure" since it
 # will cause the deptask of do_populate_sysroot to run not matter what
 # archives we need, so we add the depends here.
-d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
-d.appendVarFlag('do_deploy_archives', 'depends', ' 
%s:do_ar_configured' % pn)
+##
+# For some specific packages like gcc-source, do_configure may be 
deleted.
+if d.getVarFlag('do_configure', 'noexec') == '1' or 'do_configure' not 
in d.getVar('__BBTASKS', False):
+pass
+else:
+bb.build.addtask('do_ar_configured', None, 'do_unpack_and_patch', 
d)
+d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' 
% pn)
+d.appendVarFlag('do_deploy_archives', 'depends', ' 
%s:do_ar_configured' % pn)
 elif ar_src:
 bb.fatal("Invalid ARCHIVER_MODE[src]: %s" % ar_src)
 
@@ -348,7 +354,6 @@ do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"
 
 addtask do_ar_original after do_unpack
 addtask do_ar_patched after do_unpack_and_patch
-addtask do_ar_configured after do_unpack_and_patch
 addtask do_dumpdata
 addtask do_ar_recipe
 addtask do_deploy_archives before do_build
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] archiver.bbclass: fix an exception of the mode configured

2015-11-15 Thread Jian Liu

Hi all,

Sorry for a mistake. Please ignore this patch

Jian

On 2015年11月13日 18:09, Jian Liu wrote:

gcc-source does not have the task do_configure, so if configured mode is set,
the task do_ar_configured depends on do_configure.
This will cause an error.

Signed-off-by: Jian Liu 
---
  archiver.bbclass |   15 ---
  1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 41a552c..3d1952a 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -73,8 +73,18 @@ python () {
  # We can't use "addtask do_ar_configured after do_configure" since it
  # will cause the deptask of do_populate_sysroot to run not matter what
  # archives we need, so we add the depends here.
-d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
-d.appendVarFlag('do_deploy_archives', 'depends', ' 
%s:do_ar_configured' % pn)
+##
+# For some specific packages like gcc-source, do_configure may be 
deleted.
+deltask = d.getVar('__BBDELTASKS', False)
+noexec = d.getVarFlag('do_configure', 'noexec')
+os.system("echo deltask=%s, noexec=%s, pn=%s >> /tmp/tasks.txt" 
%(deltask,noexec,pn))
+#if 'do_configure' in (d.getVar('__BBDELTASKS', False) or []) or 
d.getVarFlag('do_configure', 'noexec') == '1':
+if d.getVarFlag('do_configure', 'noexec') == '1' or 'do_configure' not 
in d.getVar('__BBTASKS', False):
+pass
+else:
+bb.build.addtask('do_ar_configured', None, 'do_unpack_and_patch', 
d)
+d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' 
% pn)
+d.appendVarFlag('do_deploy_archives', 'depends', ' 
%s:do_ar_configured' % pn)
  elif ar_src:
  bb.fatal("Invalid ARCHIVER_MODE[src]: %s" % ar_src)
  
@@ -348,7 +358,6 @@ do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"
  
  addtask do_ar_original after do_unpack

  addtask do_ar_patched after do_unpack_and_patch
-addtask do_ar_configured after do_unpack_and_patch
  addtask do_dumpdata
  addtask do_ar_recipe
  addtask do_deploy_archives before do_build


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] archiver.bbclass: fix an exception of the mode configured

2015-11-13 Thread Jian Liu
gcc-source does not have the task do_configure, so if configured mode is set,
the task do_ar_configured depends on do_configure.
This will cause an error.

Signed-off-by: Jian Liu 
---
 archiver.bbclass |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 41a552c..3d1952a 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -73,8 +73,18 @@ python () {
 # We can't use "addtask do_ar_configured after do_configure" since it
 # will cause the deptask of do_populate_sysroot to run not matter what
 # archives we need, so we add the depends here.
-d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
-d.appendVarFlag('do_deploy_archives', 'depends', ' 
%s:do_ar_configured' % pn)
+##
+# For some specific packages like gcc-source, do_configure may be 
deleted.
+deltask = d.getVar('__BBDELTASKS', False)
+noexec = d.getVarFlag('do_configure', 'noexec')
+os.system("echo deltask=%s, noexec=%s, pn=%s >> /tmp/tasks.txt" 
%(deltask,noexec,pn))
+#if 'do_configure' in (d.getVar('__BBDELTASKS', False) or []) or 
d.getVarFlag('do_configure', 'noexec') == '1':
+if d.getVarFlag('do_configure', 'noexec') == '1' or 'do_configure' not 
in d.getVar('__BBTASKS', False):
+pass
+else:
+bb.build.addtask('do_ar_configured', None, 'do_unpack_and_patch', 
d)
+d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' 
% pn)
+d.appendVarFlag('do_deploy_archives', 'depends', ' 
%s:do_ar_configured' % pn)
 elif ar_src:
 bb.fatal("Invalid ARCHIVER_MODE[src]: %s" % ar_src)
 
@@ -348,7 +358,6 @@ do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"
 
 addtask do_ar_original after do_unpack
 addtask do_ar_patched after do_unpack_and_patch
-addtask do_ar_configured after do_unpack_and_patch
 addtask do_dumpdata
 addtask do_ar_recipe
 addtask do_deploy_archives before do_build
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] archiver.bbclass: add bbappend when do_ar_recipe kernel and gcc packages

2015-11-13 Thread Jian Liu
bbappend files are not included in the archiver during do_ar_recipe.
Find and put them into the tarball.

Signed-off-by: Jian Liu 

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 1d17fc5..ccb5b09 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -369,6 +369,16 @@ python do_ar_recipe () {
 bb.utils.mkdirhier(outdir)
 shutil.copy(bbfile, outdir)
 
+pn = d.getVar('PN', True)
+bbappend_files = d.getVar('BBINCLUDED', True).split()
+# If recipe name is aa, we need to match files like aa.bbappend and 
aa_1.1.bbappend
+# Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
+bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn)
+bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn)
+for file in bbappend_files:
+if bbappend_re.match(file) or bbappend_re1.match(file):
+shutil.copy(file, outdir)
+
 dirname = os.path.dirname(bbfile)
 bbpath = '%s:%s' % (dirname, d.getVar('BBPATH', True))
 f = open(bbfile, 'r')
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] archiver.bbclass: do checkout for kernel

2015-11-13 Thread Jian Liu

Hi Raj,

I tried meta-rasberrypi with my patch and it works well.
The tasks of the recipe linux-rasberrypi is similar with linux-yocto and 
linux-rasberrypi also inherits linux-yocto.bbclass


I read the codes of archiver and it seems that kernel is recognised by 
"bb.data.inherits_class('kernel-yocto', d)" when kernel needs to be 
handled specially


What do you think?

Thanks!
Jian

On 2015年11月05日 10:22, Khem Raj wrote:

On Wed, Nov 4, 2015 at 6:14 PM, Jian Liu  wrote:

Hi,

All kernels I list bellow will perform do_fetch(), do_unpack(),
do_kernel_checkout().
do_unpack() will put a bare git repo under WORKDIR and then
do_kernel_checkout()
will move the bare repo to bitbake/tmp/work-share//kernel-source(value of variable S),
then performing "git checkout".

So do_ar_original must wait until do_kernel_checkout() is completed and then
make tarball using the code under S.
Do I make that clear?


You refer to kernels other than linux-yocto. Can you give me an example?
I do not know how to build such kernel.

Add another BSP layer e.g. meta-raspberrypi to your bblayers.conf
and then MACHINE=raspberrypi2

and see what you are trying to do still holds.


Thanks!
Jian


On 2015年11月04日 13:57, Khem Raj wrote:

On Nov 3, 2015, at 1:22 AM, Jian Liu  wrote:

Hi,

I test linux-dummy linux-yocto-dev linux-yocto-rt linux-yocto-tiny and
the result is as follows,

linux-dummy: this package just meets some dependency and there is no
source code for it.
  The patch does not impact it
linux-yocto, linux-yocto-dev, linux-yocto-rt, linux-yocto-tiny: The S
variable of all packages is set to STAGING_KERNEK_DIR.
   do_fetch and do_unpack just leave a bare git repo
of kernel and do_kernel_checkout gets the source code


does it cover the case when kernel is not linux-yocto was basic question,
I am not clear if thats covered in any of above


Thanks!




--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] sdk.py: fix conflicts of packages

2015-11-11 Thread Jian Liu
If packages are conveyed to smart to install at the same time,
conflicts will not happen.
Try to install packages into sdk image at the same time

Signed-off-by: Jian Liu 
---
 sdk.py |  108 +
 1 file changed, 96 insertions(+), 12 deletions(-)

diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index c57a441..f62d948 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -107,10 +107,38 @@ class RpmSdk(Sdk):
 pm.dump_all_available_pkgs()
 pm.update()
 
-for pkg_type in self.install_order:
-if pkg_type in pkgs_to_install:
-pm.install(pkgs_to_install[pkg_type],
-   [False, True][pkg_type == 
Manifest.PKG_TYPE_ATTEMPT_ONLY])
+except_pkgs = self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY', 
True).replace("*","").split()
+
+# Here is only a workaround. 
+# The packages are separated into 3 parts --- 
+# -- attempt only (in pkgs_to_install)
+# -- must install (in pkgs_to_install)
+# -- comlementary (add -dev and -dbg after the packages in 
pkgs_to_install)
+# If pkgs_to_install contains libxml2-dev and lib32-libxml2, the 
result will be
+# libxml2-dev is installed but lib32-libxml2-dev will not be.
+# Reason is that smart can not handle conflicts unless 
lib32-libxml2-dev and libxml2-dev
+# is installed at the same time. That is 
"pm.install('lib32-libxml2-dev libxml2-dev').
+# But the situation is "pm.install('lib32-libxml2-dev'); 
pm.install('libxml2-dev')"
+# Here try to put lib32-libxml2-dev and libxml2-dev in comlementary 
packages, so that 
+# they can be installed at the same time
+pkgs = []
+pkgs_attempt = []
+for pkg_type in pkgs_to_install:
+for pkg in pkgs_to_install[pkg_type]:
+for except_pkg in except_pkgs:
+if "packagegroup" not in pkg and pkg.endswith(except_pkg):
+pkg = pkg[:-len(except_pkg)]
+
+if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
+if pkg not in pkgs_attempt:
+pkgs_attempt.append(pkg)
+else:
+if pkg not in pkgs_attempt:
+pkgs.append(pkg)
+
+pm.install(pkgs)
+
+pm.install(pkgs_attempt, True)
 
 def _populate(self):
 bb.note("Installing TARGET packages")
@@ -184,10 +212,38 @@ class OpkgSdk(Sdk):
 
 pm.update()
 
-for pkg_type in self.install_order:
-if pkg_type in pkgs_to_install:
-pm.install(pkgs_to_install[pkg_type],
-   [False, True][pkg_type == 
Manifest.PKG_TYPE_ATTEMPT_ONLY])
+except_pkgs = self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY', 
True).replace("*","").split()
+
+# Here is only a workaround. 
+# The packages are separated into 3 parts --- 
+# -- attempt only (in pkgs_to_install)
+# -- must install (in pkgs_to_install)
+# -- comlementary (add -dev and -dbg after the packages in 
pkgs_to_install)
+# If pkgs_to_install contains libxml2-dev and lib32-libxml2, the 
result will be
+# libxml2-dev is installed but lib32-libxml2-dev will not be.
+# Reason is that smart can not handle conflicts unless 
lib32-libxml2-dev and libxml2-dev
+# is installed at the same time. That is 
"pm.install('lib32-libxml2-dev libxml2-dev').
+# But the situation is "pm.install('lib32-libxml2-dev'); 
pm.install('libxml2-dev')"
+# Here try to put lib32-libxml2-dev and libxml2-dev in comlementary 
packages, so that 
+# they can be installed at the same time
+pkgs = []
+pkgs_attempt = []
+for pkg_type in pkgs_to_install:
+for pkg in pkgs_to_install[pkg_type]:
+for except_pkg in except_pkgs:
+if "packagegroup" not in pkg and pkg.endswith(except_pkg):
+pkg = pkg[:-len(except_pkg)]
+
+if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
+if pkg not in pkgs_attempt:
+pkgs_attempt.append(pkg)
+else:
+if pkg not in pkgs_attempt:
+pkgs.append(pkg)
+
+pm.install(pkgs)
+
+pm.install(pkgs_attempt, True)
 
 def _populate(self):
 bb.note("Installing TARGET packages")
@@ -260,10 +316,38 @@ class DpkgSdk(Sdk):
 pm.write_index()
 pm.update()
 
-for pkg_type in self.install_order:
-if pkg_type in pkgs_to_install:
-pm.install(pkgs_to_install[pkg_type],
-   [False, Tr

Re: [OE-core] [PATCH] archiver.bbclass: do checkout for kernel

2015-11-04 Thread Jian Liu

Hi,

All kernels I list bellow will perform do_fetch(), do_unpack(), 
do_kernel_checkout().
do_unpack() will put a bare git repo under WORKDIR and then 
do_kernel_checkout()
will move the bare repo to bitbake/tmp/work-share/name>/kernel-source(value of variable S),

then performing "git checkout".

So do_ar_original must wait until do_kernel_checkout() is completed and 
then make tarball using the code under S.

Do I make that clear?


You refer to kernels other than linux-yocto. Can you give me an example?
I do not know how to build such kernel.

Thanks!
Jian

On 2015年11月04日 13:57, Khem Raj wrote:

On Nov 3, 2015, at 1:22 AM, Jian Liu  wrote:
>
>Hi,
>
>I test linux-dummy linux-yocto-dev linux-yocto-rt linux-yocto-tiny and the 
result is as follows,
>
>linux-dummy: this package just meets some dependency and there is no source 
code for it.
>  The patch does not impact it
>linux-yocto, linux-yocto-dev, linux-yocto-rt, linux-yocto-tiny: The S variable 
of all packages is set to STAGING_KERNEK_DIR.
>   do_fetch and do_unpack just leave a bare git repo of 
kernel and do_kernel_checkout gets the source code
>

does it cover the case when kernel is not linux-yocto was basic question, I am 
not clear if thats covered in any of above


>Thanks!


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] archiver.bbclass: do checkout for kernel

2015-11-03 Thread Jian Liu

Hi,

I test linux-dummy linux-yocto-dev linux-yocto-rt linux-yocto-tiny and 
the result is as follows,


linux-dummy: this package just meets some dependency and there is no 
source code for it.

  The patch does not impact it
linux-yocto, linux-yocto-dev, linux-yocto-rt, linux-yocto-tiny: The S 
variable of all packages is set to STAGING_KERNEK_DIR.
   do_fetch and do_unpack just leave a bare git 
repo of kernel and do_kernel_checkout gets the source code


Thanks!
Jian

On 2015年11月03日 05:30, Khem Raj wrote:

On Sun, Nov 1, 2015 at 10:23 PM, Jian Liu  wrote:

The repo of kernel is bare git repository and we need to checkout to get
the source code.

it should be linux-yocto I think, or do we have all kernels as bare git repos ?


Signed-off-by: Jian Liu 

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 41a552c..7387fbf 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -66,6 +66,11 @@ python () {
  ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True)

  if ar_src == "original":
+# For kernel, it is bare repo, we need to checkout
+if bb.data.inherits_class('kernel-yocto', d):
+bb.build.addtask('do_ar_original', 'do_kernel_metadata', 
'do_validate_branches', d)
+else:
+bb.build.addtask('do_ar_original', None, 'do_unpack', d)
  d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' 
% pn)
  elif ar_src == "patched":
  d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_patched' 
% pn)
@@ -113,6 +118,12 @@ python do_ar_original() {

  ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
  bb.note('Archiving the original source...')
+# For kernel, the source code is shared
+if bb.data.inherits_class('kernel-yocto', d):

is this linux-yocto specific


+srcdir = d.getVar('S', True)
+create_tarball(d, srcdir, 'original', ar_outdir)
+return
+
  fetch = bb.fetch2.Fetch([], d)
  for url in fetch.urls:
  local = fetch.localpath(url).rstrip("/");
@@ -346,7 +357,6 @@ python do_deploy_archives_setscene () {
  do_deploy_archives[sstate-inputdirs] = "${ARCHIVER_TOPDIR}"
  do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"

-addtask do_ar_original after do_unpack
  addtask do_ar_patched after do_unpack_and_patch
  addtask do_ar_configured after do_unpack_and_patch
  addtask do_dumpdata
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core




--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] archiver.bbclass: do checkout for kernel

2015-11-01 Thread Jian Liu
The repo of kernel is bare git repository and we need to checkout to get
the source code.

Signed-off-by: Jian Liu 

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 41a552c..7387fbf 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -66,6 +66,11 @@ python () {
 ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True)
 
 if ar_src == "original":
+# For kernel, it is bare repo, we need to checkout
+if bb.data.inherits_class('kernel-yocto', d):
+bb.build.addtask('do_ar_original', 'do_kernel_metadata', 
'do_validate_branches', d)
+else:
+bb.build.addtask('do_ar_original', None, 'do_unpack', d)
 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' 
% pn)
 elif ar_src == "patched":
 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_patched' % 
pn)
@@ -113,6 +118,12 @@ python do_ar_original() {
 
 ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
 bb.note('Archiving the original source...')
+# For kernel, the source code is shared
+if bb.data.inherits_class('kernel-yocto', d):
+srcdir = d.getVar('S', True)
+create_tarball(d, srcdir, 'original', ar_outdir)
+return
+
 fetch = bb.fetch2.Fetch([], d)
 for url in fetch.urls:
 local = fetch.localpath(url).rstrip("/");
@@ -346,7 +357,6 @@ python do_deploy_archives_setscene () {
 do_deploy_archives[sstate-inputdirs] = "${ARCHIVER_TOPDIR}"
 do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"
 
-addtask do_ar_original after do_unpack
 addtask do_ar_patched after do_unpack_and_patch
 addtask do_ar_configured after do_unpack_and_patch
 addtask do_dumpdata
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] insane.bbclass: Avoid libdir QA check if PACKAGE_DEBUG_SPLIT_STYLE='debug-file-directory'

2015-11-01 Thread Jian Liu
If PACKAGE_DEBUG_SPLIT_STYLE='debug-file-directory', debuglibdir will be
"/usr/lib/debug". Usually 64bit libs should be put under "/usr/lib64".
This often cause an warning, so skip the checking.

Signed-off-by: Jian Liu 
---
 meta/classes/insane.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index a77438d..138e8f9 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -307,6 +307,9 @@ def package_qa_check_libdir(d):
 if 'libdir' in (d.getVar('INSANE_SKIP_' + package, True) or 
"").split():
 bb.note("Package %s skipping libdir QA test" % (package))
 skippackages.append(package)
+elif d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 
'debug-file-directory' and package.endswith("-dbg"):
+bb.note("Package %s skipping libdir QA test for 
PACKAGE_DEBUG_SPLIT_STYLE equals debug-file-directory" % (package))
+skippackages.append(package)
 for package in skippackages:
 dirs.remove(package)
 for file in files:
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] base.bbclass: considering multilib when setting LICENSE_EXCLUSION

2015-10-07 Thread Jian Liu
The PACKAGES is not mapped with MLPREFIX when setting LICENSE_EXCLUSION
in base.bbclass. For example,
  For libgcc-dev,
LICENSE_EXCLUSION-libgcc-dev=1
   but for lib32-libgcc-dev,
LICENSE_EXCLUSION-libgcc-dev=1
Obviously it is wrong for lib32-libgcc-dev.

Add MLPREFIX before the package name during setting LICENSE_EXCLUSION

Signed-off-by: Jian Liu 
---
 meta/classes/base.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f078001..89c8f04 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -512,7 +512,8 @@ python () {
 if unskipped_pkgs:
 for pkg in skipped_pkgs:
 bb.debug(1, "SKIPPING the package " + pkg + " at 
do_rootfs because it's " + recipe_license)
-d.setVar('LICENSE_EXCLUSION-' + pkg, 1)
+mlprefix = d.getVar('MLPREFIX', True)
+d.setVar('LICENSE_EXCLUSION-' + mlprefix + pkg, 1)
 for pkg in unskipped_pkgs:
 bb.debug(1, "INCLUDING the package " + pkg)
 elif all_skipped or incompatible_license(d, bad_licenses):
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] sdk.py: fix conflicts of packages

2015-08-25 Thread Jian Liu
If packages are conveyed to smart to install at the same time,
conflicts will not happen.
Try to install packages into sdk image at the same time.

This patch is not so perfect. For example,
  IMAGE_INSTALL += "lib32-ncurses"
  IMAGE_INSTALL += "ncurses-dev"
 ncurses-dev and lib32-ncurses-dev will have conflicts during packages 
installation.

Signed-off-by: Jian Liu 
---
 sdk.py |   45 +
 1 file changed, 33 insertions(+), 12 deletions(-)

diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index c57a441..7b43a29 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -107,10 +107,17 @@ class RpmSdk(Sdk):
 pm.dump_all_available_pkgs()
 pm.update()
 
-for pkg_type in self.install_order:
-if pkg_type in pkgs_to_install:
-pm.install(pkgs_to_install[pkg_type],
-   [False, True][pkg_type == 
Manifest.PKG_TYPE_ATTEMPT_ONLY])
+pkgs = []
+pkgs_attempt = []
+for pkg_type in pkgs_to_install:
+if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
+pkgs_attempt += pkgs_to_install[pkg_type]
+else:
+pkgs += pkgs_to_install[pkg_type]
+
+pm.install(pkgs)
+
+pm.install(pkgs_attempt, True)
 
 def _populate(self):
 bb.note("Installing TARGET packages")
@@ -184,10 +191,17 @@ class OpkgSdk(Sdk):
 
 pm.update()
 
-for pkg_type in self.install_order:
-if pkg_type in pkgs_to_install:
-pm.install(pkgs_to_install[pkg_type],
-   [False, True][pkg_type == 
Manifest.PKG_TYPE_ATTEMPT_ONLY])
+pkgs = []
+pkgs_attempt = []
+for pkg_type in pkgs_to_install:
+if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
+pkgs_attempt += pkgs_to_install[pkg_type]
+else:
+pkgs += pkgs_to_install[pkg_type]
+
+pm.install(pkgs)
+
+pm.install(pkgs_attempt, True)
 
 def _populate(self):
 bb.note("Installing TARGET packages")
@@ -260,10 +274,17 @@ class DpkgSdk(Sdk):
 pm.write_index()
 pm.update()
 
-for pkg_type in self.install_order:
-if pkg_type in pkgs_to_install:
-pm.install(pkgs_to_install[pkg_type],
-   [False, True][pkg_type == 
Manifest.PKG_TYPE_ATTEMPT_ONLY])
+pkgs = []
+pkgs_attempt = []
+for pkg_type in pkgs_to_install:
+if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
+pkgs_attempt += pkgs_to_install[pkg_type]
+else:
+pkgs += pkgs_to_install[pkg_type]
+
+pm.install(pkgs)
+
+pm.install(pkgs_attempt, True)
 
 def _populate(self):
 bb.note("Installing TARGET packages")
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel-devsrc: missing tools for building modules

2015-06-30 Thread Jian Liu
Some tools under scripts are missed and this can cause error
during building modules on the target
Build these tools by "make script".

Also handle the .debug directories.

Signed-off-by: Jian Liu 
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
b/meta/recipes-kernel/linux/kernel-devsrc.bb
index dd65788..ff03d4e 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -57,6 +57,9 @@ do_install() {
 # architecture (since scripts and helpers are native format).
 KBUILD_OUTPUT="$kerneldir"
 oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean 
_mrproper_scripts
+# Tools under scripts/ is necessary.
+cross_tool_prefix=${@d.getVar('TARGET_RAW_PREFIX', True) or ""}
+make -C $kerneldir CROSS_COMPILE=$cross_tool_prefix scripts
 
 # As of Linux kernel version 3.0.1, the clean target removes
 # arch/powerpc/lib/crtsavres.o which is present in
@@ -71,6 +74,7 @@ do_install() {
 # Ensure we don't race against "make scripts" during cpio
 do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
 
-PACKAGES = "kernel-devsrc"
+PACKAGES = "kernel-devsrc-dbg kernel-devsrc"
+FILES_${PN}-dbg = "${KERNEL_SRC_PATH}/scripts/.debug 
${KERNEL_SRC_PATH}/scripts/*/.debug"
 FILES_${PN} = "${KERNEL_SRC_PATH}"
 RDEPENDS_${PN} = "bc"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] bootchart2: add dependency for bootchartd

2015-03-10 Thread Jian Liu
bootchartd use the command lsb_release and pidof during running, 
and also the two commands are not installed defaultly.
So add sysvinit-pidof and lsb in the RDEPENDS.

Signed-off-by: Jian Liu 
---
 meta/recipes-devtools/bootchart2/bootchart2_git.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/bootchart2/bootchart2_git.bb 
b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
index 04fb901..2c6d0ff 100644
--- a/meta/recipes-devtools/bootchart2/bootchart2_git.bb
+++ b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
@@ -136,6 +136,7 @@ do_install () {
 
 PACKAGES =+ "pybootchartgui"
 FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui 
${bindir}/pybootchartgui"
+RDEPENDS_bootchart2 = "sysvinit-pidof lsb"
 RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image 
python-textutils python-shell python-compression python-codecs"
 DEPENDS_append_class-native = " python-pycairo-native"
 
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] bootchart2: add dependency for bootchartd

2015-03-04 Thread Jian Liu
bootchartd use the command lsb_release and pidof during running, 
and also the two commands are not installed defaultly.
So add sysvinit-pidof and lsb in the RDEPENDS.

Signed-off-by: Jian Liu 
---
 meta/recipes-devtools/bootchart2/bootchart2_git.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/bootchart2/bootchart2_git.bb 
b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
index 04fb901..2c6d0ff 100644
--- a/meta/recipes-devtools/bootchart2/bootchart2_git.bb
+++ b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
@@ -136,6 +136,7 @@ do_install () {
 
 PACKAGES =+ "pybootchartgui"
 FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui 
${bindir}/pybootchartgui"
+RDEPENDS_${PN} = "sysvinit-pidof lsb"
 RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image 
python-textutils python-shell python-compression python-codecs"
 DEPENDS_append_class-native = " python-pycairo-native"
 
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] bootchart2: /sbin/bootchartd referencing wrong libdir

2015-03-03 Thread Jian Liu
- During do_compile(), LIBDIR is set with default vaule which
  is /lib. bootchartd will use LIBDIR to comprise the path of
  bootchart-collector when compiling.
  But during do_install(), LIBDIR is set to /lib64. The path
  that bootchart-collector is installed in is under LIBDIR

  So bootchartd can not find bootchart-collector.

  Set LIBDIR to /lib64 during both task to fix this inconsistence

- bootchartd depends the command lsb_release and pidof during
  running, so add sysvinit-pidof and lsb in the RDEPENDS

Signed-off-by: Jian Liu 
---
 meta/recipes-devtools/bootchart2/bootchart2_git.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/bootchart2/bootchart2_git.bb 
b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
index 04fb901..2c6d0ff 100644
--- a/meta/recipes-devtools/bootchart2/bootchart2_git.bb
+++ b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
@@ -120,6 +120,10 @@ do_compile_append_class-native () {
 chmod +x ${S}/pybootchartgui
 }
 
+do_compile_prepend () {
+export LIBDIR="${base_libdir}"
+}
+
 do_install () {
 install -d ${D}${sysconfdir} # needed for -native
 export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
@@ -136,6 +140,7 @@ do_install () {
 
 PACKAGES =+ "pybootchartgui"
 FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui 
${bindir}/pybootchartgui"
+RDEPENDS_${PN} = "sysvinit-pidof lsb"
 RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image 
python-textutils python-shell python-compression python-codecs"
 DEPENDS_append_class-native = " python-pycairo-native"
 
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] man: fix bugs of makewhatis script

2015-02-25 Thread Jian Liu
- man-1.6e-whatis2.patch does not delete the tail "fi"
  fix it to avoid syntax error
- Use the command "which" to get the path of awk

Signed-off-by: Jian Liu 
---
 meta/recipes-extended/man/man/man-1.6e-whatis2.patch |  7 +++
 meta/recipes-extended/man/man/man-1.6g-whatis3.patch | 20 
 meta/recipes-extended/man/man_1.6g.bb|  4 +++-
 3 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/man/man/man-1.6g-whatis3.patch

diff --git a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch 
b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
index 7f01383..f65971a 100644
--- a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
+++ b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
@@ -50,3 +50,10 @@ Index: man-1.6f/src/makewhatis.sh
 here=`pwd`
 cd $mandir
 for i in $sections
+@@ -447,7 +447,6 @@
+
+chmod 644 ${mandir1}/whatis
+rm $TMPFILE
+- fi
+done
+ done
diff --git a/meta/recipes-extended/man/man/man-1.6g-whatis3.patch 
b/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
new file mode 100644
index 000..145aeaf
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
@@ -0,0 +1,20 @@
+Do not use absolute path for awk while getting the path of awk
+when running makewhatis.
+This can avoid errors if path of awk changes.
+
+Upstream-Status: Submitted [man-1.6g]
+
+Signed-off-by: Jian Liu 
+
+diff -Nur man-1.6g.orig/src/makewhatis.sh man-1.6g/src/makewhatis.sh
+--- man-1.6g.orig/src/makewhatis.sh2015-02-25 16:13:12.657611419 +0800
 man-1.6g/src/makewhatis.sh 2015-02-25 16:14:49.334694815 +0800
+@@ -67,7 +67,7 @@
+ # but that leads to problems and bugs.
+
+ # AWK=/usr/bin/gawk
+-AWK=@awk@
++AWK=`which awk`
+
+ # Find a place for our temporary files. If security is not a concern, use
+ # TMPFILE=/tmp/whatis$$; TMPFILEDIR=none
diff --git a/meta/recipes-extended/man/man_1.6g.bb 
b/meta/recipes-extended/man/man_1.6g.bb
index a2b16d2..917fd50 100644
--- a/meta/recipes-extended/man/man_1.6g.bb
+++ b/meta/recipes-extended/man/man_1.6g.bb
@@ -38,7 +38,9 @@ SRC_URI = 
"http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \
file://man.1.gz;unpack=false \
file://man.7.gz;unpack=false \
file://man.conf \
-   file://manpath.5.gz;unpack=false"
+   file://manpath.5.gz;unpack=false \
+   file://man-1.6g-whatis3.patch \
+"

 SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
 SRC_URI[sha256sum] = 
"ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f"
--
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] archiver: archived files contain symbol link files

2015-01-06 Thread Jian Liu
The archived files contains symbol link files. These files
can not be accessed out of the building host. Copy files
instead of creating symbol link when archiving.

Signed-off-by: Jian Liu 
---
 meta/lib/oe/patch.py | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index b838be8..324a37e 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -432,7 +432,15 @@ class QuiltTree(PatchSet):
 if not self.initialized:
 self.InitFromDir()
 PatchSet.Import(self, patch, force)
-oe.path.symlink(patch["file"], self._quiltpatchpath(patch["file"]), 
force=True)
+
+# if archiver work is being done, symbol link can not be used
+src_file = patch["file"]
+des_file = self._quiltpatchpath(patch["file"])
+if "archiver" in des_file:
+   os.system("cp %s %s"%(src_file,des_file))
+else:
+   oe.path.symlink(src_file, des_file, force=True)
+
 f = open(os.path.join(self.dir, "patches","series"), "a");
 f.write(os.path.basename(patch["file"]) + " -p" + 
patch["strippath"]+"\n")
 f.close()
-- 
1.8.3.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 5/5] nfs-utils: avoid overwritting editable files during package updating

2014-11-21 Thread Jian Liu
Use CONFFILES to mark editable files as such,
  /var/lib/nfs/etab
  /var/lib/nfs/statd/state
  /var/lib/nfs/rmtab

If there is no %config micro before the file name in the spec file,
this file will be overwritten after updating package. 
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb 
b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
index 8ead5d0..3e2d183 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
@@ -114,3 +114,5 @@ do_install_append () {
rm -f ${D}${sbindir}/rpcgen
rm -f ${D}${sbindir}/locktest
 }
+
+CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab 
${localstatedir}/lib/nfs/statd/state ${localstatedir}/lib/nfs/rmtab"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 4/5] libpam: avoid overwritting editable files during package updating

2014-11-21 Thread Jian Liu
Use CONFFILES to mark editable files as such,
  /etc/pam.d/common-session 
  /etc/pam.d/common-auth
  /etc/pam.d/common-password
  /etc/pam.d/common-session-noninteractive
  /etc/pam.d/common-account

If there is no %config micro before the file name in the spec file,
this file will be overwritten after updating package. 
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-extended/pam/libpam_1.1.6.bb | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb 
b/meta/recipes-extended/pam/libpam_1.1.6.bb
index 3b6d514..b3b39da 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -163,3 +163,9 @@ python do_pam_sanity () {
 addtask pam_sanity before do_configure
 
 BBCLASSEXTEND = "nativesdk native"
+
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 1/5] base-files: avoid overwritting editable files during package updating

2014-11-21 Thread Jian Liu
Use CONFFILES to mark editable files as such,
  /etc/motd
  /etc/nsswitch.conf 
  /etc/profile

If there is no %config micro before the file name in the spec file,
this file will be overwritten after updating package. 
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb 
b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 07f5c54..6157ff3 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -151,4 +151,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', 
'${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} 
${sysconfdir}/shells"
+CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf 
${sysconfdir}/profile"
 
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 0/6] Avoid overwritting editable files during package updating

2014-11-21 Thread Jian Liu
For example, if updating base-files with a new version of rpm, the file 
/etc/nsswitch.conf which is created by base-files will be substituted by a new 
file.

This is not what we want since our configuration may be lost after updating. 

A resolution is to revise spec file of rpm and put %config before config files 
like "%config /etc/nsswitch.conf".

Theoretically all editable files should be protected with "%config". But 
currently 
we only concern about the following packages:
  base-files
  initscripts
  logrotate
  lvm2
  libpam
  nfs-utils

---
 recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb |2 ++
 recipes-core/base-files/base-files_3.0.14.bb  |1 +
 recipes-core/initscripts/initscripts_1.0.bb   |2 ++
 recipes-extended/logrotate/logrotate_3.8.7.bb |2 ++
 recipes-extended/pam/libpam_1.1.6.bb  |6 ++
 5 files changed, 13 insertions(+)


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 3/5] logrotate: avoid overwritting editable files during package updating

2014-11-21 Thread Jian Liu
Use CONFFILES to mark editable files as such,
  /var/lib/logrotate.status

If there is no %config micro before the file name in the spec file,
this file will be overwritten after updating package. 
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-extended/logrotate/logrotate_3.8.7.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb 
b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
index faa8e02..8b39602 100644
--- a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
@@ -54,3 +54,5 @@ do_install(){
 install -p -m 755 examples/logrotate.cron 
${D}${sysconfdir}/cron.daily/logrotate
 touch ${D}${localstatedir}/lib/logrotate.status
 }
+
+CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH V2 2/5] initscripts: avoid overwritting editable files during package updating

2014-11-21 Thread Jian Liu
Use CONFFILES to mark editable files as such,
  /etc/init.d/checkroot.sh

If there is no %config micro before the file name in the spec file,
this file will be overwritten after updating package. 
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-core/initscripts/initscripts_1.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb 
b/meta/recipes-core/initscripts/initscripts_1.0.bb
index a665acf..afdc538 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -162,3 +162,5 @@ pkg_postinst_${PN} () {
done
fi
 }
+
+CONFFILES_${PN} += "${sysconfdir}/init.d/checkroot.sh"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lsof: the compiler version fault

2014-11-19 Thread Jian Liu
When using cross compiler to build the package "lsof" on a host,
the value of LSOF_CCV in version.h genegrated by the Makefile
is the version of the compiler on the host while it should be
the version of cross compiler.

Signed-off-by: Jian Liu 
---
 .../lsof/files/compiler-version-fault.patch | 13 +
 meta/recipes-extended/lsof/lsof_4.87.bb |  4 +++-
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-extended/lsof/files/compiler-version-fault.patch

diff --git a/meta/recipes-extended/lsof/files/compiler-version-fault.patch 
b/meta/recipes-extended/lsof/files/compiler-version-fault.patch
new file mode 100644
index 000..bf22f4b
--- /dev/null
+++ b/meta/recipes-extended/lsof/files/compiler-version-fault.patch
@@ -0,0 +1,13 @@
+diff -Nur lsof_4.87_src.orig/dialects/linux/Makefile 
lsof_4.87_src/dialects/linux/Makefile
+--- lsof_4.87_src.orig/dialects/linux/Makefile 2008-04-15 21:30:04.0 
+0800
 lsof_4.87_src/dialects/linux/Makefile  2014-09-09 14:15:27.208165334 
+0800
+@@ -77,7 +77,8 @@
+   @rm -f version.h
+   @echo '#define  LSOF_BLDCMT "${LSOF_BLDCMT}"' > version.h;
+   @echo '#define  LSOF_CC "${CC}"' >> version.h
+-  @echo '#define  LSOF_CCV"${CCV}"' >> version.h
++  @LSOF_CCV=`${CC} -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` &&\
++  echo "#define   LSOF_CCV\"$${LSOF_CCV}\"" >> version.h
+   @echo '#define  LSOF_CCDATE "'`date`'"' >> version.h
+   @echo '#define  LSOF_CCFLAGS"'`echo ${CFLAGS} | sed 's/(/\\(/g' 
| sed 's/)/\\)/g' | sed 's/"/"/g'`'"' >> version.h
+   @echo '#define  LSOF_CINFO  "${CINFO}"' >> version.h
diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb 
b/meta/recipes-extended/lsof/lsof_4.87.bb
index 03fee16..9de3f33 100644
--- a/meta/recipes-extended/lsof/lsof_4.87.bb
+++ b/meta/recipes-extended/lsof/lsof_4.87.bb
@@ -5,7 +5,9 @@ SECTION = "devel"
 LICENSE = "BSD"
 PR = "r0"
 
-SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2";
+SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2 \
+   file://compiler-version-fault.patch \
+   "
 
 SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c"
 SRC_URI[sha256sum] = 
"dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/5] base-files: files will be over written when updating using rpm

2014-11-14 Thread Jian Liu
If there is no %config micro before the file in the spec file,
this file will be over-written after updating this package
using rpm.
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb 
b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 07f5c54..6157ff3 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -151,4 +151,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', 
'${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} 
${sysconfdir}/shells"
+CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf 
${sysconfdir}/profile"
 
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/5] libpam: files will be over written when updating using rpm

2014-11-14 Thread Jian Liu
If there is no %config micro before the file in the spec file,
this file will be over-written after updating this package
using rpm.
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-extended/pam/libpam_1.1.6.bb | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb 
b/meta/recipes-extended/pam/libpam_1.1.6.bb
index 3b6d514..b3b39da 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -163,3 +163,9 @@ python do_pam_sanity () {
 addtask pam_sanity before do_configure
 
 BBCLASSEXTEND = "nativesdk native"
+
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/5] logrotate: files will be over written when updating using rpm

2014-11-14 Thread Jian Liu
If there is no %config micro before the file in the spec file,
this file will be over-written after updating this package
using rpm.
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-extended/logrotate/logrotate_3.8.7.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb 
b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
index faa8e02..8b39602 100644
--- a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
@@ -54,3 +54,5 @@ do_install(){
 install -p -m 755 examples/logrotate.cron 
${D}${sysconfdir}/cron.daily/logrotate
 touch ${D}${localstatedir}/lib/logrotate.status
 }
+
+CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 5/5] nfs-utils: files will be over written when updating using rpm

2014-11-14 Thread Jian Liu
If there is no %config micro before the file in the spec file,
this file will be over-written after updating this package
using rpm.
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb 
b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
index 8ead5d0..3e2d183 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
@@ -114,3 +114,5 @@ do_install_append () {
rm -f ${D}${sbindir}/rpcgen
rm -f ${D}${sbindir}/locktest
 }
+
+CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab 
${localstatedir}/lib/nfs/statd/state ${localstatedir}/lib/nfs/rmtab"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/6] Avoid config files being overwritten

2014-11-14 Thread Jian Liu
Configure files and scripts may be over written when updating packages with rpm.

For example, if updating base-files with a new version of rpm, the file 
/etc/nsswitch.conf which is created by base-files will be substituted by a new 
file.

This is not what we want since our config files may be lost after updating. 

A resolution is to revise spec file of rpm and put %config before config files 
like "%config /etc/nsswitch.conf".

Theoretically all editable files created by rpm packages should be protected 
with "%config". But currently we only concern about the following packages:
  base-files
  initscripts
  logrotate
  lvm2
  libpam
  nfs-utils

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/5] initscripts: files will be over written when updating using rpm

2014-11-14 Thread Jian Liu
If there is no %config micro before the file in the spec file,
this file will be over-written after updating this package
using rpm.
This will make our settings lost.

Signed-off-by: Jian Liu 
---
 meta/recipes-core/initscripts/initscripts_1.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb 
b/meta/recipes-core/initscripts/initscripts_1.0.bb
index a665acf..afdc538 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -162,3 +162,5 @@ pkg_postinst_${PN} () {
done
fi
 }
+
+CONFFILES_${PN} += "${sysconfdir}/init.d/checkroot.sh"
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core