[meta-virtualization] [PATCH 5/6] cni: move cni tools to /usr/lib/cni

ChenQi Qi.Chen at windriver.com
Sun Sep 1 18:45:54 PDT 2019


On 09/02/2019 04:33 AM, Stefan Agner wrote:
> From: Stefan Agner <stefan.agner at toradex.com>
>
> Use a standard location to store the cni tools and plugins. This
> is more in line how other distributions package cni.

But from what I see, at least Fedora and Ubuntu are using /opt/cni/bin 
directory.
Also, have you tested such change with simple k8s setup which makes use 
of these plugins? E.g. flannel?

Best Regards,
Chen Qi

> Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
> ---
>   recipes-containers/cri-o/files/crio.conf | 2 +-
>   recipes-networking/cni/cni_git.bb        | 4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/recipes-containers/cri-o/files/crio.conf b/recipes-containers/cri-o/files/crio.conf
> index 51d7f40..dd22465 100644
> --- a/recipes-containers/cri-o/files/crio.conf
> +++ b/recipes-containers/cri-o/files/crio.conf
> @@ -144,4 +144,4 @@ registries = [
>   network_dir = "/etc/cni/net.d/"
>   
>   # plugin_dir is is where CNI plugin binaries are stored.
> -plugin_dir = "/opt/cni/bin/"
> +plugin_dir = "/usr/lib/cni/"
> diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb
> index 5348b95..86e5e0f 100644
> --- a/recipes-networking/cni/cni_git.bb
> +++ b/recipes-networking/cni/cni_git.bb
> @@ -63,7 +63,7 @@ do_compile() {
>   }
>   
>   do_install() {
> -    localbindir="/opt/cni/bin"
> +    localbindir="${libdir}/cni/"
>   
>       install -d ${D}${localbindir}
>       install -d ${D}/${sysconfdir}/cni/net.d
> @@ -72,7 +72,7 @@ do_install() {
>       install -m 755 -D ${WORKDIR}/plugins/bin/* ${D}/${localbindir}
>   }
>   
> -FILES_${PN} += "/opt/cni/bin/*"
> +FILES_${PN} += "${libdir}/cni/*"
>   
>   INSANE_SKIP_${PN} += "ldflags already-stripped"
>   




More information about the meta-virtualization mailing list