From: liu.ming50@gmail.com
To: meta-virtualization@lists.yoctoproject.org
Cc: Ming Liu <liu.ming50@gmail.com>
Subject: [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin
Date: Sat, 16 Dec 2023 11:26:01 +0100 [thread overview]
Message-ID: <20231216102601.54277-1-liu.ming50@gmail.com> (raw)
From: Ming Liu <liu.ming50@gmail.com>
This allows docker-compose choose to be built as a docker plugin or a
standalone binary, in the later case, docker-compose does not have to
rdepends on docker, so nother container tools like podman can also use
it.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
.../docker-compose/docker-compose_git.bb | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/recipes-containers/docker-compose/docker-compose_git.bb b/recipes-containers/docker-compose/docker-compose_git.bb
index 092ce3d2..b7745f2b 100644
--- a/recipes-containers/docker-compose/docker-compose_git.bb
+++ b/recipes-containers/docker-compose/docker-compose_git.bb
@@ -34,7 +34,8 @@ COMPATIBLE_HOST = "^(?!mips).*"
do_configure[noexec] = "1"
-PACKAGECONFIG ?= ""
+PACKAGECONFIG ?= "docker-plugin"
+PACKAGECONFIG[docker-plugin] = ",,,docker"
include relocation.inc
@@ -63,16 +64,15 @@ do_compile() {
}
do_install() {
- #install -d "${D}${BIN_PREFIX}/bin"
- #install -m 755 "${S}/src/import/bin/docker-compose" "${D}${BIN_PREFIX}/bin"
-
- # commonly installed to: /usr/lib/docker/cli-plugins/
- install -d "${D}${nonarch_libdir}/docker/cli-plugins/"
- install -m 755 "${S}/src/import/bin/docker-compose" "${D}${nonarch_libdir}/docker/cli-plugins/"
-
+ if ${@bb.utils.contains('PACKAGECONFIG', 'docker-plugin', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_libdir}/docker/cli-plugins
+ install -m 755 ${S}/src/import/bin/docker-compose ${D}${nonarch_libdir}/docker/cli-plugins
+ else
+ install -d ${D}${bindir}
+ install -m 755 ${S}/src/import/bin/docker-compose ${D}${bindir}
+ fi
}
-RDEPENDS:${PN} += " docker"
FILES:${PN} += " ${nonarch_libdir}/docker/cli-plugins/"
--
2.34.1
next reply other threads:[~2023-12-16 10:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 10:26 liu.ming50 [this message]
2023-12-19 3:03 ` [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin Bruce Ashfield
2023-12-19 8:34 ` Ming Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231216102601.54277-1-liu.ming50@gmail.com \
--to=liu.ming50@gmail.com \
--cc=meta-virtualization@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).