systemrescue-zfs/patches/archiso-v43-09-pxe_http.patch
Gerd v. Egidy 0f01ff896a allow using https urls in archiso_http_srv by disabling CA checks
archiso_http_srv is used in initramfs and we don't have a database
of trusted CAs there. So ignore all CA checks to allow downloading
from https at all.
2022-09-14 22:33:01 +02:00

37 lines
1.8 KiB
Diff

diff -u -r archiso-43.orig/archiso/initcpio/hooks/archiso_pxe_http archiso-43/archiso/initcpio/hooks/archiso_pxe_http
--- archiso-43.orig/archiso/initcpio/hooks/archiso_pxe_http 2019-10-16 11:10:09.000000000 +0000
+++ archiso-43/archiso/initcpio/hooks/archiso_pxe_http 2022-09-11 13:49:55.913331725 +0000
@@ -23,7 +23,9 @@
local _dst="${2}"
msg ":: Downloading '${_url}'"
- if ! curl -L -f -o "/run/archiso/httpspace/${archisobasedir}${_dst}/${_url##*/}" --create-dirs "${_url}"; then
+
+ # use --insecure to allow downloading from https urls (we don't have a CA trust database in initramfs)
+ if ! curl -L -f --insecure -o "/run/archiso/bootmnt/${archisobasedir}${_dst}/${_url##*/}" --create-dirs "${_url}"; then
echo "ERROR: Downloading '${_url}'"
echo " Falling back to interactive prompt"
echo " You can try to fix the problem manually, log out when you are finished"
@@ -34,9 +36,9 @@
archiso_pxe_http_mount_handler () {
newroot="${1}"
- msg ":: Mounting /run/archiso/httpspace (tmpfs) filesystem, size='${archiso_http_spc}'"
- mkdir -p "/run/archiso/httpspace"
- mount -t tmpfs -o size="${archiso_http_spc}",mode=0755 httpspace "/run/archiso/httpspace"
+ msg ":: Mounting /run/archiso/bootmnt (tmpfs) filesystem, size='${archiso_http_spc}'"
+ mkdir -p "/run/archiso/bootmnt"
+ mount -t tmpfs -o size="${archiso_http_spc}",mode=0755 bootmnt "/run/archiso/bootmnt"
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs" "/${arch}"
@@ -47,8 +49,5 @@
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs.sig" "/${arch}"
fi
- mkdir -p "/run/archiso/bootmnt"
- mount -o bind /run/archiso/httpspace /run/archiso/bootmnt
-
archiso_mount_handler ${newroot}
}