mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-25 09:51:23 +00:00
Imported 2.592
No reason for CPC update specified.
This commit is contained in:
parent
3335e6bd8e
commit
e20120480d
29
debian/changelog
vendored
29
debian/changelog
vendored
@ -1,3 +1,32 @@
|
||||
livecd-rootfs (2.592) eoan; urgency=medium
|
||||
|
||||
* Drop trying to mount removed maas squashfs.
|
||||
* Stop overriding initramfs compression default to lzma. LP: #1831736
|
||||
* Do not force lzma on ubuntu-core builds, the compress format default
|
||||
should be set universally inside initramfs-tools-ubuntu-core package
|
||||
instead of getting duplicated multiple times all over the place.
|
||||
|
||||
-- Dimitri John Ledkov <xnox@ubuntu.com> Wed, 05 Jun 2019 13:55:06 +0100
|
||||
|
||||
livecd-rootfs (2.591) eoan; urgency=medium
|
||||
|
||||
* Fix typpo when dropping jasper.
|
||||
|
||||
-- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 04 Jun 2019 23:53:12 +0100
|
||||
|
||||
livecd-rootfs (2.590) eoan; urgency=medium
|
||||
|
||||
* Drop dead wubi subproject.
|
||||
* Drop dead jasper subproject.
|
||||
* Drop old arm platforms.
|
||||
* Drop ubuntu-desktop-next configs
|
||||
* Drop ubuntu-desktop-next hooks
|
||||
* Drop ubuntu-touch configs
|
||||
* Drop ubuntu-touch hooks
|
||||
* Drop ubuntu-rtm configs
|
||||
|
||||
-- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 04 Jun 2019 23:45:43 +0100
|
||||
|
||||
livecd-rootfs (2.589) eoan; urgency=medium
|
||||
|
||||
* Add support for the 'kassel' subflavor of UC18 images.
|
||||
|
7
debian/tests/default-bootstraps
vendored
7
debian/tests/default-bootstraps
vendored
@ -32,8 +32,6 @@ ALL_TRIPLETS="
|
||||
ubuntu-core:system-image:ubuntu-core
|
||||
ubuntu-cpc::ubuntu-cpc
|
||||
ubuntu-cpc:minimized:ubuntu-cpc
|
||||
ubuntu-desktop-next:system-image:ubuntu-desktop-next
|
||||
ubuntu-desktop-next::ubuntu-desktop-next
|
||||
ubuntu-dvd::
|
||||
ubuntu-gnome::
|
||||
ubuntukylin::
|
||||
@ -43,11 +41,6 @@ ALL_TRIPLETS="
|
||||
ubuntu-mate-live::
|
||||
ubuntu-netbook::
|
||||
ubuntu-server::
|
||||
ubuntu-server:ubuntu-rtm:
|
||||
ubuntu-server:ubuntu-rtm/foo:
|
||||
ubuntu-server:wubi:
|
||||
ubuntu-touch-custom::ubuntu-touch-custom
|
||||
ubuntu-touch::ubuntu-touch
|
||||
xubuntu::"
|
||||
|
||||
if [ -z "$SELECTED_TRIPLETS" ]; then
|
||||
|
@ -393,14 +393,6 @@ deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
|
||||
if [ "$ARCH" = "armhf" ]; then
|
||||
INFO_DESC="$(lsb_release -d -s)"
|
||||
echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info
|
||||
mkdir -p chroot/var/log/installer
|
||||
Chroot chroot "ln -s /etc/media-info /var/log/installer/media-info"
|
||||
fi
|
||||
fi
|
||||
if [ "$PROJECT" = "ubuntu-cpc" ]; then
|
||||
if [ "${SUBPROJECT:-}" = minimized ]; then
|
||||
BUILD_NAME=minimal
|
||||
@ -517,12 +509,6 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
|
||||
(cd "binary/$INITFS/custom.dir/" && tar -c --sort=name --xattrs *) | \
|
||||
gzip -9 --rsyncable > "$PREFIX.custom.tar.gz"
|
||||
chmod 644 "$PREFIX.custom.tar.gz"
|
||||
fi
|
||||
|
||||
# '--initramfs none' produces different manifest names.
|
||||
if [ -e "binary/$INITFS/filesystem.packages" ]; then
|
||||
./config/snap-seed-parse "chroot/" "binary/${INITFS}/filesystem.packages"
|
||||
@ -537,11 +523,11 @@ if [ -e "binary/$INITFS/filesystem.packages-remove" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# ubuntu-core and ubuntu-desktop-next splits kernel stuff into a "device" tarball so
|
||||
# ubuntu-core splits kernel stuff into a "device" tarball so
|
||||
# at this point we reset it to "none" as all the work to extract it was done already
|
||||
# in a binary hook
|
||||
case $PROJECT:${SUBPROJECT:-} in
|
||||
ubuntu-core:system-image|ubuntu-desktop-next:system-image)
|
||||
ubuntu-core:system-image)
|
||||
|
||||
# create device tarball (for snappy only atm)
|
||||
if [ "$PROJECT:$SUBPROJECT" = "ubuntu-core:system-image" ]; then
|
||||
@ -604,8 +590,6 @@ case $PROJECT:${SUBPROJECT:-} in
|
||||
Chroot chroot "apt-get -y autoremove"
|
||||
rm -rf chroot/boot/initrd.img* chroot/boot/vmlinu?-* chroot/lib/modules/* \
|
||||
chroot/boot/abi-* chroot/boot/System.map-* chroot/boot/config-*
|
||||
mkdir -p chroot/etc/initramfs-tools/conf.d
|
||||
echo "COMPRESS=lzma" >chroot/etc/initramfs-tools/conf.d/snappy-device-tarball.conf
|
||||
|
||||
# install needed packages and the kernel itself
|
||||
Chroot chroot "apt-get -y install initramfs-tools-ubuntu-core linux-firmware xz-utils"
|
||||
@ -838,36 +822,6 @@ if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then
|
||||
fi
|
||||
|
||||
case $SUBARCH in
|
||||
ac100)
|
||||
# create the md5sum and size files for which we are actually doing all this
|
||||
md5sum $PREFIX.rootfs.tar.gz >chroot/installer.md5
|
||||
wc -c $PREFIX.rootfs.tar.gz >chroot/installer.size
|
||||
|
||||
INFO_DESC="$(lsb_release -d -s)"
|
||||
INFO_STAMP=$(date +20%y%m%d-%H:%M)
|
||||
|
||||
echo "$INFO_DESC - $ARCH ($INFO_STAMP)" >chroot/media-info
|
||||
|
||||
# make sure update-initramfs feels cosy and warm in the environment
|
||||
lb chroot_proc install "$@"
|
||||
lb chroot_sysfs install "$@"
|
||||
lb chroot_devpts install "$@"
|
||||
|
||||
# re-create initrd to contain the installer.md5 file
|
||||
Chroot chroot "env FLASH_KERNEL_SKIP=1 update-initramfs -k all -t -u -v"
|
||||
|
||||
# create boot.img
|
||||
Chroot chroot "abootimg --create /boot/installer-${KVERS}.img -f /boot/bootimg.cfg-$SUBARCH -r /boot/initrd.img-${KVERS} -k /boot/vmlinuz-${KVERS}"
|
||||
|
||||
# clean up
|
||||
lb chroot_devpts remove "$@"
|
||||
lb chroot_sysfs remove "$@"
|
||||
lb chroot_proc remove "$@"
|
||||
|
||||
cp "chroot/boot/installer-${KVERS}.img" "$PREFIX.bootimg-$FLAVOUR"
|
||||
ln -sf "$PREFIX.bootimg-$FLAVOUR" "$PREFIX.bootimg"
|
||||
;;
|
||||
|
||||
raspi2|raspi3)
|
||||
# copy the kernel and initrd to a predictable directory for
|
||||
# ubuntu-image consumption. In some cases, like in pi2/3
|
||||
@ -884,66 +838,6 @@ case $SUBARCH in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-touch-custom" ]; then
|
||||
sourceslist="chroot/etc/apt/sources.list"
|
||||
|
||||
lb chroot_proc install "$@"
|
||||
lb chroot_sysfs install "$@"
|
||||
lb chroot_devpts install "$@"
|
||||
|
||||
if [ -e "$PREFIX.manifest" ]; then
|
||||
Chroot chroot "click list" | while read line; do
|
||||
echo "click:$line" >>"$PREFIX.manifest"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -e chroot/etc/resolv.conf ]; then
|
||||
mv chroot/etc/resolv.conf chroot/etc/resolv.conf.orig
|
||||
fi
|
||||
if [ -e /etc/resolv.conf ]; then
|
||||
cp /etc/resolv.conf chroot/etc/resolv.conf
|
||||
fi
|
||||
|
||||
mv "${sourceslist}" "${sourceslist}.orig"
|
||||
mv "${sourceslist}.d" "${sourceslist}.d.orig"
|
||||
echo "deb $LB_PARENT_MIRROR_CHROOT ${LB_DISTRIBUTION} main universe multiverse restricted" >$sourceslist
|
||||
Chroot chroot "apt-get -y update"
|
||||
Chroot chroot "apt-get -y install android"
|
||||
|
||||
if [ "$ARCH" = "armhf" ]; then
|
||||
touchsubarches="flo mako generic"
|
||||
for subarch in $touchsubarches; do
|
||||
cp -v chroot/usr/share/android/product/*-preinstalled-system-armel+${subarch}.img\
|
||||
"${PREFIX}.system-armel+${subarch}.img"
|
||||
cp -v chroot/usr/share/android/product/*-preinstalled-recovery-armel+${subarch}.img\
|
||||
"${PREFIX}.recovery-armel+${subarch}.img"
|
||||
cp -v chroot/usr/share/android/product/*-preinstalled-boot-armhf+${subarch}.img\
|
||||
"${PREFIX}.boot-armhf+${subarch}.img"
|
||||
# drop this following line once cdimage can handle -boot-*.img
|
||||
cp -v "${PREFIX}.boot-armhf+${subarch}.img" "${PREFIX}.bootimg-${subarch}"
|
||||
done
|
||||
fi
|
||||
if [ "$ARCH" = "i386" ]; then
|
||||
touchsubarches="generic_x86"
|
||||
for subarch in $touchsubarches; do
|
||||
cp -v chroot/usr/share/android/product/*-preinstalled-system-i386+${subarch}.img\
|
||||
"${PREFIX}.system-i386+${subarch}.img"
|
||||
cp -v chroot/usr/share/android/product/*-preinstalled-recovery-i386+${subarch}.img\
|
||||
"${PREFIX}.recovery-i386+${subarch}.img"
|
||||
cp -v chroot/usr/share/android/product/*-preinstalled-boot-i386+${subarch}.img\
|
||||
"${PREFIX}.boot-i386+${subarch}.img"
|
||||
# drop this following line once cdimage can handle -boot-*.img
|
||||
cp -v "${PREFIX}.boot-i386+${subarch}.img" "${PREFIX}.bootimg-${subarch}"
|
||||
done
|
||||
fi
|
||||
|
||||
lb chroot_devpts remove "$@"
|
||||
lb chroot_sysfs remove "$@"
|
||||
lb chroot_proc remove "$@"
|
||||
|
||||
rm -rf chroot/etc/init/*.override
|
||||
fi
|
||||
|
||||
# LTSP chroot building (only in 32bit and for Edubuntu (DVD))
|
||||
case $PROJECT in
|
||||
edubuntu-dvd)
|
||||
|
@ -302,23 +302,7 @@ case $IMAGEFORMAT in
|
||||
ext2|ext3|ext4)
|
||||
OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT"
|
||||
PREINSTALLED=true
|
||||
case ${SUBPROJECT:-} in
|
||||
wubi)
|
||||
add_package install lupin-support
|
||||
COMPONENTS='main restricted universe multiverse'
|
||||
;;
|
||||
*)
|
||||
case $PROJECT in
|
||||
ubuntu-cpc)
|
||||
;;
|
||||
*)
|
||||
add_package live jasper
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
plain)
|
||||
case $PROJECT:${SUBPROJECT:-} in
|
||||
ubuntu-server:live)
|
||||
@ -421,7 +405,7 @@ case $IMAGEFORMAT in
|
||||
;;
|
||||
*)
|
||||
case $PROJECT in
|
||||
ubuntu-server|ubuntu-touch|ubuntu-touch-custom)
|
||||
ubuntu-server)
|
||||
;;
|
||||
ubuntu)
|
||||
if [ "$SUBPROJECT" != "canary" ]; then
|
||||
@ -459,7 +443,7 @@ if [ "$PREINSTALLED" = "true" ]; then
|
||||
ubuntu-server)
|
||||
add_package live oem-config-debconf ubiquity-frontend-debconf
|
||||
;;
|
||||
ubuntu-core|ubuntu-base|base|ubuntu-touch|ubuntu-touch-custom|ubuntu-cpc|ubuntu-desktop-next)
|
||||
ubuntu-core|ubuntu-base|base|ubuntu-cpc)
|
||||
;;
|
||||
*)
|
||||
add_package live oem-config-gtk ubiquity-frontend-gtk
|
||||
@ -521,12 +505,6 @@ if ! [ -e config/germinate-output/structure ]; then
|
||||
${COMPONENTS:+-c "$COMPONENTS"} -a $ARCH)
|
||||
fi
|
||||
|
||||
case $PROJECT in
|
||||
base|edubuntu|edubuntu-dvd|kubuntu|kubuntu-active|kubuntu-dvd|kubuntu-plasma5|lubuntu|mythbuntu|ubuntu|ubuntu-budgie|ubuntu-desktop-next|ubuntu-dvd|ubuntu-gnome|ubuntu-mate|ubuntu-netbook|ubuntukylin|ubuntustudio-dvd|xubuntu)
|
||||
INITRAMFS_COMPRESSION="lzma"
|
||||
;;
|
||||
esac
|
||||
|
||||
case $PROJECT in
|
||||
ubuntu|ubuntu-dvd)
|
||||
|
||||
@ -559,25 +537,6 @@ case $PROJECT in
|
||||
esac
|
||||
;;
|
||||
|
||||
ubuntu-desktop-next)
|
||||
add_task install minimal standard ubuntu-desktop-next ubuntu-sdk-libs
|
||||
COMPONENTS='main restricted universe'
|
||||
LIVE_TASK='ubuntu-touch-live'
|
||||
KERNEL_FLAVOURS=generic
|
||||
case $ARCH in
|
||||
amd64) add_package live linux-signed-generic ;;
|
||||
esac
|
||||
|
||||
# system image snappy desktop next image
|
||||
# mvo: This is for cron.daily-preinstalled
|
||||
# CDIMAGE_PREINSTALLED is not passed from build.py
|
||||
# and PREINSTALLED means something different. So
|
||||
# we use SUBPROJECT to pass on the information
|
||||
if [ "${SUBPROJECT:-}" = "system-image" ]; then
|
||||
OPTS="${OPTS:+$OPTS }--linux-packages=linux-image"
|
||||
fi
|
||||
;;
|
||||
|
||||
kubuntu|kubuntu-dvd)
|
||||
add_task install minimal standard
|
||||
add_task install kubuntu-desktop
|
||||
@ -777,44 +736,6 @@ case $PROJECT in
|
||||
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
|
||||
;;
|
||||
|
||||
ubuntu-touch|ubuntu-touch-custom)
|
||||
HINTS="packagekit ubuntu-system-settings"
|
||||
case $ARCH in
|
||||
amd64|i386)
|
||||
HINTS="$HINTS qml-module-ubuntu-components-gles unity8"
|
||||
;;
|
||||
esac
|
||||
add_package install ubuntu-minimal ubuntu-touch $HINTS
|
||||
|
||||
COMPONENTS='main restricted universe'
|
||||
BOOTAPPEND_LIVE='hostname=ubuntu-phablet username=ubuntu'
|
||||
export LB_BOOTSTRAP_INCLUDE='apt-transport-https gnupg'
|
||||
OPTS="${OPTS:+$OPTS }--apt-recommends false"
|
||||
OPTS="${OPTS:+$OPTS }--compression gzip"
|
||||
OPTS="${OPTS:+$OPTS }--system normal"
|
||||
OPTS="${OPTS:+$OPTS }--zsync false"
|
||||
|
||||
# TODO cjwatson 2014-07-17: This is a bit of an abuse of
|
||||
# SUBPROJECT, but it's a handy thing that launchpad-buildd
|
||||
# already passes through to us that we weren't otherwise
|
||||
# using here.
|
||||
case ${SUBPROJECT:-} in
|
||||
ubuntu-rtm/dogfood)
|
||||
MIRROR=http://derived-archive.dogfood.content.paddev.net/ubuntu-rtm/
|
||||
OPTS="${OPTS:+$OPTS }--apt-secure false"
|
||||
OPTS="${OPTS:+$OPTS }--mirror-chroot-security ${MIRROR}"
|
||||
OPTS="${OPTS:+$OPTS }--mirror-binary-security ${MIRROR}"
|
||||
OPTS="${OPTS:+$OPTS }--mirror-binary ${MIRROR}"
|
||||
;;
|
||||
ubuntu-rtm)
|
||||
MIRROR=http://derived.archive.canonical.com/ubuntu-rtm/
|
||||
OPTS="${OPTS:+$OPTS }--mirror-chroot-security ${MIRROR}"
|
||||
OPTS="${OPTS:+$OPTS }--mirror-binary-security ${MIRROR}"
|
||||
OPTS="${OPTS:+$OPTS }--mirror-binary ${MIRROR}"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
ubuntu-cpc)
|
||||
if [ "${SUBPROJECT:-}" = minimized ]; then
|
||||
add_task install cloud-image
|
||||
@ -959,39 +880,9 @@ case $PROJECT in
|
||||
esac
|
||||
|
||||
case $ARCH in
|
||||
armel|armhf|arm64)
|
||||
armhf|arm64)
|
||||
KERNEL_FLAVOURS="${SUBARCH:-$KERNEL_FLAVOURS}"
|
||||
case $SUBARCH in
|
||||
dove)
|
||||
BINARY_REMOVE_LINUX=false
|
||||
;;
|
||||
omap)
|
||||
add_package install u-boot-linaro-omap3-beagle u-boot-tools
|
||||
BINARY_REMOVE_LINUX=false
|
||||
;;
|
||||
omap4)
|
||||
case $PROJECT in
|
||||
ubuntu-server|ubuntu-core|base)
|
||||
add_package install u-boot-linaro-omap4-panda u-boot-tools
|
||||
;;
|
||||
*)
|
||||
add_package install u-boot-linaro-omap4-panda u-boot-tools pvr-omap4
|
||||
;;
|
||||
esac
|
||||
BINARY_REMOVE_LINUX=false
|
||||
;;
|
||||
mx5)
|
||||
COMPONENTS='main restricted universe'
|
||||
KERNEL_FLAVOURS=linaro-lt-mx5
|
||||
add_package install flash-kernel u-boot-linaro-mx53loco u-boot-tools
|
||||
BINARY_REMOVE_LINUX=false
|
||||
;;
|
||||
ac100)
|
||||
COMPONENTS='main restricted universe multiverse'
|
||||
add_package install zram-config abootimg
|
||||
add_package live ac100-tarball-installer
|
||||
BINARY_REMOVE_LINUX=false
|
||||
;;
|
||||
raspi2)
|
||||
COMPONENTS='main restricted universe multiverse'
|
||||
add_package install linux-firmware-raspi2 u-boot-rpi flash-kernel u-boot-tools wpasupplicant
|
||||
@ -1009,7 +900,7 @@ case $ARCH in
|
||||
esac
|
||||
|
||||
case $PROJECT:${SUBPROJECT:-} in
|
||||
ubuntu-server:*|ubuntu-base:*|ubuntu-touch:*|ubuntu-touch-custom:*)
|
||||
ubuntu-server:*|ubuntu-base:*)
|
||||
OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
|
||||
KERNEL_FLAVOURS=none
|
||||
BINARY_REMOVE_LINUX=false
|
||||
@ -1030,12 +921,6 @@ case $PROJECT in
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${SUBPROJECT:-} in
|
||||
wubi)
|
||||
add_binary_hook build-wubildr
|
||||
;;
|
||||
esac
|
||||
|
||||
lb config noauto \
|
||||
--mode ubuntu \
|
||||
--distribution "$SUITE" \
|
||||
@ -1207,7 +1092,7 @@ EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*|ubuntu-server:live)
|
||||
ubuntu-core:system-image|ubuntu-cpc:*|ubuntu-server:live)
|
||||
cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \
|
||||
config/
|
||||
|
||||
@ -1304,22 +1189,6 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
case ${SUBPROJECT:-} in
|
||||
ubuntu-rtm|ubuntu-rtm/*)
|
||||
# debootstrap doesn't know about ubuntu-rtm series directly. Rather
|
||||
# than having to teach it, we employ a few hacks to make it use the
|
||||
# Ubuntu script instead.
|
||||
mkdir -p config/fake_debootstrap_dir/scripts
|
||||
ln -s /usr/share/debootstrap/devices.tar.gz \
|
||||
config/fake_debootstrap_dir/
|
||||
ln -s /usr/share/debootstrap/functions config/fake_debootstrap_dir/
|
||||
ln -s /usr/share/debootstrap/scripts/gutsy \
|
||||
"config/fake_debootstrap_dir/scripts/$SUITE"
|
||||
echo 'export DEBOOTSTRAP_DIR="$PWD/config/fake_debootstrap_dir"' \
|
||||
>> config/bootstrap
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$PREINSTALLED" = "true" ]; then
|
||||
if [ -n "$PREINSTALL_POOL_SEEDS" ]; then
|
||||
UNWANTED_SEEDS="${LIVE_TASK:+$LIVE_TASK }boot installer required"
|
||||
|
@ -8,10 +8,6 @@ IVER="$(dpkg -s initramfs-tools-ubuntu-core | \
|
||||
# fail the build if we did not find the snappy initrd package
|
||||
[ -n "$IVER" ] || exit 1
|
||||
|
||||
# force lzma
|
||||
mkdir -p /etc/initramfs-tools/conf.d
|
||||
echo "COMPRESS=lzma" >/etc/initramfs-tools/conf.d/snappy-generic-initrd.conf
|
||||
|
||||
update-initramfs.REAL -c -kcore-$IVER -v
|
||||
|
||||
cd /boot
|
||||
|
@ -1,295 +0,0 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
ERRCNT=""
|
||||
|
||||
# Known good post-debootstrap values
|
||||
passwd_bootstrap="e6075a0d2a38e214ae5e9a5545f7eda3"
|
||||
shadow_bootstrap="7fa48d7fb0e3a1ede9c98ff7b1b33622"
|
||||
group_bootstrap="5fd842058cd526ddaf51c2a61870c12a"
|
||||
gshadow_bootstrap="3145b72315c7306edb13bf546bb350b9"
|
||||
|
||||
# Current post-debootstrap values
|
||||
passwd_hash=$(set -- $(md5sum /etc/passwd) && echo $1)
|
||||
shadow_hash=$(set -- $(cat /etc/shadow | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1)
|
||||
group_hash=$(set -- $(md5sum /etc/group) && echo $1)
|
||||
gshadow_hash=$(set -- $(md5sum /etc/gshadow) && echo $1)
|
||||
|
||||
# /etc/passwd
|
||||
if [ "$passwd_bootstrap" = "$passwd_hash" ]; then
|
||||
cat > /etc/passwd <<EOF
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
|
||||
bin:x:2:2:bin:/bin:/usr/sbin/nologin
|
||||
sys:x:3:3:sys:/dev:/usr/sbin/nologin
|
||||
sync:x:4:65534:sync:/bin:/bin/sync
|
||||
games:x:5:60:games:/usr/games:/usr/sbin/nologin
|
||||
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
|
||||
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
|
||||
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
|
||||
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
|
||||
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
|
||||
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
|
||||
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
|
||||
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
|
||||
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
|
||||
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
|
||||
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
|
||||
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
|
||||
systemd-timesync:x:100:104:systemd Time Synchronization,,,:/run/systemd:/bin/false
|
||||
systemd-network:x:101:105:systemd Network Management,,,:/run/systemd/netif:/bin/false
|
||||
systemd-resolve:x:102:106:systemd Resolver,,,:/run/systemd/resolve:/bin/false
|
||||
systemd-bus-proxy:x:103:107:systemd Bus Proxy,,,:/run/systemd:/bin/false
|
||||
syslog:x:104:110::/home/syslog:/bin/false
|
||||
usermetrics:x:105:111:User Metrics:/var/lib/usermetrics:/bin/false
|
||||
messagebus:x:106:112::/var/run/dbus:/bin/false
|
||||
uuidd:x:107:113::/run/uuidd:/bin/false
|
||||
snappypkg:x:108:114::/nonexistent:/bin/false
|
||||
avahi:x:109:115:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
|
||||
dnsmasq:x:110:65534:dnsmasq,,,:/var/lib/misc:/bin/false
|
||||
pulse:x:111:116:PulseAudio daemon,,,:/var/run/pulse:/bin/false
|
||||
whoopsie:x:112:118::/nonexistent:/bin/false
|
||||
sshd:x:113:65534::/var/run/sshd:/usr/sbin/nologin
|
||||
rtkit:x:114:123:RealtimeKit,,,:/proc:/bin/false
|
||||
usbmux:x:115:46:usbmux daemon,,,:/var/lib/usbmux:/bin/false
|
||||
colord:x:116:124:colord colour management daemon,,,:/var/lib/colord:/bin/false
|
||||
lightdm:x:117:126:Light Display Manager:/var/lib/lightdm:/bin/false
|
||||
EOF
|
||||
else
|
||||
echo "/etc/passwd post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/passwd
|
||||
echo "passwd md5sum: $passwd_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
# /etc/shadow
|
||||
if [ "$shadow_bootstrap" = "$shadow_hash" ]; then
|
||||
cat > /etc/shadow <<EOF
|
||||
root:*:16591:0:99999:7:::
|
||||
daemon:*:16591:0:99999:7:::
|
||||
bin:*:16591:0:99999:7:::
|
||||
sys:*:16591:0:99999:7:::
|
||||
sync:*:16591:0:99999:7:::
|
||||
games:*:16591:0:99999:7:::
|
||||
man:*:16591:0:99999:7:::
|
||||
lp:*:16591:0:99999:7:::
|
||||
mail:*:16591:0:99999:7:::
|
||||
news:*:16591:0:99999:7:::
|
||||
uucp:*:16591:0:99999:7:::
|
||||
proxy:*:16591:0:99999:7:::
|
||||
www-data:*:16591:0:99999:7:::
|
||||
backup:*:16591:0:99999:7:::
|
||||
list:*:16591:0:99999:7:::
|
||||
irc:*:16591:0:99999:7:::
|
||||
gnats:*:16591:0:99999:7:::
|
||||
nobody:*:16591:0:99999:7:::
|
||||
systemd-timesync:*:16591:0:99999:7:::
|
||||
systemd-network:*:16591:0:99999:7:::
|
||||
systemd-resolve:*:16591:0:99999:7:::
|
||||
systemd-bus-proxy:*:16591:0:99999:7:::
|
||||
syslog:*:16591:0:99999:7:::
|
||||
usermetrics:*:16594:0:99999:7:::
|
||||
messagebus:*:16594:0:99999:7:::
|
||||
uuidd:*:16594:0:99999:7:::
|
||||
snappypkg:*:16594:0:99999:7:::
|
||||
avahi:*:16594:0:99999:7:::
|
||||
dnsmasq:*:16594:0:99999:7:::
|
||||
pulse:*:16594:0:99999:7:::
|
||||
whoopsie:*:16594:0:99999:7:::
|
||||
sshd:*:16594:0:99999:7:::
|
||||
rtkit:*:16594:0:99999:7:::
|
||||
usbmux:*:16594:0:99999:7:::
|
||||
colord:*:16594:0:99999:7:::
|
||||
lightdm:*:16594:0:99999:7:::
|
||||
EOF
|
||||
else
|
||||
echo "/etc/shadow post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/shadow
|
||||
echo "shadow md5sum: $shadow_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
# /etc/group
|
||||
if [ "$group_bootstrap" = "$group_hash" ]; then
|
||||
cat > /etc/group <<EOF
|
||||
root:x:0:
|
||||
daemon:x:1:
|
||||
bin:x:2:
|
||||
sys:x:3:
|
||||
adm:x:4:syslog,ubuntu
|
||||
tty:x:5:
|
||||
disk:x:6:
|
||||
lp:x:7:
|
||||
mail:x:8:
|
||||
news:x:9:
|
||||
uucp:x:10:
|
||||
man:x:12:
|
||||
proxy:x:13:
|
||||
kmem:x:15:
|
||||
dialout:x:20:ubuntu
|
||||
fax:x:21:
|
||||
voice:x:22:
|
||||
cdrom:x:24:ubuntu
|
||||
floppy:x:25:
|
||||
tape:x:26:
|
||||
sudo:x:27:ubuntu
|
||||
audio:x:29:pulse,ubuntu
|
||||
dip:x:30:ubuntu
|
||||
www-data:x:33:
|
||||
backup:x:34:
|
||||
operator:x:37:
|
||||
list:x:38:
|
||||
irc:x:39:
|
||||
src:x:40:
|
||||
gnats:x:41:
|
||||
shadow:x:42:
|
||||
utmp:x:43:
|
||||
video:x:44:ubuntu
|
||||
sasl:x:45:
|
||||
plugdev:x:46:ubuntu
|
||||
staff:x:50:
|
||||
games:x:60:
|
||||
users:x:100:
|
||||
nogroup:x:65534:
|
||||
input:x:101:
|
||||
systemd-journal:x:102:
|
||||
systemd-timesync:x:104:
|
||||
systemd-network:x:105:
|
||||
systemd-resolve:x:106:
|
||||
systemd-bus-proxy:x:107:
|
||||
netdev:x:108:
|
||||
crontab:x:109:
|
||||
syslog:x:110:
|
||||
usermetrics:x:111:
|
||||
messagebus:x:112:
|
||||
uuidd:x:113:
|
||||
snappypkg:x:114:
|
||||
avahi:x:115:
|
||||
pulse:x:116:
|
||||
pulse-access:x:117:
|
||||
whoopsie:x:118:
|
||||
bluetooth:x:119:
|
||||
mlocate:x:120:
|
||||
ssh:x:121:
|
||||
scanner:x:122:
|
||||
rtkit:x:123:
|
||||
colord:x:124:
|
||||
autopilot:x:125:
|
||||
lightdm:x:126:
|
||||
nopasswdlogin:x:127:
|
||||
EOF
|
||||
else
|
||||
echo "/etc/group post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/group
|
||||
echo "group md5sum: $group_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
# /etc/gshadow
|
||||
if [ "$gshadow_bootstrap" = "$gshadow_hash" ]; then
|
||||
cat > /etc/gshadow <<EOF
|
||||
root:*::
|
||||
daemon:*::
|
||||
bin:*::
|
||||
sys:*::
|
||||
adm:*::syslog,ubuntu
|
||||
tty:*::
|
||||
disk:*::
|
||||
lp:*::
|
||||
mail:*::
|
||||
news:*::
|
||||
uucp:*::
|
||||
man:*::
|
||||
proxy:*::
|
||||
kmem:*::
|
||||
dialout:*::ubuntu
|
||||
fax:*::
|
||||
voice:*::
|
||||
cdrom:*::ubuntu
|
||||
floppy:*::
|
||||
tape:*::
|
||||
sudo:*::ubuntu
|
||||
audio:*::pulse,ubuntu
|
||||
dip:*::ubuntu
|
||||
www-data:*::
|
||||
backup:*::
|
||||
operator:*::
|
||||
list:*::
|
||||
irc:*::
|
||||
src:*::
|
||||
gnats:*::
|
||||
shadow:*::
|
||||
utmp:*::
|
||||
video:*::ubuntu
|
||||
sasl:*::
|
||||
plugdev:*::ubuntu
|
||||
staff:*::
|
||||
games:*::
|
||||
users:*::
|
||||
nogroup:*::
|
||||
input:!::
|
||||
systemd-journal:!::
|
||||
systemd-timesync:!::
|
||||
systemd-network:!::
|
||||
systemd-resolve:!::
|
||||
systemd-bus-proxy:!::
|
||||
netdev:!::
|
||||
crontab:!::
|
||||
syslog:!::
|
||||
usermetrics:!::
|
||||
messagebus:!::
|
||||
uuidd:!::
|
||||
snappypkg:!::
|
||||
avahi:!::
|
||||
pulse:!::
|
||||
pulse-access:!::
|
||||
whoopsie:!::
|
||||
bluetooth:!::
|
||||
mlocate:!::
|
||||
ssh:!::
|
||||
scanner:!::
|
||||
rtkit:!::
|
||||
colord:!::
|
||||
autopilot:!::
|
||||
lightdm:!::
|
||||
nopasswdlogin:!::
|
||||
EOF
|
||||
else
|
||||
echo "/etc/gshadow post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/gshadow
|
||||
echo "gshadow md5sum: $gshadow_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ -n "$ERRCNT" ]; then
|
||||
echo "There were changes to the password database," >&2
|
||||
echo "please adjust the values in the livecd-rootfs source in the file:" >&2
|
||||
echo "live-build/ubuntu-desktop-next/hooks/00-uid-gid-fix.chroot_early" >&2
|
||||
echo >&2
|
||||
echo "Please check also if a maintainer script of the package" >&2
|
||||
echo "that added these entries perhaps created a home directory and," >&2
|
||||
echo "if needed, add code for creation of it to the above hook" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create some missing directories
|
||||
mkdir -p /var/lib/lightdm
|
||||
chown lightdm:lightdm /var/lib/lightdm
|
||||
chmod 750 /var/lib/lightdm
|
||||
|
||||
mkdir -p /var/lib/usermetrics
|
||||
chown usermetrics:usermetrics /var/lib/usermetrics
|
||||
chmod 750 /var/lib/usermetrics
|
||||
|
||||
echo "adjusting ownership of /var/log" >&2
|
||||
chown root:syslog /var/log
|
||||
ls -ln /var | grep log >&2
|
||||
|
||||
# Record the current state for later comparison
|
||||
for file in /etc/passwd /etc/shadow /etc/group /etc/gshadow; do
|
||||
rm -f ${file}-
|
||||
cp ${file} ${file}.orig
|
||||
done
|
@ -1,44 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
set -e
|
||||
|
||||
USER=ubuntu
|
||||
UGID=1000
|
||||
|
||||
echo "I: creating default user $USER"
|
||||
adduser --gecos $USER --disabled-login $USER --uid $UGID
|
||||
|
||||
mkdir -p /home/$USER/Music
|
||||
mkdir -p /home/$USER/Pictures
|
||||
mkdir -p /home/$USER/Videos
|
||||
mkdir -p /home/$USER/Downloads
|
||||
mkdir -p /home/$USER/Documents
|
||||
chown -R $UGID:$UGID /home/$USER
|
||||
|
||||
# Enable libnss-extrusers
|
||||
sed -i 's/^group:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
||||
sed -i 's/^passwd:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
||||
sed -i 's/^shadow:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
||||
|
||||
# Move user from /etc to extrausers location
|
||||
grep "^$USER" /etc/group >> /var/lib/extrausers/group
|
||||
grep "^$USER" /etc/passwd >> /var/lib/extrausers/passwd
|
||||
grep "^$USER" /etc/shadow >> /var/lib/extrausers/shadow
|
||||
grep "^$USER" /etc/gshadow >> /var/lib/extrausers/gshadow
|
||||
chmod 0644 /var/lib/extrausers/group
|
||||
chmod 0644 /var/lib/extrausers/passwd
|
||||
chmod 0640 /var/lib/extrausers/shadow
|
||||
chmod 0640 /var/lib/extrausers/gshadow
|
||||
chown root:shadow /var/lib/extrausers/shadow
|
||||
chown root:shadow /var/lib/extrausers/gshadow
|
||||
sed -i "/^$USER/d" /etc/group
|
||||
sed -i "/^$USER/d" /etc/passwd
|
||||
sed -i "/^$USER/d" /etc/shadow
|
||||
sed -i "/^$USER/d" /etc/gshadow
|
||||
touch /var/lib/extrausers/subuid
|
||||
touch /var/lib/extrausers/subgid
|
||||
|
||||
# needs to run *after* the user was moved out to /var/lib/extrausers
|
||||
echo "I: set user $USER password to $USER"
|
||||
echo "$USER:$USER" | chpasswd
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
USER=ubuntu
|
||||
|
||||
DEFGROUPS="sudo,adm,dialout,cdrom,plugdev,audio,dip,video"
|
||||
|
||||
echo "I: add $USER to ($DEFGROUPS) group(s)"
|
||||
usermod -a -G ${DEFGROUPS} ${USER}
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
# Boot using systemd and disable quiet boot
|
||||
# to see what is happening.
|
||||
systemd=/lib/systemd/systemd
|
||||
if [ -f /etc/default/grub ]; then
|
||||
sed -i \
|
||||
-e "s,^\\([ ]*GRUB_CMDLINE_LINUX\\)=\"\"$,\\1=\"init=$systemd\",g" \
|
||||
-e 's,^\([ ]*GRUB_CMDLINE_LINUX_DEFAULT\)="quiet splash",\1="",g' \
|
||||
/etc/default/grub
|
||||
fi
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
cat >>/etc/fstab<<EOT
|
||||
# Minimal setup required for systemd to provide a r/w FS
|
||||
/dev/root / rootfs defaults 0 0
|
||||
EOT
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
# Change default cache partition (until LP: #1373467 is fixed).
|
||||
if [ -f /etc/system-image/client.ini ]; then
|
||||
sed -ie 's!cache_partition: /android/cache/recovery!cache_partition: /userdata/cache!g' \
|
||||
/etc/system-image/client.ini
|
||||
fi
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
mkdir -p /etc/writable
|
||||
|
||||
# cloud-init needs to be able to modify hostname and has the ability to
|
||||
# set the other two.
|
||||
for f in timezone localtime hostname; do
|
||||
if [ -e /etc/$f ]; then
|
||||
echo "I: Moving /etc/$f to /etc/writable/"
|
||||
mv /etc/$f /etc/writable/$f
|
||||
fi
|
||||
echo "I: Linking /etc/$f to /etc/writable/"
|
||||
ln -s writable/$f /etc/$f
|
||||
done
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
echo "I: Removing /var/lib/apt/lists/*"
|
||||
find binary/boot/filesystem.dir/var/lib/apt/lists/ -type f | xargs rm -f
|
||||
|
||||
echo "I: Removing /var/cache/apt/*.bin"
|
||||
rm -f binary/boot/filesystem.dir/var/cache/apt/*.bin
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# we don't want click on snappy image
|
||||
apt-get purge -y click
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cat >/etc/default/locale<<EOF
|
||||
LANG="C.UTF-8"
|
||||
EOF
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat >/etc/motd<<EOF
|
||||
Welcome to snappy Ubuntu Desktop Next, a transactionally updated Ubuntu.
|
||||
|
||||
* See https://ubuntu.com/snappy
|
||||
|
||||
It's a brave new world here in snappy Ubuntu Desktop Next! This machine
|
||||
does not use apt-get or deb packages. Please see 'snappy --help'
|
||||
for app installation and transactional updates.
|
||||
|
||||
This is a *highly* experimental image.
|
||||
|
||||
EOF
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# see bug https://bugs.launchpad.net/snappy-ubuntu/+bug/1442231
|
||||
rm -f /etc/init.d/grub-common
|
@ -1,8 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "create needed directories" >&2
|
||||
mkdir -p /lib/modules
|
||||
mkdir -p /lib/firmware
|
||||
mkdir -p /writable
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
echo "I: Creating warning to use snappy when apt-get is used"
|
||||
|
||||
PREFIX=binary/boot/filesystem.dir
|
||||
|
||||
mkdir -p $PREFIX/usr/local/bin
|
||||
cat >$PREFIX/usr/local/bin/no-apt <<EOF
|
||||
#!/bin/sh
|
||||
cat <<EOF
|
||||
Ubuntu Core does not use apt-get, see 'snappy --help'!
|
||||
EOF
|
||||
chmod 755 $PREFIX/usr/local/bin/no-apt
|
||||
|
||||
for cmd in apt apt-cache apt-get; do
|
||||
ln -s no-apt $PREFIX/usr/local/bin/$cmd
|
||||
done
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Adding admin group policy to NM system service"
|
||||
|
||||
sed -i 's/<policy user="root">/<policy group="sudo">\n\t\t\t\t<allow send_destination="org.freedesktop.NetworkManager"\/>\n\t\t\t\t<allow send_interface="org.freedesktop.NetworkManager"\/>\n\t\t\t\t<allow send_interface="org.freedesktop.NetworkManager.SecretAgent"\/>\n\t\t<\/policy>\n\t\t<policy user="root">/g' /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf
|
||||
|
||||
mkdir -p /etc/polkit-1/localauthority/50-local.d
|
||||
cat > /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla << EOF
|
||||
[indicator-network-service]
|
||||
Identity=unix-group:sudo
|
||||
Action=org.freedesktop.NetworkManager.*
|
||||
ResultAny=yes
|
||||
ResultInactive=no
|
||||
ResultActive=yes
|
||||
EOF
|
@ -1,80 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# move the kernel out into a new device tarfile with system/boot
|
||||
|
||||
set -ex
|
||||
|
||||
echo "I: Moving kernel into device tarball"
|
||||
|
||||
HERE="$(pwd)"
|
||||
TMPDIR="$(mktemp -d)"
|
||||
mkdir -p $TMPDIR/system/
|
||||
mkdir -p $TMPDIR/assets/
|
||||
|
||||
# cp files, we can't simply use tar --transform as it changes the symlink target
|
||||
(
|
||||
cd binary/boot/filesystem.dir
|
||||
|
||||
cp -ar --parent lib/modules/ $TMPDIR/system/
|
||||
cp -ar --parent lib/firmware/ $TMPDIR/system/
|
||||
|
||||
# new assets handling
|
||||
if [ -f boot/vmlinu?-*.signed ]; then
|
||||
kernel=boot/vmlinu?-*.signed
|
||||
else
|
||||
kernel=boot/vmlinu?-*
|
||||
fi
|
||||
|
||||
initrd=boot/initrd.img-*
|
||||
|
||||
cp -ar $initrd $TMPDIR/assets/
|
||||
cp -ar $kernel $TMPDIR/assets/
|
||||
cp -ar boot/abi-* boot/System.map-* $TMPDIR/assets/
|
||||
|
||||
dtbs=$(find lib/firmware -type d -name 'device-tree' -print0)
|
||||
if [ -n "$dtbs" ]; then
|
||||
mv "$dtbs" $TMPDIR/assets/dtbs
|
||||
fi
|
||||
|
||||
# create hardware.yaml
|
||||
# this assumes armh == u-boot
|
||||
# and all others grub
|
||||
# common bits
|
||||
cat > $TMPDIR/hardware.yaml << EOF
|
||||
kernel: assets/$(basename $kernel)
|
||||
initrd: assets/$(basename $initrd)
|
||||
partition-layout: system-AB
|
||||
EOF
|
||||
|
||||
# arch specific ones
|
||||
if [ "$ARCH" = "armhf" ]; then
|
||||
cat >> $TMPDIR/hardware.yaml << EOF
|
||||
dtbs: assets/dtbs
|
||||
bootloader: u-boot
|
||||
EOF
|
||||
else
|
||||
cat >> $TMPDIR/hardware.yaml << EOF
|
||||
bootloader: grub
|
||||
EOF
|
||||
fi
|
||||
)
|
||||
|
||||
# and tar it up
|
||||
(
|
||||
cd $TMPDIR
|
||||
tar -c --sort=name -z -f $HERE/device.tar.gz system assets hardware.yaml
|
||||
)
|
||||
|
||||
rm -rf $TMPDIR
|
||||
|
||||
# remove files from the root filesystem
|
||||
(cd binary/boot/filesystem.dir
|
||||
rm -f boot/vmlinu?-*
|
||||
rm -f boot/initrd.img-*
|
||||
rm -f boot/abi-*
|
||||
rm -f boot/System.map-*
|
||||
rm -f initrd.img
|
||||
rm -f vmlinu?
|
||||
rm -rf lib/modules
|
||||
rm -rf lib/firmware
|
||||
)
|
@ -1,52 +0,0 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
ERRCNT=""
|
||||
|
||||
passwd_hash=$(set -- $(md5sum /etc/passwd) && echo $1)
|
||||
shadow_hash=$(set -- $(cat /etc/shadow | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1)
|
||||
group_length=$(cat /etc/group | wc -l)
|
||||
gshadow_length=$(cat /etc/gshadow | wc -l)
|
||||
|
||||
passwd_orig_hash=$(set -- $(md5sum /etc/passwd.orig) && echo $1)
|
||||
shadow_orig_hash=$(set -- $(cat /etc/shadow.orig | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1)
|
||||
group_orig_length=$(cat /etc/group.orig | wc -l)
|
||||
gshadow_orig_length=$(cat /etc/gshadow.orig | wc -l)
|
||||
|
||||
if [ "$passwd_hash" != "$passwd_orig_hash" ]; then
|
||||
echo "/etc/passwd has changed during setup." >&2
|
||||
echo "The new /etc/passwd md5sum is: $passwd_hash" >&2
|
||||
diff -Nrup /etc/passwd.orig /etc/passwd >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ "$shadow_hash" != "$shadow_orig_hash" ]; then
|
||||
echo "/etc/shadow has changed during setup." >&2
|
||||
echo "The new /etc/shadow md5sum is: $shadow_hash" >&2
|
||||
diff -Nrup /etc/shadow.orig /etc/shadow >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ "$group_length" != "$group_orig_length" ]; then
|
||||
echo "/etc/group has changed during setup." >&2
|
||||
diff -Nrup /etc/group.orig /etc/group >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ "$gshadow_length" != "$gshadow_orig_length" ]; then
|
||||
echo "/etc/gshadow has changed during setup." >&2
|
||||
diff -Nrup /etc/gshadow.orig /etc/gshadow >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ -n "$ERRCNT" ]; then
|
||||
echo "There were changes to the password database," >&2
|
||||
echo "please adjust the values in the livecd-rootfs source in the file:" >&2
|
||||
echo "live-build/ubuntu-core/hooks/00-uid-gid-fix.chroot_early" >&2
|
||||
echo >&2
|
||||
echo "Please check also if a maintainer script of the package" >&2
|
||||
echo "that added these entries perhaps created a home directory and," >&2
|
||||
echo "if needed, add code for creation of it to the above hook" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm /etc/passwd.orig /etc/shadow.orig /etc/group.orig /etc/gshadow.orig
|
@ -1,9 +0,0 @@
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
::1 localhost6.localdomain6 localhost6
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 localhost ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
ff02::3 ip6-allhosts
|
@ -1,2 +0,0 @@
|
||||
[Seat:*]
|
||||
autologin-user=ubuntu
|
@ -1 +0,0 @@
|
||||
../media-rack.lower.mount
|
@ -1 +0,0 @@
|
||||
../media-rack.mount
|
@ -1 +0,0 @@
|
||||
../media-region.mount
|
@ -1,5 +0,0 @@
|
||||
[Mount]
|
||||
What=/cdrom/casper/maas/maas-rack.squashfs
|
||||
Where=/media/rack.lower
|
||||
Type=squashfs
|
||||
Options=ro
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
After=media-filesystem.mount
|
||||
After=media-rack.lower.mount
|
||||
|
||||
[Mount]
|
||||
What=overlay
|
||||
Where=/media/rack
|
||||
Type=overlay
|
||||
Options=lowerdir=/media/rack.lower:/media/filesystem
|
@ -1,5 +0,0 @@
|
||||
[Mount]
|
||||
What=/cdrom/casper/maas/maas-region.squashfs
|
||||
Where=/media/region.lower
|
||||
Type=squashfs
|
||||
Options=ro
|
@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
After=media-filesystem.mount
|
||||
After=media-rack.lower.mount
|
||||
After=media-region.lower.mount
|
||||
|
||||
[Mount]
|
||||
What=overlay
|
||||
Where=/media/region
|
||||
Type=overlay
|
||||
Options=lowerdir=/media/region.lower:/media/rack.lower:/media/filesystem
|
@ -1 +0,0 @@
|
||||
ubuntu-touch/
|
@ -1,315 +0,0 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
ERRCNT=""
|
||||
|
||||
# Known good post-debootstrap values
|
||||
passwd_bootstrap="8c7663019ac545a6ba9a6021dd54b129"
|
||||
shadow_bootstrap="021bea180cc9e71a34519d1212092954"
|
||||
group_bootstrap="4a1be7f950a839f44708bb0919339ff9"
|
||||
gshadow_bootstrap="e75f449f2327bc7e4c306a73e04d8815"
|
||||
|
||||
# Current post-debootstrap values
|
||||
passwd_hash=$(set -- $(md5sum /etc/passwd) && echo $1)
|
||||
shadow_hash=$(set -- $(cat /etc/shadow | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1)
|
||||
group_hash=$(set -- $(md5sum /etc/group) && echo $1)
|
||||
gshadow_hash=$(set -- $(md5sum /etc/gshadow) && echo $1)
|
||||
|
||||
# /etc/passwd
|
||||
if [ "$passwd_bootstrap" = "$passwd_hash" ]; then
|
||||
cat > /etc/passwd <<EOF
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
|
||||
bin:x:2:2:bin:/bin:/usr/sbin/nologin
|
||||
sys:x:3:3:sys:/dev:/usr/sbin/nologin
|
||||
sync:x:4:65534:sync:/bin:/bin/sync
|
||||
games:x:5:60:games:/usr/games:/usr/sbin/nologin
|
||||
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
|
||||
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
|
||||
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
|
||||
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
|
||||
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
|
||||
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
|
||||
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
|
||||
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
|
||||
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
|
||||
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
|
||||
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
|
||||
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
|
||||
syslog:x:100:103::/home/syslog:/bin/false
|
||||
usermetrics:x:101:104:User Metrics:/var/lib/usermetrics:/bin/false
|
||||
messagebus:x:102:106::/var/run/dbus:/bin/false
|
||||
clickpkg:x:103:107::/nonexistent:/bin/false
|
||||
dnsmasq:x:104:65534:dnsmasq,,,:/var/lib/misc:/bin/false
|
||||
sshd:x:105:65534::/var/run/sshd:/usr/sbin/nologin
|
||||
rtkit:x:106:109:RealtimeKit,,,:/proc:/bin/false
|
||||
whoopsie:x:107:110::/nonexistent:/bin/false
|
||||
lightdm:x:108:111:Light Display Manager:/var/lib/lightdm:/bin/false
|
||||
lxc-dnsmasq:x:109:114:LXC dnsmasq,,,:/var/lib/lxc:/bin/false
|
||||
pulse:x:110:115:PulseAudio daemon,,,:/var/run/pulse:/bin/false
|
||||
system:x:1000:1000:system,,,:/nonexistent:/bin/false
|
||||
radio:x:1001:1001:radio,,,:/nonexistent:/bin/false
|
||||
systemd-timesync:x:111:113:systemd Time Synchronization,,,:/run/systemd:/bin/false
|
||||
systemd-network:x:112:117:systemd Network Management,,,:/run/systemd/netif:/bin/false
|
||||
systemd-resolve:x:113:118:systemd Resolver,,,:/run/systemd/resolve:/bin/false
|
||||
systemd-bus-proxy:x:114:119:systemd Bus Proxy,,,:/run/systemd:/bin/false
|
||||
nm-openvpn:x:115:120:NetworkManager OpenVPN,,,:/var/lib/openvpn/chroot:/bin/false
|
||||
dhcpd:x:116:122::/var/run:/bin/false
|
||||
EOF
|
||||
else
|
||||
echo "/etc/passwd post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/passwd
|
||||
echo "passwd md5sum: $passwd_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
# /etc/shadow
|
||||
if [ "$shadow_bootstrap" = "$shadow_hash" ]; then
|
||||
cat > /etc/shadow <<EOF
|
||||
root:*:16329:0:99999:7:::
|
||||
daemon:*:16329:0:99999:7:::
|
||||
bin:*:16329:0:99999:7:::
|
||||
sys:*:16329:0:99999:7:::
|
||||
sync:*:16329:0:99999:7:::
|
||||
games:*:16329:0:99999:7:::
|
||||
man:*:16329:0:99999:7:::
|
||||
lp:*:16329:0:99999:7:::
|
||||
mail:*:16329:0:99999:7:::
|
||||
news:*:16329:0:99999:7:::
|
||||
uucp:*:16329:0:99999:7:::
|
||||
proxy:*:16329:0:99999:7:::
|
||||
www-data:*:16329:0:99999:7:::
|
||||
backup:*:16329:0:99999:7:::
|
||||
list:*:16329:0:99999:7:::
|
||||
irc:*:16329:0:99999:7:::
|
||||
gnats:*:16329:0:99999:7:::
|
||||
nobody:*:16329:0:99999:7:::
|
||||
syslog:*:16329:0:99999:7:::
|
||||
usermetrics:*:16329:0:99999:7:::
|
||||
messagebus:*:16329:0:99999:7:::
|
||||
clickpkg:*:16329:0:99999:7:::
|
||||
dnsmasq:*:16329:0:99999:7:::
|
||||
sshd:*:16329:0:99999:7:::
|
||||
rtkit:*:16329:0:99999:7:::
|
||||
whoopsie:*:16329:0:99999:7:::
|
||||
lightdm:*:16329:0:99999:7:::
|
||||
lxc-dnsmasq:!:16329:0:99999:7:::
|
||||
pulse:*:16329:0:99999:7:::
|
||||
system:!:16329:0:99999:7:::
|
||||
radio:!:16329:0:99999:7:::
|
||||
systemd-timesync:*:16372:0:99999:7:::
|
||||
systemd-network:*:16372:0:99999:7:::
|
||||
systemd-resolve:*:16372:0:99999:7:::
|
||||
systemd-bus-proxy:*:16372:0:99999:7:::
|
||||
nm-openvpn:*:16909:0:99999:7:::
|
||||
dhcpd:*:16925:0:99999:7:::
|
||||
EOF
|
||||
else
|
||||
echo "/etc/shadow post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/shadow
|
||||
echo "shadow md5sum: $shadow_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
# /etc/group
|
||||
if [ "$group_bootstrap" = "$group_hash" ]; then
|
||||
cat > /etc/group <<EOF
|
||||
root:x:0:
|
||||
daemon:x:1:
|
||||
bin:x:2:
|
||||
sys:x:3:
|
||||
adm:x:4:syslog
|
||||
tty:x:5:
|
||||
disk:x:6:
|
||||
lp:x:7:
|
||||
mail:x:8:
|
||||
news:x:9:
|
||||
uucp:x:10:
|
||||
man:x:12:
|
||||
proxy:x:13:
|
||||
kmem:x:15:
|
||||
dialout:x:20:
|
||||
fax:x:21:
|
||||
voice:x:22:
|
||||
cdrom:x:24:
|
||||
floppy:x:25:
|
||||
tape:x:26:
|
||||
sudo:x:27:
|
||||
audio:x:1005:
|
||||
dip:x:30:
|
||||
www-data:x:33:
|
||||
backup:x:34:
|
||||
operator:x:37:
|
||||
list:x:38:
|
||||
irc:x:39:
|
||||
src:x:40:
|
||||
gnats:x:41:
|
||||
shadow:x:42:
|
||||
utmp:x:43:
|
||||
video:x:44:
|
||||
sasl:x:45:
|
||||
plugdev:x:46:
|
||||
staff:x:50:
|
||||
games:x:60:
|
||||
users:x:100:
|
||||
nogroup:x:65534:
|
||||
netdev:x:101:
|
||||
crontab:x:102:
|
||||
syslog:x:103:
|
||||
usermetrics:x:104:
|
||||
systemd-journal:x:105:
|
||||
messagebus:x:106:
|
||||
clickpkg:x:107:
|
||||
ssh:x:108:
|
||||
rtkit:x:109:
|
||||
whoopsie:x:110:
|
||||
lightdm:x:111:
|
||||
nopasswdlogin:x:112:
|
||||
bluetooth:x:1002:
|
||||
lxc-dnsmasq:x:114:
|
||||
pulse:x:115:
|
||||
pulse-access:x:116:
|
||||
system:x:1000:
|
||||
radio:x:1001:
|
||||
gps:x:1021:
|
||||
android_net:x:3003:
|
||||
android_net2:x:3004:
|
||||
android_net3:x:3002:
|
||||
android_graphics:x:1003:
|
||||
android_input:x:1004:
|
||||
sdcard_rw:x:1015:
|
||||
android_media:x:1013:
|
||||
android_nvram:x:9997:
|
||||
android_cache:x:2001:
|
||||
systemd-timesync:x:113:
|
||||
systemd-network:x:117:
|
||||
systemd-resolve:x:118:
|
||||
systemd-bus-proxy:x:119:
|
||||
input:x:121:
|
||||
nm-openvpn:x:120:
|
||||
dhcpd:x:122:
|
||||
EOF
|
||||
else
|
||||
echo "/etc/group post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/group
|
||||
echo "group md5sum: $group_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
# /etc/gshadow
|
||||
if [ "$gshadow_bootstrap" = "$gshadow_hash" ]; then
|
||||
cat > /etc/gshadow <<EOF
|
||||
root:*::
|
||||
daemon:*::
|
||||
bin:*::
|
||||
sys:*::
|
||||
adm:*::syslog
|
||||
tty:*::
|
||||
disk:*::
|
||||
lp:*::
|
||||
mail:*::
|
||||
news:*::
|
||||
uucp:*::
|
||||
man:*::
|
||||
proxy:*::
|
||||
kmem:*::
|
||||
dialout:*::
|
||||
fax:*::
|
||||
voice:*::
|
||||
cdrom:*::
|
||||
floppy:*::
|
||||
tape:*::
|
||||
sudo:*::
|
||||
audio:*::pulse
|
||||
dip:*::
|
||||
www-data:*::
|
||||
backup:*::
|
||||
operator:*::
|
||||
list:*::
|
||||
irc:*::
|
||||
src:*::
|
||||
gnats:*::
|
||||
shadow:*::
|
||||
utmp:*::
|
||||
video:*::
|
||||
sasl:*::
|
||||
plugdev:*::
|
||||
staff:*::
|
||||
games:*::
|
||||
users:*::
|
||||
nogroup:*::
|
||||
netdev:!::
|
||||
crontab:!::
|
||||
syslog:!::
|
||||
usermetrics:!::
|
||||
systemd-journal:!::
|
||||
messagebus:!::
|
||||
clickpkg:!::
|
||||
ssh:!::
|
||||
rtkit:!::
|
||||
whoopsie:!::
|
||||
lightdm:!::
|
||||
nopasswdlogin:!::
|
||||
bluetooth:!::
|
||||
lxc-dnsmasq:!::
|
||||
pulse:!::
|
||||
pulse-access:!::
|
||||
system:!::
|
||||
radio:!::
|
||||
gps:!::
|
||||
android_net:!::
|
||||
android_net2:!::
|
||||
android_net3:!::
|
||||
android_graphics:!::
|
||||
android_input:!::
|
||||
sdcard_rw:!::
|
||||
android_media:!::
|
||||
android_nvram:!::
|
||||
android_cache:!::
|
||||
systemd-timesync:!::
|
||||
systemd-network:!::
|
||||
systemd-resolve:!::
|
||||
systemd-bus-proxy:!::
|
||||
input:!::
|
||||
nm-openvpn:!::
|
||||
dhcpd:!::
|
||||
EOF
|
||||
else
|
||||
echo "/etc/gshadow post-debootstrap hash doesn't match record" >&2
|
||||
echo "The output below might help to resolve the issue" >&2
|
||||
cat /etc/gshadow
|
||||
echo "gshadow md5sum: $gshadow_hash" >&2
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ -n "$ERRCNT" ]; then
|
||||
echo "There were changes to the password database," >&2
|
||||
echo "please adjust the values in the livecd-rootfs source in the file:" >&2
|
||||
echo "live-build/ubuntu-touch/hooks/00-uid-gid-fix.chroot_early" >&2
|
||||
echo >&2
|
||||
echo "Please check also if a maintainer script of the package" >&2
|
||||
echo "that added these entries perhaps created a home directory and," >&2
|
||||
echo "if needed, add code for creation of it to the above hook" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create some missing directories
|
||||
mkdir -p /var/lib/lightdm
|
||||
chown lightdm:lightdm /var/lib/lightdm
|
||||
chmod 750 /var/lib/lightdm
|
||||
|
||||
mkdir -p /var/lib/usermetrics
|
||||
chown usermetrics:usermetrics /var/lib/usermetrics
|
||||
chmod 750 /var/lib/usermetrics
|
||||
|
||||
echo "adjusting ownership of /var/log" >&2
|
||||
chown root:syslog /var/log
|
||||
ls -ln /var | grep log >&2
|
||||
|
||||
# Record the current state for later comparison
|
||||
for file in /etc/passwd /etc/shadow /etc/group /etc/gshadow; do
|
||||
rm -f ${file}-
|
||||
cp ${file} ${file}.orig
|
||||
done
|
@ -1,47 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
USER=phablet
|
||||
GECOS=Ubuntu
|
||||
UGID=32011
|
||||
|
||||
echo "I: creating default user $USER"
|
||||
adduser --gecos $GECOS --disabled-login $USER --uid $UGID
|
||||
|
||||
echo "I: set user $USER password to blank"
|
||||
passwd -d $USER
|
||||
|
||||
adduser --gecos system --no-create-home --disabled-login --disabled-password system --uid 1000
|
||||
adduser --gecos radio --no-create-home --disabled-login --disabled-password radio --uid 1001
|
||||
|
||||
# Enable libnss-extrusers
|
||||
sed -i 's/^group:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
||||
sed -i 's/^passwd:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
||||
sed -i 's/^shadow:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
||||
|
||||
# Move user from /etc to extrausers location
|
||||
grep "^$USER" /etc/group >> /var/lib/extrausers/group
|
||||
grep "^$USER" /etc/passwd >> /var/lib/extrausers/passwd
|
||||
grep "^$USER" /etc/shadow >> /var/lib/extrausers/shadow
|
||||
grep "^$USER" /etc/gshadow >> /var/lib/extrausers/gshadow
|
||||
chmod 0644 /var/lib/extrausers/group
|
||||
chmod 0644 /var/lib/extrausers/passwd
|
||||
chmod 0640 /var/lib/extrausers/shadow
|
||||
chmod 0640 /var/lib/extrausers/gshadow
|
||||
chown root:shadow /var/lib/extrausers/shadow
|
||||
chown root:shadow /var/lib/extrausers/gshadow
|
||||
sed -i "/^$USER/d" /etc/group
|
||||
sed -i "/^$USER/d" /etc/passwd
|
||||
sed -i "/^$USER/d" /etc/shadow
|
||||
sed -i "/^$USER/d" /etc/gshadow
|
||||
touch /var/lib/extrausers/subuid
|
||||
touch /var/lib/extrausers/subgid
|
||||
|
||||
# Prevent the system user from being presented in the greeter by bumping MIN_UID
|
||||
sed -i 's/^\(UID_MIN\s\+\).*/\11002/g' /etc/login.defs
|
||||
|
||||
mkdir -p /home/$USER/Music
|
||||
mkdir -p /home/$USER/Pictures
|
||||
mkdir -p /home/$USER/Videos
|
||||
mkdir -p /home/$USER/Downloads
|
||||
mkdir -p /home/$USER/Documents
|
||||
chown -R $UGID:$UGID /home/$USER
|
@ -1,104 +0,0 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
USER=phablet
|
||||
|
||||
DEFGROUPS="tty,sudo,adm,dialout,cdrom,plugdev,audio,dip,video,gps,radio,bluetooth,android_net,android_net2,android_net3,android_graphics,android_input,sdcard_rw,android_media,android_nvram,android_cache"
|
||||
|
||||
/bin/egrep -i "^audio:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
# Needed to change group id as audio is already created by ubuntu
|
||||
echo "User audio exists in /etc/group, changing gid to be android compatible"
|
||||
groupmod -g 1005 audio
|
||||
else
|
||||
echo "User audio does not exists in /etc/group must create"
|
||||
groupadd -g 1005 audio
|
||||
fi
|
||||
/bin/egrep -i "^gps:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User gps exists in /etc/group"
|
||||
else
|
||||
echo "User gps does not exist in /etc/group -- must create"
|
||||
groupadd -g 1021 gps
|
||||
fi
|
||||
/bin/egrep -i "^radio:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User radio exists in /etc/group"
|
||||
else
|
||||
echo "User radio does not exist in /etc/group -- must create"
|
||||
groupadd -g 1001 radio
|
||||
fi
|
||||
/bin/egrep -i "^bluetooth:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User bluetooth exists in /etc/group changing ID to 1002"
|
||||
groupmod -g 1002 bluetooth
|
||||
else
|
||||
echo "User bluetooth does not exist in /etc/group -- must create"
|
||||
groupadd -g 1002 bluetooth
|
||||
fi
|
||||
/bin/egrep -i "^android_net:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_net exists in /etc/group"
|
||||
else
|
||||
echo "User android_net does not exist in /etc/group -- must create"
|
||||
groupadd -g 3003 android_net
|
||||
fi
|
||||
/bin/egrep -i "^android_net2:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_net2 exists in /etc/group"
|
||||
else
|
||||
echo "User android_net2 does not exist in /etc group -- must create"
|
||||
groupadd -g 3004 android_net2
|
||||
fi
|
||||
/bin/egrep -i "^android_net3:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_net3 exists in /etc/group"
|
||||
else
|
||||
echo "User android_net3 does not exist in /etc group -- must create"
|
||||
groupadd -g 3002 android_net3
|
||||
fi
|
||||
/bin/egrep -i "^android_graphics:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_graphics exists in /etc/group"
|
||||
else
|
||||
echo "User android_graphics does not exist in /etc group -- must create"
|
||||
groupadd -g 1003 android_graphics
|
||||
fi
|
||||
/bin/egrep -i "^android_input:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_input exists in /etc/group"
|
||||
else
|
||||
echo "User android_input does not exist in /etc group -- must create"
|
||||
groupadd -g 1004 android_input
|
||||
fi
|
||||
/bin/egrep -i "^sdcard_rw:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User sdcard_rw exists in /etc/group"
|
||||
else
|
||||
echo "User sdcard_rw does not exist in /etc group -- must create"
|
||||
groupadd -g 1015 sdcard_rw
|
||||
fi
|
||||
/bin/egrep -i "^android_media:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_media exists in /etc/group"
|
||||
else
|
||||
echo "User android_media does not exist in /etc group -- must create"
|
||||
groupadd -g 1013 android_media
|
||||
fi
|
||||
/bin/egrep -i "^android_nvram:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_nvram exists in /etc/group"
|
||||
else
|
||||
echo "User android_nvram does not exist in /etc group -- must create"
|
||||
groupadd -g 9997 android_nvram
|
||||
fi
|
||||
/bin/egrep -i "^android_cache:" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User android_cache exists in /etc/group"
|
||||
else
|
||||
echo "User android_cache does not exist in /etc group -- must create"
|
||||
groupadd -g 2001 android_cache
|
||||
fi
|
||||
|
||||
echo "I: add $USER to ($DEFGROUPS) groups"
|
||||
usermod -a -G ${DEFGROUPS} ${USER}
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
mkdir -p /etc/writable
|
||||
touch /etc/writable/machine-info
|
||||
|
||||
for f in timezone localtime machine-info hostname whoopsie; do
|
||||
if [ -e /etc/$f ]; then
|
||||
echo "I: Moving /etc/$f to /etc/writable/"
|
||||
mv /etc/$f /etc/writable/$f
|
||||
fi
|
||||
echo "I: Linking /etc/$f to /etc/writable/"
|
||||
ln -s writable/$f /etc/$f
|
||||
done
|
@ -1,9 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "creating mtab and modules dir" >&2
|
||||
ln -sf /proc/mounts /etc/mtab
|
||||
mkdir -p /lib/modules
|
||||
mkdir -p /lib/firmware
|
||||
mkdir -p /userdata
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Adding admin group policy to NM system service"
|
||||
|
||||
sed -i 's/<policy user="root">/<policy group="sudo">\n\t\t\t\t<allow send_destination="org.freedesktop.NetworkManager"\/>\n\t\t\t\t<allow send_interface="org.freedesktop.NetworkManager"\/>\n\t\t\t\t<allow send_interface="org.freedesktop.NetworkManager.SecretAgent"\/>\n\t\t<\/policy>\n\t\t<policy user="root">/g' /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf
|
||||
|
||||
mkdir -p /etc/polkit-1/localauthority/50-local.d
|
||||
cat > /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla << EOF
|
||||
[indicator-network-service]
|
||||
Identity=unix-group:sudo
|
||||
Action=org.freedesktop.NetworkManager.*
|
||||
ResultAny=yes
|
||||
ResultInactive=no
|
||||
ResultActive=yes
|
||||
EOF
|
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "I: setting up initial environment for Touch..."
|
||||
|
||||
echo "HOSTNAME=android
|
||||
TERM=linux
|
||||
ANDROID_CACHE=/cache
|
||||
LOOP_MOUNTPOINT=/mnt/obb
|
||||
ASEC_MOUNTPOINT=/mnt/asec
|
||||
ANDROID_PROPERTY_WORKSPACE=8,49152
|
||||
ANDROID_ASSETS=/system/app
|
||||
ANDROID_BOOTLOGO=1
|
||||
LD_LIBRARY_PATH=/vendor/lib:/system/lib
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
ANDROID_DATA=/data
|
||||
QT_SELECT=qt5
|
||||
SHLVL=1
|
||||
MKSH=/system/bin/sh
|
||||
ANDROID_ROOT=/system
|
||||
EXTERNAL_STORAGE=/mnt/sdcard
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
FLASH_KERNEL_SKIP=true
|
||||
QT_IM_MODULE=maliitphablet" > /etc/environment
|
@ -1,10 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Updating upower configuration..."
|
||||
|
||||
sed -i 's/^UsePercentageForPolicy=.*/UsePercentageForPolicy=true/' /etc/UPower/UPower.conf
|
||||
sed -i 's/^CriticalPowerAction=.*/CriticalPowerAction=PowerOff/' /etc/UPower/UPower.conf
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Splitting out custom tarball"
|
||||
|
||||
rm -f binary/boot/custom.dir
|
||||
mkdir -p binary/boot/custom.dir/system
|
||||
mv binary/boot/filesystem.dir/custom binary/boot/custom.dir/system/custom
|
@ -1,81 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Setting up click packages"
|
||||
|
||||
CLICKARCH=$(dpkg --print-architecture)
|
||||
|
||||
click_uri=http://archive-team.internal/click_packages
|
||||
if [ "$CLICKARCH" = "arm64" ]; then
|
||||
# FIXME: this is temporary. Since right now we can't have arm64 clicks in the store
|
||||
# (before implementing fat-packages), we need to fetch the arm64 click list from a
|
||||
# different place
|
||||
click_list=$click_uri/click_list.arm64
|
||||
click_install_flags="--allow-unauthenticated"
|
||||
else
|
||||
click_list=$click_uri/click_list
|
||||
click_install_flags=""
|
||||
fi
|
||||
click_db=/usr/share/click/preinstalled
|
||||
click_db_custom=/custom/click
|
||||
|
||||
mkdir -p -m 755 "$click_db"
|
||||
chown clickpkg:clickpkg "$click_db"
|
||||
|
||||
# some of these get installed to /custom/click
|
||||
mkdir -p -m 755 "$click_db_custom"
|
||||
chown clickpkg:clickpkg "$click_db_custom"
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
cleanup () { rm -rf "$tmpdir"; }
|
||||
trap cleanup EXIT
|
||||
|
||||
wget --no-verbose -O "$tmpdir/click_list" "$click_list"
|
||||
for package in $(cat "$tmpdir/click_list")
|
||||
do
|
||||
if echo $package | egrep -q "_$CLICKARCH.click|_all.click|_unknown.click|_multi.click"; then
|
||||
echo "Setting up $package"
|
||||
wget --no-verbose -O "$tmpdir/$package" "$click_uri/$package"
|
||||
# FIXME: first attempt, a hard-coded list of the packages that go to
|
||||
# the custom tarball
|
||||
case $package in
|
||||
com.ubuntu.developer.webapps.webapp-amazon_*|\
|
||||
com.ubuntu.developer.webapps.webapp-ebay_*|\
|
||||
com.ubuntu.developer.webapps.webapp-facebook_*|\
|
||||
com.ubuntu.developer.webapps.webapp-gmail_*|\
|
||||
com.ubuntu.developer.webapps.webapp-twitter_*|\
|
||||
com.ubuntu.scopes.youtube_*|\
|
||||
com.ubuntu.dropping-letters_*|\
|
||||
com.ubuntu.filemanager_*|\
|
||||
com.ubuntu.reminders_*|\
|
||||
com.ubuntu.shorts_*|\
|
||||
com.ubuntu.sudoku_*|\
|
||||
com.ubuntu.terminal_*|\
|
||||
com.ubuntu.calendar_*|\
|
||||
navigator.costales_*|\
|
||||
dekko.dekkoproject_*)
|
||||
roots="$click_db_custom"
|
||||
;;
|
||||
*)
|
||||
roots="$click_db"
|
||||
;;
|
||||
esac
|
||||
for root in $roots; do
|
||||
if [ "$root" = "$click_db_custom" ]; then
|
||||
# FIXME: there is no good way to stop click from
|
||||
# deduplicating things when installing the same package in
|
||||
# multiple databases; the best we can do is to temporarily
|
||||
# pretend that the core database does not exist
|
||||
mv /etc/click/databases/10_core.conf \
|
||||
/etc/click/databases/10_core.conf.tmp
|
||||
fi
|
||||
click install --force-missing-framework --root="$root" --all-users $click_install_flags \
|
||||
"$tmpdir/$package"
|
||||
if [ "$root" = "$click_db_custom" ]; then
|
||||
mv /etc/click/databases/10_core.conf.tmp \
|
||||
/etc/click/databases/10_core.conf
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# make sure the phablet user is in the autopilot group
|
||||
# (the user is not available when the package postinst
|
||||
# adds all users of the sudo group to the autopilot one
|
||||
# so we re-run the package configuration now
|
||||
|
||||
echo "making sure phablet user is in the autopilot group"
|
||||
|
||||
for pkg in python-autopilot python3-autopilot; do
|
||||
if dpkg-query -W -f '${Status}\n' "$pkg" 2>/dev/null | \
|
||||
grep -q ' installed$'; then
|
||||
dpkg-reconfigure "$pkg"
|
||||
break
|
||||
fi
|
||||
done
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "I: making libhybris the default alternatives for @DEB_HOST_MULTIARCH@_egl_conf"
|
||||
update-alternatives --set @DEB_HOST_MULTIARCH@_egl_conf /usr/lib/@DEB_HOST_MULTIARCH@/libhybris-egl/ld.so.conf
|
||||
|
||||
# ldconfig needs to be run immediately as we're changing /etc/ld.so.conf.d/ with alternatives.
|
||||
LDCONFIG_NOTRIGGER=y ldconfig
|
@ -1,55 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
FEATURES=/var/cache/apparmor/.features
|
||||
|
||||
echo "I: precompiling click apparmor policies"
|
||||
/sbin/apparmor_parser -v -M ${FEATURES} -Q --write-cache --cache-loc=/var/cache/apparmor/ `find /var/lib/apparmor/profiles/ -maxdepth 1 -type f -not -path '*/\.*'`
|
||||
|
||||
echo "I: precompiling deb apparmor policies"
|
||||
/sbin/apparmor_parser -v -M ${FEATURES} -Q --write-cache --cache-loc=/etc/apparmor.d/cache/ `find /etc/apparmor.d/ -maxdepth 1 -type f -not -path '*/\.*'`
|
||||
|
||||
echo "I: precompiling custom click apparmor policies"
|
||||
mkdir -p /custom/cache/apparmor
|
||||
/sbin/apparmor_parser -v -M ${FEATURES} -Q --write-cache --cache-loc=/custom/cache/apparmor/ `find /var/lib/apparmor/profiles/ -maxdepth 1 -type f -not -path '*/\.*'`
|
||||
|
||||
#get the apparmor manifests and profiles
|
||||
mkdir -p /custom/lib/apparmor/clicks
|
||||
mkdir -p /custom/lib/apparmor/profiles
|
||||
|
||||
for manifest in /var/lib/apparmor/clicks/*; do
|
||||
# FIXME: if this code survives for very long, it should probably be
|
||||
# rewritten using click's Python bindings
|
||||
pkgdir="$(click pkgdir "$manifest")"
|
||||
manifest_real="$(readlink -f "$manifest")"
|
||||
manifest_tail="${manifest_real#$pkgdir}"
|
||||
# Does this package exist in the custom tarball? If so, move its
|
||||
# profiles there (if it only exists in custom) or copy them (if it
|
||||
# also exists in core).
|
||||
version="${pkgdir##*/}"
|
||||
pkgdir_noversion="${pkgdir%/*}"
|
||||
name="${pkgdir_noversion##*/}"
|
||||
profile="$(basename "$manifest" .json)"
|
||||
if [ -d "/custom/click/$name/$version" ]; then
|
||||
# Clone into custom.
|
||||
ln -nsf "/custom/click/$name/$version$manifest_tail" "/custom/lib/apparmor/clicks/${manifest##*/}"
|
||||
cp -a "/var/lib/apparmor/profiles/click_$profile" /custom/lib/apparmor/profiles/
|
||||
if [ -d "/usr/share/click/preinstalled/$name/$version" ]; then
|
||||
# Ensure that the version in the rootfs points to
|
||||
# the core database.
|
||||
ln -nsf "/usr/share/click/preinstalled/$name/$version$manifest_tail" "$manifest"
|
||||
else
|
||||
# Remove from the rootfs.
|
||||
rm -f "$manifest"
|
||||
rm -f "/var/lib/apparmor/profiles/click_$profile"
|
||||
rm -f "/var/cache/apparmor/click_$profile"
|
||||
fi
|
||||
else
|
||||
# Remove from custom.
|
||||
rm -f "/custom/cache/apparmor/click_$profile"
|
||||
fi
|
||||
done
|
||||
|
||||
ls -l /custom/cache/apparmor/
|
||||
echo "I: touching cache files to sanitize possible timestamp issues"
|
||||
touch /custom/cache/apparmor/*
|
||||
ls -l /custom/cache/apparmor/
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# remove-documentation: Remove unnecessary documentation to reduce disk usage
|
||||
#
|
||||
# Author: Alex Chiang <achiang@canonical.com>
|
||||
# Date : November 9, 2010
|
||||
|
||||
echo "Removing documentation..."
|
||||
find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true
|
||||
find /usr/share/doc -empty|xargs rmdir || true
|
||||
rm -rf /usr/share/man /usr/share/groff /usr/share/info /usr/share/lintian /usr/share/linda /var/cache/man
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# remove-lists: Remove all apt lists for space as our apport does not need them
|
||||
#
|
||||
# Author: Łukasz 'sil2100' Zemczak <achiang@canonical.com>
|
||||
# Date : September 22, 2015
|
||||
|
||||
echo "Removing /var/lib/apt/lists/* from the binary"
|
||||
find binary/boot/filesystem.dir/var/lib/apt/lists/ -type f | xargs rm -f
|
@ -1,55 +0,0 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
ERRCNT=""
|
||||
|
||||
passwd_hash=$(set -- $(md5sum /etc/passwd) && echo $1)
|
||||
shadow_hash=$(set -- $(cat /etc/shadow | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1)
|
||||
group_length=$(cat /etc/group | wc -l)
|
||||
gshadow_length=$(cat /etc/gshadow | wc -l)
|
||||
|
||||
passwd_orig_hash=$(set -- $(md5sum /etc/passwd.orig) && echo $1)
|
||||
shadow_orig_hash=$(set -- $(cat /etc/shadow.orig | sed "s/:.*:0:99999:/:0:99999:/g" | md5sum) && echo $1)
|
||||
group_orig_length=$(cat /etc/group.orig | wc -l)
|
||||
gshadow_orig_length=$(cat /etc/gshadow.orig | wc -l)
|
||||
|
||||
if [ "$passwd_hash" != "$passwd_orig_hash" ]; then
|
||||
echo "/etc/passwd has changed during setup." >&2
|
||||
echo "The new /etc/passwd md5sum is: $passwd_hash" >&2
|
||||
diff -Nrup /etc/passwd.orig /etc/passwd >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ "$shadow_hash" != "$shadow_orig_hash" ]; then
|
||||
echo "/etc/shadow has changed during setup." >&2
|
||||
echo "The new /etc/shadow md5sum is: $shadow_hash" >&2
|
||||
diff -Nrup /etc/shadow.orig /etc/shadow >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ "$group_length" != "$group_orig_length" ]; then
|
||||
echo "/etc/group has changed during setup." >&2
|
||||
diff -Nrup /etc/group.orig /etc/group >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ "$gshadow_length" != "$gshadow_orig_length" ]; then
|
||||
echo "/etc/gshadow has changed during setup." >&2
|
||||
diff -Nrup /etc/gshadow.orig /etc/gshadow >&2 || true
|
||||
ERRCNT=1
|
||||
fi
|
||||
|
||||
if [ -n "$ERRCNT" ]; then
|
||||
echo "There were changes to the password database," >&2
|
||||
echo "please adjust the values in the livecd-rootfs source in the file:" >&2
|
||||
echo "live-build/ubuntu-touch/hooks/00-uid-gid-fix.chroot_early" >&2
|
||||
echo >&2
|
||||
echo "Please check also if a maintainer script of the package" >&2
|
||||
echo "that added these entries perhaps created a home directory and," >&2
|
||||
echo "if needed, add code for creation of it to the above hook" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "ownership of /var/log after build:" >&2
|
||||
ls -ln /var| grep log >&2
|
||||
|
||||
rm /etc/passwd.orig /etc/shadow.orig /etc/group.orig /etc/gshadow.orig
|
@ -1 +0,0 @@
|
||||
LANG="en_US.UTF-8"
|
@ -1 +0,0 @@
|
||||
ubuntu-phablet
|
@ -1,10 +0,0 @@
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
::1 ubuntu-phablet localhost6.localdomain6 localhost6
|
||||
127.0.1.1 ubuntu-phablet
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 localhost ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
ff02::3 ip6-allhosts
|
@ -1,3 +0,0 @@
|
||||
[Seat:*]
|
||||
autologin-user=phablet
|
||||
greeter-allow-guest=false
|
@ -1,52 +0,0 @@
|
||||
dbus {mask {acquire send receive
|
||||
}
|
||||
}
|
||||
signal {mask {hup int quit ill trap abrt bus fpe kill usr1 segv usr2 pipe alrm term stkflt chld cont stop stp ttin ttou urg xcpu xfsz vtalrm prof winch io pwr sys emt lost
|
||||
}
|
||||
}
|
||||
ptrace {mask {read trace
|
||||
}
|
||||
}
|
||||
caps {mask {chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm epollwakeup
|
||||
}
|
||||
}
|
||||
rlimit {mask {cpu fsize data stack core rss nproc nofile memlock as locks sigpending msgqueue nice rtprio rttime
|
||||
}
|
||||
}
|
||||
capability {0xffffff
|
||||
}
|
||||
namespaces {pivot_root {yes
|
||||
}
|
||||
profile {yes
|
||||
}
|
||||
}
|
||||
mount {mask {mount umount
|
||||
}
|
||||
}
|
||||
network {af_unix {yes
|
||||
}
|
||||
af_mask {unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc
|
||||
}
|
||||
}
|
||||
file {mask {create read write exec append mmap_exec link lock
|
||||
}
|
||||
}
|
||||
domain {change_profile {yes
|
||||
}
|
||||
change_onexec {yes
|
||||
}
|
||||
change_hatv {yes
|
||||
}
|
||||
change_hat {yes
|
||||
}
|
||||
}
|
||||
policy {set_load {yes
|
||||
}
|
||||
versions {v7 {yes
|
||||
}
|
||||
v6 {yes
|
||||
}
|
||||
v5 {yes
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user