[PATCH 1/4] Remove hardcoded scripts path if not building from pkg.
--- .../files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY | 4 ++++ etc/grml/grml-live.conf | 1 + grml-live | 11 +++++++---- 3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY index 90bbbbf..44fcedc 100644 --- a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY +++ b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY @@ -6,6 +6,10 @@ deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ wheezy/updates main contrib
+# backports: + deb http://http.debian.net/debian wheezy-backports main + deb-src http://http.debian.net/debian wheezy-backports main + # official debian repository: # deb http://ftp.debian.org/debian/ wheezy main contrib non-free # deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free diff --git a/etc/grml/grml-live.conf b/etc/grml/grml-live.conf index 84fe564..62a32dd 100644 --- a/etc/grml/grml-live.conf +++ b/etc/grml/grml-live.conf @@ -132,6 +132,7 @@ # template directory but please make sure it looks # likes the default directory [/usr/share/grml-live/templates] # TEMPLATE_DIRECTORY='/usr/share/grml-live/templates' +# SCRIPTS_DIRECTORY='/usr/share/grml-live/scripts'
# Do you want to use console based isolinux boot splash # instead of the default graphical menu? diff --git a/grml-live b/grml-live index c5c2250..05be0e3 100755 --- a/grml-live +++ b/grml-live @@ -65,6 +65,7 @@ Usage: $PN [options, see as follows] -Q skip netboot package build -r <release_name> release name -s <suite> Debian suite/release, like: stable, testing, unstable + -S <script_directory> place of the scripts -t <template_directory> place of the templates -u update existing chroot instead of rebuilding it from scratch -U <username> arrange output to be owned by specified username @@ -310,7 +311,7 @@ copy_addon_file() { # }}}
# command line parsing {{{ -while getopts "a:C:c:d:D:e:g:i:I:o:r:s:t:U:v:AbBFhnNqQuVz" opt; do +while getopts "a:C:c:d:D:e:g:i:I:o:r:s:S:t:U:v:AbBFhnNqQuVz" opt; do case "$opt" in a) ARCH="$OPTARG" ;; A) CLEAN_ARTIFACTS=1 ;; @@ -332,6 +333,7 @@ while getopts "a:C:c:d:D:e:g:i:I:o:r:s:t:U:v:AbBFhnNqQuVz" opt; do Q) SKIP_NETBOOT=1 ;; r) RELEASENAME="$OPTARG" ;; s) SUITE="$OPTARG" ;; + S) SCRIPTS_DIRECTORY="$OPTARG";; t) TEMPLATE_DIRECTORY="$OPTARG";; v) VERSION="$OPTARG" ;; F) FORCE=1 ;; @@ -392,6 +394,7 @@ fi [ -n "$SQUASHFS_EXCLUDES_FILE" ] || SQUASHFS_EXCLUDES_FILE="${GRML_FAI_CONFIG}/config/grml/squashfs-excludes" [ -n "$SUITE" ] || SUITE='testing' [ -n "$TEMPLATE_DIRECTORY" ] || TEMPLATE_DIRECTORY='/usr/share/grml-live/templates' +[ -n "$SCRIPTS_DIRECTORY" ] || SCRIPTS_DIRECTORY='/usr/share/grml-live/scripts' [ -n "$USERNAME" ] || USERNAME='grml' [ -n "$VERSION" ] || VERSION='0.0.1'
@@ -1329,7 +1332,7 @@ else # make a 2048-byte bootsector for El Torito dd if=/dev/zero of=boot/grub/toriboot.bin bs=512 count=4 2>/dev/null # those are in 2048-byte sectors, so 1 16 matches 4 63 below - echo 1 16 | mksh /usr/share/grml-live/scripts/bootgrub.mksh -B 11 | \ + echo 1 16 | mksh ${SCRIPTS_DIRECTORY}/bootgrub.mksh -B 11 | \ dd of=boot/grub/toriboot.bin conv=notrunc 2>/dev/null fi log "$MKISOFS -V '${GRML_NAME} ${VERSION}' -publisher 'grml-live | grml.org' -l -r -J $BOOT_ARGS -o ${ISO_OUTPUT}/${ISO_NAME} ." @@ -1371,13 +1374,13 @@ else log "Creating hybrid ISO file with manifold/grub2 method" einfo "Creating hybrid ISO file with manifold/grub2 method" # 512 bytes: MBR, partition table, load GRUB 2 - echo 4 63 | mksh /usr/share/grml-live/scripts/bootgrub.mksh -A -M 4:0x96 -g $cyls:16:32 + echo 4 63 | mksh ${SCRIPTS_DIRECTORY}/bootgrub.mksh -A -M 4:0x96 -g $cyls:16:32 else log "Creating hybrid ISO file with manifold method" einfo "Creating hybrid ISO file with manifold method" # read only one but 2048-byte sized (scale: << 2) sector echo $bootoff $bootoff | \ - mksh /usr/share/grml-live/scripts/bootilnx.mksh -A -M 4:0x96 -g $cyls:16:32 -S 2 + mksh ${SCRIPTS_DIRECTORY}/bootilnx.mksh -A -M 4:0x96 -g $cyls:16:32 -S 2 fi | dd of="${ISO_OUTPUT}/${ISO_NAME}" conv=notrunc 2>/dev/null eend $? fi
--- grml-live | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grml-live b/grml-live index 05be0e3..35d7fd2 100755 --- a/grml-live +++ b/grml-live @@ -147,7 +147,7 @@ else fi
# source main configuration file: -LIVE_CONF=/etc/grml/grml-live.conf +[ -z $LIVE_CONF ] && LIVE_CONF=/etc/grml/grml-live.conf if ! [ -r "$LIVE_CONF" ] ; then ewarn "Configuration file $LIVE_CONF can not be read, ignoring" else
--- grml-live | 13 +++++++------ templates/boot/grub/grub.cfg | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/grml-live b/grml-live index 35d7fd2..9f64c4e 100755 --- a/grml-live +++ b/grml-live @@ -913,7 +913,13 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then # get adjusted according to the build. cp ${TEMPLATE_DIRECTORY}/boot/isolinux/* "$BUILD_OUTPUT"/boot/isolinux/
+ if ! [ -d "${BUILD_OUTPUT}/boot/grub" ] ; then + mkdir -p "${BUILD_OUTPUT}/boot/grub" + fi + cp -a ${TEMPLATE_DIRECTORY}/boot/grub/* "$BUILD_OUTPUT"/boot/grub/ + if [ -n "$NO_ADDONS" ] ; then + rm "$BUILD_OUTPUT"/boot/grub/addons.cfg log "Skipping installation of boot addons as requested via $NO_ADDONS." einfo "Skipping installation of boot addons as requested via $NO_ADDONS."; eend 0 else @@ -961,11 +967,6 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then fi # no "$TEMPLATE_DIRECTORY"/boot/addons fi # NO_ADDONS
- if ! [ -d "${BUILD_OUTPUT}/boot/grub" ] ; then - mkdir -p "${BUILD_OUTPUT}/boot/grub" - fi - cp -a ${TEMPLATE_DIRECTORY}/boot/grub/* "$BUILD_OUTPUT"/boot/grub/ - # generate loopback.cfg config file without depending on grub's regexp module # which isn't available in Debian/squeeze echo "## grub2 loopback configuration" > "${BUILD_OUTPUT}"/boot/grub/loopback.cfg @@ -974,7 +975,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then [ -r "$config" ] || continue echo "source ${config##$BUILD_OUTPUT}" >> "${BUILD_OUTPUT}"/boot/grub/loopback.cfg done - echo "source /boot/grub/addons.cfg" >> "${BUILD_OUTPUT}"/boot/grub/loopback.cfg + [ ! -n $NO_ADDONS ] && echo "source /boot/grub/addons.cfg" >> "${BUILD_OUTPUT}"/boot/grub/loopback.cfg echo "source /boot/grub/footer.cfg" >> "${BUILD_OUTPUT}"/boot/grub/loopback.cfg
# copy grub files from target diff --git a/templates/boot/grub/grub.cfg b/templates/boot/grub/grub.cfg index 40faccc..2c28569 100644 --- a/templates/boot/grub/grub.cfg +++ b/templates/boot/grub/grub.cfg @@ -5,7 +5,9 @@ insmod regexp
for config in /boot/grub/*_default.cfg ; do source "$config" ; done for config in /boot/grub/*_options.cfg ; do source "$config" ; done -source /boot/grub/addons.cfg +if [ -f /boot/grub/addons.cfg ] ; then + source "/boot/grub/addons.cfg" +fi
source /boot/grub/footer.cfg # EOF
In Debian Wheezy the initramfs-tools is 0.109, but the grml kernel needs at least 0.110. The backport contains the requested version. --- .../files/etc/apt/preferences.d/wheezy-backports/DEBIAN_WHEEZY | 7 +++++++ etc/grml/fai/config/package_config/DEBIAN_WHEEZY | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 etc/grml/fai/config/files/etc/apt/preferences.d/wheezy-backports/DEBIAN_WHEEZY create mode 100644 etc/grml/fai/config/package_config/DEBIAN_WHEEZY
diff --git a/etc/grml/fai/config/files/etc/apt/preferences.d/wheezy-backports/DEBIAN_WHEEZY b/etc/grml/fai/config/files/etc/apt/preferences.d/wheezy-backports/DEBIAN_WHEEZY new file mode 100644 index 0000000..46ab719 --- /dev/null +++ b/etc/grml/fai/config/files/etc/apt/preferences.d/wheezy-backports/DEBIAN_WHEEZY @@ -0,0 +1,7 @@ +// This file is installed by grml-live. +// +// Allow overriding initramfs-tools from backports +Package: initramfs-tools +Pin: release a=wheezy-backports +Pin-Priority: 997 + diff --git a/etc/grml/fai/config/package_config/DEBIAN_WHEEZY b/etc/grml/fai/config/package_config/DEBIAN_WHEEZY new file mode 100644 index 0000000..7147ba6 --- /dev/null +++ b/etc/grml/fai/config/package_config/DEBIAN_WHEEZY @@ -0,0 +1,5 @@ +PACKAGES aptitude + +zd1211-firmware +ifenslave-2.6 +wipe
Hi,
On Wed, Jun 18, 2014 at 12:20:41PM +0200, Krisztian VASAS wrote:
Subject: [PATCH 1/4] Remove hardcoded scripts path if not building from pkg.
[...]
diff --git a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY index 90bbbbf..44fcedc 100644 --- a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY +++ b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY @@ -6,6 +6,10 @@ deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ wheezy/updates main contrib
+# backports:
- deb http://http.debian.net/debian wheezy-backports main
- deb-src http://http.debian.net/debian wheezy-backports main
# official debian repository: # deb http://ftp.debian.org/debian/ wheezy main contrib non-free # deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free
The commit message does not really suggest why backports should be added in general here.
Doesn't seem to be related to the remainder of the patch either.
Kind regards, Axel
Hi,
added Krisztian to Cc, I guess he isn't subscribed to grml-devel (so he might not have seen Axel's mail)
* Axel Beckert [Wed Jun 18, 2014 at 04:02:24PM +0200]:
On Wed, Jun 18, 2014 at 12:20:41PM +0200, Krisztian VASAS wrote:
Subject: [PATCH 1/4] Remove hardcoded scripts path if not building from pkg.
[...]
diff --git a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY index 90bbbbf..44fcedc 100644 --- a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY +++ b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY @@ -6,6 +6,10 @@ deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ wheezy/updates main contrib
+# backports:
- deb http://http.debian.net/debian wheezy-backports main
- deb-src http://http.debian.net/debian wheezy-backports main
# official debian repository: # deb http://ftp.debian.org/debian/ wheezy main contrib non-free # deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free
The commit message does not really suggest why backports should be added in general here.
Doesn't seem to be related to the remainder of the patch either.
I've taken all patches and slightly reworked them:
http://git.grml.org/?p=grml-live.git;a=commit;h=1290fba0a8e5f9a050e8510010a8... http://git.grml.org/?p=grml-live.git;a=commit;h=1ebce30e7ecfa743317e678898cc... http://git.grml.org/?p=grml-live.git;a=commit;h=df45a261edffbcd85df13dc6a7fa... http://git.grml.org/?p=grml-live.git;a=commit;h=62dae38aa8dc20d1b4c3aca97902...
I hope that's ok for you, Krisztian.
Thanks for your patches, very much appreciated!
regards, -mika-
On 2014-07-03 13:14, Michael Prokop wrote:
Hi,
added Krisztian to Cc, I guess he isn't subscribed to grml-devel (so he might not have seen Axel's mail)
- Axel Beckert [Wed Jun 18, 2014 at 04:02:24PM +0200]:
On Wed, Jun 18, 2014 at 12:20:41PM +0200, Krisztian VASAS wrote:
Subject: [PATCH 1/4] Remove hardcoded scripts path if not building from pkg.
[...]
diff --git a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY index 90bbbbf..44fcedc 100644 --- a/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY +++ b/etc/grml/fai/config/files/etc/apt/sources.list.d/debian.list/DEBIAN_WHEEZY @@ -6,6 +6,10 @@ deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ wheezy/updates main contrib
+# backports:
- deb http://http.debian.net/debian wheezy-backports main
- deb-src http://http.debian.net/debian wheezy-backports main
# official debian repository: # deb http://ftp.debian.org/debian/ wheezy main contrib non-free # deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free
The commit message does not really suggest why backports should be added in general here.
Doesn't seem to be related to the remainder of the patch either.
I've taken all patches and slightly reworked them:
http://git.grml.org/?p=grml-live.git;a=commit;h=1290fba0a8e5f9a050e8510010a8...
http://git.grml.org/?p=grml-live.git;a=commit;h=1ebce30e7ecfa743317e678898cc...
http://git.grml.org/?p=grml-live.git;a=commit;h=df45a261edffbcd85df13dc6a7fa...
http://git.grml.org/?p=grml-live.git;a=commit;h=62dae38aa8dc20d1b4c3aca97902...
I hope that's ok for you, Krisztian.
Thanks for your patches, very much appreciated!
Hi all,
thanks, good to see my work was useful. The wheezy-backports is needed because the grml kernel needs newer initramfs-tools that exists only in wheezy-backports (simple dependency problem).
IroNiQ
Teilnehmer (3)
-
Axel Beckert -
Krisztian VASAS -
Michael Prokop