Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ISO extras #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cmds/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ deploy_iso_legacy() {
local iso_name="openxt-installer.iso"
local iso_path="${DEPLOY_DIR}/${iso_name}"

local STAGING_EXTRA=""
if [ -e "$CONF_DIR/extra-manifest" ] ; then
STAGING_EXTRA="${STAGING_DIR}/extra"
fi

if ! genisoimage -o "${iso_path}" \
-b "isolinux/isolinux.bin" -c "isolinux/boot.cat" \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-r -J -l -V "OpenXT ${OPENXT_RELEASE} installer." \
"${STAGING_DIR}/iso" \
$STAGING_EXTRA \
"${STAGING_DIR}/repository"
then
echo "genisoimage failed."
Expand All @@ -33,6 +39,11 @@ deploy_iso() {
local iso_name="openxt-installer.iso"
local iso_path="${DEPLOY_DIR}/${iso_name}"

local STAGING_EXTRA=""
if [ -e "$CONF_DIR/extra-manifest" ] ; then
STAGING_EXTRA="${STAGING_DIR}/extra"
fi

if ! command_sane "xorriso" "libisoburn"; then
return 1
fi
Expand All @@ -56,6 +67,7 @@ deploy_iso() {
-f \
-quiet \
"${STAGING_DIR}/iso" \
$STAGING_EXTRA \
"${STAGING_DIR}/repository"

echo "ISO created: $iso_path"
Expand Down
26 changes: 26 additions & 0 deletions cmds/stage
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,32 @@ stage_iso() {
if [ -e "${IMAGES_DIR}/${isohdp_src}" ]; then
stage_build_output "${isohdp_src}" "${isohdp_dst}"
fi

stage_extra_iso
}

stage_extra_iso() {
local src
local dst
local dest_dir="$STAGING_DIR/extra/extra"

# Need a placeholder, even if empty, so xorriso doesn't error out.
mkdir -p $STAGING_DIR/extra/

if [ ! -r "$CONF_DIR/extra-manifest" ] ; then
return
fi

while read src dst ; do
if [ -z "${src%%#*}" ]; then
continue
fi

src="$IMAGES_DIR/$src"
dst="$dest_dir/$dst"
mkdir -p "$(dirname "$dst")"
cp -rv -L -T "$src" "$dst"
done < "$CONF_DIR/extra-manifest"
}

# Usage: stage_pxe
Expand Down
Loading