Bug#627887: add support for jasper initramfs system

2011-06-08 Thread Daniel Baumann
tag 627887 pending
thanks

On 06/07/2011 03:39 PM, Colin Watson wrote:
 This should make '--initramfs none' generally
 work more consistently, mostly by filling in a few entries in case
 statements.

applied, thanks.

for the case of jasper, does it require any special treatment, or is all
that lb is doing with '--initramfs none' already enough?

-- 
Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:  daniel.baum...@progress-technologies.net
Internet:   http://people.progress-technologies.net/~daniel.baumann/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#627887: add support for jasper initramfs system

2011-06-08 Thread Colin Watson
On Wed, Jun 08, 2011 at 10:10:18AM +0200, Daniel Baumann wrote:
 On 06/07/2011 03:39 PM, Colin Watson wrote:
  This should make '--initramfs none' generally
  work more consistently, mostly by filling in a few entries in case
  statements.
 
 applied, thanks.
 
 for the case of jasper, does it require any special treatment, or is all
 that lb is doing with '--initramfs none' already enough?

I'm still verifying (and probably won't be *entirely* certain until we
make the switch in production ...), but at this point I think that
'--initramfs none --packages jasper' is enough to make it work.  Thanks.

-- 
Colin Watson   [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#627887: add support for jasper initramfs system

2011-06-07 Thread Colin Watson
On Wed, May 25, 2011 at 11:32:12AM +0100, Colin Watson wrote:
 Oliver suggested that it would be better to use '--initramfs none
 --packages jasper', or similar.  This still needs parts of this patch,
 though, as there are too many places that only ever expect LB_INITRAMFS
 to be casper or live-boot, e.g. the output directory calculation in
 lb_binary_rootfs.
 
 Let me know how you'd prefer to proceed here, and I can send an updated
 patch.

How about this patch?  This should make '--initramfs none' generally
work more consistently, mostly by filling in a few entries in case
statements.

Thanks,

-- 
Colin Watson   [cjwat...@ubuntu.com]
From 448eddbbc3eef31b8b368ec04e100ae1b42f7769 Mon Sep 17 00:00:00 2001
From: Colin Watson cjwat...@canonical.com
Date: Mon, 6 Jun 2011 13:58:44 +0100
Subject: [PATCH] Make --initramfs none work more consistently.

---
 scripts/build/lb_binary_grub |   10 +-
 scripts/build/lb_binary_grub2|   10 +-
 scripts/build/lb_binary_manifest |5 +
 scripts/build/lb_binary_memtest  |4 
 scripts/build/lb_binary_net  |4 
 scripts/build/lb_binary_rootfs   |4 
 scripts/build/lb_binary_silo |7 ++-
 scripts/build/lb_binary_yaboot   |   10 +-
 scripts/build/lb_chroot_hacks|6 +-
 9 files changed, 55 insertions(+), 5 deletions(-)

diff --git a/scripts/build/lb_binary_grub b/scripts/build/lb_binary_grub
index ee14bd9..39aca30 100755
--- a/scripts/build/lb_binary_grub
+++ b/scripts/build/lb_binary_grub
@@ -68,7 +68,7 @@ Grub_live_entry ()
 	APPEND=${4}
 
 	LINUX_LIVE=${LINUX_LIVE}\ntitle\t\tDebian GNU/Linux - ${LABEL}
-	LINUX_LIVE=${LINUX_LIVE}\nkernel\t\t/${KERNEL} boot=${INITFS} config LB_BOOTAPPEND_LIVE ${APPEND}
+	LINUX_LIVE=${LINUX_LIVE}\nkernel\t\t/${KERNEL} ${INITFS:+boot=${INITFS} }config LB_BOOTAPPEND_LIVE ${APPEND}
 	LINUX_LIVE=${LINUX_LIVE}\ninitrd\t\t/${INITRD}
 }
 
@@ -125,6 +125,10 @@ case ${LB_INITRAMFS} in
 	live-boot)
 		INITFS=live
 		;;
