-
-
Notifications
You must be signed in to change notification settings - Fork 148
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 egg-pumpkin.json #425
base: master
Are you sure you want to change the base?
Add egg-pumpkin.json #425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the installation script here to make it readable for everyone:
#!/bin/ash
set -eux
apk add --no-cache musl-dev git
mkdir -p /mnt/server
REPO_URL="${GIT_URL:-https://github.com/Snowiiii/Pumpkin.git}"
if [ -n "$GIT_BRANCH" ]; then
git clone --depth 1 --single-branch --branch "$GIT_BRANCH" "$REPO_URL"
else
git clone --depth 1 --single-branch "$REPO_URL"
fi
if [ -n "$GIT_COMMIT" ]; then
git checkout "$GIT_COMMIT"
fi
cd Pumpkin
if [[ "$BUILD_RELEASE" == "1" || "$BUILD_RELEASE" == "true" ]]; then
cargo build --release
strip target/release/pumpkin
cp target/release/pumpkin /mnt/server/pumpkin
else
cargo build
cp target/debug/pumpkin /mnt/server/pumpkin
fi
egg-pumpkin.json
Outdated
}, | ||
"scripts": { | ||
"installation": { | ||
"script": "#!\/bin\/ash\r\nset -eux\r\n\r\napk add --no-cache musl-dev git\r\nmkdir -p \/mnt\/server\r\n\r\nREPO_URL=\"${GIT_URL:-https:\/\/github.com\/Snowiiii\/Pumpkin.git}\"\r\n\r\nif [ -n \"$GIT_BRANCH\" ]; then\r\n git clone --depth 1 --single-branch --branch \"$GIT_BRANCH\" \"$REPO_URL\"\r\nelse\r\n git clone --depth 1 --single-branch \"$REPO_URL\"\r\nfi\r\n\r\nif [ -n \"$GIT_COMMIT\" ]; then\r\n git checkout \"$GIT_COMMIT\"\r\nfi\r\n\r\ncd Pumpkin\r\n\r\nif [[ \"$BUILD_RELEASE\" == \"1\" || \"$BUILD_RELEASE\" == \"true\" ]]; then\r\n cargo build --release\r\n strip target\/release\/pumpkin\r\n cp target\/release\/pumpkin \/mnt\/server\/pumpkin\r\nelse\r\n cargo build\r\n cp target\/debug\/pumpkin \/mnt\/server\/pumpkin\r\nfi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cargo build
command will build a generic image, since this will most likely be deployed on server with one specific set of hardware we can add additional instructions to optimize for this server's hardware. Through setting the following environment variables:
RUSTFLAGS="-C target-feature=-crt-static -C target-cpu=native"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to tweak the images a bit
Error loading shared library libgcc_s.so.1: No such file or directory (needed by ./pumpkin)
Error relocating ./pumpkin: _Unwind_Resume: symbol not found
Error relocating ./pumpkin: _Unwind_GetTextRelBase: symbol not found
Error relocating ./pumpkin: _Unwind_GetIPInfo: symbol not found
Error relocating ./pumpkin: _Unwind_GetIP: symbol not found
Error relocating ./pumpkin: _Unwind_SetGR: symbol not found
Error relocating ./pumpkin: _Unwind_GetLanguageSpecificData: symbol not found
Error relocating ./pumpkin: _Unwind_Backtrace: symbol not found
Error relocating ./pumpkin: _Unwind_GetRegionStart: symbol not found
Error relocating ./pumpkin: _Unwind_SetIP: symbol not found
Error relocating ./pumpkin: _Unwind_RaiseException: symbol not found
Error relocating ./pumpkin: _Unwind_GetDataRelBase: symbol not found
Error relocating ./pumpkin: _Unwind_DeleteException: symbol not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I was honestly wondering on if the pumpkin executable could run without libgcc. I guess this answers that.
What we'd need to do is provide our own runtime container with libgcc installed. I had done that in my own repository for a pumpkin egg however I didn't bother building an ARM64 variant. Which the alpine yolk has.
@Snowiiii would you be fine with adding another container image for Pumpkin to run on Pterodactyl?
Probably tagged along the lines of ghcr.io/snowiiii/pumpkin:yolk
.
What have you done exactly to test it? I don't see anything specified in regards to that. Even though docker is supposed to allow for one and the same environment to be replicate able across machines, I've found out that this may not always be the case. |
I ran it on Windows 11 WSL Debian bookworm. |
Windows (dies inside) |
Need to play league of legends and I don't want to clutter my Debian server. I also have a dual boot with fedora, but I have not used it for a while. |
Description
Add egg for Pterodactyl
Testing
Checklist
Things need to be done before this Pull Request can be merged.
cargo fmt
cargo clippy
cargo test