diff options
author | Daniel Baumann <daniel@debian.org> | 2008-08-14 21:33:56 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:39 +0100 |
commit | 3e3bb4260766082847fb162baf1a99aa4fbf7c49 (patch) | |
tree | 3ca00b38e66da4a2bd0bf83a1503e89a41ca47b6 | |
parent | fe8484f3cd11620e793dba71425abcb3cde9757e (diff) | |
download | live-build-3e3bb4260766082847fb162baf1a99aa4fbf7c49.zip live-build-3e3bb4260766082847fb162baf1a99aa4fbf7c49.tar.gz |
Moving win32-loader inclusion support from external hook into main program (Closes: #476546).
-rw-r--r-- | debian/bug/script | 2 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | examples/hooks/win32-loader.sh | 12 | ||||
-rwxr-xr-x | functions/defaults.sh | 11 | ||||
-rwxr-xr-x | helpers/lh_binary_includes | 15 | ||||
-rwxr-xr-x | helpers/lh_config | 14 |
6 files changed, 40 insertions, 16 deletions
diff --git a/debian/bug/script b/debian/bug/script index fd04f46..54ef8dd 100644 --- a/debian/bug/script +++ b/debian/bug/script @@ -6,7 +6,7 @@ DEFAULT_SETTINGS="/etc/default/live-helper" dpkg -l debootstrap cdebootstrap # Checking suggests -dpkg -l dosfstools genisoimage memtest86+ memtest86 mtools parted squashfs-tools genext2fs mtd-tools sudo fakeroot syslinux grub uuid-runtime +dpkg -l dosfstools genisoimage memtest86+ memtest86 mtools parted squashfs-tools genext2fs mtd-tools sudo fakeroot syslinux grub uuid-runtime win32-loader if [ -e "${DEFAULT_SETTINGS}" ]; then echo "Contents of ${DEFAULT_SETTINGS}:" diff --git a/debian/control b/debian/control index fe59b1b..821ebe5 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ XS-Upstream-Depends: git-core Package: live-helper Architecture: all Depends: debootstrap | cdebootstrap, gettext-base (>= 0.13) -Suggests: dosfstools, genisoimage, memtest86+ | memtest86, mtools, parted, squashfs-tools | genext2fs | mtd-tools, sudo | fakeroot, syslinux | grub, uuid-runtime +Suggests: dosfstools, genisoimage, memtest86+ | memtest86, mtools, parted, squashfs-tools | genext2fs | mtd-tools, sudo | fakeroot, syslinux | grub, uuid-runtime, win32-loader Description: Debian Live build scripts live-helper is a set of scripts to build Debian Live system images. . diff --git a/examples/hooks/win32-loader.sh b/examples/hooks/win32-loader.sh deleted file mode 100755 index ee328c5..0000000 --- a/examples/hooks/win32-loader.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# This is a hook for live-helper(7) to install win32-loader. -# win32-loader was written by Robert Milan <rmh@aybabtu.com>. -# -# To enable it, copy this hook into your config/binary_local-hooks directory. - -cd binary - -wget http://goodbye-microsoft.com/pub/debian.exe - -cd "${OLDPWD}" diff --git a/functions/defaults.sh b/functions/defaults.sh index 477c6b8..969c41f 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -634,6 +634,17 @@ Set_defaults () # Setting memtest option LH_MEMTEST="${LH_MEMTEST:-memtest86+}" + # Setting win32-loader option + case "${LH_ARCHITECTURE}" in + amd64|i386) + LH_WIN32_LOADER="enabled" + ;; + + *) + LH_WIN32_LOADER="disabled" + ;; + esac + # Setting netboot filesystem LH_NET_ROOT_FILESYSTEM="${LH_NET_ROOT_FILESYSTEM:-nfs}" diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes index 6954377..c90e75c 100755 --- a/helpers/lh_binary_includes +++ b/helpers/lh_binary_includes @@ -164,5 +164,20 @@ then sed -i -e "s|DEBIAN_NAME|${DEBIAN_NAME}|g" -e "s|DEBIAN_DATE|${DEBIAN_DATE}|g" -e "s|DEBIAN_TOOLS|${DEBIAN_TOOLS_TXT}|g" binary/README.txt fi +# Copying win32-loader +if [ "${LH_WIN32_LOADER}" = "enabled" ] +then + case "${LH_ARCHITECTURE}" in + amd64|i386) + if Find_files /usr/lib/win32-loader/* + then + cp /usr/lib/win32-loader/* binary + else + Echo_warning "win32-loader inclusion is enabled but not found, ignoring." + fi + ;; + esac +fi + # Creating stage file Create_stagefile .stage/binary_includes diff --git a/helpers/lh_config b/helpers/lh_config index f7f0cbd..f7a46e2 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -114,11 +114,12 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--union-filesystem aufs|unionfs]\n\ \t [--exposed-root enabled|disabled]\n\ \t [--username NAME]\n\ -\t [--verbose]" +\t [--verbose]\n\" +\t [--win32-loader enabled|disabled]" Local_arguments () { - ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,,debian-installer-distribution:,debian-installer-preseedfile:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,ignore-system-defaults,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")" + ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,,debian-installer-distribution:,debian-installer-preseedfile:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username,:win32-loader:,source:,source-images:,breakpoints,conffile:,debug,force,help,ignore-system-defaults,quiet,usage,verbose,version--name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")" if [ "${?}" != "0" ] then @@ -589,6 +590,11 @@ Local_arguments () shift 2 ;; + --win32-loader) + LH_WIN32_LOADER="${2}" + shift 2 + ;; + # config/source --source) LH_SOURCE="${2}" @@ -1044,6 +1050,10 @@ LH_JFFS2_ERASEBLOCK="" # (Default: ${LH_MEMTEST}) LH_MEMTEST="${LH_MEMTEST}" +# \$LH_WIN32_LOADER: set win32-loader +# (Default: ${LH_WIN32_LOADER}) +LH_WIN32_LOADER="${LH_WIN32_LOADER}) + # \$LH_NET_ROOT_FILESYSTEM: set netboot filesystem # (Default: ${LH_NET_ROOT_FILESYSTEM}) LH_NET_ROOT_FILESYSTEM="${LH_NET_ROOT_FILESYSTEM}" |