+
+	*)
+		INITFS=
+		;;
 esac
 
 # Setting destination directory
@@ -138,6 +142,10 @@ case ${LB_BINARY_IMAGES} in
 			live-boot)
 DESTDIR_LIVE=binary/live
 ;;
+
+			*)
+DESTDIR_LIVE=binary/boot
+;;
 		esac
 
 		DESTDIR_INSTALL=binary/install
diff --git a/scripts/build/lb_binary_grub2 b/scripts/build/lb_binary_grub2
index 8f076b2..b029891 100755
--- a/scripts/build/lb_binary_grub2
+++ b/scripts/build/lb_binary_grub2
@@ -68,7 +68,7 @@ Grub_live_entry ()
 	APPEND=${4}
 
 	LINUX_LIVE=${LINUX_LIVE}\nmenuentry \Debian GNU/Linux - ${LABEL}\ {
-	LINUX_LIVE=${LINUX_LIVE}\nlinux\t\t/${KERNEL} boot=${INITFS} config LB_BOOTAPPEND_LIVE ${APPEND}
+	LINUX_LIVE=${LINUX_LIVE}\nlinux\t\t/${KERNEL} ${INITFS:+boot=${INITFS} }config LB_BOOTAPPEND_LIVE ${APPEND}
 	LINUX_LIVE=${LINUX_LIVE}\ninitrd\t\t/${INITRD}
 	LINUX_LIVE=${LINUX_LIVE}\n}
 }
@@ -99,6 +99,10 @@ case ${LB_INITRAMFS} in
 	live-boot)
 		INITFS=live
 		;;
+
+	*)
+		INITFS=
+		;;
 esac
 
 # Setting destination directory
@@ -112,6 +116,10 @@ case ${LB_BINARY_IMAGES} in
 			live-boot)
 DESTDIR_LIVE=binary/live
 ;;
+
+			*)
+DESTDIR_LIVE=binary/live
+;;
 		esac
 
 		DESTDIR_INSTALL=binary/install
diff --git a/scripts/build/lb_binary_manifest b/scripts/build/lb_binary_manifest
index 4b49133..0ae9051 100755
--- a/scripts/build/lb_binary_manifest
+++ b/scripts/build/lb_binary_manifest
@@ -53,6 +53,11 @@ case ${LB_INITRAMFS} in
 		INITFS=live
 		SUFFIX=packages
 		;;
+
+	*)
+		INITFS=boot
+		SUFFIX=packages
+		;;
 esac
 
 # Add filesystem.packages
diff --git a/scripts/build/lb_binary_memtest b/scripts/build/lb_binary_memtest
index a539ee6..8155b14 100755
--- a/scripts/build/lb_binary_memtest
+++ b/scripts/build/lb_binary_memtest
@@ -87,6 +87,10 @@ case ${LB_INITRAMFS} in
 	live-boot)
 		DESTDIR=binary/live
 		;;
+
+	*)
+		DESTDIR=binary/boot
+		;;
 esac
 
 Check_multiarchitectures
diff --git a/scripts/build/lb_binary_net b/scripts/build/lb_binary_net
index 9cac050..133a203 100755
--- a/scripts/build/lb_binary_net
+++ b/scripts/build/lb_binary_net
@@ -69,6 +69,10 @@ then
 		live-boot)
 			ORIGDIR=binary/live
 			;;
+
+		*)
+			ORIGDIR=binary/boot
+			;;
 	esac
 
 	# Find defaults
diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs
index 85785fc..417c381 100755
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -56,6 +56,10 @@ case ${LB_INITRAMFS} in
 	live-boot)
 		INITFS=live
 		;;
+
+	*)
+		INITFS=boot
+		;;
 esac
 
 # Creating directory
