logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://anongit.hacktivis.me/git/bootstrap-initrd.git/

fetch.sh (3180B)


  1. #!/bin/sh
  2. URLS="
  3. https://hacktivis.me/releases/utils-std/utils-std-0.0.4.tar.gz
  4. https://hacktivis.me/releases/utils-std/utils-std-0.0.4.tar.gz.sign
  5. https://frippery.org/make/pdpmake-2.0.3.tgz
  6. https://gitlab.com/bzip2/bzip2/-/archive/bzip2-1.0.8/bzip2-bzip2-1.0.8.tar.gz
  7. https://zlib.net/zlib-1.3.1.tar.gz
  8. https://www.zlib.net/pigz/pigz-2.8.tar.gz
  9. https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz
  10. https://downloads.sourceforge.net/heirloom/heirloom/070715/heirloom-070715.tar.bz2
  11. https://downloads.sourceforge.net/project/heirloom/heirloom-devtools/070527/heirloom-devtools-070527.tar.bz2
  12. https://www.lua.org/ftp/lua-5.4.6.tar.gz
  13. https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.13.0.tar.gz
  14. https://curl.se/tiny/tiny-curl-8.4.0.tar.gz
  15. https://curl.haxx.se/ca/cacert-2024-11-26.pem
  16. https://git.kernel.org/pub/scm/git/git.git/snapshot/git-2.48.1.tar.gz
  17. https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.47.2/e2fsprogs-1.47.2.tar.gz
  18. https://muon.build/releases/v0.4.0/muon-v0.4.0.tar.gz
  19. https://c9x.me/compile/release/qbe-1.2.tar.xz
  20. "
  21. WORKDIR="$(dirname "$0")"
  22. fetch_forge() {
  23. base=$1
  24. name=$2
  25. ver=$3
  26. test -e "${name}-${ver}.tar.gz" || curl ${CURL_OPTS} -o "${name}-${ver}.tar.gz" "${base}/${ver}.tar.gz"
  27. }
  28. . "${WORKDIR}/common.sh"
  29. set -ex
  30. mkdir -p "${WORKDIR}/distfiles"
  31. cd "${WORKDIR}/distfiles"
  32. CURL_OPTS="-L --fail"
  33. for url in $URLS
  34. do
  35. file="$(basename "$url")"
  36. test -e "$file" || curl ${CURL_OPTS} -o "$file" "$url"
  37. done
  38. for arch in ${ALPINE_ARCHES}
  39. do
  40. for apk in $APKS_main
  41. do
  42. test -e "$apk.$arch" || curl ${CURL_OPTS} -o "$apk.${arch}" "${ALPINE_MIRROR}/${ALPINE_BRANCH}/main/${arch}/${apk}"
  43. done
  44. for apk in $APKS_community
  45. do
  46. test -e "$apk.$arch" || curl ${CURL_OPTS} -o "$apk.${arch}" "${ALPINE_MIRROR}/${ALPINE_BRANCH}/community/${arch}/${apk}"
  47. done
  48. done
  49. test -e lanodan-2025.pub || curl ${CURL_OPTS} -o lanodan-2025.pub https://hacktivis.me/releases/signify/2025.pub
  50. bearssl_commit="3c040368f6791553610e362401db1efff4b4c5b8"
  51. test -e "BearSSL-${bearssl_commit}.tar.gz" || curl ${CURL_OPTS} -o "BearSSL-${bearssl_commit}.tar.gz" "https://bearssl.org/gitweb/?p=BearSSL;a=snapshot;h=${bearssl_commit};sf=tgz"
  52. # Only has ./CVS and .travis-ci.yml removed compared to Github autogenerated tarball
  53. #test -e om4-6.7.tar.gz || curl ${CURL_OPTS} -o om4-6.7.tar.gz https://github.com/ibara/m4/releases/download/om4-6.7/om4-6.7.tar.gz
  54. fetch_forge https://github.com/onetrueawk/awk/archive nawk 20250116
  55. fetch_forge https://github.com/ibara/oksh/archive/refs/tags oksh oksh-7.7
  56. fetch_forge https://github.com/ibara/yacc/archive/refs/tags yacc oyacc-6.6
  57. fetch_forge https://github.com/pkgconf/pkgconf/archive/refs/tags pkgconf pkgconf-2.4.3
  58. fetch_forge https://github.com/pts/muxzcat/archive/refs/tags muxzcat v2b
  59. # suckless.org doesn't provides snapshots of sbase (yet?)
  60. test -e sbase-b30fb568.tar.gz || curl ${CURL_OPTS} -o sbase-b30fb568.tar.gz https://git.sr.ht/~mcf/sbase/archive/b30fb56804bfed69b45ef0e944d2e029e4d26258.tar.gz
  61. if command -v signify >/dev/null; then
  62. signify -V -p lanodan-2025.pub -x utils-std-0.0.4.tar.gz.sign -m utils-std-0.0.4.tar.gz
  63. fi
  64. cd -
  65. sha512sum -c distfiles.SHA512SUM