From 725d1c6ca3fb4779a68a761ad89e93c0895eb2c2 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 16 Jul 2013 16:29:52 +0100 Subject: [PATCH 01/30] On armhf+omap4, stop using the ubuntu-desktop task and use the metapackage instead The task pulls in the X stack which the metapackage does not. We can take advantage of this to install the omap-revert X stack that's needed for these images. --- live-build/auto/config | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index d7c6bbab..6b10a792 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -172,7 +172,28 @@ esac case $PROJECT in ubuntu|ubuntu-dvd) - add_task install minimal standard ubuntu-desktop + add_task install minimal standard + case $ARCH in + armhf) + case $SUBARCH in + omap4) + # Don't use the task as this drags in the regular X + # stack (the metapackage doesn't). We want the + # "reverted" one. + add_package install ubuntu-desktop \ + xserver-xorg-core-omap-revert \ + xserver-xorg-video-omap-revert \ + xserver-xorg-input-evdev-omap-revert + ;; + *) + add_task ubuntu-desktop + ;; + esac + ;; + *) + add_task ubuntu-desktop + ;; + esac LIVE_TASK='ubuntu-live' ;; @@ -316,7 +337,7 @@ case $ARCH in add_package install u-boot-linaro-omap4-panda u-boot-tools ;; *) - add_package install u-boot-linaro-omap4-panda u-boot-tools pvr-omap4 xserver-xorg-video-omap-revert xserver-xorg-input-evdev-omap-revert + add_package install u-boot-linaro-omap4-panda u-boot-tools pvr-omap4 ;; esac BINARY_REMOVE_LINUX=false From bfde7e4938d77393ffea880e6acee3499039bfc9 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 16 Jul 2013 16:35:54 +0100 Subject: [PATCH 02/30] Missing 'install' --- live-build/auto/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 6b10a792..50467e3a 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -186,12 +186,12 @@ case $PROJECT in xserver-xorg-input-evdev-omap-revert ;; *) - add_task ubuntu-desktop + add_task install ubuntu-desktop ;; esac ;; *) - add_task ubuntu-desktop + add_task install ubuntu-desktop ;; esac LIVE_TASK='ubuntu-live' From e0fda22c0131f6215497ff35920182786e301402 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 16 Jul 2013 17:08:59 +0100 Subject: [PATCH 03/30] Collapse case statement into one for $ARCH+$SUBARCH since it only checks for armhf+omap4 --- live-build/auto/config | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 50467e3a..d01123e5 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -173,22 +173,15 @@ esac case $PROJECT in ubuntu|ubuntu-dvd) add_task install minimal standard - case $ARCH in - armhf) - case $SUBARCH in - omap4) - # Don't use the task as this drags in the regular X - # stack (the metapackage doesn't). We want the - # "reverted" one. - add_package install ubuntu-desktop \ - xserver-xorg-core-omap-revert \ - xserver-xorg-video-omap-revert \ - xserver-xorg-input-evdev-omap-revert - ;; - *) - add_task install ubuntu-desktop - ;; - esac + case "$ARCH+$SUBARCH" in + armhf+omap4) + # Don't use the task as this drags in the regular X + # stack (the metapackage doesn't). We want the + # "reverted" one. + add_package install ubuntu-desktop \ + xserver-xorg-core-omap-revert \ + xserver-xorg-video-omap-revert \ + xserver-xorg-input-evdev-omap-revert ;; *) add_task install ubuntu-desktop From 445c528af5f81c3d01c78f292bbfeb5cecdaba70 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 16 Jul 2013 17:19:12 +0100 Subject: [PATCH 04/30] Changelog --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index d21627e4..30445286 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +livecd-rootfs (2.158) UNRELEASED; urgency=low + + * Under armhf+omap4, don't use the ubuntu-desktop Task, but use the + metapackage instead. The metapackage doesn't pull in the X stack which + allows us to additionally install the special "revert" X stack that we + require here. + + -- Iain Lane Tue, 16 Jul 2013 17:17:09 +0100 + livecd-rootfs (2.157) saucy; urgency=low * add xserver-xorg-input-evdev-omap-revert and From b04cbfd953b819cf46e7b0d09546f513e375b415 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 16 Jul 2013 17:19:27 +0100 Subject: [PATCH 05/30] releasing version 2.158 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 30445286..48fa4a9d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -livecd-rootfs (2.158) UNRELEASED; urgency=low +livecd-rootfs (2.158) saucy; urgency=low * Under armhf+omap4, don't use the ubuntu-desktop Task, but use the metapackage instead. The metapackage doesn't pull in the X stack which allows us to additionally install the special "revert" X stack that we require here. - -- Iain Lane Tue, 16 Jul 2013 17:17:09 +0100 + -- Iain Lane Tue, 16 Jul 2013 17:19:22 +0100 livecd-rootfs (2.157) saucy; urgency=low From 7193655900b64ddb330e2ded90dbb284e3fc54b4 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Tue, 16 Jul 2013 20:14:28 +0200 Subject: [PATCH 06/30] source dbus-session from a different place in touch images --- debian/changelog | 7 +++++++ live-build/ubuntu-touch/hooks/48-setup-env.chroot | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 48fa4a9d..7ef979c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.159) UNRELEASED; urgency=low + + * make touch images source the dbus session address from + ~/.cache/upstart/dbus-session instead of ~/.dbus-session + + -- Oliver Grawert Tue, 16 Jul 2013 20:12:31 +0200 + livecd-rootfs (2.158) saucy; urgency=low * Under armhf+omap4, don't use the ubuntu-desktop Task, but use the diff --git a/live-build/ubuntu-touch/hooks/48-setup-env.chroot b/live-build/ubuntu-touch/hooks/48-setup-env.chroot index 5a007031..0e3b72f3 100755 --- a/live-build/ubuntu-touch/hooks/48-setup-env.chroot +++ b/live-build/ubuntu-touch/hooks/48-setup-env.chroot @@ -28,5 +28,5 @@ HUD_NO_STORE_USAGE_DATA=1 INDICATOR_ALLOW_NO_WATCHERS=1" > /etc/environment echo -e "\n# export the phablet shell dbus session on normal login shells -source /home/phablet/.dbus-session +source /home/phablet/.cache/upstart/dbus-session export DBUS_SESSION_BUS_ADDRESS" >> /home/phablet/.bashrc From 703051b93f46d85e5d109943ef3f5c490503b513 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Tue, 16 Jul 2013 20:15:01 +0200 Subject: [PATCH 07/30] releasing version 2.159 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7ef979c0..9559aa4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.159) UNRELEASED; urgency=low +livecd-rootfs (2.159) saucy; urgency=low * make touch images source the dbus session address from ~/.cache/upstart/dbus-session instead of ~/.dbus-session From 5c03a4f1d04cbe9ca7148ff2ac3257ee283b820d Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 00:06:43 -0300 Subject: [PATCH 08/30] Ubuntu Touch click package install hook. --- debian/changelog | 6 +++++ .../hooks/60-install-click.chroot | 22 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 live-build/ubuntu-touch/hooks/60-install-click.chroot diff --git a/debian/changelog b/debian/changelog index 9559aa4e..a1630516 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.160) UNRELEASED; urgency=low + + * Ubuntu Touch click package install hook. + + -- Sergio Schvezov Wed, 17 Jul 2013 00:05:49 -0300 + livecd-rootfs (2.159) saucy; urgency=low * make touch images source the dbus session address from diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot new file mode 100755 index 00000000..684b709b --- /dev/null +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -0,0 +1,22 @@ +#!/bin/sh -e + +echo "Setting up click packages" +echo "Installing curl to download click" + +apt-get install -y -qq curl + +click_uri=http://people.canonical.com/~sergiusens/click_packages +click_list=$click_uri/click_list +tmp_dir=$(mktemp -d) + +/bin/chmod 755 $tmp_dir +cd $tmp_dir +for package in $(curl $click_list) +do + echo "Setting up $package" + curl --silent --show-error --output $package $click_uri/$package + click install --force-missing-framework $package + rm $package +done + +rmdir $tmp_dir From a80bcd80d6c4bc7033baf8c276f6942885b9f49d Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Wed, 17 Jul 2013 10:15:03 +0100 Subject: [PATCH 09/30] Do the same trick as in 2.158 for kubuntu armhf+omap4 too. --- debian/changelog | 6 ++++++ live-build/auto/config | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9559aa4e..6f9c5fc6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.160) UNRELEASED; urgency=low + + * Do the same trick as in 2.158 for kubuntu armhf+omap4 too. + + -- Iain Lane Wed, 17 Jul 2013 10:13:06 +0100 + livecd-rootfs (2.159) saucy; urgency=low * make touch images source the dbus session address from diff --git a/live-build/auto/config b/live-build/auto/config index d01123e5..6fa27e8f 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -191,7 +191,21 @@ case $PROJECT in ;; kubuntu|kubuntu-dvd) - add_task install minimal standard kubuntu-desktop + add_task install minimal standard + case "$ARCH+$SUBARCH" in + armhf+omap4) + # Don't use the task as this drags in the regular X + # stack (the metapackage doesn't). We want the + # "reverted" one. + add_package install kubuntu-desktop \ + xserver-xorg-core-omap-revert \ + xserver-xorg-video-omap-revert \ + xserver-xorg-input-evdev-omap-revert + ;; + *) + add_task install kubuntu-desktop + ;; + esac LIVE_TASK='kubuntu-live' COMPONENTS='main restricted universe' add_chroot_hook remove-gnome-icon-cache From 3b8a12dbe63e7848e9b6e1232fb8c14211e4055f Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Wed, 17 Jul 2013 11:52:25 +0100 Subject: [PATCH 10/30] releasing version 2.160 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6f9c5fc6..9ffb5f11 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -livecd-rootfs (2.160) UNRELEASED; urgency=low +livecd-rootfs (2.160) saucy; urgency=low * Do the same trick as in 2.158 for kubuntu armhf+omap4 too. - -- Iain Lane Wed, 17 Jul 2013 10:13:06 +0100 + -- Iain Lane Wed, 17 Jul 2013 11:52:23 +0100 livecd-rootfs (2.159) saucy; urgency=low From e899fa2c5a54dc955587c83cc9dcb755b02f9c02 Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 11:07:08 -0300 Subject: [PATCH 11/30] Set -e independently. --- live-build/ubuntu-touch/hooks/60-install-click.chroot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index 684b709b..a683606c 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/sh + +set -e echo "Setting up click packages" echo "Installing curl to download click" From 25df11b2a2906b07eb88dc19800838fb9363bd4f Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 11:08:25 -0300 Subject: [PATCH 12/30] remove usage of tmpdir --- live-build/ubuntu-touch/hooks/60-install-click.chroot | 5 ----- 1 file changed, 5 deletions(-) diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index a683606c..0b8b2d97 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -9,10 +9,7 @@ apt-get install -y -qq curl click_uri=http://people.canonical.com/~sergiusens/click_packages click_list=$click_uri/click_list -tmp_dir=$(mktemp -d) -/bin/chmod 755 $tmp_dir -cd $tmp_dir for package in $(curl $click_list) do echo "Setting up $package" @@ -20,5 +17,3 @@ do click install --force-missing-framework $package rm $package done - -rmdir $tmp_dir From 26cee7d1a5e2ade933d2822e14ed3c27a0fa5cf3 Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 11:11:58 -0300 Subject: [PATCH 13/30] quoting vars --- live-build/ubuntu-touch/hooks/60-install-click.chroot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index 0b8b2d97..6a0eefd5 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -10,10 +10,10 @@ apt-get install -y -qq curl click_uri=http://people.canonical.com/~sergiusens/click_packages click_list=$click_uri/click_list -for package in $(curl $click_list) +for package in $(curl "$click_list") do echo "Setting up $package" - curl --silent --show-error --output $package $click_uri/$package - click install --force-missing-framework $package - rm $package + curl --silent --show-error --output "$package" "$click_uri"/"$package" + click install --force-missing-framework "$package" + rm "$package" done From 6b17e866e4141a685bf30d8404c0125e5fc60edf Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 11:21:56 -0300 Subject: [PATCH 14/30] Switching to wget and depending on it being installed by the seed --- live-build/ubuntu-touch/hooks/60-install-click.chroot | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index 6a0eefd5..cc1adfc0 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -3,17 +3,14 @@ set -e echo "Setting up click packages" -echo "Installing curl to download click" - -apt-get install -y -qq curl click_uri=http://people.canonical.com/~sergiusens/click_packages click_list=$click_uri/click_list -for package in $(curl "$click_list") +for package in $(wget -qO- "$click_list") do echo "Setting up $package" - curl --silent --show-error --output "$package" "$click_uri"/"$package" + wget --no-verbose -O "$package" "$click_uri"/"$package" click install --force-missing-framework "$package" rm "$package" done From 46f91565eafcd4275edf204d84d2ce4cf3bf42d1 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Wed, 17 Jul 2013 16:31:13 +0200 Subject: [PATCH 15/30] drop bashrc mangling from ubuntu-touch builds --- debian/changelog | 6 ++++++ live-build/ubuntu-touch/hooks/48-setup-env.chroot | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9ffb5f11..03ec80dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.161) UNRELEASED; urgency=low + + * drop bashrc mangling from ubuntu-touch builds \o/ + + -- Oliver Grawert Wed, 17 Jul 2013 16:30:12 +0200 + livecd-rootfs (2.160) saucy; urgency=low * Do the same trick as in 2.158 for kubuntu armhf+omap4 too. diff --git a/live-build/ubuntu-touch/hooks/48-setup-env.chroot b/live-build/ubuntu-touch/hooks/48-setup-env.chroot index 0e3b72f3..0ab0c9fe 100755 --- a/live-build/ubuntu-touch/hooks/48-setup-env.chroot +++ b/live-build/ubuntu-touch/hooks/48-setup-env.chroot @@ -26,7 +26,3 @@ LANGUAGE=en_US:en QT_IM_MODULE=maliitphablet HUD_NO_STORE_USAGE_DATA=1 INDICATOR_ALLOW_NO_WATCHERS=1" > /etc/environment - -echo -e "\n# export the phablet shell dbus session on normal login shells -source /home/phablet/.cache/upstart/dbus-session -export DBUS_SESSION_BUS_ADDRESS" >> /home/phablet/.bashrc From a066692076169e3afb7f523423908c1368875cc1 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Wed, 17 Jul 2013 16:31:52 +0200 Subject: [PATCH 16/30] releasing version 2.161 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 03ec80dd..b8a84c1e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.161) UNRELEASED; urgency=low +livecd-rootfs (2.161) saucy; urgency=low * drop bashrc mangling from ubuntu-touch builds \o/ From bccea77b73210c25410743d80c49ef3197ba58e6 Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 11:37:37 -0300 Subject: [PATCH 17/30] Register phablet user for click installs --- live-build/ubuntu-touch/hooks/60-install-click.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index cc1adfc0..e20e79c9 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -11,6 +11,6 @@ for package in $(wget -qO- "$click_list") do echo "Setting up $package" wget --no-verbose -O "$package" "$click_uri"/"$package" - click install --force-missing-framework "$package" + click install --user=phablet --force-missing-framework "$package" rm "$package" done From 4359db1db534c4f0ed1eb7961bf62632033aee22 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Wed, 17 Jul 2013 22:33:06 +0200 Subject: [PATCH 18/30] releasing version 2.162 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a86d76cb..c1f1a278 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.162) UNRELEASED; urgency=low +livecd-rootfs (2.162) saucy; urgency=low * Ubuntu Touch click package install hook. From 4b814f4e7b2a9846cfdff8e265b452161587f869 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Thu, 18 Jul 2013 16:32:51 +0200 Subject: [PATCH 19/30] point click package install to http://archive-team.internal/click_packages --- debian/changelog | 6 ++++++ live-build/ubuntu-touch/hooks/60-install-click.chroot | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c1f1a278..b7c01235 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.163) UNRELEASED; urgency=low + + * point click package install to http://archive-team.internal/click_packages + + -- Oliver Grawert Thu, 18 Jul 2013 16:31:54 +0200 + livecd-rootfs (2.162) saucy; urgency=low * Ubuntu Touch click package install hook. diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index e20e79c9..7c6f7cb5 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -4,7 +4,7 @@ set -e echo "Setting up click packages" -click_uri=http://people.canonical.com/~sergiusens/click_packages +click_uri=http://archive-team.internal/click_packages click_list=$click_uri/click_list for package in $(wget -qO- "$click_list") From aaac594d72bac9fcdfb4ca25350656f0b30c868f Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Thu, 18 Jul 2013 16:33:19 +0200 Subject: [PATCH 20/30] releasing version 2.163 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b7c01235..031e2aa3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.163) UNRELEASED; urgency=low +livecd-rootfs (2.163) saucy; urgency=low * point click package install to http://archive-team.internal/click_packages From 70658c34cf90dad9cc28709cb175b9aa78f24e0c Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 22 Jul 2013 11:36:21 +0100 Subject: [PATCH 21/30] Run builds under eatmydata. (This doesn't actually seem to help very much - it shaves a minute off a 48-minute test build on my laptop - but it will stop people being distracted by it.) --- BuildLiveCD | 4 ++-- debian/changelog | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/BuildLiveCD b/BuildLiveCD index 925d8f43..f5b6e15a 100755 --- a/BuildLiveCD +++ b/BuildLiveCD @@ -108,7 +108,7 @@ for STE in $SUITES; do if [ -d ~/build-${STE}-live/chroot-${STE} ]; then sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -qq update || true sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -y dist-upgrade || true - sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -y install livecd-rootfs || true + sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -y install livecd-rootfs eatmydata || true sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -y --install-recommends install ubuntu-defaults-builder || true fi done @@ -149,7 +149,7 @@ for STE in $SUITES; do else COMMAND="/usr/sbin/livecd.sh ${SUBARCHARG} ${APT_SOURCE} ${PROPOSED} -d${STE} ${IMAGEFORMAT:+-f$IMAGEFORMAT} ${ARCHARG} ${IMAGEARG} ${FS}" fi - if $LINUX32 sudo chroot ${DIR%/./*} sh -c "cd /${DIR#*/./} && $COMMAND" >> ${LOG} 2>&1; then + if $LINUX32 sudo chroot ${DIR%/./*} sh -c "cd /${DIR#*/./} && eatmydata -- $COMMAND" >> ${LOG} 2>&1; then rm -f ${PUBDIR}current ln -sf ${NOW} ${PUBDIR}current diff --git a/debian/changelog b/debian/changelog index 031e2aa3..94ce9a6a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.164) UNRELEASED; urgency=low + + * Run builds under eatmydata. (This doesn't actually seem to help very + much - it shaves a minute off a 48-minute test build on my laptop - but + it will stop people being distracted by it.) + + -- Colin Watson Mon, 22 Jul 2013 11:35:23 +0100 + livecd-rootfs (2.163) saucy; urgency=low * point click package install to http://archive-team.internal/click_packages From ca529d7223f22bafc0a608feae091a8234bca05d Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 23 Jul 2013 15:43:28 +0100 Subject: [PATCH 22/30] Remove livecd.py, which was never finished. --- debian/changelog | 1 + livecd.py | 24 ------------------------ 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 livecd.py diff --git a/debian/changelog b/debian/changelog index 94ce9a6a..3038237e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ livecd-rootfs (2.164) UNRELEASED; urgency=low * Run builds under eatmydata. (This doesn't actually seem to help very much - it shaves a minute off a 48-minute test build on my laptop - but it will stop people being distracted by it.) + * Remove livecd.py, which was never finished. -- Colin Watson Mon, 22 Jul 2013 11:35:23 +0100 diff --git a/livecd.py b/livecd.py deleted file mode 100644 index ac224897..00000000 --- a/livecd.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/python -import os,sys -import atexit - -class Mount: - def __init__(self): - atexit.register(self.cleanup,self) - self.mounts={} - self.losetupDev=None - - def addMount(self,name): - self.mounts[name]=1 - - def losetup(self,name): - if self.losetupDev==None: - self.losetupDev=os.popen("losetup -f").read().strip() - os.system("losetup %s %s" % (self.losetupDev,name) - - def unLosetup(self): - os.system("losetup -d %s"%self.losetupDev) - - def cleanup(self): - # XXX - need to unmount stuff - pass From aded5ce10ada11b1c7e4b3cd5e0598659b7db983 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 23 Jul 2013 15:45:15 +0100 Subject: [PATCH 23/30] Remove all vestiges of livecd.sh and ubuntu-touch-android.sh. Requiescant in pace. --- BuildLiveCD | 15 +- debian/changelog | 2 + debian/copyright | 2 +- debian/install | 2 +- livecd.sh | 830 ----------------------------------------------- 5 files changed, 7 insertions(+), 844 deletions(-) delete mode 100755 livecd.sh diff --git a/BuildLiveCD b/BuildLiveCD index f5b6e15a..4938d7e0 100755 --- a/BuildLiveCD +++ b/BuildLiveCD @@ -27,7 +27,6 @@ if [ -n "$SSH_ORIGINAL_COMMAND" ]; then fi ARCH=$(dpkg --print-architecture) SUBARCH="" -SUBARCHARG="" NEWSUITE="precise" SUITES="" PROPOSED="" @@ -35,24 +34,19 @@ IMAGEFORMAT="" LIVE_BUILD=false UBUNTU_DEFAULTS_LOCALE="" -while getopts :A:s:r:d:f:pa:lu:t: name; do case $name in +while getopts :A:s:r:d:f:plu:t: name; do case $name in A) ARCH="$OPTARG";; s) SUBARCH="$OPTARG";; r) SUBPROJECT="$OPTARG";; d) NEWSUITE="$OPTARG";; f) IMAGEFORMAT="$OPTARG";; p) PROPOSED="-p";; - a) APT_SOURCE="-A $OPTARG";; l) LIVE_BUILD=:;; u) UBUNTU_DEFAULTS_LOCALE="$OPTARG";; t) UBUNTU_TOUCH_ANDROID="$OPTARG";; esac; done; shift $((OPTIND-1)) -if [ -n "$SUBARCH" ]; then - SUBARCHARG="-s$SUBARCH" -fi - for s in $NEWSUITE; do if [ -d build-${s}-live/chroot-${s} ]; then SUITES="$SUITES $s"; fi done @@ -62,11 +56,9 @@ fi for s in $SUITES; do case $s in dapper|edgy|feisty|gutsy|hardy) - ARCHARG="" old_suite="yes" ;; *) - ARCHARG="-a$ARCH" new_suite="yes" ;; esac @@ -144,10 +136,9 @@ for STE in $SUITES; do COMMAND="PROJECT=${FS} SUBPROJECT=${SUBPROJECT} ARCH=${ARCH} SUBARCH=${SUBARCH} lb build" elif [ "$UBUNTU_DEFAULTS_LOCALE" ]; then COMMAND="ubuntu-defaults-image --locale ${UBUNTU_DEFAULTS_LOCALE} --arch ${ARCH} --release ${STE}" - elif [ "$UBUNTU_TOUCH_ANDROID" ]; then - COMMAND="/usr/sbin/ubuntu-touch-android.sh ${SUBARCH}" else - COMMAND="/usr/sbin/livecd.sh ${SUBARCHARG} ${APT_SOURCE} ${PROPOSED} -d${STE} ${IMAGEFORMAT:+-f$IMAGEFORMAT} ${ARCHARG} ${IMAGEARG} ${FS}" + echo "Must pass either -l or -u." + exit 1 fi if $LINUX32 sudo chroot ${DIR%/./*} sh -c "cd /${DIR#*/./} && eatmydata -- $COMMAND" >> ${LOG} 2>&1; then rm -f ${PUBDIR}current diff --git a/debian/changelog b/debian/changelog index 3038237e..b4c6e408 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ livecd-rootfs (2.164) UNRELEASED; urgency=low much - it shaves a minute off a 48-minute test build on my laptop - but it will stop people being distracted by it.) * Remove livecd.py, which was never finished. + * Remove all vestiges of livecd.sh and ubuntu-touch-android.sh. + Requiescant in pace. -- Colin Watson Mon, 22 Jul 2013 11:35:23 +0100 diff --git a/debian/copyright b/debian/copyright index 3dbc6696..b93ef389 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -livecd.sh is copyright (c) 2004-2007 by Canonical Ltd. +live-build/* is copyright (c) 2004-2013 by Canonical Ltd. e2fs-zero.py is copyright (c) 2005 by Paul Sladen These programs are free software; you can redistribute and/or modify diff --git a/debian/install b/debian/install index c12d1e96..e40ebc64 100644 --- a/debian/install +++ b/debian/install @@ -1,2 +1,2 @@ -livecd.sh e2fs-zero.py usr/sbin +e2fs-zero.py usr/sbin live-build usr/share/livecd-rootfs diff --git a/livecd.sh b/livecd.sh deleted file mode 100755 index 2a66b0b8..00000000 --- a/livecd.sh +++ /dev/null @@ -1,830 +0,0 @@ -#!/bin/bash -set -eu - -########################################################################## -#### (c) Copyright 2004-2007 Canonical Ltd. ##### -# # -# This program is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2, or (at your option) # -# any later version. # -# # -# This program is distributed in the hope that it will be useful, but # -# WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License with # -# your Ubuntu system, in /usr/share/common-licenses/GPL, or with the # -# livecd-rootfs source package as the file COPYING. If not, write to # -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # -# Boston, MA 02110-1301 USA. # -########################################################################## - -# Depends: debootstrap, rsync, python-minimal|python, procps, squashfs-tools, ltsp-server [i386], e2fsprogs - -cleanup() { - for mnt in ${ROOT}dev/pts ${ROOT}dev/shm ${ROOT}.dev ${ROOT}dev \ - ${ROOT}proc/sys/fs/binfmt_misc ${ROOT}proc ${ROOT}sys \ - ${ROOT}lib/modules/*/volatile ${ROOT}var/{lock,run}; do - umount $mnt || true - done - - [ -n "$DEV" ] && umount $DEV && losetup -d $DEV || true - grep ${ROOT} /proc/mounts && return 1 || return 0 -} - -kill_users() { - set +e - PIDLIST="$(ls -l /proc/*/root 2>/dev/null | grep -- " -> ${ROOT%/}" | sed -n 's/^.*proc.\([0-9]*\).*$/\1/p')" - while [ -n "${PIDLIST}" ]; do - echo killing $PIDLIST - ps -l $(for p in $PIDLIST; do echo ' '-p $p; done) - kill -9 $PIDLIST - sleep 2 - PIDLIST="$(ls -l /proc/*/root 2>/dev/null | grep -- " -> ${ROOT%/}" | sed -n 's/^.*proc.\([0-9]*\).*$/\1/p')" - done - set -e -} - -without_package() { - echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' ' -} - -subst_package() { - echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' ' -} - - -livefs_squash() -{ - squashsort="http://people.ubuntu.com/~tfheen/livesort/${FSS}.list.${TARGETARCH}" - #if wget -O livecd.${FSS}.sort ${squashsort} > /dev/null 2>&1; then - if false; then - echo "Using the squashfs sort list from ${squashsort}." - else - echo "Unable to fetch squashfs sort list; using a blank list." - : > livecd.${FSS}.sort - fi - - # make sure there is no old squashfs idling around - rm -f livecd.${FSS}.squashfs - - mksquashfs ${ROOT} livecd.${FSS}.squashfs -sort livecd.${FSS}.sort - chmod 644 livecd.${FSS}.squashfs -} - -livefs_ext2() -{ - # Add 1024MiB extra free space for first boot + ext3 journal + swapfile - size=$(($(du -ks ${ROOT} | cut -f1) + (1024000))) - MOUNTPOINT=$(mktemp -d) - DEV=$(losetup -f) - echo "Building ext2 filesystem." - - # remove any stale filesystem images - rm -f livecd.${FSS}.ext? - - # create an empty ext2 image and loop mount it - dd if=/dev/zero of=livecd.${FSS}.ext2 bs=1024 count=0 seek=$size - mke2fs -i 8192 -F livecd.${FSS}.ext2 - mount -o loop=${DEV} livecd.${FSS}.ext2 ${MOUNTPOINT} - - # copy chroot content to image - cp -a ${ROOT}/* ${MOUNTPOINT} - - # Create a swapfile in rootfs we can use or delete later on during first boot. - # doing it *during* first boot adds 3min to the bootprocess so the decision - # was to do it here. Luckily the file will compress to nearly zero so it does - # not add to the image size once we gzipped the image. - dd if=/dev/zero of=${MOUNTPOINT}/SWAP.swap bs=1048576 count=512 - mkswap ${MOUNTPOINT}/SWAP.swap - - # make sure we dont have the buildd name set as hostname (LP: #605972) - echo "localhost" >${MOUNTPOINT}/etc/hostname - - # clean up - umount ${MOUNTPOINT} - rm -rf ${MOUNTPOINT} - losetup -d $DEV || true - chmod 644 livecd.${FSS}.ext2 -} - -checkpoint() -{ - echo "===== $1 =====" - date -} - -if [ $(id -u) != 0 ];then - echo "must be run as root" - exit 2 -fi - -checkpoint "Starting build" - -umask 022 -export TTY=unknown -export TERM=vt100 -export DEBIAN_FRONTEND=noninteractive -export LANG=C -export CASPER_GENERATE_UUID=1 -SRCMIRROR=http://archive.ubuntu.com/ubuntu -PPAMIRROR=ppa.launchpad.net -ARCH=$(dpkg --print-architecture) -OPTMIRROR= -INITRD_COMPRESSOR=lzma -TMPFS=no - -select_mirror () { - case $ARCH in - i386|amd64) - case $FS in - ubuntu-lpia|ubuntu-mid) - USERMIRROR=http://ports.ubuntu.com/ubuntu-ports - SECMIRROR=${USERMIRROR} - SECSRCMIRROR=${SRCMIRROR} - TARGETARCH=lpia - ;; - *) - USERMIRROR=http://archive.ubuntu.com/ubuntu - SECMIRROR=http://security.ubuntu.com/ubuntu - SECSRCMIRROR=${SECMIRROR} - TARGETARCH=${ARCH} - ;; - esac - ;; - *) - USERMIRROR=http://ports.ubuntu.com/ubuntu-ports - SECMIRROR=${USERMIRROR} - SECSRCMIRROR=${SRCMIRROR} - TARGETARCH=${ARCH} - ;; - esac - case $(hostname --fqdn) in - bld-*.mmjgroup.com) MIRROR=${USERMIRROR};; - *.mmjgroup.com) MIRROR=http://archive.mmjgroup.com/${USERMIRROR##*/};; - *.0c3.net) - case $ARCH in - i386|amd64) MIRROR=http://mirrors.0c3.net/ubuntu/ ;; - *) MIRROR=http://mirrors.0c3.net/ubuntu-ports/ ;; - esac - ;; - *.ubuntu.com) MIRROR=http://ftpmaster.internal/ubuntu;; - *.warthogs.hbd.com) MIRROR=http://ftpmaster.internal/ubuntu;; - *.buildd) MIRROR=http://ftpmaster.internal/ubuntu;; - *) MIRROR=${USERMIRROR};; - esac - - if [ "$OPTMIRROR" ]; then - MIRROR="$OPTMIRROR" - fi -} - -STE=$(lsb_release -cs) -EXCLUDE="" -LIST="" -SUBARCH="" -PROPOSED="" -IMAGEFORMAT="squashfs" -# must be in the "team / PPA name" form; e.g. "moblin/ppa"; the default PPA -# name is "ppa", don't omit it -PPA="" -APT_SOURCE="" -FORCE_YES="" - -while getopts :d:e:i:I:m:S:s:a:A:f:p name; do case $name in - d) STE=$OPTARG;; - e) EXCLUDE="$EXCLUDE $OPTARG";; - i) LIST="$LIST $OPTARG";; - I) UINUM="$OPTARG";; - m) OPTMIRROR="$OPTARG";; - S) USZ="$OPTARG";; - s) SUBARCH="$OPTARG";; - a) ARCH="$OPTARG";; - A) APT_SOURCE="$OPTARG";; - f) IMAGEFORMAT="$OPTARG";; - p) PROPOSED="yes";; - \?) echo bad usage >&2; exit 2;; - \:) echo missing argument >&2; exit 2;; -esac; done; -shift $((OPTIND-1)) - -if (( $# == 0 )) || [ "X$1" = "Xall" ]; then - set -- ubuntu kubuntu kubuntu-active edubuntu xubuntu mythbuntu gobuntu base ubuntu-headless cloud-live - if [ "$ARCH" = "i386" ]; then - set -- ubuntu ubuntu-dvd kubuntu kubuntu-dvd kubuntu-active edubuntu edubuntu-dvd mythbuntu xubuntu gobuntu base ubuntu-headless - fi -fi - -if [ "$IMAGEFORMAT" = "ext2" ] || [ "$IMAGEFORMAT" = "ext3" ]; then - LIVE_BOOT_SCRIPTS="jasper" -else - LIVE_BOOT_SCRIPTS="casper lupin-casper" -fi - -for arg in "$@"; do - case "$arg" in - ubuntu|ubuntu-dvd|ubuntu-lpia|edubuntu|edubuntu-dvd|kubuntu|kubuntu-dvd|kubuntu-active|xubuntu|mythbuntu|gobuntu|ubuntu-mid|ubuntu-netbook|ubuntu-moblin-remix|base|ubuntu-headless|tocd|cloud-live) - ;; - *) - echo bad name >&2; - exit 2 - ;; - esac -done - -ROOT=$(pwd)/chroot-livecd/ # trailing / is CRITICAL -for FS in "$@"; do - FSS="$FS${SUBARCH:+-$SUBARCH}" - IMG=livecd.${FSS}.fsimg - DEV="" - COMP="main restricted" - - select_mirror - - # Just in case there's some leftover junk here: - cleanup 2>/dev/null || true - - umount ${ROOT} || true - rm -rf ${ROOT} - mkdir ${ROOT} - # maybe use a tmpfs - if test yes = "$TMPFS"; then - mount -t tmpfs -o size=8192M tmpfs ${ROOT} && echo using tmpfs - fi - - mkdir -p ${ROOT}etc/dpkg/dpkg.cfg.d - cat << @@EOF > ${ROOT}etc/dpkg/dpkg.cfg.d/livecd-rootfs -force-unsafe-io -@@EOF - - mkdir -p ${ROOT}var/cache/debconf - cat << @@EOF > ${ROOT}var/cache/debconf/config.dat -Name: debconf/frontend -Template: debconf/frontend -Value: Noninteractive -Owners: debconf -Flags: seen - -@@EOF - - case "$FS" in - ubuntu|ubuntu-lpia|ubuntu-dvd) - LIST="$LIST minimal^ standard^ ubuntu-desktop^" - LIVELIST="ubuntu-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - ;; - kubuntu|kubuntu-dvd) - LIST="$LIST minimal^ standard^ kubuntu-desktop^" - LIVELIST="kubuntu-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - ;; - kubuntu-active) - LIST="$LIST minimal^ standard^ kubuntu-active^" - LIVELIST="kubuntu-active-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - COMP="main restricted universe" - ;; - edubuntu|edubuntu-dvd) - LIST="$LIST minimal^ standard^ edubuntu-desktop-gnome^" - LIVELIST="edubuntu-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - COMP="main restricted universe" - ;; - xubuntu) - LIST="$LIST minimal^ standard^ xterm xubuntu-desktop^" - LIVELIST="xubuntu-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - COMP="main restricted universe multiverse" - ;; - gobuntu) - LIST="$LIST minimal^ standard^ gobuntu-desktop^" - LIVELIST="gobuntu-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - COMP="main" - ;; - ubuntu-mid) - LIST="$LIST minimal^ mobile-mid^" - LIVELIST="mobile-live^ casper ubiquity" - COMP="main restricted universe multiverse" - ;; - ubuntu-netbook) - LIST="$LIST minimal^ standard^ ubuntu-netbook^" - LIVELIST="netbook-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - ;; - mythbuntu) - LIST="$LIST minimal^ standard^ mythbuntu-desktop^" - LIVELIST="mythbuntu-live^ laptop-detect $LIVE_BOOT_SCRIPTS" - COMP="main restricted universe multiverse" - ;; - ubuntu-moblin-remix) - LIST="$LIST minimal^ ubuntu-moblin-remix" - LIVELIST="ubuntu-moblin-live" - COMP="main restricted universe" - PPA="moblin/ppa" - ;; - base) - LIST="$LIST minimal^ standard^" - LIVELIST="$LIVE_BOOT_SCRIPTS" - ;; - ubuntu-headless) - LIST="$LIST minimal^ standard^" - LIVELIST="$LIVE_BOOT_SCRIPTS" - ;; - cloud-live) - LIST="$LIST minimal^ standard^" - LIVELIST="minimal^ standard^ cloud-live-config $LIVE_BOOT_SCRIPTS" - COMP="main restricted universe" - PPA="cloud-live/config" - ;; - tocd) - LIST="$LIST minimal^ standard^" - tocdtmp=`mktemp -d` || exit 1 - tocdgerminate='http://people.ubuntu.com/~cjwatson/germinate-output/tocd3.1-dapper/' - if wget -O "$tocdtmp"/desktop "$tocdgerminate"/desktop; then - tocddesktop=`awk '{print $1}' "$tocdtmp"/desktop | egrep -v '^-|^Package|^\|' | tr '\n' ' '` - echo "TheOpenCD desktop package list is: $tocddesktop" - else - echo "Unable to fetch tocd-desktop germinate output." - [ -d "$tocdtmp" ] && rm -rf "$tocdtmp" - exit 1 - fi - if wget -O "$tocdtmp"/live "$tocdgerminate"/live; then - tocdlive=`awk '{print $1}' "$tocdtmp"/live | egrep -v '^-|^Package|^\|' | tr '\n' ' '` - echo "TheOpenCD live package list is: $tocdlive" - else - echo "Unable to fetch tocd-live germinate output." - [ -d "$tocdtmp" ] && rm -rf "$tocdtmp" - exit 1 - fi - [ -d "$tocdtmp" ] && rm -rf "$tocdtmp" - LIST="$LIST $tocddesktop" - LIVELIST="$tocdlive casper" - esac - case "$FS" in - *-dvd) - LIVELIST="$LIVELIST ${FS}-live^" - UNIVERSE=1 - MULTIVERSE=1 - ;; - *) - UNIVERSE= - MULTIVERSE= - ;; - esac - - dpkg -l livecd-rootfs || true # get our version # in the log. - checkpoint "Bootstrapping base system" - debootstrap --components=$(echo $COMP | sed 's/ /,/g') --arch $TARGETARCH $STE $ROOT $MIRROR - - # Recent dpkg has started complaining pretty loudly if dev/pts isn't - # mounted, so let's get it mounted immediately after debootstrap: - mount -t devpts devpts-${STE}-${FSS}-livefs ${ROOT}dev/pts - - # Just make a few things go away, which lets us skip a few other things. - DIVERTS="usr/sbin/mkinitrd usr/sbin/invoke-rc.d" - for file in $DIVERTS; do - mkdir -p ${ROOT}${file%/*} - chroot $ROOT dpkg-divert --add --local --divert /${file}.livecd --rename /${file} - cp ${ROOT}/bin/true ${ROOT}$file - done - - # /bin/true won't cut it for mkinitrd, need to have -o support. - cat << @@EOF > ${ROOT}/usr/sbin/mkinitrd -#!/usr/bin/python -import sys -for i in range(len(sys.argv)): - if sys.argv[i]=='-o': - open(sys.argv[i+1],"w") -@@EOF - chmod 755 ${ROOT}usr/sbin/mkinitrd - - trap "cleanup" 0 1 2 3 15 - - case $TARGETARCH in - alpha|amd64|i386|ia64|lpia|m68k|mips|mipsel) - link_in_boot=no - ;; - *) - link_in_boot=yes - ;; - esac - - # Make a good /etc/kernel-img.conf for the kernel packages - cat << @@EOF >> ${ROOT}etc/kernel-img.conf -do_symlinks = yes -relative_links = yes -do_bootloader = no -do_bootfloppy = no -do_initrd = yes -link_in_boot = $link_in_boot -@@EOF - - mkdir -p ${ROOT}proc - mount -tproc none ${ROOT}proc - - # this indicates whether or not to keep /boot/vmlinuz; the default is to - # strip it from the livefs as ubiquity >= 1.9.4 copies the kernel from the - # CD root (/casper/vmlinuz) to the target if it doesn't find one on the - # livefs, allowing us to save space; however some subarches use the uImage - # format in casper/ so we would end up with no vmlinuz file in /boot at the - # end. Not stripping it in the first place from /boot saves us from that. - STRIP_VMLINUZ=yes - - case $TARGETARCH+$SUBARCH in - powerpc+ps3) - mkdir -p ${ROOT}spu;; - esac - - case $TARGETARCH in - amd64) LIST="$LIST linux-generic";; - i386) LIST="$LIST linux-generic";; - - # and the bastard stepchildren - lpia) LIST="$LIST linux-lpia";; - ia64) LIST="$LIST linux-ia64";; - hppa) LIST="$LIST linux-hppa32 linux-hppa64";; - powerpc) LIST="$LIST linux-powerpc linux-powerpc64-smp";; - sparc*) LIST="$LIST linux-sparc64";; - armel) - #inhibit running of flash-kernel for armel - export FLASH_KERNEL_SKIP=1 - case "$SUBARCH" in - imx51) - LIST="$LIST linux-imx51" - ;; - dove) - LIST="$LIST linux-dove" - STRIP_VMLINUZ=no - ;; - omap) - LIST="$LIST linux-omap x-loader-omap3-beagle u-boot-linaro-omap3-beagle" - STRIP_VMLINUZ=no - ;; - omap4) - LIST="$LIST linux-omap4 x-loader-omap4-panda u-boot-linaro-omap4-panda" - STRIP_VMLINUZ=no - ;; - esac;; - *) echo "Unknown architecture: no kernel."; exit 1;; - esac - - for x in $EXCLUDE; do - LIST="$(without_package "$x" "$LIST")" - done - - if [ "$STE" = "hardy" ]; then - # use the version of ssl-cert from the release - # pocket, because the version in -updates pulls in the large - # openssl-blacklist package which we should never need on the - # live CD - cat << @@EOF > ${ROOT}etc/apt/preferences -Package: ssl-cert -Pin: version 1.0.14-0ubuntu2 -Pin-Priority: 991 -@@EOF - fi - - # Create a good sources.list, and finish the install - checkpoint "Configuring APT" - echo deb $MIRROR $STE ${COMP} > ${ROOT}etc/apt/sources.list - echo deb $MIRROR ${STE}-security ${COMP} >> ${ROOT}etc/apt/sources.list - echo deb $MIRROR ${STE}-updates ${COMP} >> ${ROOT}etc/apt/sources.list - if [ "$PROPOSED" = "yes" ]; then - echo deb $MIRROR ${STE}-proposed ${COMP} >> ${ROOT}etc/apt/sources.list - fi - if [ -n "$PPA" ]; then - echo deb http://$PPAMIRROR/$PPA/ubuntu ${STE} main >> ${ROOT}etc/apt/sources.list - - # handle PPAs named "ppa" specially; their Origin field in the Release - # file does not end with "-ppa" for backwards compatibility - origin="${PPA%/ppa}" - origin="${origin/\//-}" - touch ${ROOT}etc/apt/preferences - cat << @@EOF >> ${ROOT}etc/apt/preferences -Package: * -Pin: release o=LP-PPA-$origin -Pin-Priority: 550 -@@EOF - fi - if [ -n "$APT_SOURCE" ]; then - echo deb $APT_SOURCE $STE $COMP >> ${ROOT}etc/apt/sources.list - # allow unsigned sources, unfortunately - mkdir -p ${ROOT}etc/apt/apt.conf.d - echo 'APT::Get::AllowUnauthenticated "yes";' > ${ROOT}etc/apt/apt.conf.d/extra-source-allows-unauthenticated-sources - # and add the preferences rules :( - APT_PIN=$(echo $APT_SOURCE | sed -e's,http://,,; s,/.*,,') - cat >> ${ROOT}etc/apt/preferences << @@EOF -Package: * -Pin: release a=$STE -Pin-Priority: 500 - -Package: * -Pin: origin $APT_PIN -Pin-Priority: 900 -@@EOF - FORCE_YES=--force-yes - fi - - if [ "$FS" = "ubuntu-moblin-remix" ]; then - chroot $ROOT apt-get update - chroot $ROOT apt-get -y --force-yes install ubuntu-moblin-ppa-keyring - # promote Release.gpg from APT's lists/partial/ to lists/ - chroot $ROOT apt-get update - # workaround LP #442082 - rm -f ${ROOT}var/cache/apt/{,src}pkgcache.bin - fi - - if [ "$FS" = "cloud-live" ]; then - chroot $ROOT apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F3531FCE - chroot $ROOT apt-get update - fi - - # In addition to the ones we got from apt, trust whatever the local system - # believes in, but put things back afterwards. - cp ${ROOT}etc/apt/trusted.gpg ${ROOT}etc/apt/trusted.gpg.$$ - cat /etc/apt/trusted.gpg >> ${ROOT}etc/apt/trusted.gpg - - # update and immediately restore the trusted keyring - chroot $ROOT apt-get update - # we restore the keyring here because on dist-upgrade the - # ubuntu-extras-keyring package installs additional keys - mv ${ROOT}etc/apt/trusted.gpg.$$ ${ROOT}etc/apt/trusted.gpg - - checkpoint "Upgrading" - chroot $ROOT apt-get -y $FORCE_YES --purge dist-upgrade livecd.${FSS}.manifest-headers - chroot ${ROOT} dpkg -l linux-headers-\* | grep ^i | awk '{print $2}' \ - > livecd.${FSS}.manifest-headers-full - HEADERPACKAGES=`cat livecd.${FSS}.manifest-headers-full` - HEADERMETA="" - for i in `comm -3 livecd.${FSS}.manifest-headers livecd.${FSS}.manifest-headers-full`; do - HEADERMETA="$HEADERMETA $i" - done - case $TARGETARCH in - armel) - HEADERMETA=linux-headers-${SUBARCH} - ;; - esac - rm -f livecd.${FSS}.manifest-headers livecd.${FSS}.manifest-headers-full - chroot ${ROOT} apt-get -y --purge remove $HEADERPACKAGES livecd.${FSS}.manifest-desktop - checkpoint "Installing live packages" - chroot $ROOT apt-get -y --purge install $LIVELIST > livecd.${FSS}.manifest-desktop - ;; - esac - chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' \ - > livecd.${FSS}.manifest - - checkpoint "Cleaning up" - - kill_users - - chroot $ROOT /etc/cron.daily/mlocate || true - chroot $ROOT /etc/cron.daily/man-db || true - - # remove our diversions - for file in $DIVERTS; do - ls -ld ${ROOT}${file} ${ROOT}${file}.livecd || true - rm -f ${ROOT}${file} - chroot $ROOT dpkg-divert --remove --rename /${file} - done - - # remove the apt preferences hack if it was added - rm -f ${ROOT}etc/apt/preferences - - # And make this look more pristine - cat << @@EOF > ${ROOT}etc/apt/sources.list -deb ${USERMIRROR} $STE ${COMP} -deb-src ${SRCMIRROR} $STE ${COMP} - -deb ${SECMIRROR} ${STE}-security ${COMP} -deb-src ${SECSRCMIRROR} ${STE}-security ${COMP} - -## Major bug fix updates produced after the final release of the -## distribution. -deb ${USERMIRROR} ${STE}-updates ${COMP} -deb-src ${SRCMIRROR} ${STE}-updates ${COMP} - -@@EOF - if [ "$UNIVERSE" ]; then - COMMENT= - else - cat << @@EOF >> ${ROOT}etc/apt/sources.list -## Uncomment the following two lines to add software from the 'universe' -## repository. -@@EOF - COMMENT='# ' - fi - cat << @@EOF >> ${ROOT}etc/apt/sources.list -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team. Also, please note that software in universe WILL NOT receive any -## review or updates from the Ubuntu security team. -${COMMENT}deb ${USERMIRROR} $STE universe -${COMMENT}deb-src ${SRCMIRROR} $STE universe -${COMMENT}deb ${USERMIRROR} ${STE}-updates universe -${COMMENT}deb-src ${SRCMIRROR} ${STE}-updates universe -${COMMENT}deb ${SECMIRROR} ${STE}-security universe -${COMMENT}deb-src ${SECSRCMIRROR} ${STE}-security universe - -@@EOF - if [ "$MULTIVERSE" ]; then - COMMENT= - else - COMMENT='# ' - fi - cat << @@EOF >> ${ROOT}etc/apt/sources.list -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team, and may not be under a free licence. Please satisfy yourself as to -## your rights to use the software. Also, please note that software in -## multiverse WILL NOT receive any review or updates from the Ubuntu -## security team. -${COMMENT}deb ${USERMIRROR} $STE multiverse -${COMMENT}deb-src ${SRCMIRROR} $STE multiverse -${COMMENT}deb ${USERMIRROR} ${STE}-updates multiverse -${COMMENT}deb-src ${SRCMIRROR} ${STE}-updates multiverse -${COMMENT}deb ${SECMIRROR} ${STE}-security multiverse -${COMMENT}deb-src ${SECSRCMIRROR} ${STE}-security multiverse -@@EOF - if [ -n "$PPA" ]; then - cat << @@EOF >> ${ROOT}etc/apt/sources.list - -## The following unsupported and untrusted Personal Archives (PPAs) were used -## to create the base image of this system -deb http://$PPAMIRROR/$PPA/ubuntu ${STE} main -deb-src http://$PPAMIRROR/$PPA/ubuntu ${STE} main -@@EOF - - # handle PPAs named "ppa" specially; their Origin field in the Release - # file does not end with "-ppa" for backwards compatibility - origin="${PPA%/ppa}" - origin="${origin/\//-}" - touch ${ROOT}etc/apt/preferences - cat << @@EOF >> ${ROOT}etc/apt/preferences -Explanation: This prefers the Personal Archive $PPA over the other sources -Package: * -Pin: release o=LP-PPA-$origin -Pin-Priority: 550 -@@EOF - fi - - # get rid of the .debs - we don't need them. - chroot ${ROOT} apt-get clean - rm -f ${ROOT}var/lib/apt/lists/*_* - rm -f ${ROOT}var/spool/postfix/maildrop/* - # Removing update-notifier notes is now considered harmful: - #rm -f ${ROOT}var/lib/update-notifier/user.d/* - # The D-Bus machine identifier needs to be unique, and is generated at - # boot time if it's missing. - rm -f ${ROOT}var/lib/dbus/machine-id - chroot $ROOT apt-get update || true # give them fresh lists, but don't fail - rm -f ${ROOT}etc/resolv.conf ${ROOT}etc/mailname - if [ -f ${ROOT}/etc/postfix/main.cf ]; then - sed -i '/^myhostname/d; /^mydestination/d; /^myorigin/d' ${ROOT}etc/postfix/main.cf - echo set postfix/destinations | chroot ${ROOT} /usr/bin/debconf-communicate postfix - echo set postfix/mailname | chroot ${ROOT} /usr/bin/debconf-communicate postfix - fi - KVERS=`chroot ${ROOT} dpkg -l linux-image-2\*|grep ^i|awk '{print $2}'|sed 's/linux-image-//'` - for KVER in ${KVERS}; do - SUBARCH="${KVER#*-*-}" - chroot ${ROOT} update-initramfs -k "${KVER}" -u - # we mv the initramfs, so it's not wasting space on the livefs - mv ${ROOT}/boot/initrd.img-"${KVER}" livecd.${FSS}.initrd-"${SUBARCH}" - rm -f ${ROOT}/boot/initrd.img-"${KVER}".bak - # whether to strip vmlinuz or not to save space thanks to ubiquity - action="cp" - if [ "$STRIP_VMLINUZ" = "yes" ]; then - action="mv" - fi - $action ${ROOT}/boot/vmlinu?-"${KVER}" livecd.${FSS}.kernel-"${SUBARCH}" - chmod 644 livecd.${FSS}.kernel-"${SUBARCH}" - if [ "$INITRD_COMPRESSOR" != gz ]; then - zcat "livecd.${FSS}.initrd-${SUBARCH}" | "$INITRD_COMPRESSOR" -9c \ - > "livecd.${FSS}.initrd-${SUBARCH}.new" - mv "livecd.${FSS}.initrd-${SUBARCH}.new" \ - "livecd.${FSS}.initrd-${SUBARCH}" - fi - done - NUMKVERS="$(set -- $KVERS; echo $#)" - if [ "$NUMKVERS" = 1 ]; then - # only one kernel - SUBARCH="${KVERS#*-*-}" - ln -sf livecd.${FSS}.initrd-"${SUBARCH}" livecd.${FSS}.initrd - ln -sf livecd.${FSS}.kernel-"${SUBARCH}" livecd.${FSS}.kernel - fi - case $TARGETARCH+$SUBARCH in - powerpc+ps3) - chroot ${ROOT} addgroup --system spu;; - esac - - # No point keeping Gnome icon cache around for Kubuntu - if [ "$FS" = "kubuntu" ] || \ - [ "$FS" = "kubuntu-active" ]; then - rm -f ${ROOT}/usr/share/icons/*/icon-theme.cache - fi - - if [ "$FS" = ubuntu-netbook ] && \ - [ "$TARGETARCH" = armel ] && \ - [ -e "$ROOT/usr/share/xsessions/unity-2d.desktop" ]; then - chroot $ROOT /usr/lib/gdm/gdm-set-default-session unity-2d - fi - - # all done with the chroot; reset the debconf frontend, so Colin doesn't cry - echo RESET debconf/frontend | chroot $ROOT debconf-communicate - echo FSET debconf/frontend seen true | chroot $ROOT debconf-communicate - - # And now that we're done messing with debconf, destroy the backup files: - rm -f ${ROOT}/var/cache/debconf/*-old - - rm -f ${ROOT}/etc/dpkg/dpkg.cfg.d/livecd-rootfs - - # show the size of directories in /usr/share/doc - checkpoint "Checking size of /usr/share/doc" - echo BEGIN docdirs - (cd $ROOT && find usr/share/doc -maxdepth 1 -type d | xargs du -s | sort -nr) - echo END docdirs - - # search for duplicate files, write the summary to stdout, - if which fdupes >/dev/null 2>&1; then - checkpoint "Checking for duplicate files" - echo "first line: " - echo "data lines: [ ...]" - echo BEGIN fdupes - (cd $ROOT \ - && fdupes --recurse --noempty --sameline --size --quiet usr \ - | awk '/bytes each/ {s=$1} /^usr/ { n+=1; n2+=NF-1; sum+=s*(NF-1); print s*(NF-1), NF-1, s, $0 } END {print sum, n, n2}' \ - | sort -nr - ) - echo END fdupes - fi - - # Dirty hack to mark langpack stuff as manually installed - perl -i -nle 'print unless /^Package: language-(pack|support)/ .. /^$/;' \ - ${ROOT}/var/lib/apt/extended_states - - # And run the cleanup function dead last, to umount /proc after nothing - # else needs to be run in the chroot (umounting it earlier breaks rm): - cleanup - - # Squashfs does not report unpacked disk space usage, which is explained at - # . However, we would like to cache this - # number for partman's sufficient free space check and ubiquity's - # installation progress calculation. - checkpoint "Calculating total size" - printf $(du -sx --block-size=1 ${ROOT} | cut -f1) > livecd.${FSS}.size || true - - - # Build our images - checkpoint "Building image" - if [ "$IMAGEFORMAT" = "ext2" ] || [ "$IMAGEFORMAT" = "ext3" ]; then - livefs_ext2 - else - livefs_squash - fi - - # Upgrade ext2->ext3 if that's what is requested - if [ "$IMAGEFORMAT" = "ext3" ]; then - tune2fs -j livecd.${FSS}.ext2 - mv livecd.${FSS}.ext2 livecd.${FSS}.ext3 - # temporary workaround for LP: #583317 with ext3 images - e2fsck -fy livecd.${FSS}.ext3 || true - fi - - # LTSP chroot building (only in 32bit and for Edubuntu (DVD)) - case $FS in - edubuntu-dvd) - if [ "$TARGETARCH" = "i386" ]; then - checkpoint "Building LTSP chroot" - ltsp-build-client --base $(pwd) --mirror $MIRROR --arch $TARGETARCH --dist $STE --chroot ltsp-live --late-packages ldm-edubuntu-theme,plymouth-theme-edubuntu --purge-chroot --skipimage - mkdir -p $(pwd)/images - mksquashfs $(pwd)/ltsp-live $(pwd)/images/ltsp-live.img -e cdrom - rm -Rf $(pwd)/ltsp-live - if [ -f $(pwd)/images/ltsp-live.img ]; then - mv $(pwd)/images/ltsp-live.img livecd.$FS-ltsp.squashfs - chmod 0644 livecd.$FS-ltsp.squashfs - rmdir --ignore-fail-on-non-empty $(pwd)/images/ - else - echo "LTSP: Unable to build the chroot, see above for details." - fi - fi - ;; - esac -done - -checkpoint "Done" From f030ef89028cd99f9c032d9ebdd61d8e705451b0 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 23 Jul 2013 23:21:53 +0100 Subject: [PATCH 24/30] Temporarily disable Click package installation, until desktop/AppArmor integration has landed properly. --- debian/changelog | 2 ++ live-build/ubuntu-touch/hooks/60-install-click.chroot | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index b4c6e408..be39e95b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ livecd-rootfs (2.164) UNRELEASED; urgency=low * Remove livecd.py, which was never finished. * Remove all vestiges of livecd.sh and ubuntu-touch-android.sh. Requiescant in pace. + * Temporarily disable Click package installation, until desktop/AppArmor + integration has landed properly. -- Colin Watson Mon, 22 Jul 2013 11:35:23 +0100 diff --git a/live-build/ubuntu-touch/hooks/60-install-click.chroot b/live-build/ubuntu-touch/hooks/60-install-click.chroot index 7c6f7cb5..96c560ed 100755 --- a/live-build/ubuntu-touch/hooks/60-install-click.chroot +++ b/live-build/ubuntu-touch/hooks/60-install-click.chroot @@ -1,5 +1,11 @@ #!/bin/sh +cat < Date: Tue, 23 Jul 2013 23:26:15 +0100 Subject: [PATCH 25/30] releasing version 2.164 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index be39e95b..1706494e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.164) UNRELEASED; urgency=low +livecd-rootfs (2.164) saucy; urgency=low * Run builds under eatmydata. (This doesn't actually seem to help very much - it shaves a minute off a 48-minute test build on my laptop - but @@ -9,7 +9,7 @@ livecd-rootfs (2.164) UNRELEASED; urgency=low * Temporarily disable Click package installation, until desktop/AppArmor integration has landed properly. - -- Colin Watson Mon, 22 Jul 2013 11:35:23 +0100 + -- Colin Watson Tue, 23 Jul 2013 23:21:56 +0100 livecd-rootfs (2.163) saucy; urgency=low From 3d4461ecad4d5c3e0bca47d51da42645f41b5eb2 Mon Sep 17 00:00:00 2001 From: Adam Conrad Date: Wed, 24 Jul 2013 11:44:13 +0100 Subject: [PATCH 26/30] Remove e2fs-zero.py and references to it, it's no longer used. --- debian/changelog | 6 ++ debian/copyright | 1 - debian/install | 1 - e2fs-zero.py | 235 ----------------------------------------------- 4 files changed, 6 insertions(+), 237 deletions(-) delete mode 100644 e2fs-zero.py diff --git a/debian/changelog b/debian/changelog index 1706494e..89ea128d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.165) saucy; urgency=low + + * Remove e2fs-zero.py and references to it, it's no longer used. + + -- Adam Conrad Wed, 24 Jul 2013 11:42:23 +0100 + livecd-rootfs (2.164) saucy; urgency=low * Run builds under eatmydata. (This doesn't actually seem to help very diff --git a/debian/copyright b/debian/copyright index b93ef389..0a2a7189 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,4 @@ live-build/* is copyright (c) 2004-2013 by Canonical Ltd. -e2fs-zero.py is copyright (c) 2005 by Paul Sladen These programs are free software; you can redistribute and/or modify them under the terms of the GNU General Public License as published by diff --git a/debian/install b/debian/install index e40ebc64..4304692e 100644 --- a/debian/install +++ b/debian/install @@ -1,2 +1 @@ -e2fs-zero.py usr/sbin live-build usr/share/livecd-rootfs diff --git a/e2fs-zero.py b/e2fs-zero.py deleted file mode 100644 index 794daa52..00000000 --- a/e2fs-zero.py +++ /dev/null @@ -1,235 +0,0 @@ -#!/usr/bin/env python -# Copyright Paul Sladen , 2005-05-14 -# You may use this work under the terms of the GNU GPL. -# -# Synopsis: -# 1. call dumpe2fs /dev/xxxx | grep -E '^( Free blocks: |Block size:)' -# 2. decode Block size, eg. 4096 bytes -# 3. decode ranges of Free blocks, like: 123, 132-145, 149-150, 167 -# 4. open '/dev/xxxx' for writing -# 5. seek to each location (block_number * block_size) and write lots of NUL -# 6. profit - -"""\ -e2fszero 0.1 (2005-05-14) -Usage: e2fs-zero [-h] [-v] [-w|-n] ext2-filesystem -Zero unused blocks in an Ext2 Filesystem, to increase compression and rsyncability. - -h --help this message - -v --verbose extra information - -n --dryrun disable writing to the filesystem - -w --write enable writing to the filesystem (default) -Note: This program relies on 'dumpe2fs' to do the dangerous calculations! -NOTE: YES, THIS PROGRAM REALLY WILL OVERWRITE (bits of) YOUR FILESYSTEM WITH NULLS\ -""" -DUMPE2FS = '/sbin/dumpe2fs' -import os, sys - -# messages -verbose = False -# enable writing operations -dangerous = False - -def main(): - global verbose, dangerous, DUMPE2FS - - # catch people who need usage help - # this is the worst and more incorrect piece of code in here - - leftover = [] - for fight in sys.argv[1:]: - if fight == '-v' or fight == '--verbose': - verbose = True - continue - elif fight == '-n' or fight == '--dryrun': - dangerous = False - continue - elif fight == '-w' or fight == '--write': - dangerous = True - continue - elif fight[0] == '-': - print __doc__ - sys.exit() - leftover.append(fight) - - #print `leftover` - - try: - if len(leftover) != 1: - raise 'ArgumentError' - filesystem = leftover[0] - if len(filesystem) <= 0: - raise 'NoFilesystemName' - except: - print >> sys.stderr, __doc__ - sys.exit() - - # We need access to the filesystem image (either a block device or a very large file) - # and we also need to have 'dumpe2fs', otherwise we can't open a pipe() from it. - - try: - stat = os.stat(filesystem) - stat = os.stat(DUMPE2FS) - # Might aswell just let the user see any stderr errors from dumpe2fs, - # although annoying it prints a banner first - #out, err = os.popen3("%s '%s'" % (DUMPE2FS, filesystem))[1:] - sys.stderr.write('calling ') - pipe = os.popen("%s '%s'" % (DUMPE2FS, filesystem)) - except OSError: - print >> sys.stderr, "$(PROGRAM): can't access $(filesystem), try --help" - - # We're looking for the following lines from dumpe2fs, in order, and ignoring the rest: - # Filesystem volume name: - # Free blocks: 134859 - # Block size: 4096 - # Free blocks: 1123, 1345-1456, 1567, 1678-1789 - # Free blocks: 2123-2345, 2456-2567, 2678, 2789 - - s = pipe.readline() - if s <= 'Filesystem volume name:': - raise "Failed to parse correct dumpe2fs output" - - # 'Free blocks:' - while not s.startswith('Free blocks:') and len(s) > 0: - s = pipe.readline() - try: - free_blocks = int(s.strip().split(': ')[1]) - except: - raise "Failed to parse unused block count ('Free blocks:')" - if verbose: - print "Detected filsystem contains %d free blocks" % (free_blocks) - - # 'Block size:' - while not s.startswith('Block size:') and len(s) > 0: - s = pipe.readline() - try: - block_size = int(s.strip().split(': ')[1]) - except: - raise "Failed to parse filesystem block-size ('Block size:')" - if verbose: - print "Detected filsystem block_size = %d bytes" % (block_size) - - # 'Free blocks:' (multiple entries, one per Ext2 "group") - free_ranges = [] - while True: - while len(s) and not s.startswith(' Free blocks:'): - try: - s = pipe.readline() - except: - raise "failed to read" - # Detect EOF - if not len(s): - break - #print len(s), `s` - # Strip the label: and separate the commas - try: - #print `s.strip()` - free_ranges += s.split(': ', 1)[1].strip().split(', ')[:] - except: - print >> sys.stderr, `s` - raise "Failed to parse free_ranges (' Free blocks:')" - s = pipe.readline() - #print `free_ranges` - - # Turn the strings into integer lists of useful free blocks - # 'blocks' contains each free blocks and get _very_ big - # 'wipes' contains [offset, length] pairs - record_blocks = False - record_wipes = True - blocks = [] - wipes = [] - free_block_count = 0 - - for egg in free_ranges: - if len(egg) > 0: - # Assuming this ext2 group has some spare space in it... - try: - # Find some ranges (Ranges are inclusive, eg. 172-184) - if egg.find('-') > 0: - #blocks += range(*map(int, egg.split('-'))) - a, b = egg.split('-') - if record_blocks: blocks += range(int(a), int(b) + 1) - if record_wipes: wipes.append([block_size * int(a), block_size * (int(b) - int(a) + 1)]) - free_block_count += int(b) - int(a) + 1 - # But some are singular (eg. '199') is just one free block on its own - else: - if record_blocks: blocks += [int(egg)] - if record_wipes: wipes.append([block_size * int(egg), block_size]) - free_block_count += 1 - except: - # since we're nearly at the point of writing to the disk, - # it probably better to just safely roll over and die - print "Bzzzz on trying to decode " + `egg` - blocks.sort() - #print len(blocks), `blocks` - if verbose: - print len(wipes), 'offset/length pairs', `wipes` - if verbose or free_blocks != free_block_count: - print "Free blocks; parsed: %d, decoded: %d" % (free_blocks, free_block_count) - if free_blocks != free_block_count: - raise 'Decoded Free blocks do not match count in filesystem!' - perform_wipe(filesystem, wipes) - -WRITE_SIZE = 2**18 -PADDING = '\0' - -# fstream file-access [open/f.write/f.tell] seems to have some -# grave funnyiness that causes the file to be randomly truncated. -# Since I spent a good while tearing my hair out over this, I've -# changed it to just use the normal POSIX os.open/os.write/close - -# Here we take the offset/length pairs decoded above, open the -# ext2 filesystem image and overwrite the unused areas. -# it would be handy to truncate areas (make them sparse) so that they -# don't actually take up space on disk to... - -def perform_wipe(filename, wipes = [[0, 0]]): - progress_counter = 0.0 - percentage = 100.0 / len(wipes) - empty_space = PADDING * WRITE_SIZE - - #f = open(filename, 'w') - if dangerous: - mode = os.O_WRONLY|os.EX_CANTCREAT - else: - mode = os.O_RDONLY|os.EX_CANTCREAT - fd = os.open(filename, mode) - - # Don't waste space on a tty, display a progress percentage instead. - if sys.stdout.isatty(): - end = '\r' - else: - end = '\n' - for offset, length in wipes: - progress_counter += percentage - sys.stdout.write("wiping position %16d for %16d bytes (%5.1f%%)%s" % - (offset, length, progress_counter, end)) - #f.seek(offset) - os.lseek(fd, offset, 0) - #print 'currently at (before) ' + `f.tell()` - #print 'currently at (before) ' + `os.tell(fd)` - # only write 256kB at a time, since we can stick that in a buffer - # and not have Python regenerate HUGE arrays each time - if 1: - while length >= WRITE_SIZE and length > 0: - #f.write(empty_space) - #length -= WRITE_SIZE - if dangerous: - length -= os.write(fd, empty_space) - else: - length -= WRITE_SIZE - #f.write('\xaa' * length) - #f.write('hello') - if dangerous: - os.write(fd, PADDING * length) - #print 'currently at (after) ' + `f.tell()` - #print 'currently at (after) ' + `os.tell(fd)` - #f.close() - os.close(fd) - if sys.stdout.isatty(): - print - if verbose: - print 'All done! Hopefully your filesystem is not toast.' - -if __name__ == '__main__': - main() - From 912941411b72785a760779cb639b37f7cbe843eb Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Thu, 25 Jul 2013 11:16:46 +0200 Subject: [PATCH 27/30] add radio user (with UID 1001 (required by android)) to the default user creation for ubuntu-touch --- debian/changelog | 7 +++++++ live-build/ubuntu-touch/hooks/01-setup_user.chroot | 1 + 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 89ea128d..70d1ae37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.166) UNRELEASED; urgency=low + + * add radio user (with UID 1001 (required by android)) to the default user + creation for ubuntu-touch + + -- Oliver Grawert Thu, 25 Jul 2013 11:14:34 +0200 + livecd-rootfs (2.165) saucy; urgency=low * Remove e2fs-zero.py and references to it, it's no longer used. diff --git a/live-build/ubuntu-touch/hooks/01-setup_user.chroot b/live-build/ubuntu-touch/hooks/01-setup_user.chroot index dbf56e95..b214eb58 100755 --- a/live-build/ubuntu-touch/hooks/01-setup_user.chroot +++ b/live-build/ubuntu-touch/hooks/01-setup_user.chroot @@ -10,6 +10,7 @@ echo "I: set user $USER password to $USER" echo "$USER:$USER" | chpasswd adduser --gecos system --no-create-home --disabled-login --disabled-password system --uid 1000 +adduser --gecos radio --no-create-home --disabled-login --disabled-password radio --uid 1001 mkdir -p /home/$USER/Music mkdir -p /home/$USER/Pictures From f906e0211b7ecb07158752406893c6d48200ab92 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Thu, 25 Jul 2013 11:17:43 +0200 Subject: [PATCH 28/30] releasing version 2.166 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 70d1ae37..43dc4b23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.166) UNRELEASED; urgency=low +livecd-rootfs (2.166) saucy; urgency=low * add radio user (with UID 1001 (required by android)) to the default user creation for ubuntu-touch From 47d569d8bcf2459821d18689c01d7d4d5def6704 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Wed, 31 Jul 2013 13:42:22 +0200 Subject: [PATCH 29/30] make sure FLASH_KERNEL_SKIP is set when we post-process touch images --- debian/changelog | 6 ++++++ live-build/auto/build | 2 ++ 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 43dc4b23..357585c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.167) UNRELEASED; urgency=low + + * make sure FLASH_KERNEL_SKIP is set when we post-process touch images + + -- Oliver Grawert Wed, 31 Jul 2013 13:33:53 +0200 + livecd-rootfs (2.166) saucy; urgency=low * add radio user (with UID 1001 (required by android)) to the default user diff --git a/live-build/auto/build b/live-build/auto/build index 1a35be61..91bd8a02 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -414,6 +414,8 @@ if [ "$PROJECT" = "ubuntu-touch" ] && [ "$ARCH" = "armhf" ]; then sourceslist="chroot/etc/apt/sources.list" + export FLASH_KERNEL_SKIP=True + lb chroot_proc install "$@" lb chroot_sysfs install "$@" lb chroot_devpts install "$@" From fff1a0cc0a6729154398d8451913153cfccbe78e Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Wed, 31 Jul 2013 13:42:41 +0200 Subject: [PATCH 30/30] releasing version 2.167 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 357585c0..d474436f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.167) UNRELEASED; urgency=low +livecd-rootfs (2.167) saucy; urgency=low * make sure FLASH_KERNEL_SKIP is set when we post-process touch images