diff --git a/scripts/build/lb_binary_silo b/scripts/build/lb_binary_silo
index ac2e2d0..5834a0b 100755
--- a/scripts/build/lb_binary_silo
+++ b/scripts/build/lb_binary_silo
@@ -82,7 +82,7 @@ Silo_live_entry ()
 	LINUX_LIVE=${LINUX_LIVE}\nimage=${DIRECTORY}/${KERNEL}\n
 	LINUX_LIVE=${LINUX_LIVE}\t  label=${LABEL}\n
 	LINUX_LIVE=${LINUX_LIVE}\t  initrd=${DIRECTORY}/${INITRD}\n
-	LINUX_LIVE=${LINUX_LIVE}\t  append=\boot=${INITFS} config LB_BOOTAPPEND_LIVE ${APPEND}\\n
+	

Bug#627887: add support for jasper initramfs system

2011-05-25 Thread Colin Watson
Package: live-build
Version: 3.0~a17-1
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

The Ubuntu ARM team wrote a system called jasper whose job is to help
with booting preinstalled ext2/ext3 ARM images:

Description: Configure a preinstalled ext2/3 system image
 Jasper is a tool to configure preinstalled ext2/3 images that were
 created using the ubuntu infrastructure from the initramfs.
 Such as armel omap3/4 images in Ubuntu 10.10 and beyond.
 .
 It grows the system partition of a preinstalled ext2/3 image to the
 full size of the SD card, configures fstab, loopback networking, adds
 the UUID to the kernel cmdline and properly sets up flash-kernel for
 the kernel package post installation scripts.

It's supported by livecd-rootfs, so I needed to add support for it to
live-build as well.  From live-build's point of view, I think it
basically counts as a new initramfs system, with the wrinkles that there
shouldn't be a boot=jasper parameter (it extends the default boot=local
instead) and I don't think it needs to do the user creation bits.

Patch attached.  What do you think?

Thanks,

-- 
Colin Watson   [cjwat...@ubuntu.com]
From 7ed79bd4b34c58919c22e3fc502022a12b1a0b63 Mon Sep 17 00:00:00 2001
From: Colin Watson cjwat...@canonical.com
Date: Wed, 25 May 2011 09:55:29 +0100
Subject: [PATCH] Add support for jasper initramfs system.

---
 manpages/en/lb_config.1 |4 ++--
 scripts/build/lb_binary_grub|   10 +-
 scripts/build/lb_binary_grub2   |   10 +-
 scripts/build/lb_binary_linux-image |4 
 scripts/build/lb_binary_manifest|5 +
 scripts/build/lb_binary_memtest |4 
 scripts/build/lb_binary_net |4 
 scripts/build/lb_binary_rootfs  |4 
 scripts/build/lb_binary_silo|7 ++-
 scripts/build/lb_binary_yaboot  |   10 +-
 scripts/build/lb_chroot_hacks   |6 +-
 scripts/build/lb_config |2 +-
 12 files changed, 62 insertions(+), 8 deletions(-)

diff --git a/manpages/en/lb_config.1 b/manpages/en/lb_config.1
index a8a9c6f..a579ff6 100644
--- a/manpages/en/lb_config.1
+++ b/manpages/en/lb_config.1
@@ -109,7 +109,7 @@
 .br
 	[\fB\-\-includes\fR \fIPATH\fR]
 .br
-	[\fB\-\-initramfs\fR auto|none|live\-boot|casper]
+	[\fB\-\-initramfs\fR auto|none|live\-boot|casper|jasper]
 .br
 	[\fB\-\-initramfs\-compression\fR bzip2|gzip|lzma]
 .br
@@ -361,7 +361,7 @@ sets the hostname of the live system.
 \fBlb config\fR by default reads system defaults from /etc/live/build.conf and /etc/live/build.d when generating a new live system config directory. This is useful if you want to set global settings, such as mirror locations, and don't want to specify them all of the time.
 .IP \fB\-\-includes\fR \fIPATH|none\fR 4
 sets the path to the includes that live\-build is going to use, e.g. additional minimal documentation that you want to have on all live systems. By default, this is set to /usr/share/live/build/includes/. Choose none to disable inclusion of documentation.
