[OE-core] [PATCH] unfs3: fixed the issue that unfsd consumes 100% CPU

2019-10-23 Thread Haiqing Bai
The 'accept' function on the socket of unfsd daemon
is always in below error state:
accept(4, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument)
accept(6, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument)

And 'strace -c -p ' shows:
% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 70.870.005392   0513886513886 accept
 29.130.002216   0256943   poll

This error state is in the 'for' loop of the daemon, so it consumes 100%
CPU. The reason is that 'listen' is not called for the TCP socket before
'accept'. Actually the called 'svc_tli_create' from libtirpc will not call
'listen' on a bound socket.

Signed-off-by: Haiqing Bai 
---
 .../0001-Add-listen-action-for-a-tcp-socket.patch  | 54 ++
 meta/recipes-devtools/unfs3/unfs3_git.bb   |  1 +
 2 files changed, 55 insertions(+)
 create mode 100644 
meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch

diff --git 
a/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch
 
b/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch
new file mode 100644
index 000..e9b9d3d
--- /dev/null
+++ 
b/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch
@@ -0,0 +1,54 @@
+From b42ab8e1aca951dd06c113159491b3fd5cf06f2e Mon Sep 17 00:00:00 2001
+From: Haiqing Bai 
+Date: Thu, 24 Oct 2019 09:39:04 +0800
+Subject: [PATCH] Add "listen" action for a tcp socket which does not call
+ 'listen' after 'bind'
+
+It is found that /usr/bin/unfsd customus 100% cpu after starting qemu with 
'nfs'
+option, and below lots of error messages shows when strace the process:
+
+poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=4, 
events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},
+{fd=5, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=6, events 
=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}],
+4, 2000) = 2 ([{fd=4, revents=POLLHUP},{fd=6, revents=POLLHUP}])
+accept(4, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument)
+accept(6, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument)
+
+% time seconds  usecs/call callserrors syscall
+-- --- --- - - 
+ 70.870.005392   0513886513886 accept
+ 29.130.002216   0256943   poll
+  0.000.00   0 4   read
+
+The root cause is that 'listen' is not called for the binded
+socket. The depended libtipc does not call 'listen' if found
+the incomming socket is binded, so 'accept' reports the error
+in the 'for' loop and cpu consumed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haiqing Bai 
+---
+ daemon.c | 7 +++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/daemon.c b/daemon.c
+index 028a181..4c85903 100644
+--- a/daemon.c
 b/daemon.c
+@@ -814,6 +814,13 @@ static SVCXPRT *create_tcp_transport(unsigned int port)
+   fprintf(stderr, "Couldn't bind to tcp port %d\n", port);
+   exit(1);
+   }
++
++  if (listen(sock, SOMAXCONN) < 0) {
++  perror("listen");
++  fprintf(stderr, "Couldn't listen on the address \n");
++  close(sock);
++  exit(1);
++  }
+ }
+ 
+ transp = svctcp_create(sock, 0, 0);
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/unfs3/unfs3_git.bb 
b/meta/recipes-devtools/unfs3/unfs3_git.bb
index 79d0978..d60cee8 100644
--- a/meta/recipes-devtools/unfs3/unfs3_git.bb
+++ b/meta/recipes-devtools/unfs3/unfs3_git.bb
@@ -23,6 +23,7 @@ SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https \
file://tcp_no_delay.patch \
file://0001-daemon.c-Libtirpc-porting-fixes.patch \
file://0001-attr-fix-utime-for-symlink.patch \
+   file://0001-Add-listen-action-for-a-tcp-socket.patch \
   "
 SRCREV = "c12a5c69a8d59be6916cbd0e0f41c159f1962425"
 UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P.+)"
-- 
1.9.1

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


[OE-core] [PATCH] sysstat:The sysstat.service in source should be installed for cron with systemd

2019-07-02 Thread Haiqing Bai
The sysstat.service script in source launchs sysstat-collect and sysstat-summary
services when cron is installed with systemd. At this time, the upstream
sysstat.service must be installed.

Signed-off-by: Haiqing Bai 
---
 meta/recipes-extended/sysstat/sysstat.inc | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/sysstat/sysstat.inc 
b/meta/recipes-extended/sysstat/sysstat.inc
index 4e29721..592cbf4 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -20,6 +20,7 @@ inherit autotools-brokensep gettext systemd 
upstream-version-is-even
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lm-sensors] = 
"--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
 PACKAGECONFIG[cron] = "--enable-install-cron 
--enable-copy-only,--disable-install-cron --disable-copy-only"
+PACKAGECONFIG[systemd] = 
"--with-systemdsystemunitdir=${systemd_system_unitdir}"
 
 EXTRA_OECONF += "--disable-stripping"
 
@@ -44,11 +45,13 @@ do_install() {
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d ${localstatedir}/log/sa - - - -" \
 > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
-   fi
 
-   install -d ${D}${systemd_unitdir}/system
-   install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
-   sed -i -e 's#@LIBDIR@#${libdir}#g' 
${D}${systemd_unitdir}/system/sysstat.service
+   if ${@bb.utils.contains('PACKAGECONFIG', 'cron', 'false', 
'true', d)}; then
+   install -d ${D}${systemd_unitdir}/system
+   install -m 0644 ${WORKDIR}/sysstat.service 
${D}${systemd_unitdir}/system
+   sed -i -e 's#@LIBDIR@#${libdir}#g' 
${D}${systemd_unitdir}/system/sysstat.service
+   fi
+   fi
 }
 
 pkg_postinst_${PN} () {
-- 
1.9.1

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


[OE-core] [V2][PATCH] kernel.bbclass: Make task clean depend on cleaning of make-mod-scripts

2019-06-10 Thread Haiqing Bai
The package 'make-mod-scripts' creates files in 
'kernel-build-artifacts/include/config'
which are removed by 'cleanall/cleansstate' of 'virtual/kernel'. And this 
causes the
below error while building out of tree kernel module:
ERROR: Kernel configuration is invalid.
  include/generated/autoconf.h or include/config/auto.conf are missing.
  Run 'make oldconfig && make prepare' on kernel src to fix it.

Suggested-by: Jun Nie 

Signed-off-by: Haiqing Bai 
---
 meta/classes/kernel.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 111a0b2..a60e15b 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -8,6 +8,7 @@ DEPENDS += "virtual/${TARGET_PREFIX}binutils 
virtual/${TARGET_PREFIX}gcc kmod-na
 PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
 
 do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"
+do_clean[depends] += "make-mod-scripts:do_clean"
 
 CVE_PRODUCT ?= "linux_kernel"
 
-- 
1.9.1

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


[OE-core] [PATCH] make-mod-scripts: Add nostamp flag on configure task

2019-05-24 Thread Haiqing Bai
Error appears while building out of tree kernel module
after recompiling the kernel:
bitbake -c cleanall/cleansstate virtual/kernel
bitbake -c cleanall/cleansstate hello-mod
bitbake virtual/kernel
bitbake hello-mod

ERROR: Kernel configuration is invalid.
   include/generated/autoconf.h or include/config/auto.conf are missing.
   Run 'make oldconfig && make prepare' on kernel src to fix it.
error: 'struct pt_regs' has no member named 'ds'; did you mean 'dx'?

make-mod-scripts must be forced to rebuild in this case to generate
config data in 'kernel-build-artifacts/include/config'

Signed-off-by: Haiqing Bai 
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb 
b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
index 97c58c5233..f55104070d 100644
--- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
+++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -12,6 +12,8 @@ S = "${WORKDIR}"
 do_configure[depends] += "virtual/kernel:do_shared_workdir 
openssl-native:do_populate_sysroot"
 do_compile[depends] += "virtual/kernel:do_compile_kernelmodules"
 
+do_configure[nostamp] = "1"
+
 DEPENDS += "bc-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" 
HOSTCPP="${BUILD_CPP}""
-- 
2.13.3

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


[OE-core] [V4][Oe-core][PATCH] sysstat: Add PACKAGECONFIG[cron] for '--enable-install-cron' option

2019-05-15 Thread Haiqing Bai
If 'cron' is added into PACKAGECONFIG, for sysvinit, the related
cron scripts will be installed; for systemd, the services of
data collect and summary will be installed.

Signed-off-by: Haiqing Bai 
---
 meta/recipes-extended/sysstat/sysstat.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/sysstat/sysstat.inc 
b/meta/recipes-extended/sysstat/sysstat.inc
index 0bc7e14d36..79555e6cf3 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -19,6 +19,7 @@ inherit autotools-brokensep gettext systemd
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lm-sensors] = 
"--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
+PACKAGECONFIG[cron] = "--enable-install-cron 
--enable-copy-only,--disable-install-cron --disable-copy-only"
 
 EXTRA_OECONF += "--disable-stripping"
 
