From 5c03a4f1d04cbe9ca7148ff2ac3257ee283b820d Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 00:06:43 -0300 Subject: [PATCH 1/6] 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 e899fa2c5a54dc955587c83cc9dcb755b02f9c02 Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 11:07:08 -0300 Subject: [PATCH 2/6] 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 3/6] 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 4/6] 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 5/6] 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 bccea77b73210c25410743d80c49ef3197ba58e6 Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Wed, 17 Jul 2013 11:37:37 -0300 Subject: [PATCH 6/6] 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