Skip to contentSkip to conversation

etcd: don't hardcode /usr/lib in do_install

PATCH New Martin Jansa 1 participant 1 message May 15, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 etcd: don't hardcode /usr/lib in do_install

* I don't know anything about etcd including why we need these binaries duplicated
in libdir and bindir, but use ${libdir} instead of hardcoded /usr/lib to fix
do_install with multilib enabled when libdir is /usr/lib64 and it was failing
with:
DEBUG: Executing shell function do_install
ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory
install: cannot stat 'etcd/3.5.7-r0/image/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcd': No such file or directory
WARNING: exit code 1 from a shell command.

* the error from ls is unrelated, fixed in:
https://lists.openembedded.org/g/openembedded-core/message/181269

* also reported on github:
https://github.com/openembedded/meta-openembedded/pull/616

---
 meta-oe/recipes-extended/etcd/etcd_3.5.7.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-oe/recipes-extended/etcd/etcd_3.5.7.bb +3 -3
index 9a8b9861f2..0794158a52 100644
@@ -59,9 +59,9 @@ SYSTEMD_SERVICE:${PN}:append = " etcd.service etcd-new.service etcd-new.path"
 
 do_install:append() {
     install -d ${D}${bindir}/
-    install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir}
-    install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir}
-    install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir}
+    install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir}
+    install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir}
+    install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir}
     install -m 0644 ${WORKDIR}/etcd-existing.conf -D -t ${D}${sysconfdir}/etcd.d
     install -d ${D}${systemd_system_unitdir}
     install -m 0644 ${WORKDIR}/etcd.service ${D}${systemd_system_unitdir}/
Signature · 1 line
2.40.1