Gentoo Archives: gentoo-commits

From: Liam McLoughlin <hexxeh@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoaster:webui commit in: /, res/, configs/
Date: Tue, 02 Aug 2011 17:09:26
Message-Id: 39197c305474df0332f150388a404f698d24b685.hexxeh@gentoo
1 commit: 39197c305474df0332f150388a404f698d24b685
2 Author: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
3 AuthorDate: Tue Aug 2 16:48:28 2011 +0000
4 Commit: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
5 CommitDate: Tue Aug 2 17:09:15 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=39197c30
7
8 Keyboard layout support for build tool, Stage3/Portage/BINHOST override from config files
9
10 ---
11 configs/fluxbox.ini | 1 +
12 configs/minimal.ini | 1 +
13 configs/xfce.ini | 1 +
14 create_image.sh | 38 +++++++----
15 daemon.php | 2 +-
16 res/keyboard.lst | 184 +++++++++++++++++++++++++-------------------------
17 6 files changed, 121 insertions(+), 106 deletions(-)
18
19 diff --git a/configs/fluxbox.ini b/configs/fluxbox.ini
20 index f199237..409ec8b 100644
21 --- a/configs/fluxbox.ini
22 +++ b/configs/fluxbox.ini
23 @@ -5,6 +5,7 @@ BOOT_MEGABYTES='64'
24 SWAP_MEGABYTES='128'
25 ROOT_MEGABYTES='7999'
26 TIMEZONE='Europe/London'
27 +KEYBOARD='gb'
28 HOSTNAME='gentoo'
29 ROOT_PASSWORD='g3nt00'
30 DEFAULT_USERNAME='gentoo'
31
32 diff --git a/configs/minimal.ini b/configs/minimal.ini
33 index 0d7eed6..f841cc2 100644
34 --- a/configs/minimal.ini
35 +++ b/configs/minimal.ini
36 @@ -5,6 +5,7 @@ BOOT_MEGABYTES='64'
37 SWAP_MEGABYTES='128'
38 ROOT_MEGABYTES='3903'
39 TIMEZONE='Europe/London'
40 +KEYBOARD='gb'
41 HOSTNAME='gentoo'
42 ROOT_PASSWORD='g3nt00'
43 DEFAULT_USERNAME='gentoo'
44
45 diff --git a/configs/xfce.ini b/configs/xfce.ini
46 index 6c249ee..60ce144 100644
47 --- a/configs/xfce.ini
48 +++ b/configs/xfce.ini
49 @@ -5,6 +5,7 @@ BOOT_MEGABYTES='64'
50 SWAP_MEGABYTES='128'
51 ROOT_MEGABYTES='16190'
52 TIMEZONE='Europe/London'
53 +KEYBOARD='gb'
54 HOSTNAME='gentoo'
55 ROOT_PASSWORD='g3nt00'
56 DEFAULT_USERNAME='gentoo'
57
58 diff --git a/create_image.sh b/create_image.sh
59 index 2da2d6f..3858dac 100755
60 --- a/create_image.sh
61 +++ b/create_image.sh
62 @@ -52,11 +52,20 @@ LOG_FILE="${IMAGE_WORK_PATH}/log.txt"
63 TOOL_RES_PATH=${RUNNING_DIRECTORY}/res
64
65 NUM_JOBS=$(( `grep -c processor /proc/cpuinfo`+1 ))
66 -STAGE3_URL="http://distribution.hexxeh.net/gentoo/stage3-i686-latest.tar.bz2"
67 -PORTAGE_URL="http://distribution.hexxeh.net/gentoo/portage-latest.tar.bz2"
68 -BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
69 EMERGE_PROXY="${FLAGS_proxy}"
70
71 +if [ -z ${STAGE3_URL} ]; then
72 + STAGE3_URL="http://distribution.hexxeh.net/gentoo/stage3-i686-latest.tar.bz2"
73 +fi
74 +
75 +if [ -z ${PORTAGE_URL} ]; then
76 + PORTAGE_URL="http://distribution.hexxeh.net/gentoo/portage-latest.tar.bz2"
77 +fi
78 +
79 +if [ -z ${BINHOST_URL} ]; then
80 + BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
81 +fi
82 +
83 # Clean up old mounts
84 cleanup_mounts() {
85 sleep 2
86 @@ -191,19 +200,22 @@ linux32 chroot . /bin/bash /etc/profile &>> ${LOG_FILE}
87 echo "Step 13: Setting timezone to ${TIMEZONE}"
88 linux32 chroot . cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime &>> ${LOG_FILE}
89
90 -echo "Step 14: Setting hostname to ${HOSTNAME}"
91 +echo "Step 14: Setting keyboard layout to ${KEYBOARD}"
92 +linux32 chroot . sed -i -e "s/keymap=.*/keymap=\"${KEYBOARD}\"/" /etc/conf.d/keymaps &>> ${LOG_FILE}
93 +
94 +echo "Step 15: Setting hostname to ${HOSTNAME}"
95 linux32 chroot . /bin/bash -c "echo hostname='${HOSTNAME}' > /etc/conf.d/hostname" &>> ${LOG_FILE}
96 linux32 chroot . /bin/bash -c "echo 127.0.0.1 ${HOSTNAME}.local ${HOSTNAME} localhost > /etc/hosts" &>> ${LOG_FILE}
97
98 -echo "Step 15: Copying new fstab"
99 +echo "Step 16: Copying new fstab"
100 cp ${TOOL_RES_PATH}/fstab etc/fstab &>> ${LOG_FILE}
101
102 -echo "Step 16: Setting up networking"
103 +echo "Step 17: Setting up networking"
104 echo 'config_eth0=( "dhcp" )' > etc/conf.d/net
105 cp etc/init.d/net.lo etc/init.d/net.eth0
106 linux32 chroot . rc-update add net.eth0 default &>> ${LOG_FILE}
107
108 -echo "Step 17: Setting up kernel"
109 +echo "Step 18: Setting up kernel"
110 # If we got the flag, used a cached kernel to reduce build times for testing
111 if [[ ${FLAGS_cachedkernel} -eq ${FLAGS_TRUE} ]]; then
112 echo "Using cached kernel" &>> ${LOG_FILE}
113 @@ -227,16 +239,16 @@ else
114 cp usr/src/linux/arch/i386/boot/bzImage boot/kernel &>> ${LOG_FILE} || handle_error "Error copying kernel"
115 fi
116
117 -echo "Step 18: Setting root password"
118 +echo "Step 19: Setting root password"
119 linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LOG_FILE} || handle_error "Error setting root password"
120
121 -echo "Step 19: Processing packages list"
122 +echo "Step 20: Processing packages list"
123 for PACKAGE in ${PACKAGES_LIST}; do
124 echo "Installing ${PACKAGE}" &>> ${LOG_FILE}
125 linux32 chroot . emerge --jobs=${NUM_JOBS} ${PACKAGE} &>> ${LOG_FILE} || handle_error "Error emerging ${PACKAGE}"
126 done
127
128 -echo "Step 20: Adding default user"
129 +echo "Step 21: Adding default user"
130 linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME} || handle_error "Error adding default user"
131 linux32 chroot . /bin/bash -c "echo '${DEFAULT_USERNAME}:${DEFAULT_PASSWORD}' | chpasswd" &>> ${LOG_FILE} || handle_error "Error setting default user password"
132
133 @@ -249,13 +261,13 @@ then
134 linux32 chroot . usermod -a vboxguest ${DEFAULT_USERNAME}
135 fi
136
137 -echo "Step 21: Cleaning up make.conf"
138 +echo "Step 22: Cleaning up make.conf"
139 if [ -n ${EMERGE_PROXY} ]; then
140 sed -i '/http_proxy/ d' etc/make.conf
141 fi
142 sed -i '/MAKEOPTS/ d' etc/make.conf
143
144 -echo "Step 22: Installing extlinux"
145 +echo "Step 23: Installing extlinux"
146 extlinux --heads 255 --sectors 63 --install boot &>> ${LOG_FILE} || handle_error "Error installing extlinux"
147 dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE} || handle_error "Error copying extlinux MBR"
148 cp ${TOOL_RES_PATH}/extlinux.conf boot/ || handle_error "Error copying extlinux configuration"
149 @@ -291,6 +303,6 @@ if [[ ${FLAGS_compress} -eq ${FLAGS_TRUE} ]]; then
150 IMAGE_OUT="${BUILD_ID}.tar.gz"
151 fi
152
153 -echo "Step 23: Image build completed!"
154 +echo "Step 24: Image build completed!"
155 echo "Your image is here: ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}"
156 echo "Your log file is here: ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log"
157
158 diff --git a/daemon.php b/daemon.php
159 index 6704053..65d7d2b 100644
160 --- a/daemon.php
161 +++ b/daemon.php
162 @@ -53,7 +53,7 @@
163
164 function image_build($job)
165 {
166 - $progressMagic = 23;
167 + $progressMagic = 24;
168
169 $handle = $job->handle();
170 $handlehash = md5($handle);
171
172 diff --git a/res/keyboard.lst b/res/keyboard.lst
173 index 61ed3b2..076ae13 100644
174 --- a/res/keyboard.lst
175 +++ b/res/keyboard.lst
176 @@ -1,92 +1,92 @@
177 - us United States
178 - ad Andorra
179 - af Afghanistan
180 - ara Arabic
181 - al Albania
182 - am Armenia
183 - at Austria
184 - az Azerbaijan
185 - by Belarus
186 - be Belgium
187 - bd Bangladesh
188 - in India
189 - ba Bosnia and Herzegovina
190 - br Brazil
191 - bg Bulgaria
192 - ma Morocco
193 - mm Myanmar
194 - ca Canada
195 - cd Congo, Democratic Republic of the
196 - cn China
197 - hr Croatia
198 - cz Czechia
199 - dk Denmark
200 - nl Netherlands
201 - bt Bhutan
202 - ee Estonia
203 - ir Iran
204 - iq Iraq
205 - fo Faroe Islands
206 - fi Finland
207 - fr France
208 - gh Ghana
209 - gn Guinea
210 - ge Georgia
211 - de Germany
212 - gr Greece
213 - hu Hungary
214 - is Iceland
215 - il Israel
216 - it Italy
217 - jp Japan
218 - kg Kyrgyzstan
219 - kh Cambodia
220 - kz Kazakhstan
221 - la Laos
222 - latam Latin American
223 - lt Lithuania
224 - lv Latvia
225 - mao Maori
226 - me Montenegro
227 - mk Macedonia
228 - mt Malta
229 - mn Mongolia
230 - no Norway
231 - pl Poland
232 - pt Portugal
233 - ro Romania
234 - ru Russia
235 - rs Serbia
236 - si Slovenia
237 - sk Slovakia
238 - es Spain
239 - se Sweden
240 - ch Switzerland
241 - sy Syria
242 - tj Tajikistan
243 - lk Sri Lanka
244 - th Thailand
245 - tr Turkey
246 - tw Taiwan
247 - ua Ukraine
248 - gb United Kingdom
249 - uz Uzbekistan
250 - vn Vietnam
251 - kr Korea, Republic of
252 - nec_vndr/jp Japan (PC-98xx Series)
253 - ie Ireland
254 - pk Pakistan
255 - mv Maldives
256 - za South Africa
257 - epo Esperanto
258 - np Nepal
259 - ng Nigeria
260 - et Ethiopia
261 - sn Senegal
262 - brai Braille
263 - tm Turkmenistan
264 - ml Mali
265 - tz Tanzania
266 - ke Kenya
267 - bw Botswana
268 - ph Philippines
269 +us United States
270 +ad Andorra
271 +af Afghanistan
272 +ara Arabic
273 +al Albania
274 +am Armenia
275 +at Austria
276 +az Azerbaijan
277 +by Belarus
278 +be Belgium
279 +bd Bangladesh
280 +in India
281 +ba Bosnia and Herzegovina
282 +br Brazil
283 +bg Bulgaria
284 +ma Morocco
285 +mm Myanmar
286 +ca Canada
287 +cd Congo, Democratic Republic of the
288 +cn China
289 +hr Croatia
290 +cz Czechia
291 +dk Denmark
292 +nl Netherlands
293 +bt Bhutan
294 +ee Estonia
295 +ir Iran
296 +iq Iraq
297 +fo Faroe Islands
298 +fi Finland
299 +fr France
300 +gh Ghana
301 +gn Guinea
302 +ge Georgia
303 +de Germany
304 +gr Greece
305 +hu Hungary
306 +is Iceland
307 +il Israel
308 +it Italy
309 +jp Japan
310 +kg Kyrgyzstan
311 +kh Cambodia
312 +kz Kazakhstan
313 +la Laos
314 +latam Latin American
315 +lt Lithuania
316 +lv Latvia
317 +mao Maori
318 +me Montenegro
319 +mk Macedonia
320 +mt Malta
321 +mn Mongolia
322 +no Norway
323 +pl Poland
324 +pt Portugal
325 +ro Romania
326 +ru Russia
327 +rs Serbia
328 +si Slovenia
329 +sk Slovakia
330 +es Spain
331 +se Sweden
332 +ch Switzerland
333 +sy Syria
334 +tj Tajikistan
335 +lk Sri Lanka
336 +th Thailand
337 +tr Turkey
338 +tw Taiwan
339 +ua Ukraine
340 +gb United Kingdom
341 +uz Uzbekistan
342 +vn Vietnam
343 +kr Korea, Republic of
344 +nec_vndr/jp Japan (PC-98xx Series)
345 +ie Ireland
346 +pk Pakistan
347 +mv Maldives
348 +za South Africa
349 +epo Esperanto
350 +np Nepal
351 +ng Nigeria
352 +et Ethiopia
353 +sn Senegal
354 +brai Braille
355 +tm Turkmenistan
356 +ml Mali
357 +tz Tanzania
358 +ke Kenya
359 +bw Botswana
360 +ph Philippines