diff options
Diffstat (limited to 'ibps-src')
| -rwxr-xr-x | ibps-src | 84 |
1 files changed, 49 insertions, 35 deletions
@@ -50,10 +50,18 @@ fi function bootstrap-rootfs { pkg "perl" "true" pkg "libxcrypt" "true" - pkg "openssl" "true" + pkg "openssl3" "true" + pkg "python" "true" + pkg "pip" "true" pkg "bison" "true" + pkg "libidn2" "true" pkg "cmake" "true" - pkg "ninja" "true" + pkg "ninja" "true" + pkg "meson" "true" + pkg "gmp" "true" + pkg "mpc" "true" + pkg "mpfr" "true" + pkg "gcc" "true" } function msg_err { @@ -65,42 +73,42 @@ function msg_err { function env_run { command="$1" - sudo mount --bind /dev "${MASTERDIR}/dev" - sudo mount --make-rslave "${MASTERDIR}/dev" - sudo mount --bind /dev/pts "${MASTERDIR}/dev/pts" - sudo mount --bind /proc "${MASTERDIR}/proc" - sudo mount --bind /sys "${MASTERDIR}/sys" - sudo mount --bind /tmp "${MASTERDIR}/tmp" - sudo mount --bind "$(pwd)/compiled" "${MASTERDIR}/compiled" + doas mount --bind /dev "${MASTERDIR}/dev" + doas mount --make-rslave "${MASTERDIR}/dev" + doas mount --bind /dev/pts "${MASTERDIR}/dev/pts" + doas mount --bind /proc "${MASTERDIR}/proc" + doas mount --bind /sys "${MASTERDIR}/sys" + doas mount --bind /tmp "${MASTERDIR}/tmp" + doas mount --bind "$(pwd)/compiled" "${MASTERDIR}/compiled" unshare --pid -r --fork --user --mount chroot ${MASTERDIR} /bin/bash -c "${command}" - sudo umount "${MASTERDIR}/compiled" - sudo umount "${MASTERDIR}/tmp" - sudo umount "${MASTERDIR}/sys" - sudo umount "${MASTERDIR}/proc" - sudo umount "${MASTERDIR}/dev/pts" - sudo umount "${MASTERDIR}/dev" + doas umount "${MASTERDIR}/compiled" + doas umount "${MASTERDIR}/tmp" + doas umount "${MASTERDIR}/sys" + doas umount "${MASTERDIR}/proc" + doas umount "${MASTERDIR}/dev/pts" + doas umount "${MASTERDIR}/dev" } function chroot { - sudo mount --bind /dev "${MASTERDIR}/dev" - sudo mount --make-rslave "${MASTERDIR}/dev" - sudo mount --bind /dev/pts "${MASTERDIR}/dev/pts" - sudo mount --bind /proc "${MASTERDIR}/proc" - sudo mount --bind /sys "${MASTERDIR}/sys" - sudo mount --bind /tmp "${MASTERDIR}/tmp" - sudo mount --bind "$(pwd)/compiled" "${MASTERDIR}/compiled" + doas mount --bind /dev "${MASTERDIR}/dev" + doas mount --make-rslave "${MASTERDIR}/dev" + doas mount --bind /dev/pts "${MASTERDIR}/dev/pts" + doas mount --bind /proc "${MASTERDIR}/proc" + doas mount --bind /sys "${MASTERDIR}/sys" + doas mount --bind /tmp "${MASTERDIR}/tmp" + doas mount --bind "$(pwd)/compiled" "${MASTERDIR}/compiled" unshare --pid -r --fork --user --mount chroot ${MASTERDIR} /bin/bash - sudo umount "${MASTERDIR}/compiled" - sudo umount "${MASTERDIR}/tmp" - sudo umount "${MASTERDIR}/sys" - sudo umount "${MASTERDIR}/proc" - sudo umount "${MASTERDIR}/dev/pts" - sudo umount "${MASTERDIR}/dev" + doas umount "${MASTERDIR}/compiled" + doas umount "${MASTERDIR}/tmp" + doas umount "${MASTERDIR}/sys" + doas umount "${MASTERDIR}/proc" + doas umount "${MASTERDIR}/dev/pts" + doas umount "${MASTERDIR}/dev" } function download_if_uncached { @@ -251,13 +259,19 @@ function pkg { cp "${template_loc}" "${MASTERDIR}/build/template" apply_patches - cp "stubs/configure" "${MASTERDIR}/build/" - env_run "DISTRO_TC=${DISTRO_TC} ./build/configure" - - cp "stubs/build" "${MASTERDIR}/build/buildstub" - env_run "DISTRO_TC=${DISTRO_TC} ./build/buildstub" - - cp "stubs/install" "${MASTERDIR}/build/install" + if [[ "$(type -t 'do_configure')" == "function" ]]; then + cp "stubs/configure" "${MASTERDIR}/build/" + env_run "DISTRO_TC=${DISTRO_TC} ./build/configure" + fi + + if [[ "$(type -t 'do_build')" == "function" ]]; then + cp "stubs/build" "${MASTERDIR}/build/buildstub" + env_run "DISTRO_TC=${DISTRO_TC} ./build/buildstub" + fi + + if [[ "$(type -t 'do_install')" == "function" ]]; then + cp "stubs/install" "${MASTERDIR}/build/install" + fi if [[ "${install_sys}" == "true" ]] then |
