Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add starship shell prompt #1567

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Add starship shell prompt #1567

merged 2 commits into from
Jan 9, 2025

Conversation

papertigers
Copy link
Contributor

This adds the starship prompt package https://starship.rs

I have been compiling this and distributing to hosts/zones manually but it would be nice to have in pkg.
The pkg successfully builds on my build box but complains about ELF runtimes and stack smashing which I think are safe to ignore iirc?

@papertigers papertigers force-pushed the starship branch 2 times, most recently from d27d66b to 9b9ee89 Compare January 5, 2025 02:02
@papertigers
Copy link
Contributor Author

Sorry about the extra force pushes - my editor messed up the formatting on the MD table

Copy link
Member

@citrus-it citrus-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the runtime warnings, the unnecessary libraries doesn't matter much (although it would be nice to clean that up - is it something in rust itself?) but can you look at patching Cargo.toml's [profile.release] section so that it doesn't strip the binary itself? Then the strip_install line you have in the script will take care of it but preserve the symbol table for us.

==== opt/ooce/bin/starship ====
        NEEDED=librt.so.1       <dependency no longer necessary>
        NEEDED=libpthread.so.1  <dependency no longer necessary>
        symbol table should not be stripped     <remove -s?>

build/starship/build.sh Outdated Show resolved Hide resolved
build/starship/build.sh Show resolved Hide resolved
@papertigers
Copy link
Contributor Author

With the runtime warnings, the unnecessary libraries doesn't matter much (although it would be nice to clean that up - is it something in rust itself?) but can you look at patching Cargo.toml's [profile.release] section so that it doesn't strip the binary itself? Then the strip_install line you have in the script will take care of it but preserve the symbol table for us.

==== opt/ooce/bin/starship ====
        NEEDED=librt.so.1       <dependency no longer necessary>
        NEEDED=libpthread.so.1  <dependency no longer necessary>
        symbol table should not be stripped     <remove -s?>

I believe this is a rust thing:

omnios@omnios-builder:/ws$ cargo new foo
    Creating binary (application) `foo` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html


omnios@omnios-builder:/ws$ cd foo


omnios@omnios-builder:/ws/foo$ cargo b --release
   Compiling foo v0.1.0 (/ws/foo)
    Finished `release` profile [optimized] target(s) in 1.28s


omnios@omnios-builder:/ws/foo$ ldd target/release/foo
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libumem.so.1 =>  /lib/64/libumem.so.1
        libgcc_s.so.1 =>         /usr/gcc/14/lib/amd64/libgcc_s.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libm.so.2 =>     /lib/64/libm.so.2

@oetiker oetiker requested a review from citrus-it January 7, 2025 08:13
@citrus-it citrus-it merged commit 4544ecb into omniosorg:master Jan 9, 2025
1 check passed
@papertigers papertigers deleted the starship branch January 9, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants