From 4404bab36cc7fe80e42d1299cd2af4f36950b893 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Mon, 8 Jul 2024 20:53:24 -0700 Subject: [PATCH] fix: Do not strip binaries in submarine (#1428) (#1444) * fix: Do not strip binaries in submarine * Update anda/system/submarine/submarine.spec Co-authored-by: lea Signed-off-by: Cappy Ishihara --------- Signed-off-by: Cappy Ishihara Co-authored-by: lea (cherry picked from commit 3c49f8ce235e1bc46fa529be70fa0a3191eaa39b) Co-authored-by: Cappy Ishihara --- anda/system/submarine/submarine.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/anda/system/submarine/submarine.spec b/anda/system/submarine/submarine.spec index d20fb4a0c9..96ffec4228 100644 --- a/anda/system/submarine/submarine.spec +++ b/anda/system/submarine/submarine.spec @@ -3,6 +3,10 @@ %elifarch aarch64 %global arch arm64 %endif +# do not strip binaries +%define __strip /bin/true +%define debug_package %{nil} + Name: submarine Version: 0.2.1 @@ -10,7 +14,7 @@ Release: 1%?dist Summary: Experimental bootloader for ChomeOS's depthcharge License: GPL-3.0 URL: https://github.com/FyraLabs/submarine -BuildRequires: make gcc flex bison elfutils-devel parted vboot-utils golang xz bc openssl-devel git depthcharge-tools +BuildRequires: make gcc flex bison elfutils-devel parted vboot-utils golang xz bc openssl-devel git depthcharge-tools uboot-tools %description An experimental bootloader for ChomeOS's depthcharge. @@ -20,9 +24,12 @@ Submarine provides a minimal Linux environmemt that lives in a small partition (or a different system if you're brave.) %prep -go install github.com/u-root/u-root@v0.11.0 git clone --recurse-submodules --shallow-submodules -b v%version %url . +pushd u-root +go install +popd + %build export PATH=$PATH:$HOME/go/bin %make_build %arch @@ -30,8 +37,14 @@ export PATH=$PATH:$HOME/go/bin %install mkdir -p %buildroot/boot %buildroot%_datadir/submarine install -Dm644 build/submarine-*.kpart %buildroot%_datadir/submarine/ +# Symlink the installed kpart to just submarine.kpart +pushd %buildroot%_datadir/submarine/ +find . -name 'submarine-*.kpart' -exec ln -srf {} submarine.kpart \; +popd + install -Dm644 build/submarine-*.bin %buildroot%_datadir/submarine/ %files %_datadir/submarine/submarine-*.kpart +%_datadir/submarine/submarine.kpart %_datadir/submarine/submarine-*.bin