[oe] [PATCH v2] drbd-utils: Fix netlink failure with nested attributes for kernel v5.2

2019-07-12 Thread zhe.he
From: He Zhe 

Bump up SRCREV_drbd-utils to includes two more commits to fix the following
netlink failure with nested attributes.

$ drbdsetup new-resource r0
Invalid argument

92ade5989027 ("netlink: prepare for kernel v5.2")
859151b228d3 ("netlink: Add NLA_F_NESTED flag to nested attribute")

Signed-off-by: He Zhe 
---
v2: Add failure met in commit log

 meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb 
b/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb
index d1189f1..5aeef7b 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb
+++ b/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils 
\

git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers
 \
   "
 # v9.10.0
-SRCREV_drbd-utils = "147860216bf307433e2d0d7cfd6fad3642027b8d"
+SRCREV_drbd-utils = "859151b228d3b3aacefb09d06d515a2589c22e35"
 SRCREV_drbd-headers = "0955b3423f08f8e11ff05092bc1b766609fd804b"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

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


[oe] [PATCH] drbd-utils: Fix netlink failure with nested attributes for kernel v5.2

2019-07-12 Thread zhe.he
From: He Zhe 

Bump up SRCREV_drbd-utils to includes two more commits to fix netlink failure
with nested attributes.

92ade5989027 ("netlink: prepare for kernel v5.2")
859151b228d3 ("netlink: Add NLA_F_NESTED flag to nested attribute")

Signed-off-by: He Zhe 
---
 meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb 
b/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb
index d1189f1..5aeef7b 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb
+++ b/meta-networking/recipes-support/drbd/drbd-utils_9.10.0.bb
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils 
\

git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers
 \
   "
 # v9.10.0
-SRCREV_drbd-utils = "147860216bf307433e2d0d7cfd6fad3642027b8d"
+SRCREV_drbd-utils = "859151b228d3b3aacefb09d06d515a2589c22e35"
 SRCREV_drbd-headers = "0955b3423f08f8e11ff05092bc1b766609fd804b"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

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


[oe] [meta-oe][PATCH v2] rocksdb: Turn off Werror to fix build failure due to GCC9 checks

2019-06-02 Thread zhe.he
From: He Zhe 

GCC9 introduce stricter checks, deprecated-copy and pessimizing-move, while
rocksdb uses -Werror and causes the following build error.

db/version_edit.h:178:33: error: implicitly-declared 'constexpr 
rocksdb::FileDescriptor::FileDescriptor(const rocksdb::FileDescriptor&)' is 
deprecated [-Werror=deprecated-copy]

utilities/persistent_cache/persistent_cache_util.h:51:23: error: moving a local 
object in a return statement prevents copy elision [-Werror=pessimizing-move]

Signed-off-by: He Zhe 
---
v2: As suggested, turn off Werror instead of the two specifc check options

 meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb 
b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index 8d84619..5ce4c74 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -30,6 +30,7 @@ EXTRA_OECMAKE = "\
 -DPORTABLE=ON \
 -DWITH_TESTS=OFF \
 -DWITH_TOOLS=OFF \
+-DFAIL_ON_WARNINGS=OFF \
 "
 
 do_install_append() {
-- 
2.7.4

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


[oe] [meta-oe][PATCH] rocksdb: Fix build failure due to GCC9 deprecated-copy pessimizing-move

2019-05-30 Thread zhe.he
From: He Zhe 

GCC9 introduce more stricter checks deprecated-copy and pessimizing-move, while
rocksdb uses -Werror and causes the following build error.

db/version_edit.h:178:33: error: implicitly-declared 'constexpr 
rocksdb::FileDescriptor::FileDescriptor(const rocksdb::FileDescriptor&)' is 
deprecated [-Werror=deprecated-copy]

utilities/persistent_cache/persistent_cache_util.h:51:23: error: moving a local 
object in a return statement prevents copy elision [-Werror=pessimizing-move]

Signed-off-by: He Zhe 
---
 meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb 
b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index 8d84619..bbd8e4f 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -31,6 +31,9 @@ EXTRA_OECMAKE = "\
 -DWITH_TESTS=OFF \
 -DWITH_TOOLS=OFF \
 "
+do_compile_prepend() {
+sed -i 's/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror 
-Wno-error=shadow")/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror 
-Wno-error=shadow -Wno-error=deprecated-copy -Wno-error=pessimizing-move")/' 
${S}/CMakeLists.txt
+}
 
 do_install_append() {
 # fix for qa check buildpaths
-- 
2.7.4

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


[oe] [meta-oe][PATCH] utilities: Fix build failure with -Werror=maybe-uninitialized

2019-03-17 Thread zhe.he
From: He Zhe 

Initialize magic_number to zero to avoid such failure.
utilities/blob_db/blob_log_format.cc:91:3: error: 'magic_number' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
   if (magic_number != kMagicNumber) {
   ^~

Signed-off-by: He Zhe 
---
 ...ix-build-failure-with-Werror-maybe-uninit.patch | 35 ++
 meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 
meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch

diff --git 
a/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch
 
b/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch
new file mode 100644
index 000..ef0429a
--- /dev/null
+++ 
b/meta-oe/recipes-dbs/rocksdb/files/0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch
@@ -0,0 +1,35 @@
+From 8996f075e64da0e6ffeda57632ef31f8710defcc Mon Sep 17 00:00:00 2001
+From: He Zhe 
+Date: Fri, 15 Mar 2019 16:47:03 +0800
+Subject: [PATCH] utilities: Fix build failure with -Werror=maybe-uninitialized
+
+Summary:
+Initialize magic_number to zero to avoid such failure.
+utilities/blob_db/blob_log_format.cc:91:3: error: 'magic_number' may be used
+uninitialized in this function [-Werror=maybe-uninitialized]
+   if (magic_number != kMagicNumber) {
+   ^~
+
+Upstream-Status: Accepted [expected version 5.19]
+
+Signed-off-by: He Zhe 
+---
+ utilities/blob_db/blob_log_format.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utilities/blob_db/blob_log_format.cc 
b/utilities/blob_db/blob_log_format.cc
+index 2bf7028..8726cb8 100644
+--- a/utilities/blob_db/blob_log_format.cc
 b/utilities/blob_db/blob_log_format.cc
+@@ -82,7 +82,7 @@ Status BlobLogFooter::DecodeFrom(Slice src) {
+   uint32_t src_crc = 0;
+   src_crc = crc32c::Value(src.data(), BlobLogFooter::kSize - 
sizeof(uint32_t));
+   src_crc = crc32c::Mask(src_crc);
+-  uint32_t magic_number;
++  uint32_t magic_number = 0;
+   if (!GetFixed32(, _number) || !GetFixed64(, _count) ||
+   !GetFixed64(, _range.first) ||
+   !GetFixed64(, _range.second) || !GetFixed32(, )) 
{
+-- 
+2.7.4
+
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb 
b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index 78520f9..27c7b20 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -12,6 +12,7 @@ PV = "5.18.2"
 
 SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \

file://0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch \
+   
file://0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch \
   "
 
 S = "${WORKDIR}/git"
-- 
2.7.4

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


[oe] [OE-core] [PATCH] ltp: Fix containers/userns05 failure for lib32

2017-02-07 Thread zhe.he
From: He Zhe 

Backport a patch to fix userns05 case:
<<>>
user_namespace5 1 TFAIL : userns05.c:95: userns:parent should be not equal to 
cpid2
user_namespace5 1 TFAIL : userns05.c:95: userns:parent should be not equal to 
cpid2
user_namespace5 0 TINFO : Child process returned TPASS
user_namespace5 0 TINFO : Child process returned TPASS
user_namespace5 0 TINFO : Child process returned TFAIL
incrementing stop

Rename the previous patch to add a number prefix

Signed-off-by: He Zhe 
---
 ...039-fcntl-fix-the-time-def-to-use-time_t.patch} |  0
 ...iners-userns05-use-unsigned-int-for-ns-id.patch | 60 ++
 meta/recipes-extended/ltp/ltp_20160126.bb  |  3 +-
 3 files changed, 62 insertions(+), 1 deletion(-)
 rename 
meta/recipes-extended/ltp/ltp/{fcntl-fix-the-time-def-to-use-time_t.patch => 
0039-fcntl-fix-the-time-def-to-use-time_t.patch} (100%)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch 
b/meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch
similarity index 100%
rename from 
meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
rename to 
meta/recipes-extended/ltp/ltp/0039-fcntl-fix-the-time-def-to-use-time_t.patch
diff --git 
a/meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch
 
b/meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch
new file mode 100644
index 000..4dee1f5
--- /dev/null
+++ 
b/meta/recipes-extended/ltp/ltp/0040-containers-userns05-use-unsigned-int-for-ns-id.patch
@@ -0,0 +1,60 @@
+From 3b63d350e9fe9e4271916cc0abfac65a5d6419ff Mon Sep 17 00:00:00 2001
+From: Jiri Jaburek 
+Date: Tue, 7 Feb 2017 07:58:16 +
+Subject: [PATCH] containers/userns05: use unsigned int for ns id
+
+The kernel defines it as 'unsigned int' in 'struct ns_common'
+and formats it as
+
+  snprintf(buf, size, "%s:[%u]", ns_ops->name, ns->inum);
+
+This change makes the test work on 32bit systems where LONG_MAX
+is smaller than UINT_MAX.
+
+Signed-off-by: Jiri Jaburek 
+
+Upstream-Status: Backport
+
+Signed-off-by: He Zhe 
+---
+ testcases/kernel/containers/userns/userns05.c | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/testcases/kernel/containers/userns/userns05.c 
b/testcases/kernel/containers/userns/userns05.c
+index 8d8c40a..8eac729 100644
+--- a/testcases/kernel/containers/userns/userns05.c
 b/testcases/kernel/containers/userns/userns05.c
+@@ -49,18 +49,18 @@ static int child_fn1(void)
+   return 0;
+ }
+ 
+-static long getusernsidbypid(int pid)
++static unsigned int getusernsidbypid(int pid)
+ {
+   char path[BUFSIZ];
+   char userid[BUFSIZ];
+-  long id = 0;
++  unsigned int id = 0;
+ 
+   sprintf(path, "/proc/%d/ns/user", pid);
+ 
+   if (readlink(path, userid, BUFSIZ) == -1)
+   tst_resm(TFAIL | TERRNO, "readlink failure.");
+ 
+-  if (sscanf(userid, "user:[%ld]", ) != 1)
++  if (sscanf(userid, "user:[%u]", ) != 1)
+   tst_resm(TFAIL, "sscanf failure.");
+   return id;
+ }
+@@ -68,7 +68,7 @@ static long getusernsidbypid(int pid)
+ static void test_userns_id(void)
+ {
+   int cpid1, cpid2, cpid3;
+-  long parentuserns, cpid1userns, cpid2userns, newparentuserns;
++  unsigned int parentuserns, cpid1userns, cpid2userns, newparentuserns;
+ 
+   parentuserns = getusernsidbypid(getpid());
+   cpid1 = ltp_clone_quick(SIGCHLD, (void *)child_fn1,
+-- 
+2.9.3
+
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb 
b/meta/recipes-extended/ltp/ltp_20160126.bb
index 72d465b..aaa63c2 100644
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -65,7 +65,8 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \

file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
file://0037-containers-netns_netlink-Avoid-segmentation-fault.patch 
\
file://0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch \
-   file://fcntl-fix-the-time-def-to-use-time_t.patch \
+   file://0039-fcntl-fix-the-time-def-to-use-time_t.patch \
+   file://0040-containers-userns05-use-unsigned-int-for-ns-id.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.8.3

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


[oe] [meta-networking][PATCH] iscsitarget: Fix call trace of ahash API calling

2017-01-16 Thread zhe.he
From: He Zhe 

The orignal patch does not alloc struct ahash_request before using it.
This will cause the kernel call trace below when calling gen_scsiid on
kernel 4.8 or later version.

This patch normalizes the calling of ahash API according to the example
in kernel doc Documentation/crypto/api-intro.txt.

BUG: unable to handle kernel NULL pointer dereference at 0020
IP: [] volume_add+0x625/0x7f0 [iscsi_trgt]
PGD dd77067 PUD dd7c067 PMD 0 
Oops:  [#1] PREEMPT SMP
Modules linked in: iscsi_trgt(O)
CPU: 0 PID: 350 Comm: ietd Tainted: G   O4.8.12-yocto-standard #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
task: 88000dfe2c00 task.stack: 88000de88000
RIP: 0010:[]  [] volume_add+0x625/0x7f0 
[iscsi_trgt]
RSP: 0018:88000de8bd90  EFLAGS: 0206
RAX: ddfa RBX: 88000ddd1d78 RCX: ea00
RDX: 0600 RSI:  RDI: 88000ddd1c14
RBP: 88000de8be38 R08: 88000de44180 R09: 88000de8bdd0
R10: 002c R11:  R12: 88000ddfa600
R13:  R14:  R15: 88000de92200
FS:  7f767548b700() GS:88000fc0() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: 0020 CR3: 0dd2d000 CR4: 06f0
Stack:
 88000de8bdd0 88000dc1b3d0 88000ddfa650 88000ddfa660
 88000df8f000 88000ddd1c00 88000de44180 
 ea377440 000f0c14  
Call Trace:
 [] ioctl+0x217/0x390 [iscsi_trgt]
 [] do_vfs_ioctl+0x94/0x5c0
 [] ? vfs_read+0xf3/0x120
 [] SyS_ioctl+0x79/0x90
 [] entry_SYSCALL_64_fastpath+0x13/0x8f
Code: 4c 01 e0 0f 82 a2 01 00 00 48 b9 00 00 00 80 ff 77 00 00 48 01
c8 45 31 f6 48 b9 00 00 00 00 00 ea ff ff 89 54 24 68 48 c1 e8 0c <49>
8b 56 20 4c 89 44 24 20 4c 89 f7 48 c1 e0 06 c7 44 24 6c 04 
RIP  [] volume_add+0x625/0x7f0 [iscsi_trgt]
 RSP 
CR2: 0020
end trace cd2016297df21635 ]
ietd_response_recv 200 0 -5
Input/output error.

Signed-off-by: He Zhe 
---
 ...ith_updated_interfaces_of_linux_v4.8_and_above.patch | 17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git 
a/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch
 
b/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch
index e55c407..c83b080 100644
--- 
a/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch
+++ 
b/meta-networking/recipes-extended/iscsitarget/files/build_with_updated_interfaces_of_linux_v4.8_and_above.patch
@@ -89,6 +89,9 @@ Upstream-Status: Pending
 
 Signed-off-by: Jagadeesh Krishnanjanappa 
 
+Correct and normalize the calling of ahash APIs
+Signed-off-by: Zhe He 
+
 diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c 
iscsitarget-1.4.20.3+svn502/kernel/block-io.c
 --- iscsitarget-1.4.20.3+svn502_org/kernel/block-io.c  2016-09-25 
19:45:01.814641016 +0530
 +++ iscsitarget-1.4.20.3+svn502/kernel/block-io.c  2016-09-25 
19:47:59.666474094 +0530
@@ -477,7 +480,7 @@ diff -Naurp 
iscsitarget-1.4.20.3+svn502_org/kernel/nthread.c iscsitarget-1.4.20.
 diff -Naurp iscsitarget-1.4.20.3+svn502_org/kernel/volume.c 
iscsitarget-1.4.20.3+svn502/kernel/volume.c
 --- iscsitarget-1.4.20.3+svn502_org/kernel/volume.c2016-09-25 
19:45:01.734641099 +0530
 +++ iscsitarget-1.4.20.3+svn502/kernel/volume.c2016-09-25 
19:47:59.666474094 +0530
-@@ -84,12 +84,25 @@ static int set_scsisn(struct iet_volume
+@@ -84,12 +84,26 @@ static int set_scsisn(struct iet_volume
  /* Generate a MD5 hash of the target IQN and LUN number */
  static void gen_scsiid(struct iet_volume *volume)
  {
@@ -490,28 +493,32 @@ diff -Naurp 
iscsitarget-1.4.20.3+svn502_org/kernel/volume.c iscsitarget-1.4.20.3
  
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
 +  tfm = crypto_alloc_ahash("md5", 0, CRYPTO_ALG_ASYNC);
++  hash = ahash_request_alloc(tfm, GFP_ATOMIC);
 +#else
hash.tfm = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC);
hash.flags = 0;
 +#endif
  
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+  if (!IS_ERR(tfm)) {
++  if (tfm && !IS_ERR(tfm)) {
 +#else
if (!IS_ERR(hash.tfm)) {
 +#endif
struct scatterlist sg[2];
unsigned int nbytes = 0;
  
-@@ -102,11 +115,19 @@ static void gen_scsiid(struct iet_volume
+@@ -102,11 +115,22 @@ static void gen_scsiid(struct iet_volume
sg_set_buf([1], >lun, sizeof(volume->lun));
nbytes += sizeof(volume->lun);
  
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
-+  crypto_ahash_init(hash);
++  ahash_request_set_callback(hash, 0, NULL, 

[oe] [meta-oe] [PATCH] Remove bashisms

2016-09-27 Thread zhe.he
From: He Zhe 

Signed-off-by: He Zhe 
---
 meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 4 +++-
 meta-oe/recipes-support/postgresql/postgresql.inc   | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb 
b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index a62389d..62906fd 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -32,7 +32,9 @@ do_configure() {
 }
 
 do_compile () {
-. ${CONFIG_SITE}
+for CONFIG_SITE_ITEM in $CONFIG_SITE; do
+. $CONFIG_SITE_ITEM
+done
 if [ X"$ac_cv_uint" = X"yes" ]; then
 CFLAGS="${CFLAGS} -DHAVE_uint"
 fi
diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc 
b/meta-oe/recipes-support/postgresql/postgresql.inc
index e473f58..9592c79 100644
--- a/meta-oe/recipes-support/postgresql/postgresql.inc
+++ b/meta-oe/recipes-support/postgresql/postgresql.inc
@@ -179,7 +179,7 @@ do_install_append() {
 
 # install COPYRIGHT README HISTORY
 install -d -m 0755 ${D}${docdir}/${BPN}
-for i in ${B}/{COPYRIGHT,README,HISTORY} 
${B}/doc/{KNOWN_BUGS,MISSING_FEATURES,README*,bug.template}; do
+for i in ${B}/COPYRIGHT ${B}/README ${B}/HISTORY ${B}/doc/KNOWN_BUGS 
${B}/doc/MISSING_FEATURES ${B}/doc/README* ${B}/doc/bug.template; do
 [ -f $i ] && install $i ${D}${docdir}/${BPN}
 done
 
-- 
2.8.3

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


[oe] [meta-oe] [PATCH] bash2dash conversion

2016-09-17 Thread zhe.he
From: "Tim K. Chan" 

Change bash style to dash style

Signed-off-by: Tim K. Chan 
[Adjust context]
Signed-off-by: He Zhe 
---
 .../iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb  | 2 +-
 meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 6 --
 meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb| 2 +-
 meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb | 2 +-
 meta-oe/recipes-support/postgresql/postgresql.inc   | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
 
b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
index 03f6459..17a5c1e 100644
--- 
a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
+++ 
b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
@@ -103,7 +103,7 @@ pkg_postinst_${PN}() {
 
 if [ -e /etc/init.d/populate-volatile.sh ]; then
 /etc/init.d/populate-volatile.sh update
-elif command -v systemd-tmpfiles >/dev/null; then
+elif command -p systemd-tmpfiles >/dev/null; then
 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
 fi
 }
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb 
b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index 3c3b4b5..2961b6b 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -33,7 +33,9 @@ do_configure() {
 }
 
 do_compile () {
-. ${CONFIG_SITE}
+for CONFIG_SITE_ITEM in $CONFIG_SITE; do
+   . $CONFIG_SITE_ITEM
+done
 if [ X"$ac_cv_uint" = X"yes" ]; then
 CFLAGS="${CFLAGS} -DHAVE_uint"
 fi
@@ -68,7 +70,7 @@ do_install () {
 
 pkg_postinst_${PN} () {
 if [ -z "$D" ]; then
-if command -v systemd-tmpfiles >/dev/null; then
+if command -p systemd-tmpfiles >/dev/null; then
 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/lmbench.conf
 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
 ${sysconfdir}/init.d/populate-volatile.sh update
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb 
b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
index 3a3886b..ba0e2ac 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
+++ b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
@@ -108,7 +108,7 @@ do_install_append() {
 
 pkg_postinst_${PN} () {
 if [ -z "$D" ]; then
-if command -v systemd-tmpfiles >/dev/null; then
+if command -p systemd-tmpfiles >/dev/null; then
 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf
 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
 ${sysconfdir}/init.d/populate-volatile.sh update
diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb 
b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
index 84e465d..b1346b3 100644
--- a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
+++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
@@ -67,7 +67,7 @@ pkg_postinst_${PN} () {
 
 if [ x"$D" != "x" ]; then
 OPTS="--root=$D"
-if type systemctl >/dev/null 2>/dev/null; then
+if command -p systemctl >/dev/null 2>/dev/null; then
 systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
 fi
 exit 1
diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc 
b/meta-oe/recipes-support/postgresql/postgresql.inc
index e473f58..9592c79 100644
--- a/meta-oe/recipes-support/postgresql/postgresql.inc
+++ b/meta-oe/recipes-support/postgresql/postgresql.inc
@@ -179,7 +179,7 @@ do_install_append() {
 
 # install COPYRIGHT README HISTORY
 install -d -m 0755 ${D}${docdir}/${BPN}
-for i in ${B}/{COPYRIGHT,README,HISTORY} 
${B}/doc/{KNOWN_BUGS,MISSING_FEATURES,README*,bug.template}; do
+for i in ${B}/COPYRIGHT ${B}/README ${B}/HISTORY ${B}/doc/KNOWN_BUGS 
${B}/doc/MISSING_FEATURES ${B}/doc/README* ${B}/doc/bug.template; do
 [ -f $i ] && install $i ${D}${docdir}/${BPN}
 done
 
-- 
2.8.1

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


[oe] [PATCH v2] lmbench: Fix compilation error of gcc format-security

2016-07-18 Thread zhe.he
From: He Zhe 

oe-core "security_flags: turn potential string format security issues
into an error" adds "-Wformat -Wformat-security -Werror=format-security"
to the default SECURITY_CFLAGS, which may cause lmbench compilation
failure.

This patch fixes lmbench's code.

Signed-off-by: He Zhe 
---
 ...ttp-Use-puts-instead-of-printf-to-avoid-f.patch | 26 ++
 .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb|  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 
meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch

diff --git 
a/meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch
 
b/meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch
new file mode 100644
index 000..48613ef
--- /dev/null
+++ 
b/meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch
@@ -0,0 +1,26 @@
+[PATCH] lat_http: Use puts instead of printf to avoid gcc
+format-security error
+
+Upstream-Status: Pending
+
+Signed-off-by: He Zhe 
+---
+ src/lat_http.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lat_http.c b/src/lat_http.c
+index c630d59..42e64a1 100644
+--- a/src/lat_http.c
 b/src/lat_http.c
+@@ -27,7 +27,7 @@ http(char *server, char *file, int prog)
+   sock = tcp_connect(server, prog, SOCKOPT_REUSE);
+   sprintf(buf, "GET /%s HTTP/1.0\r\n\r\n\n", file);
+   if (debug) {
+-  printf(buf);
++  printf("%s", buf);
+   }
+   write(sock, buf, strlen(buf));
+   while ((n = read(sock, buf, XFERSIZE)) > 0) {
+-- 
+2.8.2
+
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb 
b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index 24cd0b0..b5edaeb 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -18,6 +18,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
file://use-base_libdir-instead-of-hardcoded-lib.patch \
file://lmbench_result_html_report.patch \
file://fix-lmbench-memory-check-failure.patch \
+   file://lat_http-Use-puts-instead-of-printf-to-avoid-f.patch \
 "
 SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
 SRC_URI[sha256sum] = 
"cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
-- 
2.8.1

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


[oe] [meta-oe][PATCH] lmbench: Fix compilation error of gcc format-security

2016-07-18 Thread zhe.he
From: He Zhe 

oe-core "security_flags: turn potential string format security issues
into an error" add "-Wformat -Wformat-security -Werror=format-security"
to the default SECURITY_CFLAGS, which may cause lmbench compilation
failure.

This patch fixes lmbench's code.

Signed-off-by: He Zhe 
---
 ...ttp-Use-puts-instead-of-printf-to-avoid-f.patch | 26 ++
 .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb|  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 
meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch

diff --git 
a/meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch
 
b/meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch
new file mode 100644
index 000..8121e37
--- /dev/null
+++ 
b/meta-oe/recipes-benchmark/lmbench/lmbench/lat_http-Use-puts-instead-of-printf-to-avoid-f.patch
@@ -0,0 +1,26 @@
+[PATCH] lat_http: Use puts instead of printf to avoid gcc
+format-security error
+
+Upstream-Status: pending
+
+Signed-off-by: He Zhe 
+---
+ src/lat_http.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lat_http.c b/src/lat_http.c
+index c630d59..42e64a1 100644
+--- a/src/lat_http.c
 b/src/lat_http.c
+@@ -27,7 +27,7 @@ http(char *server, char *file, int prog)
+   sock = tcp_connect(server, prog, SOCKOPT_REUSE);
+   sprintf(buf, "GET /%s HTTP/1.0\r\n\r\n\n", file);
+   if (debug) {
+-  printf(buf);
++  puts(buf);
+   }
+   write(sock, buf, strlen(buf));
+   while ((n = read(sock, buf, XFERSIZE)) > 0) {
+-- 
+2.8.2
+
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb 
b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index 24cd0b0..b5edaeb 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -18,6 +18,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
file://use-base_libdir-instead-of-hardcoded-lib.patch \
file://lmbench_result_html_report.patch \
file://fix-lmbench-memory-check-failure.patch \
+   file://lat_http-Use-puts-instead-of-printf-to-avoid-f.patch \
 "
 SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
 SRC_URI[sha256sum] = 
"cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
-- 
2.8.1

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