@@ -59,7 +60,6 @@ pkg_postinst_${PN} () {
 fi
 }
 
-
-FILES_${PN} += "${libdir}/sa"
+FILES_${PN} += "${libdir}/sa ${systemd_system_unitdir}"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
-- 
2.18.1

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


[OE-core] [V3][Oe-core][PATCH] sysstat: Add PACKAGECONFIG[cron] for '--enable-install-cron' option

2019-05-15 Thread Haiqing Bai
If 'cron' is added into PACKAGECONFIG, for sysvinit, the related
cron scripts will be installed; for systemd, the services of
data collect and summary will be installed.

Signed-off-by: Haiqing Bai 
---
 meta/recipes-extended/sysstat/sysstat.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/sysstat/sysstat.inc 
b/meta/recipes-extended/sysstat/sysstat.inc
index 0bc7e14d36..79555e6cf3 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -19,6 +19,7 @@ inherit autotools-brokensep gettext systemd
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lm-sensors] = 
"--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
+PACKAGECONFIG[cron] = "--enable-install-cron 
--enable-copy-only,--disable-install-cron --disable-copy-only"
 
 EXTRA_OECONF += "--disable-stripping"
 
@@ -59,7 +60,6 @@ pkg_postinst_${PN} () {
 fi
 }
 
-
-FILES_${PN} += "${libdir}/sa"
+FILES_${PN} += "${libdir}/sa ${systemd_unitdir}/system/*"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
-- 
2.18.1

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


[OE-core] [V2][PATCH] sysstat:Add PACKAGECONFIG for '--enable-install-cron' configure

2019-04-19 Thread Haiqing Bai
Add PACKAGECONFIG[cron] for configure option: '--enable-install-cron'
and remove the code of enable/disable sysstat.service in Makefile.in
which is not available for embedded cross compiling.

Signed-off-by: Haiqing Bai 
---
 meta/recipes-extended/sysstat/sysstat.inc  |  4 +-
 ...code-of-handling-enable-disable-self-star.patch | 55 ++
 meta/recipes-extended/sysstat/sysstat_11.7.1.bb|  3 +-
 3 files changed, 59 insertions(+), 3 deletions(-)
 create mode 100644 
meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch

diff --git a/meta/recipes-extended/sysstat/sysstat.inc 
b/meta/recipes-extended/sysstat/sysstat.inc
index 0bc7e14..83a9202 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -17,8 +17,8 @@ DEPENDS += "base-passwd"
 # autotools-brokensep as this package doesn't use automake
 inherit autotools-brokensep gettext systemd
 
-PACKAGECONFIG ??= ""
 PACKAGECONFIG[lm-sensors] = 
"--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
+PACKAGECONFIG[cron] = "--enable-install-cron,--disable-install-cron"
 
 EXTRA_OECONF += "--disable-stripping"
 
@@ -60,6 +60,6 @@ pkg_postinst_${PN} () {
 }
 
 
-FILES_${PN} += "${libdir}/sa"
+FILES_${PN} += "${libdir}/sa ${systemd_unitdir}/system/*"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
diff --git 
a/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
 
b/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
new file mode 100644
index 000..1d099c9
--- /dev/null
+++ 
b/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
@@ -0,0 +1,55 @@
+From 85813d1648b03ba0497635c45e90d7edf4dc204c Mon Sep 17 00:00:00 2001
+From: Haiqing Bai 
+Date: Fri, 29 Mar 2019 11:00:09 +0800
+Subject: [PATCH] Remove the code of handling enable/disable self-start service
+ in Makefile.in
+
+Remove the handling of enable/disable sysstat.service self-start in 
Makefile.in.
+The code will trigger below error when cross compiling with
+'--enable-install-cron':
+| if [ -x "/path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl" 
]; then \
+|   /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl 
enable sysstat.service; \
+| fi
+| Started /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl 
enable sysstat.service
+| Try to find location of sysstat.service...
+| 'sysstat.service' couldn't be found; exiting with error
+
+It's better for user to enable/disable the service with
+'systemctl enable/disable sysstat.service'
+
+Upstream-Status: Inappropriate [ embedded specific ]
+
+Signed-off-by: Haiqing Bai 
+---
+ Makefile.in | 8 
+ 1 file changed, 8 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index edaea3f..2186155 100644
+--- a/Makefile.in
 b/Makefile.in
+@@ -454,11 +454,6 @@ endif
+   fi \
+   fi \
+   fi
+-ifeq ($(COPY_ONLY),n)
+-  if [ -x "$(SYSTEMCTL)" ]; then \
+-  $(SYSTEMCTL) enable sysstat.service; \
+-  fi
+-endif
+ 
+ uninstall_man:
+ ifeq ($(INSTALL_DOC),y)
+@@ -541,9 +536,6 @@ ifeq ($(COPY_ONLY),n)
+   @echo "USER'S CRONTAB SAVED IN CURRENT DIRECTORY (USING .old 
SUFFIX)." ; \
+   -su $(CRON_OWNER) -c "crontab -r" ; \
+   fi
+-  if [ -x $(SYSTEMCTL) ]; then \
+-  $(SYSTEMCTL) disable sysstat.service; \
+-  fi
+ endif
+   if [ -n "$(SYSTEMD_UNIT_DIR)" -a -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) ]; 
then \
+   rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysstat.service; \
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/sysstat/sysstat_11.7.1.bb 
b/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
index 86738e7..26be619 100644
--- a/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
+++ b/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
@@ -2,7 +2,8 @@ require sysstat.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
 
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch \
+   file://0001-Remove-the-code-of-handling-enable-disable-self-star.patch"
 
 SRC_URI[md5sum] = "bdcda7c9048c7c22fb1f30f75285d13d"
 SRC_URI[sha256sum] = 
"303a595b1af0330b183a0f1febfccf89f183b9575ae0562b91fdb876f3ef1feb"
-- 
1.9.1

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


[OE-core] [PATCH] sysstat: Fixed the compiling error when configured with '--enable-install-cron'

2019-04-03 Thread Haiqing Bai
Remove the handling of enable/disable sysstat.service self-start in Makefile.in.
The code will trigger below error when cross compiling with
'--enable-install-cron':
| if [ -x "/path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl" 
]; then \
|   /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl 
enable sysstat.service; \
| fi
| Started /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl 
enable sysstat.service
| Try to find location of sysstat.service...
| 'sysstat.service' couldn't be found; exiting with error

It's better to let user enable/disable the service with
'systemctl enable/disable sysstat.service'

Signed-off-by: Haiqing Bai 
---
 ...code-of-handling-enable-disable-self-star.patch | 55 ++
 meta/recipes-extended/sysstat/sysstat_11.7.1.bb|  3 +-
 2 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch

diff --git 
a/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
 
b/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
new file mode 100644
index 000..1d099c9
--- /dev/null
+++ 
b/meta/recipes-extended/sysstat/sysstat/0001-Remove-the-code-of-handling-enable-disable-self-star.patch
@@ -0,0 +1,55 @@
+From 85813d1648b03ba0497635c45e90d7edf4dc204c Mon Sep 17 00:00:00 2001
+From: Haiqing Bai 
+Date: Fri, 29 Mar 2019 11:00:09 +0800
+Subject: [PATCH] Remove the code of handling enable/disable self-start service
+ in Makefile.in
+
+Remove the handling of enable/disable sysstat.service self-start in 
Makefile.in.
+The code will trigger below error when cross compiling with
+'--enable-install-cron':
+| if [ -x "/path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl" 
]; then \
+|   /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl 
enable sysstat.service; \
+| fi
+| Started /path/to/sysstat/11.7.1-r0/recipe-sysroot-native/usr/bin/systemctl 
enable sysstat.service
+| Try to find location of sysstat.service...
+| 'sysstat.service' couldn't be found; exiting with error
+
+It's better for user to enable/disable the service with
+'systemctl enable/disable sysstat.service'
+
+Upstream-Status: Inappropriate [ embedded specific ]
+
+Signed-off-by: Haiqing Bai 
+---
+ Makefile.in | 8 
+ 1 file changed, 8 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index edaea3f..2186155 100644
+--- a/Makefile.in
 b/Makefile.in
+@@ -454,11 +454,6 @@ endif
+   fi \
+   fi \
+   fi
+-ifeq ($(COPY_ONLY),n)
+-  if [ -x "$(SYSTEMCTL)" ]; then \
+-  $(SYSTEMCTL) enable sysstat.service; \
+-  fi
+-endif
+ 
+ uninstall_man:
+ ifeq ($(INSTALL_DOC),y)
+@@ -541,9 +536,6 @@ ifeq ($(COPY_ONLY),n)
+   @echo "USER'S CRONTAB SAVED IN CURRENT DIRECTORY (USING .old 
SUFFIX)." ; \
+   -su $(CRON_OWNER) -c "crontab -r" ; \
+   fi
+-  if [ -x $(SYSTEMCTL) ]; then \
+-  $(SYSTEMCTL) disable sysstat.service; \
+-  fi
+ endif
+   if [ -n "$(SYSTEMD_UNIT_DIR)" -a -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) ]; 
then \
+   rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysstat.service; \
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/sysstat/sysstat_11.7.1.bb 
b/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
index 86738e7..26be619 100644
--- a/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
+++ b/meta/recipes-extended/sysstat/sysstat_11.7.1.bb
@@ -2,7 +2,8 @@ require sysstat.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
 
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch \
+   file://0001-Remove-the-code-of-handling-enable-disable-self-star.patch"
 
 SRC_URI[md5sum] = "bdcda7c9048c7c22fb1f30f75285d13d"
 SRC_URI[sha256sum] = 
"303a595b1af0330b183a0f1febfccf89f183b9575ae0562b91fdb876f3ef1feb"
-- 
1.9.1

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


[OE-core] [PATCH] ifupdown: fix issue that ifupdown does not configure local interface

2018-07-11 Thread Haiqing Bai
The patch "inet-6-.defn-fix-inverted-checks-for-loopback.patch" is not
needed for ifupdown-0.8.16. And it causes the issue that ifupdown can
not configure the loopback interface like:
$cat /etc/network/interfaces
auto lo
iface lo inet loopback
$ifconfig shows all up interfaces including 'lo'
$ifup lo
ifup: interface lo already configured
$ifdown lo
$ifconfig still shows the up interface 'lo'

The function of ifup/ifdown depends on '/bin/ip' which is provided by
iproute2, so here add this runtime dependency.

Signed-off-by: Haiqing Bai 
---
 meta/recipes-core/ifupdown/ifupdown_0.8.16.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb 
b/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
index e9f3a2a..f91831f 100644
--- a/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
+++ b/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
@@ -8,13 +8,13 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 SRC_URI = "git://salsa.debian.org/debian/ifupdown.git;protocol=https \
   file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
-  file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
   file://99_network \
  "
 SRCREV = "11b9f99f7ecc7052497e6786156cfed531f11823"
 
 S = "${WORKDIR}/git"
 
+RDEPENDS_${PN} = "iproute2"
 
 inherit update-alternatives
 
-- 
1.9.1

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


[OE-core] [PATCH] iproute2: create symbol link '/bin/ip' to '/sbin/ip.iproute2'

2018-07-11 Thread Haiqing Bai
Some applications which depend on iproute/iproute2 need to
run '/sbin/ip.iproute2' through the symbol link '/bin/ip'
e.g ifupdown.

Signed-off-by: Haiqing Bai 
---
 meta/recipes-connectivity/iproute2/iproute2.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc 
b/meta/recipes-connectivity/iproute2/iproute2.inc
index 4fbfec6f08..71d04a1021 100644
--- a/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -29,6 +29,8 @@ do_configure_append () {
 do_install () {
 oe_runmake DESTDIR=${D} install
 mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
+install -d ${D}${base_bindir}
+ln -s ${base_sbindir}/ip.iproute2 ${D}${base_bindir}/ip
 install -d ${D}${datadir}
 mv ${D}/share/* ${D}${datadir}/ || true
 rm ${D}/share -rf || true
-- 
2.13.3

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


[OE-core] [V2][PATCH] grep: support Perl regular expression

2018-01-22 Thread Haiqing Bai
Supporting Perl regular expression is disabled with '--disable-perl-regexp'
but the manpage of 'grep' shows the '-P' option and returns below error:
"/bin/grep.grep -o -P 'PATTERN' file
 /bin/grep.grep: support for the -P option is not compiled into this \
   --disable-perl-regexp binary"

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 meta/recipes-extended/grep/grep_3.1.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/grep/grep_3.1.bb 
b/meta/recipes-extended/grep/grep_3.1.bb
index 05b6b93..71810dc 100644
--- a/meta/recipes-extended/grep/grep_3.1.bb
+++ b/meta/recipes-extended/grep/grep_3.1.bb
@@ -14,8 +14,6 @@ SRC_URI[sha256sum] = 
"db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2b
 
 inherit autotools gettext texinfo pkgconfig
 
-EXTRA_OECONF = "--disable-perl-regexp"
-
 # Fix "Argument list too long" error when len(TMPDIR) = 410
 acpaths = "-I ./m4"
 
@@ -36,6 +34,9 @@ do_install () {
 
 inherit update-alternatives
 
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre"
+
 ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN} = "grep egrep fgrep"
-- 
1.9.1

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


[OE-core] [PATCH] grep: support Perl regular expression

2018-01-17 Thread Haiqing Bai
Supporting Perl regular expression is disabled with '--disable-perl-regexp'
but the manpage of 'grep' shows the '-P' option and returns below error:
/bin/grep.grep -o -P 'PATTERN' file
/bin/grep.grep: support for the -P option is not compiled into this \
   --disable-perl-regexp binary

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 meta/recipes-extended/grep/grep_3.1.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/grep/grep_3.1.bb 
b/meta/recipes-extended/grep/grep_3.1.bb
index 05b6b93..391427f 100644
--- a/meta/recipes-extended/grep/grep_3.1.bb
+++ b/meta/recipes-extended/grep/grep_3.1.bb
@@ -14,8 +14,6 @@ SRC_URI[sha256sum] = 
"db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2b
 
 inherit autotools gettext texinfo pkgconfig
 
-EXTRA_OECONF = "--disable-perl-regexp"
-
 # Fix "Argument list too long" error when len(TMPDIR) = 410
 acpaths = "-I ./m4"
 
@@ -36,6 +34,9 @@ do_install () {
 
 inherit update-alternatives
 
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = ",--disable-perl-regexp,libpcre"
+
 ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN} = "grep egrep fgrep"
-- 
1.9.1

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


[OE-core] [PATCH] grep: support Perl regular expression

2018-01-17 Thread Haiqing Bai
Supporting Perl regular expression is disabled with '--disable-perl-regexp'
but the manpage of 'grep' shows the '-P' option and returns below error:
/bin/grep.grep -o -P 'PATTERN' file
/bin/grep.grep: support for the -P option is not compiled into this \
   --disable-perl-regexp binary

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 meta/recipes-extended/grep/grep_3.1.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/grep/grep_3.1.bb 
b/meta/recipes-extended/grep/grep_3.1.bb
index 05b6b93..391427f 100644
--- a/meta/recipes-extended/grep/grep_3.1.bb
+++ b/meta/recipes-extended/grep/grep_3.1.bb
@@ -14,8 +14,6 @@ SRC_URI[sha256sum] = 
"db625c7ab3bb3ee757b3926a5cfa8d9e1c3991ad24707a83dde8a5ef2b
 
 inherit autotools gettext texinfo pkgconfig
 
-EXTRA_OECONF = "--disable-perl-regexp"
-
 # Fix "Argument list too long" error when len(TMPDIR) = 410
 acpaths = "-I ./m4"
 
@@ -36,6 +34,9 @@ do_install () {
 
 inherit update-alternatives
 
+PACKAGECONFIG ??= "pcre"
+PACKAGECONFIG[pcre] = ",--disable-perl-regexp,libpcre"
+
 ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN} = "grep egrep fgrep"
-- 
1.9.1

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


[OE-core] [PATCH] gmp: depends on flex-native to fix parallel building issue

2017-11-28 Thread Haiqing Bai
fix below parallel building issue:
configure:27365: result: flex
configure:27403: flex conftest.l
.../sysroots/x86_64-linux/usr/bin/flex.real: No such file or directory
configure:27407: $? = 127
configure:27409: checking lex output file root
configure:27420: error: cannot find output from flex; giving up

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 meta/recipes-support/gmp/gmp.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/gmp/gmp.inc b/meta/recipes-support/gmp/gmp.inc
index abac8cf..1b35eaa 100644
--- a/meta/recipes-support/gmp/gmp.inc
+++ b/meta/recipes-support/gmp/gmp.inc
@@ -10,3 +10,5 @@ PACKAGECONFIG[readline] = 
"--with-readline=yes,--with-readline=no,readline"
 
 ARM_INSTRUCTION_SET_armv4 = "arm"
 ARM_INSTRUCTION_SET_armv5 = "arm"
+
+DEPENDS = "flex-native"
-- 
2.0.1

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


[OE-core] [PATCH] busybox: ifupdown:pass interface device name for ipv6 route command

2017-03-08 Thread Haiqing Bai
IPv6 routes need the device argument for link-local routes, or they
cannot be used at all. E.g. "gateway fe80::def" seems to be used in
some places, but kernel refuses to insert the route unless device
name is explicitly specified in the route addition.

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 ...ss-interface-device-name-for-ipv6-route-c.patch | 52 ++
 meta/recipes-core/busybox/busybox_1.24.1.bb|  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch

diff --git 
a/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
 
b/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
new file mode 100644
index 000..2c9e5ae
--- /dev/null
+++ 
b/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
@@ -0,0 +1,52 @@
+From 06fcf98f6ca40dc6b823d7d6231a240a1794ef2d Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Tue, 28 Feb 2017 10:40:37 +0800
+Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+commit 028524317d8d0011ed38e86e507a06738a5b5a97 from upstream
+
+IPv6 routes need the device argument for link-local routes, or they
+cannot be used at all. E.g. "gateway fe80::def" seems to be used in
+some places, but kernel refuses to insert the route unless device
+name is explicitly specified in the route addition.
+
+Signed-off-by: Timo Teräs <timo.te...@iki.fi>
+Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com>
+
+Upstream-Status: Backport
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ networking/ifupdown.c | 7 ---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/networking/ifupdown.c b/networking/ifupdown.c
+index 17bc4e9..a00f68d 100644
+--- a/networking/ifupdown.c
 b/networking/ifupdown.c
+@@ -394,8 +394,8 @@ static int FAST_FUNC static_up6(struct interface_defn_t 
*ifd, execfn *exec)
+ # if ENABLE_FEATURE_IFUPDOWN_IP
+   result = execute("ip addr add %address%/%netmask% dev %iface%[[ label 
%label%]]", ifd, exec);
+   result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] 
%iface% up", ifd, exec);
+-  /* Was: "[[ ip %gateway% ]]". Removed extra spaces w/o checking */
+-  result += execute("[[ip route add ::/0 via %gateway%]][[ metric 
%metric%]]", ifd, exec);
++  /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
++  result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ 
metric %metric%]]", ifd, exec);
+ # else
+   result = execute("ifconfig %iface%[[ media %media%]][[ hw 
%hwaddress%]][[ mtu %mtu%]] up", ifd, exec);
+   result += execute("ifconfig %iface% add %address%/%netmask%", ifd, 
exec);
+@@ -421,7 +421,8 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t 
*ifd, execfn *exec)
+   "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, 
exec);
+   result += execute("ip link set %iface% up", ifd, exec);
+   result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, 
exec);
+-  result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec);
++  /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
++  result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", 
ifd, exec);
+   return ((result == 4) ? 4 : 0);
+ }
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb 
b/meta/recipes-core/busybox/busybox_1.24.1.bb
index afb69d1..41fc641 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -54,6 +54,7 @@ SRC_URI = 
"http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://commit-applet_tables-fix-commit-0dddbc1.patch \
file://makefile-libbb-race.patch \
file://0001-libiproute-handle-table-ids-larger-than-255.patch \
+   file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-- 
1.9.1

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


[OE-core] [PATCH] busybox: ifupdown:pass interface device name for ipv6 route command

2017-03-08 Thread Haiqing Bai
IPv6 routes need the device argument for link-local routes, or they
cannot be used at all. E.g. "gateway fe80::def" seems to be used in
some places, but kernel refuses to insert the route unless device
name is explicitly specified in the route addition.

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 ...ss-interface-device-name-for-ipv6-route-c.patch | 52 ++
 meta/recipes-core/busybox/busybox_1.24.1.bb|  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch

diff --git 
a/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
 
