diff options
99 files changed, 1762 insertions, 0 deletions
diff --git a/raring-armhf-alip/Makefile b/raring-armhf-alip/Makefile new file mode 100755 index 0000000..fb44bea --- /dev/null +++ b/raring-armhf-alip/Makefile @@ -0,0 +1,32 @@ +#!/bin/sh + +# (C) 2012-2013 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-raring-alip-`date +%Y%m%d`-$(BUILD_NUMBER) +LOGFILE=$(IMAGEPREFIX).build-log.txt +CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2 +LISTFILE=$(IMAGEPREFIX).contents +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.contents $(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/raring-armhf-alip/README b/raring-armhf-alip/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/raring-armhf-alip/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/raring-armhf-alip/configure b/raring-armhf-alip/configure new file mode 100755 index 0000000..61506cf --- /dev/null +++ b/raring-armhf-alip/configure @@ -0,0 +1,42 @@ +#!/bin/sh + +# (C) 2012-2013 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 \ + --apt-secure false \ + --architectures armhf \ + --archive-areas 'main universe' \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-alip username=linaro" \ + --bootstrap-qemu-arch armhf \ + --bootstrap-qemu-static /usr/bin/qemu-arm-static \ + --cache false \ + --chroot-filesystem none \ + --compression gzip \ + --distribution raring \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro raring $(date +%Y%m%d-%H:%M)' \ + --linux-flavours none \ + --linux-packages none \ + --mirror-bootstrap "http://localhost/~ubuntu/raring" \ + --mode ubuntu \ + --security false \ + --system normal \ + --updates false \ + --apt-recommends false + +echo "I: copy customization" +cp -rf customization/* config/ + +echo "I: done" diff --git a/raring-armhf-alip/customization/archives/linaro-overlay-ppa.key.chroot b/raring-armhf-alip/customization/archives/linaro-overlay-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-armhf-alip/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/raring-armhf-alip/customization/archives/linaro-overlay-ppa.list.chroot b/raring-armhf-alip/customization/archives/linaro-overlay-ppa.list.chroot new file mode 100644 index 0000000..6de2340 --- /dev/null +++ b/raring-armhf-alip/customization/archives/linaro-overlay-ppa.list.chroot @@ -0,0 +1,3 @@ +# Linaro Overlay PPA +deb http://repo.linaro.org/ubuntu/linaro-overlay @DISTRIBUTION@ main +deb-src http://repo.linaro.net/ubuntu/linaro-overlay @DISTRIBUTION@ main diff --git a/raring-armhf-alip/customization/hooks/01-setup_user_linaro.chroot b/raring-armhf-alip/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/raring-armhf-alip/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/raring-armhf-alip/customization/hooks/02-add_linaro_to_groups.chroot b/raring-armhf-alip/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..f3b2d4e --- /dev/null +++ b/raring-armhf-alip/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/raring-armhf-alip/customization/hooks/03-check_sudoers_for_admin.chroot b/raring-armhf-alip/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..5c82429 --- /dev/null +++ b/raring-armhf-alip/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/raring-armhf-alip/customization/hooks/05-set_sudo_mode.chroot b/raring-armhf-alip/customization/hooks/05-set_sudo_mode.chroot new file mode 100755 index 0000000..ee02901 --- /dev/null +++ b/raring-armhf-alip/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/raring-armhf-alip/customization/hooks/20-extract_initrd_uuid.binary b/raring-armhf-alip/customization/hooks/20-extract_initrd_uuid.binary new file mode 100755 index 0000000..fee2b1b --- /dev/null +++ b/raring-armhf-alip/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/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/default/apport b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/default/apport new file mode 100644 index 0000000..eddc830 --- /dev/null +++ b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/default/apport @@ -0,0 +1,4 @@ +# set this to 0 to disable apport, or to 1 to enable it +# you can temporarily override this with +# sudo service apport start force_start=1 +enabled=0 diff --git a/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/hostname b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/hostname new file mode 100644 index 0000000..b18833f --- /dev/null +++ b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/hostname @@ -0,0 +1 @@ +linaro-alip diff --git a/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/hosts b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/hosts new file mode 100644 index 0000000..7dcb363 --- /dev/null +++ b/raring-armhf-alip/customization/includes/raring/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-alip diff --git a/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/lightdm/lightdm.conf b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/lightdm/lightdm.conf new file mode 100644 index 0000000..9d37518 --- /dev/null +++ b/raring-armhf-alip/customization/includes/raring/common/boot/filesystem.dir/etc/lightdm/lightdm.conf @@ -0,0 +1,5 @@ + +[SeatDefaults] +greeter-session=lightdm-gtk-greeter +user-session=Lubuntu +autologin-user=linaro diff --git a/raring-armhf-alip/customization/package-lists/linaro-alip.list.chroot b/raring-armhf-alip/customization/package-lists/linaro-alip.list.chroot new file mode 100644 index 0000000..90cad95 --- /dev/null +++ b/raring-armhf-alip/customization/package-lists/linaro-alip.list.chroot @@ -0,0 +1,4 @@ +# Packages needed for Linaro - ALIP +linaro-alip +linaro-overlay-minimal +ubuntu-wallpapers diff --git a/raring-armhf-developer/Makefile b/raring-armhf-developer/Makefile new file mode 100755 index 0000000..1a31c15 --- /dev/null +++ b/raring-armhf-developer/Makefile @@ -0,0 +1,32 @@ +#!/bin/sh + +# (C) 2012-2013 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-raring-developer-`date +%Y%m%d`-$(BUILD_NUMBER) +LOGFILE=$(IMAGEPREFIX).build-log.txt +CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2 +LISTFILE=$(IMAGEPREFIX).contents +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.contents $(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/raring-armhf-developer/README b/raring-armhf-developer/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/configure b/raring-armhf-developer/configure new file mode 100755 index 0000000..ddb04bd --- /dev/null +++ b/raring-armhf-developer/configure @@ -0,0 +1,42 @@ +#!/bin/sh + +# (C) 2012-2013 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 \ + --apt-secure false \ + --architectures armhf \ + --archive-areas 'main universe' \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-developer username=linaro" \ + --bootstrap-qemu-arch armhf \ + --bootstrap-qemu-static /usr/bin/qemu-arm-static \ + --cache false \ + --chroot-filesystem none \ + --compression gzip \ + --debootstrap-options "--variant=minbase" \ + --distribution raring \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro raring $(date +%Y%m%d-%H:%M)' \ + --linux-flavours none \ + --linux-packages none \ + --mirror-bootstrap "http://localhost/~ubuntu/raring" \ + --mode ubuntu \ + --security false \ + --system normal \ + --updates false + +echo "I: copy customization" +cp -rf customization/* config/ + +echo "I: done" diff --git a/raring-armhf-developer/customization/archives/linaro-overlay-ppa.key.chroot b/raring-armhf-developer/customization/archives/linaro-overlay-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/archives/linaro-overlay-ppa.list.chroot b/raring-armhf-developer/customization/archives/linaro-overlay-ppa.list.chroot new file mode 100644 index 0000000..5eedd6a --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/archives/linaro-tools-ppa.key.chroot b/raring-armhf-developer/customization/archives/linaro-tools-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/archives/linaro-tools-ppa.list.chroot b/raring-armhf-developer/customization/archives/linaro-tools-ppa.list.chroot new file mode 100644 index 0000000..5eae115 --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/hooks/01-setup_user_linaro.chroot b/raring-armhf-developer/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/hooks/02-add_linaro_to_groups.chroot b/raring-armhf-developer/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..f3b2d4e --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/hooks/03-check_sudoers_for_admin.chroot b/raring-armhf-developer/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..5c82429 --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/hooks/04-lava_test.chroot b/raring-armhf-developer/customization/hooks/04-lava_test.chroot new file mode 100755 index 0000000..f4ad3a0 --- /dev/null +++ b/raring-armhf-developer/customization/hooks/04-lava_test.chroot @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "I: run apt-get update" +apt-get update + +echo "I: install extra package" +apt-get install --yes build-essential bzr gatortests git linux-libc-dev linux-tools stress-dbgsym +#apt-get install --yes lava-test + +echo "I: install tests" +nano_tests=(pwrmgmt gatortests perf device-tree) +for nano_test in ${nano_tests[@]}; do + echo "lava-test install ${nano_test}" +done diff --git a/raring-armhf-developer/customization/hooks/20-extract_initrd_uuid.binary b/raring-armhf-developer/customization/hooks/20-extract_initrd_uuid.binary new file mode 100755 index 0000000..fee2b1b --- /dev/null +++ b/raring-armhf-developer/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/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale b/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/hostname b/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/hostname new file mode 100644 index 0000000..bafc623 --- /dev/null +++ b/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/hostname @@ -0,0 +1 @@ +linaro-developer diff --git a/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/hosts b/raring-armhf-developer/customization/includes/raring/common/boot/filesystem.dir/etc/hosts new file mode 100644 index 0000000..135dd9d --- /dev/null +++ b/raring-armhf-developer/customization/includes/raring/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-developer diff --git a/raring-armhf-developer/customization/package-lists/linaro-developer.list.chroot b/raring-armhf-developer/customization/package-lists/linaro-developer.list.chroot new file mode 100644 index 0000000..75e4fe8 --- /dev/null +++ b/raring-armhf-developer/customization/package-lists/linaro-developer.list.chroot @@ -0,0 +1,3 @@ +# Packages needed for Linaro - Developer +linaro-development +linaro-overlay-minimal diff --git a/raring-armhf-nano-lava/Makefile b/raring-armhf-nano-lava/Makefile new file mode 100755 index 0000000..9df3275 --- /dev/null +++ b/raring-armhf-nano-lava/Makefile @@ -0,0 +1,32 @@ +#!/bin/sh + +# (C) 2012-2013 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-raring-nano-lava-`date +%Y%m%d`-$(BUILD_NUMBER) +LOGFILE=$(IMAGEPREFIX).build-log.txt +CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2 +LISTFILE=$(IMAGEPREFIX).contents +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.contents $(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/raring-armhf-nano-lava/README b/raring-armhf-nano-lava/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/configure b/raring-armhf-nano-lava/configure new file mode 100755 index 0000000..55ca53e --- /dev/null +++ b/raring-armhf-nano-lava/configure @@ -0,0 +1,42 @@ +#!/bin/sh + +# (C) 2012-2013 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 \ + --apt-secure false \ + --architectures armhf \ + --archive-areas 'main universe' \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-nano username=linaro" \ + --bootstrap-qemu-arch armhf \ + --bootstrap-qemu-static /usr/bin/qemu-arm-static \ + --cache false \ + --chroot-filesystem none \ + --compression gzip \ + --debootstrap-options "--variant=minbase" \ + --distribution raring \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro raring $(date +%Y%m%d-%H:%M)' \ + --linux-flavours none \ + --linux-packages none \ + --mirror-bootstrap "http://localhost/~ubuntu/raring" \ + --mode ubuntu \ + --security false \ + --system normal \ + --updates false + +echo "I: copy customization" +cp -rf customization/* config/ + +echo "I: done" diff --git a/raring-armhf-nano-lava/customization/archives/linaro-overlay-ppa.key.chroot b/raring-armhf-nano-lava/customization/archives/linaro-overlay-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/archives/linaro-overlay-ppa.list.chroot b/raring-armhf-nano-lava/customization/archives/linaro-overlay-ppa.list.chroot new file mode 100644 index 0000000..5eedd6a --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/archives/linaro-tools-ppa.key.chroot b/raring-armhf-nano-lava/customization/archives/linaro-tools-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/archives/linaro-tools-ppa.list.chroot b/raring-armhf-nano-lava/customization/archives/linaro-tools-ppa.list.chroot new file mode 100644 index 0000000..5eae115 --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/hooks/01-setup_user_linaro.chroot b/raring-armhf-nano-lava/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/hooks/02-add_linaro_to_groups.chroot b/raring-armhf-nano-lava/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..f3b2d4e --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/hooks/03-check_sudoers_for_admin.chroot b/raring-armhf-nano-lava/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..5c82429 --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/hooks/04-lava_test.chroot b/raring-armhf-nano-lava/customization/hooks/04-lava_test.chroot new file mode 100755 index 0000000..f4ad3a0 --- /dev/null +++ b/raring-armhf-nano-lava/customization/hooks/04-lava_test.chroot @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "I: run apt-get update" +apt-get update + +echo "I: install extra package" +apt-get install --yes build-essential bzr gatortests git linux-libc-dev linux-tools stress-dbgsym +#apt-get install --yes lava-test + +echo "I: install tests" +nano_tests=(pwrmgmt gatortests perf device-tree) +for nano_test in ${nano_tests[@]}; do + echo "lava-test install ${nano_test}" +done diff --git a/raring-armhf-nano-lava/customization/hooks/20-extract_initrd_uuid.binary b/raring-armhf-nano-lava/customization/hooks/20-extract_initrd_uuid.binary new file mode 100755 index 0000000..fee2b1b --- /dev/null +++ b/raring-armhf-nano-lava/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/raring-armhf-nano-lava/customization/hooks/51-remove_usr_share_parts.binary b/raring-armhf-nano-lava/customization/hooks/51-remove_usr_share_parts.binary new file mode 100755 index 0000000..658445a --- /dev/null +++ b/raring-armhf-nano-lava/customization/hooks/51-remove_usr_share_parts.binary @@ -0,0 +1,105 @@ +#!/bin/sh + +cd binary/boot/filesystem.dir + +echo "I: rm /usr/share/man" +rm -rf ./usr/share/man/* +# xkb +echo "I: rm /usr/share/X11" +rm -rf ./usr/share/X11 + +echo "I: rm /usr/share/xul-ext" +rm -rf ./usr/share/xul-ext + +echo "I: slim /usr/share/i18n" +rm -rf ./usr/share/i18n/locales/a* +rm -rf ./usr/share/i18n/locales/b* +rm -rf ./usr/share/i18n/locales/c* +rm -rf ./usr/share/i18n/locales/d* +rm -rf ./usr/share/i18n/locales/es* +rm -rf ./usr/share/i18n/locales/f* +rm -rf ./usr/share/i18n/locales/g* +rm -rf ./usr/share/i18n/locales/h* +rm -rf ./usr/share/i18n/locales/j* +rm -rf ./usr/share/i18n/locales/k* +rm -rf ./usr/share/i18n/locales/l* +rm -rf ./usr/share/i18n/locales/n* +rm -rf ./usr/share/i18n/locales/m* +rm -rf ./usr/share/i18n/locales/o* +rm -rf ./usr/share/i18n/locales/p* +rm -rf ./usr/share/i18n/locales/r* +rm -rf ./usr/share/i18n/locales/s* +rm -rf ./usr/share/i18n/locales/t* +rm -rf ./usr/share/i18n/locales/u* +rm -rf ./usr/share/i18n/locales/v* +rm -rf ./usr/share/i18n/locales/w* +rm -rf ./usr/share/i18n/locales/y* +rm -rf ./usr/share/i18n/locales/z* +rm -rf ./usr/share/i18n/locales/el* +rm -rf ./usr/share/i18n/locales/eo* +rm -rf ./usr/share/i18n/locales/et* +rm -rf ./usr/share/i18n/locales/it* +rm -rf ./usr/share/i18n/locales/iu* +rm -rf ./usr/share/i18n/locales/iw* + + +echo "I: pair down zoneinfo to just UTC" +rm -rf ./usr/share/zoneinfo/A* +rm -rf ./usr/share/zoneinfo/B* +rm -rf ./usr/share/zoneinfo/C* +rm -rf ./usr/share/zoneinfo/E* +rm -rf ./usr/share/zoneinfo/F* +rm -rf ./usr/share/zoneinfo/H* +rm -rf ./usr/share/zoneinfo/I* +rm -rf ./usr/share/zoneinfo/J* +rm -rf ./usr/share/zoneinfo/K* +rm -rf ./usr/share/zoneinfo/L* +rm -rf ./usr/share/zoneinfo/M* +rm -rf ./usr/share/zoneinfo/N* +rm -rf ./usr/share/zoneinfo/P* +rm -rf ./usr/share/zoneinfo/r* +rm -rf ./usr/share/zoneinfo/R* +rm -rf ./usr/share/zoneinfo/Singapore +rm -rf ./usr/share/zoneinfo/T* +rm -rf ./usr/share/zoneinfo/US +rm -rf ./usr/share/zoneinfo/W* +rm -rf ./usr/share/zoneinfo/Z* + +echo "I: pair down /usr/share/locale" +rm -rf ./usr/share/locale/a* +rm -rf ./usr/share/locale/b* +rm -rf ./usr/share/locale/c* +rm -rf ./usr/share/locale/d* +rm -rf ./usr/share/locale/e* +rm -rf ./usr/share/locale/f* +rm -rf ./usr/share/locale/g* +rm -rf ./usr/share/locale/h* +rm -rf ./usr/share/locale/i* +rm -rf ./usr/share/locale/j* +rm -rf ./usr/share/locale/k* +rm -rf ./usr/share/locale/lt +rm -rf ./usr/share/locale/m* +rm -rf ./usr/share/locale/n* +rm -rf ./usr/share/locale/p* +rm -rf ./usr/share/locale/r* +rm -rf ./usr/share/locale/s* +rm -rf ./usr/share/locale/t* +rm -rf ./usr/share/locale/u* +rm -rf ./usr/share/locale/z* + +echo "I: remove /usr/share/info" +rm -rf ./usr/share/info + +echo "I: pair down /usr/share/i18n/charmaps" +rm -rf ./usr/share/i18n/charmaps/W* +rm -rf ./usr/share/i18n/charmaps/V* +rm -rf ./usr/share/i18n/charmaps/T* +rm -rf ./usr/share/i18n/charmaps/S* +rm -rf ./usr/share/i18n/charmaps/R* +rm -rf ./usr/share/i18n/charmaps/P* +rm -rf ./usr/share/i18n/charmaps/L* +rm -rf ./usr/share/i18n/charmaps/K* +rm -rf ./usr/share/i18n/charmaps/J* +rm -rf ./usr/share/i18n/charmaps/E* +rm -rf ./usr/share/i18n/charmaps/H* +rm -rf ./usr/share/i18n/charmaps/B* diff --git a/raring-armhf-nano-lava/customization/hooks/52-remove_etc_parts.binary b/raring-armhf-nano-lava/customization/hooks/52-remove_etc_parts.binary new file mode 100755 index 0000000..db8a547 --- /dev/null +++ b/raring-armhf-nano-lava/customization/hooks/52-remove_etc_parts.binary @@ -0,0 +1,7 @@ +#!/bin/sh + +cd binary/boot/filesystem.dir + +echo "I: rm /etc/X11 and /etc/firefox" +rm -rf ./etc/X11 +rm -rf ./etc/firefox diff --git a/raring-armhf-nano-lava/customization/hooks/53-remove_var_lib_parts.binary b/raring-armhf-nano-lava/customization/hooks/53-remove_var_lib_parts.binary new file mode 100755 index 0000000..e4105d1 --- /dev/null +++ b/raring-armhf-nano-lava/customization/hooks/53-remove_var_lib_parts.binary @@ -0,0 +1,15 @@ +#!/bin/sh + +cd binary/boot/filesystem.dir + +echo "I:commented out such that dpkg and apt will work for NOW" +echo "I: rm /var/lib/dpkg" +#rm -rf ./var/lib/dpkg +echo "I: rm /var/lib/apt" +rm -f ./var/lib/apt/lists/*Packages +rm -f ./var/lib/apt/lists/*Sources +rm -f ./var/lib/apt/lists/*Release +rm -f ./var/lib/apt/lists/*Release.gpg +echo "I: rm /var/cache/apt" +rm -f ./var/cache/apt/pkgcache.bin +rm -f ./var/cache/apt/srcpkgcache.bin diff --git a/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale b/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/hostname b/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/hostname new file mode 100644 index 0000000..1d1dfdb --- /dev/null +++ b/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/hostname @@ -0,0 +1 @@ +linaro-nano diff --git a/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/hosts b/raring-armhf-nano-lava/customization/includes/raring/common/boot/filesystem.dir/etc/hosts new file mode 100644 index 0000000..5c520b5 --- /dev/null +++ b/raring-armhf-nano-lava/customization/includes/raring/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-nano diff --git a/raring-armhf-nano-lava/customization/package-lists/linaro-nano.list.chroot b/raring-armhf-nano-lava/customization/package-lists/linaro-nano.list.chroot new file mode 100644 index 0000000..f39df99 --- /dev/null +++ b/raring-armhf-nano-lava/customization/package-lists/linaro-nano.list.chroot @@ -0,0 +1,2 @@ +# Packages needed for Linaro - Nano +linaro-nano diff --git a/raring-armhf-nano/Makefile b/raring-armhf-nano/Makefile new file mode 100755 index 0000000..3b01207 --- /dev/null +++ b/raring-armhf-nano/Makefile @@ -0,0 +1,32 @@ +#!/bin/sh + +# (C) 2012-2013 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-raring-nano-`date +%Y%m%d`-$(BUILD_NUMBER) +LOGFILE=$(IMAGEPREFIX).build-log.txt +CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2 +LISTFILE=$(IMAGEPREFIX).contents +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.contents $(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/raring-armhf-nano/README b/raring-armhf-nano/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/raring-armhf-nano/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/raring-armhf-nano/configure b/raring-armhf-nano/configure new file mode 100755 index 0000000..55ca53e --- /dev/null +++ b/raring-armhf-nano/configure @@ -0,0 +1,42 @@ +#!/bin/sh + +# (C) 2012-2013 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 \ + --apt-secure false \ + --architectures armhf \ + --archive-areas 'main universe' \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-nano username=linaro" \ + --bootstrap-qemu-arch armhf \ + --bootstrap-qemu-static /usr/bin/qemu-arm-static \ + --cache false \ + --chroot-filesystem none \ + --compression gzip \ + --debootstrap-options "--variant=minbase" \ + --distribution raring \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro raring $(date +%Y%m%d-%H:%M)' \ + --linux-flavours none \ + --linux-packages none \ + --mirror-bootstrap "http://localhost/~ubuntu/raring" \ + --mode ubuntu \ + --security false \ + --system normal \ + --updates false + +echo "I: copy customization" +cp -rf customization/* config/ + +echo "I: done" diff --git a/raring-armhf-nano/customization/archives/linaro-overlay-ppa.key.chroot b/raring-armhf-nano/customization/archives/linaro-overlay-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-armhf-nano/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/raring-armhf-nano/customization/archives/linaro-overlay-ppa.list.chroot b/raring-armhf-nano/customization/archives/linaro-overlay-ppa.list.chroot new file mode 100644 index 0000000..5eedd6a --- /dev/null +++ b/raring-armhf-nano/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/raring-armhf-nano/customization/hooks/01-setup_user_linaro.chroot b/raring-armhf-nano/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/raring-armhf-nano/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/raring-armhf-nano/customization/hooks/02-add_linaro_to_groups.chroot b/raring-armhf-nano/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..f3b2d4e --- /dev/null +++ b/raring-armhf-nano/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/raring-armhf-nano/customization/hooks/03-check_sudoers_for_admin.chroot b/raring-armhf-nano/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..5c82429 --- /dev/null +++ b/raring-armhf-nano/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/raring-armhf-nano/customization/hooks/20-extract_initrd_uuid.binary b/raring-armhf-nano/customization/hooks/20-extract_initrd_uuid.binary new file mode 100755 index 0000000..fee2b1b --- /dev/null +++ b/raring-armhf-nano/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/raring-armhf-nano/customization/hooks/51-remove_usr_share_parts.binary b/raring-armhf-nano/customization/hooks/51-remove_usr_share_parts.binary new file mode 100755 index 0000000..658445a --- /dev/null +++ b/raring-armhf-nano/customization/hooks/51-remove_usr_share_parts.binary @@ -0,0 +1,105 @@ +#!/bin/sh + +cd binary/boot/filesystem.dir + +echo "I: rm /usr/share/man" +rm -rf ./usr/share/man/* +# xkb +echo "I: rm /usr/share/X11" +rm -rf ./usr/share/X11 + +echo "I: rm /usr/share/xul-ext" +rm -rf ./usr/share/xul-ext + +echo "I: slim /usr/share/i18n" +rm -rf ./usr/share/i18n/locales/a* +rm -rf ./usr/share/i18n/locales/b* +rm -rf ./usr/share/i18n/locales/c* +rm -rf ./usr/share/i18n/locales/d* +rm -rf ./usr/share/i18n/locales/es* +rm -rf ./usr/share/i18n/locales/f* +rm -rf ./usr/share/i18n/locales/g* +rm -rf ./usr/share/i18n/locales/h* +rm -rf ./usr/share/i18n/locales/j* +rm -rf ./usr/share/i18n/locales/k* +rm -rf ./usr/share/i18n/locales/l* +rm -rf ./usr/share/i18n/locales/n* +rm -rf ./usr/share/i18n/locales/m* +rm -rf ./usr/share/i18n/locales/o* +rm -rf ./usr/share/i18n/locales/p* +rm -rf ./usr/share/i18n/locales/r* +rm -rf ./usr/share/i18n/locales/s* +rm -rf ./usr/share/i18n/locales/t* +rm -rf ./usr/share/i18n/locales/u* +rm -rf ./usr/share/i18n/locales/v* +rm -rf ./usr/share/i18n/locales/w* +rm -rf ./usr/share/i18n/locales/y* +rm -rf ./usr/share/i18n/locales/z* +rm -rf ./usr/share/i18n/locales/el* +rm -rf ./usr/share/i18n/locales/eo* +rm -rf ./usr/share/i18n/locales/et* +rm -rf ./usr/share/i18n/locales/it* +rm -rf ./usr/share/i18n/locales/iu* +rm -rf ./usr/share/i18n/locales/iw* + + +echo "I: pair down zoneinfo to just UTC" +rm -rf ./usr/share/zoneinfo/A* +rm -rf ./usr/share/zoneinfo/B* +rm -rf ./usr/share/zoneinfo/C* +rm -rf ./usr/share/zoneinfo/E* +rm -rf ./usr/share/zoneinfo/F* +rm -rf ./usr/share/zoneinfo/H* +rm -rf ./usr/share/zoneinfo/I* +rm -rf ./usr/share/zoneinfo/J* +rm -rf ./usr/share/zoneinfo/K* +rm -rf ./usr/share/zoneinfo/L* +rm -rf ./usr/share/zoneinfo/M* +rm -rf ./usr/share/zoneinfo/N* +rm -rf ./usr/share/zoneinfo/P* +rm -rf ./usr/share/zoneinfo/r* +rm -rf ./usr/share/zoneinfo/R* +rm -rf ./usr/share/zoneinfo/Singapore +rm -rf ./usr/share/zoneinfo/T* +rm -rf ./usr/share/zoneinfo/US +rm -rf ./usr/share/zoneinfo/W* +rm -rf ./usr/share/zoneinfo/Z* + +echo "I: pair down /usr/share/locale" +rm -rf ./usr/share/locale/a* +rm -rf ./usr/share/locale/b* +rm -rf ./usr/share/locale/c* +rm -rf ./usr/share/locale/d* +rm -rf ./usr/share/locale/e* +rm -rf ./usr/share/locale/f* +rm -rf ./usr/share/locale/g* +rm -rf ./usr/share/locale/h* +rm -rf ./usr/share/locale/i* +rm -rf ./usr/share/locale/j* +rm -rf ./usr/share/locale/k* +rm -rf ./usr/share/locale/lt +rm -rf ./usr/share/locale/m* +rm -rf ./usr/share/locale/n* +rm -rf ./usr/share/locale/p* +rm -rf ./usr/share/locale/r* +rm -rf ./usr/share/locale/s* +rm -rf ./usr/share/locale/t* +rm -rf ./usr/share/locale/u* +rm -rf ./usr/share/locale/z* + +echo "I: remove /usr/share/info" +rm -rf ./usr/share/info + +echo "I: pair down /usr/share/i18n/charmaps" +rm -rf ./usr/share/i18n/charmaps/W* +rm -rf ./usr/share/i18n/charmaps/V* +rm -rf ./usr/share/i18n/charmaps/T* +rm -rf ./usr/share/i18n/charmaps/S* +rm -rf ./usr/share/i18n/charmaps/R* +rm -rf ./usr/share/i18n/charmaps/P* +rm -rf ./usr/share/i18n/charmaps/L* +rm -rf ./usr/share/i18n/charmaps/K* +rm -rf ./usr/share/i18n/charmaps/J* +rm -rf ./usr/share/i18n/charmaps/E* +rm -rf ./usr/share/i18n/charmaps/H* +rm -rf ./usr/share/i18n/charmaps/B* diff --git a/raring-armhf-nano/customization/hooks/52-remove_etc_parts.binary b/raring-armhf-nano/customization/hooks/52-remove_etc_parts.binary new file mode 100755 index 0000000..db8a547 --- /dev/null +++ b/raring-armhf-nano/customization/hooks/52-remove_etc_parts.binary @@ -0,0 +1,7 @@ +#!/bin/sh + +cd binary/boot/filesystem.dir + +echo "I: rm /etc/X11 and /etc/firefox" +rm -rf ./etc/X11 +rm -rf ./etc/firefox diff --git a/raring-armhf-nano/customization/hooks/53-remove_var_lib_parts.binary b/raring-armhf-nano/customization/hooks/53-remove_var_lib_parts.binary new file mode 100755 index 0000000..e4105d1 --- /dev/null +++ b/raring-armhf-nano/customization/hooks/53-remove_var_lib_parts.binary @@ -0,0 +1,15 @@ +#!/bin/sh + +cd binary/boot/filesystem.dir + +echo "I:commented out such that dpkg and apt will work for NOW" +echo "I: rm /var/lib/dpkg" +#rm -rf ./var/lib/dpkg +echo "I: rm /var/lib/apt" +rm -f ./var/lib/apt/lists/*Packages +rm -f ./var/lib/apt/lists/*Sources +rm -f ./var/lib/apt/lists/*Release +rm -f ./var/lib/apt/lists/*Release.gpg +echo "I: rm /var/cache/apt" +rm -f ./var/cache/apt/pkgcache.bin +rm -f ./var/cache/apt/srcpkgcache.bin diff --git a/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale b/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/hostname b/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/hostname new file mode 100644 index 0000000..1d1dfdb --- /dev/null +++ b/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/hostname @@ -0,0 +1 @@ +linaro-nano diff --git a/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/hosts b/raring-armhf-nano/customization/includes/raring/common/boot/filesystem.dir/etc/hosts new file mode 100644 index 0000000..5c520b5 --- /dev/null +++ b/raring-armhf-nano/customization/includes/raring/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-nano diff --git a/raring-armhf-nano/customization/package-lists/linaro-nano.list.chroot b/raring-armhf-nano/customization/package-lists/linaro-nano.list.chroot new file mode 100644 index 0000000..f39df99 --- /dev/null +++ b/raring-armhf-nano/customization/package-lists/linaro-nano.list.chroot @@ -0,0 +1,2 @@ +# Packages needed for Linaro - Nano +linaro-nano diff --git a/raring-armhf-server/Makefile b/raring-armhf-server/Makefile new file mode 100755 index 0000000..256f704 --- /dev/null +++ b/raring-armhf-server/Makefile @@ -0,0 +1,32 @@ +#!/bin/sh + +# (C) 2012-2013 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-raring-server-`date +%Y%m%d`-$(BUILD_NUMBER) +LOGFILE=$(IMAGEPREFIX).build-log.txt +CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2 +LISTFILE=$(IMAGEPREFIX).contents +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.contents $(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/raring-armhf-server/README b/raring-armhf-server/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/raring-armhf-server/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/raring-armhf-server/configure b/raring-armhf-server/configure new file mode 100755 index 0000000..f6ee0f0 --- /dev/null +++ b/raring-armhf-server/configure @@ -0,0 +1,42 @@ +#!/bin/sh + +# (C) 2012-2013 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 \ + --apt-secure false \ + --architectures armhf \ + --archive-areas 'main universe' \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-server username=linaro" \ + --bootstrap-qemu-arch armhf \ + --bootstrap-qemu-static /usr/bin/qemu-arm-static \ + --cache false \ + --chroot-filesystem none \ + --compression gzip \ + --debootstrap-options "--variant=minbase" \ + --distribution raring \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro raring $(date +%Y%m%d-%H:%M)' \ + --linux-flavours none \ + --linux-packages none \ + --mirror-bootstrap "http://localhost/~ubuntu/raring" \ + --mode ubuntu \ + --security false \ + --system normal \ + --updates false + +echo "I: copy customization" +cp -rf customization/* config/ + +echo "I: done" diff --git a/raring-armhf-server/customization/archives/linaro-overlay-ppa.key.chroot b/raring-armhf-server/customization/archives/linaro-overlay-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-armhf-server/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/raring-armhf-server/customization/archives/linaro-overlay-ppa.list.chroot b/raring-armhf-server/customization/archives/linaro-overlay-ppa.list.chroot new file mode 100644 index 0000000..5eedd6a --- /dev/null +++ b/raring-armhf-server/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/raring-armhf-server/customization/hooks/01-setup_user_linaro.chroot b/raring-armhf-server/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/raring-armhf-server/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/raring-armhf-server/customization/hooks/02-add_linaro_to_groups.chroot b/raring-armhf-server/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..f3b2d4e --- /dev/null +++ b/raring-armhf-server/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/raring-armhf-server/customization/hooks/03-check_sudoers_for_admin.chroot b/raring-armhf-server/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..5c82429 --- /dev/null +++ b/raring-armhf-server/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/raring-armhf-server/customization/hooks/20-extract_initrd_uuid.binary b/raring-armhf-server/customization/hooks/20-extract_initrd_uuid.binary new file mode 100755 index 0000000..fee2b1b --- /dev/null +++ b/raring-armhf-server/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/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale b/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/hostname b/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/hostname new file mode 100644 index 0000000..9d4ad2a --- /dev/null +++ b/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/hostname @@ -0,0 +1 @@ +linaro-server diff --git a/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/hosts b/raring-armhf-server/customization/includes/raring/common/boot/filesystem.dir/etc/hosts new file mode 100644 index 0000000..d2b0602 --- /dev/null +++ b/raring-armhf-server/customization/includes/raring/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-server diff --git a/raring-armhf-server/customization/package-lists/linaro-server.list.chroot b/raring-armhf-server/customization/package-lists/linaro-server.list.chroot new file mode 100644 index 0000000..3028e00 --- /dev/null +++ b/raring-armhf-server/customization/package-lists/linaro-server.list.chroot @@ -0,0 +1,3 @@ +# Packages needed for Linaro - Server +linaro-lamp-server +linaro-overlay-minimal diff --git a/raring-armhf-ubuntu-desktop/Makefile b/raring-armhf-ubuntu-desktop/Makefile new file mode 100755 index 0000000..f138be8 --- /dev/null +++ b/raring-armhf-ubuntu-desktop/Makefile @@ -0,0 +1,32 @@ +#!/bin/sh + +# (C) 2012-2013 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-raring-ubuntu-desktop-`date +%Y%m%d`-$(BUILD_NUMBER) +LOGFILE=$(IMAGEPREFIX).build-log.txt +CONFIGFILE=$(IMAGEPREFIX).config.tar.bz2 +LISTFILE=$(IMAGEPREFIX).contents +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.contents $(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/raring-armhf-ubuntu-desktop/README b/raring-armhf-ubuntu-desktop/README new file mode 100644 index 0000000..917e1f3 --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/configure b/raring-armhf-ubuntu-desktop/configure new file mode 100755 index 0000000..648cb8f --- /dev/null +++ b/raring-armhf-ubuntu-desktop/configure @@ -0,0 +1,42 @@ +#!/bin/sh + +# (C) 2012-2013 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 \ + --apt-secure false \ + --architectures armhf \ + --archive-areas 'main universe' \ + --binary-filesystem ext4 \ + --binary-images tar \ + --bootappend-live "hostname=linaro-ubuntu-desktop username=linaro" \ + --bootstrap-flavour standard \ + --bootstrap-qemu-arch armhf \ + --bootstrap-qemu-static /usr/bin/qemu-arm-static \ + --cache false \ + --chroot-filesystem none \ + --compression gzip \ + --distribution raring \ + --gzip-options '-9 --rsyncable' \ + --iso-publisher 'Linaro; http://www.linaro.org/; linaro-dev@lists.linaro.org' \ + --iso-volume 'Linaro raring $(date +%Y%m%d-%H:%M)' \ + --linux-flavours none \ + --linux-packages none \ + --mirror-bootstrap "http://localhost/~ubuntu/raring" \ + --mode ubuntu \ + --security false \ + --system normal \ + --updates false + +echo "I: copy customization" +cp -rf customization/* config/ + +echo "I: done" diff --git a/raring-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.key.chroot b/raring-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.list.chroot b/raring-armhf-ubuntu-desktop/customization/archives/linaro-overlay-ppa.list.chroot new file mode 100644 index 0000000..5eedd6a --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.key.chroot b/raring-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.key.chroot new file mode 100644 index 0000000..0966316 --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.list.chroot b/raring-armhf-ubuntu-desktop/customization/archives/linaro-tools-ppa.list.chroot new file mode 100644 index 0000000..5eae115 --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/hooks/01-setup_user_linaro.chroot b/raring-armhf-ubuntu-desktop/customization/hooks/01-setup_user_linaro.chroot new file mode 100755 index 0000000..9c65f97 --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/hooks/02-add_linaro_to_groups.chroot b/raring-armhf-ubuntu-desktop/customization/hooks/02-add_linaro_to_groups.chroot new file mode 100755 index 0000000..f3b2d4e --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/hooks/03-check_sudoers_for_admin.chroot b/raring-armhf-ubuntu-desktop/customization/hooks/03-check_sudoers_for_admin.chroot new file mode 100755 index 0000000..5c82429 --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/hooks/04-lava_test.chroot b/raring-armhf-ubuntu-desktop/customization/hooks/04-lava_test.chroot new file mode 100755 index 0000000..f4ad3a0 --- /dev/null +++ b/raring-armhf-ubuntu-desktop/customization/hooks/04-lava_test.chroot @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "I: run apt-get update" +apt-get update + +echo "I: install extra package" +apt-get install --yes build-essential bzr gatortests git linux-libc-dev linux-tools stress-dbgsym +#apt-get install --yes lava-test + +echo "I: install tests" +nano_tests=(pwrmgmt gatortests perf device-tree) +for nano_test in ${nano_tests[@]}; do + echo "lava-test install ${nano_test}" +done diff --git a/raring-armhf-ubuntu-desktop/customization/hooks/05-set_sudo_mode.chroot b/raring-armhf-ubuntu-desktop/customization/hooks/05-set_sudo_mode.chroot new file mode 100755 index 0000000..ee02901 --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/hooks/20-extract_initrd_uuid.binary b/raring-armhf-ubuntu-desktop/customization/hooks/20-extract_initrd_uuid.binary new file mode 100755 index 0000000..fee2b1b --- /dev/null +++ b/raring-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/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/default/apport b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/default/apport new file mode 100644 index 0000000..eddc830 --- /dev/null +++ b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/default/apport @@ -0,0 +1,4 @@ +# set this to 0 to disable apport, or to 1 to enable it +# you can temporarily override this with +# sudo service apport start force_start=1 +enabled=0 diff --git a/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale new file mode 100644 index 0000000..f9c983c --- /dev/null +++ b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/default/locale @@ -0,0 +1 @@ +LANG=C.UTF-8 diff --git a/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/hostname b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/hostname new file mode 100644 index 0000000..e78067c --- /dev/null +++ b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/hostname @@ -0,0 +1 @@ +linaro-ubuntu-desktop diff --git a/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/hosts b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/hosts new file mode 100644 index 0000000..7d1b0f2 --- /dev/null +++ b/raring-armhf-ubuntu-desktop/customization/includes/raring/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/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/lightdm/lightdm.conf b/raring-armhf-ubuntu-desktop/customization/includes/raring/common/boot/filesystem.dir/etc/lightdm/lightdm.conf new file mode 100644 index 0000000..7044832 --- /dev/null +++ b/raring-armhf-ubuntu-desktop/customization/includes/raring/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/raring-armhf-ubuntu-desktop/customization/package-lists/linaro-ubuntu-desktop.list.chroot b/raring-armhf-ubuntu-desktop/customization/package-lists/linaro-ubuntu-desktop.list.chroot new file mode 100644 index 0000000..2d5c653 --- /dev/null +++ b/raring-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 |