Merge lp:~tom-gall/linaro/fix-752843-live-helper.config.natty.nano into lp:~linaro-maintainers/linaro/live-helper.config.natty.nano

Proposed by Tom Gall
Status: Merged
Approved by: Tom Gall
Approved revision: 47
Merge reported by: Tom Gall
Merged at revision: not available
Proposed branch: lp:~tom-gall/linaro/fix-752843-live-helper.config.natty.nano
Merge into: lp:~linaro-maintainers/linaro/live-helper.config.natty.nano
Diff against target: 187 lines (+131/-3)
6 files modified
binary_local-hooks/51-rm-usr-share-parts.sh (+105/-0)
binary_local-hooks/52-rm-etc-parts.sh (+7/-0)
binary_local-hooks/53-rm-var-lib-parts.sh (+15/-0)
chroot (+1/-1)
common (+1/-1)
conf_create.sh (+2/-1)
To merge this branch: bzr merge lp:~tom-gall/linaro/fix-752843-live-helper.config.natty.nano
Reviewer Review Type Date Requested Status
Steve Langasek (community) Needs Information
Review via email: mp+57382@code.launchpad.net

Description of the change

add to binary_local-hooks 51-rm-usr-share-parts.sh 52-rm-etc-parts.sh 53-rm-var-lib-parts.sh scripts to throw out uneeded files

set LH_APT_RECOMMENDS to false
in conf_create specifically add linaro-nano to package list

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

