Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Elementary Target #2973

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions chroot-bin/startelementary
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh -e
# Copyright (c) 2016 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Launches ELEMENTARY

exec crouton-noroot gnome-session-wrapper pantheon
18 changes: 18 additions & 0 deletions host-bin/startelementary
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh -e
# Copyright (c) 2016 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

set -e

APPLICATION="${0##*/}"

USAGE="$APPLICATION [options]

Wraps enter-chroot to start a GNOME session.
By default, it will log into the primary user on the first chroot found.

Options are directly passed to enter-chroot; run enter-chroot to list them."

exec sh -e "`dirname "\`readlink -f "$0"\`"`/enter-chroot" -t elementary "$@" "" \
exec startelementary
54 changes: 54 additions & 0 deletions targets/elementary
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh -e
# Copyright (c) 2016 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

if [ "${TARGETNOINSTALL:-c}" = 'c' ]; then
if [ "$DISTRO" != 'ubuntu' ]; then
error 99 "elementary target is only supported on Ubuntu."
elif ! release -eq precise -o release -eq trusty -o release -eq xenial -o \
release -eq yakkety -o release -eq zesty; then
error 99 "elementary desktop is not available on this release."
fi
fi

REQUIRES='x11'
DESCRIPTION='Installs the ELEMENTARY desktop environment. (Approx. 700MB)'
HOSTBIN='startelementary'
CHROOTBIN='crouton-noroot startelementary gnome-session-wrapper'
. "${TARGETSDIR:="$PWD"}/common"

### Append to prepare.sh:
apt-key adv --keyserver 'keyserver.ubuntu.com' \
--recv-keys '4E1F8A59'

# Stable branch only available for LTS releases
# Expiremental daily branch available for other releases
if release -eq precise -o release -eq trusty -o release -eq xenial; then
cat > '/etc/apt/sources.list.d/elementary-os.list' <<EOF
deb http://ppa.launchpad.net/elementary-os/os-patches/ubuntu $RELEASE main
deb-src http://ppa.launchpad.net/elementary-os/os-patches/ubuntu $RELEASE main
deb http://ppa.launchpad.net/elementary-os/stable/ubuntu $RELEASE main
deb-src http://ppa.launchpad.net/elementary-os/stable/ubuntu $RELEASE main
EOF
else
cat > '/etc/apt/sources.list.d/elementary-os.list' <<EOF
deb http://ppa.launchpad.net/elementary-os/os-patches/ubuntu $RELEASE main
deb-src http://ppa.launchpad.net/elementary-os/os-patches/ubuntu $RELEASE main
deb http://ppa.launchpad.net/elementary-os/daily/ubuntu $RELEASE main
deb-src http://ppa.launchpad.net/elementary-os/daily/ubuntu $RELEASE main
EOF
fi

apt-get -y update
install pantheon elementary-wallpapers elementary-icon-theme \
elementary-artwork elementary-default-settings \
switchboard switchboard-gnome-control-center switchboard-plug-about \
switchboard-plug-display switchboard-plug-pantheon-shell \
switchboard-plug-gcc-date switchboard-plug-gcc-users \
switchboard-gnome-control-center-override


TIPS="$TIPS
You can start Elementary OS via the startelementary host command: sudo startelementary
"
10 changes: 10 additions & 0 deletions targets/elementary-desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh -e
# Copyright (c) 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
REQUIRES='elementary'
DESCRIPTION='Installs ELEMENTARY along with common applications. (Approx. 1300MB)'
. "${TARGETSDIR:="$PWD"}/common"

### Append to prepare.sh:
install elementary-desktop
16 changes: 16 additions & 0 deletions test/tests/w8-elementary
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh -e
# Copyright (c) 2016 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

if [ -z "$release" ]; then
echo "all"
exit 0
fi

target="elementary"
startcmd="startelementary"
xte=""

# Run common file
. "$SCRIPTDIR/test/tests/w0-common"
16 changes: 16 additions & 0 deletions test/tests/w8d-elementary-desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh -e
# Copyright (c) 2016 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

if [ -z "$release" ]; then
echo "all"
exit 0
fi

target="elementary-desktop"
startcmd="startelementary"
xte=""

# Run common file
. "$SCRIPTDIR/test/tests/w0-common"
2 changes: 1 addition & 1 deletion test/tests/x0-alltargets
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for target in "$SCRIPTDIR/targets/"*; do
# Some other targets do not require testing in this context,
# or have their own w* tests
for blacklist in audio core x11 xiwi xorg \
e17 gnome kde lxde unity xbmc xfce; do
e17 gnome kde lxde unity xbmc xfce elementary; do
if [ "$target" = "$blacklist" ]; then
break
fi
Expand Down