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

Bug#571056: [PATCH 1/3] Appease lintian (typos and roff syntax errors).



From: Trent W. Buck <twb@cybersource.com.au>

---
 manpages/lh_config.en.1 |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/manpages/lh_config.en.1 b/manpages/lh_config.en.1
index 3a3e4cf..8a12232 100644
--- a/manpages/lh_config.en.1
+++ b/manpages/lh_config.en.1
@@ -241,7 +241,7 @@ defines which bootloader is beeing used in the generated image. This has only an
 .IP "\fB\-\-bootstrap\fR cdebootstrap|cdebootstrap-static|debootstrap|copy" 4
 defines which program is used to bootstrap the debian chroot, default is debootstrap. Note that if you set the bootstrap program to copy, then your host system is copied. This can be useful if you want to convert/clone your existing host system into a live system, however, make sure you do have enough free space as this can, depending on your host system, get quite big.
 .IP "\fB\-\-bootstrap\-config\fR \fIFILE\fR" 4
-sets a custom configuration file for the boostrap programm of choice and is empty by default. Refere to the documentation of debootstrap or cdebootstrap for more information about that. When the bootstrap program is set to copy, this has no effect.
+sets a custom configuration file for the boostrap program of choice and is empty by default. Refere to the documentation of debootstrap or cdebootstrap for more information about that. When the bootstrap program is set to copy, this has no effect.
 .IP "\-f|\fB\-\-bootstrap\-flavour\fR minimal|standard" 4
 defines if the bootstrap program should bootstrap the standard system (all packages of priority required and important, which is the default) or a minimal system (only packages of priority required, plus apt).
 .IP "\fB\-\-bootstrap\-keyring\fR \fIPACKAGE\fR" 4
@@ -257,9 +257,9 @@ sets which stages should be cached. By default set to bootstrap. As an exception
 .IP "\fB\-\-checksums\fR true|false" 4
 defines if the binary image should contain a file called md5sums.txt that lists all files on the image together with their md5 checksums. This in turn can be used by live-initramfs' built-in integrity-check to verify the medium if specified at boot prompt. In general, this should not be false and is an important feature of live system released to the public. However, during development of very big images it can save some time by not calculating the checksums.
 .IP "\fB\-\-chroot\-build\fR true|false" 4
-defines whetever live-helper should use the tools from within the chroot to build the binary image or not by using and including the host systems tools. This is a very dangerous option, using the tools of the host system can lead to tainted and even non-bootable images if the host systems version of the required tools (mainly these are the bootloaders such as syslinux, grub and yaboot, and the auxilliary tools such as dosfstools, genisoimage, squashfs-tools and others) do not \fBexactely\fR match what is present at build-time in the target distribution. Never do disable this option unless you are \fBexactely\fR sure what you are doing and have \fBcompletely\fI understood its consequences.
+defines whetever live-helper should use the tools from within the chroot to build the binary image or not by using and including the host systems tools. This is a very dangerous option, using the tools of the host system can lead to tainted and even non-bootable images if the host systems version of the required tools (mainly these are the bootloaders such as syslinux, grub and yaboot, and the auxiliary tools such as dosfstools, genisoimage, squashfs-tools and others) do not \fBexactely\fR match what is present at build-time in the target distribution. Never do disable this option unless you are \fBexactely\fR sure what you are doing and have \fBcompletely\fI understood its consequences.
 .IP "\fB\-\-chroot\-filesystem\fR ext2|ext3|squashfs|plain|jffs2" 4
-defines which filesystem type should be used for the root filesystem image. If you use plain, then no filesystem image is created and the root filesystem content is copied on the binary image filesystem as flat files. Depending on what binary filesystem you have choosen, it may not be possible to build with a plain root filesystem, e.g. fat16/fat32 and plain don't work as linux does not support to run on them.
+defines which filesystem type should be used for the root filesystem image. If you use plain, then no filesystem image is created and the root filesystem content is copied on the binary image filesystem as flat files. Depending on what binary filesystem you have chosen, it may not be possible to build with a plain root filesystem, e.g. fat16/fat32 and plain don't work as linux does not support to run on them.
 .IP "\fB\-\-clean\fR" 4
 minimizes config directory by automatically removing unused and thus empty subdirectories.
 .IP "\-c|\fB\-\-conffile\fR \fIFILE\fR" 4
