From: Otavio Salvador <[EMAIL PROTECTED]>

To allow LiveCD building for Debian derivatives, cdebootstrap needs to
be called using '--suite-config' option to choose which backend
cdebootstrap will use while building the chroot. This option was add
only in cdebootstrap 0.3.15 so we change debian/control to reflect it.
---

 debian/control             |    2 +-
 src/config                 |    3 +++
 src/main.sh                |    6 +++++-
 src/scripts/11bootstrap.sh |    6 +++++-
 4 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 3d4691d..7beaed0 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.7.2
 
 Package: live-package
 Architecture: all
-Depends: cdebootstrap (>= 0.3.10), genext2fs, mkisofs, squashfs-tools
+Depends: cdebootstrap (>= 0.3.15), genext2fs, mkisofs, squashfs-tools
 Provides: make-live
 Description: utility to build Debian Live systems
  make-live is a utility to build Debian Live systems. It takes a Debian mirror
diff --git a/src/config b/src/config
index 3cabd6f..0913312 100644
--- a/src/config
+++ b/src/config
@@ -30,6 +30,9 @@ #LIVE_FILESYSTEM="squashfs"
 # Bootstrap flavour            (Default: standard)
 #LIVE_FLAVOUR="standard"
 
+# Bootstrap config      (Default: empty)
+#LIVE_BOOTSTRAP_CONFIG=""
+
 # User command                 (Default: empty)
 #LIVE_HOOK=""
 
diff --git a/src/main.sh b/src/main.sh
index aa6d50f..229a241 100755
--- a/src/main.sh
+++ b/src/main.sh
@@ -71,6 +71,7 @@ Help ()
        echo "  -d, --distribution: specifies the debian distribution."
        echo "  --filesystem: specifies the chroot filesystem."
        echo "  -f, --flavour: specifies the bootstrap flavour."
+       echo "  --bootstrap-config: specifies the suite configuration to be 
used for bootstraping."
        echo "  --hook: specifies extra command(s)."
        echo "  --include-chroot: specifies file or directory for chroot 
inclusion."
        echo "  --include-image: specifies file or directory for image 
inclusion."
@@ -161,7 +162,7 @@ Configuration ()
 
 Main ()
 {
-       ARGUMENTS="`getopt --longoptions 
root:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-source,without-source,help,usage,version
 --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "[EMAIL 
PROTECTED]"`"
+       ARGUMENTS="`getopt --longoptions 
root:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-source,without-source,help,usage,version
 --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "[EMAIL 
PROTECTED]"`"
 
        if [ "${?}" != "0" ]
        then
@@ -213,6 +214,9 @@ Main ()
                        -f|--flavour)
                                LIVE_FLAVOUR="${2}"; shift 2
                                ;;
+                       --bootstrap-config)
+                               LIVE_BOOTSTRAP_CONFIG="${2}"; shift 2
+                               ;;
                        --hook)
                                LIVE_HOOK="${2}"; shift 2
                                ;;
diff --git a/src/scripts/11bootstrap.sh b/src/scripts/11bootstrap.sh
index 4b3a7fd..9aee5ec 100644
--- a/src/scripts/11bootstrap.sh
+++ b/src/scripts/11bootstrap.sh
@@ -19,8 +19,12 @@ Bootstrap ()
                        mkdir -p "${LIVE_CHROOT}"
                fi
 
+               if [ -n "${LIVE_BOOTSTRAP_CONFIG}" ]; then
+                       SUITE_CONFIG="--suite-config ${LIVE_BOOTSTRAP_CONFIG}"
+               fi 
+
                # Bootstrap system
-               cdebootstrap --arch="${LIVE_ARCHITECTURE}" 
--flavour="${LIVE_FLAVOUR}" "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" 
"${LIVE_MIRROR}"
+               cdebootstrap --arch="${LIVE_ARCHITECTURE}" 
--flavour="${LIVE_FLAVOUR}" ${SUITE_CONFIG} "${LIVE_DISTRIBUTION}" 
"${LIVE_CHROOT}" "${LIVE_MIRROR}"
 
                # Remove unused packages
                Chroot_exec "apt-get remove --purge --yes 
cdebootstrap-helper-diverts"

_______________________________________________
Debian-live-devel mailing list
Debian-live-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to