[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#629637: marked as done (add option to create swap file in image)



Your message dated Mon, 13 Jun 2011 19:02:51 +0000
with message-id <E1QWCPT-0001HB-Kn@franck.debian.org>
and subject line Bug#629637: fixed in live-build 3.0~a21-1
has caused the Debian Bug report #629637,
regarding add option to create swap file in image
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
629637: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629637
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-build
Version: 3.0~a18-1
Severity: wishlist
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

livecd-rootfs has a facility to create an empty swap file on ext2/ext3
images, which Ubuntu's boot scripts then deal with using or deleting as
appropriate at the first boot.  Apparently this cuts three minutes off
the boot time of our preinstalled (jasper-based) images on ARM.

This seems like a sufficiently useful facility (at least relative to
ext2/ext3 images) that it would be nice to have it as options rather
than hooks.  Patch attached.

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]
>From 5ae2040d7c8470d7488993e0069d827e56aa8be5 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@canonical.com>
Date: Wed, 8 Jun 2011 11:30:29 +0100
Subject: [PATCH] Add --swap-file-path and --swap-file-size options.

---
 functions/defaults.sh         |    3 +++
 manpages/en/lb_config.1       |    4 ++++
 scripts/build/lb_chroot_hacks |    5 +++++
 scripts/build/lb_config       |   22 +++++++++++++++++++++-
 4 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/functions/defaults.sh b/functions/defaults.sh
index e26f1ac..7c9d288 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -1102,6 +1102,9 @@ Set_defaults ()
 			;;
 	esac
 
+	# Setting swap file
+	LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE:-512}"
+
 	## config/source
 
 	# Setting source option
diff --git a/manpages/en/lb_config.1 b/manpages/en/lb_config.1
index f1204b0..9e2f858 100644
--- a/manpages/en/lb_config.1
+++ b/manpages/en/lb_config.1
@@ -474,6 +474,10 @@ defines if the security repositories specified in the security mirror options sh
 defines if a corresponding source image to the binary image should be build. By default this is false because most people do not require this and would require to download quite a few source packages. However, once you start distributing your live image, you should make sure you build it with a source image alongside.
 .IP "\-s|\fB\-\-source\-images\fR iso|net|tar|usb\-hdd" 4
 defines the image type for the source image. Default is tar.
+.IP "\fB\-\-swap\-file\-path\fR \fIPATH\fR" 4
+defines the path to a swap file to create in the binary image. Default is not to create a swap file.
+.IP "\fB\-\-swap\-file\-size\fR \fIMB\fR" 4
+defines what size in megabytes the swap file should be, if one is to be created. Default is 512MB.
 .IP "\fB\-\-syslinux\-splash\fR \fIFILE\fR" 4
 defines the file of the syslinux splash graphic that should be used instead of the default one.
 .IP "\fB\-\-syslinux\-timeout\fR \fISECONDS\fR" 4
diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks
index bbb39ce..f9e11dd 100755
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -314,6 +314,11 @@ then
 	ln -s /proc/mounts chroot/etc/mtab
 fi
 
+if [ "${LB_SWAP_FILE_PATH}" ]; then
+	dd if=/dev/zero of="chroot/${LB_SWAP_FILE_PATH}" bs=1024k count="${LB_SWAP_FILE_SIZE}"
+	mkswap "chroot/${LB_SWAP_FILE_PATH}"
+fi
+
 # Show popular warnings
 if [ -e chroot/etc/init.d/resolvconf ]
 then
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index 2f49557..f129255 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -135,6 +135,8 @@ USAGE="${PROGRAM}   [--apt apt|aptitude]\n\
 \t    [--security true|false]\n\
 \t    [--source true|false]\n\
 \t    [-s|--source-images iso|net|tar|usb-hdd]\n\
+\t    [--swap-file-path PATH]\n\
+\t    [--swap-file-size MB]\n\
 \t    [--syslinux-theme THEME_SUFFIX]\n\
 \t    [--tasksel apt|aptitude|tasksel]\n\
 \t    [--tasks TASK|\"TASKS\"]\n\
@@ -166,7 +168,7 @@ Local_arguments ()
 		grub-splash:,hostname:,isohybrid-options:,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-theme:,
+		net-cow-server:,net-tarball:,swap-file-path:,swap-file-size:,syslinux-theme:,
 		username:,win32-loader:,source:,source-images:,breakpoints,conffile:,debug,force,
 		help,ignore-system-defaults,quiet,usage,verbose,version"
 	# Remove spaces added by indentation
@@ -754,6 +756,16 @@ Local_arguments ()
 				shift 2
 				;;
 
+			--swap-file-path)
+				LB_SWAP_FILE_PATH="${2}"
+				shift 2
+				;;
+
+			--swap-file-size)
+				LB_SWAP_FILE_SIZE="${2}"
+				shift 2
+				;;
+
 			--syslinux-theme)
 				LB_SYSLINUX_THEME="${2}"
 				shift 2