-.IP \fB\-\-initramfs\fR auto|none|live\-boot|casper 4
+.IP \fB\-\-initramfs\fR auto|none|live\-boot|casper|jasper 4
 sets the name of package that contains the live system specific initramfs modification. By default, auto is used, which means that at build time of the image rather than on configuration time, the value will be expanded to casper when building ubuntu systems, to live\-boot for all other systems. Using 'none' is useful if the resulting system image should not be a live image (experimental).
 .IP \fB\-\-initramfs\-compression\fR bzip2|gzip|lzma]
 defines the compression program to be used to compress the initramfs. Defaults to gzip.
diff --git a/scripts/build/lb_binary_grub b/scripts/build/lb_binary_grub
index d796750..7f70090 100755
--- a/scripts/build/lb_binary_grub
+++ b/scripts/build/lb_binary_grub
@@ -68,7 +68,7 @@ Grub_live_entry ()
 	APPEND=${4}
 
 	LINUX_LIVE=${LINUX_LIVE}\ntitle\t\tDebian GNU/Linux - ${LABEL}
-	LINUX_LIVE=${LINUX_LIVE}\nkernel\t\t/${KERNEL} boot=${INITFS} config LB_BOOTAPPEND_LIVE ${APPEND}
+	LINUX_LIVE=${LINUX_LIVE}\nkernel\t\t/${KERNEL} ${INITFS:+boot=${INITFS} }config LB_BOOTAPPEND_LIVE ${APPEND}
 	LINUX_LIVE=${LINUX_LIVE}\ninitrd\t\t/${INITRD}
 }
 
@@ -125,6 +125,10 @@ case ${LB_INITRAMFS} in
 	live-boot)
 		INITFS=live
 		;;
+
+	*)
+		INITFS=
+		;;
 esac
 
 # Setting destination directory
@@ -135,6 +139,10 @@ case ${LB_BINARY_IMAGES} in
 DESTDIR_LIVE=binary/casper
 ;;
 
+			jasper)
+DESTDIR_LIVE=binary/jasper
+;;
+
 			live-boot)
 DESTDIR_LIVE=binary/live
 ;;
diff --git a/scripts/build/lb_binary_grub2 b/scripts/build/lb_binary_grub2
index 8f076b2..4cb344b 100755
--- a/scripts/build/lb_binary_grub2
+++ b/scripts/build/lb_binary_grub2
@@ -68,7 +68,7 @@ Grub_live_entry ()
 	APPEND=${4}
 
 	LINUX_LIVE=${LINUX_LIVE}\nmenuentry \Debian GNU/Linux - ${LABEL}\ 

Bug#627887: add support for jasper initramfs system

2011-05-25 Thread Colin Watson
On Wed, May 25, 2011 at 10:01:10AM +0100, Colin Watson wrote:
 The Ubuntu ARM team wrote a system called jasper whose job is to help
 with booting preinstalled ext2/ext3 ARM images:
 
 Description: Configure a preinstalled ext2/3 system image
  Jasper is a tool to configure preinstalled ext2/3 images that were
  created using the ubuntu infrastructure from the initramfs.
  Such as armel omap3/4 images in Ubuntu 10.10 and beyond.
  .
  It grows the system partition of a preinstalled ext2/3 image to the
  full size of the SD card, configures fstab, loopback networking, adds
  the UUID to the kernel cmdline and properly sets up flash-kernel for
  the kernel package post installation scripts.
 
 It's supported by livecd-rootfs, so I needed to add support for it to
 live-build as well.  From live-build's point of view, I think it
 basically counts as a new initramfs system, with the wrinkles that there
 shouldn't be a boot=jasper parameter (it extends the default boot=local
 instead) and I don't think it needs to do the user creation bits.
 
 Patch attached.  What do you think?

Oliver suggested that it would be better to use '--initramfs none
--packages jasper', or similar.  This still needs parts of this patch,
though, as there are too many places that only ever expect LB_INITRAMFS
to be casper or live-boot, e.g. the output directory calculation in
lb_binary_rootfs.

Let me know how you'd prefer to proceed here, and I can send an updated
patch.

-- 
Colin Watson   [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org