Azathothas / Toolpacks

Official (pkgforge-edge) Repo 📦📀 & The Largest Collection of Pre-Compiled (+ UPXed) Linux Static Binaries (incl. Build Scripts) & Package Manager (rust) :: https://github.com/pkgforge/soar
https://bin.pkgforge.dev/
MIT License
151 stars 16 forks source link

[Fix] Delete u-root and add gobusybox_bb and gobusybox_makebb #11

Closed xplshn closed 7 months ago

xplshn commented 7 months ago

Please use this as template in case my syntax or style doesn't fit the repo's.

Azathothas commented 7 months ago

In the future, and also as stated in https://github.com/Azathothas/Toolpacks/pull/8#issuecomment-1947794734 , please ALWAYS TEST & VERIFY your pulls before submitting:

~$ pushd "$($TMPDIRS)" > /dev/null 2>&1 && git clone --quiet --filter "blob:none" "https://github.com/u-root/gobusybox" && cd "./src/cmd/makebb"
    GOOS="linux" GOARCH="amd64" CGO_ENABLED="0" go build -v -ldflags="-buildid= -s -w -extldflags '-static'"
remote: Enumerating objects: 437, done.
remote: Counting objects: 100% (299/299), done.
remote: Compressing objects: 100% (244/244), done.
remote: Total 437 (delta 174), reused 61 (delta 53), pack-reused 138
Receiving objects: 100% (437/437), 823.44 KiB | 8.15 MiB/s, done.
Resolving deltas: 100% (198/198), done.
-bash: cd: ./src/cmd/makebb: No such file or directory
go: go.mod file not found in current directory or any parent directory; see 'go help modules'

$ git clone --quiet --filter "blob:none" "https://github.com/u-root/u-root" ; cd u-root ; ../makebb ./cmds/*/*
remote: Enumerating objects: 3773, done.
remote: Counting objects: 100% (2269/2269), done.
remote: Compressing objects: 100% (1898/1898), done.
remote: Total 3773 (delta 510), reused 576 (delta 366), pack-reused 1504
Receiving objects: 100% (3773/3773), 51.97 MiB | 49.60 MiB/s, done.
Resolving deltas: 100% (635/635), done.
-bash: ../makebb: No such file or directory

While these are trivial to fix, that's not the point of a pull request.

xplshn commented 7 months ago

Okay, sorry!

Still, in my pull request I deleted u-root.sh because, u-root cannot be used unless you run it inside of its repo, so, its useless like that, what I meant by adding u-root was this, the u-root commands.

Also:

]@ bigdl list | grep -E '^u.*root'
u-root
u-root-busybox
uroot-busybox
]@

Anddd, the makebb command shall be ./cmd/*/* in the "##U-root cmds" section in gobusybox.sh, also, ././ seems like a typo, why get the current dir two times? Anyways, the reason to include not only the core dir into the makebb output is so that it includes all commands from u-root and not only the core ones.

Thanks :)

Also, I wanted to ask this, is there any reason staticx isn't in the repo? pyinstaller is used to bundle python programs into a single file, and staticx is half python. Can't it not make a binary of itself? Also, using pyinstaller to generate a single file pyinstaller and then using staticx to make it fully static? Same for yt-dlp? First you use pyinstaller, then you use staticx to get rid of the ld dependency. I do that with yt-dlp but I am not sure if pyinstaller and staticx can make binaries of themselves.