@@ -1375,6 +1387,14 @@ LB_NET_COW_SERVER="${LB_NET_COW_SERVER}"
 # (Default: ${LB_NET_TARBALL})
 LB_NET_TARBALL="${LB_NET_TARBALL}"
 
+# \$LB_SWAP_FILE_PATH: set swap file path
+# (Default: ${LB_SWAP_FILE_PATH})
+LB_SWAP_FILE_PATH="${LB_SWAP_FILE_PATH}"
+
+# \$LB_SWAP_FILE_SIZE: set swap file size
+# (Default: ${LB_SWAP_FILE_SIZE})
+LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE}"
+
 # \$LB_SYSLINUX_THEME: set syslinux theme package
 # (Default: ${LB_SYSLINUX_THEME})
 LB_SYSLINUX_THEME="${LB_SYSLINUX_THEME}"
-- 
1.7.5.3


--- End Message ---
--- Begin Message ---
Source: live-build
Source-Version: 3.0~a21-1

We believe that the bug you reported is fixed in the latest version of
live-build, which is due to be installed in the Debian FTP archive:

live-build-cgi_3.0~a21-1_all.deb
  to main/l/live-build/live-build-cgi_3.0~a21-1_all.deb
live-build_3.0~a21-1.debian.tar.gz
  to main/l/live-build/live-build_3.0~a21-1.debian.tar.gz
live-build_3.0~a21-1.dsc
  to main/l/live-build/live-build_3.0~a21-1.dsc
live-build_3.0~a21-1_all.deb
  to main/l/live-build/live-build_3.0~a21-1_all.deb
live-build_3.0~a21.orig.tar.gz
  to main/l/live-build/live-build_3.0~a21.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 629637@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-build package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 13 Jun 2011 20:42:13 +0200
Source: live-build
Binary: live-build live-build-cgi
Architecture: source all
Version: 3.0~a21-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-build - Debian Live - System Build Scripts
 live-build-cgi - Debian Live - System Build Scripts (cgi frontend)
Closes: 627677 629637 630350
Changes: 
 live-build (3.0~a21-1) unstable; urgency=low
 .
   [ Daniel Baumann ]
   * Obtaining the live passes package selection information at the
     latest point to catch all other modifications in the package
     selection.
   * Moving installation of live packages to second pass.
   * Removing now unecessary stagefile check in lb_source.
   * Correct lb cleans source removals.
 .
   [ Colin Watson ]
   * Add --swap-file-path and --swap-file-size options (Closes: #629637).
   * Divert flash-kernel aside while building the chroot (Closes:
     #630350).
   * Add --initramfs-compression option (Closes: #627677).
Checksums-Sha1: 
 0a8aa2989a2bf98500deab3ba0c96626f9357fa7 1282 live-build_3.0~a21-1.dsc
 8ac7c300a633007324ef45fb9ed96c9d593816e9 1886786 live-build_3.0~a21.orig.tar.gz
 ac0892dfc5bcd305538cdcc5b48927302980c6ad 41818 live-build_3.0~a21-1.debian.tar.gz
 e854dd96a4ad3a9cc4344aff8395f883a3cb2e87 1130664 live-build_3.0~a21-1_all.deb
 7838cde2af8c81cdab30f5a23dffd6ba72a3b6e5 58300 live-build-cgi_3.0~a21-1_all.deb
Checksums-Sha256: 
 0c4bb39620b0f44794630c09c64c0ec05f2eb79957bf94948948ad1ffdb3cf02 1282 live-build_3.0~a21-1.dsc
 dee4a7dcd7fe5756e4fecbd7b717c2c4432897d1ce0fc8020667784e3e17f113 1886786 live-build_3.0~a21.orig.tar.gz
 4dd813d7dd1fed0a5bb5be6162b6d2f6b1aa5792f54184b6a2714d029e30107f 41818 live-build_3.0~a21-1.debian.tar.gz
 4037f117ddf6260a746f492c2c030ec8b8476ac48cd0f62c39cb14528a6cf004 1130664 live-build_3.0~a21-1_all.deb
 88fd284707c3f597d0a8ad23a8e9ca9e0796e85974ee55b8948ed8922f34970f 58300 live-build-cgi_3.0~a21-1_all.deb
Files: 
 f6ea9cf3c272a31b24626a195975bd95 1282 misc optional live-build_3.0~a21-1.dsc
 f683ee2e661e2156c30761cd57f6f31f 1886786 misc optional live-build_3.0~a21.orig.tar.gz
 ca6f697fb711deeec129236e3746d11b 41818 misc optional live-build_3.0~a21-1.debian.tar.gz
 6943373d729a47b72268b218fc2a7a13 1130664 misc optional live-build_3.0~a21-1_all.deb
 5cf3d6ab881424a334e9b5722a908575 58300 misc optional live-build-cgi_3.0~a21-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk32W4EACgkQ+C5cwEsrK54NVQCgp0cuhWAkaFXVrtkZZxFxwBY/
xtIAoLugbKZrYHyPzI66y4518odcJ3hG
=ANaa
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: