* [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin
@ 2023-12-16 10:26 liu.ming50
2023-12-19 3:03 ` Bruce Ashfield
0 siblings, 1 reply; 3+ messages in thread
From: liu.ming50 @ 2023-12-16 10:26 UTC (permalink / raw)
To: meta-virtualization; +Cc: Ming Liu
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin
2023-12-16 10:26 [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin liu.ming50
@ 2023-12-19 3:03 ` Bruce Ashfield
2023-12-19 8:34 ` Ming Liu
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2023-12-19 3:03 UTC (permalink / raw)
To: Ming Liu; +Cc: meta-virtualization
In message: [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin
on 16/12/2023 Ming Liu wrote:
> 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.
That's how it used to be installed, but upstream broke it for a bit.
Did you test both modes ? If so, it would be nice to get a follow up
patch in the form of a README in the recipe directory that indicates
the test steps. That'll allow me to automate it in the future.
For now, I've staged this on master next, while we wait for those
test instructions.
Bruce
>
> 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8510): https://lists.yoctoproject.org/g/meta-virtualization/message/8510
> Mute This Topic: https://lists.yoctoproject.org/mt/103206987/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin
2023-12-19 3:03 ` Bruce Ashfield
@ 2023-12-19 8:34 ` Ming Liu
0 siblings, 0 replies; 3+ messages in thread
From: Ming Liu @ 2023-12-19 8:34 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: meta-virtualization
[-- Attachment #1: Type: text/plain, Size: 3320 bytes --]
Hi, Bruce:
Yes, I tested it for both docker and podman, will update readme file.
the best,
thank you
Bruce Ashfield <bruce.ashfield@gmail.com> 於 2023年12月19日 週二 上午4:03寫道:
> In message: [meta-virtualization][PATCH] docker-compose: introduce
> pkgconfig docker-plugin
> on 16/12/2023 Ming Liu wrote:
>
> > 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.
>
> That's how it used to be installed, but upstream broke it for a bit.
>
> Did you test both modes ? If so, it would be nice to get a follow up
> patch in the form of a README in the recipe directory that indicates
> the test steps. That'll allow me to automate it in the future.
>
> For now, I've staged this on master next, while we wait for those
> test instructions.
>
> Bruce
>
> >
> > 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
> >
>
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#8510):
> https://lists.yoctoproject.org/g/meta-virtualization/message/8510
> > Mute This Topic: https://lists.yoctoproject.org/mt/103206987/1050810
> > Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub
> [bruce.ashfield@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
>
[-- Attachment #2: Type: text/html, Size: 5222 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-19 8:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-16 10:26 [meta-virtualization][PATCH] docker-compose: introduce pkgconfig docker-plugin liu.ming50
2023-12-19 3:03 ` Bruce Ashfield
2023-12-19 8:34 ` Ming Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.