summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Salveti de Araujo <ricardo.salveti@linaro.org>2012-07-24 13:53:54 -0300
committerRicardo Salveti de Araujo <ricardo.salveti@linaro.org>2012-07-24 13:53:54 -0300
commiteaaa6dc9f4d8def282054e77cbe72c4a5004b1d4 (patch)
tree5d56fa28b0c20160105f24304c2fc281b2f9aee5
parent95996ed8446ea927e1f83b11ecc4222c041abd8d (diff)
quantal-armhf-ubuntu-desktop: adding config files for ubuntu-desktop
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
-rwxr-xr-xquantal-armhf-ubuntu-desktop/Makefile32
-rw-r--r--quantal-armhf-ubuntu-desktop/README16
-rwxr-xr-xquantal-armhf-ubuntu-desktop/configure40
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.key.chroot12
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.list.chroot3
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.key.chroot12
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.list.chroot3
-rwxr-xr-xquantal-armhf-ubuntu-desktop/customization/hooks/01-setup_user_linaro.chroot7
-rwxr-xr-xquantal-armhf-ubuntu-desktop/customization/hooks/02-add_linaro_to_groups.chroot63
-rwxr-xr-xquantal-armhf-ubuntu-desktop/customization/hooks/03-check_sudoers_for_admin.chroot17
-rwxr-xr-xquantal-armhf-ubuntu-desktop/customization/hooks/04-lava_test.chroot13
-rwxr-xr-xquantal-armhf-ubuntu-desktop/customization/hooks/05-set_sudo_mode.chroot3
-rwxr-xr-xquantal-armhf-ubuntu-desktop/customization/hooks/20-extract_initrd_uuid.binary29
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/default/locale1
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hostname1
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hosts7
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/lightdm/lightdm.conf5
-rw-r--r--quantal-armhf-ubuntu-desktop/customization/package-lists/linaro-ubuntu-desktop.list.chroot3
18 files changed, 267 insertions, 0 deletions
diff --git a/quantal-armhf-ubuntu-desktop/Makefile b/quantal-armhf-ubuntu-desktop/Makefile
new file mode 100755
index 0000000..fb94bc7
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/Makefile
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# (C) 2012 Fathi Boudra <fathi.boudra@linaro.org>
+
+# Calls all necessary live-build programs in the correct order to complete
+# the bootstrap, chroot, binary, and source stage.
+
+# You need live-build package installed and superuser privileges.
+
+IMAGEPREFIX=linaro-precise-ubuntu-desktop-`date +%Y%m%d`-$(BUILD_NUMBER)
+LOGFILE=$(IMAGEPREFIX).build-log.txt
+CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2
+LISTFILE=$(IMAGEPREFIX).list
+PKGSFILE=$(IMAGEPREFIX).packages
+TARGZFILE=$(IMAGEPREFIX).tar.gz
+MD5SUMSFILE=$(IMAGEPREFIX).md5sums.txt
+SHA1SUMSFILE=$(IMAGEPREFIX).sha1sums.txt
+
+all:
+ set -e; sudo lb build 2>&1 | tee $(LOGFILE)
+ if [ -f binary-tar.tar.gz ]; then \
+ tar -jcf $(CONFIGFILE) auto/ config/ configure; \
+ sudo mv binary.list $(LISTFILE); \
+ sudo mv binary.packages $(PKGSFILE); \
+ sudo mv binary-tar.tar.gz $(TARGZFILE); \
+ md5sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(MD5SUMSFILE); \
+ sha1sum $(LOGFILE) $(CONFIGFILE) $(LISTFILE) $(PKGSFILE) $(TARGZFILE) > $(SHA1SUMSFILE); \
+ fi
+
+clean:
+ sudo lb clean --purge
+ rm -f $(IMAGEPREFIX).*
diff --git a/quantal-armhf-ubuntu-desktop/README b/quantal-armhf-ubuntu-desktop/README
new file mode 100644
index 0000000..917e1f3
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/README
@@ -0,0 +1,16 @@
+* To build binary image:
+ * install live-build qemu-user-static
+ * run configure
+ * run make
+
+* Scripts:
+ * configure
+ * Makefile
+
+* Configuration Layout
+
+`-- ./config
+
+* Customization Layout
+
+`-- ./customization
diff --git a/quantal-armhf-ubuntu-desktop/configure b/quantal-armhf-ubuntu-desktop/configure
new file mode 100755
index 0000000..957861f
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/configure
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# (C) 2012 Fathi Boudra <fathi.boudra@linaro.org>
+
+# Create configuration for live-build.
+
+# You need live-build package installed.
+
+set -e
+
+echo "I: create configuration"
+export LB_BOOTSTRAP_INCLUDE="apt-transport-https gnupg"
+lb config \
+ --apt-indices none \
+ --architectures armhf \
+ --archive-areas 'main universe' \
+ --binary-filesystem ext4 \
+ --binary-images tar \
+ --bootstrap-flavour standard \
+ --bootstrap-qemu-arch armhf \
+ --bootstrap-qemu-static /usr/bin/qemu-arm-static \
+ --cache false \
+ --chroot-filesystem none \
+ --distribution precise \
+ --gzip-options '-9 --rsyncable' \
+ --hostname linaro-ubuntu-desktop \
+ --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \
+ --iso-volume 'Linaro precise $(date +%Y%m%d-%H:%M)' \
+ --linux-flavours none \
+ --linux-packages none \
+ --mode ubuntu \
+ --security true \
+ --system normal \
+ --username linaro \
+ --volatile true
+
+echo "I: copy customization"
+cp -rf customization/* config/
+
+echo "I: done"
diff --git a/quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.key.chroot b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.key.chroot
new file mode 100644
index 0000000..0966316
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.key.chroot
@@ -0,0 +1,12 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: SKS 1.0.10
+
+mI0ETA9rYAEEAM3qPwNzaXsRRyNARLCAEVl7BCte8isURYwLxMgvMlR7RmLip81ox0o4d61E
+Q5uuT5LWEp2/f2xvw2Pn+7uOKbpL0JLyscD7PntrJnZay8vitDXWMUAyQTMltyjfKQ3N3Zrb
+B424lJYL4r04fjFagN5R4+LFaIzO6P71bwk6rj1dABEBAAG0HExhdW5jaHBhZCBMaW5hcm8g
+T3ZlcmxheSBQUEGItgQTAQIAIAUCTA9rYAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ
+EPH8usp74fl7+1gD/j9IaY1wCG8RrgYUTVnh8erd3ooHCzN+hlgjgDo0MLYv5DPes8VSgFOC
+j1TLPGwrqSikdGAKpMu7vhJSPEkYC7Y+DGkS6Vuap8O3olnZfc4BPfSF1XI18KLv0GeBiEOq
+xiQvTnlfgEyu21LjFMtAjh6qfbRvJonqvqEbK/7QrvNI
+=sAtw
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.list.chroot b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.list.chroot
new file mode 100644
index 0000000..5eedd6a
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.list.chroot
@@ -0,0 +1,3 @@
+# Linaro Overlay PPA
+deb http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu @DISTRIBUTION@ main
+deb-src http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu @DISTRIBUTION@ main
diff --git a/quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.key.chroot b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.key.chroot
new file mode 100644
index 0000000..0966316
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.key.chroot
@@ -0,0 +1,12 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: SKS 1.0.10
+
+mI0ETA9rYAEEAM3qPwNzaXsRRyNARLCAEVl7BCte8isURYwLxMgvMlR7RmLip81ox0o4d61E
+Q5uuT5LWEp2/f2xvw2Pn+7uOKbpL0JLyscD7PntrJnZay8vitDXWMUAyQTMltyjfKQ3N3Zrb
+B424lJYL4r04fjFagN5R4+LFaIzO6P71bwk6rj1dABEBAAG0HExhdW5jaHBhZCBMaW5hcm8g
+T3ZlcmxheSBQUEGItgQTAQIAIAUCTA9rYAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ
+EPH8usp74fl7+1gD/j9IaY1wCG8RrgYUTVnh8erd3ooHCzN+hlgjgDo0MLYv5DPes8VSgFOC
+j1TLPGwrqSikdGAKpMu7vhJSPEkYC7Y+DGkS6Vuap8O3olnZfc4BPfSF1XI18KLv0GeBiEOq
+xiQvTnlfgEyu21LjFMtAjh6qfbRvJonqvqEbK/7QrvNI
+=sAtw
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.list.chroot b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.list.chroot
new file mode 100644
index 0000000..5eae115
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.list.chroot
@@ -0,0 +1,3 @@
+# Linaro Tools PPA
+deb http://ppa.launchpad.net/linaro-maintainers/tools/ubuntu @DISTRIBUTION@ main
+deb-src http://ppa.launchpad.net/linaro-maintainers/tools/ubuntu @DISTRIBUTION@ main
diff --git a/quantal-armhf-ubuntu-desktop/customization/hooks/01-setup_user_linaro.chroot b/quantal-armhf-ubuntu-desktop/customization/hooks/01-setup_user_linaro.chroot
new file mode 100755
index 0000000..9c65f97
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/hooks/01-setup_user_linaro.chroot
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+echo "I: create linaro user"
+adduser --gecos linaro --disabled-login linaro
+
+echo "I: set linaro user password"
+echo "linaro:linaro" | chpasswd
diff --git a/quantal-armhf-ubuntu-desktop/customization/hooks/02-add_linaro_to_groups.chroot b/quantal-armhf-ubuntu-desktop/customization/hooks/02-add_linaro_to_groups.chroot
new file mode 100755
index 0000000..f3b2d4e
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/hooks/02-add_linaro_to_groups.chroot
@@ -0,0 +1,63 @@
+#!/bin/sh -x
+
+DEFGROUPS="admin,adm,dialout,cdrom,plugdev,audio,dip,video"
+
+/bin/egrep -i "^admin" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User admin exists in /etc/group"
+else
+ echo "User admin does not exists in /etc/group must create"
+ groupadd admin
+fi
+/bin/egrep -i "^dialout" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User dialout exists in /etc/group"
+else
+ echo "User dialout does not exists in /etc/group must create"
+ groupadd dialout
+fi
+/bin/egrep -i "^cdrom" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User cdrom exists in /etc/group"
+else
+ echo "User cdrom does not exists in /etc/group must create"
+ groupadd cdrom
+fi
+/bin/egrep -i "^plugdev" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User plugdev exists in /etc/group"
+else
+ echo "User plugdev does not exists in /etc/group must create"
+ groupadd plugdev
+fi
+/bin/egrep -i "^audio" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User audio exists in /etc/group"
+else
+ echo "User audio does not exists in /etc/group must create"
+ groupadd audio
+fi
+/bin/egrep -i "^dip" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User dip exists in /etc/group"
+else
+ echo "User dip does not exists in /etc/group must create"
+ groupadd dip
+fi
+/bin/egrep -i "^video" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User video exists in /etc/group"
+else
+ echo "User video does not exists in /etc/group must create"
+ groupadd video
+fi
+/bin/egrep -i "^adm" /etc/group
+if [ $? -eq 0 ]; then
+ echo "User adm exists in /etc/group"
+else
+ echo "User adm does not exists in /etc/group must create"
+ groupadd adm
+fi
+
+echo "I: add linaro to ($DEFGROUPS) groups"
+usermod -a -G ${DEFGROUPS} linaro
diff --git a/quantal-armhf-ubuntu-desktop/customization/hooks/03-check_sudoers_for_admin.chroot b/quantal-armhf-ubuntu-desktop/customization/hooks/03-check_sudoers_for_admin.chroot
new file mode 100755
index 0000000..5c82429
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/hooks/03-check_sudoers_for_admin.chroot
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# check to make sure sudoers file has ref for admin
+ADMINEXISTS="$(awk '$1 == "%admin" { print $1 }' /etc/sudoers)"
+if [ -z "$ADMINEXISTS" ]; then
+ # append admin entry to sudoers
+ echo "# Members of the admin group may gain root privileges" >> /etc/sudoers
+ echo "%admin ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
+fi
+
+# make sure that NOPASSWD is set for %admin
+# expecially in the case that we didn't add it to /etc/sudoers
+# just blow the %admin line away and force it to be NOPASSWD
+sed -i -e '
+/\%admin/ c \
+%admin ALL = (ALL) NOPASSWD: ALL
+' /etc/sudoers
diff --git a/quantal-armhf-ubuntu-desktop/customization/hooks/04-lava_test.chroot b/quantal-armhf-ubuntu-desktop/customization/hooks/04-lava_test.chroot
new file mode 100755
index 0000000..42e8986
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/hooks/04-lava_test.chroot
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+echo "I: run apt-get update"
+apt-get update
+
+echo "I: install extra package"
+apt-get install --yes bzr lava-test
+
+echo "I: install tests"
+ubuntu_tests=(pwrmgmt gatortests perf wifi-enablement e2eaudiotest bluetooth-enablement leb-basic-graphics)
+for ubuntu_test in ${ubuntu_tests[@]}; do
+ lava-test install ${ubuntu_test}
+done \ No newline at end of file
diff --git a/quantal-armhf-ubuntu-desktop/customization/hooks/05-set_sudo_mode.chroot b/quantal-armhf-ubuntu-desktop/customization/hooks/05-set_sudo_mode.chroot
new file mode 100755
index 0000000..ee02901
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/hooks/05-set_sudo_mode.chroot
@@ -0,0 +1,3 @@
+#!/bin/sh -x
+
+gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/gksu/sudo-mode true
diff --git a/quantal-armhf-ubuntu-desktop/customization/hooks/20-extract_initrd_uuid.binary b/quantal-armhf-ubuntu-desktop/customization/hooks/20-extract_initrd_uuid.binary
new file mode 100755
index 0000000..fee2b1b
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/hooks/20-extract_initrd_uuid.binary
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+mkdir -p uuid
+cd uuid
+
+prefix=
+
+if ls ../binary/casper/initrd.img-* 2>&1 > /dev/null; then
+ prefix=../binary/boot/filesystem.dir/casper/
+else
+ prefix=../binary/boot/filesystem.dir/boot/
+fi
+
+UUID=`uuidgen -r`
+
+for initrd in `ls $prefix/initrd.img-*`; do
+ zcat $initrd | cpio --quiet -id
+ echo $UUID > conf/uuid.conf
+ find . | cpio --quiet --dereference -o -H newc | gzip > $initrd
+ rm -rf *
+done
+
+echo "I: setting rootfs UUID $UUID in initrd... copying to '.disk/casper-uuid'."
+if [ ! -d ../binary/boot/filesystem.dir/.disk ]; then
+ mkdir -p ../binary/boot/filesystem.dir/.disk
+fi
+echo $UUID > ../binary/boot/filesystem.dir/.disk/casper-uuid
+cd ..
+rm -rf uuid
diff --git a/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/default/locale b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/default/locale
new file mode 100644
index 0000000..f9c983c
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/default/locale
@@ -0,0 +1 @@
+LANG=C.UTF-8
diff --git a/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hostname b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hostname
new file mode 100644
index 0000000..e78067c
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hostname
@@ -0,0 +1 @@
+linaro-ubuntu-desktop
diff --git a/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hosts b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hosts
new file mode 100644
index 0000000..7d1b0f2
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/hosts
@@ -0,0 +1,7 @@
+127.0.0.1 localhost
+::1 localhost ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+127.0.1.1 linaro-ubuntu-desktop
diff --git a/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/lightdm/lightdm.conf b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/lightdm/lightdm.conf
new file mode 100644
index 0000000..7044832
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/includes/precise/common/boot/filesystem.dir/etc/lightdm/lightdm.conf
@@ -0,0 +1,5 @@
+
+[SeatDefaults]
+greeter-session=unity-greeter
+user-session=ubuntu-2d
+autologin-user=linaro
diff --git a/quantal-armhf-ubuntu-desktop/customization/package-lists/linaro-ubuntu-desktop.list.chroot b/quantal-armhf-ubuntu-desktop/customization/package-lists/linaro-ubuntu-desktop.list.chroot
new file mode 100644
index 0000000..2d5c653
--- /dev/null
+++ b/quantal-armhf-ubuntu-desktop/customization/package-lists/linaro-ubuntu-desktop.list.chroot
@@ -0,0 +1,3 @@
+# Packages needed for Linaro - Ubuntu Desktop
+linaro-overlay-minimal
+linaro-ubuntu-desktop