b/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
new file mode 100644
index 000..2c9e5ae
--- /dev/null
+++ 
b/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
@@ -0,0 +1,52 @@
+From 06fcf98f6ca40dc6b823d7d6231a240a1794ef2d Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Tue, 28 Feb 2017 10:40:37 +0800
+Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+commit 028524317d8d0011ed38e86e507a06738a5b5a97 from upstream
+
+IPv6 routes need the device argument for link-local routes, or they
+cannot be used at all. E.g. "gateway fe80::def" seems to be used in
+some places, but kernel refuses to insert the route unless device
+name is explicitly specified in the route addition.
+
+Signed-off-by: Timo Teräs <timo.te...@iki.fi>
+Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com>
+
+Upstream-status: Backport
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ networking/ifupdown.c | 7 ---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/networking/ifupdown.c b/networking/ifupdown.c
+index 17bc4e9..a00f68d 100644
+--- a/networking/ifupdown.c
 b/networking/ifupdown.c
+@@ -394,8 +394,8 @@ static int FAST_FUNC static_up6(struct interface_defn_t 
*ifd, execfn *exec)
+ # if ENABLE_FEATURE_IFUPDOWN_IP
+   result = execute("ip addr add %address%/%netmask% dev %iface%[[ label 
%label%]]", ifd, exec);
+   result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] 
%iface% up", ifd, exec);
+-  /* Was: "[[ ip %gateway% ]]". Removed extra spaces w/o checking */
+-  result += execute("[[ip route add ::/0 via %gateway%]][[ metric 
%metric%]]", ifd, exec);
++  /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
++  result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ 
metric %metric%]]", ifd, exec);
+ # else
+   result = execute("ifconfig %iface%[[ media %media%]][[ hw 
%hwaddress%]][[ mtu %mtu%]] up", ifd, exec);
+   result += execute("ifconfig %iface% add %address%/%netmask%", ifd, 
exec);
+@@ -421,7 +421,8 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t 
*ifd, execfn *exec)
+   "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, 
exec);
+   result += execute("ip link set %iface% up", ifd, exec);
+   result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, 
exec);
+-  result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec);
++  /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
++  result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", 
ifd, exec);
+   return ((result == 4) ? 4 : 0);
+ }
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb 
b/meta/recipes-core/busybox/busybox_1.24.1.bb
index afb69d1..41fc641 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -54,6 +54,7 @@ SRC_URI = 
"http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://commit-applet_tables-fix-commit-0dddbc1.patch \
file://makefile-libbb-race.patch \
file://0001-libiproute-handle-table-ids-larger-than-255.patch \
+   file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-- 
1.9.1

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


[OE-core] [V2][PATCH] glib-2.0: add configure option to control dbus related checking

2017-01-10 Thread Haiqing Bai
Fixed the issue that checking dbus modules is not controlled by switch
'--enable-dbus/--disable-dbus" which causes the inconsistent building
output by the package building sequence of glib-2.0 and dbus.
Also add PACKAGECONFIG line to automatically get the right configure option.

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 ...d-configure-option-support-to-enable-or-d.patch | 66 ++
 meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb  |  1 +
 meta/recipes-core/glib-2.0/glib.inc|  3 +-
 3 files changed, 69 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch

diff --git 
a/meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch
 
b/meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch
new file mode 100644
index 000..a076e93
--- /dev/null
+++ 
b/meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch
@@ -0,0 +1,66 @@
+From 80f989fb3bb3110db5fe17a57f6a2499d0aade5f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Thu, 8 Dec 2016 16:39:36 +0800
+Subject: [PATCH] glib-2.0: Add configure option support to enable or disable
+ dbus.
+
+Add configure option "--enable-dbus" to check dbus related
+stuff to avoid checking them directly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ configure.ac | 29 ++---
+ 1 file changed, 18 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 72c49c3..81a0943 100644
+--- a/configure.ac
 b/configure.ac
+@@ -232,7 +232,10 @@ AC_ARG_ENABLE(debug,
+   AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
+  [turn on debugging 
@<:@default=glib_debug_default@:>@]),,
+   enable_debug=glib_debug_default)
+-
++AC_ARG_ENABLE(dbus,
++  [AS_HELP_STRING([--enable-dbus],
++  [for GDBus test cases only])],,
++  [enable_dbus=no])
+ AC_ARG_ENABLE(gc_friendly,
+   [AS_HELP_STRING([--enable-gc-friendly],
+   [turn on garbage collector friendliness 
[default=no]])],,
+@@ -3427,16 +3430,20 @@ AC_CHECK_ALIGNOF([unsigned long])
+ # Check for libdbus1 - Optional - is only used in the GDBus test cases
+ #
+ # 1.2.14 required for dbus_message_set_serial
+-PKG_CHECK_MODULES(DBUS1,
+- dbus-1 >= 1.2.14,
+- [AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) 
have_dbus1=yes],
+- have_dbus1=no)
+-AC_SUBST(DBUS1_CFLAGS)
+-AC_SUBST(DBUS1_LIBS)
+-AM_CONDITIONAL(HAVE_DBUS1, [test "x$have_dbus1" = "xyes"])
+-
+-AC_CHECK_PROGS([DBUS_DAEMON], [dbus-daemon])
+-AM_CONDITIONAL([HAVE_DBUS_DAEMON], [test x$DBUS_DAEMON = xdbus-daemon ])
++AM_CONDITIONAL([HAVE_DBUS_DAEMON], [ 0 ])
++AM_CONDITIONAL(HAVE_DBUS1, [ 0 ])
++if test "x$enable_dbus" = "xyes"; then
++  PKG_CHECK_MODULES(DBUS1,
++  dbus-1 >= 1.2.14,
++  [AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) 
have_dbus1=yes],
++  have_dbus1=no)
++  AC_SUBST(DBUS1_CFLAGS)
++  AC_SUBST(DBUS1_LIBS)
++  AM_CONDITIONAL(HAVE_DBUS1, [test "x$have_dbus1" = "xyes"])
++
++  AC_CHECK_PROGS([DBUS_DAEMON], [dbus-daemon])
++  AM_CONDITIONAL([HAVE_DBUS_DAEMON], [test x$DBUS_DAEMON = xdbus-daemon ])
++fi
+ 
+ dnl
+ dnl Check for -Bsymbolic-functions linker flag used to avoid
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb
index b7a0670..e55cbb1 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz 
\
file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
file://0001-Do-not-ignore-return-value-of-write.patch \
file://0001-Test-for-pthread_getname_np-before-using-it.patch \
+   file://Add-configure-option-support-to-enable-or-d.patch \
"
 
 SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
diff --git a/meta/recipes-core/glib-2.0/glib.inc 
b/meta/recipes-core/glib-2.0/glib.inc
index cb6aca7..87530aa 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -30,11 +30,12 @@ inherit autotools gettext gtk-doc pkgconfig ptest-gnome 
upstream-version-is-even
 
 S = "${WORKDIR}/glib-${PV}"
 
-PACKAGECONFIG ??= "system-pcre libmount"
+PACKAGECONFIG ??= "system-pcre libmount ${@bb.utils.contains('PTEST_ENABLED', 
'1', ' dbus', '', d)}"
 # To use the system pcre it must be configured with --enable-unicode-properties
 PACKAGECONFIG[system-pc

[OE-core] [PATCH] kexec: ARM: fix align issue of add_buffer_phys_virt() for LPAE kernel

2017-01-09 Thread Haiqing Bai
If LPAE is enabled, 3 level page table is used and the 'SECTION_SIZE'
is (1<<21), so add_buffer_phys_virt() should align to (1 << 21).

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 ...-ARM-Fix-add_buffer_phys_virt-align-issue.patch | 52 ++
 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb|  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch

diff --git 
a/meta/recipes-kernel/kexec/kexec-tools/0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
 
b/meta/recipes-kernel/kexec/kexec-tools/0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
new file mode 100644
index 000..6c6c66d
--- /dev/null
+++ 
b/meta/recipes-kernel/kexec/kexec-tools/0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
@@ -0,0 +1,52 @@
+From 78e497fb69950665e639cfab8f4fb50cc404a1eb Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Mon, 9 Jan 2017 15:26:29 +0800
+Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue
+
+When "CONFIG_ARM_LPAE" is enabled,3 level page table
+is used by MMU, the "SECTION_SIZE" is defined with
+(1 << 21), but 'add_buffer_phys_virt()' hardcode this
+to (1 << 20).
+
+Upstream-Status: Pending
+
+Suggested-By:fredrik.markst...@gmail.com
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ kexec/arch/arm/crashdump-arm.c | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
+index 245c21a..12139c3 100644
+--- a/kexec/arch/arm/crashdump-arm.c
 b/kexec/arch/arm/crashdump-arm.c
+@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char 
*mod_cmdline)
+   void *buf;
+   int err;
+   int last_ranges;
++  unsigned short align_bit_shift = 20;
+ 
+   /*
+* First fetch all the memory (RAM) ranges that we are going to pass to
+@@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char 
*mod_cmdline)
+ 
+   /* for support LPAE enabled kernel*/
+   elf_info.class = ELFCLASS64;
++  align_bit_shift = 21;
+ 
+   err = crash_create_elf64_headers(info, _info,
+usablemem_rgns.ranges,
+@@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char 
*mod_cmdline)
+* 1MB) so that available memory passed in kernel command line will be
+* aligned to 1MB. This is because kernel create_mapping() wants memory
+* regions to be aligned to SECTION_SIZE.
++   * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in 
pgtable-3level.h
+*/
+-  elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
++  elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 
align_bit_shift,
+ crash_kernel_mem.start,
+ crash_kernel_mem.end, -1, 0);
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb 
b/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
index 899b391..af32320 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
@@ -15,6 +15,7 @@ SRC_URI += 
"${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.g
 file://0007-arm64-kdump-set-up-other-segments.patch \
 
file://0008-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch \
 file://0009-arm64-kdump-Add-support-for-binary-image-files.patch \
+file://0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
  "
 
 SRC_URI[md5sum] = "b2b2c5e6b29d467d6e99d587fb6b7cf5"
-- 
1.9.1

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


[OE-core] [PATCH] glib-2.0: add configure option to control dbus related checking

2017-01-08 Thread Haiqing Bai
Fixed the issue that checking dbus modules is not controlled by switch
'--enable-dbus/--disable-dbus" which causes the inconsistent building
output by the package building sequence of glib-2.0 and dbus.
Also add PACKAGECONFIG line to automatically get the right configure option.

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 ...d-configure-option-support-to-enable-or-d.patch | 66 ++
 meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb  |  1 +
 meta/recipes-core/glib-2.0/glib.inc|  1 +
 3 files changed, 68 insertions(+)
 create mode 100644 
meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch

diff --git 
a/meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch
 
b/meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch
new file mode 100644
index 000..a076e93
--- /dev/null
+++ 
b/meta/recipes-core/glib-2.0/glib-2.0/Add-configure-option-support-to-enable-or-d.patch
@@ -0,0 +1,66 @@
+From 80f989fb3bb3110db5fe17a57f6a2499d0aade5f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Thu, 8 Dec 2016 16:39:36 +0800
+Subject: [PATCH] glib-2.0: Add configure option support to enable or disable
+ dbus.
+
+Add configure option "--enable-dbus" to check dbus related
+stuff to avoid checking them directly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ configure.ac | 29 ++---
+ 1 file changed, 18 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 72c49c3..81a0943 100644
+--- a/configure.ac
 b/configure.ac
+@@ -232,7 +232,10 @@ AC_ARG_ENABLE(debug,
+   AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
+  [turn on debugging 
@<:@default=glib_debug_default@:>@]),,
+   enable_debug=glib_debug_default)
+-
++AC_ARG_ENABLE(dbus,
++  [AS_HELP_STRING([--enable-dbus],
++  [for GDBus test cases only])],,
++  [enable_dbus=no])
+ AC_ARG_ENABLE(gc_friendly,
+   [AS_HELP_STRING([--enable-gc-friendly],
+   [turn on garbage collector friendliness 
[default=no]])],,
+@@ -3427,16 +3430,20 @@ AC_CHECK_ALIGNOF([unsigned long])
+ # Check for libdbus1 - Optional - is only used in the GDBus test cases
+ #
+ # 1.2.14 required for dbus_message_set_serial
+-PKG_CHECK_MODULES(DBUS1,
+- dbus-1 >= 1.2.14,
+- [AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) 
have_dbus1=yes],
+- have_dbus1=no)
+-AC_SUBST(DBUS1_CFLAGS)
+-AC_SUBST(DBUS1_LIBS)
+-AM_CONDITIONAL(HAVE_DBUS1, [test "x$have_dbus1" = "xyes"])
+-
+-AC_CHECK_PROGS([DBUS_DAEMON], [dbus-daemon])
+-AM_CONDITIONAL([HAVE_DBUS_DAEMON], [test x$DBUS_DAEMON = xdbus-daemon ])
++AM_CONDITIONAL([HAVE_DBUS_DAEMON], [ 0 ])
++AM_CONDITIONAL(HAVE_DBUS1, [ 0 ])
++if test "x$enable_dbus" = "xyes"; then
++  PKG_CHECK_MODULES(DBUS1,
++  dbus-1 >= 1.2.14,
++  [AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) 
have_dbus1=yes],
++  have_dbus1=no)
++  AC_SUBST(DBUS1_CFLAGS)
++  AC_SUBST(DBUS1_LIBS)
++  AM_CONDITIONAL(HAVE_DBUS1, [test "x$have_dbus1" = "xyes"])
++
++  AC_CHECK_PROGS([DBUS_DAEMON], [dbus-daemon])
++  AM_CONDITIONAL([HAVE_DBUS_DAEMON], [test x$DBUS_DAEMON = xdbus-daemon ])
++fi
+ 
+ dnl
+ dnl Check for -Bsymbolic-functions linker flag used to avoid
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb
index b7a0670..e55cbb1 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.50.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz 
\
file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
file://0001-Do-not-ignore-return-value-of-write.patch \
file://0001-Test-for-pthread_getname_np-before-using-it.patch \
+   file://Add-configure-option-support-to-enable-or-d.patch \
"
 
 SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
diff --git a/meta/recipes-core/glib-2.0/glib.inc 
b/meta/recipes-core/glib-2.0/glib.inc
index cb6aca7..ab178f3 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -35,6 +35,7 @@ PACKAGECONFIG ??= "system-pcre libmount"
 PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre"
 PACKAGECONFIG[libmount] = "--enable-libmount,--disable-libmount,util-linux"
 PACKAGECONFIG[manpages] = "--enable-man 
--with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, 
libxslt-native xmlto-na

[OE-core] [PATCH] nettle: Modify configure script to get consistent build.

2017-01-04 Thread Haiqing Bai
The original configure script detects the header files
of openssl to set variable like 'HAVE_OPENSSL_AES_H' in
config.h and ignore the value of '--enable-openssl', this
may cause inconsistent build.

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 ...k-header-files-of-openssl-only-if-enable_.patch | 38 ++
 ...k-header-files-of-openssl-only-if-enable_.patch | 38 ++
 meta/recipes-support/nettle/nettle_2.7.1.bb|  1 +
 meta/recipes-support/nettle/nettle_3.3.bb  |  4 +++
 4 files changed, 81 insertions(+)
 create mode 100644 
meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
 create mode 100644 
meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch

diff --git 
a/meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
 
