meta-virtualization/recipes-containers/nerdctl/nerdctl_git.bb
Martin Jansa 81bd76bd18 nerdctl: fix installed-vs-shipped with usrmerge
* fixes:
ERROR: nerdctl-v1.3.0-r0 do_package: QA Issue: nerdctl: Files/directories were installed but not shipped in any package:
  /bin
  /bin/nerdctl
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
nerdctl: 2 installed and not shipped files. [installed-vs-shipped]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-08-15 18:48:28 +00:00

85 lines
2.2 KiB
BlitzBasic

HOMEPAGE = "https://github.com/containerd/nerdctl"
SUMMARY = "Docker-compatible CLI for containerd"
DESCRIPTION = "nerdctl: Docker-compatible CLI for containerd \
"
DEPENDS = " \
go-md2man \
rsync-native \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
"
# Specify the first two important SRCREVs as the format
SRCREV_FORMAT="nerdcli_cgroups"
SRCREV_nerdcli = "1525035ce9aec89a796f6f15c7537db2448f88b9"
SRC_URI = "git://github.com/containerd/nerdctl.git;name=nerdcli;branch=main;protocol=https"
include src_uri.inc
# patches and config
SRC_URI += "file://0001-Makefile-allow-external-specification-of-build-setti.patch \
file://modules.txt \
"
SRC_URI[sha256sum] = "d7b05a9bff34dfb25abe7e5b1e54cf2607f953d91cb33fb231a4775a1a4afa3d"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
GO_IMPORT = "import"
# S = "${WORKDIR}/git"
PV = "v1.3.0"
NERDCTL_PKG = "github.com/containerd/nerdctl"
inherit go goarch
inherit systemd pkgconfig
do_configure[noexec] = "1"
EXTRA_OEMAKE = " \
PREFIX=${prefix} BINDIR=${bindir} LIBEXECDIR=${libexecdir} \
ETCDIR=${sysconfdir} TMPFILESDIR=${nonarch_libdir}/tmpfiles.d \
SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \
"
PACKAGECONFIG ?= ""
# sets the "sites" variable.
include relocation.inc
do_compile() {
cd ${S}/src/import
export GOPATH="$GOPATH:${S}/src/import/.gopath"
# Pass the needed cflags/ldflags so that cgo
# can find the needed headers files and libraries
export GOARCH=${TARGET_GOARCH}
export CGO_ENABLED="1"
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
export GOFLAGS="-mod=vendor -trimpath"
# our copied .go files are to be used for the build
ln -sf vendor.copy vendor
# inform go that we know what we are doing
cp ${WORKDIR}/modules.txt vendor/
oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" binaries
}
do_install() {
install -d "${D}${BIN_PREFIX}${base_bindir}"
install -m 755 "${S}/src/import/_output/nerdctl" "${D}${BIN_PREFIX}${base_bindir}"
}
INHIBIT_PACKAGE_STRIP = "1"
INSANE_SKIP:${PN} += "ldflags already-stripped"