Merge lp:~jamesodhunt/livecd-rootfs/ubuntu-core-chroot-config into lp:livecd-rootfs

Proposed by James Hunt
Status: Merged
Merged at revision: 938
Proposed branch: lp:~jamesodhunt/livecd-rootfs/ubuntu-core-chroot-config
Merge into: lp:livecd-rootfs
Diff against target: 62 lines (+33/-2)
4 files modified
live-build/auto/config (+2/-2)
live-build/ubuntu-core/hooks/01-setup_user.chroot (+12/-0)
live-build/ubuntu-core/hooks/02-add_user_to_groups.chroot (+8/-0)
live-build/ubuntu-core/hooks/99-remove-documentation.chroot (+11/-0)
To merge this branch: bzr merge lp:~jamesodhunt/livecd-rootfs/ubuntu-core-chroot-config
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+228759@code.launchpad.net
To post a comment you must log in.
935. By James Hunt

* ubuntu-core: Ensure user can use sudo.

Revision history for this message
Colin Watson (cjwatson) wrote :

Looks OK for experimental use at least, though I'm not sure that removing documentation is as appropriate for this use case as it is on the phone. We still want the system to be friendly to developers.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'live-build/auto/config'
2--- live-build/auto/config 2014-07-29 03:17:14 +0000
3+++ live-build/auto/config 2014-07-29 20:47:01 +0000
4@@ -547,8 +547,8 @@
5 fi
6 ;;
7
8- ubuntu-touch)
9- cp -af /usr/share/livecd-rootfs/live-build/ubuntu-touch/* \
10+ ubuntu-touch|ubuntu-core)
11+ cp -af /usr/share/livecd-rootfs/live-build/${PROJECT}/* \
12 config/
13 ;;
14 esac
15
16=== added directory 'live-build/ubuntu-core'
17=== added directory 'live-build/ubuntu-core/hooks'
18=== added file 'live-build/ubuntu-core/hooks/01-setup_user.chroot'
19--- live-build/ubuntu-core/hooks/01-setup_user.chroot 1970-01-01 00:00:00 +0000
20+++ live-build/ubuntu-core/hooks/01-setup_user.chroot 2014-07-29 20:47:01 +0000
21@@ -0,0 +1,12 @@
22+#!/bin/sh -x
23+
24+USER=ubuntu
25+UGID=1000
26+
27+echo "I: creating default user $USER"
28+adduser --gecos $USER --disabled-login $USER --uid $UGID
29+
30+echo "I: set user $USER password to $USER"
31+echo "$USER:$USER" | chpasswd
32+
33+chown -R $UGID:$UGID /home/$USER
34
35=== added file 'live-build/ubuntu-core/hooks/02-add_user_to_groups.chroot'
36--- live-build/ubuntu-core/hooks/02-add_user_to_groups.chroot 1970-01-01 00:00:00 +0000
37+++ live-build/ubuntu-core/hooks/02-add_user_to_groups.chroot 2014-07-29 20:47:01 +0000
38@@ -0,0 +1,8 @@
39+#!/bin/sh -x
40+
41+USER=ubuntu
42+
43+DEFGROUPS="sudo"
44+
45+echo "I: add $USER to ($DEFGROUPS) group(s)"
46+usermod -a -G ${DEFGROUPS} ${USER}
47
48=== added file 'live-build/ubuntu-core/hooks/99-remove-documentation.chroot'
49--- live-build/ubuntu-core/hooks/99-remove-documentation.chroot 1970-01-01 00:00:00 +0000
50+++ live-build/ubuntu-core/hooks/99-remove-documentation.chroot 2014-07-29 20:47:01 +0000
51@@ -0,0 +1,11 @@
52+#!/bin/bash
53+
54+# remove-documentation: Remove unnecessary documentation to reduce disk usage
55+#
56+# Author: Alex Chiang <achiang@canonical.com>
57+# Date : November 9, 2010
58+
59+echo "Removing documentation..."
60+find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true
61+find /usr/share/doc -empty|xargs rmdir || true
62+rm -rf /usr/share/man /usr/share/groff /usr/share/info /usr/share/lintian /usr/share/linda /var/cache/man

Subscribers

People subscribed via source and target branches