b/meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 000..38d9107
--- /dev/null
+++ 
b/meta/recipes-support/nettle/nettle-2.7.1/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,38 @@
+From c369dd7049f5a198f8b6c96fde6e294ce5146c2f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Fri, 9 Dec 2016 16:16:45 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ configure.ac | 8 +---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 78a3d4e..4f16a98 100644
+--- a/configure.ac
 b/configure.ac
+@@ -603,9 +603,11 @@ AC_CHECK_ALIGNOF(uint64_t)
+ ALIGNOF_UINT64_T="$ac_cv_alignof_uint64_t"
+ AC_SUBST(ALIGNOF_UINT64_T)
+ 
+-AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++  AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h],,
++  [enable_openssl=no
++  break])
++fi
+ 
+ LSH_FUNC_ALLOCA
+ LSH_FUNC_STRERROR
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
 
b/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 000..e7216ba
--- /dev/null
+++ 
b/meta/recipes-support/nettle/nettle-3.3/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,38 @@
+From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Fri, 9 Dec 2016 15:23:17 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ configure.ac | 8 +---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4ead52c..982760f 100644
+--- a/configure.ac
 b/configure.ac
+@@ -185,9 +185,11 @@ AC_HEADER_TIME
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(size_t)
+ 
+-AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h openssl/ecdsa.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++  AC_CHECK_HEADERS([openssl/blowfish.h openssl/des.h openssl/cast.h 
openssl/aes.h openssl/ecdsa.h],,
++  [enable_openssl=no
++  break])
++fi
+ 
+ AC_CHECK_HEADERS([valgrind/memcheck.h])
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-support/nettle/nettle_2.7.1.bb 
b/meta/recipes-support/nettle/nettle_2.7.1.bb
index ae8e311..2006146 100644
--- a/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ b/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -13,6 +13,7 @@ SRC_URI[sha256sum] = 
"bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6
 SRC_URI += "\
 file://CVE-2015-8803_8805.patch \
 file://CVE-2015-8804.patch \
+file://check-header-files-of-openssl-only-if-enable_.patch \
 "
 
 DISABLE_STATIC = ""
diff --git a/meta/recipes-support/nettle/nettle_3.3.bb 
b/meta/recipes-support/nettle/nettle_3.3.bb
index c723e27..b76babf 100644
--- a/meta/recipes-support/nettle/nettle_3.3.bb
+++ b/meta/recipes-support/nettle/nettle_3.3.bb
@@ -7,5 +7,9 @@ LIC_FILES_CHKSUM = 
"file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6
 
file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e

[OE-core] [PATCH] kexec: ARM: fix align issue of add_buffer_phys_virt() for LPAE kernel.

2017-01-03 Thread Haiqing Bai
If LPAE is enabled, 3 level page table is used and the 'SECTION_SIZE'
is (1<<21), so add_buffer_phys_virt() should align to (1 << 21).

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 ...-ARM-fix-add_buffer_phys_virt-align-issue.patch | 52 ++
 meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb|  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-kernel/kexec/kexec-tools/kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch

diff --git 
a/meta/recipes-kernel/kexec/kexec-tools/kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch
 
b/meta/recipes-kernel/kexec/kexec-tools/kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch
new file mode 100644
index 000..7d1f95e
--- /dev/null
+++ 
b/meta/recipes-kernel/kexec/kexec-tools/kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch
@@ -0,0 +1,52 @@
+From 380019f68e19ac863cf32dc7ff6784e8fe1d751f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Mon, 19 Dec 2016 14:52:02 +0800
+Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue.
+
+When "CONFIG_ARM_LPAE" is enabled,3 level page table
+is used by MMU, the "SECTION_SIZE" is defined with
+(1 << 21), but 'add_buffer_phys_virt()' hardcode this
+to (1 << 20).
+
+Upstream-Status: Pending
+
+Suggested-By:fredrik.markst...@gmail.com
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+---
+ kexec/arch/arm/crashdump-arm.c | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
+index 38a1401..e41b7fb 100644
+--- a/kexec/arch/arm/crashdump-arm.c
 b/kexec/arch/arm/crashdump-arm.c
+@@ -271,6 +271,7 @@ int load_crashdump_segments(struct kexec_info *info, char 
*mod_cmdline)
+   void *buf;
+   int err;
+   int last_ranges;
++  unsigned short align_bit_shift = 20;
+ 
+   /*
+* First fetch all the memory (RAM) ranges that we are going to pass to
+@@ -295,6 +296,7 @@ int load_crashdump_segments(struct kexec_info *info, char 
*mod_cmdline)
+ 
+   /* for support LPAE enabled kernel*/
+   elf_info.class = ELFCLASS64;
++  align_bit_shift = 21;
+ 
+   err = crash_create_elf64_headers(info, _info,
+usablemem_rgns.ranges,
+@@ -315,8 +317,9 @@ int load_crashdump_segments(struct kexec_info *info, char 
*mod_cmdline)
+* 1MB) so that available memory passed in kernel command line will be
+* aligned to 1MB. This is because kernel create_mapping() wants memory
+* regions to be aligned to SECTION_SIZE.
++ * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in 
pgtable-3level.h
+*/
+-  elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
++  elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 
align_bit_shift,
+ crash_reserved_mem.start,
+ crash_reserved_mem.end, -1, 0);
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb 
b/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
index 59376c8..3e38923 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
@@ -8,6 +8,7 @@ SRC_URI += " \
 file://0002-powerpc-change-the-memory-size-limit.patch \
 file://0001-purgatory-Pass-r-directly-to-linker.patch \
 file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
+file://kexec-ARM-fix-add_buffer_phys_virt-align-issue.patch \
  "
 
 SRC_URI[md5sum] = "10ddaae0e86af54407b164a1f5a39cc3"
-- 
1.9.1

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


[OE-core] [meta-oe][PATCH V2] Make conditional compile for DES related code in python-m2crypto.

2016-04-05 Thread Haiqing Bai
The source code in python-m2crypto don't check whether the depended
DES cipher has been disabled in openssl or not, this fix added
the checking.

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 .../conditional-compile-DES-related-code.patch | 62 ++
 .../python/python-m2crypto_0.21.1.bb   |  3 +-
 2 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 
meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch

diff --git 
a/meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch
 
b/meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch
new file mode 100644
index 000..7c3e410
--- /dev/null
+++ 
b/meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch
@@ -0,0 +1,62 @@
+From 85dbf29dcc3786ed101278721d60cc3bc4c182bc Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Fri, 1 Apr 2016 14:44:33 +0800
+Subject: [PATCH] conditional compile DES related code.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haiqing Bai <haiqing@windriver.com>
+
+---
+ SWIG/_evp.i   | 2 ++
+ tests/test_evp.py | 4 
+ 2 files changed, 6 insertions(+)
+
+diff --git a/SWIG/_evp.i b/SWIG/_evp.i
+index 0593eed..f3156af 100644
+--- a/SWIG/_evp.i
 b/SWIG/_evp.i