51-rm-usr-share-parts.sh seems to largely be a recreation of chroot_local-hooks/04-purge-docs.sh from the alip config. Any reason not to use this same hook? (Sorry if you didn't know this was there!)

A few differences between the alip hook and this one that are probably worth discussing:

 - rm -rf ./usr/share/doc - this removes all the copyright files. I think we need to retain these for legal reasons?
 - /usr/share/X11, /usr/share/xul-ext - would it be possible instead to fix the seed to not pull in anything that creates these directories? (which packages install to them?)
 - /usr/share/locale - I recall that we discussed this but can't remember now why it was decided we need to keep the en locales instead of just letting people use the default C locale? (If only the C locale needs to be supported, we can just remove the locales package)
 - /usr/share/i18n/locales - good addition; I wonder why this wasn't already being done in the example I got from Martin Pitt. (I think we should add this to the alip hook also)
 - /usr/share/i18n/charmaps - seems kind of arbitrary. Why are you keeping the DOS and Mac codepages, for instance?
 - /etc/X11, /etc/firefox - again, what is putting stuff here as part of nano?

review: Needs Information
Revision history for this message
Tom Gall (tom-gall) wrote :

This script predates the alip script you had created.

I can see adding back in the copyright/license files.

For /usr/share/[X11 | xul-ext] yes going after the original offender would probably be best served but I think that would be lower priority.

Locales, yes there is the step to not include the locales package at all. That's in your inbox to review as well. ;-)

/usr/share/i18n/charmaps is somewhat arbitrary. The set remaining is more a reflection of their size then use, IIRC. There is a point were you have to ask yourself how much time should you spend further deleting a few more K vs other low hanging fruit.

/etc/X11 /etc/firefox - I think it's a combination of branding and live-build making assumptions. At this point it's easy enough to just delete it as part of the script, continue to ask questions and adjust accordingly as the second round of nano review items land.

48. By Tom Gall

do not remove usr/share/docs to preserve license and copyrightfiles

Revision history for this message
Tom Gall (tom-gall) wrote :

removed deletion of /usr/share/docs from script.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'binary_local-hooks/51-rm-usr-share-parts.sh'
2--- binary_local-hooks/51-rm-usr-share-parts.sh 1970-01-01 00:00:00 +0000
3+++ binary_local-hooks/51-rm-usr-share-parts.sh 2011-04-29 16:05:49 +0000
4@@ -0,0 +1,105 @@
5+#!/bin/sh
6+
7+cd binary
8+
9+echo "I: rm /usr/share/man"
10+rm -rf ./usr/share/man/*
11+# xkb
12+echo "I: rm /usr/share/X11"
13+rm -rf ./usr/share/X11
14+
15+echo "I: rm /usr/share/xul-ext"
16+rm -rf ./usr/share/xul-ext
17+
18+echo "I: slim /usr/share/i18n"
19+rm -rf ./usr/share/i18n/locales/a*
20+rm -rf ./usr/share/i18n/locales/b*
21+rm -rf ./usr/share/i18n/locales/c*
22+rm -rf ./usr/share/i18n/locales/d*
23+rm -rf ./usr/share/i18n/locales/es*
24+rm -rf ./usr/share/i18n/locales/f*
25+rm -rf ./usr/share/i18n/locales/g*
26+rm -rf ./usr/share/i18n/locales/h*
27+rm -rf ./usr/share/i18n/locales/j*
28+rm -rf ./usr/share/i18n/locales/k*
29+rm -rf ./usr/share/i18n/locales/l*
30+rm -rf ./usr/share/i18n/locales/n*
31+rm -rf ./usr/share/i18n/locales/m*
32+rm -rf ./usr/share/i18n/locales/o*
33+rm -rf ./usr/share/i18n/locales/p*
34+rm -rf ./usr/share/i18n/locales/r*
35+rm -rf ./usr/share/i18n/locales/s*
36+rm -rf ./usr/share/i18n/locales/t*
37+rm -rf ./usr/share/i18n/locales/u*
38+rm -rf ./usr/share/i18n/locales/v*
39+rm -rf ./usr/share/i18n/locales/w*
40+rm -rf ./usr/share/i18n/locales/y*
41+rm -rf ./usr/share/i18n/locales/z*
42+rm -rf ./usr/share/i18n/locales/el*
43+rm -rf ./usr/share/i18n/locales/eo*
44+rm -rf ./usr/share/i18n/locales/et*
45+rm -rf ./usr/share/i18n/locales/it*
46+rm -rf ./usr/share/i18n/locales/iu*
47+rm -rf ./usr/share/i18n/locales/iw*
48+
49+
50+echo "I: pair down zoneinfo to just UTC"
51+rm -rf ./usr/share/zoneinfo/A*
52+rm -rf ./usr/share/zoneinfo/B*
53+rm -rf ./usr/share/zoneinfo/C*
54+rm -rf ./usr/share/zoneinfo/E*
55+rm -rf ./usr/share/zoneinfo/F*
56+rm -rf ./usr/share/zoneinfo/H*
57+rm -rf ./usr/share/zoneinfo/I*
58+rm -rf ./usr/share/zoneinfo/J*
59+rm -rf ./usr/share/zoneinfo/K*
60+rm -rf ./usr/share/zoneinfo/L*
61+rm -rf ./usr/share/zoneinfo/M*
62+rm -rf ./usr/share/zoneinfo/N*
63+rm -rf ./usr/share/zoneinfo/P*
64+rm -rf ./usr/share/zoneinfo/r*
65+rm -rf ./usr/share/zoneinfo/R*
66+rm -rf ./usr/share/zoneinfo/Singapore
67+rm -rf ./usr/share/zoneinfo/T*
68+rm -rf ./usr/share/zoneinfo/US
69+rm -rf ./usr/share/zoneinfo/W*
70+rm -rf ./usr/share/zoneinfo/Z*
71+
72+echo "I: pair down /usr/share/locale"
73+rm -rf ./usr/share/locale/a*
74+rm -rf ./usr/share/locale/b*
75+rm -rf ./usr/share/locale/c*
76+rm -rf ./usr/share/locale/d*
77+rm -rf ./usr/share/locale/e*
78+rm -rf ./usr/share/locale/f*
79+rm -rf ./usr/share/locale/g*
80+rm -rf ./usr/share/locale/h*
81+rm -rf ./usr/share/locale/i*
82+rm -rf ./usr/share/locale/j*
83+rm -rf ./usr/share/locale/k*
84+rm -rf ./usr/share/locale/lt
85+rm -rf ./usr/share/locale/m*
86+rm -rf ./usr/share/locale/n*
87+rm -rf ./usr/share/locale/p*
88+rm -rf ./usr/share/locale/r*
89+rm -rf ./usr/share/locale/s*
90+rm -rf ./usr/share/locale/t*
91+rm -rf ./usr/share/locale/u*
92+rm -rf ./usr/share/locale/z*
93+
94+echo "I: remove /usr/share/info"
95+rm -rf ./usr/share/info
96+
97+echo "I: pair down /usr/share/i18n/charmaps"
98+rm -rf ./usr/share/i18n/charmaps/W*
99+rm -rf ./usr/share/i18n/charmaps/V*
100+rm -rf ./usr/share/i18n/charmaps/T*
101+rm -rf ./usr/share/i18n/charmaps/S*
102+rm -rf ./usr/share/i18n/charmaps/R*
103+rm -rf ./usr/share/i18n/charmaps/P*
104+rm -rf ./usr/share/i18n/charmaps/L*
105+rm -rf ./usr/share/i18n/charmaps/K*
106+rm -rf ./usr/share/i18n/charmaps/J*
107+rm -rf ./usr/share/i18n/charmaps/E*
108+rm -rf ./usr/share/i18n/charmaps/H*
109+rm -rf ./usr/share/i18n/charmaps/B*
110
111=== added file 'binary_local-hooks/52-rm-etc-parts.sh'
112--- binary_local-hooks/52-rm-etc-parts.sh 1970-01-01 00:00:00 +0000
113+++ binary_local-hooks/52-rm-etc-parts.sh 2011-04-29 16:05:49 +0000
114@@ -0,0 +1,7 @@
115+#!/bin/sh
116+
117+cd binary
118+
119+echo "I: rm /etc/X11 and /etc/firefox"
120+rm -rf ./etc/X11
121+rm -rf ./etc/firefox
122
123=== added file 'binary_local-hooks/53-rm-var-lib-parts.sh'
124--- binary_local-hooks/53-rm-var-lib-parts.sh 1970-01-01 00:00:00 +0000
125+++ binary_local-hooks/53-rm-var-lib-parts.sh 2011-04-29 16:05:49 +0000
126@@ -0,0 +1,15 @@
127+#!/bin/sh
128+
129+cd binary
130+
131+echo "I:commented out such that dpkg and apt will work for NOW"
132+echo "I: rm /var/lib/dpkg"
133+#rm -rf ./var/lib/dpkg
134+echo "I: rm /var/lib/apt"
135+rm -f ./var/lib/apt/lists/*Packages
136+rm -f ./var/lib/apt/lists/*Sources
137+rm -f ./var/lib/apt/lists/*Release
138+rm -f ./var/lib/apt/lists/*Release.gpg
139+echo "I: rm /var/cache/apt"
140+rm -f ./var/cache/apt/pkgcache.bin
141+rm -f ./var/cache/apt/srcpkgcache.bin
142
143=== modified file 'chroot'
144--- chroot 2010-11-24 13:26:04 +0000
145+++ chroot 2011-04-29 16:05:49 +0000
146@@ -46,7 +46,7 @@
147
148 # $LH_PACKAGES: set packages to install
149 # (Default: empty)
150-LH_PACKAGES="linaro-overlay-minimal"
151+LH_PACKAGES="linaro-overlay-minimal linaro-nano"
152
153 # $LH_PACKAGES_LISTS: set package list to install
154 # (Default: )
155
156=== modified file 'common'
157--- common 2010-11-29 16:27:09 +0000
158+++ common 2011-04-29 16:05:49 +0000
159@@ -25,7 +25,7 @@
160
161 # $LH_APT_RECOMMENDS: set apt/aptitude recommends
162 # (Default: true)
163-LH_APT_RECOMMENDS="true"
164+LH_APT_RECOMMENDS="false"
165
166 # $LH_APT_SECURE: set apt/aptitude security
167 # (Default: true)
168
169=== modified file 'conf_create.sh'
170--- conf_create.sh 2011-03-30 15:22:29 +0000
171+++ conf_create.sh 2011-04-29 16:05:49 +0000
172@@ -6,7 +6,7 @@
173 keyring_packages=ubuntu-keyring
174 linux_flavours=""
175 tasks="minimal"
176- packages="linaro-overlay-minimal"
177+ packages="linaro-overlay-minimal linaro-nano"
178 packages_list=""
179 bootstrap_flavour="minimal"
180 distribution=natty
181@@ -19,6 +19,7 @@
182
183 set_settings_$flavor
184
185+export LH_APT_RECOMMENDS="false"
186 export LH_BOOTSTRAP_INCLUDE="apt-transport-https gnupg"
187 export LH_SYSLINUX_MENU_LIVE_ENTRY="Start $brand Live"
188

Subscribers

People subscribed via source and target branches

to all changes: