-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Leonardo Held <[email protected]>
- Loading branch information
1 parent
f8cf742
commit 8b867e2
Showing
4 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
recipes-containers/toolbox/files/0001-Modify-compiler-detection-for-Yocto.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From c85e9e7dff2ecba5741eebfbacc805a86ba1f64d Mon Sep 17 00:00:00 2001 | ||
From: Leonardo Held <[email protected]> | ||
Date: Mon, 29 Jan 2024 15:34:18 -0300 | ||
Subject: [PATCH] Modify compiler detection for Yocto | ||
|
||
... as it won't solve for 'cc' like most distros. | ||
|
||
Signed-off-by: Leonardo Held <[email protected]> | ||
--- | ||
src/meson.build | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/meson.build b/src/meson.build | ||
index 098c692..da33fde 100644 | ||
--- a/src/meson.build | ||
+++ b/src/meson.build | ||
@@ -59,6 +59,8 @@ endif | ||
|
||
message('Host machine dynamic linker:', dynamic_linker) | ||
|
||
+yocto_compiler = cc.cmd_array().get(0) | ||
+ | ||
toolbox_go = custom_target( | ||
'toolbox', | ||
command: [ | ||
@@ -67,7 +69,7 @@ toolbox_go = custom_target( | ||
meson.project_build_root(), | ||
'@OUTPUT@', | ||
meson.project_version(), | ||
- cc.cmd_array().get(-1), | ||
+ yocto_compiler, | ||
dynamic_linker, | ||
migration_path_for_coreos_toolbox.to_string(), | ||
], | ||
-- | ||
2.43.0 | ||
|
80 changes: 80 additions & 0 deletions
80
recipes-containers/toolbox/files/0002-Remove-completions-generation.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
From d57b7e1aaa3c5862b40917798871ad2a6b212059 Mon Sep 17 00:00:00 2001 | ||
From: Leonardo Held <[email protected]> | ||
Date: Mon, 29 Jan 2024 15:52:59 -0300 | ||
Subject: [PATCH] Remove completions generation | ||
|
||
Bitbake really doesn't like it. | ||
|
||
Signed-off-by: Leonardo Held <[email protected]> | ||
--- | ||
src/meson.build | 47 ----------------------------------------------- | ||
1 file changed, 47 deletions(-) | ||
|
||
diff --git a/src/meson.build b/src/meson.build | ||
index 098c692..d7cc811 100644 | ||
--- a/src/meson.build | ||
+++ b/src/meson.build | ||
@@ -1,7 +1,6 @@ | ||
go_build_wrapper_file = files('go-build-wrapper') | ||
go_build_wrapper_program = find_program('go-build-wrapper') | ||
|
||
-meson_generate_completions_program = find_program('meson_generate_completions.py') | ||
meson_go_fmt_program = find_program('meson_go_fmt.py') | ||
|
||
sources = files( | ||
@@ -77,52 +76,6 @@ toolbox_go = custom_target( | ||
output: 'toolbox', | ||
) | ||
|
||
-if bashcompletionsdir != '' | ||
- custom_target( | ||
- 'bash-completion', | ||
- capture: true, | ||
- command: [ | ||
- meson_generate_completions_program, | ||
- meson.current_source_dir(), | ||
- 'bash', | ||
- ], | ||
- depends: [toolbox_go], | ||
- install: true, | ||
- install_dir: bashcompletionsdir, | ||
- output: 'toolbox.bash', | ||
-) | ||
-endif | ||
- | ||
-if fishcompletionsdir != '' | ||
- custom_target( | ||
- 'fish-completion', | ||
- capture: true, | ||
- command: [ | ||
- meson_generate_completions_program, | ||
- meson.current_source_dir(), | ||
- 'fish', | ||
- ], | ||
- depends: [toolbox_go], | ||
- install: true, | ||
- install_dir: fishcompletionsdir, | ||
- output: 'toolbox.fish', | ||
-) | ||
-endif | ||
- | ||
-custom_target( | ||
- 'zsh-completion', | ||
- capture: true, | ||
- command: [ | ||
- meson_generate_completions_program, | ||
- meson.current_source_dir(), | ||
- 'zsh', | ||
- ], | ||
- depends: [toolbox_go], | ||
- install: true, | ||
- install_dir: zshcompletionsdir, | ||
- output: '_toolbox', | ||
-) | ||
- | ||
if shellcheck.found() | ||
test('shellcheck src/go-build-wrapper', shellcheck, args: [go_build_wrapper_file]) | ||
endif | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
SUMMARY = " Tool for interactive command line environments on Linux " | ||
|
||
LICENSE = "Apache-2.0" | ||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" | ||
|
||
SRC_URI = "git://github.com/containers/toolbox.git;branch=main;protocol=https" | ||
SRCREV = "ccc3eee72722e29172ec35184df89cad7c100a5b" | ||
|
||
S = "${WORKDIR}/git" | ||
|
||
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" | ||
|
||
FILES:${PN} += " \ | ||
${datadir}/profile.d/toolbox.sh \ | ||
${libdir}/tmpfiles.d/toolbox.conf \ | ||
" | ||
|
||
# Skip specifically for some Go recipes | ||
# rpaths has to be skipped because toolbox hardcodes an rpath inside the container | ||
INSANE_SKIP:${PN} = "ldflags textrel rpaths" | ||
|
||
SRC_URI:append = " \ | ||
file://0001-Modify-compiler-detection-for-Yocto.patch \ | ||
file://0002-Remove-completions-generation.patch \ | ||
" | ||
|
||
DEPENDS = "go go-md2man-native shadow systemd" | ||
|
||
inherit meson | ||
inherit pkgconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ CORE_IMAGE_BASE_INSTALL:append = " \ | |
podman \ | ||
podman-compose \ | ||
fuse-overlayfs \ | ||
toolbox \ | ||
" |