+@@ -49,6 +49,7 @@ extern const EVP_MD *EVP_sha512(void);
+ %rename(digest_init) EVP_DigestInit;
+ extern int EVP_DigestInit(EVP_MD_CTX *, const EVP_MD *);
+
++#ifndef OPENSSL_NO_DES
+ %rename(des_ecb) EVP_des_ecb;
+ extern const EVP_CIPHER *EVP_des_ecb(void);
+ %rename(des_ede_ecb) EVP_des_ede;
+@@ -73,6 +74,7 @@ extern const EVP_CIPHER *EVP_des_ofb(void);
+ extern const EVP_CIPHER *EVP_des_ede_ofb(void);
+ %rename(des_ede3_ofb) EVP_des_ede3_ofb;
+ extern const EVP_CIPHER *EVP_des_ede3_ofb(void);
++#endif
+ %rename(bf_ecb) EVP_bf_ecb;
+ extern const EVP_CIPHER *EVP_bf_ecb(void);
+ %rename(bf_cbc) EVP_bf_cbc;
+diff --git a/tests/test_evp.py b/tests/test_evp.py
+index ba09092..8b7fb21 100644
+--- a/tests/test_evp.py
 b/tests/test_evp.py
+@@ -213,8 +213,10 @@ class CipherTestCase(unittest.TestCase):
+
+ def test_ciphers(self):
+ ciphers=[
++#ifndef OPENSSL_NO_DES
+ 'des_ede_ecb', 'des_ede_cbc', 'des_ede_cfb', 'des_ede_ofb',
+ 'des_ede3_ecb', 'des_ede3_cbc', 'des_ede3_cfb', 'des_ede3_ofb',
++#endif
+ 'aes_128_ecb', 'aes_128_cbc', 'aes_128_cfb', 'aes_128_ofb',
+ 'aes_192_ecb', 'aes_192_cbc', 'aes_192_cfb', 'aes_192_ofb',
+ 'aes_256_ecb', 'aes_256_cbc', 'aes_256_cfb', 'aes_256_ofb']
+@@ -222,7 +224,9 @@ class CipherTestCase(unittest.TestCase):
+  #'idea_ecb', 'idea_cbc', 'idea_cfb', 'idea_ofb',
+  'cast5_ecb', 'cast5_cbc', 'cast5_cfb', 'cast5_ofb',
+  #'rc5_ecb', 'rc5_cbc', 'rc5_cfb', 'rc5_ofb',
++#ifndef OPENSSL_NO_DES
+  'des_ecb', 'des_cbc', 'des_cfb', 'des_ofb',
++#endif
+  'rc4', 'rc2_40_cbc']
+ if not fips_mode: # Disabled algorithms
+ ciphers += nonfips_ciphers
+--
+1.9.1
+
diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb 
b/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb
index a3f9a09..a1b0a4c 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb
+++ b/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = 
"file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
 
 SRC_URI = " \
file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \
-   file://0001-M2Crypto-Error-fix.patch"
+   file://0001-M2Crypto-Error-fix.patch \
+   file://conditional-compile-DES-related-code.patch"
 
 SRC_URI[md5sum] = "f93d8462ff7646397a9f77a2fe602d17"
 SRC_URI[sha256sum] = 
"25b94498505c2d800ee465db0cc1aff097b1615adc3ac042a1c85ceca264fc0a"
-- 
1.9.1

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


[OE-core] [PATCH] Make conditional compile for DES related code in python-m2crypto.

2016-04-04 Thread Haiqing Bai
The source code in python-m2crypto don't check whether the depended
DES cipher has been disabled in openssl or not, this fix added the
checking.

Signed-off-by: Haiqing Bai <haiqing@windriver.com>
---
 .../conditional-compile-DES-related-code.patch | 58 ++
 .../python/python-m2crypto_0.21.1.bb   |  3 +-
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 
meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch

diff --git 
a/meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch
 
b/meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch
new file mode 100644
index 000..e7b8f3e
--- /dev/null
+++ 
b/meta-python/recipes-devtools/python/python-m2crypto/conditional-compile-DES-related-code.patch
@@ -0,0 +1,58 @@
+From 85dbf29dcc3786ed101278721d60cc3bc4c182bc Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <haiqing@windriver.com>
+Date: Fri, 1 Apr 2016 14:44:33 +0800
+Subject: [PATCH] conditional compile DES related code.
+
+---
+ SWIG/_evp.i   | 2 ++
+ tests/test_evp.py | 4 
+ 2 files changed, 6 insertions(+)
+
+diff --git a/SWIG/_evp.i b/SWIG/_evp.i
+index 0593eed..f3156af 100644
+--- a/SWIG/_evp.i
 b/SWIG/_evp.i
+@@ -49,6 +49,7 @@ extern const EVP_MD *EVP_sha512(void);
+ %rename(digest_init) EVP_DigestInit;
+ extern int EVP_DigestInit(EVP_MD_CTX *, const EVP_MD *);
+
++#ifndef OPENSSL_NO_DES
+ %rename(des_ecb) EVP_des_ecb;
+ extern const EVP_CIPHER *EVP_des_ecb(void);
+ %rename(des_ede_ecb) EVP_des_ede;
+@@ -73,6 +74,7 @@ extern const EVP_CIPHER *EVP_des_ofb(void);
+ extern const EVP_CIPHER *EVP_des_ede_ofb(void);
+ %rename(des_ede3_ofb) EVP_des_ede3_ofb;
+ extern const EVP_CIPHER *EVP_des_ede3_ofb(void);
++#endif
+ %rename(bf_ecb) EVP_bf_ecb;
+ extern const EVP_CIPHER *EVP_bf_ecb(void);
+ %rename(bf_cbc) EVP_bf_cbc;
+diff --git a/tests/test_evp.py b/tests/test_evp.py
+index ba09092..8b7fb21 100644
+--- a/tests/test_evp.py
 b/tests/test_evp.py
+@@ -213,8 +213,10 @@ class CipherTestCase(unittest.TestCase):
+
+ def test_ciphers(self):
+ ciphers=[
++#ifndef OPENSSL_NO_DES
+ 'des_ede_ecb', 'des_ede_cbc', 'des_ede_cfb', 'des_ede_ofb',
+ 'des_ede3_ecb', 'des_ede3_cbc', 'des_ede3_cfb', 'des_ede3_ofb',
++#endif
+ 'aes_128_ecb', 'aes_128_cbc', 'aes_128_cfb', 'aes_128_ofb',
+ 'aes_192_ecb', 'aes_192_cbc', 'aes_192_cfb', 'aes_192_ofb',
+ 'aes_256_ecb', 'aes_256_cbc', 'aes_256_cfb', 'aes_256_ofb']
+@@ -222,7 +224,9 @@ class CipherTestCase(unittest.TestCase):
+  #'idea_ecb', 'idea_cbc', 'idea_cfb', 'idea_ofb',
+  'cast5_ecb', 'cast5_cbc', 'cast5_cfb', 'cast5_ofb',
+  #'rc5_ecb', 'rc5_cbc', 'rc5_cfb', 'rc5_ofb',
++#ifndef OPENSSL_NO_DES
+  'des_ecb', 'des_cbc', 'des_cfb', 'des_ofb',
++#endif
+  'rc4', 'rc2_40_cbc']
+ if not fips_mode: # Disabled algorithms
+ ciphers += nonfips_ciphers
+--
+1.9.1
+
diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb 
b/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb
index a3f9a09..a1b0a4c 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb
+++ b/meta-python/recipes-devtools/python/python-m2crypto_0.21.1.bb
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = 
"file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
 
 SRC_URI = " \
file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \
-   file://0001-M2Crypto-Error-fix.patch"
+   file://0001-M2Crypto-Error-fix.patch \
+   file://conditional-compile-DES-related-code.patch"
 
 SRC_URI[md5sum] = "f93d8462ff7646397a9f77a2fe602d17"
 SRC_URI[sha256sum] = 
"25b94498505c2d800ee465db0cc1aff097b1615adc3ac042a1c85ceca264fc0a"
-- 
1.9.1

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