[meta-oe][PATCH] liblockfile: fix buildpaths issue


Yu, Mingli
 

From: Mingli Yu <mingli.yu@...>

Fixes:
WARNING: liblockfile-1.14-r0 do_package_qa: QA Issue: File /usr/lib/liblockfile.a in package liblockfile-staticdev contains reference to TMPDIR [buildpaths]
WARNING: liblockfile-1.14-r0 do_package_qa: QA Issue: File /usr/lib/liblockfile.so.1.0 in package liblockfile contains reference to TMPDIR [buildpaths]

Signed-off-by: Mingli Yu <mingli.yu@...>
---
.../0001-Makefile.in-redefine-LOCKPROG.patch | 33 +++++++++++++++++++
.../liblockfile/liblockfile_1.14.bb | 1 +
2 files changed, 34 insertions(+)
create mode 100644 meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-redefine-LOCKPROG.patch

diff --git a/meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-redefine-LOCKPROG.patch b/meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-redefine-LOCKPROG.patch
new file mode 100644
index 000000000..35549ff2d
--- /dev/null
+++ b/meta-oe/recipes-extended/liblockfile/liblockfile/0001-Makefile.in-redefine-LOCKPROG.patch
@@ -0,0 +1,33 @@
+From 9beb650712d448ad9c0899de9d98e9b623f9c249 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@...>
+Date: Fri, 12 Aug 2022 11:18:15 +0800
+Subject: [PATCH] Makefile.in: redefine LOCKPROG
+
+By default the LOCKPROG will be expanded as below:
+LOCKPROG="/build/tmp-glibc/work/core2-32-wrs-linux/liblockfile/1.14-r0/image/usr/bin/dotlockfile"
+
+And it should be "/usr/bin/dotlockfile" on the target.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <mingli.yu@...>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 6e53179..bfa0acb 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -42,7 +42,7 @@ dotlockfile: dotlockfile.o xlockfile.o
+ $(CC) $(LDFLAGS) -o dotlockfile dotlockfile.o xlockfile.o
+
+ lockfile.o: lockfile.c
+- $(CC) $(CFLAGS) -DLIB -DLOCKPROG=\"$(bindir)/dotlockfile\" \
++ $(CC) $(CFLAGS) -DLIB -DLOCKPROG=\"/usr/bin/dotlockfile\" \
+ -c lockfile.c
+
+ xlockfile.o: lockfile.c
+--
+2.25.1
+
diff --git a/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb b/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb
index bac3a2c0b..2604e14f0 100644
--- a/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb
+++ b/meta-oe/recipes-extended/liblockfile/liblockfile_1.14.bb
@@ -10,6 +10,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/libl/liblockfile/liblockfile_1.14.orig.tar.gz \
file://0001-Makefile.in-add-DESTDIR.patch \
file://0001-Makefile.in-install-nfslock-libs.patch \
file://liblockfile-fix-install-so-to-man-dir.patch \
+ file://0001-Makefile.in-redefine-LOCKPROG.patch \
"

SRC_URI[md5sum] = "420c056ba0cc4d1477e402f70ba2f5eb"
--
2.25.1

Join openembedded-devel@lists.openembedded.org to automatically receive all group messages.