projects
/
grml-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e57a2a
)
Support setting releasename, version number; renamed verbose option from -v to -V
author
Michael Prokop
<devnull@localhost>
Wed, 19 Sep 2007 22:03:55 +0000
(
00:03
+0200)
committer
Michael Prokop
<devnull@localhost>
Wed, 19 Sep 2007 22:03:55 +0000
(
00:03
+0200)
docs/grml-live.txt
patch
|
blob
|
history
etc/grml/grml-live.conf
patch
|
blob
|
history
grml-live
patch
|
blob
|
history
i386_files/boot/isolinux/boot-beep.msg
patch
|
blob
|
history
i386_files/boot/isolinux/boot.msg
patch
|
blob
|
history
diff --git
a/docs/grml-live.txt
b/docs/grml-live.txt
index
0b21b58
..
a25fab4
100644
(file)
--- a/
docs/grml-live.txt
+++ b/
docs/grml-live.txt
@@
-10,7
+10,8
@@
Linux Live system (CD/ISO)
Synopsis
--------
Synopsis
--------
-grml-live [-c <classe[s]>] [-t <target_directory>] [-s <suite>] [-Fvh]
+grml-live [-c <classe[s]>] [-i <iso_name> ] [-r <release_name>]
+[-s <suite>] [-t <target_directory>] [-v <version_number>] [-Fvh]
*******************************************************************************
Important! This document is growing as requested. If you have questions which
*******************************************************************************
Important! This document is growing as requested. If you have questions which
@@
-57,6
+58,24
@@
Specify the CLASSES to be used for building the ISO via FAI. By default only
the classes GRMLBASE and I386 are assumed, resulting in a small base system
(being about ~150MB total ISO size) for x86 (32bit).
the classes GRMLBASE and I386 are assumed, resulting in a small base system
(being about ~150MB total ISO size) for x86 (32bit).
+ -F::
+
+Force execution and do not prompt for acknowledgment of configuration.
+
+ -h::
+
+Display short usage information and exit.
+
+ -i **ISO_NAME**::
+
+Specify name of ISO which will be available inside $TARGET_DIRECTORY/grml_isos
+by default.
+
+ -r **RELEASENAME**::
+
+Specify name of the release. (Notice: the output of the release name is limited
+to 30 characters.)
+
-s **SUITE**::
Specify the Debian suite you want to use for your live-system. Defaults to
-s **SUITE**::
Specify the Debian suite you want to use for your live-system. Defaults to
@@
-70,20
+89,18
@@
inside this target directory, being: grml_cd (where the files for creating the
ISO are located, including the compressed squashfs file), grml_chroot (the
chroot system) and grml_isos (where the resulting ISO is stored).
ISO are located, including the compressed squashfs file), grml_chroot (the
chroot system) and grml_isos (where the resulting ISO is stored).
- -F::
-
-Force execution and do not prompt for acknowledgment of configuration.
-
- -h::
+ -v **VERSION_NUMBER**::
-Display short usage information and exit.
+Specify version number of the release. (Notice: the output of the version number
+is limited to 5 characters. So "1.0-1" is fine, but "1.0.0.1" will be stripped
+to "1.0.0" then.)
- -
v
::
+ -
V
::
Increase verbosity in the build process.
Increase verbosity in the build process.
-How to get your own Live-CD - the easy, fast and simple way
---------------
---------------------------------------------
+Usage examples
+--------------
To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
as build and output directory just run:
To get a small, Debian-stable and grml-based Live-CD using /grml/grml-live
as build and output directory just run:
@@
-95,6
+112,12
@@
To get a small Debian-unstable and grml-small based Live-CD using
# grml-live -c GRMLBASE,GRML_SMALL,I386 -t /home/mika/grml-live
# grml-live -c GRMLBASE,GRML_SMALL,I386 -t /home/mika/grml-live
+To get a smal, Debian-unstable and grml-based Live-CD using /tmp as build and
+output directory and use grml_0.0-3.iso as ISO name (placed inside
+/tmp/grml_isos) just invoke:
+
+ # grml-live -t /tmp -c GRMLBASE,I386 -s sid -v -i grml_0.0-3.iso
+
[NOTE]
If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
[NOTE]
If you have about 700MB of free space inside /dev/shm (being a tmpfs, usually
@@
-397,9
+420,6
@@
grml and grml-small (done), each for x86, amd64 and ppc)
* support signed apt repositories (currently it's deactivated via FAI's
FAI_ALLOW_UNSIGNED=1 for some packages in the toolchain)
* support signed apt repositories (currently it's deactivated via FAI's
FAI_ALLOW_UNSIGNED=1 for some packages in the toolchain)
-* support setting stuff like ISO name, version,... on-the-fly (especially for
-stuff inside boot/isolinux/*)
-
* support "final builds" (including stuff like generating md5sums, gpg,... -
create a grml_release-directory including all the details about the build
process like dpkg selection, logs,...)
* support "final builds" (including stuff like generating md5sums, gpg,... -
create a grml_release-directory including all the details about the build
process like dpkg selection, logs,...)
diff --git
a/etc/grml/grml-live.conf
b/etc/grml/grml-live.conf
index
ef01da4
..
372c56f
100644
(file)
--- a/
etc/grml/grml-live.conf
+++ b/
etc/grml/grml-live.conf
@@
-57,11
+57,11
@@
CLASSES="GRMLBASE,I386"
# ... and the sources.list entry for the directory:
# MIRROR_SOURCES="deb file:///mnt/mirror/debian sid main contrib non-free"
# ... and the sources.list entry for the directory:
# MIRROR_SOURCES="deb file:///mnt/mirror/debian sid main contrib non-free"
-# Version number of ISO (limited to 5 chars):
+# Version number of ISO (limited to 5 chars
!
):
VERSION="0.0-1"
VERSION="0.0-1"
-#
Codename of the release (limited to 30 chars
):
-
COD
ENAME="grml-live just rocks!"
+#
Name of the release (limited to 30 chars!
):
+
RELEAS
ENAME="grml-live just rocks!"
# Specify hostname of the live-system:
HOSTNAME=grml
# Specify hostname of the live-system:
HOSTNAME=grml
diff --git
a/grml-live
b/grml-live
index
f476726
..
ae0e99e
100755
(executable)
--- a/
grml-live
+++ b/
grml-live
@@
-4,7
+4,7
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2 or any later version.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2 or any later version.
-# Latest change: Wed Sep 19 23:
41:52
CEST 2007 [mika]
+# Latest change: Wed Sep 19 23:
59:48
CEST 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
################################################################################
# read configuration files, set some misc variables {{{
@@
-28,10
+28,10
@@
FORCE=''
if [ -r /etc/grml/lsb-functions ] ; then
. /etc/grml/lsb-functions
else
if [ -r /etc/grml/lsb-functions ] ; then
. /etc/grml/lsb-functions
else
- einfo() { echo " [*] $*" ;}
+ einfo()
{ echo " [*] $*" ;}
eerror() { echo " [!] $*">&2 ;}
eerror() { echo " [!] $*">&2 ;}
- ewarn() { echo " [x] $*" ;}
- eend()
{ return 0 ;
}
+ ewarn()
{ echo " [x] $*" ;}
+ eend()
{ return 0 ;
}
fi
# source main configuration file:
fi
# source main configuration file:
@@
-39,12
+39,10
@@
LIVE_CONF=/etc/grml/grml-live.conf
. $LIVE_CONF
PN=$(basename $0)
. $LIVE_CONF
PN=$(basename $0)
-# TMPFILE=$(mktemp)
# }}}
# clean exit {{{
bailout() {
# }}}
# clean exit {{{
bailout() {
- # rm -f "$TMPFILE"
[ -n "$MIRROR_DIRECTORY" ] && umount "${CHROOT_TARGET}/${MIRROR_DIRECTORY}"
[ -n "$1" ] && EXIT="$1" || EXIT="1"
[ -n "$2" ] && eerror "$2">&2
[ -n "$MIRROR_DIRECTORY" ] && umount "${CHROOT_TARGET}/${MIRROR_DIRECTORY}"
[ -n "$1" ] && EXIT="$1" || EXIT="1"
[ -n "$2" ] && eerror "$2">&2
@@
-60,8
+58,8
@@
trap bailout 1 2 3 15
[ -n "$CLASSES" ] || CLASSES="GRML,I386"
[ -n "$TARGET" ] || bailout 1 "${PN}: \$TARGET not specified. Please adjust $LIVE_CONF. Exiting."
[ -n "$CLASSES" ] || CLASSES="GRML,I386"
[ -n "$TARGET" ] || bailout 1 "${PN}: \$TARGET not specified. Please adjust $LIVE_CONF. Exiting."
-[ -n "$VERSION" ] || VERSION="0.1"
-[ -n "$
CODENAME" ] || COD
ENAME="grml-live rocks"
+[ -n "$VERSION" ] || VERSION="0.
0.
1"
+[ -n "$
RELEASENAME" ] || RELEAS
ENAME="grml-live rocks"
[ -n "$LOGDIR" ] || LOGDIR="/var/log/fai/dirinstall/$HOSTNAME"
[ -d "$LOGDIR" ] || mkdir $LOGDIR
[ -n "$LOGDIR" ] || LOGDIR="/var/log/fai/dirinstall/$HOSTNAME"
[ -d "$LOGDIR" ] || mkdir $LOGDIR
@@
-123,7
+121,8
@@
usage()
echo "
$PN - build process script for generating a (grml based) Linux Live-ISO
echo "
$PN - build process script for generating a (grml based) Linux Live-ISO
-Usage: $PN [-c <classe[s]>] [-t <target_directory>] [-s <suite> [-Fvh]
+Usage: $PN [-c <classe[s]>] [-i <iso_name> ] [-r <release_name>] \\
+ [-s <suite>] [-t <target_directory>] [-v <version_number>] [-Fvh]
Usage examples:
Usage examples:
@@
-131,7
+130,8
@@
Usage examples:
$PN -c GRMLBASE,GRML_X,I386 -t /grml/
$PN -c GRMLBASE,I386 -t /dev/shm/grml
$PN -c GRMLBASE,GRML_SMALL,I386
$PN -c GRMLBASE,GRML_X,I386 -t /grml/
$PN -c GRMLBASE,I386 -t /dev/shm/grml
$PN -c GRMLBASE,GRML_SMALL,I386
- $PN -s sid -c GRMLBASE,I386
+ $PN -c GRMLBASE,I386 -v -i grml_0.0-1.iso
+ $PN -c GRMLBASE,I386 -s sid
More details: man grml-live
/usr/share/doc/grml-live/grml-live.html
More details: man grml-live
/usr/share/doc/grml-live/grml-live.html
@@
-144,19
+144,21
@@
http://grml.org/bugs/
# command line parsing {{{
# command line parsing {{{
-while getopts "c:i:
s:t:Fhv
" opt; do
+while getopts "c:i:
r:s:t:v:FhV
" opt; do
case "$opt" in
c) CLASSES="$OPTARG" ;;
case "$opt" in
c) CLASSES="$OPTARG" ;;
- F) FORCE=1 ;;
- h) usage ; bailout 0 ;;
i) ISO_NAME="$OPTARG" ;;
i) ISO_NAME="$OPTARG" ;;
+ r) RELEASENAME="$OPTARG" ;;
s) SUITE="$OPTARG" ;;
t) TARGET="$OPTARG"
CHROOT_TARGET="$TARGET/grml_chroot"
BUILD_TARGET="$TARGET/grml_cd"
ISO_TARGET="$TARGET/grml_isos"
;;
s) SUITE="$OPTARG" ;;
t) TARGET="$OPTARG"
CHROOT_TARGET="$TARGET/grml_chroot"
BUILD_TARGET="$TARGET/grml_cd"
ISO_TARGET="$TARGET/grml_isos"
;;
- v) VERBOSE="-v" ;;
+ v) VERSION="$OPTARG" ;;
+ F) FORCE=1 ;;
+ h) usage ; bailout 0 ;;
+ V) VERBOSE="-v" ;;
?) echo "invalid option -$OPTARG" >&2; bailout 1 ;;
esac
done
?) echo "invalid option -$OPTARG" >&2; bailout 1 ;;
esac
done
@@
-303,14
+305,14
@@
if [ "$ARCH" = i386 ] ; then
# adjust boot splash information:
ISO_DATE="$(date +%Y-%m-%d)"
VERSION="$(cut_string 5 "$VERSION")" ; VERSION="$(extend_string_end 5 "$VERSION")"
# adjust boot splash information:
ISO_DATE="$(date +%Y-%m-%d)"
VERSION="$(cut_string 5 "$VERSION")" ; VERSION="$(extend_string_end 5 "$VERSION")"
-
CODENAME="$(cut_string 30 "$CODENAME")" ; CODENAME="$(extend_string_end 30 "$COD
ENAME")"
+
RELEASENAME="$(cut_string 30 "$RELEASENAME")" ; RELEASENAME="$(extend_string_end 30 "$RELEAS
ENAME")"
sed -i "s/%VERSION%/$VERSION/" "$BUILD_TARGET"/boot/isolinux/boot.msg
sed -i "s/%VERSION%/$VERSION/" "$BUILD_TARGET"/boot/isolinux/boot.msg
- sed -i "s/%
CODENAME%/$COD
ENAME/" "$BUILD_TARGET"/boot/isolinux/boot.msg
+ sed -i "s/%
RELEASENAME%/$RELEAS
ENAME/" "$BUILD_TARGET"/boot/isolinux/boot.msg
sed -i "s/%DATE%/$ISO_DATE/" "$BUILD_TARGET"/boot/isolinux/boot.msg
sed -i "s/%VERSION%/$VERSION/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
sed -i "s/%DATE%/$ISO_DATE/" "$BUILD_TARGET"/boot/isolinux/boot.msg
sed -i "s/%VERSION%/$VERSION/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
- sed -i "s/%
CODENAME%/$COD
ENAME/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
+ sed -i "s/%
RELEASENAME%/$RELEAS
ENAME/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
sed -i "s/%DATE%/$ISO_DATE/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
# autostart for Windows:
sed -i "s/%DATE%/$ISO_DATE/" "$BUILD_TARGET"/boot/isolinux/boot-beep.msg
# autostart for Windows:
@@
-359,17
+361,18
@@
fi
# ISO_TARGET - mkisofs {{{
[ -n "$ISO_TARGET" ] || ISO_TARGET="$TARGET/grml_isos"
# ISO_TARGET - mkisofs {{{
[ -n "$ISO_TARGET" ] || ISO_TARGET="$TARGET/grml_isos"
-if [ -d "$ISO_TARGET" ] ; then
+[ -n "$ISO_NAME" ] || ISO_NAME="grml_${VERSION}.iso"
+
+if [ -f "${ISO_TARGET}/${ISO_NAME}" ] ; then
ewarn "$ISO_TARGET exists already, skipping stage 'iso build'" ; eend 0
log "$ISO_TARGET exists already, skipping stage 'iso build'"
else
mkdir -p "$ISO_TARGET" || bailout 6 "Problem with creating $ISO_TARGET for stage 'iso build'"
ewarn "$ISO_TARGET exists already, skipping stage 'iso build'" ; eend 0
log "$ISO_TARGET exists already, skipping stage 'iso build'"
else
mkdir -p "$ISO_TARGET" || bailout 6 "Problem with creating $ISO_TARGET for stage 'iso build'"
- [ -n "$ISO_NAME" ] || ISO_NAME="grml_0.0-1.iso"
( cd "$BUILD_TARGET" &&
( cd "$BUILD_TARGET" &&
- mkisofs -V "
Debian/etch grml
" -publisher 'grml-live | grml.org' \
+ mkisofs -V "
grml $VERSION
" -publisher 'grml-live | grml.org' \
-l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table \
-c boot/isolinux/boot.cat -b boot/isolinux/isolinux.bin \
-l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table \
-c boot/isolinux/boot.cat -b boot/isolinux/isolinux.bin \
- -o "${ISO_TARGET}
"/"
${ISO_NAME}" .
+ -o "${ISO_TARGET}
/
${ISO_NAME}" .
)
einfo "Finished execution of stage 'iso build'" ; eend 0
log "Finished execution of stage 'iso build' [$(date)]"
)
einfo "Finished execution of stage 'iso build'" ; eend 0
log "Finished execution of stage 'iso build' [$(date)]"
diff --git
a/i386_files/boot/isolinux/boot-beep.msg
b/i386_files/boot/isolinux/boot-beep.msg
index
7e906b6
..
ae09864
100644
(file)
--- a/
i386_files/boot/isolinux/boot-beep.msg
+++ b/
i386_files/boot/isolinux/boot-beep.msg
@@
-1,5
+1,5
@@
\ f
17
\f
\18
logo.16
Some information and boot options available via keys F2 - F10. http://grml.org/
\ f
17
\f
\18
logo.16
Some information and boot options available via keys F2 - F10. http://grml.org/
-grml %VERSION% - Release Codename %
COD
ENAME% %DATE%
+grml %VERSION% - Release Codename %
RELEAS
ENAME% %DATE%
\a
\a
diff --git
a/i386_files/boot/isolinux/boot.msg
b/i386_files/boot/isolinux/boot.msg
index
efb308e
..
994db1e
100644
(file)
--- a/
i386_files/boot/isolinux/boot.msg
+++ b/
i386_files/boot/isolinux/boot.msg
@@
-1,4
+1,4
@@
\ f
17
\f
\18
logo.16
Some information and boot options available via keys F2 - F10. http://grml.org/
\ f
17
\f
\18
logo.16
Some information and boot options available via keys F2 - F10. http://grml.org/
-grml %VERSION% - Release Codename %
COD
ENAME% %DATE%
+grml %VERSION% - Release Codename %
RELEAS
ENAME% %DATE%