* [Buildroot] [PATCH v2 1/2] package/runc: add host package
@ 2022-01-27 4:02 Christian Stewart via buildroot
2022-01-27 4:02 ` [Buildroot] [PATCH v2 2/2] package/buildah: new package Christian Stewart via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Christian Stewart via buildroot @ 2022-01-27 4:02 UTC (permalink / raw)
To: buildroot; +Cc: Christian Stewart, Thomas Petazzoni
Adds support for building runc as a host package.
The bin name and gomod have to be specified as the pkg-golang infrastructure
assumes the bin name will be "host-runc" on default.
Signed-off-by: Christian Stewart <christian@paral.in>
---
package/Config.in.host | 1 +
package/runc/Config.in.host | 8 ++++++++
package/runc/runc.mk | 8 ++++++++
3 files changed, 17 insertions(+)
create mode 100644 package/runc/Config.in.host
diff --git a/package/Config.in.host b/package/Config.in.host
index 341e24926b..2ce015eacf 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -81,6 +81,7 @@ menu "Host utilities"
source "package/raspberrypi-usbboot/Config.in.host"
source "package/rauc/Config.in.host"
source "package/riscv-isa-sim/Config.in.host"
+ source "package/runc/Config.in.host"
source "package/rustc/Config.in.host"
source "package/s6-rc/Config.in.host"
source "package/sam-ba/Config.in.host"
diff --git a/package/runc/Config.in.host b/package/runc/Config.in.host
new file mode 100644
index 0000000000..ce0dd518a6
--- /dev/null
+++ b/package/runc/Config.in.host
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_RUNC
+ bool "host runc"
+ depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+ help
+ runC is a CLI tool for spawning and running containers
+ according to the OCP specification.
+
+ https://github.com/opencontainers/runc
diff --git a/package/runc/runc.mk b/package/runc/runc.mk
index c4e45a00a9..932bf39eea 100644
--- a/package/runc/runc.mk
+++ b/package/runc/runc.mk
@@ -10,6 +10,8 @@ RUNC_LICENSE = Apache-2.0
RUNC_LICENSE_FILES = LICENSE
RUNC_CPE_ID_VENDOR = linuxfoundation
+RUNC_GOMOD = github.com/opencontainers/runc
+
RUNC_LDFLAGS = -X main.version=$(RUNC_VERSION)
RUNC_TAGS = cgo static_build
@@ -23,4 +25,10 @@ RUNC_TAGS += seccomp
RUNC_DEPENDENCIES += libseccomp host-pkgconf
endif
+HOST_RUNC_BIN_NAME = runc
+HOST_RUNC_LDFLAGS = $(RUNC_LDFLAGS)
+HOST_RUNC_TAGS = $(RUNC_TAGS)
+HOST_RUNC_INSTALL_BINS = $(HOST_RUNC_BIN_NAME)
+
$(eval $(golang-package))
+$(eval $(host-golang-package))
--
2.35.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/buildah: new package
2022-01-27 4:02 [Buildroot] [PATCH v2 1/2] package/runc: add host package Christian Stewart via buildroot
@ 2022-01-27 4:02 ` Christian Stewart via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Christian Stewart via buildroot @ 2022-01-27 4:02 UTC (permalink / raw)
To: buildroot; +Cc: Christian Stewart, Thomas Petazzoni
Adds both host and target packages for buildah.
Buildah is a tool that facilitates building OCI images.
https://github.com/containers/buildah
Signed-off-by: Christian Stewart <christian@paral.in>
---
v1 -> v2:
- add package to developers
- add host runc dependency for host package
- add libgpgme runtime dependency
Signed-off-by: Christian Stewart <christian@paral.in>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/Config.in.host | 1 +
package/buildah/Config.in | 23 ++++++++++++++++++++
package/buildah/Config.in.host | 8 +++++++
package/buildah/buildah.hash | 3 +++
package/buildah/buildah.mk | 39 ++++++++++++++++++++++++++++++++++
7 files changed, 76 insertions(+)
create mode 100644 package/buildah/Config.in
create mode 100644 package/buildah/Config.in.host
create mode 100644 package/buildah/buildah.hash
create mode 100644 package/buildah/buildah.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index fe8de1916e..80e7c5abee 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -529,6 +529,7 @@ F: package/python-pylibftdi/
N: Christian Stewart <christian@paral.in>
F: package/batman-adv/
+F: package/buildah/
F: package/containerd/
F: package/delve/
F: package/docker-cli/
diff --git a/package/Config.in b/package/Config.in
index e4ca195beb..91eb66a454 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2523,6 +2523,7 @@ menu "System tools"
source "package/audit/Config.in"
source "package/balena-engine/Config.in"
source "package/bubblewrap/Config.in"
+ source "package/buildah/Config.in"
source "package/cgroupfs-mount/Config.in"
source "package/circus/Config.in"
source "package/containerd/Config.in"
diff --git a/package/Config.in.host b/package/Config.in.host
index 2ce015eacf..6aadb1b640 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -7,6 +7,7 @@ menu "Host utilities"
source "package/babeltrace2/Config.in.host"
source "package/bmap-tools/Config.in.host"
source "package/btrfs-progs/Config.in.host"
+ source "package/buildah/Config.in.host"
source "package/cbootimage/Config.in.host"
source "package/checkpolicy/Config.in.host"
source "package/checksec/Config.in.host"
diff --git a/package/buildah/Config.in b/package/buildah/Config.in
new file mode 100644
index 0000000000..05bd0eec31
--- /dev/null
+++ b/package/buildah/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_BUILDAH
+ bool "buildah"
+ depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
+ depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgpgme -> libgpg-error
+ depends on BR2_TOOLCHAIN_HAS_THREADS # runc
+ depends on BR2_USE_MMU # libgpgme -> libassuan
+ depends on !BR2_TOOLCHAIN_USES_UCLIBC # runc -> no fexecve
+ # gnupg and runc are not needed to build, but at runtime.
+ select BR2_PACKAGE_LIBGPGME
+ select BR2_PACKAGE_GNUPG if !BR2_PACKAGE_GNUPG2
+ select BR2_PACKAGE_LIBGPG_ERROR
+ select BR2_PACKAGE_LIBASSUAN
+ select BR2_PACKAGE_RUNC
+ help
+ Buildah is a tool that facilitates building OCI images.
+
+ https://github.com/containers/buildah
+
+comment "buildah needs a glibc or musl toolchain w/ threads"
+ depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS && \
+ BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_UCLIBC
diff --git a/package/buildah/Config.in.host b/package/buildah/Config.in.host
new file mode 100644
index 0000000000..67fee6d7ac
--- /dev/null
+++ b/package/buildah/Config.in.host
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_BUILDAH
+ bool "host buildah"
+ depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+ select BR2_PACKAGE_HOST_RUNC
+ help
+ Buildah is a tool that facilitates building OCI images.
+
+ https://github.com/containers/buildah
diff --git a/package/buildah/buildah.hash b/package/buildah/buildah.hash
new file mode 100644
index 0000000000..c7e00d02a7
--- /dev/null
+++ b/package/buildah/buildah.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 d99b5187a25bc9d7385408732a0e155df0458b4d2cea6e8d002f3fa2cbaac76f buildah-1.24.0.tar.gz
+sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE
diff --git a/package/buildah/buildah.mk b/package/buildah/buildah.mk
new file mode 100644
index 0000000000..87eed8b834
--- /dev/null
+++ b/package/buildah/buildah.mk
@@ -0,0 +1,39 @@
+################################################################################
+#
+# buildah
+#
+################################################################################
+
+BUILDAH_VERSION = 1.24.0
+BUILDAH_SITE = $(call github,containers,buildah,v$(BUILDAH_VERSION))
+
+BUILDAH_LICENSE = Apache-2.0
+BUILDAH_LICENSE_FILES = LICENSE
+
+BUILDAH_DEPENDENCIES = libgpgme
+
+BUILDAH_CPE_ID_VENDOR = buildah_project
+BUILDAH_CPE_ID_PRODUCT = buildah
+
+BUILDAH_TAGS = \
+ cgo \
+ exclude_graphdriver_aufs \
+ exclude_graphdriver_btrfs \
+ exclude_graphdriver_devicemapper \
+ exclude_graphdriver_zfs
+BUILDAH_BUILD_TARGETS = cmd/buildah
+BUILDAH_GOMOD = github.com/containers/buildah
+
+BUILDAH_LDFLAGS = \
+ -X $(BUILDAH_GOMOD)/cmd/buildah.GitCommit=v$(BUILDAH_VERSION) \
+ -X $(BUILDAH_GOMOD)/define.Version=v$(BUILDAH_VERSION)
+
+BUILDAH_INSTALL_BINS = $(notdir $(BUILDAH_BUILD_TARGETS))
+
+HOST_BUILDAH_BUILD_TARGETS = $(BUILDAH_BUILD_TARGETS)
+HOST_BUILDAH_TAGS = $(BUILDAH_TAGS)
+HOST_BUILDAH_LDFLAGS = $(BUILDAH_LDFLAGS)
+HOST_BUILDAH_INSTALL_BINS = $(BUILDAH_INSTALL_BINS)
+
+$(eval $(golang-package))
+$(eval $(host-golang-package))
--
2.35.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-27 4:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 4:02 [Buildroot] [PATCH v2 1/2] package/runc: add host package Christian Stewart via buildroot
2022-01-27 4:02 ` [Buildroot] [PATCH v2 2/2] package/buildah: new package Christian Stewart via buildroot
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.