From 67aba34ed1c6f85cdd675d45d0b153c780bebd3c Mon Sep 17 00:00:00 2001 From: r00t Date: Sun, 12 Jul 2015 00:46:45 -0400 Subject: [PATCH] adding custom EMBED URI --- TODO | 3 +-- extra/build.conf.sample | 25 ++++++++++++++++--------- lib/11-yo_dj.func.sh | 9 ++++++--- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/TODO b/TODO index f60a364..c25be20 100644 --- a/TODO +++ b/TODO @@ -34,8 +34,7 @@ --http://ipxe.org/crypto --http://ipxe.org/cmd/imgtrust --http://ipxe.org/cmd/imgverify ---https://aur.archlinux.org/packages/ip/ipxe-git/PKGBUILD (NOTE the patches- banner and efi iso specifically) ---add conf option to specify EMBED uri +--enable use of custom CA/self-signed certs for HTTPS etc. -X-platform --what distros are supported? --automatically install what we need for buildtime diff --git a/extra/build.conf.sample b/extra/build.conf.sample index 1c9852a..887bc11 100644 --- a/extra/build.conf.sample +++ b/extra/build.conf.sample @@ -61,7 +61,17 @@ MULTIARCH="yes" # set this to "yes". Otherwise, just build the full ISO. BUILDMINI="no" -# set to "yes" to enable pushing new changes to a git repo/committing to a local repo +# What URI should iPXE's EMBED script use? +# Only used if BUILDMINI is set to yes. +# DO NOT USE A ',' (comma); instead, replace it with: +# %%COMMA%% +# If you require HTTP BASIC Authentication or HTTP Digest Authentication (untested), you can +# format it via the following: +# https://user:password@domain.tld/page.php +# This currently does not work for HTTPS with self-signed certificates. +IPXE_URI="https://bdisk.square-r00t.net" + +# Set to "yes" to enable pushing new changes to a git repo/committing to a local repo GIT="no" # If this is set, use rsync to copy the http and iso files. This is the rsync destination host. @@ -119,17 +129,14 @@ I_AM_A_RACECAR="no" # ________________________________________________________________________________________________ ## RECOMMENDED DEFALTS ## -# The following shoult not be changed unless you are ABSOLUTELY, 100% SURE and COMPLETELY POSITIVE +# The following should not be changed unless you are ABSOLUTELY, 100% SURE and COMPLETELY POSITIVE # about what you are doing!!! -# Legacy support. -BASEDIR="${BASEDIR}" - -# This used to be defined statically (e.g. CHBASEDIR="${BASEDIR}/chroot"), -# but is now dynamically appended. Please don't alter this unless you renamed the chroot directory paths. +# This used to be defined statically, but is now dynamically appended. Please don't alter this +# unless you renamed the chroot directory paths. CHROOTDIR="${BASEDIR}/" -CHROOTDIR32="${CHBASEDIR}root.i686" -CHROOTDIR64="${CHBASEDIR}root.x86_64" +CHROOTDIR32="${CHROOTDIR}root.i686" +CHROOTDIR64="${CHROOTDIR}root.x86_64" # This is a directory we use for staging. It definitely should not be checked into git. # It used to be defined statically (e.g. BUILDDIR="${BASEDIR}/build"), diff --git a/lib/11-yo_dj.func.sh b/lib/11-yo_dj.func.sh index 3716928..c45c272 100644 --- a/lib/11-yo_dj.func.sh +++ b/lib/11-yo_dj.func.sh @@ -293,9 +293,12 @@ EOF do patch -Np2 < ${BASEDIR}/src/ipxe_local/patches/${i} >> "${LOGFILE}.${FUNCNAME}" 2>&1 done - #make everything EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1 - make bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1 - make bin/ipxe.eiso bin/ipxe.usb EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + # Generate the iPXE EMBED script... + sed -re "s,^(chain\ ).*$,\1${IPXE_URI},g" \ + -e 's/%%COMMA%%/,/g' ${BASEDIR}/src/ipxe_local/EMBED > ${SRCDIR}/EMBED + #make everything EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + make bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + make bin/ipxe.eiso bin/ipxe.usb EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1 # Change this to USB-only... #make all EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1 mv -f ${BASEDIR}/src/ipxe/src/bin/ipxe.usb ${ISODIR}/${USBFILENAME}