@@ -271,7 +271,7 @@ defines if warnings of debconf should be displayed or not. Warnings from debconf
 .IP "\fB\-\-debconf\-priority\fR low|medium|high|critical" 4
 defines what value the debconf priority shoul dbe set to inside the chroot. By default, it is set to critical, which means that almost no questions are displayed. Note that this only has an effect if you use any debconf frontend different from noninteractive.
 .IP "\fB\-\-debian\-installer\fR true|cdrom|netinst|netboot|businesscard|live|false" 4
-defines which type, if any, of the debian\-installer should be included in the resulting binary image. By default, no installer is included. All available flavours except live are the identical configurations used on the installer media produced by regular debian\-cd. When live is choosen, the live\-installer udeb is included so that debian\-installer will behave different than usual - instead of installing the debian system from packages from the medium or the network, it installs the live system to the disk.
+defines which type, if any, of the debian\-installer should be included in the resulting binary image. By default, no installer is included. All available flavours except live are the identical configurations used on the installer media produced by regular debian\-cd. When live is chosen, the live\-installer udeb is included so that debian\-installer will behave different than usual - instead of installing the debian system from packages from the medium or the network, it installs the live system to the disk.
 .IP "\fB\-\-debian\-installer\-distribution\fR daily|\fICODENAME\fR" 4
 defines the distribution where the debian\-installer files should be taken out from. Normally, this should be set to the same distribution as the live system. However, some times, one wants to use a newer or even daily built installer.
 .IP "\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR" 4
@@ -281,7 +281,7 @@ defines if the debian\-installer graphical GTK interface should be true or not.
 .IP "\-d|\fB\-\-distribution\fR \fICODENAME\fR" 4
 defines the distribution of the resulting live system.
 .IP "\-\-\fBdump\fR" 4
-prepares a report of the currently present live system configuration and the version of live\-helper used. This is useful to provide if you submit bug reports, we do get all informations required for us to locate and replicate an error.
+prepares a report of the currently present live system configuration and the version of live\-helper used. This is useful to provide if you submit bug reports, we do get all information required for us to locate and replicate an error.
 .IP "\-e|\fB\-\-encryption\fR false|aes128|aes192|aes256" 4
 defines if the root filesystem should be encrypted or not. By default, this is false.
 .IP "\fB\-\-fdisk\fR fdisk|fdisk.dist" 4
@@ -312,13 +312,13 @@ sets the PUBLISHED field in the header of a resulting CD/DVD image. By default,
 sets the VOLUME field in the header of a resulting CD/DVD and defaults to '(\fIMODE\fR) (\fIDISTRIBUTION\fR) (\fIDATE\fR)' whereas MODE is expanded to the name of the mode in use, DISTRIBUTION the distribution name, and DATE with the current date and time of the generation. When running in debian-release mode however, it will instead default to 'Debian (\fIVERSION\fR) (\fIARCHITECTURE\fR) live' where VERSION becomes the numerical version of the release being built and ARCHITECTURE becomes the name of the architecture.
 .IP "\fB\-\-jffs2\-eraseblock\fR \fISIZE\fR" 4
 sets the eraseblock size for a JFFS2 (Second Journalling Flash File System) filesystem. The default is 64 KiB. If you use an erase block size different than the erase block size of the target MTD device, JFFS2 may not perform optimally. If the SIZE specified is below 4096, the units are assumed to be KiB.
-.IP "[\fB\-\-keyring\-packages\fR \fIPACKAGE\fI|\fI"PACKAGES"\fR" 4
+.IP "[\fB\-\-keyring\-packages\fR \fIPACKAGE\fI|\fI\"PACKAGES\"\fR" 4
 sets the keyring package or additional keyring packages. By default this is set to debian-archive-keyring.
 .IP "\-l|\fB\-\-language\fR \fILANGUAGE\fR" 4
 sets the language of a live system by installing l10n related packages and enables generation of the correct locales through automatically setting the right boot parameters.
-.IP "\-k|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|\fI"FLAVOURS"\fR" 4
+.IP "\-k|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|\fI\"FLAVOURS\"\fR" 4
 sets the kernel flavours to be installed. Note that in case you specify more than that the first will be configured the default kernel that gets booted.
-.IP "\fB\-\-linux\-packages\fR \fI"PACKAGES"\fR" 4
+.IP "\fB\-\-linux\-packages\fR \fI\"PACKAGES\"\fR" 4
 sets the internal name of the kernel packages naming scheme. If you use debian kernel packages, you will not have to adjust it. If you decide to use custom kernel packages that do not follow the debian naming scheme, remember to set this option to the stub of the packages only (for debian this is linux-image-2.6), so that \fISTUB\fR-\fIFLAVOUR\fR results in a valid package name (for debian e.g. linux-image-2.6-486). Preferably you use the meta package name, if any, for the stub, so that your configuration is ABI independent. Also don't forget that you have to include stubs of the binary modules packages for unionfs or aufs, and squashfs if you built them out-of-tree.
 .IP "\fB\-\-losetup\fR losetup|losetup.orig" 4
 sets the filename of the losetup binary from the host system that should be used. This is autodetected and does generally not need any customization.
-- 
1.6.6.1


>From 13de7eb34cb70314c702ff30d21dd351a3296fbf Mon Sep 17 00:00:00 2001
From: Trent W. Buck <twb@cybersource.com.au>
Date: Tue, 23 Feb 2010 16:00:00 +1100
Subject: [PATCH 2/3] Prevent postinsts from starting upstart-based daemons in chroot.
 This patch was auto-generated using the following program:
 sed 's/policy-rc.d/initctl/g; s/sysv-rc/upstart/' chroot_sysv-rc >chroot_upstart
 sed -i '/chroot_sysv-rc/ {p; s/sysv-rc/upstart/g }' chroot binary*

---
 helpers/binary         |    2 +
 helpers/binary_rootfs  |    6 +++
 helpers/chroot         |    2 +
 helpers/chroot_upstart |   86 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 96 insertions(+), 0 deletions(-)
 create mode 100644 helpers/chroot_upstart

diff --git a/helpers/binary b/helpers/binary
index 234d898..3dff65a 100755
--- a/helpers/binary
+++ b/helpers/binary
@@ -40,6 +40,7 @@ then
 	lh chroot_resolv install ${*}
 	lh chroot_hostname install ${*}
 	lh chroot_sysv-rc install ${*}
+	lh chroot_upstart install ${*}
 	lh chroot_apt install-binary ${*}
 	lh chroot_sources install ${*}
 fi
@@ -92,6 +93,7 @@ fi
 
 lh chroot_apt remove ${*}
 lh chroot_sysv-rc remove ${*}
+lh chroot_upstart remove ${*}
 lh chroot_sysfs remove ${*}
 lh chroot_selinuxfs remove ${*}
 lh chroot_proc remove ${*}
diff --git a/helpers/binary_rootfs b/helpers/binary_rootfs
index a862895..c33585f 100755
--- a/helpers/binary_rootfs
+++ b/helpers/binary_rootfs
@@ -154,6 +154,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
 					lh chroot_sysv-rc remove ${*}
+					lh chroot_upstart remove ${*}
 					lh chroot_dpkg remove ${*}
 					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
@@ -171,6 +172,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_debianchroot install ${*}
 					lh chroot_dpkg install ${*}
 					lh chroot_sysv-rc install ${*}
+					lh chroot_upstart install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
@@ -236,6 +238,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
 					lh chroot_sysv-rc remove ${*}
+					lh chroot_upstart remove ${*}
 					lh chroot_dpkg remove ${*}
 					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
@@ -253,6 +256,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_debianchroot install ${*}
 					lh chroot_dpkg install ${*}
 					lh chroot_sysv-rc install ${*}
+					lh chroot_upstart install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
@@ -351,6 +355,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
 					lh chroot_sysv-rc remove ${*}
+					lh chroot_upstart remove ${*}
 					lh chroot_dpkg remove ${*}
 					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
@@ -368,6 +373,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_debianchroot install ${*}
 					lh chroot_dpkg install ${*}
 					lh chroot_sysv-rc install ${*}
+					lh chroot_upstart install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
diff --git a/helpers/chroot b/helpers/chroot
index 65c5e65..02a4c04 100755
--- a/helpers/chroot
+++ b/helpers/chroot
@@ -35,6 +35,7 @@ lh chroot_sysfs install ${*}
 lh chroot_debianchroot install ${*}
 lh chroot_dpkg install ${*}
 lh chroot_sysv-rc install ${*}
+lh chroot_upstart install ${*}
 lh chroot_hosts install ${*}
 lh chroot_resolv install ${*}
 lh chroot_hostname install ${*}
@@ -69,6 +70,7 @@ lh chroot_hostname remove ${*}
 lh chroot_resolv remove ${*}
 lh chroot_hosts remove ${*}
 lh chroot_sysv-rc remove ${*}
+lh chroot_upstart remove ${*}
 lh chroot_dpkg remove ${*}
 lh chroot_debianchroot remove ${*}
 lh chroot_sysfs remove ${*}
diff --git a/helpers/chroot_upstart b/helpers/chroot_upstart
new file mode 100644
index 0000000..a963044
--- /dev/null
+++ b/helpers/chroot_upstart
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# lh_chroot_upstart(1) - manage /usr/sbin/initctl
+# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+# Including common functions
+. "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh
+
+# Setting static variables
+DESCRIPTION="$(Echo 'manage /usr/sbin/initctl')"
+HELP=""
+USAGE="${PROGRAM} {install|remove} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
+Set_defaults
+
+# Requiring stage file
+Require_stagefile .stage/config .stage/bootstrap
+
+case "${1}" in
+	install)
+		Echo_message "Configuring file /usr/sbin/initctl"
+
+		# Checking stage file
+		Check_stagefile .stage/chroot_upstart
+
+		# Checking lock file
+		Check_lockfile .lock
+
+		# Creating lock file
+		Create_lockfile .lock
+
+		if [ -f chroot/usr/sbin/initctl ]
+		then
+			# Save initctl file
+			mv chroot/usr/sbin/initctl chroot/usr/sbin/initctl.orig
+		fi
+
+		# Create initctl file
+cat > chroot/usr/sbin/initctl << EOF
+#!/bin/sh
+echo "All runlevel operations denied by policy" >&2
+exit 101
+EOF
+
+		chmod 0755 chroot/usr/sbin/initctl
+
+		# Creating stage file
+		Create_stagefile .stage/chroot_upstart
+		;;
+
+	remove)
+		Echo_message "Deconfiguring file /usr/sbin/initctl"
+
+		# Checking lock file
+		Check_lockfile .lock
+
+		# Creating lock file
+		Create_lockfile .lock
+
+		if [ -f chroot/usr/sbin/initctl.orig ]
+		then
+			# Restore initctl file
+			mv chroot/usr/sbin/initctl.orig chroot/usr/sbin/initctl
+		else
+			# Remove initctl file
+			rm -f chroot/usr/sbin/initctl
+		fi
+
+		# Removing stage file
+		rm -f .stage/chroot_upstart
+		;;
+
+	*)
+		Usage
+		;;
+esac
-- 
1.6.6.1


>From 11f829db37aaf88e77b1ee8c1eed915cf2ec942d Mon Sep 17 00:00:00 2001
From: Trent W. Buck <twb@cybersource.com.au>
Date: Tue, 23 Feb 2010 16:05:04 +1100
Subject: [PATCH 3/3] Oops; git isn't DAC-agnostic.

---
 0 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 helpers/chroot_upstart

diff --git a/helpers/chroot_upstart b/helpers/chroot_upstart
old mode 100644
new mode 100755
-- 
1.6.6.1




Reply to: