From e4744f68ce9d9589092d9736c370f254d7d3f7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Thu, 17 Sep 2015 11:42:51 +0200 Subject: [PATCH 1/5] Ok, again try convincing people that using a subproject here is the way to go... --- live-build/auto/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/live-build/auto/config b/live-build/auto/config index 3dbb0544..8ead620a 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -448,6 +448,9 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--mirror-binary-security ${MIRROR}" OPTS="${OPTS:+$OPTS }--mirror-binary ${MIRROR}" ;; + ubuntu-pd) + add_package install ubuntu-pocket-desktop + ;; esac ;; From 5907a20a5664b441392288c780fff6069ad47111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 18 Sep 2015 16:54:05 +0200 Subject: [PATCH 2/5] Fix indent --- live-build/auto/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index 8ead620a..47057aa4 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -448,7 +448,7 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--mirror-binary-security ${MIRROR}" OPTS="${OPTS:+$OPTS }--mirror-binary ${MIRROR}" ;; - ubuntu-pd) + ubuntu-pd) add_package install ubuntu-pocket-desktop ;; esac From e0fcd940743bcbfeda0774a661be905ca955423e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 18 Sep 2015 17:38:46 +0200 Subject: [PATCH 3/5] Switch to the project approach, add a symlink for the hooks --- live-build/auto/build | 16 +++++++++------- live-build/auto/config | 20 +++++++++++--------- live-build/ubuntu-pd | 1 + 3 files changed, 21 insertions(+), 16 deletions(-) create mode 120000 live-build/ubuntu-pd diff --git a/live-build/auto/build b/live-build/auto/build index 40968052..a9cacabc 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -238,11 +238,13 @@ deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS > chroot/etc/apt/sources.list rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig fi - if [ "$PROJECT" = "ubuntu-touch" ] && [ "$ARCH" = "armhf" ]; then - INFO_DESC="$(lsb_release -d -s)" - echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info - mkdir -p chroot/var/log/installer - Chroot chroot "ln -s /etc/media-info /var/log/installer/media-info" + if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then + if [ "$ARCH" = "armhf" ]; then + INFO_DESC="$(lsb_release -d -s)" + echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info + mkdir -p chroot/var/log/installer + Chroot chroot "ln -s /etc/media-info /var/log/installer/media-info" + fi fi if [ "$PROJECT" = "ubuntu-cpc" ]; then cat > chroot/etc/apt/sources.list << EOF @@ -313,7 +315,7 @@ elif [ -e binary-tar.tar.gz ]; then cp -a binary-tar.tar.gz "$PREFIX.rootfs.tar.gz" fi -if [ "$PROJECT" = "ubuntu-touch" ]; then +if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then (cd "binary/$INITFS/custom.dir/" && tar -c *) | \ gzip -9 --rsyncable > "$PREFIX.custom.tar.gz" chmod 644 "$PREFIX.custom.tar.gz" @@ -436,7 +438,7 @@ if [ "$SUBARCH" = "ac100" ] || [ "$SUBARCH" = "nexus7" ]; then fi -if [ "$PROJECT" = "ubuntu-touch" ]; then +if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then sourceslist="chroot/etc/apt/sources.list" lb chroot_proc install "$@" diff --git a/live-build/auto/config b/live-build/auto/config index 47057aa4..bcd6e26d 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -129,7 +129,7 @@ case $IMAGEFORMAT in *) case $PROJECT in - ubuntu-server|ubuntu-touch) + ubuntu-server|ubuntu-touch|ubuntu-pd) ;; *) add_package live lupin-casper @@ -162,7 +162,7 @@ if [ "$PREINSTALLED" = "true" ] && [ "$SUBPROJECT" != "wubi" ]; then ubuntu-server) add_package live oem-config-debconf ubiquity-frontend-debconf ;; - ubuntu-core|base|ubuntu-touch|ubuntu-cpc|ubuntu-desktop-next) + ubuntu-core|base|ubuntu-touch|ubuntu-pd|ubuntu-cpc|ubuntu-desktop-next) ;; *) add_package live oem-config-gtk ubiquity-frontend-gtk @@ -420,8 +420,13 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" ;; - ubuntu-touch) - add_package install ubuntu-minimal ubuntu-touch systemd-sysv- packagekit ubuntu-system-settings-online-accounts + ubuntu-touch|ubuntu-pd) + add_package install ubuntu-minimal systemd-sysv- packagekit ubuntu-system-settings-online-accounts + if [ "$PROJECT" = "ubuntu-touch" ]; then + add_package install ubuntu-touch + else + add_package install ubuntu-pocket-desktop + fi COMPONENTS='main restricted universe' BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu' export LB_BOOTSTRAP_INCLUDE='apt-transport-https gnupg' @@ -448,9 +453,6 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--mirror-binary-security ${MIRROR}" OPTS="${OPTS:+$OPTS }--mirror-binary ${MIRROR}" ;; - ubuntu-pd) - add_package install ubuntu-pocket-desktop - ;; esac ;; @@ -527,7 +529,7 @@ case $ARCH in esac case $PROJECT in - ubuntu-server|ubuntu-core|ubuntu-touch) + ubuntu-server|ubuntu-core|ubuntu-touch|ubuntu-pd) case $SUBPROJECT in system-image) # keep the kernel for the system-image build @@ -668,7 +670,7 @@ EOF fi ;; - ubuntu-touch:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*) + ubuntu-touch:*|ubuntu-pd:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*) cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \ config/ ;; diff --git a/live-build/ubuntu-pd b/live-build/ubuntu-pd new file mode 120000 index 00000000..ab44653c --- /dev/null +++ b/live-build/ubuntu-pd @@ -0,0 +1 @@ +ubuntu-touch/ \ No newline at end of file From 57f05075185a97e773ec3f2067b3156bee2e1d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Mon, 21 Sep 2015 15:57:55 +0200 Subject: [PATCH 4/5] As suggested by Colin, first add the meta packages, then the other deps. --- live-build/auto/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index bcd6e26d..89ada490 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -421,12 +421,13 @@ case $PROJECT in ;; ubuntu-touch|ubuntu-pd) - add_package install ubuntu-minimal systemd-sysv- packagekit ubuntu-system-settings-online-accounts if [ "$PROJECT" = "ubuntu-touch" ]; then add_package install ubuntu-touch else add_package install ubuntu-pocket-desktop fi + add_package install ubuntu-minimal systemd-sysv- packagekit ubuntu-system-settings-online-accounts + COMPONENTS='main restricted universe' BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu' export LB_BOOTSTRAP_INCLUDE='apt-transport-https gnupg' From a559b98c8b09c2a0882973d4f2c9ec51f3dedfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Mon, 21 Sep 2015 16:01:01 +0200 Subject: [PATCH 5/5] Install the meta package as part of one add_package install call. --- live-build/auto/config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 89ada490..0490d4ad 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -422,11 +422,11 @@ case $PROJECT in ubuntu-touch|ubuntu-pd) if [ "$PROJECT" = "ubuntu-touch" ]; then - add_package install ubuntu-touch + meta_package=ubuntu-touch else - add_package install ubuntu-pocket-desktop + meta_package=ubuntu-pocket-desktop fi - add_package install ubuntu-minimal systemd-sysv- packagekit ubuntu-system-settings-online-accounts + add_package install ubuntu-minimal $meta_package systemd-sysv- packagekit ubuntu-system-settings-online-accounts COMPONENTS='main restricted universe' BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu'