blob: 10597d8a18bcc93c82c5ce04105f637621d0b362 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
HOMEPAGE = "https://buildah.io"
SUMMARY = "A tool that facilitates building OCI container images."
DESCRIPTION = "A tool that facilitates building OCI container images."
# Apache-2.0 for containerd
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/github.com/containers/buildah/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
S = "${WORKDIR}/git"
SRCREV_buildah = "9aaa280f29910a9a0a13b83dd522508f1fa40a91"
PV = "1.26.9"
inherit go
inherit goarch
inherit pkgconfig
# Rdepends on podman which needs seccomp and ipv6
inherit features_check
REQUIRED_DISTRO_FEATURES = "seccomp ipv6"
GO_IMPORT = "github.com/containers/buildah"
GO_INSTALL = "${GO_IMPORT}"
GO_WORKDIR = "${GO_INSTALL}"
GOBUILDFLAGS += "-mod vendor"
SRC_URI = " \
git://github.com/containers/buildah;branch=release-1.26;name=buildah;protocol=https \
file://0001-Use-securejoin.SecureJoin-when-forming-userns-paths.patch;patchdir=src/github.com/containers/buildah/vendor/github.com/containers/storage \
"
DEPENDS = "libdevmapper btrfs-tools gpgme"
RDEPENDS:${PN} = "cgroup-lite fuse-overlayfs libdevmapper podman"
RDEPENDS:${PN}-dev = "bash perl"
do_compile:prepend() {
cd ${S}/src/github.com/containers/buildah
}
go_do_compile() {
export TMPDIR="${GOTMPDIR}"
if [ -n "${GO_INSTALL}" ]; then
if [ -n "${GO_LINKSHARED}" ]; then
${GO} install ${GOBUILDFLAGS} ./cmd/buildah
${GO} install ${GOBUILDFLAGS} ./tests/imgtype/imgtype.go
${GO} install ${GOBUILDFLAGS} ./tests/copy/copy.go
rm -rf ${B}/bin
fi
${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./cmd/buildah
${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./tests/imgtype/imgtype.go
${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./tests/copy/copy.go
fi
}
do_install:append() {
dest_dir=${D}/${sysconfdir}/containers
mkdir -p ${dest_dir}
install -m 666 ${S}/src/github.com/containers/buildah/docs/samples/registries.conf ${dest_dir}/buildah.registries.conf.sample
install -m 666 ${S}/src/github.com/containers/buildah/tests/policy.json ${dest_dir}/buildah.policy.json.sample
}
|