diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /scripts | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'scripts')
326 files changed, 50887 insertions, 0 deletions
diff --git a/scripts/README b/scripts/README new file mode 100644 index 0000000000..1b8d127245 --- /dev/null +++ b/scripts/README | |||
@@ -0,0 +1 @@ | |||
This directory contains Various useful scripts for working with OE builds | |||
diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool new file mode 100755 index 0000000000..28c2416bfe --- /dev/null +++ b/scripts/bitbake-prserv-tool | |||
@@ -0,0 +1,103 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | help () | ||
4 | { | ||
5 | base=`basename $0` | ||
6 | echo -e "Usage: $base command" | ||
7 | echo "Avaliable commands:" | ||
8 | echo -e "\texport <file.conf>: export and lock down the AUTOPR values from the PR service into a file for release." | ||
9 | echo -e "\timport <file.conf>: import the AUTOPR values from the exported file into the PR service." | ||
10 | } | ||
11 | |||
12 | clean_cache() | ||
13 | { | ||
14 | s=`bitbake -e | grep ^CACHE= | cut -f2 -d\"` | ||
15 | if [ "x${s}" != "x" ]; then | ||
16 | rm -rf ${s} | ||
17 | fi | ||
18 | } | ||
19 | |||
20 | do_export () | ||
21 | { | ||
22 | file=$1 | ||
23 | [ "x${file}" == "x" ] && help && exit 1 | ||
24 | rm -f ${file} | ||
25 | |||
26 | clean_cache | ||
27 | bitbake -R conf/prexport.conf -p | ||
28 | s=`bitbake -R conf/prexport.conf -e | grep ^PRSERV_DUMPFILE= | cut -f2 -d\"` | ||
29 | if [ "x${s}" != "x" ]; | ||
30 | then | ||
31 | [ -e $s ] && mv -f $s $file && echo "Exporting to file $file succeeded!" | ||
32 | return 0 | ||
33 | fi | ||
34 | echo "Exporting to file $file failed!" | ||
35 | return 1 | ||
36 | } | ||
37 | |||
38 | do_import () | ||
39 | { | ||
40 | file=$1 | ||
41 | [ "x${file}" == "x" ] && help && exit 1 | ||
42 | |||
43 | clean_cache | ||
44 | bitbake -R conf/primport.conf -R $file -p | ||
45 | ret=$? | ||
46 | [ $ret -eq 0 ] && echo "Importing from file $file succeeded!" || echo "Importing from file $file failed!" | ||
47 | return $ret | ||
48 | } | ||
49 | |||
50 | do_migrate_localcount () | ||
51 | { | ||
52 | df=`bitbake -R conf/migrate_localcount.conf -e | \ | ||
53 | grep ^LOCALCOUNT_DUMPFILE= | cut -f2 -d\"` | ||
54 | if [ "x${df}" == "x" ]; | ||
55 | then | ||
56 | echo "LOCALCOUNT_DUMPFILE is not defined!" | ||
57 | return 1 | ||
58 | fi | ||
59 | |||
60 | rm -rf $df | ||
61 | clean_cache | ||
62 | echo "Exporting LOCALCOUNT to AUTOINCs..." | ||
63 | bitbake -R conf/migrate_localcount.conf -p | ||
64 | [ ! $? -eq 0 ] && echo "Exporting to file $df failed!" && exit 1 | ||
65 | |||
66 | if [ -e $df ]; | ||
67 | then | ||
68 | echo "Exporting to file $df succeeded!" | ||
69 | else | ||
70 | echo "Exporting to file $df failed!" | ||
71 | exit 1 | ||
72 | fi | ||
73 | |||
74 | echo "Importing generated AUTOINC entries..." | ||
75 | [ -e $df ] && do_import $df | ||
76 | |||
77 | if [ ! $? -eq 0 ] | ||
78 | then | ||
79 | echo "Migration from LOCALCOUNT to AUTOINCs failed!" | ||
80 | return 1 | ||
81 | fi | ||
82 | |||
83 | echo "Migration from LOCALCOUNT to AUTOINCs succeeded!" | ||
84 | return 0 | ||
85 | } | ||
86 | |||
87 | [ $# -eq 0 ] && help && exit 1 | ||
88 | |||
89 | case $1 in | ||
90 | export) | ||
91 | do_export $2 | ||
92 | ;; | ||
93 | import) | ||
94 | do_import $2 | ||
95 | ;; | ||
96 | migrate_localcount) | ||
97 | do_migrate_localcount | ||
98 | ;; | ||
99 | *) | ||
100 | help | ||
101 | exit 1 | ||
102 | ;; | ||
103 | esac | ||
diff --git a/scripts/bitbake-whatchanged b/scripts/bitbake-whatchanged new file mode 100755 index 0000000000..55cfe4b234 --- /dev/null +++ b/scripts/bitbake-whatchanged | |||
@@ -0,0 +1,339 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | |||
5 | # Copyright (c) 2013 Wind River Systems, Inc. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
14 | # See the GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | |||
20 | from __future__ import print_function | ||
21 | import os | ||
22 | import sys | ||
23 | import getopt | ||
24 | import shutil | ||
25 | import re | ||
26 | import warnings | ||
27 | import subprocess | ||
28 | from optparse import OptionParser | ||
29 | |||
30 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
31 | lib_path = scripts_path + '/lib' | ||
32 | sys.path = sys.path + [lib_path] | ||
33 | |||
34 | import scriptpath | ||
35 | |||
36 | # Figure out where is the bitbake/lib/bb since we need bb.siggen and bb.process | ||
37 | bitbakepath = scriptpath.add_bitbake_lib_path() | ||
38 | if not bitbakepath: | ||
39 | sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n") | ||
40 | sys.exit(1) | ||
41 | |||
42 | import bb.siggen | ||
43 | import bb.process | ||
44 | |||
45 | # Match the stamp's filename | ||
46 | # group(1): PE_PV (may no PE) | ||
47 | # group(2): PR | ||
48 | # group(3): TASK | ||
49 | # group(4): HASH | ||
50 | stamp_re = re.compile("(?P<pv>.*)-(?P<pr>r\d+)\.(?P<task>do_\w+)\.(?P<hash>[^\.]*)") | ||
51 | sigdata_re = re.compile(".*\.sigdata\..*") | ||
52 | |||
53 | def gen_dict(stamps): | ||
54 | """ | ||
55 | Generate the dict from the stamps dir. | ||
56 | The output dict format is: | ||
57 | {fake_f: {pn: PN, pv: PV, pr: PR, task: TASK, path: PATH}} | ||
58 | Where: | ||
59 | fake_f: pv + task + hash | ||
60 | path: the path to the stamp file | ||
61 | """ | ||
62 | # The member of the sub dict (A "path" will be appended below) | ||
63 | sub_mem = ("pv", "pr", "task") | ||
64 | d = {} | ||
65 | for dirpath, _, files in os.walk(stamps): | ||
66 | for f in files: | ||
67 | # The "bitbake -S" would generate ".sigdata", but no "_setscene". | ||
68 | fake_f = re.sub('_setscene.', '.', f) | ||
69 | fake_f = re.sub('.sigdata', '', fake_f) | ||
70 | subdict = {} | ||
71 | tmp = stamp_re.match(fake_f) | ||
72 | if tmp: | ||
73 | for i in sub_mem: | ||
74 | subdict[i] = tmp.group(i) | ||
75 | if len(subdict) != 0: | ||
76 | pn = os.path.basename(dirpath) | ||
77 | subdict['pn'] = pn | ||
78 | # The path will be used by os.stat() and bb.siggen | ||
79 | subdict['path'] = dirpath + "/" + f | ||
80 | fake_f = tmp.group('pv') + tmp.group('task') + tmp.group('hash') | ||
81 | d[fake_f] = subdict | ||
82 | return d | ||
83 | |||
84 | # Re-construct the dict | ||
85 | def recon_dict(dict_in): | ||
86 | """ | ||
87 | The output dict format is: | ||
88 | {pn_task: {pv: PV, pr: PR, path: PATH}} | ||
89 | """ | ||
90 | dict_out = {} | ||
91 | for k in dict_in.keys(): | ||
92 | subdict = {} | ||
93 | # The key | ||
94 | pn_task = "%s_%s" % (dict_in.get(k).get('pn'), dict_in.get(k).get('task')) | ||
95 | # If more than one stamps are found, use the latest one. | ||
96 | if pn_task in dict_out: | ||
97 | full_path_pre = dict_out.get(pn_task).get('path') | ||
98 | full_path_cur = dict_in.get(k).get('path') | ||
99 | if os.stat(full_path_pre).st_mtime > os.stat(full_path_cur).st_mtime: | ||
100 | continue | ||
101 | subdict['pv'] = dict_in.get(k).get('pv') | ||
102 | subdict['pr'] = dict_in.get(k).get('pr') | ||
103 | subdict['path'] = dict_in.get(k).get('path') | ||
104 | dict_out[pn_task] = subdict | ||
105 | |||
106 | return dict_out | ||
107 | |||
108 | def split_pntask(s): | ||
109 | """ | ||
110 | Split the pn_task in to (pn, task) and return it | ||
111 | """ | ||
112 | tmp = re.match("(.*)_(do_.*)", s) | ||
113 | return (tmp.group(1), tmp.group(2)) | ||
114 | |||
115 | |||
116 | def print_added(d_new = None, d_old = None): | ||
117 | """ | ||
118 | Print the newly added tasks | ||
119 | """ | ||
120 | added = {} | ||
121 | for k in d_new.keys(): | ||
122 | if k not in d_old: | ||
123 | # Add the new one to added dict, and remove it from | ||
124 | # d_new, so the remaining ones are the changed ones | ||
125 | added[k] = d_new.get(k) | ||
126 | del(d_new[k]) | ||
127 | |||
128 | if not added: | ||
129 | return 0 | ||
130 | |||
131 | # Format the output, the dict format is: | ||
132 | # {pn: task1, task2 ...} | ||
133 | added_format = {} | ||
134 | counter = 0 | ||
135 | for k in added.keys(): | ||
136 | pn, task = split_pntask(k) | ||
137 | if pn in added_format: | ||
138 | # Append the value | ||
139 | added_format[pn] = "%s %s" % (added_format.get(pn), task) | ||
140 | else: | ||
141 | added_format[pn] = task | ||
142 | counter += 1 | ||
143 | print("=== Newly added tasks: (%s tasks)" % counter) | ||
144 | for k in added_format.keys(): | ||
145 | print(" %s: %s" % (k, added_format.get(k))) | ||
146 | |||
147 | return counter | ||
148 | |||
149 | def print_vrchanged(d_new = None, d_old = None, vr = None): | ||
150 | """ | ||
151 | Print the pv or pr changed tasks. | ||
152 | The arg "vr" is "pv" or "pr" | ||
153 | """ | ||
154 | pvchanged = {} | ||
155 | counter = 0 | ||
156 | for k in d_new.keys(): | ||
157 | if d_new.get(k).get(vr) != d_old.get(k).get(vr): | ||
158 | counter += 1 | ||
159 | pn, task = split_pntask(k) | ||
160 | if pn not in pvchanged: | ||
161 | # Format the output, we only print pn (no task) since | ||
162 | # all the tasks would be changed when pn or pr changed, | ||
163 | # the dict format is: | ||
164 | # {pn: pv/pr_old -> pv/pr_new} | ||
165 | pvchanged[pn] = "%s -> %s" % (d_old.get(k).get(vr), d_new.get(k).get(vr)) | ||
166 | del(d_new[k]) | ||
167 | |||
168 | if not pvchanged: | ||
169 | return 0 | ||
170 | |||
171 | print("\n=== %s changed: (%s tasks)" % (vr.upper(), counter)) | ||
172 | for k in pvchanged.keys(): | ||
173 | print(" %s: %s" % (k, pvchanged.get(k))) | ||
174 | |||
175 | return counter | ||
176 | |||
177 | def print_depchanged(d_new = None, d_old = None, verbose = False): | ||
178 | """ | ||
179 | Print the dependency changes | ||
180 | """ | ||
181 | depchanged = {} | ||
182 | counter = 0 | ||
183 | for k in d_new.keys(): | ||
184 | counter += 1 | ||
185 | pn, task = split_pntask(k) | ||
186 | if (verbose): | ||
187 | full_path_old = d_old.get(k).get("path") | ||
188 | full_path_new = d_new.get(k).get("path") | ||
189 | # No counter since it is not ready here | ||
190 | if sigdata_re.match(full_path_old) and sigdata_re.match(full_path_new): | ||
191 | output = bb.siggen.compare_sigfiles(full_path_old, full_path_new) | ||
192 | if output: | ||
193 | print("\n=== The verbose changes of %s.do_%s:" % (pn, task)) | ||
194 | print('\n'.join(output)) | ||
195 | else: | ||
196 | # Format the output, the format is: | ||
197 | # {pn: task1, task2, ...} | ||
198 | if pn in depchanged: | ||
199 | depchanged[pn] = "%s %s" % (depchanged.get(pn), task) | ||
200 | else: | ||
201 | depchanged[pn] = task | ||
202 | |||
203 | if len(depchanged) > 0: | ||
204 | print("\n=== Dependencies changed: (%s tasks)" % counter) | ||
205 | for k in depchanged.keys(): | ||
206 | print(" %s: %s" % (k, depchanged[k])) | ||
207 | |||
208 | return counter | ||
209 | |||
210 | |||
211 | def main(): | ||
212 | """ | ||
213 | Print what will be done between the current and last builds: | ||
214 | 1) Run "STAMPS_DIR=<path> bitbake -S recipe" to re-generate the stamps | ||
215 | 2) Figure out what are newly added and changed, can't figure out | ||
216 | what are removed since we can't know the previous stamps | ||
217 | clearly, for example, if there are several builds, we can't know | ||
218 | which stamps the last build has used exactly. | ||
219 | 3) Use bb.siggen.compare_sigfiles to diff the old and new stamps | ||
220 | """ | ||
221 | |||
222 | parser = OptionParser( | ||
223 | version = "1.0", | ||
224 | usage = """%prog [options] [package ...] | ||
225 | print what will be done between the current and last builds, for example: | ||
226 | |||
227 | $ bitbake core-image-sato | ||
228 | # Edit the recipes | ||
229 | $ bitbake-whatchanged core-image-sato | ||
230 | |||
231 | The changes will be printed" | ||
232 | |||
233 | Note: | ||
234 | The amount of tasks is not accurate when the task is "do_build" since | ||
235 | it usually depends on other tasks. | ||
236 | The "nostamp" task is not included. | ||
237 | """ | ||
238 | ) | ||
239 | parser.add_option("-v", "--verbose", help = "print the verbose changes", | ||
240 | action = "store_true", dest = "verbose") | ||
241 | |||
242 | options, args = parser.parse_args(sys.argv) | ||
243 | |||
244 | verbose = options.verbose | ||
245 | |||
246 | if len(args) != 2: | ||
247 | parser.error("Incorrect number of arguments") | ||
248 | else: | ||
249 | recipe = args[1] | ||
250 | |||
251 | # Get the STAMPS_DIR | ||
252 | print("Figuring out the STAMPS_DIR ...") | ||
253 | cmdline = "bitbake -e | sed -ne 's/^STAMPS_DIR=\"\(.*\)\"/\\1/p'" | ||
254 | try: | ||
255 | stampsdir, err = bb.process.run(cmdline) | ||
256 | except: | ||
257 | raise | ||
258 | if not stampsdir: | ||
259 | print("ERROR: No STAMPS_DIR found for '%s'" % recipe, file=sys.stderr) | ||
260 | return 2 | ||
261 | stampsdir = stampsdir.rstrip("\n") | ||
262 | if not os.path.isdir(stampsdir): | ||
263 | print("ERROR: stamps directory \"%s\" not found!" % stampsdir, file=sys.stderr) | ||
264 | return 2 | ||
265 | |||
266 | # The new stamps dir | ||
267 | new_stampsdir = stampsdir + ".bbs" | ||
268 | if os.path.exists(new_stampsdir): | ||
269 | print("ERROR: %s already exists!" % new_stampsdir, file=sys.stderr) | ||
270 | return 2 | ||
271 | |||
272 | try: | ||
273 | # Generate the new stamps dir | ||
274 | print("Generating the new stamps ... (need several minutes)") | ||
275 | cmdline = "STAMPS_DIR=%s bitbake -S none %s" % (new_stampsdir, recipe) | ||
276 | # FIXME | ||
277 | # The "bitbake -S" may fail, not fatal error, the stamps will still | ||
278 | # be generated, this might be a bug of "bitbake -S". | ||
279 | try: | ||
280 | bb.process.run(cmdline) | ||
281 | except Exception as exc: | ||
282 | print(exc) | ||
283 | |||
284 | # The dict for the new and old stamps. | ||
285 | old_dict = gen_dict(stampsdir) | ||
286 | new_dict = gen_dict(new_stampsdir) | ||
287 | |||
288 | # Remove the same one from both stamps. | ||
289 | cnt_unchanged = 0 | ||
290 | for k in new_dict.keys(): | ||
291 | if k in old_dict: | ||
292 | cnt_unchanged += 1 | ||
293 | del(new_dict[k]) | ||
294 | del(old_dict[k]) | ||
295 | |||
296 | # Re-construct the dict to easily find out what is added or changed. | ||
297 | # The dict format is: | ||
298 | # {pn_task: {pv: PV, pr: PR, path: PATH}} | ||
299 | new_recon = recon_dict(new_dict) | ||
300 | old_recon = recon_dict(old_dict) | ||
301 | |||
302 | del new_dict | ||
303 | del old_dict | ||
304 | |||
305 | # Figure out what are changed, the new_recon would be changed | ||
306 | # by the print_xxx function. | ||
307 | # Newly added | ||
308 | cnt_added = print_added(new_recon, old_recon) | ||
309 | |||
310 | # PV (including PE) and PR changed | ||
311 | # Let the bb.siggen handle them if verbose | ||
312 | cnt_rv = {} | ||
313 | if not verbose: | ||
314 | for i in ('pv', 'pr'): | ||
315 | cnt_rv[i] = print_vrchanged(new_recon, old_recon, i) | ||
316 | |||
317 | # Dependencies changed (use bitbake-diffsigs) | ||
318 | cnt_dep = print_depchanged(new_recon, old_recon, verbose) | ||
319 | |||
320 | total_changed = cnt_added + (cnt_rv.get('pv') or 0) + (cnt_rv.get('pr') or 0) + cnt_dep | ||
321 | |||
322 | print("\n=== Summary: (%s changed, %s unchanged)" % (total_changed, cnt_unchanged)) | ||
323 | if verbose: | ||
324 | print("Newly added: %s\nDependencies changed: %s\n" % \ | ||
325 | (cnt_added, cnt_dep)) | ||
326 | else: | ||
327 | print("Newly added: %s\nPV changed: %s\nPR changed: %s\nDependencies changed: %s\n" % \ | ||
328 | (cnt_added, cnt_rv.get('pv') or 0, cnt_rv.get('pr') or 0, cnt_dep)) | ||
329 | except: | ||
330 | print("ERROR occurred!") | ||
331 | raise | ||
332 | finally: | ||
333 | # Remove the newly generated stamps dir | ||
334 | if os.path.exists(new_stampsdir): | ||
335 | print("Removing the newly generated stamps dir ...") | ||
336 | shutil.rmtree(new_stampsdir) | ||
337 | |||
338 | if __name__ == "__main__": | ||
339 | sys.exit(main()) | ||
diff --git a/scripts/buildhistory-collect-srcrevs b/scripts/buildhistory-collect-srcrevs new file mode 100755 index 0000000000..58a2708032 --- /dev/null +++ b/scripts/buildhistory-collect-srcrevs | |||
@@ -0,0 +1,109 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # Collects the recorded SRCREV values from buildhistory and reports on them | ||
4 | # | ||
5 | # Copyright 2013 Intel Corporation | ||
6 | # Authored-by: Paul Eggleton <paul.eggleton@intel.com> | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | |||
21 | import os, sys | ||
22 | import optparse | ||
23 | import logging | ||
24 | |||
25 | def logger_create(): | ||
26 | logger = logging.getLogger("buildhistory") | ||
27 | loggerhandler = logging.StreamHandler() | ||
28 | loggerhandler.setFormatter(logging.Formatter("%(levelname)s: %(message)s")) | ||
29 | logger.addHandler(loggerhandler) | ||
30 | logger.setLevel(logging.INFO) | ||
31 | return logger | ||
32 | |||
33 | logger = logger_create() | ||
34 | |||
35 | def main(): | ||
36 | parser = optparse.OptionParser( | ||
37 | description = "Collects the recorded SRCREV values from buildhistory and reports on them.", | ||
38 | usage = """ | ||
39 | %prog [options]""") | ||
40 | |||
41 | parser.add_option("-a", "--report-all", | ||
42 | help = "Report all SRCREV values, not just ones where AUTOREV has been used", | ||
43 | action="store_true", dest="reportall") | ||
44 | parser.add_option("-f", "--forcevariable", | ||
45 | help = "Use forcevariable override for all output lines", | ||
46 | action="store_true", dest="forcevariable") | ||
47 | parser.add_option("-p", "--buildhistory-dir", | ||
48 | help = "Specify path to buildhistory directory (defaults to buildhistory/ under cwd)", | ||
49 | action="store", dest="buildhistory_dir", default='buildhistory/') | ||
50 | |||
51 | options, args = parser.parse_args(sys.argv) | ||
52 | |||
53 | if len(args) > 1: | ||
54 | sys.stderr.write('Invalid argument(s) specified: %s\n\n' % ' '.join(args[1:])) | ||
55 | parser.print_help() | ||
56 | sys.exit(1) | ||
57 | |||
58 | if not os.path.exists(options.buildhistory_dir): | ||
59 | sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % options.buildhistory_dir) | ||
60 | parser.print_help() | ||
61 | sys.exit(1) | ||
62 | |||
63 | if options.forcevariable: | ||
64 | forcevariable = '_forcevariable' | ||
65 | else: | ||
66 | forcevariable = '' | ||
67 | |||
68 | lastdir = '' | ||
69 | for root, dirs, files in os.walk(options.buildhistory_dir): | ||
70 | if '.git' in dirs: | ||
71 | dirs.remove('.git') | ||
72 | for fn in files: | ||
73 | if fn == 'latest_srcrev': | ||
74 | curdir = os.path.basename(os.path.dirname(root)) | ||
75 | if lastdir != curdir: | ||
76 | print('# %s' % curdir) | ||
77 | lastdir = curdir | ||
78 | fullpath = os.path.join(root, fn) | ||
79 | pn = os.path.basename(root) | ||
80 | srcrev = None | ||
81 | orig_srcrev = None | ||
82 | orig_srcrevs = {} | ||
83 | srcrevs = {} | ||
84 | with open(fullpath) as f: | ||
85 | for line in f: | ||
86 | if '=' in line: | ||
87 | splitval = line.split('=') | ||
88 | value = splitval[1].strip('" \t\n\r') | ||
89 | if line.startswith('# SRCREV = '): | ||
90 | orig_srcrev = value | ||
91 | elif line.startswith('# SRCREV_'): | ||
92 | splitval = line.split('=') | ||
93 | name = splitval[0].split('_')[1].strip() | ||
94 | orig_srcrevs[name] = value | ||
95 | elif line.startswith('SRCREV ='): | ||
96 | srcrev = value | ||
97 | elif line.startswith('SRCREV_'): | ||
98 | name = splitval[0].split('_')[1].strip() | ||
99 | srcrevs[name] = value | ||
100 | if srcrev and (options.reportall or srcrev != orig_srcrev): | ||
101 | print('SRCREV_pn-%s%s = "%s"' % (pn, forcevariable, srcrev)) | ||
102 | for name, value in srcrevs.items(): | ||
103 | orig = orig_srcrevs.get(name, orig_srcrev) | ||
104 | if options.reportall or value != orig: | ||
105 | print('SRCREV_%s_pn-%s%s = "%s"' % (name, pn, forcevariable, value)) | ||
106 | |||
107 | |||
108 | if __name__ == "__main__": | ||
109 | main() | ||
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff new file mode 100755 index 0000000000..dfebcddf72 --- /dev/null +++ b/scripts/buildhistory-diff | |||
@@ -0,0 +1,100 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # Report significant differences in the buildhistory repository since a specific revision | ||
4 | # | ||
5 | # Copyright (C) 2013 Intel Corporation | ||
6 | # Author: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
7 | |||
8 | import sys | ||
9 | import os | ||
10 | import optparse | ||
11 | from distutils.version import LooseVersion | ||
12 | |||
13 | # Ensure PythonGit is installed (buildhistory_analysis needs it) | ||
14 | try: | ||
15 | import git | ||
16 | except ImportError: | ||
17 | print("Please install GitPython (python-git) 0.3.1 or later in order to use this script") | ||
18 | sys.exit(1) | ||
19 | |||
20 | def main(): | ||
21 | parser = optparse.OptionParser( | ||
22 | description = "Reports significant differences in the buildhistory repository.", | ||
23 | usage = """ | ||
24 | %prog [options] [from-revision [to-revision]] | ||
25 | (if not specified, from-revision defaults to build-minus-1, and to-revision defaults to HEAD)""") | ||
26 | |||
27 | parser.add_option("-p", "--buildhistory-dir", | ||
28 | help = "Specify path to buildhistory directory (defaults to buildhistory/ under cwd)", | ||
29 | action="store", dest="buildhistory_dir", default='buildhistory/') | ||
30 | parser.add_option("-v", "--report-version", | ||
31 | help = "Report changes in PKGE/PKGV/PKGR even when the values are still the default (PE/PV/PR)", | ||
32 | action="store_true", dest="report_ver", default=False) | ||
33 | parser.add_option("-a", "--report-all", | ||
34 | help = "Report all changes, not just the default significant ones", | ||
35 | action="store_true", dest="report_all", default=False) | ||
36 | |||
37 | options, args = parser.parse_args(sys.argv) | ||
38 | |||
39 | if len(args) > 3: | ||
40 | sys.stderr.write('Invalid argument(s) specified: %s\n\n' % ' '.join(args[3:])) | ||
41 | parser.print_help() | ||
42 | sys.exit(1) | ||
43 | |||
44 | if LooseVersion(git.__version__) < '0.3.1': | ||
45 | sys.stderr.write("Version of GitPython is too old, please install GitPython (python-git) 0.3.1 or later in order to use this script\n") | ||
46 | sys.exit(1) | ||
47 | |||
48 | if not os.path.exists(options.buildhistory_dir): | ||
49 | sys.stderr.write('Buildhistory directory "%s" does not exist\n\n' % options.buildhistory_dir) | ||
50 | parser.print_help() | ||
51 | sys.exit(1) | ||
52 | |||
53 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
54 | lib_path = scripts_path + '/lib' | ||
55 | sys.path = sys.path + [lib_path] | ||
56 | |||
57 | import scriptpath | ||
58 | |||
59 | # Set path to OE lib dir so we can import the buildhistory_analysis module | ||
60 | scriptpath.add_oe_lib_path() | ||
61 | # Set path to bitbake lib dir so the buildhistory_analysis module can load bb.utils | ||
62 | bitbakepath = scriptpath.add_bitbake_lib_path() | ||
63 | if not bitbakepath: | ||
64 | sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n") | ||
65 | sys.exit(1) | ||
66 | |||
67 | import oe.buildhistory_analysis | ||
68 | |||
69 | fromrev = 'build-minus-1' | ||
70 | torev = 'HEAD' | ||
71 | if len(args) > 1: | ||
72 | if len(args) == 2 and '..' in args[1]: | ||
73 | revs = args[1].split('..') | ||
74 | fromrev = revs[0] | ||
75 | if revs[1]: | ||
76 | torev = revs[1] | ||
77 | else: | ||
78 | fromrev = args[1] | ||
79 | if len(args) > 2: | ||
80 | torev = args[2] | ||
81 | |||
82 | import gitdb | ||
83 | try: | ||
84 | changes = oe.buildhistory_analysis.process_changes(options.buildhistory_dir, fromrev, torev, options.report_all, options.report_ver) | ||
85 | except gitdb.exc.BadObject as e: | ||
86 | if len(args) == 1: | ||
87 | sys.stderr.write("Unable to find previous build revision in buildhistory repository\n\n") | ||
88 | parser.print_help() | ||
89 | else: | ||
90 | sys.stderr.write('Specified git revision "%s" is not valid\n' % e.args[0]) | ||
91 | sys.exit(1) | ||
92 | |||
93 | for chg in changes: | ||
94 | print('%s' % chg) | ||
95 | |||
96 | sys.exit(0) | ||
97 | |||
98 | |||
99 | if __name__ == "__main__": | ||
100 | main() | ||
diff --git a/scripts/cleanup-workdir b/scripts/cleanup-workdir new file mode 100755 index 0000000000..a7f5a3a667 --- /dev/null +++ b/scripts/cleanup-workdir | |||
@@ -0,0 +1,198 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # Copyright (c) 2012 Wind River Systems, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License version 2 as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | # See the GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with this program; if not, write to the Free Software | ||
16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | |||
18 | import os | ||
19 | import sys | ||
20 | import optparse | ||
21 | import re | ||
22 | import subprocess | ||
23 | import shutil | ||
24 | |||
25 | pkg_cur_dirs = {} | ||
26 | obsolete_dirs = [] | ||
27 | parser = None | ||
28 | |||
29 | def err_quit(msg): | ||
30 | print msg | ||
31 | parser.print_usage() | ||
32 | sys.exit(1) | ||
33 | |||
34 | def parse_version(verstr): | ||
35 | elems = verstr.split(':') | ||
36 | epoch = elems[0] | ||
37 | if len(epoch) == 0: | ||
38 | return elems[1] | ||
39 | else: | ||
40 | return epoch + '_' + elems[1] | ||
41 | |||
42 | def run_command(cmd): | ||
43 | pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) | ||
44 | output = pipe.communicate()[0] | ||
45 | if pipe.returncode != 0: | ||
46 | print "Execute command '%s' failed." % cmd | ||
47 | sys.exit(1) | ||
48 | return output | ||
49 | |||
50 | def get_cur_arch_dirs(workdir, arch_dirs): | ||
51 | pattern = workdir + '/(.*?)/' | ||
52 | |||
53 | cmd = "bitbake -e | grep ^SDK_ARCH=" | ||
54 | output = run_command(cmd) | ||
55 | sdk_arch = output.split('"')[1] | ||
56 | |||
57 | # select thest 5 packages to get the dirs of current arch | ||
58 | pkgs = ['hicolor-icon-theme', 'base-files', 'acl-native', 'binutils-crosssdk-' + sdk_arch, 'nativesdk-autoconf'] | ||
59 | |||
60 | for pkg in pkgs: | ||
61 | cmd = "bitbake -e " + pkg + " | grep ^IMAGE_ROOTFS=" | ||
62 | output = run_command(cmd) | ||
63 | output = output.split('"')[1] | ||
64 | m = re.match(pattern, output) | ||
65 | arch_dirs.append(m.group(1)) | ||
66 | |||
67 | def main(): | ||
68 | global parser | ||
69 | parser = optparse.OptionParser( | ||
70 | usage = """%prog | ||
71 | |||
72 | %prog removes the obsolete packages' build directories in WORKDIR. | ||
73 | This script must be ran under BUILDDIR after source file \"oe-init-build-env\". | ||
74 | |||
75 | Any file or directory under WORKDIR which is not created by Yocto | ||
76 | will be deleted. Be CAUTIOUS.""") | ||
77 | |||
78 | options, args = parser.parse_args(sys.argv) | ||
79 | |||
80 | builddir = run_command('echo $BUILDDIR').strip() | ||
81 | if len(builddir) == 0: | ||
82 | err_quit("Please source file \"oe-init-build-env\" first.\n") | ||
83 | |||
84 | if os.getcwd() != builddir: | ||
85 | err_quit("Please run %s under: %s\n" % (os.path.basename(args[0]), builddir)) | ||
86 | |||
87 | print 'Updating bitbake caches...' | ||
88 | cmd = "bitbake -s" | ||
89 | output = run_command(cmd) | ||
90 | |||
91 | output = output.split('\n') | ||
92 | index = 0 | ||
93 | while len(output[index]) > 0: | ||
94 | index += 1 | ||
95 | alllines = output[index+1:] | ||
96 | |||
97 | for line in alllines: | ||
98 | # empty again means end of the versions output | ||
99 | if len(line) == 0: | ||
100 | break | ||
101 | line = line.strip() | ||
102 | line = re.sub('\s+', ' ', line) | ||
103 | elems = line.split(' ') | ||
104 | if len(elems) == 2: | ||
105 | version = parse_version(elems[1]) | ||
106 | else: | ||
107 | version = parse_version(elems[2]) | ||
108 | pkg_cur_dirs[elems[0]] = version | ||
109 | |||
110 | cmd = "bitbake -e" | ||
111 | output = run_command(cmd) | ||
112 | |||
113 | tmpdir = None | ||
114 | image_rootfs = None | ||
115 | output = output.split('\n') | ||
116 | for line in output: | ||
117 | if tmpdir and image_rootfs: | ||
118 | break | ||
119 | |||
120 | if not tmpdir: | ||
121 | m = re.match('TMPDIR="(.*)"', line) | ||
122 | if m: | ||
123 | tmpdir = m.group(1) | ||
124 | |||
125 | if not image_rootfs: | ||
126 | m = re.match('IMAGE_ROOTFS="(.*)"', line) | ||
127 | if m: | ||
128 | image_rootfs = m.group(1) | ||
129 | |||
130 | # won't fail just in case | ||
131 | if not tmpdir or not image_rootfs: | ||
132 | print "Can't get TMPDIR or IMAGE_ROOTFS." | ||
133 | return 1 | ||
134 | |||
135 | pattern = tmpdir + '/(.*?)/(.*?)/' | ||
136 | m = re.match(pattern, image_rootfs) | ||
137 | if not m: | ||
138 | print "Can't get WORKDIR." | ||
139 | return 1 | ||
140 | |||
141 | workdir = os.path.join(tmpdir, m.group(1)) | ||
142 | |||
143 | # we only deal the dirs of current arch, total numbers of dirs are 6 | ||
144 | cur_arch_dirs = [m.group(2)] | ||
145 | get_cur_arch_dirs(workdir, cur_arch_dirs) | ||
146 | |||
147 | for workroot, dirs, files in os.walk(workdir): | ||
148 | # For the files, they should NOT exist in WORKDIR. Remove them. | ||
149 | for f in files: | ||
150 | obsolete_dirs.append(os.path.join(workroot, f)) | ||
151 | |||
152 | for d in dirs: | ||
153 | if d not in cur_arch_dirs: | ||
154 | continue | ||
155 | |||
156 | for pkgroot, pkgdirs, filenames in os.walk(os.path.join(workroot, d)): | ||
157 | for f in filenames: | ||
158 | obsolete_dirs.append(os.path.join(pkgroot, f)) | ||
159 | |||
160 | for pkgdir in sorted(pkgdirs): | ||
161 | if pkgdir not in pkg_cur_dirs: | ||
162 | obsolete_dirs.append(os.path.join(pkgroot, pkgdir)) | ||
163 | else: | ||
164 | for verroot, verdirs, verfiles in os.walk(os.path.join(pkgroot, pkgdir)): | ||
165 | for f in verfiles: | ||
166 | obsolete_dirs.append(os.path.join(pkgroot, f)) | ||
167 | for v in sorted(verdirs): | ||
168 | if v not in pkg_cur_dirs[pkgdir]: | ||
169 | obsolete_dirs.append(os.path.join(pkgroot, pkgdir, v)) | ||
170 | break | ||
171 | |||
172 | # just process the top dir of every package under tmp/work/*/, | ||
173 | # then jump out of the above os.walk() | ||
174 | break | ||
175 | |||
176 | # it is convenient to use os.walk() to get dirs and files at same time | ||
177 | # both of them have been dealed in the loop, so jump out | ||
178 | break | ||
179 | |||
180 | for d in obsolete_dirs: | ||
181 | print "Deleting %s" % d | ||
182 | shutil.rmtree(d, True) | ||
183 | |||
184 | if len(obsolete_dirs): | ||
185 | print '\nTotal %d items.' % len(obsolete_dirs) | ||
186 | else: | ||
187 | print '\nNo obsolete directory found under %s.' % workdir | ||
188 | |||
189 | return 0 | ||
190 | |||
191 | if __name__ == '__main__': | ||
192 | try: | ||
193 | ret = main() | ||
194 | except Exception: | ||
195 | ret = 2 | ||
196 | import traceback | ||
197 | traceback.print_exc(3) | ||
198 | sys.exit(ret) | ||
diff --git a/scripts/combo-layer b/scripts/combo-layer new file mode 100755 index 0000000000..19d64e64e1 --- /dev/null +++ b/scripts/combo-layer | |||
@@ -0,0 +1,600 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright 2011 Intel Corporation | ||
6 | # Authored-by: Yu Ke <ke.yu@intel.com> | ||
7 | # Paul Eggleton <paul.eggleton@intel.com> | ||
8 | # Richard Purdie <richard.purdie@intel.com> | ||
9 | # | ||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License version 2 as | ||
12 | # published by the Free Software Foundation. | ||
13 | # | ||
14 | # This program is distributed in the hope that it will be useful, | ||
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | # GNU General Public License for more details. | ||
18 | # | ||
19 | # You should have received a copy of the GNU General Public License along | ||
20 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
22 | |||
23 | import os, sys | ||
24 | import optparse | ||
25 | import logging | ||
26 | import subprocess | ||
27 | import ConfigParser | ||
28 | import re | ||
29 | |||
30 | __version__ = "0.2.1" | ||
31 | |||
32 | def logger_create(): | ||
33 | logger = logging.getLogger("") | ||
34 | loggerhandler = logging.StreamHandler() | ||
35 | loggerhandler.setFormatter(logging.Formatter("[%(asctime)s] %(message)s","%H:%M:%S")) | ||
36 | logger.addHandler(loggerhandler) | ||
37 | logger.setLevel(logging.INFO) | ||
38 | return logger | ||
39 | |||
40 | logger = logger_create() | ||
41 | |||
42 | def get_current_branch(repodir=None): | ||
43 | try: | ||
44 | if not os.path.exists(os.path.join(repodir if repodir else '', ".git")): | ||
45 | # Repo not created yet (i.e. during init) so just assume master | ||
46 | return "master" | ||
47 | branchname = runcmd("git symbolic-ref HEAD 2>/dev/null", repodir).strip() | ||
48 | if branchname.startswith("refs/heads/"): | ||
49 | branchname = branchname[11:] | ||
50 | return branchname | ||
51 | except subprocess.CalledProcessError: | ||
52 | return "" | ||
53 | |||
54 | class Configuration(object): | ||
55 | """ | ||
56 | Manages the configuration | ||
57 | |||
58 | For an example config file, see combo-layer.conf.example | ||
59 | |||
60 | """ | ||
61 | def __init__(self, options): | ||
62 | for key, val in options.__dict__.items(): | ||
63 | setattr(self, key, val) | ||
64 | |||
65 | def readsection(parser, section, repo): | ||
66 | for (name, value) in parser.items(section): | ||
67 | if value.startswith("@"): | ||
68 | self.repos[repo][name] = eval(value.strip("@")) | ||
69 | else: | ||
70 | self.repos[repo][name] = value | ||
71 | |||
72 | logger.debug("Loading config file %s" % self.conffile) | ||
73 | self.parser = ConfigParser.ConfigParser() | ||
74 | with open(self.conffile) as f: | ||
75 | self.parser.readfp(f) | ||
76 | |||
77 | self.repos = {} | ||
78 | for repo in self.parser.sections(): | ||
79 | self.repos[repo] = {} | ||
80 | readsection(self.parser, repo, repo) | ||
81 | |||
82 | # Load local configuration, if available | ||
83 | self.localconffile = None | ||
84 | self.localparser = None | ||
85 | self.combobranch = None | ||
86 | if self.conffile.endswith('.conf'): | ||
87 | lcfile = self.conffile.replace('.conf', '-local.conf') | ||
88 | if os.path.exists(lcfile): | ||
89 | # Read combo layer branch | ||
90 | self.combobranch = get_current_branch() | ||
91 | logger.debug("Combo layer branch is %s" % self.combobranch) | ||
92 | |||
93 | self.localconffile = lcfile | ||
94 | logger.debug("Loading local config file %s" % self.localconffile) | ||
95 | self.localparser = ConfigParser.ConfigParser() | ||
96 | with open(self.localconffile) as f: | ||
97 | self.localparser.readfp(f) | ||
98 | |||
99 | for section in self.localparser.sections(): | ||
100 | if '|' in section: | ||
101 | sectionvals = section.split('|') | ||
102 | repo = sectionvals[0] | ||
103 | if sectionvals[1] != self.combobranch: | ||
104 | continue | ||
105 | else: | ||
106 | repo = section | ||
107 | if repo in self.repos: | ||
108 | readsection(self.localparser, section, repo) | ||
109 | |||
110 | def update(self, repo, option, value, initmode=False): | ||
111 | if self.localparser: | ||
112 | parser = self.localparser | ||
113 | section = "%s|%s" % (repo, self.combobranch) | ||
114 | conffile = self.localconffile | ||
115 | if initmode and not parser.has_section(section): | ||
116 | parser.add_section(section) | ||
117 | else: | ||
118 | parser = self.parser | ||
119 | section = repo | ||
120 | conffile = self.conffile | ||
121 | parser.set(section, option, value) | ||
122 | with open(conffile, "w") as f: | ||
123 | parser.write(f) | ||
124 | |||
125 | def sanity_check(self, initmode=False): | ||
126 | required_options=["src_uri", "local_repo_dir", "dest_dir", "last_revision"] | ||
127 | if initmode: | ||
128 | required_options.remove("last_revision") | ||
129 | msg = "" | ||
130 | missing_options = [] | ||
131 | for name in self.repos: | ||
132 | for option in required_options: | ||
133 | if option not in self.repos[name]: | ||
134 | msg = "%s\nOption %s is not defined for component %s" %(msg, option, name) | ||
135 | missing_options.append(option) | ||
136 | if msg != "": | ||
137 | logger.error("configuration file %s has the following error: %s" % (self.conffile,msg)) | ||
138 | if self.localconffile and 'last_revision' in missing_options: | ||
139 | logger.error("local configuration file %s may be missing configuration for combo branch %s" % (self.localconffile, self.combobranch)) | ||
140 | sys.exit(1) | ||
141 | |||
142 | # filterdiff is required by action_splitpatch, so check its availability | ||
143 | if subprocess.call("which filterdiff > /dev/null 2>&1", shell=True) != 0: | ||
144 | logger.error("ERROR: patchutils package is missing, please install it (e.g. # apt-get install patchutils)") | ||
145 | sys.exit(1) | ||
146 | |||
147 | def runcmd(cmd,destdir=None,printerr=True): | ||
148 | """ | ||
149 | execute command, raise CalledProcessError if fail | ||
150 | return output if succeed | ||
151 | """ | ||
152 | logger.debug("run cmd '%s' in %s" % (cmd, os.getcwd() if destdir is None else destdir)) | ||
153 | out = os.tmpfile() | ||
154 | try: | ||
155 | subprocess.check_call(cmd, stdout=out, stderr=out, cwd=destdir, shell=True) | ||
156 | except subprocess.CalledProcessError,e: | ||
157 | out.seek(0) | ||
158 | if printerr: | ||
159 | logger.error("%s" % out.read()) | ||
160 | raise e | ||
161 | |||
162 | out.seek(0) | ||
163 | output = out.read() | ||
164 | logger.debug("output: %s" % output ) | ||
165 | return output | ||
166 | |||
167 | def action_init(conf, args): | ||
168 | """ | ||
169 | Clone component repositories | ||
170 | Check git is initialised; if not, copy initial data from component repos | ||
171 | """ | ||
172 | for name in conf.repos: | ||
173 | ldir = conf.repos[name]['local_repo_dir'] | ||
174 | if not os.path.exists(ldir): | ||
175 | logger.info("cloning %s to %s" %(conf.repos[name]['src_uri'], ldir)) | ||
176 | subprocess.check_call("git clone %s %s" % (conf.repos[name]['src_uri'], ldir), shell=True) | ||
177 | if not os.path.exists(".git"): | ||
178 | runcmd("git init") | ||
179 | for name in conf.repos: | ||
180 | repo = conf.repos[name] | ||
181 | ldir = repo['local_repo_dir'] | ||
182 | branch = repo.get('branch', "master") | ||
183 | lastrev = repo.get('last_revision', None) | ||
184 | if lastrev and lastrev != "HEAD": | ||
185 | initialrev = lastrev | ||
186 | if branch: | ||
187 | if not check_rev_branch(name, ldir, lastrev, branch): | ||
188 | sys.exit(1) | ||
189 | logger.info("Copying data from %s at specified revision %s..." % (name, lastrev)) | ||
190 | else: | ||
191 | lastrev = None | ||
192 | initialrev = branch | ||
193 | logger.info("Copying data from %s..." % name) | ||
194 | dest_dir = repo['dest_dir'] | ||
195 | if dest_dir and dest_dir != ".": | ||
196 | extract_dir = os.path.join(os.getcwd(), dest_dir) | ||
197 | if not os.path.exists(extract_dir): | ||
198 | os.makedirs(extract_dir) | ||
199 | else: | ||
200 | extract_dir = os.getcwd() | ||
201 | file_filter = repo.get('file_filter', "") | ||
202 | runcmd("git archive %s | tar -x -C %s %s" % (initialrev, extract_dir, file_filter), ldir) | ||
203 | if not lastrev: | ||
204 | lastrev = runcmd("git rev-parse %s" % initialrev, ldir).strip() | ||
205 | conf.update(name, "last_revision", lastrev, initmode=True) | ||
206 | runcmd("git add .") | ||
207 | if conf.localconffile: | ||
208 | localadded = True | ||
209 | try: | ||
210 | runcmd("git rm --cached %s" % conf.localconffile, printerr=False) | ||
211 | except subprocess.CalledProcessError: | ||
212 | localadded = False | ||
213 | if localadded: | ||
214 | localrelpath = os.path.relpath(conf.localconffile) | ||
215 | runcmd("grep -q %s .gitignore || echo %s >> .gitignore" % (localrelpath, localrelpath)) | ||
216 | runcmd("git add .gitignore") | ||
217 | logger.info("Added local configuration file %s to .gitignore", localrelpath) | ||
218 | logger.info("Initial combo layer repository data has been created; please make any changes if desired and then use 'git commit' to make the initial commit.") | ||
219 | else: | ||
220 | logger.info("Repository already initialised, nothing to do.") | ||
221 | |||
222 | |||
223 | def check_repo_clean(repodir): | ||
224 | """ | ||
225 | check if the repo is clean | ||
226 | exit if repo is dirty | ||
227 | """ | ||
228 | output=runcmd("git status --porcelain", repodir) | ||
229 | r = re.compile('\?\? patch-.*/') | ||
230 | dirtyout = [item for item in output.splitlines() if not r.match(item)] | ||
231 | if dirtyout: | ||
232 | logger.error("git repo %s is dirty, please fix it first", repodir) | ||
233 | sys.exit(1) | ||
234 | |||
235 | def check_patch(patchfile): | ||
236 | f = open(patchfile) | ||
237 | ln = f.readline() | ||
238 | of = None | ||
239 | in_patch = False | ||
240 | beyond_msg = False | ||
241 | pre_buf = '' | ||
242 | while ln: | ||
243 | if not beyond_msg: | ||
244 | if ln == '---\n': | ||
245 | if not of: | ||
246 | break | ||
247 | in_patch = False | ||
248 | beyond_msg = True | ||
249 | elif ln.startswith('--- '): | ||
250 | # We have a diff in the commit message | ||
251 | in_patch = True | ||
252 | if not of: | ||
253 | print('WARNING: %s contains a diff in its commit message, indenting to avoid failure during apply' % patchfile) | ||
254 | of = open(patchfile + '.tmp', 'w') | ||
255 | of.write(pre_buf) | ||
256 | pre_buf = '' | ||
257 | elif in_patch and not ln[0] in '+-@ \n\r': | ||
258 | in_patch = False | ||
259 | if of: | ||
260 | if in_patch: | ||
261 | of.write(' ' + ln) | ||
262 | else: | ||
263 | of.write(ln) | ||
264 | else: | ||
265 | pre_buf += ln | ||
266 | ln = f.readline() | ||
267 | f.close() | ||
268 | if of: | ||
269 | of.close() | ||
270 | os.rename(patchfile + '.tmp', patchfile) | ||
271 | |||
272 | def drop_to_shell(workdir=None): | ||
273 | shell = os.environ.get('SHELL', 'bash') | ||
274 | print('Dropping to shell "%s"\n' \ | ||
275 | 'When you are finished, run the following to continue:\n' \ | ||
276 | ' exit -- continue to apply the patches\n' \ | ||
277 | ' exit 1 -- abort\n' % shell); | ||
278 | ret = subprocess.call([shell], cwd=workdir) | ||
279 | if ret != 0: | ||
280 | print "Aborting" | ||
281 | return False | ||
282 | else: | ||
283 | return True | ||
284 | |||
285 | def check_rev_branch(component, repodir, rev, branch): | ||
286 | try: | ||
287 | actualbranch = runcmd("git branch --contains %s" % rev, repodir, printerr=False) | ||
288 | except subprocess.CalledProcessError as e: | ||
289 | if e.returncode == 129: | ||
290 | actualbranch = "" | ||
291 | else: | ||
292 | raise | ||
293 | |||
294 | if not actualbranch: | ||
295 | logger.error("%s: specified revision %s is invalid!" % (component, rev)) | ||
296 | return False | ||
297 | |||
298 | branches = [] | ||
299 | branchlist = actualbranch.split("\n") | ||
300 | for b in branchlist: | ||
301 | branches.append(b.strip().split(' ')[-1]) | ||
302 | |||
303 | if branch not in branches: | ||
304 | logger.error("%s: specified revision %s is not on specified branch %s!" % (component, rev, branch)) | ||
305 | return False | ||
306 | return True | ||
307 | |||
308 | def get_repos(conf, args): | ||
309 | repos = [] | ||
310 | if len(args) > 1: | ||
311 | for arg in args[1:]: | ||
312 | if arg.startswith('-'): | ||
313 | break | ||
314 | else: | ||
315 | repos.append(arg) | ||
316 | for repo in repos: | ||
317 | if not repo in conf.repos: | ||
318 | logger.error("Specified component '%s' not found in configuration" % repo) | ||
319 | sys.exit(0) | ||
320 | |||
321 | if not repos: | ||
322 | repos = conf.repos | ||
323 | |||
324 | return repos | ||
325 | |||
326 | def action_pull(conf, args): | ||
327 | """ | ||
328 | update the component repos only | ||
329 | """ | ||
330 | repos = get_repos(conf, args) | ||
331 | |||
332 | # make sure all repos are clean | ||
333 | for name in repos: | ||
334 | check_repo_clean(conf.repos[name]['local_repo_dir']) | ||
335 | |||
336 | for name in repos: | ||
337 | repo = conf.repos[name] | ||
338 | ldir = repo['local_repo_dir'] | ||
339 | branch = repo.get('branch', "master") | ||
340 | runcmd("git checkout %s" % branch, ldir) | ||
341 | logger.info("git pull for component repo %s in %s ..." % (name, ldir)) | ||
342 | output=runcmd("git pull", ldir) | ||
343 | logger.info(output) | ||
344 | |||
345 | def action_update(conf, args): | ||
346 | """ | ||
347 | update the component repos | ||
348 | generate the patch list | ||
349 | apply the generated patches | ||
350 | """ | ||
351 | repos = get_repos(conf, args) | ||
352 | |||
353 | # make sure combo repo is clean | ||
354 | check_repo_clean(os.getcwd()) | ||
355 | |||
356 | import uuid | ||
357 | patch_dir = "patch-%s" % uuid.uuid4() | ||
358 | if not os.path.exists(patch_dir): | ||
359 | os.mkdir(patch_dir) | ||
360 | |||
361 | # Step 1: update the component repos | ||
362 | if conf.nopull: | ||
363 | logger.info("Skipping pull (-n)") | ||
364 | else: | ||
365 | action_pull(conf, args) | ||
366 | |||
367 | for name in repos: | ||
368 | repo = conf.repos[name] | ||
369 | ldir = repo['local_repo_dir'] | ||
370 | dest_dir = repo['dest_dir'] | ||
371 | branch = repo.get('branch', "master") | ||
372 | repo_patch_dir = os.path.join(os.getcwd(), patch_dir, name) | ||
373 | |||
374 | # Step 2: generate the patch list and store to patch dir | ||
375 | logger.info("Generating patches from %s..." % name) | ||
376 | if dest_dir != ".": | ||
377 | prefix = "--src-prefix=a/%s/ --dst-prefix=b/%s/" % (dest_dir, dest_dir) | ||
378 | else: | ||
379 | prefix = "" | ||
380 | if repo['last_revision'] == "": | ||
381 | logger.info("Warning: last_revision of component %s is not set, starting from the first commit" % name) | ||
382 | patch_cmd_range = "--root %s" % branch | ||
383 | rev_cmd_range = branch | ||
384 | else: | ||
385 | if not check_rev_branch(name, ldir, repo['last_revision'], branch): | ||
386 | sys.exit(1) | ||
387 | patch_cmd_range = "%s..%s" % (repo['last_revision'], branch) | ||
388 | rev_cmd_range = patch_cmd_range | ||
389 | |||
390 | file_filter = repo.get('file_filter',"") | ||
391 | |||
392 | patch_cmd = "git format-patch -N %s --output-directory %s %s -- %s" % \ | ||
393 | (prefix,repo_patch_dir, patch_cmd_range, file_filter) | ||
394 | output = runcmd(patch_cmd, ldir) | ||
395 | logger.debug("generated patch set:\n%s" % output) | ||
396 | patchlist = output.splitlines() | ||
397 | |||
398 | rev_cmd = "git rev-list --no-merges %s -- %s" % (rev_cmd_range, file_filter) | ||
399 | revlist = runcmd(rev_cmd, ldir).splitlines() | ||
400 | |||
401 | # Step 3: Call repo specific hook to adjust patch | ||
402 | if 'hook' in repo: | ||
403 | # hook parameter is: ./hook patchpath revision reponame | ||
404 | count=len(revlist)-1 | ||
405 | for patch in patchlist: | ||
406 | runcmd("%s %s %s %s" % (repo['hook'], patch, revlist[count], name)) | ||
407 | count=count-1 | ||
408 | |||
409 | # Step 4: write patch list and revision list to file, for user to edit later | ||
410 | patchlist_file = os.path.join(os.getcwd(), patch_dir, "patchlist-%s" % name) | ||
411 | repo['patchlist'] = patchlist_file | ||
412 | f = open(patchlist_file, 'w') | ||
413 | count=len(revlist)-1 | ||
414 | for patch in patchlist: | ||
415 | f.write("%s %s\n" % (patch, revlist[count])) | ||
416 | check_patch(os.path.join(patch_dir, patch)) | ||
417 | count=count-1 | ||
418 | f.close() | ||
419 | |||
420 | # Step 5: invoke bash for user to edit patch and patch list | ||
421 | if conf.interactive: | ||
422 | print('You may now edit the patch and patch list in %s\n' \ | ||
423 | 'For example, you can remove unwanted patch entries from patchlist-*, so that they will be not applied later' % patch_dir); | ||
424 | if not drop_to_shell(patch_dir): | ||
425 | sys.exit(0) | ||
426 | |||
427 | # Step 6: apply the generated and revised patch | ||
428 | apply_patchlist(conf, repos) | ||
429 | runcmd("rm -rf %s" % patch_dir) | ||
430 | |||
431 | # Step 7: commit the updated config file if it's being tracked | ||
432 | relpath = os.path.relpath(conf.conffile) | ||
433 | try: | ||
434 | output = runcmd("git status --porcelain %s" % relpath, printerr=False) | ||
435 | except: | ||
436 | # Outside the repository | ||
437 | output = None | ||
438 | if output: | ||
439 | logger.info("Committing updated configuration file") | ||
440 | if output.lstrip().startswith("M"): | ||
441 | runcmd('git commit -m "Automatic commit to update last_revision" %s' % relpath) | ||
442 | |||
443 | def apply_patchlist(conf, repos): | ||
444 | """ | ||
445 | apply the generated patch list to combo repo | ||
446 | """ | ||
447 | for name in repos: | ||
448 | repo = conf.repos[name] | ||
449 | lastrev = repo["last_revision"] | ||
450 | prevrev = lastrev | ||
451 | |||
452 | # Get non-blank lines from patch list file | ||
453 | patchlist = [] | ||
454 | if os.path.exists(repo['patchlist']) or not conf.interactive: | ||
455 | # Note: we want this to fail here if the file doesn't exist and we're not in | ||
456 | # interactive mode since the file should exist in this case | ||
457 | with open(repo['patchlist']) as f: | ||
458 | for line in f: | ||
459 | line = line.rstrip() | ||
460 | if line: | ||
461 | patchlist.append(line) | ||
462 | |||
463 | if patchlist: | ||
464 | logger.info("Applying patches from %s..." % name) | ||
465 | linecount = len(patchlist) | ||
466 | i = 1 | ||
467 | for line in patchlist: | ||
468 | patchfile = line.split()[0] | ||
469 | lastrev = line.split()[1] | ||
470 | patchdisp = os.path.relpath(patchfile) | ||
471 | if os.path.getsize(patchfile) == 0: | ||
472 | logger.info("(skipping %d/%d %s - no changes)" % (i, linecount, patchdisp)) | ||
473 | else: | ||
474 | cmd = "git am --keep-cr -s -p1 %s" % patchfile | ||
475 | logger.info("Applying %d/%d: %s" % (i, linecount, patchdisp)) | ||
476 | try: | ||
477 | runcmd(cmd) | ||
478 | except subprocess.CalledProcessError: | ||
479 | logger.info('Running "git am --abort" to cleanup repo') | ||
480 | runcmd("git am --abort") | ||
481 | logger.error('"%s" failed' % cmd) | ||
482 | logger.info("Please manually apply patch %s" % patchdisp) | ||
483 | logger.info("Note: if you exit and continue applying without manually applying the patch, it will be skipped") | ||
484 | if not drop_to_shell(): | ||
485 | if prevrev != repo['last_revision']: | ||
486 | conf.update(name, "last_revision", prevrev) | ||
487 | sys.exit(0) | ||
488 | prevrev = lastrev | ||
489 | i += 1 | ||
490 | else: | ||
491 | logger.info("No patches to apply from %s" % name) | ||
492 | ldir = conf.repos[name]['local_repo_dir'] | ||
493 | branch = conf.repos[name].get('branch', "master") | ||
494 | lastrev = runcmd("git rev-parse %s" % branch, ldir).strip() | ||
495 | |||
496 | if lastrev != repo['last_revision']: | ||
497 | conf.update(name, "last_revision", lastrev) | ||
498 | |||
499 | def action_splitpatch(conf, args): | ||
500 | """ | ||
501 | generate the commit patch and | ||
502 | split the patch per repo | ||
503 | """ | ||
504 | logger.debug("action_splitpatch") | ||
505 | if len(args) > 1: | ||
506 | commit = args[1] | ||
507 | else: | ||
508 | commit = "HEAD" | ||
509 | patchdir = "splitpatch-%s" % commit | ||
510 | if not os.path.exists(patchdir): | ||
511 | os.mkdir(patchdir) | ||
512 | |||
513 | # filerange_root is for the repo whose dest_dir is root "." | ||
514 | # and it should be specified by excluding all other repo dest dir | ||
515 | # like "-x repo1 -x repo2 -x repo3 ..." | ||
516 | filerange_root = "" | ||
517 | for name in conf.repos: | ||
518 | dest_dir = conf.repos[name]['dest_dir'] | ||
519 | if dest_dir != ".": | ||
520 | filerange_root = '%s -x "%s/*"' % (filerange_root, dest_dir) | ||
521 | |||
522 | for name in conf.repos: | ||
523 | dest_dir = conf.repos[name]['dest_dir'] | ||
524 | patch_filename = "%s/%s.patch" % (patchdir, name) | ||
525 | if dest_dir == ".": | ||
526 | cmd = "git format-patch -n1 --stdout %s^..%s | filterdiff -p1 %s > %s" % (commit, commit, filerange_root, patch_filename) | ||
527 | else: | ||
528 | cmd = "git format-patch --no-prefix -n1 --stdout %s^..%s -- %s > %s" % (commit, commit, dest_dir, patch_filename) | ||
529 | runcmd(cmd) | ||
530 | # Detect empty patches (including those produced by filterdiff above | ||
531 | # that contain only preamble text) | ||
532 | if os.path.getsize(patch_filename) == 0 or runcmd("filterdiff %s" % patch_filename) == "": | ||
533 | os.remove(patch_filename) | ||
534 | logger.info("(skipping %s - no changes)", name) | ||
535 | else: | ||
536 | logger.info(patch_filename) | ||
537 | |||
538 | def action_error(conf, args): | ||
539 | logger.info("invalid action %s" % args[0]) | ||
540 | |||
541 | actions = { | ||
542 | "init": action_init, | ||
543 | "update": action_update, | ||
544 | "pull": action_pull, | ||
545 | "splitpatch": action_splitpatch, | ||
546 | } | ||
547 | |||
548 | def main(): | ||
549 | parser = optparse.OptionParser( | ||
550 | version = "Combo Layer Repo Tool version %s" % __version__, | ||
551 | usage = """%prog [options] action | ||
552 | |||
553 | Create and update a combination layer repository from multiple component repositories. | ||
554 | |||
555 | Action: | ||
556 | init initialise the combo layer repo | ||
557 | update [components] get patches from component repos and apply them to the combo repo | ||
558 | pull [components] just pull component repos only | ||
559 | splitpatch [commit] generate commit patch and split per component, default commit is HEAD""") | ||
560 | |||
561 | parser.add_option("-c", "--conf", help = "specify the config file (conf/combo-layer.conf is the default).", | ||
562 | action = "store", dest = "conffile", default = "conf/combo-layer.conf") | ||
563 | |||
564 | parser.add_option("-i", "--interactive", help = "interactive mode, user can edit the patch list and patches", | ||
565 | action = "store_true", dest = "interactive", default = False) | ||
566 | |||
567 | parser.add_option("-D", "--debug", help = "output debug information", | ||
568 | action = "store_true", dest = "debug", default = False) | ||
569 | |||
570 | parser.add_option("-n", "--no-pull", help = "skip pulling component repos during update", | ||
571 | action = "store_true", dest = "nopull", default = False) | ||
572 | |||
573 | options, args = parser.parse_args(sys.argv) | ||
574 | |||
575 | # Dispatch to action handler | ||
576 | if len(args) == 1: | ||
577 | logger.error("No action specified, exiting") | ||
578 | parser.print_help() | ||
579 | elif args[1] not in actions: | ||
580 | logger.error("Unsupported action %s, exiting\n" % (args[1])) | ||
581 | parser.print_help() | ||
582 | elif not os.path.exists(options.conffile): | ||
583 | logger.error("No valid config file, exiting\n") | ||
584 | parser.print_help() | ||
585 | else: | ||
586 | if options.debug: | ||
587 | logger.setLevel(logging.DEBUG) | ||
588 | confdata = Configuration(options) | ||
589 | initmode = (args[1] == 'init') | ||
590 | confdata.sanity_check(initmode) | ||
591 | actions.get(args[1], action_error)(confdata, args[1:]) | ||
592 | |||
593 | if __name__ == "__main__": | ||
594 | try: | ||
595 | ret = main() | ||
596 | except Exception: | ||
597 | ret = 1 | ||
598 | import traceback | ||
599 | traceback.print_exc(5) | ||
600 | sys.exit(ret) | ||
diff --git a/scripts/combo-layer-hook-default.sh b/scripts/combo-layer-hook-default.sh new file mode 100755 index 0000000000..8b148aca07 --- /dev/null +++ b/scripts/combo-layer-hook-default.sh | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | # Hook to add source component/revision info to commit message | ||
3 | # Parameter: | ||
4 | # $1 patch-file | ||
5 | # $2 revision | ||
6 | # $3 reponame | ||
7 | |||
8 | patchfile=$1 | ||
9 | rev=$2 | ||
10 | reponame=$3 | ||
11 | |||
12 | sed -i -e "s#^Subject: \[PATCH\] \(.*\)#Subject: \[PATCH\] $reponame: \1#" $patchfile | ||
13 | sed -i -e "0,/^Signed-off-by:/s#\(^Signed-off-by:.*\)#\($reponame rev: $rev\)\n\n\1#" $patchfile | ||
diff --git a/scripts/combo-layer.conf.example b/scripts/combo-layer.conf.example new file mode 100644 index 0000000000..010a692350 --- /dev/null +++ b/scripts/combo-layer.conf.example | |||
@@ -0,0 +1,56 @@ | |||
1 | # combo-layer example configuration file | ||
2 | |||
3 | # component name | ||
4 | [bitbake] | ||
5 | # mandatory options | ||
6 | # git upstream uri | ||
7 | src_uri = git://git.openembedded.org/bitbake | ||
8 | |||
9 | # the directory to clone the component repo | ||
10 | local_repo_dir = /home/kyu3/src/test/bitbake | ||
11 | |||
12 | # the relative dir within the combo repo to put the component files | ||
13 | # use "." if the files should be in the root dir | ||
14 | dest_dir = bitbake | ||
15 | |||
16 | # the last update revision. | ||
17 | # "init" will set this to the latest revision automatically, however if it | ||
18 | # is empty when "update" is run, the tool will start from the first commit. | ||
19 | # Note that this value will get updated by "update" if the component repo's | ||
20 | # latest revision changed and the operation completes successfully. | ||
21 | last_revision = | ||
22 | |||
23 | # optional options: | ||
24 | |||
25 | # branch: specify the branch in the component repo to pull from | ||
26 | # (master if not specified) | ||
27 | |||
28 | # file_filter: only include the specified file(s) | ||
29 | # file_filter = [path] [path] ... | ||
30 | # example: | ||
31 | # file_filter = src/ : only include the subdir src | ||
32 | # file_filter = src/*.c : only include the src *.c file | ||
33 | # file_filter = src/main.c src/Makefile.am : only include these two files | ||
34 | |||
35 | # hook: if provided, the tool will call the hook to process the generated | ||
36 | # patch from upstream, and then apply the modified patch to the combo | ||
37 | # repo. | ||
38 | # the hook script is called as follows: ./hook patchpath revision reponame | ||
39 | # example: | ||
40 | # hook = combo-layer-hook-default.sh | ||
41 | |||
42 | [oe-core] | ||
43 | src_uri = git://git.openembedded.org/openembedded-core | ||
44 | local_repo_dir = /home/kyu3/src/test/oecore | ||
45 | dest_dir = . | ||
46 | last_revision = | ||
47 | |||
48 | # It is also possible to embed python code in the config values. Similar | ||
49 | # to bitbake it considers every value starting with @ to be a python | ||
50 | # script. | ||
51 | # e.g. local_repo_dir could easily be configured using an environment | ||
52 | # variable: | ||
53 | # | ||
54 | # [bitbake] | ||
55 | # local_repo_dir = @os.getenv("LOCAL_REPO_DIR") + "/bitbake" | ||
56 | # | ||
diff --git a/scripts/contrib/bb-perf/bb-matrix-plot.sh b/scripts/contrib/bb-perf/bb-matrix-plot.sh new file mode 100755 index 0000000000..136a25570d --- /dev/null +++ b/scripts/contrib/bb-perf/bb-matrix-plot.sh | |||
@@ -0,0 +1,137 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Copyright (c) 2011, Intel Corporation. | ||
4 | # All rights reserved. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This script operates on the .dat file generated by bb-matrix.sh. It tolerates | ||
22 | # the header by skipping the first line, but error messages and bad data records | ||
23 | # need to be removed first. It will generate three views of the plot, and leave | ||
24 | # an interactive view open for further analysis. | ||
25 | # | ||
26 | # AUTHORS | ||
27 | # Darren Hart <dvhart@linux.intel.com> | ||
28 | # | ||
29 | |||
30 | # Setup the defaults | ||
31 | DATFILE="bb-matrix.dat" | ||
32 | XLABEL="BB_NUMBER_THREADS" | ||
33 | YLABEL="PARALLEL_MAKE" | ||
34 | FIELD=3 | ||
35 | DEF_TITLE="Elapsed Time (seconds)" | ||
36 | PM3D_FRAGMENT="unset surface; set pm3d at s hidden3d 100" | ||
37 | SIZE="640,480" | ||
38 | |||
39 | function usage { | ||
40 | CMD=$(basename $0) | ||
41 | cat <<EOM | ||
42 | Usage: $CMD [-d datfile] [-f field] [-h] [-t title] [-w] | ||
43 | -d datfile The data file generated by bb-matrix.sh (default: $DATFILE) | ||
44 | -f field The field index to plot as the Z axis from the data file | ||
45 | (default: $FIELD, "$DEF_TITLE") | ||
46 | -h Display this help message | ||
47 | -s W,H PNG and window size in pixels (default: $SIZE) | ||
48 | -t title The title to display, should describe the field (-f) and units | ||
49 | (default: "$DEF_TITLE") | ||
50 | -w Render the plot as wireframe with a 2D colormap projected on the | ||
51 | XY plane rather than as the texture for the surface | ||
52 | EOM | ||
53 | } | ||
54 | |||
55 | # Parse and validate arguments | ||
56 | while getopts "d:f:hs:t:w" OPT; do | ||
57 | case $OPT in | ||
58 | d) | ||
59 | DATFILE="$OPTARG" | ||
60 | ;; | ||
61 | f) | ||
62 | FIELD="$OPTARG" | ||
63 | ;; | ||
64 | h) | ||
65 | usage | ||
66 | exit 0 | ||
67 | ;; | ||
68 | s) | ||
69 | SIZE="$OPTARG" | ||
70 | ;; | ||
71 | t) | ||
72 | TITLE="$OPTARG" | ||
73 | ;; | ||
74 | w) | ||
75 | PM3D_FRAGMENT="set pm3d at b" | ||
76 | W="-w" | ||
77 | ;; | ||
78 | *) | ||
79 | usage | ||
80 | exit 1 | ||
81 | ;; | ||
82 | esac | ||
83 | done | ||
84 | |||
85 | # Ensure the data file exists | ||
86 | if [ ! -f "$DATFILE" ]; then | ||
87 | echo "ERROR: $DATFILE does not exist" | ||
88 | usage | ||
89 | exit 1 | ||
90 | fi | ||
91 | PLOT_BASENAME=${DATFILE%.*}-f$FIELD$W | ||
92 | |||
93 | # Set a sane title | ||
94 | # TODO: parse the header and define titles for each format parameter for TIME(1) | ||
95 | if [ -z "$TITLE" ]; then | ||
96 | if [ ! "$FIELD" == "3" ]; then | ||
97 | TITLE="Field $FIELD" | ||
98 | else | ||
99 | TITLE="$DEF_TITLE" | ||
100 | fi | ||
101 | fi | ||
102 | |||
103 | # Determine the dgrid3d mesh dimensions size | ||
104 | MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | head -n1) | ||
105 | MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | tail -n1) | ||
106 | BB_CNT=$[${MAX} - $MIN + 1] | ||
107 | MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | head -n1) | ||
108 | MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | tail -n1) | ||
109 | PM_CNT=$[${MAX} - $MIN + 1] | ||
110 | |||
111 | |||
112 | (cat <<EOF | ||
113 | set title "$TITLE" | ||
114 | set xlabel "$XLABEL" | ||
115 | set ylabel "$YLABEL" | ||
116 | set style line 100 lt 5 lw 1.5 | ||
117 | $PM3D_FRAGMENT | ||
118 | set dgrid3d $PM_CNT,$BB_CNT splines | ||
119 | set ticslevel 0.2 | ||
120 | |||
121 | set term png size $SIZE | ||
122 | set output "$PLOT_BASENAME.png" | ||
123 | splot "$DATFILE" every ::1 using 1:2:$FIELD with lines ls 100 | ||
124 | |||
125 | set view 90,0 | ||
126 | set output "$PLOT_BASENAME-bb.png" | ||
127 | replot | ||
128 | |||
129 | set view 90,90 | ||
130 | set output "$PLOT_BASENAME-pm.png" | ||
131 | replot | ||
132 | |||
133 | set view 60,30 | ||
134 | set term wxt size $SIZE | ||
135 | replot | ||
136 | EOF | ||
137 | ) | gnuplot --persist | ||
diff --git a/scripts/contrib/bb-perf/bb-matrix.sh b/scripts/contrib/bb-perf/bb-matrix.sh new file mode 100755 index 0000000000..106456584d --- /dev/null +++ b/scripts/contrib/bb-perf/bb-matrix.sh | |||
@@ -0,0 +1,79 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Copyright (c) 2011, Intel Corporation. | ||
4 | # All rights reserved. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This script runs BB_CMD (typically building core-image-sato) for all | ||
22 | # combincations of BB_RANGE and PM_RANGE values. It saves off all the console | ||
23 | # logs, the buildstats directories, and creates a bb-pm-runtime.dat file which | ||
24 | # can be used to postprocess the results with a plotting tool, spreadsheet, etc. | ||
25 | # Before running this script, it is recommended that you pre-download all the | ||
26 | # necessary sources by performing the BB_CMD once manually. It is also a good | ||
27 | # idea to disable cron to avoid runtime variations caused by things like the | ||
28 | # locate process. Be sure to sanitize the dat file prior to post-processing as | ||
29 | # it may contain error messages or bad runs that should be removed. | ||
30 | # | ||
31 | # AUTHORS | ||
32 | # Darren Hart <dvhart@linux.intel.com> | ||
33 | # | ||
34 | |||
35 | # The following ranges are appropriate for a 4 core system with 8 logical units | ||
36 | # Use leading 0s to ensure all digits are the same string length, this results | ||
37 | # in nice log file names and columnar dat files. | ||
38 | BB_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16" | ||
39 | PM_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16" | ||
40 | |||
41 | DATADIR="bb-matrix-$$" | ||
42 | BB_CMD="bitbake core-image-minimal" | ||
43 | RUNTIME_LOG="$DATADIR/bb-matrix.dat" | ||
44 | |||
45 | # See TIME(1) for a description of the time format parameters | ||
46 | # The following all report 0: W K r s t w | ||
47 | TIME_STR="%e %S %U %P %c %w %R %F %M %x" | ||
48 | |||
49 | # Prepare the DATADIR | ||
50 | mkdir $DATADIR | ||
51 | if [ $? -ne 0 ]; then | ||
52 | echo "Failed to create $DATADIR." | ||
53 | exit 1 | ||
54 | fi | ||
55 | |||
56 | # Add a simple header | ||
57 | echo "BB PM $TIME_STR" > $RUNTIME_LOG | ||
58 | for BB in $BB_RANGE; do | ||
59 | for PM in $PM_RANGE; do | ||
60 | RUNDIR="$DATADIR/$BB-$PM-build" | ||
61 | mkdir $RUNDIR | ||
62 | BB_LOG=$RUNDIR/$BB-$PM-bitbake.log | ||
63 | date | ||
64 | echo "BB=$BB PM=$PM Logging to $BB_LOG" | ||
65 | |||
66 | echo -n " Preparing the work directory... " | ||
67 | rm -rf pseudodone tmp sstate-cache tmp-eglibc &> /dev/null | ||
68 | echo "done" | ||
69 | |||
70 | # Export the variables under test and run the bitbake command | ||
71 | # Strip any leading zeroes before passing to bitbake | ||
72 | export BB_NUMBER_THREADS=$(echo $BB | sed 's/^0*//') | ||
73 | export PARALLEL_MAKE="-j $(echo $PM | sed 's/^0*//')" | ||
74 | /usr/bin/time -f "$BB $PM $TIME_STR" -a -o $RUNTIME_LOG $BB_CMD &> $BB_LOG | ||
75 | |||
76 | echo " $(tail -n1 $RUNTIME_LOG)" | ||
77 | cp -a tmp/buildstats $RUNDIR/$BB-$PM-buildstats | ||
78 | done | ||
79 | done | ||
diff --git a/scripts/contrib/bbvars.py b/scripts/contrib/bbvars.py new file mode 100755 index 0000000000..0896d64445 --- /dev/null +++ b/scripts/contrib/bbvars.py | |||
@@ -0,0 +1,186 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # This program is free software; you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation; either version 2 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | # | ||
8 | # This program is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with this program; if not, write to the Free Software | ||
15 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
16 | # | ||
17 | # Copyright (C) Darren Hart <dvhart@linux.intel.com>, 2010 | ||
18 | |||
19 | |||
20 | import sys | ||
21 | import getopt | ||
22 | import os | ||
23 | import os.path | ||
24 | import re | ||
25 | |||
26 | def usage(): | ||
27 | print 'Usage: %s -d FILENAME [-d FILENAME]* -m METADIR [-m MATADIR]*' % os.path.basename(sys.argv[0]) | ||
28 | print ' -d FILENAME documentation file to search' | ||
29 | print ' -h, --help display this help and exit' | ||
30 | print ' -m METADIR meta directory to search for recipes' | ||
31 | print ' -t FILENAME documentation config file (for doc tags)' | ||
32 | print ' -T Only display variables with doc tags (requires -t)' | ||
33 | |||
34 | def recipe_bbvars(recipe): | ||
35 | ''' Return a unique set of every bbvar encountered in the recipe ''' | ||
36 | prog = re.compile("[A-Z_]+") | ||
37 | vset = set() | ||
38 | try: | ||
39 | r = open(recipe) | ||
40 | except IOError as (errno, strerror): | ||
41 | print 'WARNING: Failed to open recipe ', recipe | ||
42 | print strerror | ||
43 | |||
44 | for line in r: | ||
45 | # Strip any comments from the line | ||
46 | line = line.rsplit('#')[0] | ||
47 | vset = vset.union(set(prog.findall(line))) | ||
48 | r.close() | ||
49 | |||
50 | bbvars = {} | ||
51 | for v in vset: | ||
52 | bbvars[v] = 1 | ||
53 | |||
54 | return bbvars | ||
55 | |||
56 | def collect_bbvars(metadir): | ||
57 | ''' Walk the metadir and collect the bbvars from each recipe found ''' | ||
58 | bbvars = {} | ||
59 | for root,dirs,files in os.walk(metadir): | ||
60 | for name in files: | ||
61 | if name.find(".bb") >= 0: | ||
62 | for key in recipe_bbvars(os.path.join(root,name)).iterkeys(): | ||
63 | if bbvars.has_key(key): | ||
64 | bbvars[key] = bbvars[key] + 1 | ||
65 | else: | ||
66 | bbvars[key] = 1 | ||
67 | return bbvars | ||
68 | |||
69 | def bbvar_is_documented(var, docfiles): | ||
70 | prog = re.compile(".*($|[^A-Z_])%s([^A-Z_]|$)" % (var)) | ||
71 | for doc in docfiles: | ||
72 | try: | ||
73 | f = open(doc) | ||
74 | except IOError as (errno, strerror): | ||
75 | print 'WARNING: Failed to open doc ', doc | ||
76 | print strerror | ||
77 | for line in f: | ||
78 | if prog.match(line): | ||
79 | return True | ||
80 | f.close() | ||
81 | return False | ||
82 | |||
83 | def bbvar_doctag(var, docconf): | ||
84 | prog = re.compile('^%s\[doc\] *= *"(.*)"' % (var)) | ||
85 | if docconf == "": | ||
86 | return "?" | ||
87 | |||
88 | try: | ||
89 | f = open(docconf) | ||
90 | except IOError as (errno, strerror): | ||
91 | return strerror | ||
92 | |||
93 | for line in f: | ||
94 | m = prog.search(line) | ||
95 | if m: | ||
96 | return m.group(1) | ||
97 | |||
98 | f.close() | ||
99 | return "" | ||
100 | |||
101 | def main(): | ||
102 | docfiles = [] | ||
103 | metadirs = [] | ||
104 | bbvars = {} | ||
105 | undocumented = [] | ||
106 | docconf = "" | ||
107 | onlydoctags = False | ||
108 | |||
109 | # Collect and validate input | ||
110 | try: | ||
111 | opts, args = getopt.getopt(sys.argv[1:], "d:hm:t:T", ["help"]) | ||
112 | except getopt.GetoptError, err: | ||
113 | print '%s' % str(err) | ||
114 | usage() | ||
115 | sys.exit(2) | ||
116 | |||
117 | for o, a in opts: | ||
118 | if o in ('-h', '--help'): | ||
119 | usage() | ||
120 | sys.exit(0) | ||
121 | elif o == '-d': | ||
122 | if os.path.isfile(a): | ||
123 | docfiles.append(a) | ||
124 | else: | ||
125 | print 'ERROR: documentation file %s is not a regular file' % (a) | ||
126 | sys.exit(3) | ||
127 | elif o == '-m': | ||
128 | if os.path.isdir(a): | ||
129 | metadirs.append(a) | ||
130 | else: | ||
131 | print 'ERROR: meta directory %s is not a directory' % (a) | ||
132 | sys.exit(4) | ||
133 | elif o == "-t": | ||
134 | if os.path.isfile(a): | ||
135 | docconf = a | ||
136 | elif o == "-T": | ||
137 | onlydoctags = True | ||
138 | else: | ||
139 | assert False, "unhandled option" | ||
140 | |||
141 | if len(docfiles) == 0: | ||
142 | print 'ERROR: no docfile specified' | ||
143 | usage() | ||
144 | sys.exit(5) | ||
145 | |||
146 | if len(metadirs) == 0: | ||
147 | print 'ERROR: no metadir specified' | ||
148 | usage() | ||
149 | sys.exit(6) | ||
150 | |||
151 | if onlydoctags and docconf == "": | ||
152 | print 'ERROR: no docconf specified' | ||
153 | usage() | ||
154 | sys.exit(7) | ||
155 | |||
156 | # Collect all the variable names from the recipes in the metadirs | ||
157 | for m in metadirs: | ||
158 | for key,cnt in collect_bbvars(m).iteritems(): | ||
159 | if bbvars.has_key(key): | ||
160 | bbvars[key] = bbvars[key] + cnt | ||
161 | else: | ||
162 | bbvars[key] = cnt | ||
163 | |||
164 | # Check each var for documentation | ||
165 | varlen = 0 | ||
166 | for v in bbvars.iterkeys(): | ||
167 | if len(v) > varlen: | ||
168 | varlen = len(v) | ||
169 | if not bbvar_is_documented(v, docfiles): | ||
170 | undocumented.append(v) | ||
171 | undocumented.sort() | ||
172 | varlen = varlen + 1 | ||
173 | |||
174 | # Report all undocumented variables | ||
175 | print 'Found %d undocumented bb variables (out of %d):' % (len(undocumented), len(bbvars)) | ||
176 | header = '%s%s%s' % (str("VARIABLE").ljust(varlen), str("COUNT").ljust(6), str("DOCTAG").ljust(7)) | ||
177 | print header | ||
178 | print str("").ljust(len(header), '=') | ||
179 | for v in undocumented: | ||
180 | doctag = bbvar_doctag(v, docconf) | ||
181 | if not onlydoctags or not doctag == "": | ||
182 | print '%s%s%s' % (v.ljust(varlen), str(bbvars[v]).ljust(6), doctag) | ||
183 | |||
184 | |||
185 | if __name__ == "__main__": | ||
186 | main() | ||
diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh new file mode 100755 index 0000000000..cdd7885dca --- /dev/null +++ b/scripts/contrib/build-perf-test.sh | |||
@@ -0,0 +1,369 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # This script runs a series of tests (with and without sstate) and reports build time (and tmp/ size) | ||
4 | # | ||
5 | # Build performance test script | ||
6 | # | ||
7 | # Copyright 2013 Intel Corporation | ||
8 | # | ||
9 | # This program is free software; you can redistribute it and/or modify | ||
10 | # it under the terms of the GNU General Public License as published by | ||
11 | # the Free Software Foundation; either version 2 of the License, or | ||
12 | # (at your option) any later version. | ||
13 | # | ||
14 | # This program is distributed in the hope that it will be useful, | ||
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | # GNU General Public License for more details. | ||
18 | # | ||
19 | # You should have received a copy of the GNU General Public License | ||
20 | # along with this program; if not, write to the Free Software | ||
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | # | ||
23 | # | ||
24 | # AUTHORS: | ||
25 | # Stefan Stanacar <stefanx.stanacar@intel.com> | ||
26 | |||
27 | |||
28 | ME=$(basename $0) | ||
29 | |||
30 | # | ||
31 | # usage and setup | ||
32 | # | ||
33 | |||
34 | usage () { | ||
35 | cat << EOT | ||
36 | Usage: $ME [-h] | ||
37 | $ME [-c <commit>] [-v] [-m <val>] [-j <val>] [-t <val>] [-i <image-name>] [-d <path>] | ||
38 | Options: | ||
39 | -h | ||
40 | Display this help and exit. | ||
41 | -c <commit> | ||
42 | git checkout <commit> before anything else | ||
43 | -v | ||
44 | Show bitbake output, don't redirect it to a log. | ||
45 | -m <machine> | ||
46 | Value for MACHINE. Default is qemux86. | ||
47 | -j <val> | ||
48 | Value for PARALLEL_MAKE. Default is 8. | ||
49 | -t <val> | ||
50 | Value for BB_NUMBER_THREADS. Default is 8. | ||
51 | -i <image-name> | ||
52 | Instead of timing against core-image-sato, use <image-name> | ||
53 | -d <path> | ||
54 | Use <path> as DL_DIR | ||
55 | -p <githash> | ||
56 | Cherry pick githash onto the commit | ||
57 | |||
58 | Note: current working directory must be inside a poky git clone. | ||
59 | |||
60 | EOT | ||
61 | } | ||
62 | |||
63 | |||
64 | if clonedir=$(git rev-parse --show-toplevel); then | ||
65 | cd $clonedir | ||
66 | else | ||
67 | echo "The current working dir doesn't seem to be a poky git clone. Please cd there before running $ME" | ||
68 | exit 1 | ||
69 | fi | ||
70 | |||
71 | IMAGE="core-image-sato" | ||
72 | verbose=0 | ||
73 | dldir= | ||
74 | commit= | ||
75 | pmake= | ||
76 | cherrypicks= | ||
77 | while getopts "hvc:m:j:t:i:d:p:" opt; do | ||
78 | case $opt in | ||
79 | h) usage | ||
80 | exit 0 | ||
81 | ;; | ||
82 | v) verbose=1 | ||
83 | ;; | ||
84 | c) commit=$OPTARG | ||
85 | ;; | ||
86 | m) export MACHINE=$OPTARG | ||
87 | ;; | ||
88 | j) pmake=$OPTARG | ||
89 | ;; | ||
90 | t) export BB_NUMBER_THREADS=$OPTARG | ||
91 | ;; | ||
92 | i) IMAGE=$OPTARG | ||
93 | ;; | ||
94 | d) dldir=$OPTARG | ||
95 | ;; | ||
96 | p) cherrypicks="$cherrypicks $OPTARG" | ||
97 | ;; | ||
98 | *) usage | ||
99 | exit 1 | ||
100 | ;; | ||
101 | esac | ||
102 | done | ||
103 | |||
104 | |||
105 | #drop cached credentials and test for sudo access without a password | ||
106 | sudo -k -n ls > /dev/null 2>&1 | ||
107 | reqpass=$? | ||
108 | if [ $reqpass -ne 0 ]; then | ||
109 | echo "The script requires sudo access to drop caches between builds (echo 3 > /proc/sys/vm/drop_caches)" | ||
110 | read -s -p "Please enter your sudo password: " pass | ||
111 | echo | ||
112 | fi | ||
113 | |||
114 | if [ -n "$commit" ]; then | ||
115 | echo "git checkout -f $commit" | ||
116 | git pull > /dev/null 2>&1 | ||
117 | git checkout -f $commit || exit 1 | ||
118 | git pull > /dev/null 2>&1 | ||
119 | fi | ||
120 | |||
121 | if [ -n "$cherrypicks" ]; then | ||
122 | for c in $cherrypicks; do | ||
123 | git cherry-pick $c | ||
124 | done | ||
125 | fi | ||
126 | |||
127 | rev=$(git rev-parse --short HEAD) || exit 1 | ||
128 | OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`" | ||
129 | BUILDDIR="$OUTDIR/build" | ||
130 | resultsfile="$OUTDIR/results.log" | ||
131 | bboutput="$OUTDIR/bitbake.log" | ||
132 | myoutput="$OUTDIR/output.log" | ||
133 | globalres="$clonedir/build-perf-test/globalres.log" | ||
134 | |||
135 | mkdir -p $OUTDIR || exit 1 | ||
136 | |||
137 | log () { | ||
138 | local msg="$1" | ||
139 | echo "`date`: $msg" | tee -a $myoutput | ||
140 | } | ||
141 | |||
142 | |||
143 | # | ||
144 | # Config stuff | ||
145 | # | ||
146 | |||
147 | branch=`git branch 2>&1 | grep "^* " | tr -d "* "` | ||
148 | gitcommit=$(git rev-parse HEAD) || exit 1 | ||
149 | log "Running on $branch:$gitcommit" | ||
150 | |||
151 | source ./oe-init-build-env $OUTDIR/build >/dev/null || exit 1 | ||
152 | cd $OUTDIR/build | ||
153 | |||
154 | [ -n "$MACHINE" ] || export MACHINE="qemux86" | ||
155 | [ -n "$BB_NUMBER_THREADS" ] || export BB_NUMBER_THREADS="8" | ||
156 | |||
157 | if [ -n "$pmake" ]; then | ||
158 | export PARALLEL_MAKE="-j $pmake" | ||
159 | else | ||
160 | export PARALLEL_MAKE="-j 8" | ||
161 | fi | ||
162 | |||
163 | if [ -n "$dldir" ]; then | ||
164 | echo "DL_DIR = \"$dldir\"" >> conf/local.conf | ||
165 | else | ||
166 | echo "DL_DIR = \"$clonedir/build-perf-test/downloads\"" >> conf/local.conf | ||
167 | fi | ||
168 | |||
169 | # Sometimes I've noticed big differences in timings for the same commit, on the same machine | ||
170 | # Disabling the network sanity check helps a bit (because of my crappy network connection and/or proxy) | ||
171 | echo "CONNECTIVITY_CHECK_URIS =\"\"" >> conf/local.conf | ||
172 | |||
173 | |||
174 | # | ||
175 | # Functions | ||
176 | # | ||
177 | |||
178 | declare -a TIMES | ||
179 | time_count=0 | ||
180 | declare -a SIZES | ||
181 | size_count=0 | ||
182 | |||
183 | bbtime () { | ||
184 | local arg="$@" | ||
185 | log " Timing: bitbake ${arg}" | ||
186 | |||
187 | if [ $verbose -eq 0 ]; then | ||
188 | /usr/bin/time -v -o $resultsfile bitbake ${arg} >> $bboutput | ||
189 | else | ||
190 | /usr/bin/time -v -o $resultsfile bitbake ${arg} | ||
191 | fi | ||
192 | ret=$? | ||
193 | if [ $ret -eq 0 ]; then | ||
194 | t=`grep wall $resultsfile | sed 's/.*m:ss): //'` | ||
195 | log " TIME: $t" | ||
196 | TIMES[(( time_count++ ))]="$t" | ||
197 | else | ||
198 | log "ERROR: exit status was non-zero, will report time as 0." | ||
199 | TIMES[(( time_count++ ))]="0" | ||
200 | fi | ||
201 | |||
202 | #time by default overwrites the output file and we want to keep the results | ||
203 | #it has an append option but I don't want to clobber the results in the same file | ||
204 | i=`ls $OUTDIR/results.log* |wc -l` | ||
205 | mv $resultsfile "${resultsfile}.${i}" | ||
206 | log "More stats can be found in ${resultsfile}.${i}" | ||
207 | } | ||
208 | |||
209 | #we don't time bitbake here | ||
210 | bbnotime () { | ||
211 | local arg="$@" | ||
212 | log " Running: bitbake ${arg}" | ||
213 | if [ $verbose -eq 0 ]; then | ||
214 | bitbake ${arg} >> $bboutput | ||
215 | else | ||
216 | bitbake ${arg} | ||
217 | fi | ||
218 | ret=$? | ||
219 | if [ $ret -eq 0 ]; then | ||
220 | log " Finished bitbake ${arg}" | ||
221 | else | ||
222 | log "ERROR: exit status was non-zero. Exit.." | ||
223 | exit $ret | ||
224 | fi | ||
225 | |||
226 | } | ||
227 | |||
228 | do_rmtmp() { | ||
229 | log " Removing tmp" | ||
230 | rm -rf bitbake.lock pseudodone conf/sanity_info cache tmp | ||
231 | } | ||
232 | do_rmsstate () { | ||
233 | log " Removing sstate-cache" | ||
234 | rm -rf sstate-cache | ||
235 | } | ||
236 | do_sync () { | ||
237 | log " Syncing and dropping caches" | ||
238 | sync; sync | ||
239 | if [ $reqpass -eq 0 ]; then | ||
240 | sudo sh -c "echo 3 > /proc/sys/vm/drop_caches" | ||
241 | else | ||
242 | echo "$pass" | sudo -S sh -c "echo 3 > /proc/sys/vm/drop_caches" | ||
243 | echo | ||
244 | fi | ||
245 | sleep 3 | ||
246 | } | ||
247 | |||
248 | write_results() { | ||
249 | echo -n "`uname -n`,$branch:$gitcommit,`git describe`," >> $globalres | ||
250 | for i in "${TIMES[@]}"; do | ||
251 | echo -n "$i," >> $globalres | ||
252 | done | ||
253 | for i in "${SIZES[@]}"; do | ||
254 | echo -n "$i," >> $globalres | ||
255 | done | ||
256 | echo >> $globalres | ||
257 | sed -i '$ s/,$//' $globalres | ||
258 | } | ||
259 | |||
260 | #### | ||
261 | |||
262 | # | ||
263 | # Test 1 | ||
264 | # Measure: Wall clock of "bitbake core-image-sato" and size of tmp/dir (w/o rm_work and w/ rm_work) | ||
265 | # Pre: Downloaded sources, no sstate | ||
266 | # Steps: | ||
267 | # Part1: | ||
268 | # - fetchall | ||
269 | # - clean build dir | ||
270 | # - time bitbake core-image-sato | ||
271 | # - collect data | ||
272 | # Part2: | ||
273 | # - bitbake virtual/kernel -c cleansstate | ||
274 | # - time bitbake virtual/kernel | ||
275 | # Part3: | ||
276 | # - add INHERIT to local.conf | ||
277 | # - clean build dir | ||
278 | # - build | ||
279 | # - report size, remove INHERIT | ||
280 | |||
281 | test1_p1 () { | ||
282 | log "Running Test 1, part 1/3: Measure wall clock of bitbake $IMAGE and size of tmp/ dir" | ||
283 | bbnotime $IMAGE -c fetchall | ||
284 | do_rmtmp | ||
285 | do_rmsstate | ||
286 | do_sync | ||
287 | bbtime $IMAGE | ||
288 | s=`du -s tmp | sed 's/tmp//' | sed 's/[ \t]*$//'` | ||
289 | SIZES[(( size_count++ ))]="$s" | ||
290 | log "SIZE of tmp dir is: $s" | ||
291 | log "Buildstats are saved in $OUTDIR/buildstats-test1" | ||
292 | mv tmp/buildstats $OUTDIR/buildstats-test1 | ||
293 | } | ||
294 | |||
295 | |||
296 | test1_p2 () { | ||
297 | log "Running Test 1, part 2/3: bitbake virtual/kernel -c cleansstate and time bitbake virtual/kernel" | ||
298 | bbnotime virtual/kernel -c cleansstate | ||
299 | do_sync | ||
300 | bbtime virtual/kernel | ||
301 | } | ||
302 | |||
303 | test1_p3 () { | ||
304 | log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled" | ||
305 | echo "INHERIT += \"rm_work\"" >> conf/local.conf | ||
306 | do_rmtmp | ||
307 | do_rmsstate | ||
308 | do_sync | ||
309 | bbtime $IMAGE | ||
310 | sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf | ||
311 | s=`du -s tmp | sed 's/tmp//' | sed 's/[ \t]*$//'` | ||
312 | SIZES[(( size_count++ ))]="$s" | ||
313 | log "SIZE of tmp dir is: $s" | ||
314 | log "Buildstats are saved in $OUTDIR/buildstats-test13" | ||
315 | mv tmp/buildstats $OUTDIR/buildstats-test13 | ||
316 | } | ||
317 | |||
318 | |||
319 | # | ||
320 | # Test 2 | ||
321 | # Measure: Wall clock of "bitbake core-image-sato" and size of tmp/dir | ||
322 | # Pre: populated sstate cache | ||
323 | |||
324 | test2 () { | ||
325 | # Assuming test 1 has run | ||
326 | log "Running Test 2: Measure wall clock of bitbake $IMAGE -c rootfs with sstate" | ||
327 | do_rmtmp | ||
328 | do_sync | ||
329 | bbtime $IMAGE -c rootfs | ||
330 | } | ||
331 | |||
332 | |||
333 | # Test 3 | ||
334 | # parsing time metrics | ||
335 | # | ||
336 | # Start with | ||
337 | # i) "rm -rf tmp/cache; time bitbake -p" | ||
338 | # ii) "rm -rf tmp/cache/default-glibc/; time bitbake -p" | ||
339 | # iii) "time bitbake -p" | ||
340 | |||
341 | |||
342 | test3 () { | ||
343 | log "Running Test 3: Parsing time metrics (bitbake -p)" | ||
344 | log " Removing tmp/cache && cache" | ||
345 | rm -rf tmp/cache cache | ||
346 | bbtime -p | ||
347 | log " Removing tmp/cache/default-glibc/" | ||
348 | rm -rf tmp/cache/default-glibc/ | ||
349 | bbtime -p | ||
350 | bbtime -p | ||
351 | } | ||
352 | |||
353 | |||
354 | |||
355 | # RUN! | ||
356 | |||
357 | test1_p1 | ||
358 | test1_p2 | ||
359 | test1_p3 | ||
360 | test2 | ||
361 | test3 | ||
362 | |||
363 | # if we got til here write to global results | ||
364 | write_results | ||
365 | |||
366 | log "All done, cleaning up..." | ||
367 | |||
368 | do_rmtmp | ||
369 | do_rmsstate | ||
diff --git a/scripts/contrib/ddimage b/scripts/contrib/ddimage new file mode 100755 index 0000000000..a503f11d0d --- /dev/null +++ b/scripts/contrib/ddimage | |||
@@ -0,0 +1,104 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Default to avoiding the first two disks on typical Linux and Mac OS installs | ||
4 | # Better safe than sorry :-) | ||
5 | BLACKLIST_DEVICES="/dev/sda /dev/sdb /dev/disk1 /dev/disk2" | ||
6 | |||
7 | # 1MB blocksize | ||
8 | BLOCKSIZE=1048576 | ||
9 | |||
10 | usage() { | ||
11 | echo "Usage: $(basename $0) IMAGE DEVICE" | ||
12 | } | ||
13 | |||
14 | image_details() { | ||
15 | IMG=$1 | ||
16 | echo "Image details" | ||
17 | echo "=============" | ||
18 | echo " image: $(basename $IMG)" | ||
19 | # stat format is different on Mac OS and Linux | ||
20 | if [ "$(uname)" = "Darwin" ]; then | ||
21 | echo " size: $(stat -L -f '%z bytes' $IMG)" | ||
22 | echo " modified: $(stat -L -f '%Sm' $IMG)" | ||
23 | else | ||
24 | echo " size: $(stat -L -c '%s bytes' $IMG)" | ||
25 | echo " modified: $(stat -L -c '%y' $IMG)" | ||
26 | fi | ||
27 | echo " type: $(file -L -b $IMG)" | ||
28 | echo "" | ||
29 | } | ||
30 | |||
31 | device_details() { | ||
32 | DEV=$1 | ||
33 | BLOCK_SIZE=512 | ||
34 | |||
35 | echo "Device details" | ||
36 | echo "==============" | ||
37 | |||
38 | # Collect disk info using diskutil on Mac OS | ||
39 | if [ "$(uname)" = "Darwin" ]; then | ||
40 | diskutil info $DEVICE | egrep "(Device Node|Media Name|Total Size)" | ||
41 | return | ||
42 | fi | ||
43 | |||
44 | # Default / Linux information collection | ||
45 | echo " device: $DEVICE" | ||
46 | if [ -f "/sys/class/block/$DEV/device/vendor" ]; then | ||
47 | echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)" | ||
48 | else | ||
49 | echo " vendor: UNKOWN" | ||
50 | fi | ||
51 | if [ -f "/sys/class/block/$DEV/device/model" ]; then | ||
52 | echo " model: $(cat /sys/class/block/$DEV/device/model)" | ||
53 | else | ||
54 | echo " model: UNKNOWN" | ||
55 | fi | ||
56 | if [ -f "/sys/class/block/$DEV/size" ]; then | ||
57 | echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes" | ||
58 | else | ||
59 | echo " size: UNKNOWN" | ||
60 | fi | ||
61 | echo "" | ||
62 | } | ||
63 | |||
64 | if [ $# -ne 2 ]; then | ||
65 | usage | ||
66 | exit 1 | ||
67 | fi | ||
68 | |||
69 | IMAGE=$1 | ||
70 | DEVICE=$2 | ||
71 | |||
72 | if [ ! -e "$IMAGE" ]; then | ||
73 | echo "ERROR: Image $IMAGE does not exist" | ||
74 | usage | ||
75 | exit 1 | ||
76 | fi | ||
77 | |||
78 | |||
79 | for i in ${BLACKLIST_DEVICES}; do | ||
80 | if [ "$i" = "$DEVICE" ]; then | ||
81 | echo "ERROR: Device $DEVICE is blacklisted" | ||
82 | exit 1 | ||
83 | fi | ||
84 | done | ||
85 | |||
86 | if [ ! -w "$DEVICE" ]; then | ||
87 | echo "ERROR: Device $DEVICE does not exist or is not writable" | ||
88 | usage | ||
89 | exit 1 | ||
90 | fi | ||
91 | |||
92 | image_details $IMAGE | ||
93 | device_details $(basename $DEVICE) | ||
94 | |||
95 | printf "Write $IMAGE to $DEVICE [y/N]? " | ||
96 | read RESPONSE | ||
97 | if [ "$RESPONSE" != "y" ]; then | ||
98 | echo "Write aborted" | ||
99 | exit 0 | ||
100 | fi | ||
101 | |||
102 | echo "Writing image..." | ||
103 | dd if="$IMAGE" of="$DEVICE" bs="$BLOCKSIZE" | ||
104 | sync | ||
diff --git a/scripts/contrib/dialog-power-control b/scripts/contrib/dialog-power-control new file mode 100755 index 0000000000..7550ea53be --- /dev/null +++ b/scripts/contrib/dialog-power-control | |||
@@ -0,0 +1,53 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Simple script to show a manual power prompt for when you want to use | ||
4 | # automated hardware testing with testimage.bbclass but you don't have a | ||
5 | # web-enabled power strip or similar to do the power on/off/cycle. | ||
6 | # | ||
7 | # You can enable it by enabling testimage (see the Yocto Project | ||
8 | # Development manual "Performing Automated Runtime Testing" section) | ||
9 | # and setting the following in your local.conf: | ||
10 | # | ||
11 | # TEST_POWERCONTROL_CMD = "${COREBASE}/scripts/contrib/dialog-power-control" | ||
12 | # | ||
13 | |||
14 | PROMPT="" | ||
15 | while true; do | ||
16 | case $1 in | ||
17 | on) | ||
18 | PROMPT="Please turn device power on";; | ||
19 | off) | ||
20 | PROMPT="Please turn device power off";; | ||
21 | cycle) | ||
22 | PROMPT="Please click Done, then turn the device power off then on";; | ||
23 | "") | ||
24 | break;; | ||
25 | esac | ||
26 | shift | ||
27 | done | ||
28 | |||
29 | if [ "$PROMPT" = "" ] ; then | ||
30 | echo "ERROR: no power action specified on command line" | ||
31 | exit 2 | ||
32 | fi | ||
33 | |||
34 | if [ "`which kdialog 2>/dev/null`" != "" ] ; then | ||
35 | DIALOGUTIL="kdialog" | ||
36 | elif [ "`which zenity 2>/dev/null`" != "" ] ; then | ||
37 | DIALOGUTIL="zenity" | ||
38 | else | ||
39 | echo "ERROR: couldn't find program to display a message, install kdialog or zenity" | ||
40 | exit 3 | ||
41 | fi | ||
42 | |||
43 | if [ "$DIALOGUTIL" = "kdialog" ] ; then | ||
44 | kdialog --yesno "$PROMPT" --title "TestImage Power Control" --yes-label "Done" --no-label "Cancel test" | ||
45 | elif [ "$DIALOGUTIL" = "zenity" ] ; then | ||
46 | zenity --question --text="$PROMPT" --title="TestImage Power Control" --ok-label="Done" --cancel-label="Cancel test" | ||
47 | fi | ||
48 | |||
49 | if [ "$?" != "0" ] ; then | ||
50 | echo "User cancelled test at power prompt" | ||
51 | exit 1 | ||
52 | fi | ||
53 | |||
diff --git a/scripts/contrib/documentation-audit.sh b/scripts/contrib/documentation-audit.sh new file mode 100755 index 0000000000..2144aac936 --- /dev/null +++ b/scripts/contrib/documentation-audit.sh | |||
@@ -0,0 +1,94 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Perform an audit of which packages provide documentation and which | ||
4 | # are missing -doc packages. | ||
5 | # | ||
6 | # Setup requirements: be sure to be building for MACHINE=qemux86. Run | ||
7 | # this script after source'ing the build environment script, so you're | ||
8 | # running it from build/ directory. | ||
9 | # | ||
10 | # Maintainer: Scott Garman <scott.a.garman@intel.com> | ||
11 | |||
12 | REPORT_DOC_SIMPLE="documentation_exists.txt" | ||
13 | REPORT_DOC_DETAIL="documentation_exists_detail.txt" | ||
14 | REPORT_MISSING_SIMPLE="documentation_missing.txt" | ||
15 | REPORT_MISSING_DETAIL="documentation_missing_detail.txt" | ||
16 | REPORT_BUILD_ERRORS="build_errors.txt" | ||
17 | |||
18 | rm -rf $REPORT_DOC_SIMPLE $REPORT_DOC_DETAIL $REPORT_MISSING_SIMPLE $REPORT_MISSING_DETAIL | ||
19 | |||
20 | BITBAKE=`which bitbake` | ||
21 | if [ -z "$BITBAKE" ]; then | ||
22 | echo "Error: bitbake command not found." | ||
23 | echo "Did you forget to source the build environment script?" | ||
24 | exit 1 | ||
25 | fi | ||
26 | |||
27 | echo "REMINDER: you need to build for MACHINE=qemux86 or you won't get useful results" | ||
28 | echo "REMINDER: you need to set LICENSE_FLAGS_WHITELIST appropriately in local.conf or " | ||
29 | echo " you'll get false positives. For example, LICENSE_FLAGS_WHITELIST = \"Commercial\"" | ||
30 | |||
31 | for pkg in `bitbake -s | awk '{ print \$1 }'`; do | ||
32 | if [[ "$pkg" == "Loading" || "$pkg" == "Loaded" || | ||
33 | "$pkg" == "Recipe" || | ||
34 | "$pkg" == "Parsing" || "$pkg" == "Package" || | ||
35 | "$pkg" == "NOTE:" || "$pkg" == "WARNING:" || | ||
36 | "$pkg" == "done." || "$pkg" == "===========" ]] | ||
37 | then | ||
38 | # Skip initial bitbake output | ||
39 | continue | ||
40 | fi | ||
41 | if [[ "$pkg" =~ -native$ || "$pkg" =~ -nativesdk$ || | ||
42 | "$pkg" =~ -cross-canadian ]]; then | ||
43 | # Skip native/nativesdk/cross-canadian recipes | ||
44 | continue | ||
45 | fi | ||
46 | if [[ "$pkg" =~ ^meta- || "$pkg" =~ ^packagegroup- || "$pkg" =~ -image ]]; then | ||
47 | # Skip meta, task and image recipes | ||
48 | continue | ||
49 | fi | ||
50 | if [[ "$pkg" =~ ^glibc- || "$pkg" =~ ^libiconv$ || | ||
51 | "$pkg" =~ -toolchain$ || "$pkg" =~ ^package-index$ || | ||
52 | "$pkg" =~ ^linux- || "$pkg" =~ ^adt-installer$ || | ||
53 | "$pkg" =~ ^eds-tools$ || "$pkg" =~ ^external-python-tarball$ || | ||
54 | "$pkg" =~ ^qt4-embedded$ || "$pkg" =~ ^qt-mobility ]]; then | ||
55 | # Skip glibc, libiconv, -toolchain, and other recipes known | ||
56 | # to cause build conflicts or trigger false positives. | ||
57 | continue | ||
58 | fi | ||
59 | |||
60 | echo "Building package $pkg..." | ||
61 | bitbake $pkg > /dev/null | ||
62 | if [ $? -ne 0 ]; then | ||
63 | echo "There was an error building package $pkg" >> "$REPORT_MISSING_DETAIL" | ||
64 | echo "$pkg" >> $REPORT_BUILD_ERRORS | ||
65 | |||
66 | # Do not skip the remaining tests, as sometimes the | ||
67 | # exit status is 1 due to QA errors, and we can still | ||
68 | # perform the -doc checks. | ||
69 | fi | ||
70 | |||
71 | echo "$pkg built successfully, checking for a documentation package..." | ||
72 | WORKDIR=`bitbake -e $pkg | grep ^WORKDIR | awk -F '=' '{ print \$2 }' | awk -F '"' '{ print \$2 }'` | ||
73 | FIND_DOC_PKG=`find $WORKDIR/packages-split/*-doc -maxdepth 0 -type d` | ||
74 | if [ -z "$FIND_DOC_PKG" ]; then | ||
75 | # No -doc package was generated: | ||
76 | echo "No -doc package: $pkg" >> "$REPORT_MISSING_DETAIL" | ||
77 | echo "$pkg" >> $REPORT_MISSING_SIMPLE | ||
78 | continue | ||
79 | fi | ||
80 | |||
81 | FIND_DOC_FILES=`find $FIND_DOC_PKG -type f` | ||
82 | if [ -z "$FIND_DOC_FILES" ]; then | ||
83 | # No files shipped with the -doc package: | ||
84 | echo "No files shipped with the -doc package: $pkg" >> "$REPORT_MISSING_DETAIL" | ||
85 | echo "$pkg" >> $REPORT_MISSING_SIMPLE | ||
86 | continue | ||
87 | fi | ||
88 | |||
89 | echo "Documentation shipped with $pkg:" >> "$REPORT_DOC_DETAIL" | ||
90 | echo "$FIND_DOC_FILES" >> "$REPORT_DOC_DETAIL" | ||
91 | echo "" >> "$REPORT_DOC_DETAIL" | ||
92 | |||
93 | echo "$pkg" >> "$REPORT_DOC_SIMPLE" | ||
94 | done | ||
diff --git a/scripts/contrib/graph-tool b/scripts/contrib/graph-tool new file mode 100755 index 0000000000..6dc7d337f8 --- /dev/null +++ b/scripts/contrib/graph-tool | |||
@@ -0,0 +1,92 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # Simple graph query utility | ||
4 | # useful for getting answers from .dot files produced by bitbake -g | ||
5 | # | ||
6 | # Written by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
7 | # | ||
8 | # Copyright 2013 Intel Corporation | ||
9 | # | ||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License version 2 as | ||
12 | # published by the Free Software Foundation. | ||
13 | # | ||
14 | # This program is distributed in the hope that it will be useful, | ||
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | # GNU General Public License for more details. | ||
18 | # | ||
19 | # You should have received a copy of the GNU General Public License along | ||
20 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
22 | # | ||
23 | |||
24 | import sys | ||
25 | |||
26 | def get_path_networkx(dotfile, fromnode, tonode): | ||
27 | try: | ||
28 | import networkx | ||
29 | except ImportError: | ||
30 | print('ERROR: Please install the networkx python module') | ||
31 | sys.exit(1) | ||
32 | |||
33 | graph = networkx.DiGraph(networkx.read_dot(dotfile)) | ||
34 | |||
35 | def node_missing(node): | ||
36 | import difflib | ||
37 | close_matches = difflib.get_close_matches(node, graph.nodes(), cutoff=0.7) | ||
38 | if close_matches: | ||
39 | print('ERROR: no node "%s" in graph. Close matches:\n %s' % (node, '\n '.join(close_matches))) | ||
40 | sys.exit(1) | ||
41 | |||
42 | if not fromnode in graph: | ||
43 | node_missing(fromnode) | ||
44 | if not tonode in graph: | ||
45 | node_missing(tonode) | ||
46 | return networkx.all_simple_paths(graph, source=fromnode, target=tonode) | ||
47 | |||
48 | |||
49 | def find_paths(args, usage): | ||
50 | if len(args) < 3: | ||
51 | usage() | ||
52 | sys.exit(1) | ||
53 | |||
54 | fromnode = args[1] | ||
55 | tonode = args[2] | ||
56 | paths = list(get_path_networkx(args[0], fromnode, tonode)) | ||
57 | if paths: | ||
58 | for path in paths: | ||
59 | print ' -> '.join(path) | ||
60 | else: | ||
61 | print("ERROR: no path from %s to %s in graph" % (fromnode, tonode)) | ||
62 | sys.exit(1) | ||
63 | |||
64 | def main(): | ||
65 | import optparse | ||
66 | parser = optparse.OptionParser( | ||
67 | usage = '''%prog [options] <command> <arguments> | ||
68 | |||
69 | Available commands: | ||
70 | find-paths <dotfile> <from> <to> | ||
71 | Find all of the paths between two nodes in a dot graph''') | ||
72 | |||
73 | #parser.add_option("-d", "--debug", | ||
74 | # help = "Report all SRCREV values, not just ones where AUTOREV has been used", | ||
75 | # action="store_true", dest="debug", default=False) | ||
76 | |||
77 | options, args = parser.parse_args(sys.argv) | ||
78 | args = args[1:] | ||
79 | |||
80 | if len(args) < 1: | ||
81 | parser.print_help() | ||
82 | sys.exit(1) | ||
83 | |||
84 | if args[0] == "find-paths": | ||
85 | find_paths(args[1:], parser.print_help) | ||
86 | else: | ||
87 | parser.print_help() | ||
88 | sys.exit(1) | ||
89 | |||
90 | |||
91 | if __name__ == "__main__": | ||
92 | main() | ||
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py new file mode 100755 index 0000000000..598b5c3fc6 --- /dev/null +++ b/scripts/contrib/list-packageconfig-flags.py | |||
@@ -0,0 +1,181 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # This program is free software; you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation; either version 2 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | # | ||
8 | # This program is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with this program; if not, write to the Free Software Foundation. | ||
15 | # | ||
16 | # Copyright (C) 2013 Wind River Systems, Inc. | ||
17 | # Copyright (C) 2014 Intel Corporation | ||
18 | # | ||
19 | # - list available recipes which have PACKAGECONFIG flags | ||
20 | # - list available PACKAGECONFIG flags and all affected recipes | ||
21 | # - list all recipes and PACKAGECONFIG information | ||
22 | |||
23 | import sys | ||
24 | import optparse | ||
25 | import os | ||
26 | |||
27 | |||
28 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
29 | lib_path = os.path.abspath(scripts_path + '/../lib') | ||
30 | sys.path = sys.path + [lib_path] | ||
31 | |||
32 | import scriptpath | ||
33 | |||
34 | # For importing the following modules | ||
35 | bitbakepath = scriptpath.add_bitbake_lib_path() | ||
36 | if not bitbakepath: | ||
37 | sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n") | ||
38 | sys.exit(1) | ||
39 | |||
40 | import bb.cache | ||
41 | import bb.cooker | ||
42 | import bb.providers | ||
43 | import bb.tinfoil | ||
44 | |||
45 | def get_fnlist(bbhandler, pkg_pn, preferred): | ||
46 | ''' Get all recipe file names ''' | ||
47 | if preferred: | ||
48 | (latest_versions, preferred_versions) = bb.providers.findProviders(bbhandler.config_data, bbhandler.cooker.recipecache, pkg_pn) | ||
49 | |||
50 | fn_list = [] | ||
51 | for pn in sorted(pkg_pn): | ||
52 | if preferred: | ||
53 | fn_list.append(preferred_versions[pn][1]) | ||
54 | else: | ||
55 | fn_list.extend(pkg_pn[pn]) | ||
56 | |||
57 | return fn_list | ||
58 | |||
59 | def get_recipesdata(bbhandler, preferred): | ||
60 | ''' Get data of all available recipes which have PACKAGECONFIG flags ''' | ||
61 | pkg_pn = bbhandler.cooker.recipecache.pkg_pn | ||
62 | |||
63 | data_dict = {} | ||
64 | for fn in get_fnlist(bbhandler, pkg_pn, preferred): | ||
65 | data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data) | ||
66 | flags = data.getVarFlags("PACKAGECONFIG") | ||
67 | flags.pop('doc', None) | ||
68 | flags.pop('defaultval', None) | ||
69 | if flags: | ||
70 | data_dict[fn] = data | ||
71 | |||
72 | return data_dict | ||
73 | |||
74 | def collect_pkgs(data_dict): | ||
75 | ''' Collect available pkgs in which have PACKAGECONFIG flags ''' | ||
76 | # pkg_dict = {'pkg1': ['flag1', 'flag2',...]} | ||
77 | pkg_dict = {} | ||
78 | for fn in data_dict: | ||
79 | pkgconfigflags = data_dict[fn].getVarFlags("PACKAGECONFIG") | ||
80 | pkgconfigflags.pop('doc', None) | ||
81 | pkgconfigflags.pop('defaultval', None) | ||
82 | pkgname = data_dict[fn].getVar("P", True) | ||
83 | pkg_dict[pkgname] = sorted(pkgconfigflags.keys()) | ||
84 | |||
85 | return pkg_dict | ||
86 | |||
87 | def collect_flags(pkg_dict): | ||
88 | ''' Collect available PACKAGECONFIG flags and all affected pkgs ''' | ||
89 | # flag_dict = {'flag': ['pkg1', 'pkg2',...]} | ||
90 | flag_dict = {} | ||
91 | for pkgname, flaglist in pkg_dict.iteritems(): | ||
92 | for flag in flaglist: | ||
93 | if flag in flag_dict: | ||
94 | flag_dict[flag].append(pkgname) | ||
95 | else: | ||
96 | flag_dict[flag] = [pkgname] | ||
97 | |||
98 | return flag_dict | ||
99 | |||
100 | def display_pkgs(pkg_dict): | ||
101 | ''' Display available pkgs which have PACKAGECONFIG flags ''' | ||
102 | pkgname_len = len("RECIPE NAME") + 1 | ||
103 | for pkgname in pkg_dict: | ||
104 | if pkgname_len < len(pkgname): | ||
105 | pkgname_len = len(pkgname) | ||
106 | pkgname_len += 1 | ||
107 | |||
108 | header = '%-*s%s' % (pkgname_len, str("RECIPE NAME"), str("PACKAGECONFIG FLAGS")) | ||
109 | print header | ||
110 | print str("").ljust(len(header), '=') | ||
111 | for pkgname in sorted(pkg_dict): | ||
112 | print('%-*s%s' % (pkgname_len, pkgname, ' '.join(pkg_dict[pkgname]))) | ||
113 | |||
114 | |||
115 | def display_flags(flag_dict): | ||
116 | ''' Display available PACKAGECONFIG flags and all affected pkgs ''' | ||
117 | flag_len = len("PACKAGECONFIG FLAG") + 5 | ||
118 | |||
119 | header = '%-*s%s' % (flag_len, str("PACKAGECONFIG FLAG"), str("RECIPE NAMES")) | ||
120 | print header | ||
121 | print str("").ljust(len(header), '=') | ||
122 | |||
123 | for flag in sorted(flag_dict): | ||
124 | print('%-*s%s' % (flag_len, flag, ' '.join(sorted(flag_dict[flag])))) | ||
125 | |||
126 | def display_all(data_dict): | ||
127 | ''' Display all pkgs and PACKAGECONFIG information ''' | ||
128 | print str("").ljust(50, '=') | ||
129 | for fn in data_dict: | ||
130 | print('%s' % data_dict[fn].getVar("P", True)) | ||
131 | print fn | ||
132 | packageconfig = data_dict[fn].getVar("PACKAGECONFIG", True) or '' | ||
133 | if packageconfig.strip() == '': | ||
134 | packageconfig = 'None' | ||
135 | print('PACKAGECONFIG %s' % packageconfig) | ||
136 | |||
137 | for flag,flag_val in data_dict[fn].getVarFlags("PACKAGECONFIG").iteritems(): | ||
138 | if flag in ["defaultval", "doc"]: | ||
139 | continue | ||
140 | print('PACKAGECONFIG[%s] %s' % (flag, flag_val)) | ||
141 | print '' | ||
142 | |||
143 | def main(): | ||
144 | pkg_dict = {} | ||
145 | flag_dict = {} | ||
146 | |||
147 | # Collect and validate input | ||
148 | parser = optparse.OptionParser( | ||
149 | description = "Lists recipes and PACKAGECONFIG flags. Without -a or -f, recipes and their available PACKAGECONFIG flags are listed.", | ||
150 | usage = """ | ||
151 | %prog [options]""") | ||
152 | |||
153 | parser.add_option("-f", "--flags", | ||
154 | help = "list available PACKAGECONFIG flags and affected recipes", | ||
155 | action="store_const", dest="listtype", const="flags", default="recipes") | ||
156 | parser.add_option("-a", "--all", | ||
157 | help = "list all recipes and PACKAGECONFIG information", | ||
158 | action="store_const", dest="listtype", const="all") | ||
159 | parser.add_option("-p", "--preferred-only", | ||
160 | help = "where multiple recipe versions are available, list only the preferred version", | ||
161 | action="store_true", dest="preferred", default=False) | ||
162 | |||
163 | options, args = parser.parse_args(sys.argv) | ||
164 | |||
165 | bbhandler = bb.tinfoil.Tinfoil() | ||
166 | bbhandler.prepare() | ||
167 | print("Gathering recipe data...") | ||
168 | data_dict = get_recipesdata(bbhandler, options.preferred) | ||
169 | |||
170 | if options.listtype == 'flags': | ||
171 | pkg_dict = collect_pkgs(data_dict) | ||
172 | flag_dict = collect_flags(pkg_dict) | ||
173 | display_flags(flag_dict) | ||
174 | elif options.listtype == 'recipes': | ||
175 | pkg_dict = collect_pkgs(data_dict) | ||
176 | display_pkgs(pkg_dict) | ||
177 | elif options.listtype == 'all': | ||
178 | display_all(data_dict) | ||
179 | |||
180 | if __name__ == "__main__": | ||
181 | main() | ||
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh new file mode 100755 index 0000000000..b96b7d4f7d --- /dev/null +++ b/scripts/contrib/mkefidisk.sh | |||
@@ -0,0 +1,396 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Copyright (c) 2012, Intel Corporation. | ||
4 | # All rights reserved. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
14 | # the GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | # | ||
20 | |||
21 | LANG=C | ||
22 | |||
23 | # Set to 1 to enable additional output | ||
24 | DEBUG=0 | ||
25 | OUT="/dev/null" | ||
26 | |||
27 | # | ||
28 | # Defaults | ||
29 | # | ||
30 | # 20 Mb for the boot partition | ||
31 | BOOT_SIZE=20 | ||
32 | # 5% for swap | ||
33 | SWAP_RATIO=5 | ||
34 | |||
35 | # Cleanup after die() | ||
36 | cleanup() { | ||
37 | debug "Syncing and unmounting devices" | ||
38 | # Unmount anything we mounted | ||
39 | unmount $ROOTFS_MNT || error "Failed to unmount $ROOTFS_MNT" | ||
40 | unmount $BOOTFS_MNT || error "Failed to unmount $BOOTFS_MNT" | ||
41 | unmount $HDDIMG_ROOTFS_MNT || error "Failed to unmount $HDDIMG_ROOTFS_MNT" | ||
42 | unmount $HDDIMG_MNT || error "Failed to unmount $HDDIMG_MNT" | ||
43 | |||
44 | # Remove the TMPDIR | ||
45 | debug "Removing temporary files" | ||
46 | if [ -d "$TMPDIR" ]; then | ||
47 | rm -rf $TMPDIR || error "Failed to remove $TMPDIR" | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | trap 'die "Signal Received, Aborting..."' HUP INT TERM | ||
52 | |||
53 | # Logging routines | ||
54 | WARNINGS=0 | ||
55 | ERRORS=0 | ||
56 | CLEAR="$(tput sgr0)" | ||
57 | INFO="$(tput bold)" | ||
58 | RED="$(tput setaf 1)$(tput bold)" | ||
59 | GREEN="$(tput setaf 2)$(tput bold)" | ||
60 | YELLOW="$(tput setaf 3)$(tput bold)" | ||
61 | info() { | ||
62 | echo "${INFO}$1${CLEAR}" | ||
63 | } | ||
64 | error() { | ||
65 | ERRORS=$((ERRORS+1)) | ||
66 | echo "${RED}$1${CLEAR}" | ||
67 | } | ||
68 | warn() { | ||
69 | WARNINGS=$((WARNINGS+1)) | ||
70 | echo "${YELLOW}$1${CLEAR}" | ||
71 | } | ||
72 | success() { | ||
73 | echo "${GREEN}$1${CLEAR}" | ||
74 | } | ||
75 | die() { | ||
76 | error "$1" | ||
77 | cleanup | ||
78 | exit 1 | ||
79 | } | ||
80 | debug() { | ||
81 | if [ $DEBUG -eq 1 ]; then | ||
82 | echo "$1" | ||
83 | fi | ||
84 | } | ||
85 | |||
86 | usage() { | ||
87 | echo "Usage: $(basename $0) [-v] DEVICE HDDIMG TARGET_DEVICE" | ||
88 | echo " -v: Verbose debug" | ||
89 | echo " DEVICE: The device to write the image to, e.g. /dev/sdh" | ||
90 | echo " HDDIMG: The hddimg file to generate the efi disk from" | ||
91 | echo " TARGET_DEVICE: The device the target will boot from, e.g. /dev/mmcblk0" | ||
92 | } | ||
93 | |||
94 | image_details() { | ||
95 | IMG=$1 | ||
96 | info "Image details" | ||
97 | echo " image: $(stat --printf '%N\n' $IMG)" | ||
98 | echo " size: $(stat -L --printf '%s bytes\n' $IMG)" | ||
99 | echo " modified: $(stat -L --printf '%y\n' $IMG)" | ||
100 | echo " type: $(file -L -b $IMG)" | ||
101 | echo "" | ||
102 | } | ||
103 | |||
104 | device_details() { | ||
105 | DEV=$1 | ||
106 | BLOCK_SIZE=512 | ||
107 | |||
108 | info "Device details" | ||
109 | echo " device: $DEVICE" | ||
110 | if [ -f "/sys/class/block/$DEV/device/vendor" ]; then | ||
111 | echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)" | ||
112 | else | ||
113 | echo " vendor: UNKOWN" | ||
114 | fi | ||
115 | if [ -f "/sys/class/block/$DEV/device/model" ]; then | ||
116 | echo " model: $(cat /sys/class/block/$DEV/device/model)" | ||
117 | else | ||
118 | echo " model: UNKNOWN" | ||
119 | fi | ||
120 | if [ -f "/sys/class/block/$DEV/size" ]; then | ||
121 | echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes" | ||
122 | else | ||
123 | echo " size: UNKNOWN" | ||
124 | fi | ||
125 | echo "" | ||
126 | } | ||
127 | |||
128 | unmount_device() { | ||
129 | grep -q $DEVICE /proc/mounts | ||
130 | if [ $? -eq 0 ]; then | ||
131 | warn "$DEVICE listed in /proc/mounts, attempting to unmount" | ||
132 | umount $DEVICE* 2>/dev/null | ||
133 | return $? | ||
134 | fi | ||
135 | return 0 | ||
136 | } | ||
137 | |||
138 | unmount() { | ||
139 | grep -q $1 /proc/mounts | ||
140 | if [ $? -eq 0 ]; then | ||
141 | debug "Unmounting $1" | ||
142 | umount $1 | ||
143 | return $? | ||
144 | fi | ||
145 | return 0 | ||
146 | } | ||
147 | |||
148 | # | ||
149 | # Parse and validate arguments | ||
150 | # | ||
151 | if [ $# -lt 3 ] || [ $# -gt 4 ]; then | ||
152 | usage | ||
153 | exit 1 | ||
154 | fi | ||
155 | |||
156 | if [ "$1" = "-v" ]; then | ||
157 | DEBUG=1 | ||
158 | OUT="1" | ||
159 | shift | ||
160 | fi | ||
161 | |||
162 | DEVICE=$1 | ||
163 | HDDIMG=$2 | ||
164 | TARGET_DEVICE=$3 | ||
165 | |||
166 | LINK=$(readlink $DEVICE) | ||
167 | if [ $? -eq 0 ]; then | ||
168 | DEVICE="$LINK" | ||
169 | fi | ||
170 | |||
171 | if [ ! -w "$DEVICE" ]; then | ||
172 | usage | ||
173 | die "Device $DEVICE does not exist or is not writable" | ||
174 | fi | ||
175 | |||
176 | if [ ! -e "$HDDIMG" ]; then | ||
177 | usage | ||
178 | die "HDDIMG $HDDIMG does not exist" | ||
179 | fi | ||
180 | |||
181 | # | ||
182 | # Ensure the hddimg is not mounted | ||
183 | # | ||
184 | unmount "$HDDIMG" || die "Failed to unmount $HDDIMG" | ||
185 | |||
186 | # | ||
187 | # Check if any $DEVICE partitions are mounted | ||
188 | # | ||
189 | unmount_device || die "Failed to unmount $DEVICE" | ||
190 | |||
191 | # | ||
192 | # Confirm device with user | ||
193 | # | ||
194 | image_details $HDDIMG | ||
195 | device_details $(basename $DEVICE) | ||
196 | echo -n "${INFO}Prepare EFI image on $DEVICE [y/N]?${CLEAR} " | ||
197 | read RESPONSE | ||
198 | if [ "$RESPONSE" != "y" ]; then | ||
199 | echo "Image creation aborted" | ||
200 | exit 0 | ||
201 | fi | ||
202 | |||
203 | |||
204 | # | ||
205 | # Prepare the temporary working space | ||
206 | # | ||
207 | TMPDIR=$(mktemp -d mkefidisk-XXX) || die "Failed to create temporary mounting directory." | ||
208 | HDDIMG_MNT=$TMPDIR/hddimg | ||
209 | HDDIMG_ROOTFS_MNT=$TMPDIR/hddimg_rootfs | ||
210 | ROOTFS_MNT=$TMPDIR/rootfs | ||
211 | BOOTFS_MNT=$TMPDIR/bootfs | ||
212 | mkdir $HDDIMG_MNT || die "Failed to create $HDDIMG_MNT" | ||
213 | mkdir $HDDIMG_ROOTFS_MNT || die "Failed to create $HDDIMG_ROOTFS_MNT" | ||
214 | mkdir $ROOTFS_MNT || die "Failed to create $ROOTFS_MNT" | ||
215 | mkdir $BOOTFS_MNT || die "Failed to create $BOOTFS_MNT" | ||
216 | |||
217 | |||
218 | # | ||
219 | # Partition $DEVICE | ||
220 | # | ||
221 | DEVICE_SIZE=$(parted $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") | ||
222 | # If the device size is not reported there may not be a valid label | ||
223 | if [ "$DEVICE_SIZE" = "" ] ; then | ||
224 | parted $DEVICE mklabel msdos || die "Failed to create MSDOS partition table" | ||
225 | DEVICE_SIZE=$(parted $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") | ||
226 | fi | ||
227 | SWAP_SIZE=$((DEVICE_SIZE*SWAP_RATIO/100)) | ||
228 | ROOTFS_SIZE=$((DEVICE_SIZE-BOOT_SIZE-SWAP_SIZE)) | ||
229 | ROOTFS_START=$((BOOT_SIZE)) | ||
230 | ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE)) | ||
231 | SWAP_START=$((ROOTFS_END)) | ||
232 | |||
233 | # MMC devices use a partition prefix character 'p' | ||
234 | PART_PREFIX="" | ||
235 | if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ] || [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then | ||
236 | PART_PREFIX="p" | ||
237 | fi | ||
238 | BOOTFS=$DEVICE${PART_PREFIX}1 | ||
239 | ROOTFS=$DEVICE${PART_PREFIX}2 | ||
240 | SWAP=$DEVICE${PART_PREFIX}3 | ||
241 | |||
242 | TARGET_PART_PREFIX="" | ||
243 | if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ]; then | ||
244 | TARGET_PART_PREFIX="p" | ||
245 | fi | ||
246 | TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2 | ||
247 | TARGET_SWAP=$TARGET_DEVICE${TARGET_PART_PREFIX}3 | ||
248 | |||
249 | echo "" | ||
250 | info "Boot partition size: $BOOT_SIZE MB ($BOOTFS)" | ||
251 | info "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)" | ||
252 | info "Swap partition size: $SWAP_SIZE MB ($SWAP)" | ||
253 | echo "" | ||
254 | |||
255 | # Use MSDOS by default as GPT cannot be reliably distributed in disk image form | ||
256 | # as it requires the backup table to be on the last block of the device, which | ||
257 | # of course varies from device to device. | ||
258 | |||
259 | info "Partitioning installation media ($DEVICE)" | ||
260 | |||
261 | debug "Deleting partition table on $DEVICE" | ||
262 | dd if=/dev/zero of=$DEVICE bs=512 count=2 >$OUT 2>&1 || die "Failed to zero beginning of $DEVICE" | ||
263 | |||
264 | debug "Creating new partition table (MSDOS) on $DEVICE" | ||
265 | parted $DEVICE mklabel msdos >$OUT 2>&1 || die "Failed to create MSDOS partition table" | ||
266 | |||
267 | debug "Creating boot partition on $BOOTFS" | ||
268 | parted $DEVICE mkpart primary 0% $BOOT_SIZE >$OUT 2>&1 || die "Failed to create BOOT partition" | ||
269 | |||
270 | debug "Enabling boot flag on $BOOTFS" | ||
271 | parted $DEVICE set 1 boot on >$OUT 2>&1 || die "Failed to enable boot flag" | ||
272 | |||
273 | debug "Creating ROOTFS partition on $ROOTFS" | ||
274 | parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END >$OUT 2>&1 || die "Failed to create ROOTFS partition" | ||
275 | |||
276 | debug "Creating swap partition on $SWAP" | ||
277 | parted $DEVICE mkpart primary $SWAP_START 100% >$OUT 2>&1 || die "Failed to create SWAP partition" | ||
278 | |||
279 | if [ $DEBUG -eq 1 ]; then | ||
280 | parted $DEVICE print | ||
281 | fi | ||
282 | |||
283 | |||
284 | # | ||
285 | # Check if any $DEVICE partitions are mounted after partitioning | ||
286 | # | ||
287 | unmount_device || die "Failed to unmount $DEVICE partitions" | ||
288 | |||
289 | |||
290 | # | ||
291 | # Format $DEVICE partitions | ||
292 | # | ||
293 | info "Formatting partitions" | ||
294 | debug "Formatting $BOOTFS as vfat" | ||
295 | if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then | ||
296 | mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS" | ||
297 | else | ||
298 | mkfs.vfat $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS" | ||
299 | fi | ||
300 | |||
301 | debug "Formatting $ROOTFS as ext3" | ||
302 | mkfs.ext3 -F $ROOTFS -L "ROOT" >$OUT 2>&1 || die "Failed to format $ROOTFS" | ||
303 | |||
304 | debug "Formatting swap partition ($SWAP)" | ||
305 | mkswap $SWAP >$OUT 2>&1 || die "Failed to prepare swap" | ||
306 | |||
307 | |||
308 | # | ||
309 | # Installing to $DEVICE | ||
310 | # | ||
311 | debug "Mounting images and device in preparation for installation" | ||
312 | mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG" | ||
313 | mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img" | ||
314 | mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT" | ||
315 | mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT" | ||
316 | |||
317 | info "Preparing boot partition" | ||
318 | EFIDIR="$BOOTFS_MNT/EFI/BOOT" | ||
319 | cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz" | ||
320 | # Copy the efi loader and configs (booti*.efi and grub.cfg if it exists) | ||
321 | cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir" | ||
322 | # Silently ignore a missing gummiboot loader dir (we might just be a GRUB image) | ||
323 | cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>&1 | ||
324 | |||
325 | # Update the boot loaders configurations for an installed image | ||
326 | # Remove any existing root= kernel parameters and: | ||
327 | # o Add a root= parameter with the target rootfs | ||
328 | # o Specify ro so fsck can be run during boot | ||
329 | # o Specify rootwait in case the target media is an asyncronous block device | ||
330 | # such as MMC or USB disks | ||
331 | # o Specify "quiet" to minimize boot time when using slow serial consoles | ||
332 | |||
333 | # Look for a GRUB installation | ||
334 | GRUB_CFG="$EFIDIR/grub.cfg" | ||
335 | if [ -e "$GRUB_CFG" ]; then | ||
336 | info "Configuring GRUB" | ||
337 | # Delete the install entry | ||
338 | sed -i "/menuentry 'install'/,/^}/d" $GRUB_CFG | ||
339 | # Delete the initrd lines | ||
340 | sed -i "/initrd /d" $GRUB_CFG | ||
341 | # Delete any LABEL= strings | ||
342 | sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG | ||
343 | |||
344 | sed -i "s@ root=[^ ]*@ @" $GRUB_CFG | ||
345 | sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUB_CFG | ||
346 | fi | ||
347 | |||
348 | # Look for a gummiboot installation | ||
349 | GUMMI_ENTRIES="$BOOTFS_MNT/loader/entries" | ||
350 | GUMMI_CFG="$GUMMI_ENTRIES/boot.conf" | ||
351 | if [ -d "$GUMMI_ENTRIES" ]; then | ||
352 | info "Configuring Gummiboot" | ||
353 | # remove the install target if it exists | ||
354 | rm $GUMMI_ENTRIES/install.conf >$OUT 2>&1 | ||
355 | |||
356 | if [ ! -e "$GUMMI_CFG" ]; then | ||
357 | echo "ERROR: $GUMMI_CFG not found" | ||
358 | fi | ||
359 | |||
360 | sed -i "/initrd /d" $GUMMI_CFG | ||
361 | sed -i "s@ root=[^ ]*@ @" $GUMMI_CFG | ||
362 | sed -i "s@options *LABEL=boot @options LABEL=Boot root=$TARGET_ROOTFS ro rootwait quiet @" $GUMMI_CFG | ||
363 | fi | ||
364 | |||
365 | # Ensure we have at least one EFI bootloader configured | ||
366 | if [ ! -e $GRUB_CFG ] && [ ! -e $GUMMI_CFG ]; then | ||
367 | die "No EFI bootloader configuration found" | ||
368 | fi | ||
369 | |||
370 | |||
371 | info "Copying ROOTFS files (this may take a while)" | ||
372 | cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT >$OUT 2>&1 || die "Root FS copy failed" | ||
373 | |||
374 | echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab | ||
375 | |||
376 | # We dont want udev to mount our root device while we're booting... | ||
377 | if [ -d $ROOTFS_MNT/etc/udev/ ] ; then | ||
378 | echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist | ||
379 | fi | ||
380 | |||
381 | |||
382 | # Call cleanup to unmount devices and images and remove the TMPDIR | ||
383 | cleanup | ||
384 | |||
385 | echo "" | ||
386 | if [ $WARNINGS -ne 0 ] && [ $ERRORS -eq 0 ]; then | ||
387 | echo "${YELLOW}Installation completed with warnings${CLEAR}" | ||
388 | echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" | ||
389 | elif [ $ERRORS -ne 0 ]; then | ||
390 | echo "${RED}Installation encountered errors${CLEAR}" | ||
391 | echo "${RED}Errors: $ERRORS${CLEAR}" | ||
392 | echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" | ||
393 | else | ||
394 | success "Installation completed successfully" | ||
395 | fi | ||
396 | echo "" | ||
diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py new file mode 100755 index 0000000000..68c42b0a54 --- /dev/null +++ b/scripts/contrib/python/generate-manifest-2.7.py | |||
@@ -0,0 +1,391 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # generate Python Manifest for the OpenEmbedded build system | ||
4 | # (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
5 | # (C) 2007 Jeremy Laine | ||
6 | # licensed under MIT, see COPYING.MIT | ||
7 | # | ||
8 | # June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com> | ||
9 | # * Updated to no longer generate special -dbg package, instead use the | ||
10 | # single system -dbg | ||
11 | # * Update version with ".1" to indicate this change | ||
12 | |||
13 | import os | ||
14 | import sys | ||
15 | import time | ||
16 | |||
17 | VERSION = "2.7.2" | ||
18 | |||
19 | __author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>" | ||
20 | __version__ = "20110222.2" | ||
21 | |||
22 | class MakefileMaker: | ||
23 | |||
24 | def __init__( self, outfile ): | ||
25 | """initialize""" | ||
26 | self.packages = {} | ||
27 | self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] | ||
28 | self.output = outfile | ||
29 | self.out( """ | ||
30 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. | ||
31 | # Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
32 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy | ||
33 | """ % ( sys.argv[0], __version__ ) ) | ||
34 | |||
35 | # | ||
36 | # helper functions | ||
37 | # | ||
38 | |||
39 | def out( self, data ): | ||
40 | """print a line to the output file""" | ||
41 | self.output.write( "%s\n" % data ) | ||
42 | |||
43 | def setPrefix( self, targetPrefix ): | ||
44 | """set a file prefix for addPackage files""" | ||
45 | self.targetPrefix = targetPrefix | ||
46 | |||
47 | def doProlog( self ): | ||
48 | self.out( """ """ ) | ||
49 | self.out( "" ) | ||
50 | |||
51 | def addPackage( self, name, description, dependencies, filenames ): | ||
52 | """add a package to the Makefile""" | ||
53 | if type( filenames ) == type( "" ): | ||
54 | filenames = filenames.split() | ||
55 | fullFilenames = [] | ||
56 | for filename in filenames: | ||
57 | if filename[0] != "$": | ||
58 | fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) ) | ||
59 | else: | ||
60 | fullFilenames.append( filename ) | ||
61 | self.packages[name] = description, dependencies, fullFilenames | ||
62 | |||
63 | def doBody( self ): | ||
64 | """generate body of Makefile""" | ||
65 | |||
66 | global VERSION | ||
67 | |||
68 | # | ||
69 | # generate provides line | ||
70 | # | ||
71 | |||
72 | provideLine = 'PROVIDES+="' | ||
73 | for name in sorted(self.packages): | ||
74 | provideLine += "%s " % name | ||
75 | provideLine += '"' | ||
76 | |||
77 | self.out( provideLine ) | ||
78 | self.out( "" ) | ||
79 | |||
80 | # | ||
81 | # generate package line | ||
82 | # | ||
83 | |||
84 | packageLine = 'PACKAGES="${PN}-dbg ' | ||
85 | for name in sorted(self.packages): | ||
86 | if name.startswith("${PN}-distutils"): | ||
87 | if name == "${PN}-distutils": | ||
88 | packageLine += "%s-staticdev %s " % (name, name) | ||
89 | elif name != '${PN}-dbg': | ||
90 | packageLine += "%s " % name | ||
91 | packageLine += '${PN}-modules"' | ||
92 | |||
93 | self.out( packageLine ) | ||
94 | self.out( "" ) | ||
95 | |||
96 | # | ||
97 | # generate package variables | ||
98 | # | ||
99 | |||
100 | for name, data in sorted(self.packages.iteritems()): | ||
101 | desc, deps, files = data | ||
102 | |||
103 | # | ||
104 | # write out the description, revision and dependencies | ||
105 | # | ||
106 | self.out( 'SUMMARY_%s="%s"' % ( name, desc ) ) | ||
107 | self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) ) | ||
108 | |||
109 | line = 'FILES_%s="' % name | ||
110 | |||
111 | # | ||
112 | # check which directories to make in the temporary directory | ||
113 | # | ||
114 | |||
115 | dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead. | ||
116 | for target in files: | ||
117 | dirset[os.path.dirname( target )] = True | ||
118 | |||
119 | # | ||
120 | # generate which files to copy for the target (-dfR because whole directories are also allowed) | ||
121 | # | ||
122 | |||
123 | for target in files: | ||
124 | line += "%s " % target | ||
125 | |||
126 | line += '"' | ||
127 | self.out( line ) | ||
128 | self.out( "" ) | ||
129 | |||
130 | self.out( 'SUMMARY_${PN}-modules="All Python modules"' ) | ||
131 | line = 'RDEPENDS_${PN}-modules="' | ||
132 | |||
133 | for name, data in sorted(self.packages.iteritems()): | ||
134 | if name not in ['${PN}-dev', '${PN}-distutils-staticdev']: | ||
135 | line += "%s " % name | ||
136 | |||
137 | self.out( "%s \"" % line ) | ||
138 | self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' ) | ||
139 | |||
140 | def doEpilog( self ): | ||
141 | self.out( """""" ) | ||
142 | self.out( "" ) | ||
143 | |||
144 | def make( self ): | ||
145 | self.doProlog() | ||
146 | self.doBody() | ||
147 | self.doEpilog() | ||
148 | |||
149 | if __name__ == "__main__": | ||
150 | |||
151 | if len( sys.argv ) > 1: | ||
152 | try: | ||
153 | os.unlink(sys.argv[1]) | ||
154 | except Exception: | ||
155 | sys.exc_clear() | ||
156 | outfile = file( sys.argv[1], "w" ) | ||
157 | else: | ||
158 | outfile = sys.stdout | ||
159 | |||
160 | m = MakefileMaker( outfile ) | ||
161 | |||
162 | # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies! | ||
163 | # Parameters: revision, name, description, dependencies, filenames | ||
164 | # | ||
165 | |||
166 | m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re", | ||
167 | "__future__.* _abcoll.* abc.* copy.* copy_reg.* ConfigParser.* " + | ||
168 | "genericpath.* getopt.* linecache.* new.* " + | ||
169 | "os.* posixpath.* struct.* " + | ||
170 | "warnings.* site.* stat.* " + | ||
171 | "UserDict.* UserList.* UserString.* " + | ||
172 | "lib-dynload/binascii.so lib-dynload/_struct.so lib-dynload/time.so " + | ||
173 | "lib-dynload/xreadlines.so types.* platform.* ${bindir}/python* " + | ||
174 | "_weakrefset.* sysconfig.* config/Makefile " + | ||
175 | "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " + | ||
176 | "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ") | ||
177 | |||
178 | m.addPackage( "${PN}-dev", "Python development package", "${PN}-core", | ||
179 | "${includedir} " + | ||
180 | "${libdir}/lib*${SOLIBSDEV} " + | ||
181 | "${libdir}/*.la " + | ||
182 | "${libdir}/*.a " + | ||
183 | "${libdir}/*.o " + | ||
184 | "${libdir}/pkgconfig " + | ||
185 | "${base_libdir}/*.a " + | ||
186 | "${base_libdir}/*.o " + | ||
187 | "${datadir}/aclocal " + | ||
188 | "${datadir}/pkgconfig " ) | ||
189 | |||
190 | m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core", | ||
191 | "${bindir}/2to3 lib2to3" ) # package | ||
192 | |||
193 | m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter", | ||
194 | "${bindir}/idle idlelib" ) # package | ||
195 | |||
196 | m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re", | ||
197 | "${bindir}/pydoc pydoc.* pydoc_data" ) | ||
198 | |||
199 | m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime", | ||
200 | "${bindir}/smtpd.* smtpd.*" ) | ||
201 | |||
202 | m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core", | ||
203 | "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.so lib-dynload/audioop.so audiodev.* sunaudio.* sunau.* toaiff.*" ) | ||
204 | |||
205 | m.addPackage( "${PN}-bsddb", "Python bindings for the Berkeley Database", "${PN}-core", | ||
206 | "bsddb lib-dynload/_bsddb.so" ) # package | ||
207 | |||
208 | m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang", | ||
209 | "codecs.* encodings gettext.* locale.* lib-dynload/_locale.so lib-dynload/_codecs* lib-dynload/_multibytecodec.so lib-dynload/unicodedata.so stringprep.* xdrlib.*" ) | ||
210 | |||
211 | m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core", | ||
212 | "py_compile.* compileall.*" ) | ||
213 | |||
214 | m.addPackage( "${PN}-compiler", "Python compiler support", "${PN}-core", | ||
215 | "compiler" ) # package | ||
216 | |||
217 | m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-zlib", | ||
218 | "gzip.* zipfile.* tarfile.* lib-dynload/bz2.so" ) | ||
219 | |||
220 | m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core", | ||
221 | "hashlib.* md5.* sha.* lib-dynload/crypt.so lib-dynload/_hashlib.so lib-dynload/_sha256.so lib-dynload/_sha512.so" ) | ||
222 | |||
223 | m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold", | ||
224 | "lib-dynload/_csv.so csv.* optparse.* textwrap.*" ) | ||
225 | |||
226 | m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core", | ||
227 | "curses lib-dynload/_curses.so lib-dynload/_curses_panel.so" ) # directory + low level module | ||
228 | |||
229 | m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core", | ||
230 | "ctypes lib-dynload/_ctypes.so lib-dynload/_ctypes_test.so" ) # directory + low level module | ||
231 | |||
232 | m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs", | ||
233 | "_strptime.* calendar.* lib-dynload/datetime.so" ) | ||
234 | |||
235 | m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core", | ||
236 | "anydbm.* dumbdbm.* whichdb.* " ) | ||
237 | |||
238 | m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint", | ||
239 | "bdb.* pdb.*" ) | ||
240 | |||
241 | m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re", | ||
242 | "difflib.*" ) | ||
243 | |||
244 | m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils", | ||
245 | "config/lib*.a" ) # package | ||
246 | |||
247 | m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core", | ||
248 | "config distutils" ) # package | ||
249 | |||
250 | m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib", | ||
251 | "doctest.*" ) | ||
252 | |||
253 | # FIXME consider adding to some higher level package | ||
254 | m.addPackage( "${PN}-elementtree", "Python elementree", "${PN}-core", | ||
255 | "lib-dynload/_elementtree.so" ) | ||
256 | |||
257 | m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient", | ||
258 | "imaplib.* email" ) # package | ||
259 | |||
260 | m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core", | ||
261 | "lib-dynload/fcntl.so" ) | ||
262 | |||
263 | m.addPackage( "${PN}-hotshot", "Python hotshot performance profiler", "${PN}-core", | ||
264 | "hotshot lib-dynload/_hotshot.so" ) | ||
265 | |||
266 | m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core", | ||
267 | "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " ) | ||
268 | |||
269 | m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core", | ||
270 | "importlib" ) | ||
271 | |||
272 | m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core", | ||
273 | "lib-dynload/gdbm.so" ) | ||
274 | |||
275 | m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core", | ||
276 | "colorsys.* imghdr.* lib-dynload/imageop.so lib-dynload/rgbimg.so" ) | ||
277 | |||
278 | m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient", | ||
279 | "lib-dynload/_socket.so lib-dynload/_io.so lib-dynload/_ssl.so lib-dynload/select.so lib-dynload/termios.so lib-dynload/cStringIO.so " + | ||
280 | "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" ) | ||
281 | |||
282 | m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re ${PN}-codecs", | ||
283 | "json lib-dynload/_json.so" ) # package | ||
284 | |||
285 | m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core", | ||
286 | "lib-dynload/_bisect.so lib-dynload/_collections.so lib-dynload/_heapq.so lib-dynload/_weakref.so lib-dynload/_functools.so " + | ||
287 | "lib-dynload/array.so lib-dynload/itertools.so lib-dynload/operator.so lib-dynload/parser.so " + | ||
288 | "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " + | ||
289 | "tokenize.* traceback.* weakref.*" ) | ||
290 | |||
291 | m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold", | ||
292 | "logging" ) # package | ||
293 | |||
294 | m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime", | ||
295 | "mailbox.*" ) | ||
296 | |||
297 | m.addPackage( "${PN}-math", "Python math support", "${PN}-core ${PN}-crypt", | ||
298 | "lib-dynload/cmath.so lib-dynload/math.so lib-dynload/_random.so random.* sets.*" ) | ||
299 | |||
300 | m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io", | ||
301 | "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" ) | ||
302 | |||
303 | m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io", | ||
304 | "lib-dynload/mmap.so " ) | ||
305 | |||
306 | m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap", | ||
307 | "lib-dynload/_multiprocessing.so multiprocessing" ) # package | ||
308 | |||
309 | m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime", | ||
310 | "*Cookie*.* " + | ||
311 | "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.* uuid.* rfc822.* mimetools.*" ) | ||
312 | |||
313 | m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient", | ||
314 | "cgi.* *HTTPServer.* SocketServer.*" ) | ||
315 | |||
316 | m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re", | ||
317 | "decimal.* numbers.*" ) | ||
318 | |||
319 | m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re", | ||
320 | "pickle.* shelve.* lib-dynload/cPickle.so pickletools.*" ) | ||
321 | |||
322 | m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core", | ||
323 | "pkgutil.*") | ||
324 | |||
325 | m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io", | ||
326 | "pprint.*" ) | ||
327 | |||
328 | m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils", | ||
329 | "profile.* pstats.* cProfile.* lib-dynload/_lsprof.so" ) | ||
330 | |||
331 | m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core", | ||
332 | "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin | ||
333 | |||
334 | m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core", | ||
335 | "lib-dynload/readline.so rlcompleter.*" ) | ||
336 | |||
337 | m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core", | ||
338 | "lib-dynload/resource.so" ) | ||
339 | |||
340 | m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re", | ||
341 | "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" ) | ||
342 | |||
343 | m.addPackage( "${PN}-robotparser", "Python robots.txt parser", "${PN}-core ${PN}-netclient", | ||
344 | "robotparser.*") | ||
345 | |||
346 | m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle", | ||
347 | "subprocess.*" ) | ||
348 | |||
349 | m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib", | ||
350 | "lib-dynload/_sqlite3.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" ) | ||
351 | |||
352 | m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3", | ||
353 | "sqlite3/test" ) | ||
354 | |||
355 | m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re", | ||
356 | "lib-dynload/strop.so string.* stringold.*" ) | ||
357 | |||
358 | m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core", | ||
359 | "lib-dynload/syslog.so" ) | ||
360 | |||
361 | m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io", | ||
362 | "pty.* tty.*" ) | ||
363 | |||
364 | m.addPackage( "${PN}-tests", "Python tests", "${PN}-core", | ||
365 | "test" ) # package | ||
366 | |||
367 | m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang", | ||
368 | "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" ) | ||
369 | |||
370 | m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core", | ||
371 | "lib-dynload/_tkinter.so lib-tk" ) # package | ||
372 | |||
373 | m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell", | ||
374 | "unittest/" ) | ||
375 | |||
376 | m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core", | ||
377 | "lib-dynload/nis.so lib-dynload/grp.so lib-dynload/pwd.so getpass.*" ) | ||
378 | |||
379 | m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-elementtree ${PN}-re", | ||
380 | "lib-dynload/pyexpat.so xml xmllib.*" ) # package | ||
381 | |||
382 | m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang", | ||
383 | "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.*" ) | ||
384 | |||
385 | m.addPackage( "${PN}-zlib", "Python zlib compression support", "${PN}-core", | ||
386 | "lib-dynload/zlib.so" ) | ||
387 | |||
388 | m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime", | ||
389 | "mailbox.*" ) | ||
390 | |||
391 | m.make() | ||
diff --git a/scripts/contrib/python/generate-manifest-3.3.py b/scripts/contrib/python/generate-manifest-3.3.py new file mode 100755 index 0000000000..48cc84d4e0 --- /dev/null +++ b/scripts/contrib/python/generate-manifest-3.3.py | |||
@@ -0,0 +1,386 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # generate Python Manifest for the OpenEmbedded build system | ||
4 | # (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
5 | # (C) 2007 Jeremy Laine | ||
6 | # licensed under MIT, see COPYING.MIT | ||
7 | # | ||
8 | # June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com> | ||
9 | # * Updated to no longer generate special -dbg package, instead use the | ||
10 | # single system -dbg | ||
11 | # * Update version with ".1" to indicate this change | ||
12 | # | ||
13 | # 2014 Khem Raj <raj.khem@gmail.com> | ||
14 | # Added python3 support | ||
15 | # | ||
16 | import os | ||
17 | import sys | ||
18 | import time | ||
19 | |||
20 | VERSION = "3.3.3" | ||
21 | |||
22 | __author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>" | ||
23 | __version__ = "20140131" | ||
24 | |||
25 | class MakefileMaker: | ||
26 | |||
27 | def __init__( self, outfile ): | ||
28 | """initialize""" | ||
29 | self.packages = {} | ||
30 | self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] | ||
31 | self.output = outfile | ||
32 | self.out( """ | ||
33 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. | ||
34 | # Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
35 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy | ||
36 | """ % ( sys.argv[0], __version__ ) ) | ||
37 | |||
38 | # | ||
39 | # helper functions | ||
40 | # | ||
41 | |||
42 | def out( self, data ): | ||
43 | """print a line to the output file""" | ||
44 | self.output.write( "%s\n" % data ) | ||
45 | |||
46 | def setPrefix( self, targetPrefix ): | ||
47 | """set a file prefix for addPackage files""" | ||
48 | self.targetPrefix = targetPrefix | ||
49 | |||
50 | def doProlog( self ): | ||
51 | self.out( """ """ ) | ||
52 | self.out( "" ) | ||
53 | |||
54 | def addPackage( self, name, description, dependencies, filenames ): | ||
55 | """add a package to the Makefile""" | ||
56 | if type( filenames ) == type( "" ): | ||
57 | filenames = filenames.split() | ||
58 | fullFilenames = [] | ||
59 | for filename in filenames: | ||
60 | if filename[0] != "$": | ||
61 | fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) ) | ||
62 | else: | ||
63 | fullFilenames.append( filename ) | ||
64 | self.packages[name] = description, dependencies, fullFilenames | ||
65 | |||
66 | def doBody( self ): | ||
67 | """generate body of Makefile""" | ||
68 | |||
69 | global VERSION | ||
70 | |||
71 | # | ||
72 | # generate provides line | ||
73 | # | ||
74 | |||
75 | provideLine = 'PROVIDES+="' | ||
76 | for name in sorted(self.packages): | ||
77 | provideLine += "%s " % name | ||
78 | provideLine += '"' | ||
79 | |||
80 | self.out( provideLine ) | ||
81 | self.out( "" ) | ||
82 | |||
83 | # | ||
84 | # generate package line | ||
85 | # | ||
86 | |||
87 | packageLine = 'PACKAGES="${PN}-dbg ' | ||
88 | for name in sorted(self.packages): | ||
89 | if name.startswith("${PN}-distutils"): | ||
90 | if name == "${PN}-distutils": | ||
91 | packageLine += "%s-staticdev %s " % (name, name) | ||
92 | elif name != '${PN}-dbg': | ||
93 | packageLine += "%s " % name | ||
94 | packageLine += '${PN}-modules"' | ||
95 | |||
96 | self.out( packageLine ) | ||
97 | self.out( "" ) | ||
98 | |||
99 | # | ||
100 | # generate package variables | ||
101 | # | ||
102 | |||
103 | for name, data in sorted(self.packages.iteritems()): | ||
104 | desc, deps, files = data | ||
105 | |||
106 | # | ||
107 | # write out the description, revision and dependencies | ||
108 | # | ||
109 | self.out( 'SUMMARY_%s="%s"' % ( name, desc ) ) | ||
110 | self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) ) | ||
111 | |||
112 | line = 'FILES_%s="' % name | ||
113 | |||
114 | # | ||
115 | # check which directories to make in the temporary directory | ||
116 | # | ||
117 | |||
118 | dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead. | ||
119 | for target in files: | ||
120 | dirset[os.path.dirname( target )] = True | ||
121 | |||
122 | # | ||
123 | # generate which files to copy for the target (-dfR because whole directories are also allowed) | ||
124 | # | ||
125 | |||
126 | for target in files: | ||
127 | line += "%s " % target | ||
128 | |||
129 | line += '"' | ||
130 | self.out( line ) | ||
131 | self.out( "" ) | ||
132 | |||
133 | self.out( 'SUMMARY_${PN}-modules="All Python modules"' ) | ||
134 | line = 'RDEPENDS_${PN}-modules="' | ||
135 | |||
136 | for name, data in sorted(self.packages.iteritems()): | ||
137 | if name not in ['${PN}-dev', '${PN}-distutils-staticdev']: | ||
138 | line += "%s " % name | ||
139 | |||
140 | self.out( "%s \"" % line ) | ||
141 | self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' ) | ||
142 | |||
143 | def doEpilog( self ): | ||
144 | self.out( """""" ) | ||
145 | self.out( "" ) | ||
146 | |||
147 | def make( self ): | ||
148 | self.doProlog() | ||
149 | self.doBody() | ||
150 | self.doEpilog() | ||
151 | |||
152 | if __name__ == "__main__": | ||
153 | |||
154 | if len( sys.argv ) > 1: | ||
155 | try: | ||
156 | os.unlink(sys.argv[1]) | ||
157 | except Exception: | ||
158 | sys.exc_clear() | ||
159 | outfile = file( sys.argv[1], "w" ) | ||
160 | else: | ||
161 | outfile = sys.stdout | ||
162 | |||
163 | m = MakefileMaker( outfile ) | ||
164 | |||
165 | # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies! | ||
166 | # Parameters: revision, name, description, dependencies, filenames | ||
167 | # | ||
168 | |||
169 | m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math", | ||
170 | "__future__.* _abcoll.* abc.* copy.* copyreg.* ConfigParser.* " + | ||
171 | "genericpath.* getopt.* linecache.* new.* " + | ||
172 | "os.* posixpath.* struct.* " + | ||
173 | "warnings.* site.* stat.* " + | ||
174 | "UserDict.* UserList.* UserString.* " + | ||
175 | "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " + | ||
176 | "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* " + | ||
177 | "_weakrefset.* sysconfig.* _sysconfigdata.* config/Makefile " + | ||
178 | "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " + | ||
179 | "${libdir}/python${PYTHON_MAJMIN}/collections " + | ||
180 | "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ") | ||
181 | |||
182 | m.addPackage( "${PN}-dev", "Python development package", "${PN}-core", | ||
183 | "${includedir} " + | ||
184 | "${libdir}/lib*${SOLIBSDEV} " + | ||
185 | "${libdir}/*.la " + | ||
186 | "${libdir}/*.a " + | ||
187 | "${libdir}/*.o " + | ||
188 | "${libdir}/pkgconfig " + | ||
189 | "${base_libdir}/*.a " + | ||
190 | "${base_libdir}/*.o " + | ||
191 | "${datadir}/aclocal " + | ||
192 | "${datadir}/pkgconfig " ) | ||
193 | |||
194 | m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core", | ||
195 | "${bindir}/2to3 lib2to3" ) # package | ||
196 | |||
197 | m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter", | ||
198 | "${bindir}/idle idlelib" ) # package | ||
199 | |||
200 | m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re", | ||
201 | "${bindir}/pydoc pydoc.* pydoc_data" ) | ||
202 | |||
203 | m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime", | ||
204 | "${bindir}/smtpd.* smtpd.*" ) | ||
205 | |||
206 | m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core", | ||
207 | "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" ) | ||
208 | |||
209 | m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang", | ||
210 | "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" ) | ||
211 | |||
212 | m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core", | ||
213 | "py_compile.* compileall.*" ) | ||
214 | |||
215 | m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-codecs", | ||
216 | "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so" ) | ||
217 | |||
218 | m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core", | ||
219 | "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" ) | ||
220 | |||
221 | m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold", | ||
222 | "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" ) | ||
223 | |||
224 | m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core", | ||
225 | "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module | ||
226 | |||
227 | m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core", | ||
228 | "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module | ||
229 | |||
230 | m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs", | ||
231 | "_strptime.* calendar.* lib-dynload/datetime.*.so" ) | ||
232 | |||
233 | m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core", | ||
234 | "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" ) | ||
235 | |||
236 | m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint", | ||
237 | "bdb.* pdb.*" ) | ||
238 | |||
239 | m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re", | ||
240 | "difflib.*" ) | ||
241 | |||
242 | m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils", | ||
243 | "config/lib*.a" ) # package | ||
244 | |||
245 | m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core", | ||
246 | "config distutils" ) # package | ||
247 | |||
248 | m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib", | ||
249 | "doctest.*" ) | ||
250 | |||
251 | # FIXME consider adding to some higher level package | ||
252 | m.addPackage( "${PN}-elementtree", "Python elementree", "${PN}-core", | ||
253 | "lib-dynload/_elementtree.*.so" ) | ||
254 | |||
255 | m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient", | ||
256 | "imaplib.* email" ) # package | ||
257 | |||
258 | m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core", | ||
259 | "lib-dynload/fcntl.*.so" ) | ||
260 | |||
261 | m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core", | ||
262 | "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " ) | ||
263 | |||
264 | m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core", | ||
265 | "importlib" ) | ||
266 | |||
267 | m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core", | ||
268 | "lib-dynload/_gdbm.*.so" ) | ||
269 | |||
270 | m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core", | ||
271 | "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" ) | ||
272 | |||
273 | m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math", | ||
274 | "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " + | ||
275 | "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" ) | ||
276 | |||
277 | m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re", | ||
278 | "json lib-dynload/_json.*.so" ) # package | ||
279 | |||
280 | m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core", | ||
281 | "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " + | ||
282 | "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " + | ||
283 | "atexit.* bisect.* code.* codeop.* collections.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " + | ||
284 | "tokenize.* traceback.* weakref.*" ) | ||
285 | |||
286 | m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold", | ||
287 | "logging" ) # package | ||
288 | |||
289 | m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime", | ||
290 | "mailbox.*" ) | ||
291 | |||
292 | m.addPackage( "${PN}-math", "Python math support", "${PN}-core", | ||
293 | "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" ) | ||
294 | |||
295 | m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io", | ||
296 | "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" ) | ||
297 | |||
298 | m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io", | ||
299 | "lib-dynload/mmap.*.so " ) | ||
300 | |||
301 | m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap", | ||
302 | "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package | ||
303 | |||
304 | m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime", | ||
305 | "*Cookie*.* " + | ||
306 | "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib.* urllib2.* urlparse.* uuid.* rfc822.* mimetools.*" ) | ||
307 | |||
308 | m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient", | ||
309 | "cgi.* *HTTPServer.* SocketServer.*" ) | ||
310 | |||
311 | m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re", | ||
312 | "decimal.* numbers.*" ) | ||
313 | |||
314 | m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re", | ||
315 | "pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" ) | ||
316 | |||
317 | m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core", | ||
318 | "pkgutil.*") | ||
319 | |||
320 | m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io", | ||
321 | "pprint.*" ) | ||
322 | |||
323 | m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils", | ||
324 | "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" ) | ||
325 | |||
326 | m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core", | ||
327 | "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin | ||
328 | |||
329 | m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core", | ||
330 | "lib-dynload/readline.*.so rlcompleter.*" ) | ||
331 | |||
332 | m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core", | ||
333 | "${libdir}/python3.3/reprlib.py" ) | ||
334 | |||
335 | m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core", | ||
336 | "lib-dynload/resource.*.so" ) | ||
337 | |||
338 | m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re", | ||
339 | "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" ) | ||
340 | |||
341 | m.addPackage( "${PN}-robotparser", "Python robots.txt parser", "${PN}-core ${PN}-netclient", | ||
342 | "urllib/robotparser.*") | ||
343 | |||
344 | m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle", | ||
345 | "subprocess.*" ) | ||
346 | |||
347 | m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading", | ||
348 | "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" ) | ||
349 | |||
350 | m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3", | ||
351 | "sqlite3/test" ) | ||
352 | |||
353 | m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re", | ||
354 | "lib-dynload/strop.*.so string.* stringold.*" ) | ||
355 | |||
356 | m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core", | ||
357 | "lib-dynload/syslog.*.so" ) | ||
358 | |||
359 | m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io", | ||
360 | "pty.* tty.*" ) | ||
361 | |||
362 | m.addPackage( "${PN}-tests", "Python tests", "${PN}-core", | ||
363 | "test" ) # package | ||
364 | |||
365 | m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang", | ||
366 | "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" ) | ||
367 | |||
368 | m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core", | ||
369 | "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package | ||
370 | |||
371 | m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell", | ||
372 | "unittest/" ) | ||
373 | |||
374 | m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core", | ||
375 | "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" ) | ||
376 | |||
377 | m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-elementtree ${PN}-re", | ||
378 | "lib-dynload/pyexpat.*.so xml xmllib.*" ) # package | ||
379 | |||
380 | m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang", | ||
381 | "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" ) | ||
382 | |||
383 | m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime", | ||
384 | "mailbox.*" ) | ||
385 | |||
386 | m.make() | ||
diff --git a/scripts/contrib/serdevtry b/scripts/contrib/serdevtry new file mode 100755 index 0000000000..74bd7b7161 --- /dev/null +++ b/scripts/contrib/serdevtry | |||
@@ -0,0 +1,60 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Copyright (C) 2014 Intel Corporation | ||
4 | # | ||
5 | # Released under the MIT license (see COPYING.MIT) | ||
6 | |||
7 | if [ "$1" = "" -o "$1" = "--help" ] ; then | ||
8 | echo "Usage: $0 <serial terminal command>" | ||
9 | echo | ||
10 | echo "Simple script to handle maintaining a terminal for serial devices that" | ||
11 | echo "disappear when a device is powered down or reset, such as the USB" | ||
12 | echo "serial console on the original BeagleBone (white version)." | ||
13 | echo | ||
14 | echo "e.g. $0 picocom -b 115200 /dev/ttyUSB0" | ||
15 | echo | ||
16 | exit | ||
17 | fi | ||
18 | |||
19 | args="$@" | ||
20 | DEVICE="" | ||
21 | while [ "$1" != "" ]; do | ||
22 | case "$1" in | ||
23 | /dev/*) | ||
24 | DEVICE=$1 | ||
25 | break;; | ||
26 | esac | ||
27 | shift | ||
28 | done | ||
29 | |||
30 | if [ "$DEVICE" != "" ] ; then | ||
31 | while true; do | ||
32 | if [ ! -e $DEVICE ] ; then | ||
33 | echo "serdevtry: waiting for $DEVICE to exist..." | ||
34 | while [ ! -e $DEVICE ]; do | ||
35 | sleep 0.1 | ||
36 | done | ||
37 | fi | ||
38 | if [ ! -w $DEVICE ] ; then | ||
39 | # Sometimes (presumably because of a race with udev) we get to | ||
40 | # the device before its permissions have been set up | ||
41 | RETRYNUM=0 | ||
42 | while [ ! -w $DEVICE ]; do | ||
43 | if [ "$RETRYNUM" = "2" ] ; then | ||
44 | echo "Device $DEVICE exists but is not writable!" | ||
45 | exit 1 | ||
46 | fi | ||
47 | RETRYNUM=$((RETRYNUM+1)) | ||
48 | sleep 0.1 | ||
49 | done | ||
50 | fi | ||
51 | $args | ||
52 | if [ -e $DEVICE ] ; then | ||
53 | break | ||
54 | fi | ||
55 | done | ||
56 | else | ||
57 | echo "Unable to determine device node from command: $args" | ||
58 | exit 1 | ||
59 | fi | ||
60 | |||
diff --git a/scripts/contrib/test_build_time.sh b/scripts/contrib/test_build_time.sh new file mode 100755 index 0000000000..9e5725ae54 --- /dev/null +++ b/scripts/contrib/test_build_time.sh | |||
@@ -0,0 +1,237 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Build performance regression test script | ||
4 | # | ||
5 | # Copyright 2011 Intel Corporation | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License as published by | ||
10 | # the Free Software Foundation; either version 2 of the License, or | ||
11 | # (at your option) any later version. | ||
12 | # | ||
13 | # This program is distributed in the hope that it will be useful, | ||
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | # GNU General Public License for more details. | ||
17 | # | ||
18 | # You should have received a copy of the GNU General Public License | ||
19 | # along with this program; if not, write to the Free Software | ||
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | # | ||
22 | # | ||
23 | # DESCRIPTION | ||
24 | # This script is intended to be used in conjunction with "git bisect run" | ||
25 | # in order to find regressions in build time, however it can also be used | ||
26 | # independently. It cleans out the build output directories, runs a | ||
27 | # specified worker script (an example is test_build_time_worker.sh) under | ||
28 | # TIME(1), logs the results to TEST_LOGDIR (default /tmp) and returns a | ||
29 | # value telling "git bisect run" whether the build time is good (under | ||
30 | # the specified threshold) or bad (over it). There is also a tolerance | ||
31 | # option but it is not particularly useful as it only subtracts the | ||
32 | # tolerance from the given threshold and uses it as the actual threshold. | ||
33 | # | ||
34 | # It is also capable of taking a file listing git revision hashes to be | ||
35 | # test-applied to the repository in order to get past build failures that | ||
36 | # would otherwise cause certain revisions to have to be skipped; if a | ||
37 | # revision does not apply cleanly then the script assumes it does not | ||
38 | # need to be applied and ignores it. | ||
39 | # | ||
40 | # Please see the help output (syntax below) for some important setup | ||
41 | # instructions. | ||
42 | # | ||
43 | # AUTHORS | ||
44 | # Paul Eggleton <paul.eggleton@linux.intel.com> | ||
45 | |||
46 | |||
47 | syntax() { | ||
48 | echo "syntax: $0 <script> <time> <tolerance> [patchrevlist]" | ||
49 | echo "" | ||
50 | echo " script - worker script file (if in current dir, prefix with ./)" | ||
51 | echo " time - time threshold (in seconds, suffix m for minutes)" | ||
52 | echo " tolerance - tolerance (in seconds, suffix m for minutes or % for" | ||
53 | echo " percentage, can be 0)" | ||
54 | echo " patchrevlist - optional file listing revisions to apply as patches on top" | ||
55 | echo "" | ||
56 | echo "You must set TEST_BUILDDIR to point to a previously created build directory," | ||
57 | echo "however please note that this script will wipe out the TMPDIR defined in" | ||
58 | echo "TEST_BUILDDIR/conf/local.conf as part of its initial setup (as well as your" | ||
59 | echo "~/.ccache)" | ||
60 | echo "" | ||
61 | echo "To get rid of the sudo prompt, please add the following line to /etc/sudoers" | ||
62 | echo "(use 'visudo' to edit this; also it is assumed that the user you are running" | ||
63 | echo "as is a member of the 'wheel' group):" | ||
64 | echo "" | ||
65 | echo "%wheel ALL=(ALL) NOPASSWD: /sbin/sysctl -w vm.drop_caches=[1-3]" | ||
66 | echo "" | ||
67 | echo "Note: it is recommended that you disable crond and any other process that" | ||
68 | echo "may cause significant CPU or I/O usage during build performance tests." | ||
69 | } | ||
70 | |||
71 | # Note - we exit with 250 here because that will tell git bisect run that | ||
72 | # something bad happened and stop | ||
73 | if [ "$1" = "" ] ; then | ||
74 | syntax | ||
75 | exit 250 | ||
76 | fi | ||
77 | |||
78 | if [ "$2" = "" ] ; then | ||
79 | syntax | ||
80 | exit 250 | ||
81 | fi | ||
82 | |||
83 | if [ "$3" = "" ] ; then | ||
84 | syntax | ||
85 | exit 250 | ||
86 | fi | ||
87 | |||
88 | if ! [[ "$2" =~ ^[0-9][0-9m.]*$ ]] ; then | ||
89 | echo "'$2' is not a valid number for threshold" | ||
90 | exit 250 | ||
91 | fi | ||
92 | |||
93 | if ! [[ "$3" =~ ^[0-9][0-9m.%]*$ ]] ; then | ||
94 | echo "'$3' is not a valid number for tolerance" | ||
95 | exit 250 | ||
96 | fi | ||
97 | |||
98 | if [ "$TEST_BUILDDIR" = "" ] ; then | ||
99 | echo "Please set TEST_BUILDDIR to a previously created build directory" | ||
100 | exit 250 | ||
101 | fi | ||
102 | |||
103 | if [ ! -d "$TEST_BUILDDIR" ] ; then | ||
104 | echo "TEST_BUILDDIR $TEST_BUILDDIR not found" | ||
105 | exit 250 | ||
106 | fi | ||
107 | |||
108 | git diff --quiet | ||
109 | if [ $? != 0 ] ; then | ||
110 | echo "Working tree is dirty, cannot proceed" | ||
111 | exit 251 | ||
112 | fi | ||
113 | |||
114 | if [ "$BB_ENV_EXTRAWHITE" != "" ] ; then | ||
115 | echo "WARNING: you are running after sourcing the build environment script, this is not recommended" | ||
116 | fi | ||
117 | |||
118 | runscript=$1 | ||
119 | timethreshold=$2 | ||
120 | tolerance=$3 | ||
121 | |||
122 | if [ "$4" != "" ] ; then | ||
123 | patchrevlist=`cat $4` | ||
124 | else | ||
125 | patchrevlist="" | ||
126 | fi | ||
127 | |||
128 | if [[ timethreshold == *m* ]] ; then | ||
129 | timethreshold=`echo $timethreshold | sed s/m/*60/ | bc` | ||
130 | fi | ||
131 | |||
132 | if [[ $tolerance == *m* ]] ; then | ||
133 | tolerance=`echo $tolerance | sed s/m/*60/ | bc` | ||
134 | elif [[ $tolerance == *%* ]] ; then | ||
135 | tolerance=`echo $tolerance | sed s/%//` | ||
136 | tolerance=`echo "scale = 2; (($tolerance * $timethreshold) / 100)" | bc` | ||
137 | fi | ||
138 | |||
139 | tmpdir=`grep "^TMPDIR" $TEST_BUILDDIR/conf/local.conf | sed -e 's/TMPDIR[ \t]*=[ \t\?]*"//' -e 's/"//'` | ||
140 | if [ "x$tmpdir" = "x" ]; then | ||
141 | echo "Unable to determine TMPDIR from $TEST_BUILDDIR/conf/local.conf, bailing out" | ||
142 | exit 250 | ||
143 | fi | ||
144 | sstatedir=`grep "^SSTATE_DIR" $TEST_BUILDDIR/conf/local.conf | sed -e 's/SSTATE_DIR[ \t\?]*=[ \t]*"//' -e 's/"//'` | ||
145 | if [ "x$sstatedir" = "x" ]; then | ||
146 | echo "Unable to determine SSTATE_DIR from $TEST_BUILDDIR/conf/local.conf, bailing out" | ||
147 | exit 250 | ||
148 | fi | ||
149 | |||
150 | if [ `expr length $tmpdir` -lt 4 ] ; then | ||
151 | echo "TMPDIR $tmpdir is less than 4 characters, bailing out" | ||
152 | exit 250 | ||
153 | fi | ||
154 | |||
155 | if [ `expr length $sstatedir` -lt 4 ] ; then | ||
156 | echo "SSTATE_DIR $sstatedir is less than 4 characters, bailing out" | ||
157 | exit 250 | ||
158 | fi | ||
159 | |||
160 | echo -n "About to wipe out TMPDIR $tmpdir, press Ctrl+C to break out... " | ||
161 | for i in 9 8 7 6 5 4 3 2 1 | ||
162 | do | ||
163 | echo -ne "\x08$i" | ||
164 | sleep 1 | ||
165 | done | ||
166 | echo | ||
167 | |||
168 | pushd . > /dev/null | ||
169 | |||
170 | rm -f pseudodone | ||
171 | echo "Removing TMPDIR $tmpdir..." | ||
172 | rm -rf $tmpdir | ||
173 | echo "Removing TMPDIR $tmpdir-*libc..." | ||
174 | rm -rf $tmpdir-*libc | ||
175 | echo "Removing SSTATE_DIR $sstatedir..." | ||
176 | rm -rf $sstatedir | ||
177 | echo "Removing ~/.ccache..." | ||
178 | rm -rf ~/.ccache | ||
179 | |||
180 | echo "Syncing..." | ||
181 | sync | ||
182 | sync | ||
183 | echo "Dropping VM cache..." | ||
184 | #echo 3 > /proc/sys/vm/drop_caches | ||
185 | sudo /sbin/sysctl -w vm.drop_caches=3 > /dev/null | ||
186 | |||
187 | if [ "$TEST_LOGDIR" = "" ] ; then | ||
188 | logdir="/tmp" | ||
189 | else | ||
190 | logdir="$TEST_LOGDIR" | ||
191 | fi | ||
192 | rev=`git rev-parse HEAD` | ||
193 | logfile="$logdir/timelog_$rev.log" | ||
194 | echo -n > $logfile | ||
195 | |||
196 | gitroot=`git rev-parse --show-toplevel` | ||
197 | cd $gitroot | ||
198 | for patchrev in $patchrevlist ; do | ||
199 | echo "Applying $patchrev" | ||
200 | patchfile=`mktemp` | ||
201 | git show $patchrev > $patchfile | ||
202 | git apply --check $patchfile &> /dev/null | ||
203 | if [ $? != 0 ] ; then | ||
204 | echo " ... patch does not apply without errors, ignoring" | ||
205 | else | ||
206 | echo "Applied $patchrev" >> $logfile | ||
207 | git apply $patchfile &> /dev/null | ||
208 | fi | ||
209 | rm $patchfile | ||
210 | done | ||
211 | |||
212 | sync | ||
213 | echo "Quiescing for 5s..." | ||
214 | sleep 5 | ||
215 | |||
216 | echo "Running $runscript at $rev..." | ||
217 | timeoutfile=`mktemp` | ||
218 | /usr/bin/time -o $timeoutfile -f "%e\nreal\t%E\nuser\t%Us\nsys\t%Ss\nmaxm\t%Mk" $runscript 2>&1 | tee -a $logfile | ||
219 | exitstatus=$PIPESTATUS | ||
220 | |||
221 | git reset --hard HEAD > /dev/null | ||
222 | popd > /dev/null | ||
223 | |||
224 | timeresult=`head -n1 $timeoutfile` | ||
225 | cat $timeoutfile | tee -a $logfile | ||
226 | rm $timeoutfile | ||
227 | |||
228 | if [ $exitstatus != 0 ] ; then | ||
229 | # Build failed, exit with 125 to tell git bisect run to skip this rev | ||
230 | echo "*** Build failed (exit code $exitstatus), skipping..." | tee -a $logfile | ||
231 | exit 125 | ||
232 | fi | ||
233 | |||
234 | ret=`echo "scale = 2; $timeresult > $timethreshold - $tolerance" | bc` | ||
235 | echo "Returning $ret" | tee -a $logfile | ||
236 | exit $ret | ||
237 | |||
diff --git a/scripts/contrib/test_build_time_worker.sh b/scripts/contrib/test_build_time_worker.sh new file mode 100755 index 0000000000..8e20a9ea7d --- /dev/null +++ b/scripts/contrib/test_build_time_worker.sh | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # This is an example script to be used in conjunction with test_build_time.sh | ||
4 | |||
5 | if [ "$TEST_BUILDDIR" = "" ] ; then | ||
6 | echo "TEST_BUILDDIR is not set" | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | buildsubdir=`basename $TEST_BUILDDIR` | ||
11 | if [ ! -d $buildsubdir ] ; then | ||
12 | echo "Unable to find build subdir $buildsubdir in current directory" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | if [ -f oe-init-build-env ] ; then | ||
17 | . ./oe-init-build-env $buildsubdir | ||
18 | elif [ -f poky-init-build-env ] ; then | ||
19 | . ./poky-init-build-env $buildsubdir | ||
20 | else | ||
21 | echo "Unable to find build environment setup script" | ||
22 | exit 1 | ||
23 | fi | ||
24 | |||
25 | if [ -f ../meta/recipes-sato/images/core-image-sato.bb ] ; then | ||
26 | target="core-image-sato" | ||
27 | else | ||
28 | target="poky-image-sato" | ||
29 | fi | ||
30 | |||
31 | echo "Build started at `date "+%Y-%m-%d %H:%M:%S"`" | ||
32 | echo "bitbake $target" | ||
33 | bitbake $target | ||
34 | ret=$? | ||
35 | echo "Build finished at `date "+%Y-%m-%d %H:%M:%S"`" | ||
36 | exit $ret | ||
37 | |||
diff --git a/scripts/contrib/verify-homepage.py b/scripts/contrib/verify-homepage.py new file mode 100755 index 0000000000..86cc82bca3 --- /dev/null +++ b/scripts/contrib/verify-homepage.py | |||
@@ -0,0 +1,63 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # This script is used for verify HOMEPAGE. | ||
4 | # The result is influenced by network environment, since the timeout of connect url is 5 seconds as default. | ||
5 | |||
6 | import sys | ||
7 | import os | ||
8 | import subprocess | ||
9 | import urllib2 | ||
10 | |||
11 | def search_bitbakepath(): | ||
12 | bitbakepath = "" | ||
13 | |||
14 | # Search path to bitbake lib dir in order to load bb modules | ||
15 | if os.path.exists(os.path.join(os.path.dirname(sys.argv[0]), '../../bitbake/lib/bb')): | ||
16 | bitbakepath = os.path.join(os.path.dirname(sys.argv[0]), '../../bitbake/lib') | ||
17 | bitbakepath = os.path.abspath(bitbakepath) | ||
18 | else: | ||
19 | # Look for bitbake/bin dir in PATH | ||
20 | for pth in os.environ['PATH'].split(':'): | ||
21 | if os.path.exists(os.path.join(pth, '../lib/bb')): | ||
22 | bitbakepath = os.path.abspath(os.path.join(pth, '../lib')) | ||
23 | break | ||
24 | if not bitbakepath: | ||
25 | sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n") | ||
26 | sys.exit(1) | ||
27 | return bitbakepath | ||
28 | |||
29 | # For importing the following modules | ||
30 | sys.path.insert(0, search_bitbakepath()) | ||
31 | import bb.tinfoil | ||
32 | |||
33 | def wgetHomepage(pn, homepage): | ||
34 | result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell = True) | ||
35 | if result: | ||
36 | bb.warn("Failed to verify HOMEPAGE (%s) of %s" % (homepage, pn)) | ||
37 | return 1 | ||
38 | else: | ||
39 | return 0 | ||
40 | |||
41 | def verifyHomepage(bbhandler): | ||
42 | pkg_pn = bbhandler.cooker.recipecache.pkg_pn | ||
43 | pnlist = sorted(pkg_pn) | ||
44 | count = 0 | ||
45 | for pn in pnlist: | ||
46 | fn = pkg_pn[pn].pop() | ||
47 | data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data) | ||
48 | homepage = data.getVar("HOMEPAGE") | ||
49 | if homepage: | ||
50 | try: | ||
51 | urllib2.urlopen(homepage, timeout=5) | ||
52 | except Exception: | ||
53 | count = count + wgetHomepage(pn, homepage) | ||
54 | return count | ||
55 | |||
56 | if __name__=='__main__': | ||
57 | failcount = 0 | ||
58 | bbhandler = bb.tinfoil.Tinfoil() | ||
59 | bbhandler.prepare() | ||
60 | print "Start to verify HOMEPAGE:" | ||
61 | failcount = verifyHomepage(bbhandler) | ||
62 | print "finish to verify HOMEPAGE." | ||
63 | print "Summary: %s failed" % failcount | ||
diff --git a/scripts/cp-noerror b/scripts/cp-noerror new file mode 100755 index 0000000000..28eb90d4a0 --- /dev/null +++ b/scripts/cp-noerror | |||
@@ -0,0 +1,52 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # Allow copying of $1 to $2 but if files in $1 disappear during the copy operation, | ||
4 | # don't error. | ||
5 | # Also don't error if $1 disappears. | ||
6 | # | ||
7 | |||
8 | import sys | ||
9 | import os | ||
10 | import shutil | ||
11 | |||
12 | def copytree(src, dst, symlinks=False, ignore=None): | ||
13 | """Based on shutil.copytree""" | ||
14 | names = os.listdir(src) | ||
15 | try: | ||
16 | os.makedirs(dst) | ||
17 | except OSError: | ||
18 | # Already exists | ||
19 | pass | ||
20 | errors = [] | ||
21 | for name in names: | ||
22 | srcname = os.path.join(src, name) | ||
23 | dstname = os.path.join(dst, name) | ||
24 | try: | ||
25 | d = dstname | ||
26 | if os.path.isdir(dstname): | ||
27 | d = os.path.join(dstname, os.path.basename(srcname)) | ||
28 | if os.path.exists(d): | ||
29 | continue | ||
30 | try: | ||
31 | os.link(srcname, dstname) | ||
32 | except OSError: | ||
33 | shutil.copy2(srcname, dstname) | ||
34 | # catch the Error from the recursive copytree so that we can | ||
35 | # continue with other files | ||
36 | except shutil.Error, err: | ||
37 | errors.extend(err.args[0]) | ||
38 | except EnvironmentError, why: | ||
39 | errors.append((srcname, dstname, str(why))) | ||
40 | try: | ||
41 | shutil.copystat(src, dst) | ||
42 | except OSError, why: | ||
43 | errors.extend((src, dst, str(why))) | ||
44 | if errors: | ||
45 | raise shutil.Error, errors | ||
46 | |||
47 | try: | ||
48 | copytree(sys.argv[1], sys.argv[2]) | ||
49 | except shutil.Error: | ||
50 | pass | ||
51 | except OSError: | ||
52 | pass | ||
diff --git a/scripts/create-pull-request b/scripts/create-pull-request new file mode 100755 index 0000000000..503248bbf0 --- /dev/null +++ b/scripts/create-pull-request | |||
@@ -0,0 +1,240 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Copyright (c) 2010-2013, Intel Corporation. | ||
4 | # All Rights Reserved | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
14 | # the GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | # | ||
20 | |||
21 | # | ||
22 | # This script is intended to be used to prepare a series of patches | ||
23 | # and a cover letter in an appropriate and consistent format for | ||
24 | # submission to Open Embedded and The Yocto Project, as well as to | ||
25 | # related projects and layers. | ||
26 | # | ||
27 | |||
28 | ODIR=pull-$$ | ||
29 | RELATIVE_TO="master" | ||
30 | COMMIT_ID="HEAD" | ||
31 | PREFIX="PATCH" | ||
32 | RFC=0 | ||
33 | |||
34 | usage() { | ||
35 | CMD=$(basename $0) | ||
36 | cat <<EOM | ||
37 | Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote [-b branch] | ||
38 | -b branch Branch name in the specified remote (default: current branch) | ||
39 | -c Create an RFC (Request for Comment) patch series | ||
40 | -h Display this help message | ||
41 | -i commit_id Ending commit (default: HEAD) | ||
42 | -m msg_body_file The file containing a blurb to be inserted into the summary email | ||
43 | -o output_dir Specify the output directory for the messages (default: pull-PID) | ||
44 | -p prefix Use [prefix N/M] instead of [PATCH N/M] as the subject prefix | ||
45 | -r relative_to Starting commit (default: master) | ||
46 | -s subject The subject to be inserted into the summary email | ||
47 | -u remote The git remote where the branch is located | ||
48 | |||
49 | Examples: | ||
50 | $CMD -u contrib -b nitin/basic | ||
51 | $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro | ||
52 | $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc | ||
53 | $CMD -u contrib -p "RFC PATCH" -b nitin/experimental | ||
54 | EOM | ||
55 | } | ||
56 | |||
57 | # Parse and validate arguments | ||
58 | while getopts "b:chi:m:o:p:r:s:u:" OPT; do | ||
59 | case $OPT in | ||
60 | b) | ||
61 | BRANCH="$OPTARG" | ||
62 | ;; | ||
63 | c) | ||
64 | RFC=1 | ||
65 | ;; | ||
66 | h) | ||
67 | usage | ||
68 | exit 0 | ||
69 | ;; | ||
70 | i) | ||
71 | COMMIT_ID="$OPTARG" | ||
72 | ;; | ||
73 | m) | ||
74 | BODY="$OPTARG" | ||
75 | if [ ! -e "$BODY" ]; then | ||
76 | echo "ERROR: Body file does not exist" | ||
77 | exit 1 | ||
78 | fi | ||
79 | ;; | ||
80 | o) | ||
81 | ODIR="$OPTARG" | ||
82 | ;; | ||
83 | p) | ||
84 | PREFIX="$OPTARG" | ||
85 | ;; | ||
86 | r) | ||
87 | RELATIVE_TO="$OPTARG" | ||
88 | ;; | ||
89 | s) | ||
90 | SUBJECT="$OPTARG" | ||
91 | ;; | ||
92 | u) | ||
93 | REMOTE="$OPTARG" | ||
94 | REMOTE_URL=$(git config remote.$REMOTE.url) | ||
95 | if [ $? -ne 0 ]; then | ||
96 | echo "ERROR: git config failed to find a url for '$REMOTE'" | ||
97 | echo | ||
98 | echo "To add a remote url for $REMOTE, use:" | ||
99 | echo " git config remote.$REMOTE.url <url>" | ||
100 | exit 1 | ||
101 | fi | ||
102 | |||
103 | # Rewrite private URLs to public URLs | ||
104 | # Determine the repository name for use in the WEB_URL later | ||
105 | case "$REMOTE_URL" in | ||
106 | *@*) | ||
107 | USER_RE="[A-Za-z0-9_.@][A-Za-z0-9_.@-]*\$\?" | ||
108 | PROTO_RE="[a-z][a-z+]*://" | ||
109 | GIT_RE="\(^\($PROTO_RE\)\?$USER_RE@\)\([^:/]*\)[:/]\(.*\)" | ||
110 | REMOTE_URL=${REMOTE_URL%.git} | ||
111 | REMOTE_REPO=$(echo $REMOTE_URL | sed "s#$GIT_RE#\4#") | ||
112 | REMOTE_URL=$(echo $REMOTE_URL | sed "s#$GIT_RE#git://\3/\4#") | ||
113 | ;; | ||
114 | *) | ||
115 | echo "WARNING: Unrecognized remote URL: $REMOTE_URL" | ||
116 | echo " The pull and browse URLs will likely be incorrect" | ||
117 | ;; | ||
118 | esac | ||
119 | ;; | ||
120 | esac | ||
121 | done | ||
122 | |||
123 | if [ -z "$BRANCH" ]; then | ||
124 | BRANCH=$(git branch | grep -e "^\* " | cut -d' ' -f2) | ||
125 | echo "NOTE: Assuming remote branch '$BRANCH', use -b to override." | ||
126 | fi | ||
127 | |||
128 | if [ -z "$REMOTE_URL" ]; then | ||
129 | echo "ERROR: Missing parameter -u, no git remote!" | ||
130 | usage | ||
131 | exit 1 | ||
132 | fi | ||
133 | |||
134 | if [ $RFC -eq 1 ]; then | ||
135 | PREFIX="RFC $PREFIX" | ||
136 | fi | ||
137 | |||
138 | |||
139 | # Set WEB_URL from known remotes | ||
140 | WEB_URL="" | ||
141 | case "$REMOTE_URL" in | ||
142 | *git.yoctoproject.org*) | ||
143 | WEB_URL="http://git.yoctoproject.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH" | ||
144 | ;; | ||
145 | *git.pokylinux.org*) | ||
146 | WEB_URL="http://git.pokylinux.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH" | ||
147 | ;; | ||
148 | *git.openembedded.org*) | ||
149 | WEB_URL="http://cgit.openembedded.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH" | ||
150 | ;; | ||
151 | *github.com*) | ||
152 | WEB_URL="https://github.com/$REMOTE_REPO/tree/$BRANCH" | ||
153 | ;; | ||
154 | esac | ||
155 | |||
156 | # Perform a sanity test on the web URL. Issue a warning if it is not | ||
157 | # accessible, but do not abort as users may want to run offline. | ||
158 | if [ -n "$WEB_URL" ]; then | ||
159 | wget --no-check-certificate -q $WEB_URL -O /dev/null | ||
160 | if [ $? -ne 0 ]; then | ||
161 | echo "WARNING: Branch '$BRANCH' was not found on the contrib git tree." | ||
162 | echo " Please check your remote and branch parameter before sending." | ||
163 | echo "" | ||
164 | fi | ||
165 | fi | ||
166 | |||
167 | if [ -e $ODIR ]; then | ||
168 | echo "ERROR: output directory $ODIR exists." | ||
169 | exit 1 | ||
170 | fi | ||
171 | mkdir $ODIR | ||
172 | |||
173 | |||
174 | # Generate the patches and cover letter | ||
175 | git format-patch -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null | ||
176 | |||
177 | |||
178 | # Customize the cover letter | ||
179 | CL="$ODIR/0000-cover-letter.patch" | ||
180 | PM="$ODIR/pull-msg" | ||
181 | git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM" | ||
182 | if [ $? -ne 0 ]; then | ||
183 | echo "ERROR: git request-pull reported an error" | ||
184 | exit 1 | ||
185 | fi | ||
186 | |||
187 | # The cover letter already has a diffstat, remove it from the pull-msg | ||
188 | # before inserting it. | ||
189 | sed -n "0,\#$REMOTE_URL# p" "$PM" | sed -i "/BLURB HERE/ r /dev/stdin" "$CL" | ||
190 | rm "$PM" | ||
191 | |||
192 | # If this is an RFC, make that clear in the cover letter | ||
193 | if [ $RFC -eq 1 ]; then | ||
194 | (cat <<EOM | ||
195 | Please review the following changes for suitability for inclusion. If you have | ||
196 | any objections or suggestions for improvement, please respond to the patches. If | ||
197 | you agree with the changes, please provide your Acked-by. | ||
198 | |||
199 | EOM | ||
200 | ) | sed -i "/BLURB HERE/ r /dev/stdin" "$CL" | ||
201 | fi | ||
202 | |||
203 | # Insert the WEB_URL if there is one | ||
204 | if [ -n "$WEB_URL" ]; then | ||
205 | echo " $WEB_URL" | sed -i "\#$REMOTE_URL# r /dev/stdin" "$CL" | ||
206 | fi | ||
207 | |||
208 | |||
209 | # If the user specified a message body, insert it into the cover letter and | ||
210 | # remove the BLURB token. | ||
211 | if [ -n "$BODY" ]; then | ||
212 | sed -i "/BLURB HERE/ r $BODY" "$CL" | ||
213 | sed -i "/BLURB HERE/ d" "$CL" | ||
214 | fi | ||
215 | |||
216 | # If the user specified a subject, replace the SUBJECT token with it. | ||
217 | if [ -n "$SUBJECT" ]; then | ||
218 | sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL" | ||
219 | fi | ||
220 | |||
221 | |||
222 | # Generate report for user | ||
223 | cat <<EOM | ||
224 | The following patches have been prepared: | ||
225 | $(for PATCH in $(ls $ODIR/*); do echo " $PATCH"; done) | ||
226 | |||
227 | Review their content, especially the summary mail: | ||
228 | $CL | ||
229 | |||
230 | When you are satisfied, you can send them with: | ||
231 | send-pull-request -a -p $ODIR | ||
232 | EOM | ||
233 | |||
234 | # Check the patches for trailing white space | ||
235 | egrep -q -e "^\+.*\s+$" $ODIR/* | ||
236 | if [ $? -ne 1 ]; then | ||
237 | echo | ||
238 | echo "WARNING: Trailing white space detected at these locations" | ||
239 | egrep -nH --color -e "^\+.*\s+$" $ODIR/* | ||
240 | fi | ||
diff --git a/scripts/create-recipe b/scripts/create-recipe new file mode 100755 index 0000000000..e4bc4c322b --- /dev/null +++ b/scripts/create-recipe | |||
@@ -0,0 +1,2071 @@ | |||
1 | #!/usr/bin/perl -w | ||
2 | |||
3 | # Copyright (C) 2012 Wind River Systems, Inc. | ||
4 | # | ||
5 | # Copyright (C) 2010 Intel Corporation | ||
6 | # | ||
7 | # | ||
8 | # This program is free software: you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License as published by | ||
10 | # the Free Software Foundation, either version 3 of the License. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | # | ||
20 | # As a special exception, you may create a larger work that contains | ||
21 | # part or all of the autospectacle output and distribute that work | ||
22 | # under terms of your choice. | ||
23 | # Alternatively, if you modify or redistribute autospectacle itself, | ||
24 | # you may (at your option) remove this special exception. | ||
25 | # | ||
26 | # This special exception was modeled after the bison exception | ||
27 | # (as done by the Free Software Foundation in version 2.2 of Bison) | ||
28 | # | ||
29 | |||
30 | |||
31 | use File::Temp qw(tempdir); | ||
32 | use File::Path qw(mkpath rmtree); | ||
33 | use File::Spec (); | ||
34 | use File::Basename qw(basename dirname); | ||
35 | |||
36 | |||
37 | my $name = ""; | ||
38 | my $predef_version = "TO BE FILLED IN"; | ||
39 | my $version = $predef_version; | ||
40 | my $pversion = $predef_version; | ||
41 | my $description = ""; | ||
42 | my $summary = ""; | ||
43 | my $url = ""; | ||
44 | my $homepage = ""; | ||
45 | my @depends; | ||
46 | my @rdepends; | ||
47 | my @rawpythondeps; | ||
48 | my $configure = ""; | ||
49 | my $localename = ""; | ||
50 | my @sources; | ||
51 | my @mainfiles; | ||
52 | my @patches; | ||
53 | |||
54 | my $md5sum = ""; | ||
55 | my $sh256sum = ""; | ||
56 | my @inherits; | ||
57 | |||
58 | my $printed_subpackages = 0; | ||
59 | my $fulldir = ""; | ||
60 | |||
61 | my $builder = ""; | ||
62 | |||
63 | |||
64 | my $oscmode = 0; | ||
65 | my $python = 0; | ||
66 | |||
67 | my @banned_pkgconfig; | ||
68 | my %failed_commands; | ||
69 | my %failed_libs; | ||
70 | my %failed_headers; | ||
71 | |||
72 | |||
73 | |||
74 | ###################################################################### | ||
75 | # | ||
76 | # License management | ||
77 | # | ||
78 | # We store the sha1sum of common COPYING files in an associative array | ||
79 | # %licenses. | ||
80 | # | ||
81 | # For all matching sha1's in the tarball, we then push the result | ||
82 | # in the @license array (which we'll dedupe at the time of printing). | ||
83 | # | ||
84 | |||
85 | my %licenses; | ||
86 | my @license; | ||
87 | my %lic_files; | ||
88 | |||
89 | sub setup_licenses | ||
90 | { | ||
91 | $licenses{"06877624ea5c77efe3b7e39b0f909eda6e25a4ec"} = "GPLv2"; | ||
92 | $licenses{"075d599585584bb0e4b526f5c40cb6b17e0da35a"} = "GPLv2"; | ||
93 | $licenses{"10782dd732f42f49918c839e8a5e2894c508b079"} = "GPLv2"; | ||
94 | $licenses{"2d29c273fda30310211bbf6a24127d589be09b6c"} = "GPLv2"; | ||
95 | $licenses{"4df5d4b947cf4e63e675729dd3f168ba844483c7"} = "LGPLv2.1"; | ||
96 | $licenses{"503df7650052cf38efde55e85f0fe363e59b9739"} = "GPLv2"; | ||
97 | $licenses{"5405311284eab5ab51113f87c9bfac435c695bb9"} = "GPLv2"; | ||
98 | $licenses{"5fb362ef1680e635fe5fb212b55eef4db9ead48f"} = "LGPLv2"; | ||
99 | $licenses{"68c94ffc34f8ad2d7bfae3f5a6b996409211c1b1"} = "GPLv2"; | ||
100 | $licenses{"66c77efd1cf9c70d4f982ea59487b2eeb6338e26"} = "LGPLv2.1"; | ||
101 | $licenses{"74a8a6531a42e124df07ab5599aad63870fa0bd4"} = "GPLv2"; | ||
102 | $licenses{"8088b44375ef05202c0fca4e9e82d47591563609"} = "LGPLv2.1"; | ||
103 | $licenses{"8624bcdae55baeef00cd11d5dfcfa60f68710a02"} = "GPLv3"; | ||
104 | $licenses{"8e57ffebd0ed4417edc22e3f404ea3664d7fed27"} = "MIT"; | ||
105 | $licenses{"99b5245b4714b9b89e7584bfc88da64e2d315b81"} = "BSD"; | ||
106 | $licenses{"aba8d76d0af67d57da3c3c321caa59f3d242386b"} = "MPLv1.1"; | ||
107 | $licenses{"bf50bac24e7ec325dbb09c6b6c4dcc88a7d79e8f"} = "LGPLv2"; | ||
108 | $licenses{"caeb68c46fa36651acf592771d09de7937926bb3"} = "LGPLv2.1"; | ||
109 | $licenses{"dfac199a7539a404407098a2541b9482279f690d"} = "GPLv2"; | ||
110 | $licenses{"e60c2e780886f95df9c9ee36992b8edabec00bcc"} = "LGPLv2.1"; | ||
111 | $licenses{"c931aad3017d975b7f20666cde0953234a9efde3"} = "GPLv2"; | ||
112 | } | ||
113 | |||
114 | sub guess_license_from_file { | ||
115 | my ($copying) = @_; | ||
116 | |||
117 | if (!-e $copying) { | ||
118 | return; | ||
119 | } | ||
120 | |||
121 | my $sha1output = `sha1sum $copying`; | ||
122 | $sha1output =~ /^([a-zA-Z0-9]*) /; | ||
123 | my $sha1 = $1; | ||
124 | |||
125 | chomp($sha1); | ||
126 | |||
127 | # | ||
128 | # if sha1 matches.. push there result | ||
129 | # | ||
130 | if (defined($licenses{$sha1})) { | ||
131 | my $lic = $licenses{$sha1}; | ||
132 | push(@license, $lic); | ||
133 | |||
134 | my $md5output = `md5sum $copying`; | ||
135 | $md5output =~ /^([a-zA-Z0-9]*) /; | ||
136 | my $md5 = $1; | ||
137 | chomp($md5); | ||
138 | $lic_files{$copying} = $md5 | ||
139 | } | ||
140 | |||
141 | # | ||
142 | # if file is found, and licence of python | ||
143 | # package is already aquired, add file. | ||
144 | # | ||
145 | if ($python == 1 && @license != 0) { | ||
146 | my $md5output = `md5sum $copying`; | ||
147 | $md5output =~ /^([a-zA-Z0-9]*) /; | ||
148 | my $md5 = $1; | ||
149 | chomp($md5); | ||
150 | $lic_files{$copying} = $md5 | ||
151 | } | ||
152 | |||
153 | # | ||
154 | # We also must make sure that the COPYING/etc files | ||
155 | # end up in the main package as %doc.. | ||
156 | # | ||
157 | $copying =~ s/$fulldir//g; | ||
158 | $copying =~ s/^\///g; | ||
159 | $copying = "\"\%doc " . $copying ."\""; | ||
160 | |||
161 | push(@mainfiles, $copying); | ||
162 | } | ||
163 | |||
164 | sub print_license | ||
165 | { | ||
166 | my $count = @license; | ||
167 | if ($count == 0) { | ||
168 | print OUTFILE "License: TO BE FILLED IN\n"; | ||
169 | return; | ||
170 | } | ||
171 | |||
172 | # remove dupes | ||
173 | undef %saw; | ||
174 | @saw{@license} = (); | ||
175 | @out = sort keys %saw; | ||
176 | |||
177 | print OUTFILE "License : "; | ||
178 | foreach (@out) { | ||
179 | print OUTFILE "$_ "; | ||
180 | } | ||
181 | print OUTFILE "\n"; | ||
182 | } | ||
183 | |||
184 | # end of license section | ||
185 | # | ||
186 | ####################################################################### | ||
187 | |||
188 | ###################################################################### | ||
189 | # | ||
190 | # Package group management | ||
191 | # | ||
192 | # We set up an associative array of regexp patterns, where the content | ||
193 | # of the array is the name of the group. | ||
194 | # | ||
195 | # These are "strings of regexps", which means one needs to escape | ||
196 | # everything, and if you want the actual regexp to have a \, | ||
197 | # it needs to be a \\ in this string. | ||
198 | |||
199 | my %group_patterns; | ||
200 | my @groups; | ||
201 | my $group = "TO_BE/FILLED_IN"; | ||
202 | |||
203 | sub setup_group_rules | ||
204 | { | ||
205 | $group_patterns{"^\\/usr\\/lib\\/.*so"} = "System/Libraries"; | ||
206 | $group_patterns{"^\\/lib\\/.*so"} = "System/Libraries"; | ||
207 | $group_patterns{"^\\/bin\\/.*"} = "Applications/System"; | ||
208 | $group_patterns{"^\\/sbin\\/.*"} = "Applications/System"; | ||
209 | $group_patterns{"^\\/usr\\/sbin\\/.*"} = "Applications/System"; | ||
210 | } | ||
211 | |||
212 | sub guess_group_from_file | ||
213 | { | ||
214 | my ($filename) = @_; | ||
215 | while (($key,$value) = each %group_patterns) { | ||
216 | if ($filename =~ /$key/) { | ||
217 | push(@groups, $value); | ||
218 | } | ||
219 | } | ||
220 | |||
221 | } | ||
222 | |||
223 | # end of group section | ||
224 | # | ||
225 | ###################################################################### | ||
226 | |||
227 | |||
228 | ###################################################################### | ||
229 | # | ||
230 | # Files and package section | ||
231 | # | ||
232 | # This section creates the %files section, but also decides which | ||
233 | # subpackages (devel and/or doc) we need to have. | ||
234 | # | ||
235 | # We start out with the @allfiles array, which will contain all the | ||
236 | # files installed by the %build phase of the package. The task is | ||
237 | # to sort these into @mainfiles, @develfiles and @docfiles. | ||
238 | # In addition, an attempt is made to compress the files list by | ||
239 | # replacing full filenames with "*" patterns. | ||
240 | # | ||
241 | # For this we use a set of regexps from the @files_match array, | ||
242 | # which are then used as index to three associative arrays: | ||
243 | # %files_target : numerical index for which package the regexp | ||
244 | # would place the file at hand. | ||
245 | # 0 - main package | ||
246 | # 1 - devel package | ||
247 | # 2 - doc package | ||
248 | # 99 - don't package this at all | ||
249 | # | ||
250 | # %files_from: regexp to match the file against for filename-wildcarding | ||
251 | # %files_to : pattern to append to the ()'d part of %files_from to end up | ||
252 | # with the filename-wildcard. | ||
253 | |||
254 | my @allfiles; | ||
255 | my @develfiles; | ||
256 | my @docfiles; | ||
257 | |||
258 | |||
259 | my @files_match; | ||
260 | my %files_target; | ||
261 | my %files_from; | ||
262 | my %files_to; | ||
263 | |||
264 | my $totaldocs = 0; | ||
265 | |||
266 | |||
267 | sub add_files_rule | ||
268 | { | ||
269 | my ($match, $target, $from, $to) =@_; | ||
270 | push(@files_match, $match); | ||
271 | $files_target{"$match"} = $target; | ||
272 | |||
273 | if (length($from) > 0) { | ||
274 | $files_from{"$match"} = $from; | ||
275 | } | ||
276 | |||
277 | if (length($to) > 0) { | ||
278 | $files_to{"$match"} = $to; | ||
279 | } | ||
280 | } | ||
281 | |||
282 | sub setup_files_rules | ||
283 | { | ||
284 | |||
285 | # | ||
286 | # Files for the Main package | ||
287 | # | ||
288 | |||
289 | add_files_rule("^\\/usr\\/lib\\/[a-z0-9A-Z\\_\\-\\.]+\\.so\\.", 0, | ||
290 | "(\\/usr\\/lib\\/.*\\.so\\.).*", "\*"); | ||
291 | |||
292 | |||
293 | add_files_rule("^\\/usr\\/share\\/omf\\/", 0, | ||
294 | "(\\/usr\\/share\\/omf\\/.*?\\/).*", "\*"); | ||
295 | |||
296 | # | ||
297 | # Files for the Devel subpackage | ||
298 | # | ||
299 | add_files_rule("^\\/usr\\/share\\/gir-1\\.0\\/[a-z0-9A-Z\\_\\-\\.]+\\.gir\$", 1, | ||
300 | "(\\/usr\\/share\\/gir-1\\.0\/).*", "\*\.gir"); | ||
301 | add_files_rule("^\\/usr\\/lib\\/girepository-1\\.0\\/[a-z0-9A-Z\\_\\-\\.]+\\.typelib\$", 1, | ||
302 | "(\\/usr\\/lib\\/girepository-1\\.0\/).*", "\*\.typelib"); | ||
303 | add_files_rule("^\\/usr\\/include\\/[a-z0-9A-Z\\_\\-\\.]+\\.h\$", 1, | ||
304 | "(\\/usr\\/include\/).*", "\*\.h"); | ||
305 | add_files_rule("^\\/usr\\/include\\/[a-z0-9A-Z\\_\\-\\.]+\\/.*?\\.h\$", 1, | ||
306 | "(\\/usr\\/include\\/[a-z0-9A-Z\\_\\-\\.]+\\/.*?)[a-z0-9A-Z\\_\\-\\.]+\\.h", "\*\.h"); | ||
307 | add_files_rule("^\\/usr\\/lib\\/[a-z0-9A-Z\\_\\-\\.]+\\.so\$", 1, | ||
308 | "(\\/usr\\/lib\\/).*\\.so\$", "\*.so"); | ||
309 | add_files_rule("^\\/usr\\/lib\\/pkgconfig\\/[a-z0-9A-Z\\_\\-\\.\+]+\\.pc\$", 1, | ||
310 | "(\\/usr\\/lib\\/pkgconfig\\/).*\\.pc\$", "\*.pc"); | ||
311 | add_files_rule("^\\/usr\\/share\\/aclocal", 1, "", ""); | ||
312 | add_files_rule("^\\/usr\\/lib\\/qt4\\/mkspecs/", 1, "", ""); | ||
313 | |||
314 | |||
315 | |||
316 | |||
317 | # | ||
318 | # Files for the documentation subpackage | ||
319 | # | ||
320 | add_files_rule("^\\/usr\\/share\\/gtk\-doc\\/html\\/[a-z0-9A-Z\\_\\-\\.]+\\/.\*", 2, | ||
321 | "(\\/usr\\/share\\/gtk\-doc\\/html\\/[a-z0-9A-Z\\_\\-\\.]+\\/).\*", "\*"); | ||
322 | add_files_rule("^\\/usr\\/share\\/doc\\/[a-zA-Z0-9\-]*", 2, | ||
323 | "(\\/usr\\/share\\/doc\\/[a-zA-Z0-9\-]+\\/).*", "\*"); | ||
324 | add_files_rule("^\\/usr\\/share\\/man\\/man[0-9]\\/[a-zA-Z0-9\-]*", 2, | ||
325 | "(\\/usr\\/share\\/man\\/man[0-9]\\/[a-zA-Z0-9\-]+\\/).*", "\*"); | ||
326 | add_files_rule("^\\/usr\\/share\\/gnome\\/help\\/", 2, | ||
327 | "(\\/usr\\/share\\/gnome\\/help\\/.*?\\/.*?\\/).*", "\*"); | ||
328 | |||
329 | |||
330 | # | ||
331 | # Files to just not package at all (picked up by other things) | ||
332 | # | ||
333 | add_files_rule("^\\/usr\\/share\\/locale", 99, "", ""); | ||
334 | # compiled python things will get auto cleaned by rpm | ||
335 | # add_files_rule("\.pyo\$", 99, "", ""); | ||
336 | # add_files_rule("\.pyc\$", 99, "", ""); | ||
337 | |||
338 | } | ||
339 | |||
340 | sub apply_files_rules | ||
341 | { | ||
342 | my $filenumber = @allfiles; | ||
343 | |||
344 | if ($filenumber == 0) { | ||
345 | return; | ||
346 | } | ||
347 | |||
348 | while (@allfiles > 0) { | ||
349 | my $filename = $allfiles[0]; | ||
350 | my $destname = $filename; | ||
351 | my $handled = 0; | ||
352 | |||
353 | # | ||
354 | # while we're here, try to guess what group our package is | ||
355 | # | ||
356 | guess_group_from_file($filename); | ||
357 | |||
358 | foreach (@files_match) { | ||
359 | my $match = $_; | ||
360 | |||
361 | if ($filename =~ /$match/) { | ||
362 | # | ||
363 | # First try to see if we can turn the full filename into a | ||
364 | # wildcard based filename | ||
365 | # | ||
366 | if (defined($files_from{$match}) && defined($files_to{$match})) { | ||
367 | $from = $files_from{$match}; | ||
368 | $to = $files_to{$match}; | ||
369 | $destname =~ s/$from/$1$to/; | ||
370 | # print "changing $filename to $destname\n"; | ||
371 | } | ||
372 | |||
373 | # devel package | ||
374 | if ($files_target{$match} == 1) { | ||
375 | $handled = 1; | ||
376 | push(@develfiles, $destname); | ||
377 | } | ||
378 | # doc rules.. also prepend %doc | ||
379 | if ($files_target{$match} == 2) { | ||
380 | $handled = 1; | ||
381 | $destname = "\"%doc " . $destname . "\""; | ||
382 | push(@docfiles, $destname); | ||
383 | $totaldocs = $totaldocs + 1; | ||
384 | } | ||
385 | # don't package | ||
386 | if ($files_target{$match} == 99) { | ||
387 | $handled = 1; | ||
388 | if ($filename =~ /\/usr\/share\/locale\/.*?\/LC_MESSAGES\/(.*)\.mo/) { | ||
389 | $localename = $1; | ||
390 | } | ||
391 | } | ||
392 | } | ||
393 | } | ||
394 | |||
395 | |||
396 | # | ||
397 | # if the destination name contains our package version, | ||
398 | # use %version instead for future maintenance | ||
399 | # | ||
400 | $destname =~ s/$version/\%\{version\}/g; | ||
401 | if ($handled == 0) { | ||
402 | push(@mainfiles, $destname); | ||
403 | } | ||
404 | shift(@allfiles); | ||
405 | } | ||
406 | |||
407 | # | ||
408 | # Now.. if we have less than 5 documentation files, just stick them in the main package | ||
409 | # | ||
410 | |||
411 | $filenumber = @docfiles; | ||
412 | |||
413 | if ($filenumber <= 5) { | ||
414 | while (@docfiles > 0) { | ||
415 | my $filename = $docfiles[0]; | ||
416 | |||
417 | push(@mainfiles, $filename); | ||
418 | shift(@docfiles); | ||
419 | } | ||
420 | } | ||
421 | |||
422 | } | ||
423 | |||
424 | sub print_files | ||
425 | { | ||
426 | my $count = @mainfiles; | ||
427 | if ($count == 0) { | ||
428 | return; | ||
429 | } | ||
430 | |||
431 | # remove dupes | ||
432 | undef %saw; | ||
433 | @saw{@mainfiles} = (); | ||
434 | @out = sort keys %saw; | ||
435 | |||
436 | print OUTFILE "Files:\n"; | ||
437 | foreach (@out) { | ||
438 | print OUTFILE " - $_\n"; | ||
439 | } | ||
440 | } | ||
441 | |||
442 | sub print_devel | ||
443 | { | ||
444 | my $count = @develfiles; | ||
445 | if ($count == 0) { | ||
446 | return; | ||
447 | } | ||
448 | print OUTFILE "SubPackages:\n"; | ||
449 | $printed_subpackages = 1; | ||
450 | print OUTFILE " - Name: devel\n"; | ||
451 | print OUTFILE " Summary: Development components for the $name package\n"; | ||
452 | print OUTFILE " Group: Development/Libraries\n"; | ||
453 | print OUTFILE " Description:\n"; | ||
454 | print OUTFILE " - Development files for the $name package\n"; | ||
455 | |||
456 | # remove dupes | ||
457 | undef %saw; | ||
458 | @saw{@develfiles} = (); | ||
459 | @out = sort keys %saw; | ||
460 | |||
461 | print OUTFILE " Files:\n"; | ||
462 | foreach (@out) { | ||
463 | print OUTFILE " - $_\n"; | ||
464 | } | ||
465 | } | ||
466 | |||
467 | sub print_doc | ||
468 | { | ||
469 | my $count = @docfiles; | ||
470 | if ($count == 0) { | ||
471 | return; | ||
472 | } | ||
473 | if ($printed_subpackages == 0) { | ||
474 | print OUTFILE "SubPackages:\n"; | ||
475 | $printed_subpackages = 1; | ||
476 | } | ||
477 | print OUTFILE " - Name: docs\n"; | ||
478 | print OUTFILE " Summary: Documentation components for the $name package\n"; | ||
479 | print OUTFILE " Group: Documentation\n"; | ||
480 | |||
481 | # remove dupes | ||
482 | undef %saw; | ||
483 | @saw{@docfiles} = (); | ||
484 | @out = sort keys %saw; | ||
485 | |||
486 | print OUTFILE " Files:\n"; | ||
487 | foreach (@out) { | ||
488 | print OUTFILE " - $_\n"; | ||
489 | } | ||
490 | } | ||
491 | |||
492 | |||
493 | # end of %files section | ||
494 | # | ||
495 | ###################################################################### | ||
496 | |||
497 | |||
498 | ###################################################################### | ||
499 | # | ||
500 | # What we can learn from configure.ac/configure | ||
501 | # | ||
502 | # - pkgconfig requirements | ||
503 | # - regular build requirements | ||
504 | # - package name / version | ||
505 | |||
506 | |||
507 | sub setup_pkgconfig_ban | ||
508 | { | ||
509 | push(@banned_pkgconfig, "^dnl\$"); | ||
510 | push(@banned_pkgconfig, "^hal\$"); # we don't have nor want HAL | ||
511 | push(@banned_pkgconfig, "tslib-0.0"); # we don't want tslib-0.0 (legacy touchscreen interface) | ||
512 | push(@banned_pkgconfig, "intel-gen4asm"); | ||
513 | push(@banned_pkgconfig, "^xp\$"); # xprint - deprecated and not in meego | ||
514 | push(@banned_pkgconfig, "^directfb\$"); # we use X, not directfb | ||
515 | push(@banned_pkgconfig, "^gtkmm-2.4\$"); # we use X, not directfb | ||
516 | push(@banned_pkgconfig, "^evil\$"); | ||
517 | push(@banned_pkgconfig, "^directfb"); | ||
518 | push(@banned_pkgconfig, "^sdl "); | ||
519 | |||
520 | |||
521 | } | ||
522 | |||
523 | sub setup_failed_commands | ||
524 | { | ||
525 | $failed_commands{"doxygen"} = "doxygen"; | ||
526 | $failed_commands{"scrollkeeper-config"} = "rarian-compat"; | ||
527 | $failed_commands{"dot"} = "graphviz"; | ||
528 | $failed_commands{"flex"} = "flex"; | ||
529 | $failed_commands{"lex"} = "flex"; | ||
530 | $failed_commands{"freetype-config"} = "freetype-devel"; | ||
531 | $failed_commands{"makeinfo"} = "texinfo"; | ||
532 | $failed_commands{"desktop-file-install"} = "desktop-file-utils"; | ||
533 | $failed_commands{"deflateBound in -lz"} = "zlib-devel"; | ||
534 | $failed_commands{"gconftool-2"} = "GConf-dbus"; | ||
535 | $failed_commands{"jpeglib.h"} = "libjpeg-devel"; | ||
536 | $failed_commands{"expat.h"} = "expat-devel"; | ||
537 | $failed_commands{"bison"} = "bison"; | ||
538 | $failed_commands{"msgfmt"} = "gettext"; | ||
539 | $failed_commands{"curl-config"} = "libcurl-devel"; | ||
540 | $failed_commands{"doxygen"} = "doxygen"; | ||
541 | $failed_commands{"X"} = "pkgconfig(x11)"; | ||
542 | |||
543 | $failed_commands{"gawk"} = "gawk"; | ||
544 | $failed_commands{"xbkcomp"} = "xkbcomp"; | ||
545 | $failed_commands{"Vorbis"} = "libvorbis-devel"; | ||
546 | # checking Expat 1.95.x... no | ||
547 | $failed_commands{"Expat 1.95.x"} = "expat-devel"; | ||
548 | $failed_commands{"xml2-config path"} = "libxml2-devel"; | ||
549 | |||
550 | $failed_libs{"-lz"} = "zlib-devel"; | ||
551 | $failed_libs{"-lncursesw"} = "ncurses-devel"; | ||
552 | $failed_libs{"-ltiff"} = "libtiff-devel"; | ||
553 | $failed_libs{"-lasound"} = "alsa-lib-devel"; | ||
554 | $failed_libs{"Curses"} = "ncurses-devel"; | ||
555 | |||
556 | $failed_headers{"X11/extensions/randr.h"} = "xrandr"; | ||
557 | $failed_headers{"X11/Xlib.h"} = "x11"; | ||
558 | $failed_headers{"X11/extensions/XShm.h"} = "xext"; | ||
559 | $failed_headers{"X11/extensions/shape.h"} = "xext"; | ||
560 | $failed_headers{"ncurses.h"} = "ncursesw"; | ||
561 | $failed_headers{"curses.h"} = "ncursesw"; | ||
562 | $failed_headers{"pci/pci.h"} = "libpci"; | ||
563 | $failed_headers{"xf86.h"} = "xorg-server"; | ||
564 | $failed_headers{"sqlite.h"} = "sqlite3"; | ||
565 | |||
566 | $failed_headers{"X11/extensions/XIproto.h"} = "xi"; | ||
567 | $failed_headers{"QElapsedTimer"} = ""; | ||
568 | } | ||
569 | |||
570 | |||
571 | |||
572 | my @package_configs; | ||
573 | my @buildreqs; | ||
574 | my $uses_configure = 0; | ||
575 | |||
576 | |||
577 | sub push_pkgconfig_buildreq | ||
578 | { | ||
579 | my ($pr) = @_; | ||
580 | |||
581 | $pr =~ s/\s+//g; | ||
582 | |||
583 | # remove collateral ] ) etc damage in the string | ||
584 | $pr =~ s/\"//g; | ||
585 | $pr =~ s/\)//g; | ||
586 | $pr =~ s/\]//g; | ||
587 | $pr =~ s/\[//g; | ||
588 | |||
589 | |||
590 | # first, undo the space packing | ||
591 | |||
592 | $pr =~ s/\>\=/ \>\= /g; | ||
593 | $pr =~ s/\<\=/ \<\= /g; | ||
594 | |||
595 | $pr =~ s/\<1.1.1/ /g; | ||
596 | |||
597 | # don't show configure variables, we can't deal with them | ||
598 | if ($pr =~ /^\$/) { | ||
599 | return; | ||
600 | } | ||
601 | if ($pr =~ /AC_SUBST/) { | ||
602 | return; | ||
603 | } | ||
604 | |||
605 | |||
606 | |||
607 | |||
608 | # process banned pkgconfig options for things that we don't | ||
609 | # have or don't want. | ||
610 | |||
611 | |||
612 | # remore versions that are macros or strings, not numbers | ||
613 | $pr =~ s/\s\>\= \$.*//g; | ||
614 | |||
615 | $pr =~ s/\s\>\= [a-zA-Z]+.*//g; | ||
616 | |||
617 | # don't show configure variables, we can't deal with them | ||
618 | if ($pr =~ /\$/) { | ||
619 | return; | ||
620 | } | ||
621 | |||
622 | foreach (@banned_pkgconfig) { | ||
623 | my $ban = $_; | ||
624 | if ($pr =~ /$ban/) { | ||
625 | return; | ||
626 | } | ||
627 | } | ||
628 | |||
629 | push(@package_configs, $pr); | ||
630 | } | ||
631 | |||
632 | # | ||
633 | # detect cases where we require both a generic pkgconfig, and a version specific | ||
634 | # case | ||
635 | # | ||
636 | sub uniquify_pkgconfig | ||
637 | { | ||
638 | # first remove real dupes | ||
639 | undef %saw; | ||
640 | @saw{@package_configs} = (); | ||
641 | @out = sort keys %saw; | ||
642 | |||
643 | my $count = 0; | ||
644 | |||
645 | while ($count < @out) { | ||
646 | |||
647 | my $entry = $out[$count]; | ||
648 | |||
649 | foreach(@out) { | ||
650 | my $compare = $_; | ||
651 | if ($entry eq $compare) { | ||
652 | next; | ||
653 | } | ||
654 | |||
655 | $compare =~ s/ \>\=.*//g; | ||
656 | if ($entry eq $compare) { | ||
657 | $out[$count] = ""; | ||
658 | } | ||
659 | } | ||
660 | $count = $count + 1; | ||
661 | } | ||
662 | @package_configs = @out; | ||
663 | } | ||
664 | |||
665 | |||
666 | sub process_configure_ac | ||
667 | { | ||
668 | my ($filename) = @_; | ||
669 | my $line = ""; | ||
670 | my $depth = 0; | ||
671 | my $keepgoing = 1; | ||
672 | my $buffer = ""; | ||
673 | |||
674 | if (!-e $filename) { | ||
675 | return; | ||
676 | } | ||
677 | |||
678 | $uses_configure = 1; | ||
679 | |||
680 | |||
681 | |||
682 | open(CONFIGURE, "$filename") || die "Couldn't open $filename\n"; | ||
683 | seek(CONFIGURE, 0,0) or die "seek : $!"; | ||
684 | while ($keepgoing && !eof(CONFIGURE)) { | ||
685 | $buffer = getc(CONFIGURE); | ||
686 | |||
687 | if ($buffer eq "(") { | ||
688 | $depth = $depth + 1; | ||
689 | } | ||
690 | if ($buffer eq ")" && $depth > 0) { | ||
691 | $depth = $depth - 1; | ||
692 | } | ||
693 | |||
694 | if (!($buffer eq "\n")) { | ||
695 | $line = $line . $buffer; | ||
696 | } | ||
697 | |||
698 | if (!($buffer eq "\n") || $depth > 0) { | ||
699 | redo unless eof(CONFIGURE); | ||
700 | } | ||
701 | |||
702 | if ($line =~ /PKG_CHECK_MODULES\((.*)\)/) { | ||
703 | my $match = $1; | ||
704 | $match =~ s/\s+/ /g; | ||
705 | $match =~ s/, /,/g; | ||
706 | my @pkgs = split(/,/, $match); | ||
707 | my $pkg; | ||
708 | if (defined($pkgs[1])) { | ||
709 | $pkg = $pkgs[1]; | ||
710 | } else { | ||
711 | next; | ||
712 | } | ||
713 | if ($pkg =~ /\[(.*)\]/) { | ||
714 | $pkg = $1; | ||
715 | } | ||
716 | |||
717 | $pkg =~ s/\s+/ /g; | ||
718 | # deal with versioned pkgconfig's by removing the spaces around >= 's | ||
719 | $pkg =~ s/\>\=\s/\>\=/g; | ||
720 | $pkg =~ s/\s\>\=/\>\=/g; | ||
721 | $pkg =~ s/\=\s/\=/g; | ||
722 | $pkg =~ s/\s\=/\=/g; | ||
723 | $pkg =~ s/\<\=\s/\<\=/g; | ||
724 | $pkg =~ s/\<\s/\</g; | ||
725 | $pkg =~ s/\s\<\=/\<\=/g; | ||
726 | $pkg =~ s/\s\</\</g; | ||
727 | |||
728 | @words = split(/ /, $pkg); | ||
729 | foreach(@words) { | ||
730 | push_pkgconfig_buildreq($_); | ||
731 | } | ||
732 | } | ||
733 | |||
734 | if ($line =~ /PKG_CHECK_EXISTS\((.*)\)/) { | ||
735 | my $match = $1; | ||
736 | $match =~ s/\s+/ /g; | ||
737 | $match =~ s/, /,/g; | ||
738 | my @pkgs = split(/,/, $match); | ||
739 | my $pkg = $pkgs[0]; | ||
740 | if ($pkg =~ /\[(.*)\]/) { | ||
741 | $pkg = $1; | ||
742 | } | ||
743 | |||
744 | $pkg =~ s/\s+/ /g; | ||
745 | # deal with versioned pkgconfig's by removing the spaces around >= 's | ||
746 | $pkg =~ s/\>\=\s/\>\=/g; | ||
747 | $pkg =~ s/\s\>\=/\>\=/g; | ||
748 | $pkg =~ s/\<\=\s/\<\=/g; | ||
749 | $pkg =~ s/\<\s/\</g; | ||
750 | $pkg =~ s/\s\<\=/\<\=/g; | ||
751 | $pkg =~ s/\s\</\</g; | ||
752 | $pkg =~ s/\=\s/\=/g; | ||
753 | $pkg =~ s/\s\=/\=/g; | ||
754 | |||
755 | @words = split(/ /, $pkg); | ||
756 | foreach(@words) { | ||
757 | push_pkgconfig_buildreq($_); | ||
758 | } | ||
759 | } | ||
760 | |||
761 | if ($line =~ /XDT_CHECK_PACKAGE\(.*?,.*?\[(.*?)\].*\)/) { | ||
762 | my $pkg = $1; | ||
763 | |||
764 | $pkg =~ s/\s+/ /g; | ||
765 | # deal with versioned pkgconfig's by removing the spaces around >= 's | ||
766 | $pkg =~ s/\>\=\s/\>\=/g; | ||
767 | $pkg =~ s/\s\>\=/\>\=/g; | ||
768 | $pkg =~ s/\=\s/\=/g; | ||
769 | $pkg =~ s/\s\=/\=/g; | ||
770 | |||
771 | @words = split(/ /, $pkg); | ||
772 | foreach(@words) { | ||
773 | push_pkgconfig_buildreq($_); | ||
774 | } | ||
775 | } | ||
776 | |||
777 | if ($line =~ /XDT_CHECK_OPTIONAL_PACKAGE\(.*?,.*?\[(.*?)\].*\)/) { | ||
778 | my $pkg = $1; | ||
779 | |||
780 | $pkg =~ s/\s+/ /g; | ||
781 | # deal with versioned pkgconfig's by removing the spaces around >= 's | ||
782 | $pkg =~ s/\>\=\s/\>\=/g; | ||
783 | $pkg =~ s/\s\>\=/\>\=/g; | ||
784 | $pkg =~ s/\=\s/\=/g; | ||
785 | $pkg =~ s/\s\=/\=/g; | ||
786 | |||
787 | @words = split(/ /, $pkg); | ||
788 | foreach(@words) { | ||
789 | push_pkgconfig_buildreq($_); | ||
790 | } | ||
791 | } | ||
792 | |||
793 | if ($line =~ /AC_CHECK_LIB\(\[expat\]/) { | ||
794 | push(@buildreqs, "expat-devel"); | ||
795 | } | ||
796 | if ($line =~ /AC_CHECK_FUNC\(\[tgetent\]/) { | ||
797 | push(@buildreqs, "ncurses-devel"); | ||
798 | } | ||
799 | if ($line =~ /_PROG_INTLTOOL/) { | ||
800 | push(@buildreqs, "intltool"); | ||
801 | } | ||
802 | if ($line =~ /GETTEXT_PACKAGE/) { | ||
803 | push(@buildreqs, "gettext"); | ||
804 | } | ||
805 | if ($line =~ /GTK_DOC_CHECK/) { | ||
806 | push_pkgconfig_buildreq("gtk-doc"); | ||
807 | } | ||
808 | if ($line =~ /GNOME_DOC_INIT/) { | ||
809 | push(@buildreqs, "gnome-doc-utils"); | ||
810 | } | ||
811 | if ($line =~ /AM_GLIB_GNU_GETTEXT/) { | ||
812 | push(@buildreqs, "gettext"); | ||
813 | } | ||
814 | |||
815 | if ($line =~ /AC_INIT\((.*)\)/) { | ||
816 | my $match = $1; | ||
817 | $match =~ s/\s+/ /g; | ||
818 | @acinit = split(/,/, $match); | ||
819 | # $name = $acinit[0]; | ||
820 | |||
821 | if ($name =~ /\[(.*)\]/) { | ||
822 | # $name = $1; | ||
823 | } | ||
824 | |||
825 | if (defined($acinit[3])) { | ||
826 | # $name = $acinit[3]; | ||
827 | if ($name =~ /\[(.*)\]/) { | ||
828 | # $name = $1; | ||
829 | } | ||
830 | } | ||
831 | if (defined($acinit[1]) and $version eq $predef_version) { | ||
832 | my $ver = $acinit[1]; | ||
833 | $ver =~ s/\[//g; | ||
834 | $ver =~ s/\]//g; | ||
835 | if ($ver =~ /\$/){} else { | ||
836 | $version = $ver; | ||
837 | $version =~ s/\s+//g; | ||
838 | } | ||
839 | } | ||
840 | } | ||
841 | if ($line =~ /AM_INIT_AUTOMAKE\((.*)\)/) { | ||
842 | my $match = $1; | ||
843 | $match =~ s/\s+/ /g; | ||
844 | @acinit = split(/,/, $match); | ||
845 | # $name = $acinit[0]; | ||
846 | |||
847 | if ($name =~ /\[(.*)\]/) { | ||
848 | # $name = $1; | ||
849 | } | ||
850 | |||
851 | if (defined($acinit[3])) { | ||
852 | # $name = $acinit[3]; | ||
853 | if ($name =~ /\[(.*)\]/) { | ||
854 | # $name = $1; | ||
855 | } | ||
856 | } | ||
857 | if (defined($acinit[1]) and $version eq $predef_version) { | ||
858 | my $ver = $acinit[1]; | ||
859 | $ver =~ s/\[//g; | ||
860 | $ver =~ s/\]//g; | ||
861 | if ($ver =~ /\$/){} else { | ||
862 | $version = $ver; | ||
863 | $version =~ s/\s+//g; | ||
864 | } | ||
865 | } | ||
866 | } | ||
867 | |||
868 | $line = ""; | ||
869 | } | ||
870 | close(CONFIGURE); | ||
871 | } | ||
872 | |||
873 | sub process_qmake_pro | ||
874 | { | ||
875 | my ($filename) = @_; | ||
876 | my $line = ""; | ||
877 | my $depth = 0; | ||
878 | my $keepgoing = 1; | ||
879 | my $buffer = ""; | ||
880 | my $prev_char = ""; | ||
881 | |||
882 | if (!-e $filename) { | ||
883 | return; | ||
884 | } | ||
885 | |||
886 | |||
887 | open(CONFIGURE, "$filename") || die "Couldn't open $filename\n"; | ||
888 | seek(CONFIGURE, 0,0) or die "seek : $!"; | ||
889 | while ($keepgoing && !eof(CONFIGURE)) { | ||
890 | $buffer = getc(CONFIGURE); | ||
891 | |||
892 | if ($buffer eq "(") { | ||
893 | $depth = $depth + 1; | ||
894 | } | ||
895 | if ($buffer eq ")" && $depth > 0) { | ||
896 | $depth = $depth - 1; | ||
897 | } | ||
898 | |||
899 | if (!($buffer eq "\n")) { | ||
900 | $line = $line . $buffer; | ||
901 | } | ||
902 | |||
903 | if (!($buffer eq "\n") || ($prev_char eq "\\") ) { | ||
904 | $prev_char = $buffer; | ||
905 | redo unless eof(CONFIGURE); | ||
906 | } | ||
907 | $prev_char = " "; | ||
908 | |||
909 | if ($line =~ /PKGCONFIG.*?\=(.*)/) { | ||
910 | my $l = $1; | ||
911 | my @pkgs; | ||
912 | |||
913 | $l =~ s/\\//g; | ||
914 | $l =~ s/\s/ /g; | ||
915 | @pkgs = split(/ /, $l); | ||
916 | foreach (@pkgs) { | ||
917 | if (length($_)>1) { | ||
918 | push_pkgconfig_buildreq($_); | ||
919 | } | ||
920 | } | ||
921 | } | ||
922 | |||
923 | $line = ""; | ||
924 | } | ||
925 | close(CONFIGURE); | ||
926 | } | ||
927 | |||
928 | # | ||
929 | # We also check configure if it exists, it's nice for some things | ||
930 | # because various configure.ac macros have been expanded for us already. | ||
931 | # | ||
932 | sub process_configure | ||
933 | { | ||
934 | my ($filename) = @_; | ||
935 | my $line = ""; | ||
936 | my $depth = 0; | ||
937 | my $keepgoing = 1; | ||
938 | |||
939 | if (!-e $filename) { | ||
940 | return; | ||
941 | } | ||
942 | |||
943 | $uses_configure = 1; | ||
944 | |||
945 | open(CONFIGURE, "$filename") || die "Couldn't open $filename\n"; | ||
946 | seek(CONFIGURE, 0,0) or die "seek : $!"; | ||
947 | while ($keepgoing && !eof(CONFIGURE)) { | ||
948 | $buffer = getc(CONFIGURE); | ||
949 | |||
950 | if ($buffer eq "(") { | ||
951 | $depth = $depth + 1; | ||
952 | } | ||
953 | if ($buffer eq ")" && $depth > 0) { | ||
954 | $depth = $depth - 1; | ||
955 | } | ||
956 | |||
957 | if (!($buffer eq "\n")) { | ||
958 | $line = $line . $buffer; | ||
959 | } | ||
960 | |||
961 | if (!($buffer eq "\n") || $depth > 0) { | ||
962 | redo unless eof(CONFIGURE); | ||
963 | } | ||
964 | |||
965 | |||
966 | |||
967 | if ($line =~ /^PACKAGE_NAME=\'(.*?)\'/) { | ||
968 | $name = $1; | ||
969 | } | ||
970 | if ($line =~ /^PACKAGE_TARNAME=\'(.*?)\'/) { | ||
971 | $name = $1; | ||
972 | } | ||
973 | if ($line =~ /^PACKAGE_VERSION=\'(.*?)\'/) { | ||
974 | $version = $1; | ||
975 | $version =~ s/\s+//g; | ||
976 | } | ||
977 | if ($line =~ /^PACKAGE_URL=\'(.*?)\'/) { | ||
978 | if (length($1) > 2) { | ||
979 | $url = $1; | ||
980 | } | ||
981 | } | ||
982 | |||
983 | |||
984 | $line = ""; | ||
985 | } | ||
986 | close(CONFIGURE); | ||
987 | } | ||
988 | |||
989 | sub print_pkgconfig | ||
990 | { | ||
991 | my $count = @package_configs; | ||
992 | if ($count == 0) { | ||
993 | return; | ||
994 | } | ||
995 | |||
996 | uniquify_pkgconfig(); | ||
997 | |||
998 | print OUTFILE "PkgConfigBR:\n"; | ||
999 | foreach (@out) { | ||
1000 | $line = $_; | ||
1001 | $line =~ s/^\s+//g; | ||
1002 | if (length($line) > 1) { | ||
1003 | print OUTFILE " - $line\n"; | ||
1004 | } | ||
1005 | } | ||
1006 | } | ||
1007 | |||
1008 | sub print_buildreq | ||
1009 | { | ||
1010 | my $count = @buildreqs; | ||
1011 | if ($count == 0) { | ||
1012 | return; | ||
1013 | } | ||
1014 | |||
1015 | # remove dupes | ||
1016 | undef %saw; | ||
1017 | @saw{@buildreqs} = (); | ||
1018 | @out = sort keys %saw; | ||
1019 | |||
1020 | print OUTFILE "PkgBR:\n"; | ||
1021 | foreach (@out) { | ||
1022 | print OUTFILE " - $_\n"; | ||
1023 | } | ||
1024 | } | ||
1025 | |||
1026 | |||
1027 | # end of configure section | ||
1028 | # | ||
1029 | ###################################################################### | ||
1030 | |||
1031 | |||
1032 | ###################################################################### | ||
1033 | # | ||
1034 | # Guessing the Description and Summary for a package | ||
1035 | # | ||
1036 | # We'll look at various sources of information for this: | ||
1037 | # - spec files in the package | ||
1038 | # - debain files in the package | ||
1039 | # - DOAP files in the package | ||
1040 | # - pkgconfig files in the package | ||
1041 | # - the README file in the package | ||
1042 | # - freshmeat.net online | ||
1043 | # | ||
1044 | |||
1045 | sub guess_description_from_spec { | ||
1046 | my ($specfile) = @_; | ||
1047 | |||
1048 | my $state = 0; | ||
1049 | my $cummul = ""; | ||
1050 | |||
1051 | open(SPEC, $specfile); | ||
1052 | while (<SPEC>) { | ||
1053 | my $line = $_; | ||
1054 | if ($state == 1 && $line =~ /^\%/) { | ||
1055 | $state = 2; | ||
1056 | } | ||
1057 | if ($state == 1) { | ||
1058 | $cummul = $cummul . $line; | ||
1059 | } | ||
1060 | if ($state==0 && $line =~ /\%description/) { | ||
1061 | $state = 1; | ||
1062 | } | ||
1063 | |||
1064 | if ($line =~ /Summary:\s*(.*)/ && length($summary) < 2) { | ||
1065 | $summary = $1; | ||
1066 | } | ||
1067 | if ($line =~ /URL:\s*(.*)/ && length($url) < 2) { | ||
1068 | $url = $1; | ||
1069 | } | ||
1070 | } | ||
1071 | close(SPEC); | ||
1072 | if (length($cummul) > 4) { | ||
1073 | $description = $cummul; | ||
1074 | } | ||
1075 | } | ||
1076 | |||
1077 | # | ||
1078 | # DOAP is a project to create an XML/RDF vocabulary to describe software projects, and in particular open source. | ||
1079 | # so if someone ships a .doap file... we can learn from it. | ||
1080 | # | ||
1081 | sub guess_description_from_doap { | ||
1082 | my ($doapfile) = @_; | ||
1083 | |||
1084 | open(DOAP, $doapfile); | ||
1085 | while (<DOAP>) { | ||
1086 | my $line = $_; | ||
1087 | # <shortdesc xml:lang="en">Virtual filesystem implementation for gio</shortdesc> | ||
1088 | if ($line =~ /\<shortdesc .*?\>(.*)\<\/shortdesc\>/) { | ||
1089 | $summary = $1; | ||
1090 | } | ||
1091 | if ($line =~ /\<homepage .*?resource=\"(.*)\"\s*\/>/) { | ||
1092 | $url = $1; | ||
1093 | } | ||
1094 | } | ||
1095 | close(DOAP); | ||
1096 | } | ||
1097 | |||
1098 | # | ||
1099 | # Debian control files have some interesting fields we can glean information | ||
1100 | # from as well. | ||
1101 | # | ||
1102 | sub guess_description_from_debian_control { | ||
1103 | my ($file) = @_; | ||
1104 | |||
1105 | my $state = 0; | ||
1106 | my $cummul = ""; | ||
1107 | |||
1108 | $file = $file . "/debian/control"; | ||
1109 | |||
1110 | open(FILE, $file) || return; | ||
1111 | while (<FILE>) { | ||
1112 | my $line = $_; | ||
1113 | if ($state == 1 && length($line) < 2) { | ||
1114 | $state = 2; | ||
1115 | } | ||
1116 | if ($state == 1) { | ||
1117 | $cummul = $cummul . $line; | ||
1118 | } | ||
1119 | if ($state==0 && $line =~ /\Description: (.*)/) { | ||
1120 | $state = 1; | ||
1121 | $cummul = $1; | ||
1122 | } | ||
1123 | |||
1124 | } | ||
1125 | close(FILE); | ||
1126 | if (length($cummul) > 4) { | ||
1127 | $description = $cummul; | ||
1128 | } | ||
1129 | } | ||
1130 | |||
1131 | # | ||
1132 | # the pkgconfig files have often a one line description | ||
1133 | # of the software... good for Summary | ||
1134 | # | ||
1135 | sub guess_description_from_pkgconfig { | ||
1136 | my ($file) = @_; | ||
1137 | |||
1138 | open(FILE, $file); | ||
1139 | while (<FILE>) { | ||
1140 | my $line = $_; | ||
1141 | |||
1142 | if ($line =~ /Description:\s*(.*)/ && length($summary) < 2) { | ||
1143 | $summary = $1; | ||
1144 | } | ||
1145 | } | ||
1146 | close(FILE); | ||
1147 | } | ||
1148 | |||
1149 | # | ||
1150 | # Freshmeat can provide us with a good one paragraph description | ||
1151 | # of the software.. | ||
1152 | # | ||
1153 | sub guess_description_from_freshmeat { | ||
1154 | my ($tarname) = @_; | ||
1155 | my $cummul = ""; | ||
1156 | my $state = 0; | ||
1157 | open(HTML, "curl -s http://freshmeat.net/projects/$tarname |"); | ||
1158 | while (<HTML>) { | ||
1159 | my $line = $_; | ||
1160 | |||
1161 | if ($state == 1) { | ||
1162 | $cummul = $cummul . $line; | ||
1163 | } | ||
1164 | if ($state == 0 && $line =~ /\<div class\=\"project-detail\"\>/) { | ||
1165 | $state = 1; | ||
1166 | } | ||
1167 | if ($state == 1 && $line =~/\<\/p\>/) { | ||
1168 | $state = 2; | ||
1169 | } | ||
1170 | } | ||
1171 | close(HTML); | ||
1172 | $cummul =~ s/\<p\>//g; | ||
1173 | $cummul =~ s/\r//g; | ||
1174 | $cummul =~ s/\<\/p\>//g; | ||
1175 | $cummul =~ s/^\s*//g; | ||
1176 | if (length($cummul)>10) { | ||
1177 | $description = $cummul; | ||
1178 | } | ||
1179 | } | ||
1180 | # | ||
1181 | # If all else fails, just take the first paragraph of the | ||
1182 | # readme file | ||
1183 | # | ||
1184 | sub guess_description_from_readme { | ||
1185 | my ($file) = @_; | ||
1186 | |||
1187 | my $state = 0; | ||
1188 | my $cummul = ""; | ||
1189 | |||
1190 | open(FILE, $file); | ||
1191 | while (<FILE>) { | ||
1192 | my $line = $_; | ||
1193 | if ($state == 1 && $line =~ /^\n/ && length($cummul) > 80) { | ||
1194 | $state = 2; | ||
1195 | } | ||
1196 | if ($state == 0 && length($line)>1) { | ||
1197 | $state = 1; | ||
1198 | } | ||
1199 | if ($state == 1) { | ||
1200 | $cummul = $cummul . $line; | ||
1201 | } | ||
1202 | if ($line =~ /(http\:\/\/.*$name.*\.org)/) { | ||
1203 | my $u = $1; | ||
1204 | if ($u =~ /bug/ || length($url) > 1) { | ||
1205 | } else { | ||
1206 | $url = $u; | ||
1207 | } | ||
1208 | } | ||
1209 | } | ||
1210 | close(FILE); | ||
1211 | if (length($cummul) > 4 && length($description)<3) { | ||
1212 | $description = $cummul; | ||
1213 | } | ||
1214 | } | ||
1215 | |||
1216 | # | ||
1217 | # Glue all the guesses together | ||
1218 | # | ||
1219 | sub guess_description { | ||
1220 | my ($directory) = @_; | ||
1221 | |||
1222 | |||
1223 | @files = <$directory/README*>; | ||
1224 | foreach (@files) { | ||
1225 | guess_description_from_readme($_); | ||
1226 | } | ||
1227 | |||
1228 | if (length($name)>2) { | ||
1229 | guess_description_from_freshmeat($name); | ||
1230 | } | ||
1231 | |||
1232 | @files = <$directory/*.spec*>; | ||
1233 | foreach (@files) { | ||
1234 | guess_description_from_spec($_); | ||
1235 | } | ||
1236 | |||
1237 | guess_description_from_debian_control($directory); | ||
1238 | |||
1239 | $name =~ s/ //g; | ||
1240 | @files = <$directory/$name.pc*>; | ||
1241 | foreach (@files) { | ||
1242 | guess_description_from_pkgconfig($_); | ||
1243 | } | ||
1244 | @files = <$directory/*.pc.*>; | ||
1245 | foreach (@files) { | ||
1246 | guess_description_from_pkgconfig($_); | ||
1247 | } | ||
1248 | @files = <$directory/*.pc>; | ||
1249 | foreach (@files) { | ||
1250 | guess_description_from_pkgconfig($_); | ||
1251 | } | ||
1252 | @files = <$directory/*.doap>; | ||
1253 | foreach (@files) { | ||
1254 | guess_description_from_doap($_); | ||
1255 | } | ||
1256 | |||
1257 | if (length($summary) < 2) { | ||
1258 | $summary = $description; | ||
1259 | $summary =~ s/\n/ /g; | ||
1260 | $summary =~ s/\s+/ /g; | ||
1261 | if ($summary =~ /(.*?)\./) { | ||
1262 | $summary = $1; | ||
1263 | } | ||
1264 | } | ||
1265 | |||
1266 | } | ||
1267 | |||
1268 | # end of Description / Summary section | ||
1269 | # | ||
1270 | ###################################################################### | ||
1271 | |||
1272 | |||
1273 | |||
1274 | # | ||
1275 | # Build the package, and wait for rpm to complain about unpackaged | ||
1276 | # files.... which we then use as basis for our %files section | ||
1277 | # | ||
1278 | sub guess_files_from_rpmbuild { | ||
1279 | my $infiles = 0; | ||
1280 | open(OUTPUTF, "rpmbuild --nodeps --define \"\%_sourcedir $orgdir \" -ba $name.spec 2>&1 |"); | ||
1281 | while (<OUTPUTF>) { | ||
1282 | my $line2 = $_; | ||
1283 | |||
1284 | if ($infiles == 1 && $line2 =~ /RPM build errors/) { | ||
1285 | $infiles = 2; | ||
1286 | } | ||
1287 | if ($infiles == 1 && $line2 =~ /^Building/) { | ||
1288 | $infiles = 2; | ||
1289 | } | ||
1290 | |||
1291 | if ($infiles == 1) { | ||
1292 | $line2 =~ s/\s*//g; | ||
1293 | push(@allfiles, $line2); | ||
1294 | } | ||
1295 | if ($line2 =~ / Installed \(but unpackaged\) file\(s\) found\:/) { | ||
1296 | $infiles = 1; | ||
1297 | } | ||
1298 | } | ||
1299 | close(OUTPUTF); | ||
1300 | if (@allfiles == 0) { | ||
1301 | print "Build failed ... stopping here.\n"; | ||
1302 | exit(0); | ||
1303 | } | ||
1304 | |||
1305 | } | ||
1306 | |||
1307 | sub guess_files_from_oscbuild { | ||
1308 | my $infiles = 0; | ||
1309 | my $restart = 0; | ||
1310 | my $mustrestart = 0; | ||
1311 | my $rcount = 0; | ||
1312 | my $done_python = 0; | ||
1313 | |||
1314 | system("osc addremove &> /dev/null"); | ||
1315 | system("osc ci -m \"Initial import by autospectacle\" &> /dev/null"); | ||
1316 | |||
1317 | retry: | ||
1318 | if ($restart > 0) { | ||
1319 | write_yaml(); | ||
1320 | print "Restarting the build\n"; | ||
1321 | } | ||
1322 | $restart = 0; | ||
1323 | $infiles = 0; | ||
1324 | $mustrestart = 0; | ||
1325 | open(OUTPUTF, "osc build --no-verify $name.spec 2>&1 |"); | ||
1326 | while (<OUTPUTF>) { | ||
1327 | my $line2 = $_; | ||
1328 | |||
1329 | # print "line is $line2\n"; | ||
1330 | if ($infiles == 1 && $line2 =~ /RPM build errors/) { | ||
1331 | $infiles = 2; | ||
1332 | } | ||
1333 | if ($infiles == 1 && $line2 =~ /^Building/) { | ||
1334 | $infiles = 2; | ||
1335 | } | ||
1336 | if ($infiles == 1) { | ||
1337 | $line2 =~ s/\s*//g; | ||
1338 | push(@allfiles, $line2); | ||
1339 | } | ||
1340 | if ($line2 =~ /No package \'(.*)\' found/) { | ||
1341 | push_pkgconfig_buildreq("$1"); | ||
1342 | $restart = $restart + 1; | ||
1343 | print " Adding pkgconfig($1) requirement\n"; | ||
1344 | } | ||
1345 | if ($line2 =~ /Package requirements \((.*?)\) were not met/) { | ||
1346 | $pkg = $1; | ||
1347 | # deal with versioned pkgconfig's by removing the spaces around >= 's | ||
1348 | $pkg =~ s/\>\=\s/\>\=/g; | ||
1349 | $pkg =~ s/\s\>\=/\>\=/g; | ||
1350 | $pkg =~ s/\=\s/\=/g; | ||
1351 | $pkg =~ s/\s\=/\=/g; | ||
1352 | my @req = split(/ /,$pkg); | ||
1353 | foreach (@req) { | ||
1354 | push_pkgconfig_buildreq("$_"); | ||
1355 | |||
1356 | $restart = $restart + 1; | ||
1357 | print " Adding pkgconfig($_) requirement\n"; | ||
1358 | } | ||
1359 | } | ||
1360 | if ($line2 =~ /which: no qmake/) { | ||
1361 | $restart += 1; | ||
1362 | push_pkgconfig_buildreq("Qt"); | ||
1363 | print " Adding Qt requirement\n"; | ||
1364 | } | ||
1365 | if ($line2 =~ /Cannot find development files for any supported version of libnl/) { | ||
1366 | $restart += 1; | ||
1367 | push_pkgconfig_buildreq("libnl-1"); | ||
1368 | print " Adding libnl requirement\n"; | ||
1369 | } | ||
1370 | if ($line2 =~ /<http:\/\/www.cmake.org>/) { | ||
1371 | $restart += 1; | ||
1372 | push(@buildreqs, "cmake"); | ||
1373 | print " Adding cmake requirement\n"; | ||
1374 | } | ||
1375 | if ($line2 =~ /checking for (.*?)\.\.\. not_found/ || $line2 =~ /checking for (.*?)\.\.\. no/ || $line2 =~ /checking (.*?)\.\.\. no/) { | ||
1376 | $pkg = $1; | ||
1377 | while (($key,$value) = each %failed_commands) { | ||
1378 | if ($pkg eq $key) { | ||
1379 | push(@buildreqs, $value); | ||
1380 | print " Adding $value requirement\n"; | ||
1381 | $restart += $restart + 1; | ||
1382 | $mustrestart = 1; | ||
1383 | } | ||
1384 | } | ||
1385 | |||
1386 | } | ||
1387 | |||
1388 | if ($line2 =~ /checking for [a-zA-Z0-9\_]+ in (.*?)\.\.\. no/) { | ||
1389 | $pkg = $1; | ||
1390 | while (($key,$value) = each %failed_libs) { | ||
1391 | if ($pkg eq $key) { | ||
1392 | push(@buildreqs, $value); | ||
1393 | print " Adding $value requirement\n"; | ||
1394 | $restart += $restart + 1; | ||
1395 | $mustrestart = 1; | ||
1396 | } | ||
1397 | } | ||
1398 | |||
1399 | } | ||
1400 | |||
1401 | if ($line2 =~ /-- Could NOT find ([a-zA-Z0-9]+)/) { | ||
1402 | $pkg = $1; | ||
1403 | while (($key,$value) = each %failed_libs) { | ||
1404 | if ($pkg eq $key) { | ||
1405 | push(@buildreqs, $value); | ||
1406 | print " Adding $value requirement\n"; | ||
1407 | $restart += $restart + 1; | ||
1408 | $mustrestart = 1; | ||
1409 | } | ||
1410 | } | ||
1411 | |||
1412 | } | ||
1413 | |||
1414 | if ($line2 =~ /fatal error\: (.*)\: No such file or directory/) { | ||
1415 | $pkg = $1; | ||
1416 | while (($key,$value) = each %failed_headers) { | ||
1417 | if ($pkg eq $key) { | ||
1418 | push_pkgconfig_buildreq($value); | ||
1419 | print " Adding $value requirement\n"; | ||
1420 | $restart += $restart + 1; | ||
1421 | } | ||
1422 | } | ||
1423 | |||
1424 | } | ||
1425 | if ($line2 =~ /checking for UDEV\.\.\. no/) { | ||
1426 | print " Adding pkgconfig(udev) requirement\n"; | ||
1427 | push_pkgconfig_buildreq("udev"); | ||
1428 | } | ||
1429 | if ($line2 =~ /checking for Apache .* module support/) { | ||
1430 | print " Adding pkgconfig(httpd-devel) requirement\n"; | ||
1431 | push(@buildreqs, "httpd-devel"); | ||
1432 | if ($rcount < 3) { | ||
1433 | $restart = $restart + 1; | ||
1434 | } | ||
1435 | } | ||
1436 | if ($line2 =~ /([a-zA-Z0-9\-\_]*)\: command not found/i) { | ||
1437 | my $cmd = $1; | ||
1438 | my $found = 0; | ||
1439 | |||
1440 | while (($key,$value) = each %failed_commands) { | ||
1441 | if ($cmd eq $key) { | ||
1442 | push(@buildreqs, $value); | ||
1443 | print " Adding $value requirement\n"; | ||
1444 | $restart += $restart + 1; | ||
1445 | $mustrestart = 1; | ||
1446 | $found = 1; | ||
1447 | } | ||
1448 | } | ||
1449 | |||
1450 | if ($found < 1) { | ||
1451 | print " Command $cmd not found!\n"; | ||
1452 | } | ||
1453 | } | ||
1454 | if ($line2 =~ /checking for.*in -ljpeg... no/) { | ||
1455 | push(@buildreqs, "libjpeg-devel"); | ||
1456 | print " Adding libjpeg-devel requirement\n"; | ||
1457 | $restart = $restart + 1; | ||
1458 | } | ||
1459 | if ($line2 =~ /fatal error\: zlib\.h\: No such file or directory/) { | ||
1460 | push(@buildreqs, "zlib-devel"); | ||
1461 | print " Adding zlib-devel requirement\n"; | ||
1462 | $restart = $restart + 1; | ||
1463 | } | ||
1464 | if ($line2 =~ /error\: xml2-config not found/) { | ||
1465 | push_pkgconfig_buildreq("libxml-2.0"); | ||
1466 | print " Adding libxml2-devel requirement\n"; | ||
1467 | $restart = $restart + 1; | ||
1468 | } | ||
1469 | if ($line2 =~ /checking \"location of ncurses\.h file\"/) { | ||
1470 | push(@buildreqs, "ncurses-devel"); | ||
1471 | print " Adding ncurses-devel requirement\n"; | ||
1472 | $restart = $restart + 1; | ||
1473 | } | ||
1474 | if (($line2 =~ / \/usr\/include\/python2\.6$/ || $line2 =~ / to compile python extensions/) && $done_python == 0) { | ||
1475 | push(@buildreqs, "python-devel"); | ||
1476 | print " Adding python-devel requirement\n"; | ||
1477 | $restart = $restart + 1; | ||
1478 | $done_python = 1; | ||
1479 | } | ||
1480 | if ($line2 =~ /error: must install xorg-macros 1.6/) { | ||
1481 | push_pkgconfig_buildreq("xorg-macros"); | ||
1482 | print " Adding xorg-macros requirement\n"; | ||
1483 | $restart = $restart + 1; | ||
1484 | } | ||
1485 | if ($line2 =~ /installing .*?.gmo as [a-zA-Z0-9\-\.\/\_]+?\/([a-zA-Z0-9\-\_\.]+)\.mo$/) { | ||
1486 | my $loc = $1; | ||
1487 | if ($loc eq $localename) {} else { | ||
1488 | print " Changing localename from $localename to $loc\n"; | ||
1489 | $localename = $loc; | ||
1490 | $restart = $restart + 1; | ||
1491 | } | ||
1492 | } | ||
1493 | |||
1494 | if ($infiles == 0 && $line2 =~ / Installed \(but unpackaged\) file\(s\) found\:/) { | ||
1495 | $infiles = 1; | ||
1496 | } | ||
1497 | } | ||
1498 | close(OUTPUTF); | ||
1499 | if (@allfiles == 0 || $mustrestart > 0) { | ||
1500 | if ($restart >= 1) | ||
1501 | { | ||
1502 | $rcount = $rcount + 1; | ||
1503 | if ($rcount < 10) { | ||
1504 | goto retry; | ||
1505 | } | ||
1506 | } | ||
1507 | print "Build failed ... stopping here.\n"; | ||
1508 | exit(0); | ||
1509 | } | ||
1510 | |||
1511 | } | ||
1512 | |||
1513 | sub process_rpmlint { | ||
1514 | my $infiles = 0; | ||
1515 | |||
1516 | |||
1517 | if ($oscmode == 0) { | ||
1518 | return; | ||
1519 | } | ||
1520 | |||
1521 | print "Verifying package ....\n"; | ||
1522 | |||
1523 | system("osc addremove &> /dev/null"); | ||
1524 | system("osc ci -m \"Final import by autospectacle\" &> /dev/null"); | ||
1525 | |||
1526 | open(OUTPUTF, "osc build --no-verify $name.spec 2>&1 |"); | ||
1527 | while (<OUTPUTF>) { | ||
1528 | my $line2 = $_; | ||
1529 | |||
1530 | # print "line is $line2\n"; | ||
1531 | if ($infiles == 1 && $line2 =~ /RPM build errors/) { | ||
1532 | $infiles = 2; | ||
1533 | } | ||
1534 | if ($infiles == 1 && $line2 =~ /^Building/) { | ||
1535 | $infiles = 2; | ||
1536 | } | ||
1537 | if ($infiles == 1) { | ||
1538 | $line2 =~ s/\s*//g; | ||
1539 | push(@allfiles, $line2); | ||
1540 | } | ||
1541 | if ($infiles == 0 && $line2 =~ / Installed \(but unpackaged\) file\(s\) found\:/) { | ||
1542 | $infiles = 1; | ||
1543 | } | ||
1544 | } | ||
1545 | close(OUTPUTF); | ||
1546 | |||
1547 | } | ||
1548 | |||
1549 | sub guess_name_from_url { | ||
1550 | my ($bigurl) = @_; | ||
1551 | |||
1552 | @spliturl = split(/\//, $bigurl); | ||
1553 | while (@spliturl > 1) { | ||
1554 | shift(@spliturl); | ||
1555 | } | ||
1556 | my $tarfile = $spliturl[0]; | ||
1557 | |||
1558 | # Ensure correct name resolution from .zip&tgz archives | ||
1559 | $tarfile =~ s/\.zip/\.tar/; | ||
1560 | $tarfile =~ s/\.tgz/\.tar/; | ||
1561 | $tarfile =~ s/\_/\-/g; | ||
1562 | if ($tarfile =~ /(.*?)\-([0-9\.\-\~]+.*?)\.tar/) { | ||
1563 | $name = $1; | ||
1564 | $version = $2; | ||
1565 | $version =~ s/\-/\_/g; | ||
1566 | } | ||
1567 | } | ||
1568 | |||
1569 | ############################################################################ | ||
1570 | # | ||
1571 | # Output functions | ||
1572 | # | ||
1573 | |||
1574 | sub print_name_and_description | ||
1575 | { | ||
1576 | my @lines; | ||
1577 | |||
1578 | print OUTFILE "Name : $name\n"; | ||
1579 | print OUTFILE "Version : $version\n"; | ||
1580 | print OUTFILE "Release : 1\n"; | ||
1581 | |||
1582 | # remove dupes | ||
1583 | undef %saw; | ||
1584 | @saw{@groups} = (); | ||
1585 | @out = sort keys %saw; | ||
1586 | |||
1587 | if (@out == 1) { | ||
1588 | foreach (@out) { | ||
1589 | print OUTFILE "Group : $_\n"; | ||
1590 | } | ||
1591 | } else { | ||
1592 | print OUTFILE "Group : $group\n"; | ||
1593 | } | ||
1594 | # | ||
1595 | # Work around spectacle bug | ||
1596 | $summary =~ s/\:\s/ /g; | ||
1597 | $summary =~ s/^([a-z])/\u$1/ig; | ||
1598 | $summary =~ s/\@//g; | ||
1599 | $summary = substr($summary, 0, 79); | ||
1600 | |||
1601 | $summary =~ s/\.^//g; | ||
1602 | if (length($summary) < 1) { | ||
1603 | $summary = "TO BE FILLED IN"; | ||
1604 | } | ||
1605 | # | ||
1606 | print OUTFILE "Summary : $summary\n"; | ||
1607 | print OUTFILE "Description: |\n"; | ||
1608 | |||
1609 | $description =~ s/"/\"/g; | ||
1610 | $description =~ s/\@//g; | ||
1611 | @lines = split(/\n/, $description); | ||
1612 | foreach (@lines) { | ||
1613 | print OUTFILE " $_\n"; | ||
1614 | } | ||
1615 | if (length($url)>1) { | ||
1616 | print OUTFILE "URL : $url\n"; | ||
1617 | } | ||
1618 | |||
1619 | # remove dupes | ||
1620 | undef %saw; | ||
1621 | @saw{@sources} = (); | ||
1622 | @out = sort keys %saw; | ||
1623 | |||
1624 | print OUTFILE "Sources : \n"; | ||
1625 | foreach (@out) { | ||
1626 | $source = $_; | ||
1627 | $source =~ s/$version/\%\{version\}/g; | ||
1628 | |||
1629 | print OUTFILE " - $source\n"; | ||
1630 | } | ||
1631 | |||
1632 | if (@patches > 0) { | ||
1633 | print OUTFILE "Patches: \n"; | ||
1634 | foreach (@patches) { | ||
1635 | my $patch = $_; | ||
1636 | print OUTFILE " - $patch\n"; | ||
1637 | } | ||
1638 | } | ||
1639 | |||
1640 | print OUTFILE "\n"; | ||
1641 | if (length($configure)>2) { | ||
1642 | print OUTFILE "Configure : $configure\n"; | ||
1643 | } | ||
1644 | if (length($localename) > 2) { | ||
1645 | print OUTFILE "LocaleName : $localename\n"; | ||
1646 | } | ||
1647 | if (length($builder) > 2) { | ||
1648 | print OUTFILE "Builder : $builder\n"; | ||
1649 | } | ||
1650 | } | ||
1651 | |||
1652 | sub write_makefile | ||
1653 | { | ||
1654 | open(MAKEFILE, ">Makefile"); | ||
1655 | |||
1656 | print MAKEFILE "PKG_NAME := $name\n"; | ||
1657 | print MAKEFILE "SPECFILE = \$(addsuffix .spec, \$(PKG_NAME))\n"; | ||
1658 | print MAKEFILE "YAMLFILE = \$(addsuffix .yaml, \$(PKG_NAME))\n"; | ||
1659 | print MAKEFILE "\n"; | ||
1660 | print MAKEFILE "include /usr/share/packaging-tools/Makefile.common\n"; | ||
1661 | |||
1662 | close(MAKEFILE); | ||
1663 | } | ||
1664 | |||
1665 | sub write_changelog | ||
1666 | { | ||
1667 | open(CHANGELOG, ">$name.changes"); | ||
1668 | $date = ` date +"%a %b %d %Y"`; | ||
1669 | chomp($date); | ||
1670 | print CHANGELOG "* $date - Autospectacle <autospectacle\@meego.com> - $version\n"; | ||
1671 | print CHANGELOG "- Initial automated packaging\n"; | ||
1672 | close(CHANGELOG); | ||
1673 | } | ||
1674 | |||
1675 | sub write_yaml | ||
1676 | { | ||
1677 | open(OUTFILE, ">$name.yaml"); | ||
1678 | print_name_and_description(); | ||
1679 | print_license(); | ||
1680 | print_pkgconfig(); | ||
1681 | print_buildreq(); | ||
1682 | print_files(); | ||
1683 | print_devel(); | ||
1684 | print_doc(); | ||
1685 | close(OUTFILE); | ||
1686 | |||
1687 | write_makefile(); | ||
1688 | write_changelog(); | ||
1689 | |||
1690 | system("rm $name.spec 2>/dev/null"); | ||
1691 | system("specify &> /dev/null"); | ||
1692 | if ($oscmode > 0) { | ||
1693 | system("osc addremove"); | ||
1694 | system("osc ci -m \"Import by autospectacle\" &> /dev/null"); | ||
1695 | } | ||
1696 | |||
1697 | } | ||
1698 | |||
1699 | sub write_bbfile | ||
1700 | { | ||
1701 | my $curdir = `pwd`; | ||
1702 | chomp($curdir); | ||
1703 | |||
1704 | if ($python == 1) { | ||
1705 | $name =~ s/python-//; | ||
1706 | $name = lc("python-" . $name); | ||
1707 | } | ||
1708 | |||
1709 | if (-e "$curdir/${name}_$version.bb") { | ||
1710 | print "Wont overwrite file:"; | ||
1711 | print "$curdir/${name}_$version.bb, exiting\n"; | ||
1712 | return; | ||
1713 | } | ||
1714 | open(BBFILE, ">${name}_$version.bb"); | ||
1715 | |||
1716 | print BBFILE "SUMMARY = \"$summary\"\n"; | ||
1717 | print BBFILE "DESCRIPTION = \"$description\"\n"; | ||
1718 | print BBFILE "HOMEPAGE = \"$homepage\"\n"; | ||
1719 | |||
1720 | if ($python == 1) { | ||
1721 | print BBFILE "SRCNAME = \"$summary\"\n"; | ||
1722 | } | ||
1723 | |||
1724 | print BBFILE "LICENSE = \"@license\"\n"; | ||
1725 | print BBFILE "LIC_FILES_CHKSUM = \""; | ||
1726 | foreach (keys %lic_files) { | ||
1727 | print BBFILE "file://" . basename($_) . ";md5=$lic_files{$_} \\\n"; | ||
1728 | } | ||
1729 | print BBFILE "\"\n\n"; | ||
1730 | |||
1731 | if (@license <= 0) { | ||
1732 | print "Can NOT get license from package source files.\n"; | ||
1733 | print "Please update the LICENSE and LIC_FILES_CHKSUM manually.\n"; | ||
1734 | } | ||
1735 | |||
1736 | if (@buildreqs > 0) { | ||
1737 | my %saw; | ||
1738 | my @out = grep(!$saw{$_}++,@buildreqs); | ||
1739 | print BBFILE "DEPENDS = \"@out\"\n\n"; | ||
1740 | }; | ||
1741 | |||
1742 | if (@rdepends > 0) { | ||
1743 | print BBFILE "RDEPENDS_\$\{PN\} += \""; | ||
1744 | foreach (@rdepends) { | ||
1745 | print BBFILE "$_ \\\n\t"; | ||
1746 | } | ||
1747 | print BBFILE "\"\n"; | ||
1748 | } | ||
1749 | |||
1750 | if ($python == 1) { | ||
1751 | print BBFILE "PV = \"$pversion\"\n\n"; | ||
1752 | } | ||
1753 | |||
1754 | print BBFILE "SRC_URI = \""; | ||
1755 | foreach (@sources) { | ||
1756 | print BBFILE "$_ \\\n"; | ||
1757 | } | ||
1758 | print BBFILE "\"\n\n"; | ||
1759 | print BBFILE "SRC_URI[md5sum] = \"$md5sum\"\n"; | ||
1760 | print BBFILE "SRC_URI[sha256sum] = \"$sha256sum\"\n\n"; | ||
1761 | if ($python == 1) { | ||
1762 | print BBFILE "S = \"\${WORKDIR}/\${SRCNAME}-\${PV}\"\n"; | ||
1763 | } | ||
1764 | |||
1765 | if (@inherits) { | ||
1766 | print BBFILE "inherit "; | ||
1767 | foreach (@inherits) { | ||
1768 | print BBFILE "$_ "; | ||
1769 | } | ||
1770 | print BBFILE "\n"; | ||
1771 | } | ||
1772 | |||
1773 | close(BBFILE); | ||
1774 | print "Create bb file: $curdir/${name}_$version.bb\n"; | ||
1775 | } | ||
1776 | |||
1777 | sub calculate_sums | ||
1778 | { | ||
1779 | @_ = basename $dir; | ||
1780 | my $md5output = `md5sum @_`; | ||
1781 | $md5output =~ /^([a-zA-Z0-9]*) /; | ||
1782 | $md5sum = $1; | ||
1783 | chomp($md5sum); | ||
1784 | my $sha256output = `sha256sum @_`; | ||
1785 | $sha256output =~ /^([a-zA-Z0-9]*) /; | ||
1786 | $sha256sum = $1; | ||
1787 | chomp($sha256sum); | ||
1788 | } | ||
1789 | |||
1790 | |||
1791 | ############################################################################ | ||
1792 | # | ||
1793 | # Main program | ||
1794 | # | ||
1795 | |||
1796 | if ( @ARGV < 1 || $ARGV[0] eq "--help" ) { | ||
1797 | print "Usage: $0 [-r] <url-of-source-tarballs>\n"; | ||
1798 | exit(1); | ||
1799 | } | ||
1800 | |||
1801 | # Recusive parsing of python dependencies using | ||
1802 | # easy_install | ||
1803 | my $recurse_python = 0; | ||
1804 | if ($ARGV[0] eq "-r") { | ||
1805 | $recurse_python = 1; | ||
1806 | shift @ARGV; | ||
1807 | } | ||
1808 | |||
1809 | if (@ARGV > 1) { | ||
1810 | my $i = 1; | ||
1811 | while ($i < @ARGV) { | ||
1812 | my $patch = $ARGV[$i]; | ||
1813 | print "Adding patch $patch\n"; | ||
1814 | push(@patches, $patch); | ||
1815 | $i++; | ||
1816 | } | ||
1817 | } | ||
1818 | |||
1819 | setup_licenses(); | ||
1820 | setup_files_rules(); | ||
1821 | setup_group_rules(); | ||
1822 | setup_pkgconfig_ban(); | ||
1823 | setup_failed_commands(); | ||
1824 | |||
1825 | if (-e ".osc/_packages") { | ||
1826 | $oscmode = 1; | ||
1827 | } | ||
1828 | |||
1829 | my $tmpdir = tempdir(); | ||
1830 | |||
1831 | $dir = $ARGV[0]; | ||
1832 | guess_name_from_url($dir); | ||
1833 | push(@sources, $dir); | ||
1834 | |||
1835 | #system("cd $tmpdir; curl -s -O $dir"); | ||
1836 | $orgdir = `pwd`; | ||
1837 | chomp($orgdir); | ||
1838 | my $outputdir = $name; | ||
1839 | if (! $name) { | ||
1840 | $outputdir = basename $dir; | ||
1841 | } | ||
1842 | mkpath($outputdir); | ||
1843 | chdir($outputdir); | ||
1844 | print "Downloading package: $dir\n"; | ||
1845 | system("wget --quiet $dir") == 0 or die "Download $dir failed."; | ||
1846 | |||
1847 | calculate_sums($outputdir); | ||
1848 | |||
1849 | print "Unpacking to : $tmpdir\n"; | ||
1850 | |||
1851 | my @tgzfiles = <$orgdir/$outputdir/*.tgz>; | ||
1852 | foreach (@tgzfiles) { | ||
1853 | my $tgz = basename $_; | ||
1854 | my $tar = $tgz; | ||
1855 | $tar =~ s/tgz/tar\.gz/g; | ||
1856 | $dir =~ s/tgz/tar\.gz/g; | ||
1857 | system("mv $orgdir/$outputdir/$tgz $orgdir/$outputdir/$tar"); | ||
1858 | guess_name_from_url($dir); | ||
1859 | } | ||
1860 | |||
1861 | # | ||
1862 | # I really really hate the fact that meego deleted the -a option from tar. | ||
1863 | # this is a step backwards in time that is just silly. | ||
1864 | # | ||
1865 | |||
1866 | my @sourcetars = <$orgdir/$outputdir/*\.tar\.bz2 $orgdir/$outputdir/*\.tar\.gz $orgdir/$outputdir/*\.zip>; | ||
1867 | if (scalar(@sourcetars) == 0) { | ||
1868 | print "Can NOT find source tarball. Exiting...\n"; | ||
1869 | exit (1); | ||
1870 | } | ||
1871 | if (defined($sourcetars[0]) and $sourcetars[0] =~ ".*\.tar\.bz2") { | ||
1872 | system("cd $tmpdir; tar -jxf $sourcetars[0] &>/dev/null"); | ||
1873 | } elsif (defined($sourcetars[0]) and $sourcetars[0] =~ ".*\.tar\.gz") { | ||
1874 | system("cd $tmpdir; tar -zxf $sourcetars[0] &>/dev/null"); | ||
1875 | } elsif (defined($sourcetars[0]) and $sourcetars[0] =~ ".*\.zip") { | ||
1876 | system("cd $tmpdir; unzip $sourcetars[0] &>/dev/null"); | ||
1877 | } | ||
1878 | |||
1879 | print "Parsing content ....\n"; | ||
1880 | my @dirs = <$tmpdir/*>; | ||
1881 | foreach (@dirs) { | ||
1882 | $dir = $_; | ||
1883 | } | ||
1884 | |||
1885 | $fulldir = $dir; | ||
1886 | |||
1887 | if ( -e "$dir/setup.py" ) { | ||
1888 | $python = 1; | ||
1889 | $tmp_stools = `grep -r setuptools $dir/setup.py`; | ||
1890 | if (length($tmp_stools) > 2) { | ||
1891 | push(@inherits, "setuptools"); | ||
1892 | } else { | ||
1893 | push(@inherits, "distutils"); | ||
1894 | } | ||
1895 | |||
1896 | $templic = `cd $dir; python setup.py --license;`; | ||
1897 | $templic =~ s/[\r\n]+//g; | ||
1898 | push(@license, $templic); | ||
1899 | $summary = `cd $dir; python setup.py --name`; | ||
1900 | $summary =~ s/[\r\n]+//g; | ||
1901 | $description = `cd $dir; python setup.py --description`; | ||
1902 | $description =~ s/[\r\n]+//g; | ||
1903 | $homepage = `cd $dir; python setup.py --url`; | ||
1904 | $homepage =~ s/[\r\n]+//g; | ||
1905 | $pversion = `cd $dir; python setup.py -V`; | ||
1906 | $pversion =~ s/[\r\n]+//g; | ||
1907 | # $findoutput = `cd $dir; python setup.py --requires`; | ||
1908 | # if (length($findoutput) < 3) { | ||
1909 | $findoutput = `find $dir/*.egg-info/ -name "requires.txt" 2>/dev/null`; | ||
1910 | # } | ||
1911 | @findlist = split(/\n/, $findoutput); | ||
1912 | foreach (@findlist) { | ||
1913 | push(@rawpythondeps, `sed -e '/^\$/d' "$_" | sed '/^\\[/d'`); | ||
1914 | chomp(@rawpythondeps); | ||
1915 | push(@rdepends, `sed -e 's/python-//g' "$_" | sed '/^\\[/d'`); | ||
1916 | chomp(@rdepends); | ||
1917 | if ($recurse_python == 1) { | ||
1918 | foreach (@rawpythondeps) { | ||
1919 | my $ptempdir = tempdir(); | ||
1920 | $purl = `easy_install -aeb $ptempdir "$_" 2>/dev/null`; | ||
1921 | $purl =~ s/#.*//g; | ||
1922 | @purllist = $purl =~ m/Downloading (.*:\/\/.*\n)/g; | ||
1923 | chomp(@purllist); | ||
1924 | |||
1925 | # Remove empty lines | ||
1926 | @purllist = grep(/\S/, @purllist); | ||
1927 | |||
1928 | # Recursively create recipes for dependencies | ||
1929 | if (@purllist != 0) { | ||
1930 | if (fork) { | ||
1931 | # Parent, do nothing | ||
1932 | } else { | ||
1933 | # child, execute | ||
1934 | print "Recursively creating recipe for: $purllist[0]\n"; | ||
1935 | exec("cd .. ; create-recipe -r $purllist[0]"); | ||
1936 | } | ||
1937 | } | ||
1938 | } | ||
1939 | wait; | ||
1940 | } | ||
1941 | |||
1942 | foreach $item (@rdepends) { | ||
1943 | @pyclean = split(/(\=|\<|\>).*/, $item); | ||
1944 | if (defined($pyclean[0])) { | ||
1945 | $item = lc("python-" . $pyclean[0]); | ||
1946 | } | ||
1947 | } | ||
1948 | } | ||
1949 | } | ||
1950 | |||
1951 | if ( -e "$dir/autogen.sh" ) { | ||
1952 | $configure = "autogen"; | ||
1953 | $uses_configure = 1; | ||
1954 | push(@inherits, "autotools"); | ||
1955 | } | ||
1956 | if ( -e "$dir/BUILD-CMAKE" ) { | ||
1957 | $configure = "cmake"; | ||
1958 | push(@buildreqs, "cmake"); | ||
1959 | $uses_configure = 1; | ||
1960 | push(@inherits, "cmake"); | ||
1961 | } | ||
1962 | |||
1963 | if ( -e "$dir/configure" ) { | ||
1964 | $configure = ""; | ||
1965 | } | ||
1966 | |||
1967 | my @files = <$dir/configure\.*>; | ||
1968 | |||
1969 | my $findoutput = `find $dir -name "configure.ac" 2>/dev/null`; | ||
1970 | my @findlist = split(/\n/, $findoutput); | ||
1971 | foreach (@findlist) { | ||
1972 | push(@files, $_); | ||
1973 | } | ||
1974 | foreach (@files) { | ||
1975 | process_configure_ac("$_"); | ||
1976 | } | ||
1977 | |||
1978 | $findoutput = `find $dir -name "*.pro" 2>/dev/null`; | ||
1979 | @findlist = split(/\n/, $findoutput); | ||
1980 | foreach (@findlist) { | ||
1981 | process_qmake_pro("$_"); | ||
1982 | } | ||
1983 | |||
1984 | if (-e "$dir/$name.pro") { | ||
1985 | $builder = "qmake"; | ||
1986 | push_pkgconfig_buildreq("Qt"); | ||
1987 | push(@inherits, "qmake2"); | ||
1988 | } | ||
1989 | |||
1990 | # | ||
1991 | # This is a good place to generate configure.in | ||
1992 | # | ||
1993 | if (length($configure) > 2) { | ||
1994 | if ($configure eq "autogen") { | ||
1995 | system("cd $dir ; ./autogen.sh &> /dev/null"); | ||
1996 | } | ||
1997 | } | ||
1998 | |||
1999 | |||
2000 | @files = <$dir/configure>; | ||
2001 | foreach (@files) { | ||
2002 | process_configure("$_"); | ||
2003 | } | ||
2004 | |||
2005 | if ($uses_configure == 0) { | ||
2006 | $configure = "none"; | ||
2007 | } | ||
2008 | |||
2009 | @files = <$dir/docs/license.txt>; | ||
2010 | foreach (@files) { | ||
2011 | guess_license_from_file("$_"); | ||
2012 | } | ||
2013 | |||
2014 | @files = <$dir/COPY*>; | ||
2015 | foreach (@files) { | ||
2016 | guess_license_from_file("$_"); | ||
2017 | } | ||
2018 | |||
2019 | @files = <$dir/LICENSE*>; | ||
2020 | foreach (@files) { | ||
2021 | guess_license_from_file("$_"); | ||
2022 | } | ||
2023 | |||
2024 | |||
2025 | @files = <$dir/GPL*>; | ||
2026 | foreach (@files) { | ||
2027 | guess_license_from_file("$_"); | ||
2028 | } | ||
2029 | |||
2030 | |||
2031 | if ($python != 1) { | ||
2032 | guess_description($dir); | ||
2033 | } | ||
2034 | |||
2035 | # | ||
2036 | # Output of bbfile file | ||
2037 | # | ||
2038 | write_bbfile(); | ||
2039 | chdir($orgdir); | ||
2040 | exit 0; | ||
2041 | |||
2042 | # | ||
2043 | # Output of the yaml file | ||
2044 | # | ||
2045 | |||
2046 | |||
2047 | if ($oscmode == 1) { | ||
2048 | print "Creating OBS project $name ...\n"; | ||
2049 | system("osc mkpac $name &> /dev/null"); | ||
2050 | system("mkdir $name &> /dev/null"); | ||
2051 | chdir($name); | ||
2052 | system("mv ../$name*\.tar\.* ."); | ||
2053 | } | ||
2054 | |||
2055 | write_yaml(); | ||
2056 | print "Building package ....\n"; | ||
2057 | |||
2058 | if ($oscmode == 0) { | ||
2059 | guess_files_from_rpmbuild(); | ||
2060 | } else { | ||
2061 | guess_files_from_oscbuild(); | ||
2062 | } | ||
2063 | |||
2064 | apply_files_rules(); | ||
2065 | |||
2066 | $printed_subpackages = 0; | ||
2067 | write_yaml(); | ||
2068 | |||
2069 | process_rpmlint(); | ||
2070 | |||
2071 | print "Spectacle creation complete.\n"; | ||
diff --git a/scripts/crosstap b/scripts/crosstap new file mode 100755 index 0000000000..58317cf91c --- /dev/null +++ b/scripts/crosstap | |||
@@ -0,0 +1,148 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Run a systemtap script on remote target | ||
4 | # | ||
5 | # Examples (run on build host, target is 192.168.1.xxx): | ||
6 | # $ source oe-init-build-env" | ||
7 | # $ cd ~/my/systemtap/scripts" | ||
8 | # | ||
9 | # $ crosstap root@192.168.1.xxx myscript.stp" | ||
10 | # $ crosstap root@192.168.1.xxx myscript-with-args.stp 99 ninetynine" | ||
11 | # | ||
12 | # Copyright (c) 2012, Intel Corporation. | ||
13 | # All rights reserved. | ||
14 | # | ||
15 | # This program is free software; you can redistribute it and/or modify | ||
16 | # it under the terms of the GNU General Public License version 2 as | ||
17 | # published by the Free Software Foundation. | ||
18 | # | ||
19 | # This program is distributed in the hope that it will be useful, | ||
20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
22 | # See the GNU General Public License for more details. | ||
23 | # | ||
24 | # You should have received a copy of the GNU General Public License | ||
25 | # along with this program; if not, write to the Free Software | ||
26 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | |||
28 | function usage() { | ||
29 | echo "Usage: $0 <user@hostname> <sytemtap-script> [additional systemtap-script args]" | ||
30 | } | ||
31 | |||
32 | function setup_usage() { | ||
33 | echo "" | ||
34 | echo "'crosstap' requires a local sdk build of the target system" | ||
35 | echo "(or a build that includes 'tools-profile') in order to build" | ||
36 | echo "kernel modules that can probe the target system." | ||
37 | echo "" | ||
38 | echo "Practically speaking, that means you need to do the following:" | ||
39 | echo " - If you're running a pre-built image, download the release" | ||
40 | echo " and/or BSP tarballs used to build the image." | ||
41 | echo " - If you're working from git sources, just clone the metadata" | ||
42 | echo " and BSP layers needed to build the image you'll be booting." | ||
43 | echo " - Make sure you're properly set up to build a new image (see" | ||
44 | echo " the BSP README and/or the widely available basic documentation" | ||
45 | echo " that discusses how to build images)." | ||
46 | echo " - Build an -sdk version of the image e.g.:" | ||
47 | echo " $ bitbake core-image-sato-sdk" | ||
48 | echo " OR" | ||
49 | echo " - Build a non-sdk image but include the profiling tools:" | ||
50 | echo " [ edit local.conf and add 'tools-profile' to the end of" | ||
51 | echo " the EXTRA_IMAGE_FEATURES variable ]" | ||
52 | echo " $ bitbake core-image-sato" | ||
53 | echo "" | ||
54 | echo " [ NOTE that 'crosstap' needs to be able to ssh into the target" | ||
55 | echo " system, which isn't enabled by default in -minimal images. ]" | ||
56 | echo "" | ||
57 | echo "Once you've build the image on the host system, you're ready to" | ||
58 | echo "boot it (or the equivalent pre-built image) and use 'crosstap'" | ||
59 | echo "to probe it (you need to source the environment as usual first):" | ||
60 | echo "" | ||
61 | echo " $ source oe-init-build-env" | ||
62 | echo " $ cd ~/my/systemtap/scripts" | ||
63 | echo " $ crosstap root@192.168.1.xxx myscript.stp" | ||
64 | echo "" | ||
65 | } | ||
66 | |||
67 | function systemtap_target_arch() { | ||
68 | SYSTEMTAP_TARGET_ARCH=$1 | ||
69 | case $SYSTEMTAP_TARGET_ARCH in | ||
70 | i?86) | ||
71 | SYSTEMTAP_TARGET_ARCH="i386" | ||
72 | ;; | ||
73 | x86?64*) | ||
74 | SYSTEMTAP_TARGET_ARCH="x86_64" | ||
75 | ;; | ||
76 | arm*) | ||
77 | SYSTEMTAP_TARGET_ARCH="arm" | ||
78 | ;; | ||
79 | powerpc*) | ||
80 | SYSTEMTAP_TARGET_ARCH="powerpc" | ||
81 | ;; | ||
82 | *) | ||
83 | ;; | ||
84 | esac | ||
85 | } | ||
86 | |||
87 | if [ $# -lt 2 ]; then | ||
88 | usage | ||
89 | exit 1 | ||
90 | fi | ||
91 | |||
92 | if [ -z "$BUILDDIR" ]; then | ||
93 | echo "Error: Unable to find the BUILDDIR environment variable." | ||
94 | echo "Did you forget to source your build system environment setup script?" | ||
95 | exit 1 | ||
96 | fi | ||
97 | |||
98 | pushd $PWD | ||
99 | cd $BUILDDIR | ||
100 | BITBAKE_VARS=`bitbake -e virtual/kernel` | ||
101 | popd | ||
102 | |||
103 | STAGING_BINDIR_TOOLCHAIN=$(echo "$BITBAKE_VARS" | grep ^STAGING_BINDIR_TOOLCHAIN \ | ||
104 | | cut -d '=' -f2 | cut -d '"' -f2) | ||
105 | STAGING_BINDIR_TOOLPREFIX=$(echo "$BITBAKE_VARS" | grep ^TARGET_PREFIX \ | ||
106 | | cut -d '=' -f2 | cut -d '"' -f2) | ||
107 | SYSTEMTAP_HOST_INSTALLDIR=$(echo "$BITBAKE_VARS" | grep ^STAGING_DIR_NATIVE \ | ||
108 | | cut -d '=' -f2 | cut -d '"' -f2) | ||
109 | TARGET_ARCH=$(echo "$BITBAKE_VARS" | grep ^TRANSLATED_TARGET_ARCH \ | ||
110 | | cut -d '=' -f2 | cut -d '"' -f2) | ||
111 | TARGET_KERNEL_BUILDDIR=$(echo "$BITBAKE_VARS" | grep ^B= \ | ||
112 | | cut -d '=' -f2 | cut -d '"' -f2) | ||
113 | |||
114 | systemtap_target_arch "$TARGET_ARCH" | ||
115 | |||
116 | if [ ! -d $TARGET_KERNEL_BUILDDIR ] || | ||
117 | [ ! -f $TARGET_KERNEL_BUILDDIR/vmlinux ]; then | ||
118 | echo -e "\nError: No target kernel build found." | ||
119 | echo -e "Did you forget to create a local build of your image?" | ||
120 | setup_usage | ||
121 | exit 1 | ||
122 | fi | ||
123 | |||
124 | if [ ! -f $SYSTEMTAP_HOST_INSTALLDIR/usr/bin/stap ]; then | ||
125 | echo -e "\nError: Native (host) systemtap not found." | ||
126 | echo -e "Did you accidentally build a local non-sdk image? (or forget to" | ||
127 | echo -e "add 'tools-profile' to EXTRA_IMAGE_FEATURES in your local.conf)?" | ||
128 | setup_usage | ||
129 | exit 1 | ||
130 | fi | ||
131 | |||
132 | target_user_hostname="$1" | ||
133 | full_script_name="$2" | ||
134 | script_name=$(basename "$2") | ||
135 | script_base=${script_name%.*} | ||
136 | shift 2 | ||
137 | |||
138 | ${SYSTEMTAP_HOST_INSTALLDIR}/usr/bin/stap \ | ||
139 | -a ${SYSTEMTAP_TARGET_ARCH} \ | ||
140 | -B CROSS_COMPILE="${STAGING_BINDIR_TOOLCHAIN}/${STAGING_BINDIR_TOOLPREFIX}" \ | ||
141 | -r ${TARGET_KERNEL_BUILDDIR} \ | ||
142 | -I ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/tapset \ | ||
143 | -R ${SYSTEMTAP_HOST_INSTALLDIR}/usr/share/systemtap/runtime \ | ||
144 | --remote=$target_user_hostname \ | ||
145 | -m $script_base \ | ||
146 | $full_script_name "$@" | ||
147 | |||
148 | exit 0 | ||
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache new file mode 100755 index 0000000000..dfb282efd4 --- /dev/null +++ b/scripts/gen-lockedsig-cache | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> | ||
4 | # | ||
5 | |||
6 | import os | ||
7 | import sys | ||
8 | import glob | ||
9 | import shutil | ||
10 | import errno | ||
11 | |||
12 | def mkdir(d): | ||
13 | try: | ||
14 | os.makedirs(d) | ||
15 | except OSError as e: | ||
16 | if e.errno != errno.EEXIST: | ||
17 | raise e | ||
18 | |||
19 | if len(sys.argv) < 3: | ||
20 | print("Incorrect number of arguments specified") | ||
21 | sys.exit(1) | ||
22 | |||
23 | sigs = [] | ||
24 | with open(sys.argv[1]) as f: | ||
25 | for l in f.readlines(): | ||
26 | if ":" in l: | ||
27 | sigs.append(l.split(":")[2].split()[0]) | ||
28 | |||
29 | files = set() | ||
30 | for s in sigs: | ||
31 | p = sys.argv[2] + "/" + s[:2] + "/*" + s + "*" | ||
32 | files |= set(glob.glob(p)) | ||
33 | p = sys.argv[2] + "/*/" + s[:2] + "/*" + s + "*" | ||
34 | files |= set(glob.glob(p)) | ||
35 | |||
36 | for f in files: | ||
37 | dst = f.replace(sys.argv[2], sys.argv[3]) | ||
38 | mkdir(os.path.dirname(dst)) | ||
39 | os.link(f, dst) | ||
40 | |||
diff --git a/scripts/gen-site-config b/scripts/gen-site-config new file mode 100755 index 0000000000..7da7a0bd8a --- /dev/null +++ b/scripts/gen-site-config | |||
@@ -0,0 +1,53 @@ | |||
1 | #! /bin/sh | ||
2 | # Copyright (c) 2005-2008 Wind River Systems, Inc. | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or modify | ||
5 | # it under the terms of the GNU General Public License version 2 as | ||
6 | # published by the Free Software Foundation. | ||
7 | # | ||
8 | # This program is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with this program; if not, write to the Free Software | ||
15 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
16 | |||
17 | cat << EOF | ||
18 | AC_PREREQ(2.57) | ||
19 | AC_INIT([site_wide],[1.0.0]) | ||
20 | |||
21 | EOF | ||
22 | |||
23 | # Disable as endian is set in the default config | ||
24 | #echo AC_C_BIGENDIAN | ||
25 | #echo | ||
26 | |||
27 | if [ -e $1/types ] ; then | ||
28 | while read type ; do | ||
29 | echo "AC_CHECK_SIZEOF([$type])" | ||
30 | done < $1/types | ||
31 | |||
32 | echo | ||
33 | fi | ||
34 | |||
35 | if [ -e $1/funcs ]; then | ||
36 | while read func ; do | ||
37 | echo "AC_CHECK_FUNCS([$func])" | ||
38 | done < $1/funcs | ||
39 | |||
40 | echo | ||
41 | fi | ||
42 | |||
43 | if [ -e $1/headers ]; then | ||
44 | while read header ; do | ||
45 | echo "AC_CHECK_HEADERS([$header])" | ||
46 | done < $1/headers | ||
47 | |||
48 | echo | ||
49 | fi | ||
50 | |||
51 | cat << EOF | ||
52 | AC_OUTPUT | ||
53 | EOF | ||
diff --git a/scripts/help2man b/scripts/help2man new file mode 100755 index 0000000000..2bb8d868bd --- /dev/null +++ b/scripts/help2man | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | exit 1 | ||
diff --git a/scripts/hob b/scripts/hob new file mode 100755 index 0000000000..8d33ab1782 --- /dev/null +++ b/scripts/hob | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | export BB_ENV_EXTRAWHITE="DISABLE_SANITY_CHECKS $BB_ENV_EXTRAWHITE" | ||
3 | DISABLE_SANITY_CHECKS=1 bitbake -u hob $@ | ||
4 | |||
5 | ret=$? | ||
6 | exit $ret | ||
diff --git a/scripts/jhbuild/jhbuild2oe.py b/scripts/jhbuild/jhbuild2oe.py new file mode 100755 index 0000000000..9b31cafb69 --- /dev/null +++ b/scripts/jhbuild/jhbuild2oe.py | |||
@@ -0,0 +1,278 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # Available modulesets: | ||
3 | # | ||
4 | # bootstrap.modules | ||
5 | # freedesktop.modules | ||
6 | # gcj.modules | ||
7 | # gnome-2.10.modules | ||
8 | # gnome-2.12.modules | ||
9 | # gnome-2.14.modules | ||
10 | # gnome-2.16.modules | ||
11 | # gnutls.modules | ||
12 | # gtk28.modules | ||
13 | # gtk.modules | ||
14 | # xorg-7.0.modules | ||
15 | # xorg.modules | ||
16 | |||
17 | moduleset = 'xorg.modules' | ||
18 | |||
19 | |||
20 | |||
21 | import cElementTree as ElementTree | ||
22 | # import lxml.etree as ElementTree | ||
23 | import re, os, bb, bb.data | ||
24 | |||
25 | class Handlers(object): | ||
26 | """ | ||
27 | Class to act as a store for handlers of jhbuild xml elements, and as a | ||
28 | dispatcher of parsed Elements to those handlers. | ||
29 | |||
30 | These handlers exist to take an xml element from the jhbuild files and | ||
31 | either produce bitbake metadata in self.packages, or produce data which | ||
32 | will be used by other element handlers to do so. | ||
33 | |||
34 | Handlers(filename) -> new object to parse and process jhbuild file of | ||
35 | name 'filename'. | ||
36 | """ | ||
37 | |||
38 | cvsrootpat = re.compile(r''' | ||
39 | \s* # Skip leading whitespace | ||
40 | :(?P<scheme>[^:]+): # scheme (i.e. pserver, ext) | ||
41 | ((?P<user>\S+?)@)? # username | ||
42 | (?P<host>\S+?): # non-greedy match of the remote host | ||
43 | (?P<path>\S+) # remote path | ||
44 | ''', re.VERBOSE) | ||
45 | |||
46 | |||
47 | def __init__(self, msfile): | ||
48 | self.msfile = msfile | ||
49 | self.msbasename = os.path.basename(msfile) | ||
50 | self.msdirname = os.path.dirname(msfile) | ||
51 | |||
52 | self.handled = {} | ||
53 | |||
54 | self.cvsroots = {} | ||
55 | self.repositories = {} | ||
56 | self.packages = [] | ||
57 | |||
58 | def handle(self, element, parent): | ||
59 | import sys | ||
60 | """ | ||
61 | XML Element dispatch function. Can be called both from outside the | ||
62 | Handlers object to initiate handling, and from within individual XML | ||
63 | element handlers to ensure that dependent elements have been handled. | ||
64 | |||
65 | Does not handle a given XML Element more than once, as it retains | ||
66 | information about the handling state of the Elements it encounters. | ||
67 | """ | ||
68 | |||
69 | try: | ||
70 | state = self.handled[element] | ||
71 | except KeyError: | ||
72 | pass | ||
73 | except: | ||
74 | return | ||
75 | |||
76 | try: | ||
77 | self.__class__.__dict__[element.tag](self, element, parent) | ||
78 | self.handled[element] = True | ||
79 | except KeyError: | ||
80 | self.handled[element] = False | ||
81 | sys.__stderr__.write('Unhandled element: %s\n' % element.tag) | ||
82 | except Exception: | ||
83 | sys.__stderr__.write('Error handling %s: %s:\n %s\n' % (element.tag, sys.exc_type, sys.exc_value)) | ||
84 | self.handled[element] = False | ||
85 | |||
86 | print('handle(%s, %s) -> %s' % (element, parent, self.handled[element])) | ||
87 | return self.handled[element] | ||
88 | |||
89 | def cvsroot(self, element, parent): | ||
90 | # Rip apart the cvsroot style location to build a cvs:// url for | ||
91 | # bitbake's usage in the cvsmodule handler. | ||
92 | # root=":pserver:anoncvs@cvs.freedesktop.org:/cvs/fontconfig" | ||
93 | print("cvsroot(%s, %s)" % (element, parent)) | ||
94 | |||
95 | root = element.attrib.get('root') | ||
96 | rootmatch = re.match(Handlers.cvsrootpat, root) | ||
97 | name = element.attrib.get('name') | ||
98 | user = rootmatch.group('user') or '' | ||
99 | if user != '': | ||
100 | pw = element.attrib.get('password') or '' | ||
101 | if pw != '': | ||
102 | pw = ':' + pw + '@' | ||
103 | else: | ||
104 | user = user + '@' | ||
105 | print('user: %s' % user) | ||
106 | print('pw: %s' % pw) | ||
107 | |||
108 | host = rootmatch.group('host') | ||
109 | print('host: %s' % host) | ||
110 | path = rootmatch.group('path') or '/' | ||
111 | print('path: %s' % path) | ||
112 | |||
113 | root = "cvs://%s%s%s%s" % (user, pw, host, path) | ||
114 | print('root: %s' % root) | ||
115 | self.cvsroots[name] = root | ||
116 | |||
117 | def cvsmodule(self, element, parent): | ||
118 | rootlist = [root for root in list(parent) if root.attrib.get('name') == element.attrib.get('cvsroot')] | ||
119 | if len(rootlist) < 1: | ||
120 | raise Exception("Error: cvsmodule '%s' requires cvsroot '%s'." % (element.attrib.get('module'), element.attrib.get('cvsroot'))) | ||
121 | |||
122 | cvsroot = rootlist[0] | ||
123 | |||
124 | |||
125 | def include(self, element, parent): | ||
126 | href = element.attrib.get('href') | ||
127 | fullhref = os.path.join(self.msdirname, href) | ||
128 | tree = ElementTree.ElementTree(file=fullhref) | ||
129 | elem = tree.getroot() | ||
130 | |||
131 | # Append the children of the newly included root element to the parent | ||
132 | # element, and manually handle() them, as the currently running | ||
133 | # iteration isn't going to hit them. | ||
134 | for child in elem: | ||
135 | self.handle(child, elem) | ||
136 | parent.append(elem) | ||
137 | |||
138 | def repository(self, element, parent): | ||
139 | # TODO: | ||
140 | # Convert the URL in the href attribute, if necessary, to the format | ||
141 | # which bitbake expects to see in SRC_URI. | ||
142 | name = element.attrib.get('name') | ||
143 | self.repositories[name] = element.attrib.get('href') | ||
144 | |||
145 | |||
146 | def moduleset(self, element, parent): | ||
147 | for child in element: | ||
148 | self.handle(child, element) | ||
149 | |||
150 | def packagename(self, name): | ||
151 | # mangle name into an appropriate bitbake package name | ||
152 | return name.replace('/', '-') | ||
153 | |||
154 | def metamodule(self, element, parent): | ||
155 | # grab the deps | ||
156 | deps = None | ||
157 | for child in element: | ||
158 | if child.tag == 'dependencies': | ||
159 | deps = [self.packagename(dep.attrib.get('package')) for dep in child if dep.tag == "dep"] | ||
160 | |||
161 | # create the package | ||
162 | d = bb.data.init() | ||
163 | pn = self.packagename(element.attrib.get('id')) | ||
164 | d.setVar('PN', pn) | ||
165 | bb.data.setVar('DEPENDS', ' '.join(deps), d) | ||
166 | d.setVar('_handler', 'metamodule') | ||
167 | self.packages.append(d) | ||
168 | |||
169 | def autotools(self, element, parent): | ||
170 | deps = None | ||
171 | branch = None | ||
172 | for child in element: | ||
173 | if child.tag == 'dependencies': | ||
174 | deps = [self.packagename(dep.attrib.get('package')) for dep in child if dep.tag == "dep"] | ||
175 | elif child.tag == 'branch': | ||
176 | branch = child | ||
177 | |||
178 | # create the package | ||
179 | d = bb.data.init() | ||
180 | id = element.attrib.get('id') | ||
181 | if id is None: | ||
182 | raise Exception('Error: autotools element has no id attribute.') | ||
183 | pn = self.packagename(id) | ||
184 | d.setVar('PN', pn) | ||
185 | if deps is not None: | ||
186 | bb.data.setVar('DEPENDS', ' '.join(deps), d) | ||
187 | |||
188 | if branch is not None: | ||
189 | # <branch repo="git.freedesktop.org" module="xorg/xserver"/> | ||
190 | repo = os.path.join(self.repositories[branch.attrib.get('repo')], branch.attrib.get('module')) | ||
191 | d.setVar('SRC_URI', repo) | ||
192 | |||
193 | checkoutdir = branch.attrib.get('checkoutdir') | ||
194 | if checkoutdir is not None: | ||
195 | bb.data.setVar('S', os.path.join('${WORKDIR}', checkoutdir), d) | ||
196 | |||
197 | # build class | ||
198 | d.setVar('INHERITS', 'autotools') | ||
199 | d.setVarFlag('INHERITS', 'operator', '+=') | ||
200 | d.setVar('_handler', 'autotools') | ||
201 | self.packages.append(d) | ||
202 | |||
203 | class Emitter(object): | ||
204 | """ | ||
205 | Class which contains a single method for the emission of a bitbake | ||
206 | package from the bitbake data produced by a Handlers object. | ||
207 | """ | ||
208 | |||
209 | def __init__(self, filefunc = None, basedir = None): | ||
210 | def _defaultfilefunc(package): | ||
211 | # return a relative path to the bitbake .bb which will be written | ||
212 | return package.getVar('PN', 1) + '.bb' | ||
213 | |||
214 | self.filefunc = filefunc or _defaultfilefunc | ||
215 | self.basedir = basedir or os.path.abspath(os.curdir) | ||
216 | |||
217 | def write(self, package, template = None): | ||
218 | # 1) Assemble new file contents in ram, either new from bitbake | ||
219 | # metadata, or a combination of the template and that metadata. | ||
220 | # 2) Open the path returned by the filefunc + the basedir for writing. | ||
221 | # 3) Write the new bitbake data file. | ||
222 | fdata = '' | ||
223 | if template: | ||
224 | f = file(template, 'r') | ||
225 | fdata = f.read() | ||
226 | f.close() | ||
227 | |||
228 | for key in bb.data.keys(package): | ||
229 | fdata = fdata.replace('@@'+key+'@@', package.getVar(key)) | ||
230 | else: | ||
231 | for key in bb.data.keys(package): | ||
232 | if key == '_handler': | ||
233 | continue | ||
234 | elif key == 'INHERITS': | ||
235 | fdata += 'inherit %s\n' % package.getVar('INHERITS') | ||
236 | else: | ||
237 | oper = package.getVarFlag(key, 'operator') or '=' | ||
238 | fdata += '%s %s "%s"\n' % (key, oper, package.getVar(key)) | ||
239 | |||
240 | if not os.path.exists(os.path.join(self.basedir, os.path.dirname(self.filefunc(package)))): | ||
241 | os.makedirs(os.path.join(self.basedir, os.path.dirname(self.filefunc(package)))) | ||
242 | |||
243 | out = file(os.path.join(self.basedir, self.filefunc(package)), 'w') | ||
244 | out.write(fdata) | ||
245 | out.close() | ||
246 | |||
247 | def _test(): | ||
248 | msfile = os.path.join(os.path.abspath(os.curdir), 'modulesets', moduleset) | ||
249 | tree = ElementTree.ElementTree(file=msfile) | ||
250 | elem = tree.getroot() | ||
251 | |||
252 | handlers = Handlers(msfile) | ||
253 | handlers.handle(elem, None) | ||
254 | |||
255 | def filefunc(package): | ||
256 | # return a relative path to the bitbake .bb which will be written | ||
257 | src_uri = package.getVar('SRC_URI', 1) | ||
258 | filename = package.getVar('PN', 1) + '.bb' | ||
259 | if not src_uri: | ||
260 | return filename | ||
261 | else: | ||
262 | substr = src_uri[src_uri.find('xorg/'):] | ||
263 | subdirlist = substr.split('/')[:2] | ||
264 | subdir = '-'.join(subdirlist) | ||
265 | return os.path.join(subdir, filename) | ||
266 | |||
267 | emitter = Emitter(filefunc) | ||
268 | for package in handlers.packages: | ||
269 | template = emitter.filefunc(package) + '.in' | ||
270 | if os.path.exists(template): | ||
271 | print("%s exists, emitting based on template" % template) | ||
272 | emitter.write(package, template) | ||
273 | else: | ||
274 | print("%s does not exist, emitting non-templated" % template) | ||
275 | emitter.write(package) | ||
276 | |||
277 | if __name__ == "__main__": | ||
278 | _test() | ||
diff --git a/scripts/jhbuild/modulesets/bootstrap.modules b/scripts/jhbuild/modulesets/bootstrap.modules new file mode 100644 index 0000000000..9096b14662 --- /dev/null +++ b/scripts/jhbuild/modulesets/bootstrap.modules | |||
@@ -0,0 +1,87 @@ | |||
1 | <?xml version="1.0" standalone="no"?> <!--*- mode: nxml -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | <repository type="tarball" name="ftp.gnu.org" | ||
5 | href="http://ftp.gnu.org/gnu/"/> | ||
6 | <repository type="tarball" name="pkgconfig" | ||
7 | href="http://pkgconfig.freedesktop.org/releases/"/> | ||
8 | <repository type="tarball" name="python" | ||
9 | href="http://www.python.org/ftp/python/"/> | ||
10 | |||
11 | <autotools id="gettext" autogen-sh="configure"> | ||
12 | <branch repo="ftp.gnu.org" | ||
13 | module="gettext/gettext-0.14.5.tar.gz" version="0.14.5" | ||
14 | size="7105715" md5sum="e2f6581626a22a0de66dce1d81d00de3" /> | ||
15 | </autotools> | ||
16 | |||
17 | <autotools id="autoconf" autogen-sh="configure"> | ||
18 | <branch repo="ftp.gnu.org" | ||
19 | module="autoconf/autoconf-2.59.tar.bz2" version="2.59" | ||
20 | size="925073" md5sum="1ee40f7a676b3cfdc0e3f7cd81551b5f" /> | ||
21 | </autotools> | ||
22 | |||
23 | <autotools id="libtool" autogen-sh="configure"> | ||
24 | <branch repo="ftp.gnu.org" | ||
25 | module="libtool/libtool-1.5.22.tar.gz" version="1.5.22" | ||
26 | size="2921483" md5sum="8e0ac9797b62ba4dcc8a2fb7936412b0"> | ||
27 | <patch file="libtool-1.5.18-multilib.patch" strip="1" /> | ||
28 | </branch> | ||
29 | </autotools> | ||
30 | |||
31 | <autotools id="automake-1.4" autogen-sh="configure"> | ||
32 | <branch repo="ftp.gnu.org" | ||
33 | module="automake/automake-1.4-p6.tar.gz" version="1.4-p6" | ||
34 | size="375060" md5sum="24872b81b95d78d05834c39af2cfcf05" /> | ||
35 | </autotools> | ||
36 | <autotools id="automake-1.7" autogen-sh="configure"> | ||
37 | <branch repo="ftp.gnu.org" | ||
38 | module="automake/automake-1.7.9.tar.bz2" version="1.7.9" | ||
39 | size="577705" md5sum="571fd0b0598eb2a27dcf68adcfddfacb" /> | ||
40 | </autotools> | ||
41 | <autotools id="automake-1.8" autogen-sh="configure"> | ||
42 | <branch repo="ftp.gnu.org" | ||
43 | module="automake/automake-1.8.5.tar.bz2" version="1.8.5" | ||
44 | size="663182" md5sum="0114aa6d7dc32112834b68105fb8d7e2" /> | ||
45 | </autotools> | ||
46 | <autotools id="automake-1.9" autogen-sh="configure"> | ||
47 | <branch repo="ftp.gnu.org" | ||
48 | module="automake/automake-1.9.6.tar.bz2" version="1.9.6" | ||
49 | size="765505" md5sum="c11b8100bb311492d8220378fd8bf9e0" /> | ||
50 | </autotools> | ||
51 | |||
52 | <autotools id="pkg-config" autogen-sh="configure"> | ||
53 | <branch repo="pkgconfig" | ||
54 | module="pkg-config-0.20.tar.gz" version="0.20" | ||
55 | size="969993" md5sum="fb42402593e4198bc252ab248dd4158b" /> | ||
56 | </autotools> | ||
57 | |||
58 | <autotools id="python" autogenargs="--enable-shared" autogen-sh="configure"> | ||
59 | <branch repo="python" | ||
60 | module="2.4.3/Python-2.4.3.tar.bz2" version="2.4.3" | ||
61 | size="8005915" md5sum="141c683447d5e76be1d2bd4829574f02" /> | ||
62 | </autotools> | ||
63 | |||
64 | <repository type="tarball" name="pyrex" | ||
65 | href="http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/"/> | ||
66 | <distutils id="pyrex"> | ||
67 | <branch repo="pyrex" | ||
68 | module="Pyrex-0.9.4.1.tar.gz" version="0.9.4.1" | ||
69 | size="181507" md5sum="425f0543c634bc7a86fe4fce02e0e882" /> | ||
70 | </distutils> | ||
71 | |||
72 | <metamodule id="meta-bootstrap"> | ||
73 | <dependencies> | ||
74 | <dep package="gettext" /> | ||
75 | <dep package="autoconf" /> | ||
76 | <dep package="libtool" /> | ||
77 | <dep package="automake-1.4" /> | ||
78 | <dep package="automake-1.7" /> | ||
79 | <dep package="automake-1.8" /> | ||
80 | <dep package="automake-1.9" /> | ||
81 | <dep package="pkg-config" /> | ||
82 | <dep package="python" /> | ||
83 | <dep package="pyrex" /> | ||
84 | </dependencies> | ||
85 | </metamodule> | ||
86 | |||
87 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/freedesktop.modules b/scripts/jhbuild/modulesets/freedesktop.modules new file mode 100644 index 0000000000..698853e377 --- /dev/null +++ b/scripts/jhbuild/modulesets/freedesktop.modules | |||
@@ -0,0 +1,281 @@ | |||
1 | <?xml version="1.0"?><!--*- mode: nxml -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | <repository type="cvs" name="cairo.freedesktop.org" | ||
5 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/cairo" | ||
6 | password=""/> | ||
7 | <repository type="cvs" name="dbus.freedesktop.org" | ||
8 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/dbus" | ||
9 | password=""/> | ||
10 | <repository type="cvs" name="fontconfig.freedesktop.org" | ||
11 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/fontconfig" | ||
12 | password=""/> | ||
13 | <repository type="cvs" name="hal.freedesktop.org" | ||
14 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/hal" | ||
15 | password=""/> | ||
16 | <repository type="cvs" name="icon-theme.freedesktop.org" | ||
17 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/icon-theme" | ||
18 | password=""/> | ||
19 | <repository type="cvs" name="startup-notification.freedesktop.org" | ||
20 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/startup-notification" | ||
21 | password=""/> | ||
22 | <repository type="cvs" name="tango.freedesktop.org" | ||
23 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/tango" | ||
24 | password=""/> | ||
25 | <repository type="cvs" name="xorg.freedesktop.org" | ||
26 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xorg" | ||
27 | password=""/> | ||
28 | <repository type="cvs" name="poppler.freedesktop.org" | ||
29 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/poppler" | ||
30 | password=""/> | ||
31 | <repository type="cvs" name="system-tools-backends.freedesktop.org" | ||
32 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/system-tools-backends" | ||
33 | password=""/> | ||
34 | <repository type="cvs" name="gnome.org" | ||
35 | cvsroot=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
36 | password=""/> | ||
37 | |||
38 | <repository type="svn" name="avahi.0pointer.de" | ||
39 | href="svn://svn.0pointer.de/avahi/"/> | ||
40 | <repository type="svn" name="libdaemon.0pointer.de" | ||
41 | href="svn://svn.0pointer.de/libdaemon/"/> | ||
42 | |||
43 | <repository type="git" name="git.freedesktop.org" | ||
44 | href="git://anongit.freedesktop.org/git/"/> | ||
45 | |||
46 | <repository type="tarball" name="cpan" href="http://search.cpan.org/CPAN/" /> | ||
47 | |||
48 | |||
49 | <autotools id="cairo"> | ||
50 | <branch repo="git.freedesktop.org" module="cairo"/> | ||
51 | <dependencies> | ||
52 | <dep package="fontconfig"/> | ||
53 | <dep package="libXrender"/> | ||
54 | <dep package="gtk-doc"/> | ||
55 | </dependencies> | ||
56 | <after> | ||
57 | <dep package="glitz"/> | ||
58 | </after> | ||
59 | </autotools> | ||
60 | |||
61 | <tarball id="cairo-1-0" version="1.0.4"> | ||
62 | <source href="http://cairographics.org/releases/cairo-1.0.4.tar.gz" | ||
63 | size="1475777" md5sum="9002b0e69b3f94831a22d3f2a7735ce2"/> | ||
64 | <dependencies> | ||
65 | <dep package="fontconfig"/> | ||
66 | <dep package="libXrender"/> | ||
67 | </dependencies> | ||
68 | <after> | ||
69 | <dep package="glitz"/> | ||
70 | </after> | ||
71 | </tarball> | ||
72 | |||
73 | <autotools id="glitz"> | ||
74 | <branch repo="cairo.freedesktop.org"/> | ||
75 | </autotools> | ||
76 | |||
77 | <autotools id="pycairo-1-0"> | ||
78 | <branch repo="cairo.freedesktop.org" module="pycairo" | ||
79 | revision="RELEASE_1_0_2" checkoutdir="pycairo-1-0"/> | ||
80 | <dependencies> | ||
81 | <dep package="cairo-1-0"/> | ||
82 | </dependencies> | ||
83 | </autotools> | ||
84 | |||
85 | <autotools id="pycairo"> | ||
86 | <branch repo="cairo.freedesktop.org"/> | ||
87 | <dependencies> | ||
88 | <dep package="cairo"/> | ||
89 | </dependencies> | ||
90 | </autotools> | ||
91 | |||
92 | <autotools id="cairomm"> | ||
93 | <branch repo="cairo.freedesktop.org"/> | ||
94 | <dependencies> | ||
95 | <dep package="cairo"/> | ||
96 | </dependencies> | ||
97 | </autotools> | ||
98 | |||
99 | <autotools id="dbus" supports-non-srcdir-builds="no"> | ||
100 | <branch repo="dbus.freedesktop.org"/> | ||
101 | <dependencies> | ||
102 | <dep package="glib"/> | ||
103 | </dependencies> | ||
104 | <after> | ||
105 | <dep package="gtk+"/> | ||
106 | </after> | ||
107 | </autotools> | ||
108 | |||
109 | <autotools id="dbus-0.23" supports-non-srcdir-builds="no"> | ||
110 | <branch repo="dbus.freedesktop.org" module="dbus" | ||
111 | revision="dbus-0-23" checkoutdir="dbus-0.23"/> | ||
112 | <dependencies> | ||
113 | <dep package="glib"/> | ||
114 | </dependencies> | ||
115 | <after> | ||
116 | <dep package="gtk+"/> | ||
117 | </after> | ||
118 | </autotools> | ||
119 | |||
120 | <!-- Not maintained - try dbusmm instead --> | ||
121 | <autotools id="dbus-cpp"> | ||
122 | <branch repo="dbus.freedesktop.org"/> | ||
123 | <dependencies> | ||
124 | <dep package="dbus"/> | ||
125 | </dependencies> | ||
126 | </autotools> | ||
127 | |||
128 | <autotools id="dbusmm"> | ||
129 | <branch repo="dbus.freedesktop.org"/> | ||
130 | <dependencies> | ||
131 | <dep package="dbus"/> | ||
132 | </dependencies> | ||
133 | </autotools> | ||
134 | |||
135 | <autotools id="dbus-glib"> | ||
136 | <branch repo="git.freedesktop.org" module="dbus/dbus-glib"/> | ||
137 | <dependencies> | ||
138 | <dep package="libxml2"/> | ||
139 | <dep package="dbus"/> | ||
140 | <dep package="glib"/> | ||
141 | </dependencies> | ||
142 | </autotools> | ||
143 | |||
144 | <distutils id="dbus-python"> | ||
145 | <branch repo="git.freedesktop.org" module="dbus/dbus-python"/> | ||
146 | <dependencies> | ||
147 | <dep package="dbus"/> | ||
148 | <dep package="dbus-glib"/> | ||
149 | </dependencies> | ||
150 | </distutils> | ||
151 | |||
152 | <autotools id="PolicyKit"> | ||
153 | <branch repo="hal.freedesktop.org"/> | ||
154 | <dependencies> | ||
155 | <dep package="dbus-glib"/> | ||
156 | </dependencies> | ||
157 | </autotools> | ||
158 | |||
159 | <autotools id="hal"> | ||
160 | <branch repo="hal.freedesktop.org"/> | ||
161 | <dependencies> | ||
162 | <dep package="dbus"/> | ||
163 | <dep package="PolicyKit"/> | ||
164 | </dependencies> | ||
165 | </autotools> | ||
166 | |||
167 | <autotools id="hal-0-4"> | ||
168 | <branch repo="hal.freedesktop.org" module="hal" | ||
169 | revision="hal-0_4-stable-branch" checkoutdir="hal-0.4"/> | ||
170 | <dependencies> | ||
171 | <dep package="dbus-0.23"/> | ||
172 | </dependencies> | ||
173 | </autotools> | ||
174 | |||
175 | <autotools id="fontconfig"> | ||
176 | <branch repo="fontconfig.freedesktop.org" revision="fc-2_4_branch"/> | ||
177 | </autotools> | ||
178 | |||
179 | <autotools id="icon-slicer"> | ||
180 | <branch repo="icon-theme.freedesktop.org"/> | ||
181 | </autotools> | ||
182 | <autotools id="icon-naming-utils"> | ||
183 | <branch repo="icon-theme.freedesktop.org"/> | ||
184 | </autotools> | ||
185 | <tarball id="hicolor-icon-theme" version="0.9" | ||
186 | supports-non-srcdir-builds="no"> | ||
187 | <source href="http://icon-theme.freedesktop.org/releases/hicolor-icon-theme-0.9.tar.gz" | ||
188 | size="32574" md5sum="1d0821cb80d394eac30bd8cec5b0b60c"/> | ||
189 | </tarball> | ||
190 | |||
191 | <autotools id="tango-icon-theme"> | ||
192 | <branch repo="tango.freedesktop.org"/> | ||
193 | <dependencies> | ||
194 | <dep package="icon-naming-utils"/> | ||
195 | </dependencies> | ||
196 | </autotools> | ||
197 | <autotools id="tango-icon-theme-extras"> | ||
198 | <branch repo="tango.freedesktop.org"/> | ||
199 | <dependencies> | ||
200 | <dep package="tango-icon-theme"/> | ||
201 | </dependencies> | ||
202 | </autotools> | ||
203 | |||
204 | <autotools id="startup-notification"> | ||
205 | <branch repo="startup-notification.freedesktop.org"/> | ||
206 | </autotools> | ||
207 | |||
208 | <autotools id="RenderProto"> | ||
209 | <branch repo="git.freedesktop.org" | ||
210 | module="xorg/proto/renderproto" checkoutdir="RenderProto" /> | ||
211 | </autotools> | ||
212 | <autotools id="libXrender" supports-non-srcdir-builds="no"> | ||
213 | <branch repo="git.freedesktop.org" | ||
214 | module="xorg/lib/libXrender" checkoutdir="libXrender" /> | ||
215 | <dependencies> | ||
216 | <dep package="RenderProto"/> | ||
217 | </dependencies> | ||
218 | </autotools> | ||
219 | <autotools id="libXft" supports-non-srcdir-builds="no"> | ||
220 | <branch repo="git.freedesktop.org" | ||
221 | module="xorg/lib/libXft" checkoutdir="libXft" /> | ||
222 | <dependencies> | ||
223 | <dep package="fontconfig"/> | ||
224 | <dep package="libXrender"/> | ||
225 | </dependencies> | ||
226 | </autotools> | ||
227 | |||
228 | <autotools id="poppler"> | ||
229 | <branch repo="poppler.freedesktop.org"/> | ||
230 | <dependencies> | ||
231 | <dep package="cairo"/> | ||
232 | </dependencies> | ||
233 | </autotools> | ||
234 | |||
235 | <autotools id="poppler-0-4"> | ||
236 | <branch repo="poppler.freedesktop.org" module="poppler" | ||
237 | revision="POPPLER_0_4_X" checkoutdir="poppler-0-4"/> | ||
238 | <dependencies> | ||
239 | <dep package="cairo-1-0"/> | ||
240 | </dependencies> | ||
241 | </autotools> | ||
242 | |||
243 | <perl id="perl-net-dbus"> | ||
244 | <branch repo="cpan" | ||
245 | module="authors/id/D/DA/DANBERR/Net-DBus-0.33.2.tar.gz" version="0.33.2" | ||
246 | size="83279" md5sum="7e722c48c4bca7740cf28512287571b7"/> | ||
247 | <dependencies> | ||
248 | <dep package="dbus"/> | ||
249 | </dependencies> | ||
250 | </perl> | ||
251 | |||
252 | <autotools id="system-tools-backends"> | ||
253 | <branch repo="system-tools-backends.freedesktop.org" | ||
254 | revision="BEFORE_DBUS_MERGE"/> | ||
255 | <suggests> | ||
256 | <dep package="perl-net-dbus"/> | ||
257 | </suggests> | ||
258 | </autotools> | ||
259 | |||
260 | <autotools id="system-tools-backends-1.4"> | ||
261 | <branch repo="system-tools-backends.freedesktop.org" | ||
262 | module="system-tools-backends" revision="stb-1-4" | ||
263 | checkoutdir="system-tools-backends-1.4"/> | ||
264 | </autotools> | ||
265 | |||
266 | <autotools id="libdaemon"> | ||
267 | <branch repo="libdaemon.0pointer.de" module="trunk" checkoutdir="libdaemon"/> | ||
268 | </autotools> | ||
269 | |||
270 | <!-- explicit disabling of qt3 and qt4 can be removed once avahi | ||
271 | correctly detects what is available. --> | ||
272 | <autotools id="avahi" autogenargs="--disable-qt3 --disable-qt4 --disable-mono --disable-monodoc --disable-manpages --enable-compat-howl --enable-compat-libdns_sd"> | ||
273 | <branch repo="avahi.0pointer.de" module="trunk" checkoutdir="avahi"/> | ||
274 | <dependencies> | ||
275 | <dep package="libdaemon"/> | ||
276 | <dep package="dbus-python"/> | ||
277 | <dep package="pygtk"/> | ||
278 | </dependencies> | ||
279 | </autotools> | ||
280 | |||
281 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gcj.modules b/scripts/jhbuild/modulesets/gcj.modules new file mode 100644 index 0000000000..01b35c6b62 --- /dev/null +++ b/scripts/jhbuild/modulesets/gcj.modules | |||
@@ -0,0 +1,135 @@ | |||
1 | <?xml version="1.0" standalone="no"?> <!--*- mode: nxml -*--> | ||
2 | <!DOCTYPE moduleset SYSTEM "moduleset.dtd"> | ||
3 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
4 | <moduleset> | ||
5 | |||
6 | <cvsroot name="gcc.gnu.org" | ||
7 | root=":pserver:anoncvs@gcc.gnu.org:/cvs/gcc" | ||
8 | password="" /> | ||
9 | <cvsroot name="rhug.sources.redhat.com" | ||
10 | root=":pserver:anoncvs@sources.redhat.com:/cvs/rhug" | ||
11 | password="" /> | ||
12 | <cvsroot name="gdb.sources.redhat.com" | ||
13 | root=":pserver:anoncvs@sources.redhat.com:/cvs/src" | ||
14 | password="anoncvs" /> | ||
15 | <cvsroot name="gnome.org" | ||
16 | root=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
17 | password="" /> | ||
18 | <cvsroot name="classpath.savannah.gnu.org" | ||
19 | root=":ext:anoncvs@savannah.gnu.org:/cvsroot/classpath" | ||
20 | password="" /> | ||
21 | <cvsroot name="cairo.freedesktop.org" | ||
22 | root=":pserver:anoncvs@cvs.freedesktop.org:/cvs/cairo" | ||
23 | password="" /> | ||
24 | |||
25 | <include href="gnome-2.12.modules" /> | ||
26 | |||
27 | <gdbmodule id="gdb" cvsroot="gdb.sources.redhat.com" /> | ||
28 | |||
29 | <gcjmodule id="gcj" cvsroot="gcc.gnu.org"> | ||
30 | <dependencies> | ||
31 | <dep package="cairo" /> | ||
32 | <dep package="gtk+" /> | ||
33 | </dependencies> | ||
34 | </gcjmodule> | ||
35 | |||
36 | <cvsmodule id="java-gcj-compat" cvsroot="rhug.sources.redhat.com"> | ||
37 | <dependencies> | ||
38 | <dep package="ecj-for-jhbuild" /> | ||
39 | <dep package="gjdoc" /> | ||
40 | </dependencies> | ||
41 | </cvsmodule> | ||
42 | |||
43 | <cvsmodule id="ecj-for-jhbuild" cvsroot="rhug.sources.redhat.com" | ||
44 | supports-non-srcdir-builds="no"> | ||
45 | <dependencies> | ||
46 | <dep package="gcj" /> | ||
47 | </dependencies> | ||
48 | </cvsmodule> | ||
49 | |||
50 | <cvsmodule id="gjdoc" cvsroot="classpath.savannah.gnu.org" > | ||
51 | <dependencies> | ||
52 | <dep package="gcj" /> | ||
53 | </dependencies> | ||
54 | </cvsmodule> | ||
55 | |||
56 | <cvsmodule id="jg-common" cvsroot="gnome.org"> | ||
57 | <suggests> | ||
58 | <dep package="gcj" /> | ||
59 | </suggests> | ||
60 | <dependencies> | ||
61 | <dep package="glib" /> | ||
62 | </dependencies> | ||
63 | </cvsmodule> | ||
64 | |||
65 | <cvsmodule id="cairo-java" cvsroot="cairo.freedesktop.org"> | ||
66 | <suggests> | ||
67 | <dep package="gcj" /> | ||
68 | </suggests> | ||
69 | <dependencies> | ||
70 | <dep package="jg-common" /> | ||
71 | <dep package="cairo" /> | ||
72 | </dependencies> | ||
73 | </cvsmodule> | ||
74 | |||
75 | <cvsmodule id="libgtk-java" cvsroot="gnome.org"> | ||
76 | <suggests> | ||
77 | <dep package="gcj" /> | ||
78 | </suggests> | ||
79 | <dependencies> | ||
80 | <dep package="jg-common" /> | ||
81 | <dep package="cairo-java" /> | ||
82 | </dependencies> | ||
83 | </cvsmodule> | ||
84 | |||
85 | <cvsmodule id="libgnomevfs-java" cvsroot="gnome.org"> | ||
86 | <suggests> | ||
87 | <dep package="gcj" /> | ||
88 | </suggests> | ||
89 | <dependencies> | ||
90 | <dep package="libgtk-java" /> | ||
91 | </dependencies> | ||
92 | </cvsmodule> | ||
93 | |||
94 | <cvsmodule id="libgnome-java" cvsroot="gnome.org"> | ||
95 | <suggests> | ||
96 | <dep package="gcj" /> | ||
97 | </suggests> | ||
98 | <dependencies> | ||
99 | <dep package="libgnome" /> | ||
100 | <dep package="libgnomeui" /> | ||
101 | <dep package="libgnomecanvas" /> | ||
102 | <dep package="libgtk-java" /> | ||
103 | </dependencies> | ||
104 | </cvsmodule> | ||
105 | |||
106 | <cvsmodule id="libglade-java" cvsroot="gnome.org"> | ||
107 | <suggests> | ||
108 | <dep package="gcj" /> | ||
109 | </suggests> | ||
110 | <dependencies> | ||
111 | <dep package="libgtk-java" /> | ||
112 | <dep package="libgnome-java" /> | ||
113 | </dependencies> | ||
114 | </cvsmodule> | ||
115 | |||
116 | <cvsmodule id="libgconf-java" cvsroot="gnome.org"> | ||
117 | <suggests> | ||
118 | <dep package="gcj" /> | ||
119 | </suggests> | ||
120 | <dependencies> | ||
121 | <dep package="libgtk-java" /> | ||
122 | <dep package="libgnome-java" /> | ||
123 | </dependencies> | ||
124 | </cvsmodule> | ||
125 | |||
126 | <metamodule id="java-gnome"> | ||
127 | <dependencies> | ||
128 | <dep package="libgtk-java" /> | ||
129 | <dep package="libgnome-java" /> | ||
130 | <dep package="libglade-java" /> | ||
131 | <dep package="libgconf-java" /> | ||
132 | </dependencies> | ||
133 | </metamodule> | ||
134 | |||
135 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gnome-2.10.modules b/scripts/jhbuild/modulesets/gnome-2.10.modules new file mode 100644 index 0000000000..4d2043203a --- /dev/null +++ b/scripts/jhbuild/modulesets/gnome-2.10.modules | |||
@@ -0,0 +1,1621 @@ | |||
1 | <?xml version="1.0"?><!--*- mode: nxml -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | |||
5 | <repository type="cvs" name="gnome.org" default="yes" | ||
6 | cvsroot=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
7 | password=""/> | ||
8 | <repository type="cvs" name="cairo.freedesktop.org" | ||
9 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/cairo" | ||
10 | password=""/> | ||
11 | <repository type="cvs" name="mozilla.org" | ||
12 | cvsroot=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" | ||
13 | password="anonymous"/> | ||
14 | <repository type="cvs" name="gstreamer.freedesktop.org" | ||
15 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer" | ||
16 | password=""/> | ||
17 | <repository type="cvs" name="menu.freedesktop.org" | ||
18 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/menus" | ||
19 | password=""/> | ||
20 | <repository type="cvs" name="mime.freedesktop.org" | ||
21 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/mime" | ||
22 | password=""/> | ||
23 | <repository type="cvs" name="xklavier.freedesktop.org" | ||
24 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xklavier" | ||
25 | password=""/> | ||
26 | |||
27 | <repository type="cvs" name="elysium-project.sf.net" | ||
28 | cvsroot=":pserver:anonymous@elysium-project.cvs.sourceforge.net:/cvsroot/elysium-project" | ||
29 | password=""/> | ||
30 | <repository type="cvs" name="gaim.sf.net" | ||
31 | cvsroot=":pserver:anonymous@gaim.cvs.sourceforge.net:/cvsroot/gaim" | ||
32 | password=""/> | ||
33 | <repository type="cvs" name="clearlooks.sf.net" | ||
34 | cvsroot=":pserver:anonymous@clearlooks.cvs.sourceforge.net:/cvsroot/clearlooks" | ||
35 | password=""/> | ||
36 | |||
37 | <repository type="arch" name="rhythmbox" | ||
38 | archive="rhythmbox-devel@gnome.org--2004" | ||
39 | href="http://web.rhythmbox.org/arch/2004"/> | ||
40 | |||
41 | <tarball id="scrollkeeper" version="0.3.14" supports-non-srcdir-builds="no"> | ||
42 | <source href="http://unc.dl.sourceforge.net/sourceforge/scrollkeeper/scrollkeeper-0.3.14.tar.gz" | ||
43 | size="679513" md5sum="161eb3f29e30e7b24f84eb93ac696155"/> | ||
44 | <dependencies> | ||
45 | <dep package="libxml2"/> | ||
46 | <dep package="libxslt"/> | ||
47 | <dep package="intltool"/> | ||
48 | </dependencies> | ||
49 | <patches> | ||
50 | <patch file="scrollkeeper_clean_xml_validation_context.patch" strip="1"/> | ||
51 | <patch file="scrollkeeper_language_fix.patch" strip="1"/> | ||
52 | <patch file="scrollkeeper_rw_offset_fix.patch" strip="1"/> | ||
53 | </patches> | ||
54 | </tarball> | ||
55 | |||
56 | <include href="freedesktop.modules"/> | ||
57 | <include href="gnutls.modules"/> | ||
58 | |||
59 | <autotools id="cairo-gtk-engine"> | ||
60 | <branch repo="cairo.freedesktop.org"/> | ||
61 | <dependencies> | ||
62 | <dep package="gtk+"/> | ||
63 | <dep package="cairo"/> | ||
64 | </dependencies> | ||
65 | </autotools> | ||
66 | |||
67 | <autotools id="shared-mime-info" supports-non-srcdir-builds="no"> | ||
68 | <branch repo="mime.freedesktop.org"/> | ||
69 | <dependencies> | ||
70 | <dep package="intltool"/> | ||
71 | </dependencies> | ||
72 | </autotools> | ||
73 | |||
74 | <autotools id="desktop-file-utils"> | ||
75 | <branch repo="menu.freedesktop.org"/> | ||
76 | <dependencies> | ||
77 | <dep package="glib"/> | ||
78 | <dep package="intltool"/> | ||
79 | </dependencies> | ||
80 | </autotools> | ||
81 | |||
82 | <autotools id="libxklavier" supports-non-srcdir-builds="no"> | ||
83 | <branch repo="xklavier.freedesktop.org"/> | ||
84 | </autotools> | ||
85 | |||
86 | <autotools id="intltool"> | ||
87 | <branch/> | ||
88 | <dependencies> | ||
89 | <dep package="gnome-common"/> | ||
90 | </dependencies> | ||
91 | </autotools> | ||
92 | <autotools id="gnome-common"> | ||
93 | <branch revision="gnome-2-12"/> | ||
94 | </autotools> | ||
95 | <autotools id="libxml2"> | ||
96 | <branch module="gnome-xml" checkoutdir="libxml2"/> | ||
97 | </autotools> | ||
98 | <autotools id="libxslt"> | ||
99 | <branch/> | ||
100 | <dependencies> | ||
101 | <dep package="libxml2"/> | ||
102 | </dependencies> | ||
103 | </autotools> | ||
104 | <autotools id="gtk-doc"> | ||
105 | <branch/> | ||
106 | <dependencies> | ||
107 | <dep package="libxslt"/> | ||
108 | </dependencies> | ||
109 | </autotools> | ||
110 | <autotools id="glib"> | ||
111 | <branch revision="glib-2-6"/> | ||
112 | <dependencies> | ||
113 | <dep package="gtk-doc"/> | ||
114 | </dependencies> | ||
115 | </autotools> | ||
116 | <autotools id="pango"> | ||
117 | <branch revision="pango-1-8"/> | ||
118 | <dependencies> | ||
119 | <dep package="glib"/> | ||
120 | <dep package="libXft"/> | ||
121 | </dependencies> | ||
122 | </autotools> | ||
123 | <autotools id="atk"> | ||
124 | <branch revision="gnome-2-10"/> | ||
125 | <dependencies> | ||
126 | <dep package="glib"/> | ||
127 | </dependencies> | ||
128 | </autotools> | ||
129 | <autotools id="gtk+"> | ||
130 | <branch revision="gtk-2-6"/> | ||
131 | <dependencies> | ||
132 | <dep package="pango"/> | ||
133 | <dep package="atk"/> | ||
134 | <dep package="shared-mime-info"/> | ||
135 | </dependencies> | ||
136 | </autotools> | ||
137 | <autotools id="gail"> | ||
138 | <branch/> | ||
139 | <dependencies> | ||
140 | <dep package="gtk+"/> | ||
141 | <dep package="atk"/> | ||
142 | <dep package="libgnomecanvas"/> | ||
143 | </dependencies> | ||
144 | </autotools> | ||
145 | <autotools id="gtkhtml2"> | ||
146 | <branch/> | ||
147 | <dependencies> | ||
148 | <dep package="gtk+"/> | ||
149 | <dep package="libxml2"/> | ||
150 | <dep package="gail"/> | ||
151 | </dependencies> | ||
152 | </autotools> | ||
153 | <autotools id="libIDL"> | ||
154 | <branch/> | ||
155 | <dependencies> | ||
156 | <dep package="glib"/> | ||
157 | </dependencies> | ||
158 | </autotools> | ||
159 | <autotools id="ORBit2"> | ||
160 | <branch revision="gnome-2-10"/> | ||
161 | <dependencies> | ||
162 | <dep package="libIDL"/> | ||
163 | <dep package="gnome-common"/> | ||
164 | </dependencies> | ||
165 | </autotools> | ||
166 | <autotools id="gconf"> | ||
167 | <branch revision="gnome-2-10"/> | ||
168 | <dependencies> | ||
169 | <dep package="ORBit2"/> | ||
170 | <dep package="libxml2"/> | ||
171 | <dep package="gtk+"/> | ||
172 | </dependencies> | ||
173 | </autotools> | ||
174 | <autotools id="libbonobo"> | ||
175 | <branch revision="gnome-2-10"/> | ||
176 | <dependencies> | ||
177 | <dep package="ORBit2"/> | ||
178 | <dep package="intltool"/> | ||
179 | <dep package="gnome-common"/> | ||
180 | <dep package="libxml2"/> | ||
181 | </dependencies> | ||
182 | </autotools> | ||
183 | <autotools id="gnome-mime-data"> | ||
184 | <branch/> | ||
185 | <dependencies> | ||
186 | <dep package="gnome-common"/> | ||
187 | </dependencies> | ||
188 | </autotools> | ||
189 | <autotools id="gnome-icon-theme"> | ||
190 | <branch revision="gnome-2-10"/> | ||
191 | <dependencies> | ||
192 | <dep package="hicolor-icon-theme"/> | ||
193 | </dependencies> | ||
194 | </autotools> | ||
195 | <tarball id="howl" version="1.0.0"> | ||
196 | <source href="http://www.porchdogsoft.com/download/howl-1.0.0.tar.gz" | ||
197 | size="542782" md5sum="c389d3ffba0e69a179de2ec650f1fdcc"/> | ||
198 | <patches> | ||
199 | <patch file="howl-1.0.0-buildfix.patch" strip="1"/> | ||
200 | </patches> | ||
201 | </tarball> | ||
202 | <autotools id="gnome-vfs"> | ||
203 | <branch revision="gnome-2-10"/> | ||
204 | <dependencies> | ||
205 | <dep package="libbonobo"/> | ||
206 | <dep package="gconf"/> | ||
207 | <dep package="desktop-file-utils"/> | ||
208 | <dep package="shared-mime-info"/> | ||
209 | <dep package="gnome-mime-data"/> | ||
210 | <dep package="howl"/> | ||
211 | <dep package="hal-0.4"/> | ||
212 | </dependencies> | ||
213 | </autotools> | ||
214 | <autotools id="gnome-keyring"> | ||
215 | <branch/> | ||
216 | <dependencies> | ||
217 | <dep package="gtk+"/> | ||
218 | </dependencies> | ||
219 | </autotools> | ||
220 | <autotools id="libart_lgpl"> | ||
221 | <branch/> | ||
222 | </autotools> | ||
223 | <autotools id="libgnome"> | ||
224 | <branch revision="gnome-2-10"/> | ||
225 | <dependencies> | ||
226 | <dep package="libxml2"/> | ||
227 | <dep package="libxslt"/> | ||
228 | <dep package="libbonobo"/> | ||
229 | <dep package="gnome-vfs"/> | ||
230 | <dep package="gconf"/> | ||
231 | <dep package="esound"/> | ||
232 | </dependencies> | ||
233 | </autotools> | ||
234 | <autotools id="libgnomecanvas"> | ||
235 | <branch revision="gnome-2-10"/> | ||
236 | <dependencies> | ||
237 | <dep package="gtk+"/> | ||
238 | <dep package="libart_lgpl"/> | ||
239 | <dep package="libglade"/> | ||
240 | <dep package="gnome-common"/> | ||
241 | </dependencies> | ||
242 | </autotools> | ||
243 | <autotools id="libbonoboui"> | ||
244 | <branch revision="gnome-2-10"/> | ||
245 | <dependencies> | ||
246 | <dep package="libgnome"/> | ||
247 | <dep package="libbonobo"/> | ||
248 | <dep package="libgnomecanvas"/> | ||
249 | <dep package="libglade"/> | ||
250 | </dependencies> | ||
251 | </autotools> | ||
252 | <autotools id="libgnomeui"> | ||
253 | <branch revision="gnome-2-10"/> | ||
254 | <dependencies> | ||
255 | <dep package="libbonoboui"/> | ||
256 | <dep package="libglade"/> | ||
257 | <dep package="gnome-icon-theme"/> | ||
258 | <dep package="gnome-keyring"/> | ||
259 | </dependencies> | ||
260 | </autotools> | ||
261 | <autotools id="libglade"> | ||
262 | <branch/> | ||
263 | <dependencies> | ||
264 | <dep package="gtk+"/> | ||
265 | <dep package="libxml2"/> | ||
266 | </dependencies> | ||
267 | </autotools> | ||
268 | <autotools id="pygtk" supports-non-srcdir-builds="no"> | ||
269 | <branch revision="pygtk-2-6"/> | ||
270 | <dependencies> | ||
271 | <dep package="gtk+"/> | ||
272 | <dep package="libglade"/> | ||
273 | </dependencies> | ||
274 | </autotools> | ||
275 | <autotools id="pyorbit"> | ||
276 | <branch/> | ||
277 | <dependencies> | ||
278 | <dep package="ORBit2"/> | ||
279 | </dependencies> | ||
280 | </autotools> | ||
281 | <autotools id="gnome-python"> | ||
282 | <branch/> | ||
283 | <dependencies> | ||
284 | <dep package="pygtk"/> | ||
285 | <dep package="pyorbit"/> | ||
286 | <dep package="libgnomecanvas"/> | ||
287 | <dep package="libgnomeui"/> | ||
288 | </dependencies> | ||
289 | </autotools> | ||
290 | <autotools id="gnome-python-extras"> | ||
291 | <branch/> | ||
292 | <dependencies> | ||
293 | <dep package="pygtk"/> | ||
294 | <dep package="gnome-python"/> | ||
295 | <dep package="gnome-panel"/> | ||
296 | <dep package="gtkhtml2"/> | ||
297 | <dep package="libgnomeprint"/> | ||
298 | <dep package="libgnomeprintui"/> | ||
299 | <dep package="gtksourceview"/> | ||
300 | <dep package="libwnck"/> | ||
301 | </dependencies> | ||
302 | </autotools> | ||
303 | <autotools id="bug-buddy"> | ||
304 | <branch revision="gnome-2-10"/> | ||
305 | <dependencies> | ||
306 | <dep package="libgnomeui"/> | ||
307 | <dep package="gnome-menus"/> | ||
308 | </dependencies> | ||
309 | </autotools> | ||
310 | <autotools id="libwnck"> | ||
311 | <branch revision="gnome-2-10"/> | ||
312 | <dependencies> | ||
313 | <dep package="gtk+"/> | ||
314 | <dep package="startup-notification"/> | ||
315 | </dependencies> | ||
316 | </autotools> | ||
317 | <autotools id="gnome-desktop" autogenargs="--with-gnome-distributor=JHBuild"> | ||
318 | <branch revision="gnome-2-10"/> | ||
319 | <dependencies> | ||
320 | <dep package="libgnomeui"/> | ||
321 | <dep package="startup-notification"/> | ||
322 | <dep package="gnome-themes"/> | ||
323 | <dep package="scrollkeeper"/> | ||
324 | </dependencies> | ||
325 | </autotools> | ||
326 | <autotools id="gnome-menus"> | ||
327 | <branch revision="gnome-2-10"/> | ||
328 | <dependencies> | ||
329 | <dep package="gnome-vfs"/> | ||
330 | </dependencies> | ||
331 | </autotools> | ||
332 | <autotools id="gnome-panel"> | ||
333 | <branch revision="gnome-2-10"/> | ||
334 | <dependencies> | ||
335 | <dep package="scrollkeeper"/> | ||
336 | <dep package="libgnomeui"/> | ||
337 | <dep package="gnome-desktop"/> | ||
338 | <dep package="libwnck"/> | ||
339 | <dep package="evolution-data-server"/> | ||
340 | <dep package="gnome-menus"/> | ||
341 | </dependencies> | ||
342 | </autotools> | ||
343 | <autotools id="gnome-session"> | ||
344 | <branch revision="gnome-2-10"/> | ||
345 | <dependencies> | ||
346 | <dep package="libgnomeui"/> | ||
347 | <dep package="libwnck"/> | ||
348 | <dep package="esound"/> | ||
349 | </dependencies> | ||
350 | </autotools> | ||
351 | <autotools id="gnome-applets"> | ||
352 | <branch revision="gnome-2-10"/> | ||
353 | <dependencies> | ||
354 | <dep package="gnome-panel"/> | ||
355 | <dep package="libgtop"/> | ||
356 | <dep package="gail"/> | ||
357 | <dep package="libxklavier"/> | ||
358 | <dep package="gstreamer"/> | ||
359 | <dep package="gst-plugins"/> | ||
360 | <dep package="gucharmap"/> | ||
361 | <dep package="system-tools-backends"/> | ||
362 | </dependencies> | ||
363 | </autotools> | ||
364 | <autotools id="gnome-games"> | ||
365 | <branch revision="gnome-2-10"/> | ||
366 | <dependencies> | ||
367 | <dep package="librsvg"/> | ||
368 | <dep package="scrollkeeper"/> | ||
369 | <dep package="libgnomeui"/> | ||
370 | <dep package="gob"/> | ||
371 | </dependencies> | ||
372 | </autotools> | ||
373 | <autotools id="libcroco" supports-non-srcdir-builds="no"> | ||
374 | <branch/> | ||
375 | <dependencies> | ||
376 | <dep package="libxml2"/> | ||
377 | <dep package="pango"/> | ||
378 | </dependencies> | ||
379 | </autotools> | ||
380 | <autotools id="librsvg" supports-non-srcdir-builds="no"> | ||
381 | <branch revision="gnome-2-10"/> | ||
382 | <dependencies> | ||
383 | <dep package="libxml2"/> | ||
384 | <dep package="gtk+"/> | ||
385 | <dep package="libart_lgpl"/> | ||
386 | <dep package="gnome-common"/> | ||
387 | <dep package="libgsf"/> | ||
388 | <dep package="libcroco"/> | ||
389 | <dep package="libgnomeprintui"/> | ||
390 | </dependencies> | ||
391 | </autotools> | ||
392 | <autotools id="eel"> | ||
393 | <branch revision="gnome-2-10"/> | ||
394 | <dependencies> | ||
395 | <dep package="librsvg"/> | ||
396 | <dep package="libgnomeui"/> | ||
397 | <dep package="gail"/> | ||
398 | <dep package="gnome-menus"/> | ||
399 | </dependencies> | ||
400 | </autotools> | ||
401 | <autotools id="nautilus"> | ||
402 | <branch revision="gnome-2-10"/> | ||
403 | <dependencies> | ||
404 | <dep package="scrollkeeper"/> | ||
405 | <dep package="esound"/> | ||
406 | <dep package="eel"/> | ||
407 | <dep package="librsvg"/> | ||
408 | <dep package="libgnomeui"/> | ||
409 | <dep package="gnome-desktop"/> | ||
410 | </dependencies> | ||
411 | </autotools> | ||
412 | <autotools id="nautilus-cd-burner"> | ||
413 | <branch revision="gnome-2-10"/> | ||
414 | <dependencies> | ||
415 | <dep package="nautilus"/> | ||
416 | </dependencies> | ||
417 | </autotools> | ||
418 | <autotools id="nautilus-media" supports-non-srcdir-builds="no"> | ||
419 | <branch/> | ||
420 | <dependencies> | ||
421 | <dep package="nautilus"/> | ||
422 | <dep package="gstreamer"/> | ||
423 | <dep package="gst-plugins"/> | ||
424 | </dependencies> | ||
425 | </autotools> | ||
426 | <autotools id="nautilus-vcs"> | ||
427 | <branch/> | ||
428 | <dependencies> | ||
429 | <dep package="nautilus"/> | ||
430 | </dependencies> | ||
431 | </autotools> | ||
432 | <autotools id="metacity"> | ||
433 | <branch revision="gnome-2-10"/> | ||
434 | <dependencies> | ||
435 | <dep package="gtk+"/> | ||
436 | <dep package="gconf"/> | ||
437 | <dep package="intltool"/> | ||
438 | <dep package="libglade"/> | ||
439 | </dependencies> | ||
440 | </autotools> | ||
441 | <autotools id="libgtop"> | ||
442 | <branch revision="gnome-2-10"/> | ||
443 | <dependencies> | ||
444 | <dep package="glib"/> | ||
445 | </dependencies> | ||
446 | </autotools> | ||
447 | <autotools id="gnome-system-monitor"> | ||
448 | <branch revision="gnome-2-10"/> | ||
449 | <dependencies> | ||
450 | <dep package="libgnomeui"/> | ||
451 | <dep package="libwnck"/> | ||
452 | <dep package="libgtop"/> | ||
453 | </dependencies> | ||
454 | </autotools> | ||
455 | <autotools id="gnome-control-center" supports-non-srcdir-builds="no"> | ||
456 | <branch revision="gnome-2-10"/> | ||
457 | <dependencies> | ||
458 | <dep package="libgnomeui"/> | ||
459 | <dep package="esound"/> | ||
460 | <dep package="gnome-desktop"/> | ||
461 | <dep package="metacity"/> | ||
462 | <dep package="nautilus"/> | ||
463 | <dep package="libxklavier"/> | ||
464 | <dep package="gnome-menus"/> | ||
465 | </dependencies> | ||
466 | </autotools> | ||
467 | <autotools id="yelp"> | ||
468 | <branch revision="gnome-2-10"/> | ||
469 | <dependencies> | ||
470 | <dep package="scrollkeeper"/> | ||
471 | <dep package="libgnomeui"/> | ||
472 | <dep package="gtkhtml2"/> | ||
473 | <dep package="gnome-vfs"/> | ||
474 | <dep package="gnome-doc-utils"/> | ||
475 | <dep package="mozilla"/> | ||
476 | </dependencies> | ||
477 | </autotools> | ||
478 | <autotools id="devhelp"> | ||
479 | <branch/> | ||
480 | <dependencies> | ||
481 | <dep package="libgnomeui"/> | ||
482 | <dep package="gnome-vfs"/> | ||
483 | <dep package="mozilla"/> | ||
484 | </dependencies> | ||
485 | </autotools> | ||
486 | <autotools id="gnome-utils"> | ||
487 | <branch revision="gnome-2-10"/> | ||
488 | <dependencies> | ||
489 | <dep package="libgnomeui"/> | ||
490 | <dep package="gnome-panel"/> | ||
491 | </dependencies> | ||
492 | </autotools> | ||
493 | <autotools id="gconf-editor" supports-non-srcdir-builds="no"> | ||
494 | <branch/> | ||
495 | <dependencies> | ||
496 | <dep package="libgnomeui"/> | ||
497 | <dep package="gconf"/> | ||
498 | </dependencies> | ||
499 | </autotools> | ||
500 | <tarball id="audiofile" version="0.2.6" supports-non-srcdir-builds="no"> | ||
501 | <source href="http://www.68k.org/~michael/audiofile/audiofile-0.2.6.tar.gz" | ||
502 | size="374688" md5sum="9c1049876cd51c0f1b12c2886cce4d42"/> | ||
503 | </tarball> | ||
504 | <autotools id="esound"> | ||
505 | <branch/> | ||
506 | <dependencies> | ||
507 | <dep package="audiofile"/> | ||
508 | </dependencies> | ||
509 | </autotools> | ||
510 | <autotools id="gnome-media"> | ||
511 | <branch revision="gnome-2-10"/> | ||
512 | <dependencies> | ||
513 | <dep package="scrollkeeper"/> | ||
514 | <dep package="libgnomeui"/> | ||
515 | <dep package="esound"/> | ||
516 | <dep package="gail"/> | ||
517 | <dep package="gstreamer"/> | ||
518 | <dep package="gst-plugins"/> | ||
519 | <dep package="nautilus-cd-burner"/> | ||
520 | </dependencies> | ||
521 | </autotools> | ||
522 | <autotools id="gdm2"> | ||
523 | <branch revision="gnome-2-10"/> | ||
524 | <dependencies> | ||
525 | <dep package="librsvg"/> | ||
526 | </dependencies> | ||
527 | </autotools> | ||
528 | <autotools id="vte"> | ||
529 | <branch/> | ||
530 | <dependencies> | ||
531 | <dep package="gtk+"/> | ||
532 | </dependencies> | ||
533 | </autotools> | ||
534 | <autotools id="gnome-terminal"> | ||
535 | <branch revision="gnome-2-10"/> | ||
536 | <dependencies> | ||
537 | <dep package="libglade"/> | ||
538 | <dep package="libgnomeui"/> | ||
539 | <dep package="vte"/> | ||
540 | <dep package="startup-notification"/> | ||
541 | </dependencies> | ||
542 | </autotools> | ||
543 | <autotools id="gtk-engines"> | ||
544 | <branch revision="gtk-engines-2-6"/> | ||
545 | <dependencies> | ||
546 | <dep package="gtk+"/> | ||
547 | </dependencies> | ||
548 | </autotools> | ||
549 | <autotools id="libgnomeprint"> | ||
550 | <branch revision="gnome-2-10"/> | ||
551 | <dependencies> | ||
552 | <dep package="intltool"/> | ||
553 | <dep package="libart_lgpl"/> | ||
554 | <dep package="glib"/> | ||
555 | <dep package="gnome-common"/> | ||
556 | <dep package="pango"/> | ||
557 | <dep package="libgnomecups"/> | ||
558 | </dependencies> | ||
559 | </autotools> | ||
560 | <autotools id="libgnomeprintui"> | ||
561 | <branch revision="gnome-2-10"/> | ||
562 | <dependencies> | ||
563 | <dep package="libgnomeprint"/> | ||
564 | <dep package="gtk+"/> | ||
565 | <dep package="libgnomecanvas"/> | ||
566 | <dep package="gnome-icon-theme"/> | ||
567 | </dependencies> | ||
568 | </autotools> | ||
569 | <autotools id="gedit"> | ||
570 | <branch revision="gnome-2-10"/> | ||
571 | <dependencies> | ||
572 | <dep package="scrollkeeper"/> | ||
573 | <dep package="libgnomeui"/> | ||
574 | <dep package="eel"/> | ||
575 | <dep package="libgnomeprintui"/> | ||
576 | <dep package="gtksourceview"/> | ||
577 | </dependencies> | ||
578 | </autotools> | ||
579 | <autotools id="gedit-plugins"> | ||
580 | <branch/> | ||
581 | <dependencies> | ||
582 | <dep package="gedit"/> | ||
583 | <dep package="libgnomeui"/> | ||
584 | <dep package="eel"/> | ||
585 | <dep package="libgnomeprintui"/> | ||
586 | </dependencies> | ||
587 | </autotools> | ||
588 | <autotools id="memprof"> | ||
589 | <branch/> | ||
590 | <dependencies> | ||
591 | <dep package="libgnomeui"/> | ||
592 | </dependencies> | ||
593 | </autotools> | ||
594 | <autotools id="eog"> | ||
595 | <branch revision="gnome-2-10"/> | ||
596 | <dependencies> | ||
597 | <dep package="eel"/> | ||
598 | <dep package="libgnomeui"/> | ||
599 | <dep package="libgnomeprint"/> | ||
600 | </dependencies> | ||
601 | </autotools> | ||
602 | <autotools id="gal"> | ||
603 | <branch revision="gnome-2-10"/> | ||
604 | <dependencies> | ||
605 | <dep package="libgnomeui"/> | ||
606 | <dep package="libgnomeprintui"/> | ||
607 | </dependencies> | ||
608 | </autotools> | ||
609 | <autotools id="libgsf"> | ||
610 | <branch/> | ||
611 | <dependencies> | ||
612 | <dep package="glib"/> | ||
613 | <dep package="gnome-vfs"/> | ||
614 | <dep package="libbonobo"/> | ||
615 | </dependencies> | ||
616 | </autotools> | ||
617 | <autotools id="goffice"> | ||
618 | <branch/> | ||
619 | <dependencies> | ||
620 | <dep package="glib"/> | ||
621 | <dep package="libgsf"/> | ||
622 | <dep package="libxml2"/> | ||
623 | <dep package="pango"/> | ||
624 | <dep package="libglade"/> | ||
625 | <dep package="libgnomeprint"/> | ||
626 | <dep package="libgnomeprintui"/> | ||
627 | <dep package="libart_lgpl"/> | ||
628 | </dependencies> | ||
629 | </autotools> | ||
630 | <autotools id="gnumeric"> | ||
631 | <branch/> | ||
632 | <dependencies> | ||
633 | <dep package="goffice"/> | ||
634 | <dep package="libgsf"/> | ||
635 | <dep package="libgda"/> | ||
636 | <dep package="pygtk"/> | ||
637 | <dep package="libgnomeprintui"/> | ||
638 | </dependencies> | ||
639 | </autotools> | ||
640 | <autotools id="gimp" autogenargs="--disable-print"> | ||
641 | <branch/> | ||
642 | <dependencies> | ||
643 | <dep package="gtk+"/> | ||
644 | <dep package="libart_lgpl"/> | ||
645 | </dependencies> | ||
646 | </autotools> | ||
647 | <autotools id="glade"> | ||
648 | <branch revision="gnome-2-10"/> | ||
649 | <dependencies> | ||
650 | <dep package="gtk+"/> | ||
651 | <dep package="libxml2"/> | ||
652 | <dep package="libgnomeui"/> | ||
653 | <dep package="libgnomeprintui"/> | ||
654 | </dependencies> | ||
655 | </autotools> | ||
656 | <autotools id="glade2c"> | ||
657 | <branch/> | ||
658 | <dependencies> | ||
659 | <dep package="gtk+"/> | ||
660 | <dep package="libxml2"/> | ||
661 | <dep package="libgnomeui"/> | ||
662 | </dependencies> | ||
663 | </autotools> | ||
664 | <autotools id="sawfish"> | ||
665 | <branch revision="gnome-2"/> | ||
666 | <dependencies> | ||
667 | <dep package="rep-gtk"/> | ||
668 | </dependencies> | ||
669 | </autotools> | ||
670 | <autotools id="rep-gtk"> | ||
671 | <branch/> | ||
672 | <dependencies> | ||
673 | <dep package="librep"/> | ||
674 | <dep package="gtk+"/> | ||
675 | </dependencies> | ||
676 | </autotools> | ||
677 | <autotools id="librep"> | ||
678 | <branch/> | ||
679 | </autotools> | ||
680 | <autotools id="rhythmbox"> | ||
681 | <branch repo="rhythmbox" module="rhythmbox--main--0.9" checkoutdir="rhythmbox"/> | ||
682 | <dependencies> | ||
683 | <dep package="libgnomeui"/> | ||
684 | <dep package="gst-plugins"/> | ||
685 | </dependencies> | ||
686 | </autotools> | ||
687 | <autotools id="gstreamer" autogenargs="-- --disable-plugin-builddir --disable-tests" supports-non-srcdir-builds="no"> | ||
688 | <branch repo="gstreamer.freedesktop.org" revision="BRANCH-GSTREAMER-0_8"/> | ||
689 | <dependencies> | ||
690 | <dep package="glib"/> | ||
691 | <dep package="libxml2"/> | ||
692 | </dependencies> | ||
693 | </autotools> | ||
694 | <autotools id="gst-plugins" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
695 | <branch repo="gstreamer.freedesktop.org" revision="BRANCH-GSTREAMER-0_8"/> | ||
696 | <dependencies> | ||
697 | <dep package="gstreamer"/> | ||
698 | <dep package="gnome-vfs"/> | ||
699 | <dep package="gtk+"/> | ||
700 | </dependencies> | ||
701 | </autotools> | ||
702 | <autotools id="planner"> | ||
703 | <branch/> | ||
704 | <dependencies> | ||
705 | <dep package="glib"/> | ||
706 | <dep package="libxml2"/> | ||
707 | <dep package="libgnomeui"/> | ||
708 | <dep package="libgnomeprintui"/> | ||
709 | <dep package="libgsf"/> | ||
710 | </dependencies> | ||
711 | </autotools> | ||
712 | <autotools id="file-roller"> | ||
713 | <branch revision="gnome-2-10"/> | ||
714 | <dependencies> | ||
715 | <dep package="scrollkeeper"/> | ||
716 | <dep package="nautilus"/> | ||
717 | </dependencies> | ||
718 | </autotools> | ||
719 | <autotools id="balsa"> | ||
720 | <branch revision="BALSA_2"/> | ||
721 | <dependencies> | ||
722 | <dep package="libgnomeui"/> | ||
723 | </dependencies> | ||
724 | </autotools> | ||
725 | <autotools id="pan"> | ||
726 | <branch/> | ||
727 | <dependencies> | ||
728 | <dep package="libgnomeui"/> | ||
729 | <dep package="gnet"/> | ||
730 | </dependencies> | ||
731 | </autotools> | ||
732 | <autotools id="gcalctool" supports-non-srcdir-builds="no"> | ||
733 | <branch revision="gnome-2-10"/> | ||
734 | <dependencies> | ||
735 | <dep package="scrollkeeper"/> | ||
736 | <dep package="libgnomeui"/> | ||
737 | </dependencies> | ||
738 | </autotools> | ||
739 | <autotools id="ggv" supports-non-srcdir-builds="no"> | ||
740 | <branch revision="gnome-2-10"/> | ||
741 | <dependencies> | ||
742 | <dep package="scrollkeeper"/> | ||
743 | <dep package="libgnomeui"/> | ||
744 | </dependencies> | ||
745 | </autotools> | ||
746 | <autotools id="ekiga"> | ||
747 | <branch revision="gnome-2-10"/> | ||
748 | <dependencies> | ||
749 | <dep package="libgnomeui"/> | ||
750 | </dependencies> | ||
751 | </autotools> | ||
752 | <autotools id="gucharmap" supports-non-srcdir-builds="no"> | ||
753 | <branch revision="gnome-2-10"/> | ||
754 | <dependencies> | ||
755 | <dep package="libgnomeui"/> | ||
756 | </dependencies> | ||
757 | </autotools> | ||
758 | <autotools id="gtksourceview"> | ||
759 | <branch revision="gnome-2-10"/> | ||
760 | <dependencies> | ||
761 | <dep package="gtk+"/> | ||
762 | <dep package="libxml2"/> | ||
763 | <dep package="libgnomeprint"/> | ||
764 | <dep package="gnome-vfs"/> | ||
765 | </dependencies> | ||
766 | </autotools> | ||
767 | <autotools id="glimmer"> | ||
768 | <branch/> | ||
769 | <dependencies> | ||
770 | <dep package="gtksourceview"/> | ||
771 | <dep package="libgnomeprint"/> | ||
772 | </dependencies> | ||
773 | </autotools> | ||
774 | <autotools id="gdl"> | ||
775 | <branch/> | ||
776 | <dependencies> | ||
777 | <dep package="libgnomeui"/> | ||
778 | <dep package="librsvg"/> | ||
779 | </dependencies> | ||
780 | </autotools> | ||
781 | <autotools id="gnome-build"> | ||
782 | <branch/> | ||
783 | <dependencies> | ||
784 | <dep package="gdl"/> | ||
785 | <dep package="gnome-vfs"/> | ||
786 | <dep package="gtkhtml2"/> | ||
787 | </dependencies> | ||
788 | </autotools> | ||
789 | <autotools id="gdl"> | ||
790 | <branch/> | ||
791 | <dependencies> | ||
792 | <dep package="glib"/> | ||
793 | </dependencies> | ||
794 | </autotools> | ||
795 | <autotools id="scaffold"> | ||
796 | <branch/> | ||
797 | <dependencies> | ||
798 | <dep package="libgnomeui"/> | ||
799 | <dep package="vte"/> | ||
800 | <dep package="gdl"/> | ||
801 | </dependencies> | ||
802 | </autotools> | ||
803 | <autotools id="libsigc++2"> | ||
804 | <branch/> | ||
805 | </autotools> | ||
806 | <autotools id="glibmm"> | ||
807 | <branch revision="glibmm-2-6"/> | ||
808 | <dependencies> | ||
809 | <dep package="glib"/> | ||
810 | <dep package="libsigc++2"/> | ||
811 | </dependencies> | ||
812 | </autotools> | ||
813 | <autotools id="gtkmm"> | ||
814 | <branch revision="gtkmm-2-6"/> | ||
815 | <dependencies> | ||
816 | <dep package="glibmm"/> | ||
817 | <dep package="gtk+"/> | ||
818 | </dependencies> | ||
819 | </autotools> | ||
820 | <autotools id="orbitcpp"> | ||
821 | <branch/> | ||
822 | <dependencies> | ||
823 | <dep package="ORBit2"/> | ||
824 | </dependencies> | ||
825 | </autotools> | ||
826 | <autotools id="gnomemm/libgnomemm"> | ||
827 | <branch/> | ||
828 | <dependencies> | ||
829 | <dep package="libgnome"/> | ||
830 | <dep package="gtkmm"/> | ||
831 | </dependencies> | ||
832 | </autotools> | ||
833 | <autotools id="gnomemm/libglademm"> | ||
834 | <branch/> | ||
835 | <dependencies> | ||
836 | <dep package="libglade"/> | ||
837 | <dep package="gtkmm"/> | ||
838 | </dependencies> | ||
839 | </autotools> | ||
840 | <autotools id="gnomemm/libbonobomm"> | ||
841 | <branch/> | ||
842 | <dependencies> | ||
843 | <dep package="libbonobo"/> | ||
844 | <dep package="gtkmm"/> | ||
845 | <dep package="orbitcpp"/> | ||
846 | </dependencies> | ||
847 | </autotools> | ||
848 | <autotools id="gnomemm/libbonobouimm"> | ||
849 | <branch/> | ||
850 | <dependencies> | ||
851 | <dep package="libbonoboui"/> | ||
852 | <dep package="gnomemm/libbonobomm"/> | ||
853 | </dependencies> | ||
854 | </autotools> | ||
855 | <autotools id="gnomemm/libgnomecanvasmm"> | ||
856 | <branch revision="gnome-2-10"/> | ||
857 | <dependencies> | ||
858 | <dep package="libgnomecanvas"/> | ||
859 | <dep package="gtkmm"/> | ||
860 | </dependencies> | ||
861 | </autotools> | ||
862 | <autotools id="gnomemm/gconfmm"> | ||
863 | <branch/> | ||
864 | <dependencies> | ||
865 | <dep package="gconf"/> | ||
866 | <dep package="gtkmm"/> | ||
867 | </dependencies> | ||
868 | </autotools> | ||
869 | <autotools id="gnomemm/libgnomeuimm"> | ||
870 | <branch/> | ||
871 | <dependencies> | ||
872 | <dep package="gtkmm"/> | ||
873 | <dep package="libgnomeui"/> | ||
874 | <dep package="gnomemm/libgnomemm"/> | ||
875 | <dep package="gnomemm/gconfmm"/> | ||
876 | <dep package="gnomemm/libgnomecanvasmm"/> | ||
877 | <dep package="gnomemm/libglademm"/> | ||
878 | <dep package="gnomemm/gnome-vfsmm"/> | ||
879 | </dependencies> | ||
880 | </autotools> | ||
881 | <autotools id="gnomemm/gnome-vfsmm"> | ||
882 | <branch/> | ||
883 | <dependencies> | ||
884 | <dep package="glibmm"/> | ||
885 | <dep package="gnome-vfs"/> | ||
886 | </dependencies> | ||
887 | </autotools> | ||
888 | <autotools id="gnomemm/libpanelappletmm"> | ||
889 | <branch/> | ||
890 | <dependencies> | ||
891 | <dep package="gtkmm"/> | ||
892 | </dependencies> | ||
893 | </autotools> | ||
894 | <autotools id="gnomemm/libgnomeprintmm"> | ||
895 | <branch/> | ||
896 | <dependencies> | ||
897 | <dep package="gtkmm"/> | ||
898 | <dep package="libgnomeprint"/> | ||
899 | </dependencies> | ||
900 | </autotools> | ||
901 | <autotools id="gnomemm/libgnomeprintuimm"> | ||
902 | <branch/> | ||
903 | <dependencies> | ||
904 | <dep package="gtkmm"/> | ||
905 | <dep package="gnomemm/libgnomeprintmm"/> | ||
906 | <dep package="libgnomeprintui"/> | ||
907 | </dependencies> | ||
908 | </autotools> | ||
909 | <autotools id="gnomemm/libgdamm"> | ||
910 | <branch revision="libgda-1-2"/> | ||
911 | <dependencies> | ||
912 | <dep package="gtkmm"/> | ||
913 | <dep package="libgda"/> | ||
914 | </dependencies> | ||
915 | </autotools> | ||
916 | <autotools id="gnomemm/gtkmm_hello"> | ||
917 | <branch/> | ||
918 | <dependencies> | ||
919 | <dep package="gtkmm"/> | ||
920 | </dependencies> | ||
921 | </autotools> | ||
922 | <autotools id="regexxer"> | ||
923 | <branch/> | ||
924 | <dependencies> | ||
925 | <dep package="intltool"/> | ||
926 | <dep package="gtkmm"/> | ||
927 | <dep package="gnomemm/gconfmm"/> | ||
928 | <dep package="gnomemm/libglademm"/> | ||
929 | </dependencies> | ||
930 | </autotools> | ||
931 | <autotools id="gnet" autogenargs="--enable-glib2"> | ||
932 | <branch revision="GNET_1_1"/> | ||
933 | <dependencies> | ||
934 | <dep package="glib"/> | ||
935 | </dependencies> | ||
936 | </autotools> | ||
937 | <autotools id="gnomeicu"> | ||
938 | <branch/> | ||
939 | <dependencies> | ||
940 | <dep package="libgnomeui"/> | ||
941 | </dependencies> | ||
942 | </autotools> | ||
943 | <autotools id="at-spi"> | ||
944 | <branch/> | ||
945 | <dependencies> | ||
946 | <dep package="libbonobo"/> | ||
947 | <dep package="gail"/> | ||
948 | </dependencies> | ||
949 | </autotools> | ||
950 | <autotools id="libgail-gnome"> | ||
951 | <branch/> | ||
952 | <dependencies> | ||
953 | <dep package="at-spi"/> | ||
954 | <dep package="libgnomeui"/> | ||
955 | <dep package="gnome-panel"/> | ||
956 | </dependencies> | ||
957 | </autotools> | ||
958 | <autotools id="at-poke"> | ||
959 | <branch/> | ||
960 | <dependencies> | ||
961 | <dep package="libgail-gnome"/> | ||
962 | </dependencies> | ||
963 | </autotools> | ||
964 | <autotools id="gnome-mag"> | ||
965 | <branch/> | ||
966 | <dependencies> | ||
967 | <dep package="at-spi"/> | ||
968 | </dependencies> | ||
969 | </autotools> | ||
970 | <autotools id="gok"> | ||
971 | <branch revision="gnome-2-10"/> | ||
972 | <dependencies> | ||
973 | <dep package="at-spi"/> | ||
974 | <dep package="libgnomeui"/> | ||
975 | <dep package="libwnck"/> | ||
976 | <dep package="esound"/> | ||
977 | <dep package="scrollkeeper"/> | ||
978 | </dependencies> | ||
979 | </autotools> | ||
980 | <autotools id="gnome-speech"> | ||
981 | <branch/> | ||
982 | <dependencies> | ||
983 | <dep package="libbonobo"/> | ||
984 | </dependencies> | ||
985 | </autotools> | ||
986 | <autotools id="gnopernicus"> | ||
987 | <branch revision="gnome-2-10"/> | ||
988 | <dependencies> | ||
989 | <dep package="gconf"/> | ||
990 | <dep package="libgnomeui"/> | ||
991 | <dep package="gnome-speech"/> | ||
992 | <dep package="gnome-mag"/> | ||
993 | </dependencies> | ||
994 | </autotools> | ||
995 | <autotools id="dasher" autogenargs="--with-a11y --with-gnome"> | ||
996 | <branch revision="gnome-2-10"/> | ||
997 | <dependencies> | ||
998 | <dep package="at-spi"/> | ||
999 | <dep package="libgnomeui"/> | ||
1000 | <dep package="gnome-speech"/> | ||
1001 | <dep package="gnome-vfs"/> | ||
1002 | </dependencies> | ||
1003 | </autotools> | ||
1004 | <metamodule id="meta-gnome-devel-platform"> | ||
1005 | <dependencies> | ||
1006 | <dep package="libgnome"/> | ||
1007 | <dep package="libbonobo"/> | ||
1008 | <dep package="libbonoboui"/> | ||
1009 | <dep package="libgnomeui"/> | ||
1010 | </dependencies> | ||
1011 | </metamodule> | ||
1012 | <metamodule id="meta-gnome-core"> | ||
1013 | <dependencies> | ||
1014 | <dep package="gnome-desktop"/> | ||
1015 | <dep package="gnome-panel"/> | ||
1016 | <dep package="gnome-session"/> | ||
1017 | <dep package="gnome-terminal"/> | ||
1018 | <dep package="gnome-applets"/> | ||
1019 | </dependencies> | ||
1020 | </metamodule> | ||
1021 | <metamodule id="meta-nautilus"> | ||
1022 | <dependencies> | ||
1023 | <dep package="nautilus"/> | ||
1024 | </dependencies> | ||
1025 | </metamodule> | ||
1026 | <metamodule id="meta-gnome-desktop"> | ||
1027 | <dependencies> | ||
1028 | <dep package="meta-gnome-core"/> | ||
1029 | <dep package="gnome-control-center"/> | ||
1030 | <dep package="meta-nautilus"/> | ||
1031 | <dep package="yelp"/> | ||
1032 | <dep package="bug-buddy"/> | ||
1033 | <dep package="gedit"/> | ||
1034 | <dep package="gtk-engines"/> | ||
1035 | <dep package="eog"/> | ||
1036 | <dep package="ggv"/> | ||
1037 | <dep package="metacity"/> | ||
1038 | <dep package="gconf-editor"/> | ||
1039 | <dep package="gnome-utils"/> | ||
1040 | <dep package="gnome-system-monitor"/> | ||
1041 | <dep package="gstreamer"/> | ||
1042 | <dep package="gnome-media"/> | ||
1043 | <dep package="gnome-netstatus"/> | ||
1044 | <dep package="gcalctool"/> | ||
1045 | <dep package="gpdf"/> | ||
1046 | <dep package="gucharmap"/> | ||
1047 | <dep package="nautilus-cd-burner"/> | ||
1048 | <dep package="zenity"/> | ||
1049 | <dep package="libgail-gnome"/> | ||
1050 | <dep package="gnopernicus"/> | ||
1051 | <dep package="gok"/> | ||
1052 | <dep package="epiphany"/> | ||
1053 | <dep package="gnome-games"/> | ||
1054 | <dep package="gnome-user-docs"/> | ||
1055 | <dep package="file-roller"/> | ||
1056 | <dep package="gnome-system-tools"/> | ||
1057 | <dep package="gnome-nettool"/> | ||
1058 | <dep package="vino"/> | ||
1059 | <dep package="gnome-volume-manager"/> | ||
1060 | <dep package="totem"/> | ||
1061 | <dep package="gnome-menus"/> | ||
1062 | <dep package="gnome-backgrounds"/> | ||
1063 | <dep package="sound-juicer"/> | ||
1064 | <dep package="totem"/> | ||
1065 | <dep package="evolution"/> | ||
1066 | <dep package="evolution-webcal"/> | ||
1067 | <dep package="ekiga"/> | ||
1068 | |||
1069 | </dependencies> | ||
1070 | </metamodule> | ||
1071 | <metamodule id="meta-gnome-devel-tools"> | ||
1072 | <dependencies> | ||
1073 | <dep package="glade"/> | ||
1074 | <dep package="memprof"/> | ||
1075 | <dep package="gconf-editor"/> | ||
1076 | <dep package="devhelp"/> | ||
1077 | <dep package="nautilus-vcs"/> | ||
1078 | </dependencies> | ||
1079 | </metamodule> | ||
1080 | <metamodule id="meta-gnome-python"> | ||
1081 | <dependencies> | ||
1082 | <dep package="pygtk"/> | ||
1083 | <dep package="gnome-python"/> | ||
1084 | </dependencies> | ||
1085 | </metamodule> | ||
1086 | <metamodule id="meta-gnome-c++"> | ||
1087 | <dependencies> | ||
1088 | <dep package="gtkmm"/> | ||
1089 | <dep package="gnomemm/libgnomeuimm"/> | ||
1090 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1091 | <dep package="gnomemm/libpanelappletmm"/> | ||
1092 | <dep package="gnomemm/libbonobouimm"/> | ||
1093 | <dep package="gnomemm/libgnomeprintuimm"/> | ||
1094 | <dep package="libxml++"/> | ||
1095 | <dep package="gnomemm/libgdamm"/> | ||
1096 | <dep package="bakery"/> | ||
1097 | </dependencies> | ||
1098 | </metamodule> | ||
1099 | <metamodule id="meta-gnome-accessibility"> | ||
1100 | <dependencies> | ||
1101 | <dep package="libgail-gnome"/> | ||
1102 | <dep package="at-poke"/> | ||
1103 | <dep package="dasher"/> | ||
1104 | <dep package="gnome-mag"/> | ||
1105 | <dep package="gok"/> | ||
1106 | <dep package="gnome-speech"/> | ||
1107 | <dep package="gnopernicus"/> | ||
1108 | </dependencies> | ||
1109 | </metamodule> | ||
1110 | <metamodule id="meta-gnome-proposed"> | ||
1111 | <dependencies> | ||
1112 | </dependencies> | ||
1113 | </metamodule> | ||
1114 | <autotools id="sodipodi"> | ||
1115 | <branch/> | ||
1116 | <dependencies> | ||
1117 | <dep package="gtk+"/> | ||
1118 | <dep package="libgnomeprintui"/> | ||
1119 | <dep package="libart_lgpl"/> | ||
1120 | <dep package="libxml2"/> | ||
1121 | </dependencies> | ||
1122 | </autotools> | ||
1123 | <autotools id="gnome-themes"> | ||
1124 | <branch revision="gnome-2-10"/> | ||
1125 | <dependencies> | ||
1126 | <dep package="gtk-engines"/> | ||
1127 | </dependencies> | ||
1128 | </autotools> | ||
1129 | <autotools id="clearlooks"> | ||
1130 | <branch repo="clearlooks.sf.net"/> | ||
1131 | <dependencies> | ||
1132 | <dep package="gtk+"/> | ||
1133 | <dep package="libgnome"/> | ||
1134 | </dependencies> | ||
1135 | </autotools> | ||
1136 | <autotools id="gob"> | ||
1137 | <branch/> | ||
1138 | </autotools> | ||
1139 | <autotools id="libgnetwork"> | ||
1140 | <branch/> | ||
1141 | <dependencies> | ||
1142 | <dep package="glib"/> | ||
1143 | <dep package="gconf"/> | ||
1144 | <dep package="intltool"/> | ||
1145 | </dependencies> | ||
1146 | </autotools> | ||
1147 | <autotools id="libgircclient"> | ||
1148 | <branch/> | ||
1149 | <dependencies> | ||
1150 | <dep package="libgnetwork"/> | ||
1151 | </dependencies> | ||
1152 | </autotools> | ||
1153 | <autotools id="gnomechat"> | ||
1154 | <branch/> | ||
1155 | <dependencies> | ||
1156 | <dep package="libgnetwork"/> | ||
1157 | <dep package="libgircclient"/> | ||
1158 | <dep package="libgnomeui"/> | ||
1159 | </dependencies> | ||
1160 | </autotools> | ||
1161 | <mozillamodule id="mozilla" autogenargs="--enable-default-toolkit=gtk2 --disable-mailnews --disable-ldap --disable-debug --enable-optimize --disable-tests --enable-crypto --enable-xft --with-system-zlib --disable-freetype2" cvsroot="mozilla.org" revision="MOZILLA_1_7_BRANCH"> | ||
1162 | <dependencies> | ||
1163 | <dep package="gtk+"/> | ||
1164 | </dependencies> | ||
1165 | </mozillamodule> | ||
1166 | <autotools id="epiphany"> | ||
1167 | <branch revision="gnome-2-10"/> | ||
1168 | <dependencies> | ||
1169 | <dep package="mozilla"/> | ||
1170 | <dep package="libgnomeui"/> | ||
1171 | </dependencies> | ||
1172 | </autotools> | ||
1173 | <autotools id="epiphany-extensions"> | ||
1174 | <branch revision="gnome-2-10"/> | ||
1175 | <dependencies> | ||
1176 | <dep package="epiphany"/> | ||
1177 | </dependencies> | ||
1178 | </autotools> | ||
1179 | <autotools id="pyphany"> | ||
1180 | <branch revision="gnome-2-10"/> | ||
1181 | <dependencies> | ||
1182 | <dep package="epiphany-extensions"/> | ||
1183 | <dep package="pygtk"/> | ||
1184 | </dependencies> | ||
1185 | </autotools> | ||
1186 | <autotools id="galeon"> | ||
1187 | <branch/> | ||
1188 | <dependencies> | ||
1189 | <dep package="mozilla"/> | ||
1190 | <dep package="libgnomeui"/> | ||
1191 | </dependencies> | ||
1192 | </autotools> | ||
1193 | <autotools id="libsoup"> | ||
1194 | <branch revision="gnome-2-10"/> | ||
1195 | <dependencies> | ||
1196 | <dep package="glib"/> | ||
1197 | <dep package="gnutls"/> | ||
1198 | <dep package="libxml2"/> | ||
1199 | </dependencies> | ||
1200 | </autotools> | ||
1201 | <autotools id="gtkhtml"> | ||
1202 | <branch revision="gnome-2-10"/> | ||
1203 | <dependencies> | ||
1204 | <dep package="gtk+"/> | ||
1205 | <dep package="libgnomeui"/> | ||
1206 | <dep package="libbonoboui"/> | ||
1207 | <dep package="libglade"/> | ||
1208 | <dep package="gail"/> | ||
1209 | <dep package="libgnomeprint"/> | ||
1210 | <dep package="libgnomeprintui"/> | ||
1211 | <dep package="libsoup"/> | ||
1212 | <dep package="gal"/> | ||
1213 | </dependencies> | ||
1214 | </autotools> | ||
1215 | <autotools id="evolution-data-server" supports-non-srcdir-builds="no"> | ||
1216 | <branch revision="gnome-2-10"/> | ||
1217 | <dependencies> | ||
1218 | <dep package="libbonobo"/> | ||
1219 | <dep package="libgnome"/> | ||
1220 | <dep package="libgnomeui"/> | ||
1221 | <dep package="libsoup"/> | ||
1222 | <dep package="libxml2"/> | ||
1223 | <dep package="gconf"/> | ||
1224 | <dep package="gnome-vfs"/> | ||
1225 | <dep package="mozilla"/> | ||
1226 | </dependencies> | ||
1227 | </autotools> | ||
1228 | <autotools id="evolution"> | ||
1229 | <branch revision="gnome-2-10"/> | ||
1230 | <dependencies> | ||
1231 | <dep package="evolution-data-server"/> | ||
1232 | <dep package="gtkhtml"/> | ||
1233 | <dep package="libgnomeui"/> | ||
1234 | <dep package="libbonoboui"/> | ||
1235 | </dependencies> | ||
1236 | </autotools> | ||
1237 | <autotools id="evolution-webcal"> | ||
1238 | <branch revision="gnome-2-10"/> | ||
1239 | <dependencies> | ||
1240 | <dep package="evolution-data-server"/> | ||
1241 | <dep package="libsoup"/> | ||
1242 | <dep package="libgnomeui"/> | ||
1243 | </dependencies> | ||
1244 | </autotools> | ||
1245 | <tarball id="xchat" version="2.4.1"> | ||
1246 | <source href="http://xchat.org/files/source/2.4/xchat-2.4.1.tar.bz2" | ||
1247 | size="1214388" md5sum="aeb2337cc36dd4a9ac0cd6e909f67227"/> | ||
1248 | <dependencies> | ||
1249 | <dep package="gtk+"/> | ||
1250 | <dep package="libxml2"/> | ||
1251 | </dependencies> | ||
1252 | </tarball> | ||
1253 | <tarball id="camorama" version="0.17"> | ||
1254 | <source href="http://camorama.fixedgear.org/downloads/camorama-0.17.tar.bz2" | ||
1255 | size="312233" md5sum="2b2784af53a1ba8fa4419aa806967b35"/> | ||
1256 | <dependencies> | ||
1257 | <dep package="gtk+"/> | ||
1258 | </dependencies> | ||
1259 | </tarball> | ||
1260 | <autotools id="gtk-engines-cleanice"> | ||
1261 | <branch repo="elysium-project.sf.net"/> | ||
1262 | <dependencies> | ||
1263 | <dep package="gtk+"/> | ||
1264 | </dependencies> | ||
1265 | </autotools> | ||
1266 | <autotools id="gaim"> | ||
1267 | <branch repo="gaim.sf.net"/> | ||
1268 | <dependencies> | ||
1269 | <dep package="libgnomeui"/> | ||
1270 | </dependencies> | ||
1271 | </autotools> | ||
1272 | <autotools id="zenity"> | ||
1273 | <branch revision="gnome-2-10"/> | ||
1274 | <dependencies> | ||
1275 | <dep package="gtk+"/> | ||
1276 | <dep package="gconf"/> | ||
1277 | <dep package="libgnomecanvas"/> | ||
1278 | </dependencies> | ||
1279 | </autotools> | ||
1280 | <autotools id="gpdf"> | ||
1281 | <branch/> | ||
1282 | <dependencies> | ||
1283 | <dep package="libgnomeui"/> | ||
1284 | <dep package="libbonoboui"/> | ||
1285 | <dep package="libgnomeprintui"/> | ||
1286 | </dependencies> | ||
1287 | </autotools> | ||
1288 | <autotools id="gnome-netstatus"> | ||
1289 | <branch revision="gnome-2-10"/> | ||
1290 | <dependencies> | ||
1291 | <dep package="libgnomeui"/> | ||
1292 | <dep package="gnome-panel"/> | ||
1293 | </dependencies> | ||
1294 | </autotools> | ||
1295 | <autotools id="gnome-doc-utils"> | ||
1296 | <branch revision="gnome-2-10"/> | ||
1297 | <dependencies> | ||
1298 | <dep package="libxslt"/> | ||
1299 | </dependencies> | ||
1300 | </autotools> | ||
1301 | <autotools id="totem" autogenargs="--enable-gstreamer"> | ||
1302 | <branch revision="gnome-2-10"/> | ||
1303 | <dependencies> | ||
1304 | <dep package="gnome-desktop"/> | ||
1305 | <dep package="nautilus-cd-burner"/> | ||
1306 | <dep package="gstreamer"/> | ||
1307 | <dep package="gst-plugins"/> | ||
1308 | </dependencies> | ||
1309 | </autotools> | ||
1310 | <autotools id="gnome-themes-extras"> | ||
1311 | <branch/> | ||
1312 | <dependencies> | ||
1313 | <dep package="gnome-themes"/> | ||
1314 | </dependencies> | ||
1315 | </autotools> | ||
1316 | <autotools id="libgda"> | ||
1317 | <branch module="libgda" revision="release-1-2-branch"/> | ||
1318 | <dependencies> | ||
1319 | <dep package="glib"/> | ||
1320 | </dependencies> | ||
1321 | </autotools> | ||
1322 | <autotools id="libgnomedb" autogenargs="--enable-gnome=yes"> | ||
1323 | <branch/> | ||
1324 | <dependencies> | ||
1325 | <dep package="libgda"/> | ||
1326 | <dep package="libgnomeui"/> | ||
1327 | <dep package="libbonoboui"/> | ||
1328 | </dependencies> | ||
1329 | </autotools> | ||
1330 | <autotools id="mergeant"> | ||
1331 | <branch/> | ||
1332 | <dependencies> | ||
1333 | <dep package="libgnomedb"/> | ||
1334 | </dependencies> | ||
1335 | </autotools> | ||
1336 | <autotools id="gtranslator"> | ||
1337 | <branch/> | ||
1338 | <dependencies> | ||
1339 | <dep package="libgnomeui"/> | ||
1340 | </dependencies> | ||
1341 | </autotools> | ||
1342 | <autotools id="gnome-spell"> | ||
1343 | <branch/> | ||
1344 | <dependencies> | ||
1345 | <dep package="libgnomeui"/> | ||
1346 | </dependencies> | ||
1347 | </autotools> | ||
1348 | <autotools id="libgnomecups"> | ||
1349 | <branch/> | ||
1350 | <dependencies> | ||
1351 | <dep package="glib"/> | ||
1352 | </dependencies> | ||
1353 | </autotools> | ||
1354 | <autotools id="gnome-cups-manager"> | ||
1355 | <branch/> | ||
1356 | <dependencies> | ||
1357 | <dep package="libgnomecups"/> | ||
1358 | <dep package="libgnomeui"/> | ||
1359 | <dep package="libglade"/> | ||
1360 | </dependencies> | ||
1361 | </autotools> | ||
1362 | <autotools id="libxml++"> | ||
1363 | <branch/> | ||
1364 | <dependencies> | ||
1365 | <dep package="libxml2"/> | ||
1366 | <dep package="glibmm"/> | ||
1367 | </dependencies> | ||
1368 | </autotools> | ||
1369 | <autotools id="bakery"> | ||
1370 | <branch/> | ||
1371 | <dependencies> | ||
1372 | <dep package="libxml++"/> | ||
1373 | <dep package="gtkmm"/> | ||
1374 | <dep package="gnomemm/libglademm"/> | ||
1375 | <dep package="gnomemm/gconfmm"/> | ||
1376 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1377 | </dependencies> | ||
1378 | </autotools> | ||
1379 | <autotools id="gnome-hello"> | ||
1380 | <branch/> | ||
1381 | <dependencies> | ||
1382 | <dep package="glib"/> | ||
1383 | <dep package="libgnome"/> | ||
1384 | <dep package="libgnomeui"/> | ||
1385 | </dependencies> | ||
1386 | </autotools> | ||
1387 | <autotools id="gnome-system-tools"> | ||
1388 | <branch revision="gnome-2-10"/> | ||
1389 | <dependencies> | ||
1390 | <dep package="glib"/> | ||
1391 | <dep package="libxml2"/> | ||
1392 | <dep package="gconf"/> | ||
1393 | <dep package="libgnomeui"/> | ||
1394 | <dep package="libbonoboui"/> | ||
1395 | <dep package="libglade"/> | ||
1396 | <dep package="system-tools-backends"/> | ||
1397 | </dependencies> | ||
1398 | </autotools> | ||
1399 | <autotools id="gnome-user-docs"> | ||
1400 | <branch/> | ||
1401 | <dependencies> | ||
1402 | <dep package="scrollkeeper"/> | ||
1403 | </dependencies> | ||
1404 | </autotools> | ||
1405 | <autotools id="loudmouth"> | ||
1406 | <branch/> | ||
1407 | <dependencies> | ||
1408 | <dep package="glib"/> | ||
1409 | </dependencies> | ||
1410 | </autotools> | ||
1411 | <autotools id="gossip"> | ||
1412 | <branch revision="gossip-0-8"/> | ||
1413 | <dependencies> | ||
1414 | <dep package="loudmouth"/> | ||
1415 | <dep package="libgnomeui"/> | ||
1416 | </dependencies> | ||
1417 | </autotools> | ||
1418 | <autotools id="conglomerate"> | ||
1419 | <branch/> | ||
1420 | <dependencies> | ||
1421 | <dep package="libxslt"/> | ||
1422 | <dep package="gconf"/> | ||
1423 | <dep package="libgnomeui"/> | ||
1424 | </dependencies> | ||
1425 | </autotools> | ||
1426 | <autotools id="sound-juicer"> | ||
1427 | <branch revision="gnome-2-10"/> | ||
1428 | <dependencies> | ||
1429 | <dep package="libgnomeui"/> | ||
1430 | <dep package="gnome-media"/> | ||
1431 | <dep package="gstreamer"/> | ||
1432 | <dep package="gst-plugins"/> | ||
1433 | <dep package="nautilus-cd-burner"/> | ||
1434 | </dependencies> | ||
1435 | </autotools> | ||
1436 | <autotools id="gnome-network"> | ||
1437 | <branch/> | ||
1438 | <dependencies> | ||
1439 | <dep package="glib"/> | ||
1440 | </dependencies> | ||
1441 | </autotools> | ||
1442 | <tarball id="guile" version="1.6.7"> | ||
1443 | <source href="ftp://ftp.gnu.org/gnu/guile/guile-1.6.7.tar.gz" | ||
1444 | size="3039294" md5sum="c2ff2a2231f0cbb2e838dd8701a587c5"/> | ||
1445 | </tarball> | ||
1446 | <tarball id="autogen" version="5.6.5"> | ||
1447 | <source href="http://internap.dl.sourceforge.net/sourceforge/autogen/autogen-5.6.5.tar.gz" | ||
1448 | size="1144260" md5sum="54a6cb0be7e6b526af9aba4a73013885"/> | ||
1449 | <dependencies> | ||
1450 | <dep package="guile"/> | ||
1451 | </dependencies> | ||
1452 | </tarball> | ||
1453 | <autotools id="anjuta"> | ||
1454 | <branch/> | ||
1455 | <dependencies> | ||
1456 | <dep package="libbonoboui"/> | ||
1457 | <dep package="libgnomeprintui"/> | ||
1458 | <dep package="vte"/> | ||
1459 | <dep package="gnome-build"/> | ||
1460 | <dep package="autogen"/> | ||
1461 | </dependencies> | ||
1462 | </autotools> | ||
1463 | <autotools id="OpenApplet"> | ||
1464 | <branch/> | ||
1465 | <dependencies> | ||
1466 | <dep package="gnome-panel"/> | ||
1467 | </dependencies> | ||
1468 | </autotools> | ||
1469 | <autotools id="gtetrinet"> | ||
1470 | <branch/> | ||
1471 | <dependencies> | ||
1472 | <dep package="libgnomeui"/> | ||
1473 | </dependencies> | ||
1474 | </autotools> | ||
1475 | <autotools id="glom"> | ||
1476 | <branch/> | ||
1477 | <dependencies> | ||
1478 | <dep package="gnomemm/libgdamm"/> | ||
1479 | <dep package="bakery"/> | ||
1480 | <dep package="libgnome"/> | ||
1481 | </dependencies> | ||
1482 | </autotools> | ||
1483 | <autotools id="vino"> | ||
1484 | <branch revision="gnome-2-10"/> | ||
1485 | <dependencies> | ||
1486 | <dep package="libgnomeui"/> | ||
1487 | <dep package="libglade"/> | ||
1488 | <dep package="gconf"/> | ||
1489 | <dep package="gnutls"/> | ||
1490 | </dependencies> | ||
1491 | </autotools> | ||
1492 | <autotools id="gnome-keyring-manager"> | ||
1493 | <branch revision="gnome-2-10"/> | ||
1494 | <dependencies> | ||
1495 | <dep package="libgnomeui"/> | ||
1496 | <dep package="gnome-keyring"/> | ||
1497 | <dep package="gconf"/> | ||
1498 | </dependencies> | ||
1499 | </autotools> | ||
1500 | <autotools id="gnome-volume-manager"> | ||
1501 | <branch revision="gnome-2-10"/> | ||
1502 | <dependencies> | ||
1503 | <dep package="libgnomeui"/> | ||
1504 | <dep package="libglade"/> | ||
1505 | <dep package="hal-0.4"/> | ||
1506 | </dependencies> | ||
1507 | </autotools> | ||
1508 | <metamodule id="meta-storage"> | ||
1509 | <dependencies> | ||
1510 | <dep package="storage/storage-store"/> | ||
1511 | <dep package="storage/vfs"/> | ||
1512 | <dep package="storage/applet"/> | ||
1513 | </dependencies> | ||
1514 | </metamodule> | ||
1515 | <autotools id="storage/storage-store"> | ||
1516 | <branch/> | ||
1517 | <dependencies> | ||
1518 | <dep package="dbus-0.23"/> | ||
1519 | </dependencies> | ||
1520 | </autotools> | ||
1521 | <autotools id="storage/libstorage"> | ||
1522 | <branch/> | ||
1523 | <dependencies> | ||
1524 | <dep package="gnome-vfs"/> | ||
1525 | <dep package="pygtk"/> | ||
1526 | </dependencies> | ||
1527 | </autotools> | ||
1528 | <autotools id="storage/libstorage-translators"> | ||
1529 | <branch/> | ||
1530 | <dependencies> | ||
1531 | <dep package="storage/libstorage"/> | ||
1532 | </dependencies> | ||
1533 | </autotools> | ||
1534 | <autotools id="storage/vfs"> | ||
1535 | <branch/> | ||
1536 | <dependencies> | ||
1537 | <dep package="storage/libstorage"/> | ||
1538 | <dep package="storage/libstorage-translators"/> | ||
1539 | </dependencies> | ||
1540 | </autotools> | ||
1541 | <autotools id="storage/pet"> | ||
1542 | <branch/> | ||
1543 | </autotools> | ||
1544 | <autotools id="storage/libmrs"> | ||
1545 | <branch/> | ||
1546 | <dependencies> | ||
1547 | <dep package="storage/pet"/> | ||
1548 | </dependencies> | ||
1549 | </autotools> | ||
1550 | <autotools id="storage/libmrs-converter"> | ||
1551 | <branch/> | ||
1552 | <dependencies> | ||
1553 | <dep package="storage/libmrs"/> | ||
1554 | </dependencies> | ||
1555 | </autotools> | ||
1556 | <autotools id="storage/libstorage-nl"> | ||
1557 | <branch/> | ||
1558 | <dependencies> | ||
1559 | <dep package="storage/libstorage"/> | ||
1560 | <dep package="storage/libmrs"/> | ||
1561 | <dep package="storage/libmrs-converter"/> | ||
1562 | </dependencies> | ||
1563 | </autotools> | ||
1564 | <autotools id="storage/applet"> | ||
1565 | <branch/> | ||
1566 | <dependencies> | ||
1567 | <dep package="gnome-python"/> | ||
1568 | <dep package="storage/libstorage-nl"/> | ||
1569 | </dependencies> | ||
1570 | </autotools> | ||
1571 | <autotools id="gnome-nettool"> | ||
1572 | <branch revision="gnome-2-10"/> | ||
1573 | <dependencies> | ||
1574 | <dep package="libgnomeui"/> | ||
1575 | </dependencies> | ||
1576 | </autotools> | ||
1577 | <autotools id="monkey-bubble"> | ||
1578 | <branch/> | ||
1579 | <dependencies> | ||
1580 | <dep package="gstreamer"/> | ||
1581 | <dep package="gst-plugins"/> | ||
1582 | <dep package="libxml2"/> | ||
1583 | <dep package="gconf"/> | ||
1584 | <dep package="librsvg"/> | ||
1585 | <dep package="libgnomeui"/> | ||
1586 | </dependencies> | ||
1587 | </autotools> | ||
1588 | <autotools id="gnome-schedule"> | ||
1589 | <branch/> | ||
1590 | <dependencies> | ||
1591 | <dep package="pygtk"/> | ||
1592 | <dep package="yelp"/> | ||
1593 | </dependencies> | ||
1594 | </autotools> | ||
1595 | <autotools id="gnome-backgrounds"> | ||
1596 | <branch/> | ||
1597 | </autotools> | ||
1598 | <autotools id="evince"> | ||
1599 | <branch/> | ||
1600 | <dependencies> | ||
1601 | <dep package="libgnomeui"/> | ||
1602 | <dep package="libgnomeprintui"/> | ||
1603 | <dep package="poppler"/> | ||
1604 | </dependencies> | ||
1605 | </autotools> | ||
1606 | <autotools id="nautilus-python" supports-non-srcdir-builds="no"> | ||
1607 | <branch/> | ||
1608 | <dependencies> | ||
1609 | <dep package="nautilus"/> | ||
1610 | <dep package="pygtk"/> | ||
1611 | <dep package="gnome-python"/> | ||
1612 | </dependencies> | ||
1613 | </autotools> | ||
1614 | <autotools id="gst-python" autogenargs="--" supports-non-srcdir-builds="no"> | ||
1615 | <branch repo="gstreamer.freedesktop.org" revision="BRANCH-GSTREAMER-0_8"/> | ||
1616 | <dependencies> | ||
1617 | <dep package="gstreamer"/> | ||
1618 | <dep package="gst-plugins"/> | ||
1619 | </dependencies> | ||
1620 | </autotools> | ||
1621 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gnome-2.12.modules b/scripts/jhbuild/modulesets/gnome-2.12.modules new file mode 100644 index 0000000000..ffbd89756f --- /dev/null +++ b/scripts/jhbuild/modulesets/gnome-2.12.modules | |||
@@ -0,0 +1,1747 @@ | |||
1 | <?xml version="1.0"?><!--*- mode: nxml -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | <repository type="cvs" name="gnome.org" default="yes" | ||
5 | cvsroot=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
6 | password=""/> | ||
7 | <repository type="cvs" name="cairo.freedesktop.org" | ||
8 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/cairo" | ||
9 | password=""/> | ||
10 | <repository type="cvs" name="mozilla.org" | ||
11 | cvsroot=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" | ||
12 | password="anonymous"/> | ||
13 | <repository type="cvs" name="gstreamer.freedesktop.org" | ||
14 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer" | ||
15 | password=""/> | ||
16 | <repository type="cvs" name="menu.freedesktop.org" | ||
17 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/menus" | ||
18 | password=""/> | ||
19 | <repository type="cvs" name="mime.freedesktop.org" | ||
20 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/mime" | ||
21 | password=""/> | ||
22 | <repository type="cvs" name="xklavier.freedesktop.org" | ||
23 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xklavier" | ||
24 | password=""/> | ||
25 | |||
26 | <repository type="cvs" name="elysium-project.sf.net" | ||
27 | cvsroot=":pserver:anonymous@elysium-project.cvs.sourceforge.net:/cvsroot/elysium-project" | ||
28 | password=""/> | ||
29 | <repository type="cvs" name="gaim.sf.net" | ||
30 | cvsroot=":pserver:anonymous@gaim.cvs.sourceforge.net:/cvsroot/gaim" | ||
31 | password=""/> | ||
32 | <repository type="cvs" name="inkscape.sf.net" | ||
33 | cvsroot=":pserver:anonymous@inkscape.cvs.sourceforge.net:/cvsroot/inkscape" | ||
34 | password=""/> | ||
35 | <repository type="svn" name="svn.galago-project.org" | ||
36 | href="http://svn.galago-project.org/"/> | ||
37 | <repository type="svn" name="svn.debian.org" | ||
38 | href="svn://svn.debian.org/"/> | ||
39 | |||
40 | <tarball id="scrollkeeper" version="0.3.14" supports-non-srcdir-builds="no"> | ||
41 | <source href="http://unc.dl.sourceforge.net/sourceforge/scrollkeeper/scrollkeeper-0.3.14.tar.gz" | ||
42 | size="679513" md5sum="161eb3f29e30e7b24f84eb93ac696155"/> | ||
43 | <dependencies> | ||
44 | <dep package="libxml2"/> | ||
45 | <dep package="libxslt"/> | ||
46 | <dep package="intltool"/> | ||
47 | </dependencies> | ||
48 | <patches> | ||
49 | <patch file="scrollkeeper_clean_xml_validation_context.patch" strip="1"/> | ||
50 | <patch file="scrollkeeper_language_fix.patch" strip="1"/> | ||
51 | <patch file="scrollkeeper_rw_offset_fix.patch" strip="1"/> | ||
52 | </patches> | ||
53 | </tarball> | ||
54 | |||
55 | <autotools id="iso-codes"> | ||
56 | <branch repo="svn.debian.org" module="pkg-isocodes/trunk/iso-codes" checkoutdir="iso-codes"/> | ||
57 | </autotools> | ||
58 | |||
59 | <include href="freedesktop.modules"/> | ||
60 | <include href="gnutls.modules"/> | ||
61 | |||
62 | <autotools id="cairo-gtk-engine"> | ||
63 | <branch repo="cairo.freedesktop.org"/> | ||
64 | <dependencies> | ||
65 | <dep package="gtk+"/> | ||
66 | <dep package="cairo-1-0"/> | ||
67 | </dependencies> | ||
68 | </autotools> | ||
69 | |||
70 | <autotools id="shared-mime-info" supports-non-srcdir-builds="no"> | ||
71 | <branch repo="mime.freedesktop.org"/> | ||
72 | <dependencies> | ||
73 | <dep package="intltool"/> | ||
74 | </dependencies> | ||
75 | </autotools> | ||
76 | |||
77 | <autotools id="desktop-file-utils"> | ||
78 | <branch repo="menu.freedesktop.org"/> | ||
79 | <dependencies> | ||
80 | <dep package="glib"/> | ||
81 | <dep package="intltool"/> | ||
82 | </dependencies> | ||
83 | </autotools> | ||
84 | |||
85 | <autotools id="libxklavier" supports-non-srcdir-builds="no"> | ||
86 | <branch repo="xklavier.freedesktop.org"/> | ||
87 | </autotools> | ||
88 | <autotools id="libbtctl"> | ||
89 | <branch/> | ||
90 | <dependencies> | ||
91 | <dep package="gtk+"/> | ||
92 | <dep package="glib"/> | ||
93 | </dependencies> | ||
94 | </autotools> | ||
95 | <autotools id="gnome-bluetooth"> | ||
96 | <branch/> | ||
97 | <dependencies> | ||
98 | <dep package="gtk+"/> | ||
99 | <dep package="glib"/> | ||
100 | <dep package="libbtctl"/> | ||
101 | <dep package="libglade"/> | ||
102 | <dep package="libgnomeui"/> | ||
103 | <dep package="gconf"/> | ||
104 | </dependencies> | ||
105 | </autotools> | ||
106 | <autotools id="phonemgr"> | ||
107 | <branch/> | ||
108 | <dependencies> | ||
109 | <dep package="gtk+"/> | ||
110 | <dep package="glib"/> | ||
111 | <dep package="libbtctl"/> | ||
112 | <dep package="gnome-bluetooth"/> | ||
113 | <dep package="libglade"/> | ||
114 | <dep package="libgnomeui"/> | ||
115 | <dep package="libgnome"/> | ||
116 | <dep package="gconf"/> | ||
117 | </dependencies> | ||
118 | </autotools> | ||
119 | |||
120 | <autotools id="intltool"> | ||
121 | <branch/> | ||
122 | <dependencies> | ||
123 | <dep package="gnome-common"/> | ||
124 | </dependencies> | ||
125 | </autotools> | ||
126 | <autotools id="gnome-common"> | ||
127 | <branch revision="gnome-2-12"/> | ||
128 | </autotools> | ||
129 | <autotools id="libxml2"> | ||
130 | <branch module="gnome-xml" checkoutdir="libxml2"/> | ||
131 | </autotools> | ||
132 | <autotools id="libxslt"> | ||
133 | <branch/> | ||
134 | <dependencies> | ||
135 | <dep package="libxml2"/> | ||
136 | </dependencies> | ||
137 | </autotools> | ||
138 | <autotools id="gtk-doc"> | ||
139 | <branch/> | ||
140 | <dependencies> | ||
141 | <dep package="libxslt"/> | ||
142 | <dep package="scrollkeeper"/> | ||
143 | </dependencies> | ||
144 | </autotools> | ||
145 | <autotools id="glib"> | ||
146 | <branch revision="glib-2-8"/> | ||
147 | <dependencies> | ||
148 | <dep package="gtk-doc"/> | ||
149 | </dependencies> | ||
150 | </autotools> | ||
151 | <autotools id="pango"> | ||
152 | <branch revision="pango-1-10"/> | ||
153 | <dependencies> | ||
154 | <dep package="glib"/> | ||
155 | <dep package="cairo-1-0"/> | ||
156 | <dep package="libXft"/> | ||
157 | </dependencies> | ||
158 | </autotools> | ||
159 | <autotools id="atk"> | ||
160 | <branch revision="gnome-2-12"/> | ||
161 | <dependencies> | ||
162 | <dep package="glib"/> | ||
163 | </dependencies> | ||
164 | </autotools> | ||
165 | <autotools id="gtk+"> | ||
166 | <branch revision="gtk-2-8"/> | ||
167 | <dependencies> | ||
168 | <dep package="cairo-1-0"/> | ||
169 | <dep package="pango"/> | ||
170 | <dep package="atk"/> | ||
171 | <dep package="shared-mime-info"/> | ||
172 | </dependencies> | ||
173 | </autotools> | ||
174 | <autotools id="gail"> | ||
175 | <branch/> | ||
176 | <dependencies> | ||
177 | <dep package="gtk+"/> | ||
178 | <dep package="atk"/> | ||
179 | <dep package="libgnomecanvas"/> | ||
180 | </dependencies> | ||
181 | </autotools> | ||
182 | <autotools id="gtkhtml2"> | ||
183 | <branch/> | ||
184 | <dependencies> | ||
185 | <dep package="gtk+"/> | ||
186 | <dep package="libxml2"/> | ||
187 | <dep package="gail"/> | ||
188 | </dependencies> | ||
189 | </autotools> | ||
190 | <autotools id="libIDL"> | ||
191 | <branch/> | ||
192 | <dependencies> | ||
193 | <dep package="glib"/> | ||
194 | </dependencies> | ||
195 | </autotools> | ||
196 | <autotools id="ORBit2"> | ||
197 | <branch revision="gnome-2-10"/> | ||
198 | <dependencies> | ||
199 | <dep package="libIDL"/> | ||
200 | <dep package="gnome-common"/> | ||
201 | </dependencies> | ||
202 | </autotools> | ||
203 | <autotools id="gconf"> | ||
204 | <branch revision="gnome-2-12"/> | ||
205 | <dependencies> | ||
206 | <dep package="ORBit2"/> | ||
207 | <dep package="libxml2"/> | ||
208 | <dep package="gtk+"/> | ||
209 | </dependencies> | ||
210 | </autotools> | ||
211 | <autotools id="libbonobo"> | ||
212 | <branch revision="gnome-2-12"/> | ||
213 | <dependencies> | ||
214 | <dep package="ORBit2"/> | ||
215 | <dep package="intltool"/> | ||
216 | <dep package="gnome-common"/> | ||
217 | <dep package="libxml2"/> | ||
218 | </dependencies> | ||
219 | </autotools> | ||
220 | <autotools id="gnome-mime-data"> | ||
221 | <branch/> | ||
222 | <dependencies> | ||
223 | <dep package="gnome-common"/> | ||
224 | </dependencies> | ||
225 | </autotools> | ||
226 | <autotools id="gnome-icon-theme"> | ||
227 | <branch revision="gnome-2-12"/> | ||
228 | <dependencies> | ||
229 | <dep package="hicolor-icon-theme"/> | ||
230 | </dependencies> | ||
231 | </autotools> | ||
232 | <tarball id="howl" version="1.0.0"> | ||
233 | <source href="http://www.porchdogsoft.com/download/howl-1.0.0.tar.gz" | ||
234 | size="542782" md5sum="c389d3ffba0e69a179de2ec650f1fdcc"/> | ||
235 | <patches> | ||
236 | <patch file="howl-1.0.0-buildfix.patch" strip="1"/> | ||
237 | </patches> | ||
238 | </tarball> | ||
239 | <autotools id="gnome-vfs"> | ||
240 | <branch revision="gnome-2-12"/> | ||
241 | <dependencies> | ||
242 | <dep package="libbonobo"/> | ||
243 | <dep package="gconf"/> | ||
244 | <dep package="desktop-file-utils"/> | ||
245 | <dep package="shared-mime-info"/> | ||
246 | <dep package="gnome-mime-data"/> | ||
247 | <dep package="howl"/> | ||
248 | <dep package="hal"/> | ||
249 | </dependencies> | ||
250 | </autotools> | ||
251 | <autotools id="gnome-keyring"> | ||
252 | <branch revision="gnome-2-12"/> | ||
253 | <dependencies> | ||
254 | <dep package="gtk+"/> | ||
255 | </dependencies> | ||
256 | </autotools> | ||
257 | <autotools id="libart_lgpl"> | ||
258 | <branch/> | ||
259 | </autotools> | ||
260 | <autotools id="libgnome"> | ||
261 | <branch revision="gnome-2-12"/> | ||
262 | <dependencies> | ||
263 | <dep package="libxml2"/> | ||
264 | <dep package="libxslt"/> | ||
265 | <dep package="libbonobo"/> | ||
266 | <dep package="gnome-vfs"/> | ||
267 | <dep package="gconf"/> | ||
268 | <dep package="esound"/> | ||
269 | </dependencies> | ||
270 | </autotools> | ||
271 | <autotools id="libgnomecanvas"> | ||
272 | <branch revision="gnome-2-12"/> | ||
273 | <dependencies> | ||
274 | <dep package="gtk+"/> | ||
275 | <dep package="libart_lgpl"/> | ||
276 | <dep package="libglade"/> | ||
277 | <dep package="gnome-common"/> | ||
278 | </dependencies> | ||
279 | </autotools> | ||
280 | <autotools id="libbonoboui"> | ||
281 | <branch revision="gnome-2-10"/> | ||
282 | <dependencies> | ||
283 | <dep package="libgnome"/> | ||
284 | <dep package="libbonobo"/> | ||
285 | <dep package="libgnomecanvas"/> | ||
286 | <dep package="libglade"/> | ||
287 | </dependencies> | ||
288 | </autotools> | ||
289 | <autotools id="libgnomeui"> | ||
290 | <branch revision="gnome-2-12"/> | ||
291 | <dependencies> | ||
292 | <dep package="libbonoboui"/> | ||
293 | <dep package="libglade"/> | ||
294 | <dep package="gnome-icon-theme"/> | ||
295 | <dep package="gnome-keyring"/> | ||
296 | </dependencies> | ||
297 | </autotools> | ||
298 | <autotools id="libglade"> | ||
299 | <branch/> | ||
300 | <dependencies> | ||
301 | <dep package="gtk+"/> | ||
302 | <dep package="libxml2"/> | ||
303 | </dependencies> | ||
304 | </autotools> | ||
305 | <autotools id="pygtk"> | ||
306 | <branch revision="pygtk-2-8"/> | ||
307 | <dependencies> | ||
308 | <dep package="gtk+"/> | ||
309 | <dep package="libglade"/> | ||
310 | </dependencies> | ||
311 | <after> | ||
312 | <dep package="pycairo-1-0"/> | ||
313 | </after> | ||
314 | </autotools> | ||
315 | <autotools id="pyorbit"> | ||
316 | <branch/> | ||
317 | <dependencies> | ||
318 | <dep package="ORBit2"/> | ||
319 | </dependencies> | ||
320 | </autotools> | ||
321 | <autotools id="gnome-python"> | ||
322 | <branch/> | ||
323 | <dependencies> | ||
324 | <dep package="pygtk"/> | ||
325 | <dep package="pyorbit"/> | ||
326 | <dep package="libgnomecanvas"/> | ||
327 | <dep package="libgnomeui"/> | ||
328 | </dependencies> | ||
329 | </autotools> | ||
330 | <autotools id="gnome-python-extras"> | ||
331 | <branch/> | ||
332 | <dependencies> | ||
333 | <dep package="pygtk"/> | ||
334 | <dep package="gnome-python"/> | ||
335 | <dep package="gnome-panel"/> | ||
336 | <dep package="gtkhtml2"/> | ||
337 | <dep package="libgnomeprint"/> | ||
338 | <dep package="libgnomeprintui"/> | ||
339 | <dep package="gtksourceview"/> | ||
340 | <dep package="libwnck"/> | ||
341 | <!-- Needs libgda 1.2, not HEAD <dep package="libgda" /> --> | ||
342 | <dep package="nautilus-cd-burner"/> | ||
343 | <dep package="libgtop"/> | ||
344 | <dep package="totem"/> | ||
345 | <dep package="gdl"/> | ||
346 | <dep package="gnome-media"/> | ||
347 | </dependencies> | ||
348 | </autotools> | ||
349 | <autotools id="bug-buddy"> | ||
350 | <branch revision="gnome-2-12"/> | ||
351 | <dependencies> | ||
352 | <dep package="libgnomeui"/> | ||
353 | <dep package="gnome-menus"/> | ||
354 | <dep package="gnome-doc-utils"/> | ||
355 | </dependencies> | ||
356 | </autotools> | ||
357 | <autotools id="libwnck"> | ||
358 | <branch revision="gnome-2-12"/> | ||
359 | <dependencies> | ||
360 | <dep package="gtk+"/> | ||
361 | <dep package="startup-notification"/> | ||
362 | </dependencies> | ||
363 | </autotools> | ||
364 | <autotools id="gnome-desktop" autogenargs="--with-gnome-distributor=JHBuild"> | ||
365 | <branch revision="gnome-2-12"/> | ||
366 | <dependencies> | ||
367 | <dep package="libgnomeui"/> | ||
368 | <dep package="startup-notification"/> | ||
369 | <dep package="gnome-themes"/> | ||
370 | <dep package="scrollkeeper"/> | ||
371 | <dep package="gnome-doc-utils"/> | ||
372 | </dependencies> | ||
373 | </autotools> | ||
374 | <autotools id="gnome-menus"> | ||
375 | <branch revision="gnome-2-12"/> | ||
376 | <dependencies> | ||
377 | <dep package="intltool"/> | ||
378 | <dep package="gnome-common"/> | ||
379 | <dep package="glib"/> | ||
380 | <dep package="pygtk"/> | ||
381 | </dependencies> | ||
382 | </autotools> | ||
383 | <autotools id="gnome-panel"> | ||
384 | <branch revision="gnome-2-12"/> | ||
385 | <dependencies> | ||
386 | <dep package="scrollkeeper"/> | ||
387 | <dep package="libgnomeui"/> | ||
388 | <dep package="gnome-desktop"/> | ||
389 | <dep package="libwnck"/> | ||
390 | <dep package="evolution-data-server"/> | ||
391 | <dep package="gnome-menus"/> | ||
392 | <dep package="gnome-vfs"/> | ||
393 | <dep package="libglade"/> | ||
394 | <dep package="gnome-doc-utils"/> | ||
395 | </dependencies> | ||
396 | </autotools> | ||
397 | <autotools id="gnome-session"> | ||
398 | <branch revision="gnome-2-12"/> | ||
399 | <dependencies> | ||
400 | <dep package="libgnomeui"/> | ||
401 | <dep package="libwnck"/> | ||
402 | <dep package="esound"/> | ||
403 | </dependencies> | ||
404 | </autotools> | ||
405 | <autotools id="gnome-applets"> | ||
406 | <branch revision="gnome-2-12"/> | ||
407 | <dependencies> | ||
408 | <dep package="gnome-panel"/> | ||
409 | <dep package="libgtop"/> | ||
410 | <dep package="gail"/> | ||
411 | <dep package="libxklavier"/> | ||
412 | <dep package="gstreamer"/> | ||
413 | <dep package="gst-plugins"/> | ||
414 | <dep package="gucharmap"/> | ||
415 | <dep package="system-tools-backends"/> | ||
416 | </dependencies> | ||
417 | </autotools> | ||
418 | <autotools id="gnome-games"> | ||
419 | <branch revision="gnome-2-12"/> | ||
420 | <dependencies> | ||
421 | <dep package="librsvg"/> | ||
422 | <dep package="scrollkeeper"/> | ||
423 | <dep package="libgnomeui"/> | ||
424 | <dep package="gob"/> | ||
425 | </dependencies> | ||
426 | </autotools> | ||
427 | <autotools id="libcroco" supports-non-srcdir-builds="no"> | ||
428 | <branch/> | ||
429 | <dependencies> | ||
430 | <dep package="libxml2"/> | ||
431 | <dep package="pango"/> | ||
432 | </dependencies> | ||
433 | </autotools> | ||
434 | <autotools id="librsvg" autogenargs="--enable-more-warnings=no" | ||
435 | supports-non-srcdir-builds="no"> | ||
436 | <branch revision="gnome-2-12-branch"/> | ||
437 | <dependencies> | ||
438 | <dep package="libxml2"/> | ||
439 | <dep package="gtk+"/> | ||
440 | <dep package="libart_lgpl"/> | ||
441 | <dep package="gnome-common"/> | ||
442 | <dep package="libgsf"/> | ||
443 | <dep package="libcroco"/> | ||
444 | <dep package="libgnomeprintui"/> | ||
445 | </dependencies> | ||
446 | </autotools> | ||
447 | <autotools id="eel"> | ||
448 | <branch revision="gnome-2-12"/> | ||
449 | <dependencies> | ||
450 | <dep package="librsvg"/> | ||
451 | <dep package="libgnomeui"/> | ||
452 | <dep package="gail"/> | ||
453 | <dep package="gnome-desktop"/> | ||
454 | <dep package="gnome-menus"/> | ||
455 | </dependencies> | ||
456 | </autotools> | ||
457 | <autotools id="nautilus"> | ||
458 | <branch revision="gnome-2-12"/> | ||
459 | <dependencies> | ||
460 | <dep package="scrollkeeper"/> | ||
461 | <dep package="esound"/> | ||
462 | <dep package="eel"/> | ||
463 | <dep package="librsvg"/> | ||
464 | <dep package="libgnomeui"/> | ||
465 | <dep package="gnome-desktop"/> | ||
466 | </dependencies> | ||
467 | </autotools> | ||
468 | <autotools id="nautilus-cd-burner"> | ||
469 | <branch revision="gnome-2-12"/> | ||
470 | <dependencies> | ||
471 | <dep package="nautilus"/> | ||
472 | </dependencies> | ||
473 | </autotools> | ||
474 | <autotools id="nautilus-open-terminal"> | ||
475 | <branch/> | ||
476 | <dependencies> | ||
477 | <dep package="nautilus"/> | ||
478 | </dependencies> | ||
479 | </autotools> | ||
480 | <autotools id="nautilus-media" supports-non-srcdir-builds="no"> | ||
481 | <branch/> | ||
482 | <dependencies> | ||
483 | <dep package="nautilus"/> | ||
484 | <dep package="gstreamer"/> | ||
485 | <dep package="gst-plugins"/> | ||
486 | </dependencies> | ||
487 | </autotools> | ||
488 | <autotools id="nautilus-vcs"> | ||
489 | <branch/> | ||
490 | <dependencies> | ||
491 | <dep package="nautilus"/> | ||
492 | </dependencies> | ||
493 | </autotools> | ||
494 | <autotools id="metacity"> | ||
495 | <branch revision="gnome-2-12"/> | ||
496 | <dependencies> | ||
497 | <dep package="gtk+"/> | ||
498 | <dep package="gconf"/> | ||
499 | <dep package="intltool"/> | ||
500 | <dep package="libglade"/> | ||
501 | </dependencies> | ||
502 | </autotools> | ||
503 | <autotools id="libgtop"> | ||
504 | <branch revision="gnome-2-12"/> | ||
505 | <dependencies> | ||
506 | <dep package="glib"/> | ||
507 | </dependencies> | ||
508 | </autotools> | ||
509 | <autotools id="gnome-system-monitor"> | ||
510 | <branch revision="gnome-2-12"/> | ||
511 | <dependencies> | ||
512 | <dep package="libgnomeui"/> | ||
513 | <dep package="libwnck"/> | ||
514 | <dep package="libgtop"/> | ||
515 | </dependencies> | ||
516 | </autotools> | ||
517 | <autotools id="gnome-control-center" supports-non-srcdir-builds="no"> | ||
518 | <branch revision="gnome-2-12"/> | ||
519 | <dependencies> | ||
520 | <dep package="libgnomeui"/> | ||
521 | <dep package="esound"/> | ||
522 | <dep package="gnome-desktop"/> | ||
523 | <dep package="metacity"/> | ||
524 | <dep package="nautilus"/> | ||
525 | <dep package="libxklavier"/> | ||
526 | <dep package="gnome-menus"/> | ||
527 | <dep package="gnome-doc-utils"/> | ||
528 | </dependencies> | ||
529 | </autotools> | ||
530 | <autotools id="yelp"> | ||
531 | <branch revision="gnome-2-12"/> | ||
532 | <dependencies> | ||
533 | <dep package="scrollkeeper"/> | ||
534 | <dep package="libgnomeui"/> | ||
535 | <dep package="gnome-vfs"/> | ||
536 | <dep package="gnome-doc-utils"/> | ||
537 | <dep package="mozilla"/> | ||
538 | </dependencies> | ||
539 | </autotools> | ||
540 | <autotools id="devhelp"> | ||
541 | <branch/> | ||
542 | <dependencies> | ||
543 | <dep package="libgnomeui"/> | ||
544 | <dep package="gnome-vfs"/> | ||
545 | <dep package="mozilla"/> | ||
546 | </dependencies> | ||
547 | </autotools> | ||
548 | <autotools id="gnome-utils"> | ||
549 | <branch revision="gnome-2-12"/> | ||
550 | <dependencies> | ||
551 | <dep package="libgnomeui"/> | ||
552 | <dep package="gnome-panel"/> | ||
553 | </dependencies> | ||
554 | </autotools> | ||
555 | <autotools id="gconf-editor" supports-non-srcdir-builds="no"> | ||
556 | <branch revision="gnome-2-12"/> | ||
557 | <dependencies> | ||
558 | <dep package="libgnomeui"/> | ||
559 | <dep package="gconf"/> | ||
560 | </dependencies> | ||
561 | </autotools> | ||
562 | <tarball id="audiofile" version="0.2.6" supports-non-srcdir-builds="no"> | ||
563 | <source href="http://www.68k.org/~michael/audiofile/audiofile-0.2.6.tar.gz" | ||
564 | size="374688" md5sum="9c1049876cd51c0f1b12c2886cce4d42"/> | ||
565 | </tarball> | ||
566 | <autotools id="esound"> | ||
567 | <branch/> | ||
568 | <dependencies> | ||
569 | <dep package="audiofile"/> | ||
570 | </dependencies> | ||
571 | </autotools> | ||
572 | <autotools id="gnome-media"> | ||
573 | <branch revision="gnome-2-12"/> | ||
574 | <dependencies> | ||
575 | <dep package="scrollkeeper"/> | ||
576 | <dep package="libgnomeui"/> | ||
577 | <dep package="esound"/> | ||
578 | <dep package="gail"/> | ||
579 | <dep package="gstreamer"/> | ||
580 | <dep package="gst-plugins"/> | ||
581 | <dep package="nautilus-cd-burner"/> | ||
582 | </dependencies> | ||
583 | </autotools> | ||
584 | <autotools id="gdm2"> | ||
585 | <branch revision="gnome-2-12"/> | ||
586 | <dependencies> | ||
587 | <dep package="librsvg"/> | ||
588 | <dep package="gnome-doc-utils"/> | ||
589 | </dependencies> | ||
590 | </autotools> | ||
591 | <autotools id="vte"> | ||
592 | <branch/> | ||
593 | <dependencies> | ||
594 | <dep package="gtk+"/> | ||
595 | </dependencies> | ||
596 | </autotools> | ||
597 | <autotools id="gnome-terminal"> | ||
598 | <branch revision="gnome-2-12"/> | ||
599 | <dependencies> | ||
600 | <dep package="libglade"/> | ||
601 | <dep package="libgnomeui"/> | ||
602 | <dep package="vte"/> | ||
603 | <dep package="startup-notification"/> | ||
604 | </dependencies> | ||
605 | </autotools> | ||
606 | <autotools id="gtk-engines"> | ||
607 | <branch revision="gtk-engines-2-6"/> | ||
608 | <dependencies> | ||
609 | <dep package="gtk+"/> | ||
610 | </dependencies> | ||
611 | </autotools> | ||
612 | <autotools id="libgnomeprint"> | ||
613 | <branch/> | ||
614 | <dependencies> | ||
615 | <dep package="intltool"/> | ||
616 | <dep package="libart_lgpl"/> | ||
617 | <dep package="glib"/> | ||
618 | <dep package="gnome-common"/> | ||
619 | <dep package="pango"/> | ||
620 | <dep package="libgnomecups"/> | ||
621 | </dependencies> | ||
622 | </autotools> | ||
623 | <autotools id="libgnomeprintui"> | ||
624 | <branch revision="gnome-2-12"/> | ||
625 | <dependencies> | ||
626 | <dep package="libgnomeprint"/> | ||
627 | <dep package="gtk+"/> | ||
628 | <dep package="libgnomecanvas"/> | ||
629 | <dep package="gnome-icon-theme"/> | ||
630 | </dependencies> | ||
631 | </autotools> | ||
632 | <autotools id="gedit"> | ||
633 | <branch revision="gnome-2-12"/> | ||
634 | <dependencies> | ||
635 | <dep package="scrollkeeper"/> | ||
636 | <dep package="libgnomeui"/> | ||
637 | <dep package="eel"/> | ||
638 | <dep package="libgnomeprintui"/> | ||
639 | <dep package="gtksourceview"/> | ||
640 | </dependencies> | ||
641 | </autotools> | ||
642 | <autotools id="gedit-plugins"> | ||
643 | <branch/> | ||
644 | <dependencies> | ||
645 | <dep package="gedit"/> | ||
646 | <dep package="libgnomeui"/> | ||
647 | <dep package="eel"/> | ||
648 | <dep package="libgnomeprintui"/> | ||
649 | </dependencies> | ||
650 | </autotools> | ||
651 | <autotools id="memprof"> | ||
652 | <branch/> | ||
653 | <dependencies> | ||
654 | <dep package="libgnomeui"/> | ||
655 | </dependencies> | ||
656 | </autotools> | ||
657 | <autotools id="eog"> | ||
658 | <branch revision="gnome-2-12"/> | ||
659 | <dependencies> | ||
660 | <dep package="libgnomeui"/> | ||
661 | <dep package="libgnomeprint"/> | ||
662 | </dependencies> | ||
663 | </autotools> | ||
664 | <autotools id="libgsf"> | ||
665 | <branch/> | ||
666 | <dependencies> | ||
667 | <dep package="glib"/> | ||
668 | <dep package="gnome-vfs"/> | ||
669 | <dep package="libbonobo"/> | ||
670 | </dependencies> | ||
671 | </autotools> | ||
672 | <autotools id="goffice"> | ||
673 | <branch/> | ||
674 | <dependencies> | ||
675 | <dep package="glib"/> | ||
676 | <dep package="libgsf"/> | ||
677 | <dep package="libxml2"/> | ||
678 | <dep package="pango"/> | ||
679 | <dep package="libglade"/> | ||
680 | <dep package="libgnomeprint"/> | ||
681 | <dep package="libgnomeprintui"/> | ||
682 | <dep package="libart_lgpl"/> | ||
683 | </dependencies> | ||
684 | </autotools> | ||
685 | <autotools id="gnumeric"> | ||
686 | <branch/> | ||
687 | <dependencies> | ||
688 | <dep package="goffice"/> | ||
689 | <dep package="libgsf"/> | ||
690 | <!-- Needs libgda 1.2, not HEAD <dep package="libgda" /> --> | ||
691 | <dep package="pygtk"/> | ||
692 | <dep package="libgnomeprintui"/> | ||
693 | </dependencies> | ||
694 | </autotools> | ||
695 | <autotools id="gimp" autogenargs="--disable-print"> | ||
696 | <branch/> | ||
697 | <dependencies> | ||
698 | <dep package="gtk+"/> | ||
699 | <dep package="libart_lgpl"/> | ||
700 | </dependencies> | ||
701 | </autotools> | ||
702 | <autotools id="glade"> | ||
703 | <branch/> | ||
704 | <dependencies> | ||
705 | <dep package="gtk+"/> | ||
706 | <dep package="libxml2"/> | ||
707 | <dep package="libgnomeui"/> | ||
708 | <dep package="libgnomeprintui"/> | ||
709 | </dependencies> | ||
710 | </autotools> | ||
711 | <autotools id="glade2c"> | ||
712 | <branch/> | ||
713 | <dependencies> | ||
714 | <dep package="gtk+"/> | ||
715 | <dep package="libxml2"/> | ||
716 | <dep package="libgnomeui"/> | ||
717 | </dependencies> | ||
718 | </autotools> | ||
719 | <autotools id="sawfish"> | ||
720 | <branch revision="gnome-2"/> | ||
721 | <dependencies> | ||
722 | <dep package="rep-gtk"/> | ||
723 | </dependencies> | ||
724 | </autotools> | ||
725 | <autotools id="rep-gtk"> | ||
726 | <branch/> | ||
727 | <dependencies> | ||
728 | <dep package="librep"/> | ||
729 | <dep package="gtk+"/> | ||
730 | </dependencies> | ||
731 | </autotools> | ||
732 | <autotools id="librep"> | ||
733 | <branch/> | ||
734 | </autotools> | ||
735 | <autotools id="rhythmbox"> | ||
736 | <branch/> | ||
737 | <dependencies> | ||
738 | <dep package="libgnomeui"/> | ||
739 | <dep package="gst-plugins"/> | ||
740 | <dep package="nautilus-cd-burner"/> | ||
741 | <dep package="totem"/> | ||
742 | </dependencies> | ||
743 | </autotools> | ||
744 | <autotools id="gstreamer" autogenargs="-- --disable-plugin-builddir --disable-tests" supports-non-srcdir-builds="no"> | ||
745 | <branch repo="gstreamer.freedesktop.org" revision="BRANCH-GSTREAMER-0_8"/> | ||
746 | <dependencies> | ||
747 | <dep package="glib"/> | ||
748 | <dep package="libxml2"/> | ||
749 | </dependencies> | ||
750 | </autotools> | ||
751 | <autotools id="gst-plugins" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
752 | <branch repo="gstreamer.freedesktop.org" revision="BRANCH-GSTREAMER-0_8"/> | ||
753 | <dependencies> | ||
754 | <dep package="gstreamer"/> | ||
755 | <dep package="gnome-vfs"/> | ||
756 | <dep package="gtk+"/> | ||
757 | </dependencies> | ||
758 | </autotools> | ||
759 | <autotools id="planner"> | ||
760 | <branch/> | ||
761 | <dependencies> | ||
762 | <dep package="glib"/> | ||
763 | <dep package="libxml2"/> | ||
764 | <dep package="libgnomeui"/> | ||
765 | <dep package="libgnomeprintui"/> | ||
766 | <dep package="libgsf"/> | ||
767 | </dependencies> | ||
768 | </autotools> | ||
769 | <autotools id="file-roller"> | ||
770 | <branch revision="gnome-2-12"/> | ||
771 | <dependencies> | ||
772 | <dep package="scrollkeeper"/> | ||
773 | <dep package="gnome-doc-utils"/> | ||
774 | <dep package="nautilus"/> | ||
775 | </dependencies> | ||
776 | </autotools> | ||
777 | <autotools id="balsa"> | ||
778 | <branch revision="BALSA_2"/> | ||
779 | <dependencies> | ||
780 | <dep package="libgnomeui"/> | ||
781 | </dependencies> | ||
782 | </autotools> | ||
783 | <autotools id="pan"> | ||
784 | <branch/> | ||
785 | <dependencies> | ||
786 | <dep package="libgnomeui"/> | ||
787 | <dep package="gnet"/> | ||
788 | </dependencies> | ||
789 | </autotools> | ||
790 | <autotools id="gcalctool" supports-non-srcdir-builds="no"> | ||
791 | <branch revision="gnome-2-12"/> | ||
792 | <dependencies> | ||
793 | <dep package="scrollkeeper"/> | ||
794 | <dep package="libgnomeui"/> | ||
795 | </dependencies> | ||
796 | </autotools> | ||
797 | <autotools id="ggv" supports-non-srcdir-builds="no"> | ||
798 | <branch/> | ||
799 | <dependencies> | ||
800 | <dep package="scrollkeeper"/> | ||
801 | <dep package="libgnomeui"/> | ||
802 | </dependencies> | ||
803 | </autotools> | ||
804 | <autotools id="ekiga"> | ||
805 | <branch revision="gnome-2-12"/> | ||
806 | <dependencies> | ||
807 | <dep package="libgnomeui"/> | ||
808 | </dependencies> | ||
809 | </autotools> | ||
810 | <autotools id="gucharmap" supports-non-srcdir-builds="no"> | ||
811 | <branch revision="gnome-2-12"/> | ||
812 | <dependencies> | ||
813 | <dep package="libgnomeui"/> | ||
814 | <dep package="gnome-doc-utils"/> | ||
815 | </dependencies> | ||
816 | </autotools> | ||
817 | <autotools id="gtksourceview" autogenargs="--enable-compile-warnings=maximum"> | ||
818 | <branch revision="gnome-2-12"/> | ||
819 | <dependencies> | ||
820 | <dep package="gtk+"/> | ||
821 | <dep package="libxml2"/> | ||
822 | <dep package="libgnomeprint"/> | ||
823 | <dep package="gnome-vfs"/> | ||
824 | </dependencies> | ||
825 | </autotools> | ||
826 | <autotools id="glimmer"> | ||
827 | <branch/> | ||
828 | <dependencies> | ||
829 | <dep package="gtksourceview"/> | ||
830 | <dep package="libgnomeprint"/> | ||
831 | </dependencies> | ||
832 | </autotools> | ||
833 | <autotools id="gdl"> | ||
834 | <branch/> | ||
835 | <dependencies> | ||
836 | <dep package="libgnomeui"/> | ||
837 | <dep package="librsvg"/> | ||
838 | </dependencies> | ||
839 | </autotools> | ||
840 | <autotools id="gnome-build"> | ||
841 | <branch/> | ||
842 | <dependencies> | ||
843 | <dep package="gdl"/> | ||
844 | <dep package="gnome-vfs"/> | ||
845 | <dep package="gtkhtml2"/> | ||
846 | </dependencies> | ||
847 | </autotools> | ||
848 | <autotools id="scaffold"> | ||
849 | <branch/> | ||
850 | <dependencies> | ||
851 | <dep package="libgnomeui"/> | ||
852 | <dep package="vte"/> | ||
853 | <dep package="gdl"/> | ||
854 | </dependencies> | ||
855 | </autotools> | ||
856 | <autotools id="libsigc++2"> | ||
857 | <branch revision="libsigc-2-0"/> | ||
858 | </autotools> | ||
859 | <autotools id="glibmm"> | ||
860 | <branch revision="glibmm-2-8"/> | ||
861 | <dependencies> | ||
862 | <dep package="glib"/> | ||
863 | <dep package="libsigc++2"/> | ||
864 | </dependencies> | ||
865 | </autotools> | ||
866 | <autotools id="gtkmm"> | ||
867 | <branch revision="gtkmm-2-8"/> | ||
868 | <dependencies> | ||
869 | <dep package="glibmm"/> | ||
870 | <dep package="gtk+"/> | ||
871 | </dependencies> | ||
872 | </autotools> | ||
873 | <autotools id="orbitcpp"> | ||
874 | <branch/> | ||
875 | <dependencies> | ||
876 | <dep package="ORBit2"/> | ||
877 | </dependencies> | ||
878 | </autotools> | ||
879 | <autotools id="gnomemm/libgnomemm"> | ||
880 | <branch/> | ||
881 | <dependencies> | ||
882 | <dep package="libgnome"/> | ||
883 | <dep package="gtkmm"/> | ||
884 | </dependencies> | ||
885 | </autotools> | ||
886 | <autotools id="gnomemm/libglademm"> | ||
887 | <branch/> | ||
888 | <dependencies> | ||
889 | <dep package="libglade"/> | ||
890 | <dep package="gtkmm"/> | ||
891 | </dependencies> | ||
892 | </autotools> | ||
893 | <autotools id="gnomemm/libbonobomm"> | ||
894 | <branch/> | ||
895 | <dependencies> | ||
896 | <dep package="libbonobo"/> | ||
897 | <dep package="gtkmm"/> | ||
898 | <dep package="orbitcpp"/> | ||
899 | </dependencies> | ||
900 | </autotools> | ||
901 | <autotools id="gnomemm/libbonobouimm"> | ||
902 | <branch/> | ||
903 | <dependencies> | ||
904 | <dep package="libbonoboui"/> | ||
905 | <dep package="gnomemm/libbonobomm"/> | ||
906 | </dependencies> | ||
907 | </autotools> | ||
908 | <autotools id="gnomemm/libgnomecanvasmm"> | ||
909 | <branch/> | ||
910 | <dependencies> | ||
911 | <dep package="libgnomecanvas"/> | ||
912 | <dep package="gtkmm"/> | ||
913 | </dependencies> | ||
914 | </autotools> | ||
915 | <autotools id="gnomemm/gconfmm"> | ||
916 | <branch/> | ||
917 | <dependencies> | ||
918 | <dep package="gconf"/> | ||
919 | <dep package="gtkmm"/> | ||
920 | </dependencies> | ||
921 | </autotools> | ||
922 | <autotools id="gnomemm/libgnomeuimm"> | ||
923 | <branch/> | ||
924 | <dependencies> | ||
925 | <dep package="gtkmm"/> | ||
926 | <dep package="libgnomeui"/> | ||
927 | <dep package="gnomemm/libgnomemm"/> | ||
928 | <dep package="gnomemm/gconfmm"/> | ||
929 | <dep package="gnomemm/libgnomecanvasmm"/> | ||
930 | <dep package="gnomemm/libglademm"/> | ||
931 | <dep package="gnomemm/gnome-vfsmm"/> | ||
932 | </dependencies> | ||
933 | </autotools> | ||
934 | <autotools id="gnomemm/gnome-vfsmm"> | ||
935 | <branch/> | ||
936 | <dependencies> | ||
937 | <dep package="glibmm"/> | ||
938 | <dep package="gnome-vfs"/> | ||
939 | </dependencies> | ||
940 | </autotools> | ||
941 | <autotools id="gnomemm/libpanelappletmm"> | ||
942 | <branch/> | ||
943 | <dependencies> | ||
944 | <dep package="gtkmm"/> | ||
945 | </dependencies> | ||
946 | </autotools> | ||
947 | <autotools id="gnomemm/libgnomeprintmm"> | ||
948 | <branch/> | ||
949 | <dependencies> | ||
950 | <dep package="gtkmm"/> | ||
951 | <dep package="libgnomeprint"/> | ||
952 | </dependencies> | ||
953 | </autotools> | ||
954 | <autotools id="gnomemm/libgnomeprintuimm"> | ||
955 | <branch/> | ||
956 | <dependencies> | ||
957 | <dep package="gtkmm"/> | ||
958 | <dep package="gnomemm/libgnomeprintmm"/> | ||
959 | <dep package="libgnomeprintui"/> | ||
960 | </dependencies> | ||
961 | </autotools> | ||
962 | <autotools id="gnomemm/libgdamm"> | ||
963 | <branch revision="libgda-1-2"/> | ||
964 | <dependencies> | ||
965 | <dep package="gtkmm"/> | ||
966 | <!-- needs libgda 1.2, not HEAD <dep package="libgda" /> --> | ||
967 | </dependencies> | ||
968 | </autotools> | ||
969 | <autotools id="gnomemm/gtkmm_hello"> | ||
970 | <branch/> | ||
971 | <dependencies> | ||
972 | <dep package="gtkmm"/> | ||
973 | </dependencies> | ||
974 | </autotools> | ||
975 | <autotools id="regexxer"> | ||
976 | <branch/> | ||
977 | <dependencies> | ||
978 | <dep package="intltool"/> | ||
979 | <dep package="gtkmm"/> | ||
980 | <dep package="gnomemm/gconfmm"/> | ||
981 | <dep package="gnomemm/libglademm"/> | ||
982 | </dependencies> | ||
983 | </autotools> | ||
984 | <autotools id="gnet" autogenargs="--enable-glib2"> | ||
985 | <branch revision="GNET_1_1"/> | ||
986 | <dependencies> | ||
987 | <dep package="glib"/> | ||
988 | </dependencies> | ||
989 | </autotools> | ||
990 | <autotools id="gnomeicu"> | ||
991 | <branch/> | ||
992 | <dependencies> | ||
993 | <dep package="libgnomeui"/> | ||
994 | </dependencies> | ||
995 | </autotools> | ||
996 | <autotools id="at-spi"> | ||
997 | <branch revision="AT_SPI_1_6_6"/> | ||
998 | <dependencies> | ||
999 | <dep package="libbonobo"/> | ||
1000 | <dep package="gail"/> | ||
1001 | </dependencies> | ||
1002 | </autotools> | ||
1003 | <autotools id="libgail-gnome"> | ||
1004 | <branch/> | ||
1005 | <dependencies> | ||
1006 | <dep package="at-spi"/> | ||
1007 | <dep package="libgnomeui"/> | ||
1008 | <dep package="gnome-panel"/> | ||
1009 | </dependencies> | ||
1010 | </autotools> | ||
1011 | <autotools id="at-poke"> | ||
1012 | <branch/> | ||
1013 | <dependencies> | ||
1014 | <dep package="libgail-gnome"/> | ||
1015 | </dependencies> | ||
1016 | </autotools> | ||
1017 | <autotools id="gnome-mag"> | ||
1018 | <branch/> | ||
1019 | <dependencies> | ||
1020 | <dep package="at-spi"/> | ||
1021 | </dependencies> | ||
1022 | </autotools> | ||
1023 | <autotools id="gok"> | ||
1024 | <branch/> | ||
1025 | <dependencies> | ||
1026 | <dep package="at-spi"/> | ||
1027 | <dep package="libgnomeui"/> | ||
1028 | <dep package="libwnck"/> | ||
1029 | <dep package="esound"/> | ||
1030 | <dep package="scrollkeeper"/> | ||
1031 | </dependencies> | ||
1032 | </autotools> | ||
1033 | <autotools id="gnome-speech"> | ||
1034 | <branch/> | ||
1035 | <dependencies> | ||
1036 | <dep package="libbonobo"/> | ||
1037 | </dependencies> | ||
1038 | </autotools> | ||
1039 | <autotools id="gnopernicus"> | ||
1040 | <branch revision="gnome-2-12"/> | ||
1041 | <dependencies> | ||
1042 | <dep package="gconf"/> | ||
1043 | <dep package="libgnomeui"/> | ||
1044 | <dep package="gnome-speech"/> | ||
1045 | <dep package="gnome-mag"/> | ||
1046 | </dependencies> | ||
1047 | </autotools> | ||
1048 | <autotools id="dasher" autogenargs="--with-a11y --with-gnome"> | ||
1049 | <branch revision="gnome-2-12"/> | ||
1050 | <dependencies> | ||
1051 | <dep package="at-spi"/> | ||
1052 | <dep package="libgnomeui"/> | ||
1053 | <dep package="gnome-speech"/> | ||
1054 | <dep package="gnome-vfs"/> | ||
1055 | </dependencies> | ||
1056 | </autotools> | ||
1057 | <autotools id="gnome-screensaver"> | ||
1058 | <branch/> | ||
1059 | <dependencies> | ||
1060 | <dep package="gconf"/> | ||
1061 | <dep package="gtk+"/> | ||
1062 | <dep package="dbus"/> | ||
1063 | </dependencies> | ||
1064 | </autotools> | ||
1065 | <autotools id="gnome-power-manager"> | ||
1066 | <branch/> | ||
1067 | <dependencies> | ||
1068 | <dep package="libgnomeui"/> | ||
1069 | <dep package="hal"/> | ||
1070 | <dep package="libwnck"/> | ||
1071 | <dep package="gtk+"/> | ||
1072 | <dep package="gconf"/> | ||
1073 | <dep package="intltool"/> | ||
1074 | <dep package="libglade"/> | ||
1075 | <dep package="libnotify"/> | ||
1076 | </dependencies> | ||
1077 | </autotools> | ||
1078 | <autotools id="gthumb"> | ||
1079 | <branch/> | ||
1080 | <dependencies> | ||
1081 | <dep package="libgnomeui"/> | ||
1082 | <dep package="gnome-vfs"/> | ||
1083 | <dep package="libglade"/> | ||
1084 | <dep package="libbonoboui"/> | ||
1085 | <dep package="libgnomeprintui"/> | ||
1086 | </dependencies> | ||
1087 | </autotools> | ||
1088 | <autotools id="fast-user-switch-applet"> | ||
1089 | <branch/> | ||
1090 | <dependencies> | ||
1091 | <dep package="gtk+"/> | ||
1092 | <dep package="gconf"/> | ||
1093 | <dep package="libglade"/> | ||
1094 | <dep package="gnome-panel"/> | ||
1095 | </dependencies> | ||
1096 | </autotools> | ||
1097 | <autotools id="libnotify"> | ||
1098 | <branch repo="svn.galago-project.org" module="trunk/libnotify"/> | ||
1099 | <dependencies> | ||
1100 | <dep package="gtk+"/> | ||
1101 | <dep package="dbus"/> | ||
1102 | </dependencies> | ||
1103 | </autotools> | ||
1104 | |||
1105 | <metamodule id="meta-gnome-devel-platform"> | ||
1106 | <dependencies> | ||
1107 | <dep package="libgnome"/> | ||
1108 | <dep package="libbonobo"/> | ||
1109 | <dep package="libbonoboui"/> | ||
1110 | <dep package="libgnomeui"/> | ||
1111 | </dependencies> | ||
1112 | </metamodule> | ||
1113 | <metamodule id="meta-gnome-core"> | ||
1114 | <dependencies> | ||
1115 | <dep package="gnome-desktop"/> | ||
1116 | <dep package="gnome-panel"/> | ||
1117 | <dep package="gnome-session"/> | ||
1118 | <dep package="gnome-terminal"/> | ||
1119 | <dep package="gnome-applets"/> | ||
1120 | </dependencies> | ||
1121 | </metamodule> | ||
1122 | <metamodule id="meta-nautilus"> | ||
1123 | <dependencies> | ||
1124 | <dep package="nautilus"/> | ||
1125 | </dependencies> | ||
1126 | </metamodule> | ||
1127 | <metamodule id="meta-gnome-desktop"> | ||
1128 | <dependencies> | ||
1129 | <dep package="meta-gnome-core"/> | ||
1130 | <dep package="gnome-control-center"/> | ||
1131 | <dep package="meta-nautilus"/> | ||
1132 | <dep package="yelp"/> | ||
1133 | <dep package="bug-buddy"/> | ||
1134 | <dep package="gedit"/> | ||
1135 | <dep package="gtk-engines"/> | ||
1136 | <dep package="eog"/> | ||
1137 | <dep package="metacity"/> | ||
1138 | <dep package="gconf-editor"/> | ||
1139 | <dep package="gnome-utils"/> | ||
1140 | <dep package="gnome-system-monitor"/> | ||
1141 | <dep package="gstreamer"/> | ||
1142 | <dep package="gnome-media"/> | ||
1143 | <dep package="gnome-netstatus"/> | ||
1144 | <dep package="gcalctool"/> | ||
1145 | <dep package="gucharmap"/> | ||
1146 | <dep package="nautilus-cd-burner"/> | ||
1147 | <dep package="zenity"/> | ||
1148 | <dep package="libgail-gnome"/> | ||
1149 | <dep package="gnopernicus"/> | ||
1150 | <dep package="gok"/> | ||
1151 | <dep package="epiphany"/> | ||
1152 | <dep package="gnome-games"/> | ||
1153 | <dep package="gnome-user-docs"/> | ||
1154 | <dep package="file-roller"/> | ||
1155 | <dep package="gnome-system-tools"/> | ||
1156 | <dep package="gnome-nettool"/> | ||
1157 | <dep package="vino"/> | ||
1158 | <dep package="gnome-volume-manager"/> | ||
1159 | <dep package="totem"/> | ||
1160 | <dep package="gnome-menus"/> | ||
1161 | <dep package="gnome-backgrounds"/> | ||
1162 | <dep package="sound-juicer"/> | ||
1163 | <dep package="evolution"/> | ||
1164 | <dep package="evolution-webcal"/> | ||
1165 | <dep package="evolution-exchange"/> | ||
1166 | <dep package="ekiga"/> | ||
1167 | <dep package="evince"/> | ||
1168 | <dep package="dasher"/> | ||
1169 | <dep package="gnome-keyring-manager"/> | ||
1170 | </dependencies> | ||
1171 | </metamodule> | ||
1172 | <metamodule id="meta-gnome-devel-tools"> | ||
1173 | <dependencies> | ||
1174 | <dep package="glade"/> | ||
1175 | <dep package="memprof"/> | ||
1176 | <dep package="gconf-editor"/> | ||
1177 | <dep package="devhelp"/> | ||
1178 | <dep package="nautilus-vcs"/> | ||
1179 | </dependencies> | ||
1180 | </metamodule> | ||
1181 | <metamodule id="meta-gnome-python"> | ||
1182 | <dependencies> | ||
1183 | <dep package="pygtk"/> | ||
1184 | <dep package="gnome-python"/> | ||
1185 | </dependencies> | ||
1186 | <after> | ||
1187 | <dep package="gnome-python-extras"/> | ||
1188 | </after> | ||
1189 | </metamodule> | ||
1190 | <metamodule id="meta-gnome-c++"> | ||
1191 | <dependencies> | ||
1192 | <dep package="gtkmm"/> | ||
1193 | <dep package="gnomemm/libgnomeuimm"/> | ||
1194 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1195 | <dep package="gnomemm/libpanelappletmm"/> | ||
1196 | <dep package="gnomemm/libbonobouimm"/> | ||
1197 | <dep package="gnomemm/libgnomeprintuimm"/> | ||
1198 | <dep package="libxml++"/> | ||
1199 | <dep package="gnomemm/libgdamm"/> | ||
1200 | <dep package="bakery"/> | ||
1201 | </dependencies> | ||
1202 | </metamodule> | ||
1203 | <metamodule id="meta-gnome-accessibility"> | ||
1204 | <dependencies> | ||
1205 | <dep package="libgail-gnome"/> | ||
1206 | <dep package="at-poke"/> | ||
1207 | <dep package="dasher"/> | ||
1208 | <dep package="gnome-mag"/> | ||
1209 | <dep package="gok"/> | ||
1210 | <dep package="gnome-speech"/> | ||
1211 | <dep package="gnopernicus"/> | ||
1212 | </dependencies> | ||
1213 | </metamodule> | ||
1214 | <metamodule id="meta-gnome-proposed"> | ||
1215 | <dependencies> | ||
1216 | </dependencies> | ||
1217 | </metamodule> | ||
1218 | <autotools id="sodipodi"> | ||
1219 | <branch/> | ||
1220 | <dependencies> | ||
1221 | <dep package="gtk+"/> | ||
1222 | <dep package="libgnomeprintui"/> | ||
1223 | <dep package="libart_lgpl"/> | ||
1224 | <dep package="libxml2"/> | ||
1225 | </dependencies> | ||
1226 | </autotools> | ||
1227 | <autotools id="gnome-themes"> | ||
1228 | <branch revision="gnome-2-12"/> | ||
1229 | <dependencies> | ||
1230 | <dep package="gtk-engines"/> | ||
1231 | </dependencies> | ||
1232 | </autotools> | ||
1233 | <autotools id="gob"> | ||
1234 | <branch/> | ||
1235 | </autotools> | ||
1236 | <autotools id="libgnetwork"> | ||
1237 | <branch/> | ||
1238 | <dependencies> | ||
1239 | <dep package="glib"/> | ||
1240 | <dep package="gconf"/> | ||
1241 | <dep package="intltool"/> | ||
1242 | </dependencies> | ||
1243 | </autotools> | ||
1244 | <autotools id="libgircclient"> | ||
1245 | <branch/> | ||
1246 | <dependencies> | ||
1247 | <dep package="libgnetwork"/> | ||
1248 | </dependencies> | ||
1249 | </autotools> | ||
1250 | <autotools id="gnomechat"> | ||
1251 | <branch/> | ||
1252 | <dependencies> | ||
1253 | <dep package="libgnetwork"/> | ||
1254 | <dep package="libgircclient"/> | ||
1255 | <dep package="libgnomeui"/> | ||
1256 | </dependencies> | ||
1257 | </autotools> | ||
1258 | <mozillamodule id="mozilla" autogenargs="--enable-default-toolkit=gtk2 --disable-mailnews --disable-ldap --disable-debug --enable-optimize --disable-tests --enable-crypto --enable-xft --with-system-zlib --disable-freetype2 --enable-application=browser" cvsroot="mozilla.org" revision="MOZILLA_1_7_BRANCH"> | ||
1259 | <dependencies> | ||
1260 | <dep package="gtk+"/> | ||
1261 | </dependencies> | ||
1262 | </mozillamodule> | ||
1263 | <autotools id="epiphany"> | ||
1264 | <branch revision="gnome-2-12"/> | ||
1265 | <dependencies> | ||
1266 | <dep package="iso-codes"/> | ||
1267 | <dep package="libgnomeui"/> | ||
1268 | <dep package="pygtk"/> | ||
1269 | <dep package="gnome-python"/> | ||
1270 | <dep package="gnome-doc-utils"/> | ||
1271 | <dep package="libgnomeprintui"/> | ||
1272 | <dep package="mozilla"/> | ||
1273 | </dependencies> | ||
1274 | </autotools> | ||
1275 | <autotools id="epiphany-extensions"> | ||
1276 | <branch revision="gnome-2-12"/> | ||
1277 | <dependencies> | ||
1278 | <dep package="epiphany"/> | ||
1279 | </dependencies> | ||
1280 | </autotools> | ||
1281 | <autotools id="galeon"> | ||
1282 | <branch/> | ||
1283 | <dependencies> | ||
1284 | <dep package="mozilla"/> | ||
1285 | <dep package="libgnomeui"/> | ||
1286 | </dependencies> | ||
1287 | </autotools> | ||
1288 | <autotools id="libsoup"> | ||
1289 | <branch revision="gnome-2-12"/> | ||
1290 | <dependencies> | ||
1291 | <dep package="glib"/> | ||
1292 | <dep package="gnutls"/> | ||
1293 | <dep package="libxml2"/> | ||
1294 | </dependencies> | ||
1295 | </autotools> | ||
1296 | <autotools id="gtkhtml"> | ||
1297 | <branch revision="gnome-2-12"/> | ||
1298 | <dependencies> | ||
1299 | <dep package="gtk+"/> | ||
1300 | <dep package="libgnomeui"/> | ||
1301 | <dep package="libbonoboui"/> | ||
1302 | <dep package="libglade"/> | ||
1303 | <dep package="gail"/> | ||
1304 | <dep package="libgnomeprint"/> | ||
1305 | <dep package="libgnomeprintui"/> | ||
1306 | <dep package="libsoup"/> | ||
1307 | </dependencies> | ||
1308 | </autotools> | ||
1309 | <autotools id="evolution-data-server" supports-non-srcdir-builds="no"> | ||
1310 | <branch revision="gnome-2-12"/> | ||
1311 | <dependencies> | ||
1312 | <dep package="libbonobo"/> | ||
1313 | <dep package="libgnome"/> | ||
1314 | <dep package="libgnomeui"/> | ||
1315 | <dep package="libsoup"/> | ||
1316 | <dep package="libxml2"/> | ||
1317 | <dep package="gconf"/> | ||
1318 | <dep package="gnome-vfs"/> | ||
1319 | <dep package="mozilla"/> | ||
1320 | </dependencies> | ||
1321 | </autotools> | ||
1322 | <autotools id="evolution"> | ||
1323 | <branch revision="gnome-2-12"/> | ||
1324 | <dependencies> | ||
1325 | <dep package="evolution-data-server"/> | ||
1326 | <dep package="gtkhtml"/> | ||
1327 | <dep package="libgnomeui"/> | ||
1328 | <dep package="libbonoboui"/> | ||
1329 | </dependencies> | ||
1330 | </autotools> | ||
1331 | <autotools id="evolution-webcal"> | ||
1332 | <branch/> | ||
1333 | <dependencies> | ||
1334 | <dep package="evolution-data-server"/> | ||
1335 | <dep package="libsoup"/> | ||
1336 | <dep package="libgnomeui"/> | ||
1337 | </dependencies> | ||
1338 | </autotools> | ||
1339 | <autotools id="evolution-exchange"> | ||
1340 | <branch revision="gnome-2-12"/> | ||
1341 | <dependencies> | ||
1342 | <dep package="evolution-data-server"/> | ||
1343 | <dep package="evolution"/> | ||
1344 | <dep package="libsoup"/> | ||
1345 | </dependencies> | ||
1346 | </autotools> | ||
1347 | <tarball id="xchat" version="2.4.5"> | ||
1348 | <source href="http://xchat.org/files/source/2.4/xchat-2.4.5.tar.bz2" | ||
1349 | size="1324626" md5sum="9107a92693e6c62ff2008030e698b92b"/> | ||
1350 | <dependencies> | ||
1351 | <dep package="gtk+"/> | ||
1352 | <dep package="libxml2"/> | ||
1353 | </dependencies> | ||
1354 | </tarball> | ||
1355 | <tarball id="camorama" version="0.17"> | ||
1356 | <source href="http://camorama.fixedgear.org/downloads/camorama-0.17.tar.bz2" | ||
1357 | size="312233" md5sum="2b2784af53a1ba8fa4419aa806967b35"/> | ||
1358 | <dependencies> | ||
1359 | <dep package="gtk+"/> | ||
1360 | </dependencies> | ||
1361 | </tarball> | ||
1362 | <autotools id="gtk-engines-cleanice"> | ||
1363 | <branch repo="elysium-project.sf.net"/> | ||
1364 | <dependencies> | ||
1365 | <dep package="gtk+"/> | ||
1366 | </dependencies> | ||
1367 | </autotools> | ||
1368 | <autotools id="gaim"> | ||
1369 | <branch repo="gaim.sf.net"/> | ||
1370 | <dependencies> | ||
1371 | <dep package="libgnomeui"/> | ||
1372 | </dependencies> | ||
1373 | </autotools> | ||
1374 | <autotools id="zenity"> | ||
1375 | <branch revision="gnome-2-12"/> | ||
1376 | <dependencies> | ||
1377 | <dep package="gtk+"/> | ||
1378 | <dep package="gconf"/> | ||
1379 | <dep package="libgnomecanvas"/> | ||
1380 | <dep package="gnome-doc-utils"/> | ||
1381 | </dependencies> | ||
1382 | </autotools> | ||
1383 | <autotools id="gpdf"> | ||
1384 | <branch/> | ||
1385 | <dependencies> | ||
1386 | <dep package="libgnomeui"/> | ||
1387 | <dep package="libbonoboui"/> | ||
1388 | <dep package="libgnomeprintui"/> | ||
1389 | </dependencies> | ||
1390 | </autotools> | ||
1391 | <autotools id="gnome-netstatus"> | ||
1392 | <branch/> | ||
1393 | <dependencies> | ||
1394 | <dep package="libgnomeui"/> | ||
1395 | <dep package="gnome-panel"/> | ||
1396 | <dep package="gnome-doc-utils"/> | ||
1397 | </dependencies> | ||
1398 | </autotools> | ||
1399 | <autotools id="gnome-doc-utils"> | ||
1400 | <branch revision="gnome-2-12"/> | ||
1401 | <dependencies> | ||
1402 | <dep package="libxslt"/> | ||
1403 | <dep package="intltool"/> | ||
1404 | <dep package="glib"/> | ||
1405 | </dependencies> | ||
1406 | </autotools> | ||
1407 | <tarball id="libmusicbrainz" version="2.1.1"> | ||
1408 | <source href="ftp://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-2.1.1.tar.gz" | ||
1409 | size="528162" md5sum="4f753d93a85cf413e00f1394b8cbd269"/> | ||
1410 | </tarball> | ||
1411 | <autotools id="totem" autogenargs="--enable-gstreamer"> | ||
1412 | <branch revision="gnome-2-12"/> | ||
1413 | <dependencies> | ||
1414 | <dep package="gnome-desktop"/> | ||
1415 | <dep package="nautilus-cd-burner"/> | ||
1416 | <dep package="gstreamer"/> | ||
1417 | <dep package="gst-plugins"/> | ||
1418 | <dep package="libmusicbrainz"/> | ||
1419 | <dep package="iso-codes"/> | ||
1420 | </dependencies> | ||
1421 | </autotools> | ||
1422 | <autotools id="gnome-themes-extras"> | ||
1423 | <branch/> | ||
1424 | <dependencies> | ||
1425 | <dep package="gnome-themes"/> | ||
1426 | </dependencies> | ||
1427 | </autotools> | ||
1428 | <autotools id="libgda"> | ||
1429 | <branch module="libgda"/> | ||
1430 | <dependencies> | ||
1431 | <dep package="glib"/> | ||
1432 | </dependencies> | ||
1433 | </autotools> | ||
1434 | <autotools id="libgnomedb" autogenargs="--enable-gnome=yes"> | ||
1435 | <branch/> | ||
1436 | <dependencies> | ||
1437 | <dep package="libgda"/> | ||
1438 | <dep package="libgnomeui"/> | ||
1439 | <dep package="libbonoboui"/> | ||
1440 | </dependencies> | ||
1441 | </autotools> | ||
1442 | <autotools id="mergeant"> | ||
1443 | <branch/> | ||
1444 | <dependencies> | ||
1445 | <dep package="libgnomedb"/> | ||
1446 | </dependencies> | ||
1447 | </autotools> | ||
1448 | <autotools id="gtranslator"> | ||
1449 | <branch/> | ||
1450 | <dependencies> | ||
1451 | <dep package="libgnomeui"/> | ||
1452 | </dependencies> | ||
1453 | </autotools> | ||
1454 | <autotools id="gnome-spell"> | ||
1455 | <branch/> | ||
1456 | <dependencies> | ||
1457 | <dep package="libgnomeui"/> | ||
1458 | </dependencies> | ||
1459 | </autotools> | ||
1460 | <autotools id="libgnomecups"> | ||
1461 | <branch/> | ||
1462 | <dependencies> | ||
1463 | <dep package="glib"/> | ||
1464 | </dependencies> | ||
1465 | </autotools> | ||
1466 | <autotools id="gnome-cups-manager"> | ||
1467 | <branch/> | ||
1468 | <dependencies> | ||
1469 | <dep package="libgnomecups"/> | ||
1470 | <dep package="libgnomeui"/> | ||
1471 | <dep package="libglade"/> | ||
1472 | </dependencies> | ||
1473 | </autotools> | ||
1474 | <autotools id="libxml++"> | ||
1475 | <branch revision="gnome-2-12"/> | ||
1476 | <dependencies> | ||
1477 | <dep package="libxml2"/> | ||
1478 | <dep package="glibmm"/> | ||
1479 | </dependencies> | ||
1480 | </autotools> | ||
1481 | <autotools id="bakery"> | ||
1482 | <branch/> | ||
1483 | <dependencies> | ||
1484 | <dep package="libxml++"/> | ||
1485 | <dep package="gtkmm"/> | ||
1486 | <dep package="gnomemm/libglademm"/> | ||
1487 | <dep package="gnomemm/gconfmm"/> | ||
1488 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1489 | </dependencies> | ||
1490 | </autotools> | ||
1491 | <autotools id="gnome-hello"> | ||
1492 | <branch/> | ||
1493 | <dependencies> | ||
1494 | <dep package="glib"/> | ||
1495 | <dep package="libgnome"/> | ||
1496 | <dep package="libgnomeui"/> | ||
1497 | </dependencies> | ||
1498 | </autotools> | ||
1499 | <autotools id="gnome-system-tools"> | ||
1500 | <branch revision="gnome-2-12"/> | ||
1501 | <dependencies> | ||
1502 | <dep package="glib"/> | ||
1503 | <dep package="libxml2"/> | ||
1504 | <dep package="gconf"/> | ||
1505 | <dep package="libgnomeui"/> | ||
1506 | <dep package="libbonoboui"/> | ||
1507 | <dep package="libglade"/> | ||
1508 | <dep package="nautilus"/> | ||
1509 | <dep package="system-tools-backends"/> | ||
1510 | </dependencies> | ||
1511 | </autotools> | ||
1512 | <autotools id="gnome-user-docs"> | ||
1513 | <branch/> | ||
1514 | <dependencies> | ||
1515 | <dep package="scrollkeeper"/> | ||
1516 | </dependencies> | ||
1517 | </autotools> | ||
1518 | <autotools id="loudmouth"> | ||
1519 | <branch/> | ||
1520 | <dependencies> | ||
1521 | <dep package="glib"/> | ||
1522 | </dependencies> | ||
1523 | </autotools> | ||
1524 | <autotools id="gossip"> | ||
1525 | <branch revision="gossip-0-8"/> | ||
1526 | <dependencies> | ||
1527 | <dep package="loudmouth"/> | ||
1528 | <dep package="libgnomeui"/> | ||
1529 | </dependencies> | ||
1530 | </autotools> | ||
1531 | <autotools id="conglomerate"> | ||
1532 | <branch/> | ||
1533 | <dependencies> | ||
1534 | <dep package="libxslt"/> | ||
1535 | <dep package="gconf"/> | ||
1536 | <dep package="libgnomeui"/> | ||
1537 | </dependencies> | ||
1538 | </autotools> | ||
1539 | <autotools id="sound-juicer"> | ||
1540 | <branch revision="gnome-2-12"/> | ||
1541 | <dependencies> | ||
1542 | <dep package="gnome-doc-utils"/> | ||
1543 | <dep package="libgnomeui"/> | ||
1544 | <dep package="gnome-media"/> | ||
1545 | <dep package="gstreamer"/> | ||
1546 | <dep package="gst-plugins"/> | ||
1547 | <dep package="nautilus-cd-burner"/> | ||
1548 | </dependencies> | ||
1549 | </autotools> | ||
1550 | <autotools id="gnome-network"> | ||
1551 | <branch/> | ||
1552 | <dependencies> | ||
1553 | <dep package="glib"/> | ||
1554 | </dependencies> | ||
1555 | </autotools> | ||
1556 | <tarball id="guile" version="1.6.7"> | ||
1557 | <source href="ftp://ftp.gnu.org/gnu/guile/guile-1.6.7.tar.gz" | ||
1558 | size="3039294" md5sum="c2ff2a2231f0cbb2e838dd8701a587c5"/> | ||
1559 | </tarball> | ||
1560 | <tarball id="autogen" version="5.6.5"> | ||
1561 | <source href="http://internap.dl.sourceforge.net/sourceforge/autogen/autogen-5.6.5.tar.gz" | ||
1562 | size="1144260" md5sum="54a6cb0be7e6b526af9aba4a73013885"/> | ||
1563 | <dependencies> | ||
1564 | <dep package="guile"/> | ||
1565 | </dependencies> | ||
1566 | </tarball> | ||
1567 | <autotools id="anjuta"> | ||
1568 | <branch/> | ||
1569 | <dependencies> | ||
1570 | <dep package="libbonoboui"/> | ||
1571 | <dep package="libgnomeprintui"/> | ||
1572 | <dep package="vte"/> | ||
1573 | <dep package="gnome-build"/> | ||
1574 | <dep package="autogen"/> | ||
1575 | </dependencies> | ||
1576 | </autotools> | ||
1577 | <autotools id="OpenApplet"> | ||
1578 | <branch/> | ||
1579 | <dependencies> | ||
1580 | <dep package="gnome-panel"/> | ||
1581 | </dependencies> | ||
1582 | </autotools> | ||
1583 | <autotools id="gtetrinet"> | ||
1584 | <branch/> | ||
1585 | <dependencies> | ||
1586 | <dep package="libgnomeui"/> | ||
1587 | </dependencies> | ||
1588 | </autotools> | ||
1589 | <autotools id="glom"> | ||
1590 | <branch/> | ||
1591 | <dependencies> | ||
1592 | <dep package="gnomemm/libgdamm"/> | ||
1593 | <dep package="bakery"/> | ||
1594 | <dep package="gnomemm/libgnomecanvasmm"/> | ||
1595 | <dep package="libgnome"/> | ||
1596 | <dep package="iso-codes"/> | ||
1597 | <dep package="pygtk"/> | ||
1598 | <dep package="gnome-python-extras"/> | ||
1599 | </dependencies> | ||
1600 | </autotools> | ||
1601 | <autotools id="vino"> | ||
1602 | <branch revision="gnome-2-12"/> | ||
1603 | <dependencies> | ||
1604 | <dep package="libgnomeui"/> | ||
1605 | <dep package="libglade"/> | ||
1606 | <dep package="gconf"/> | ||
1607 | <dep package="gnutls"/> | ||
1608 | </dependencies> | ||
1609 | </autotools> | ||
1610 | <autotools id="gnome-keyring-manager" autogenargs="--disable-more-warnings"> | ||
1611 | <branch revision="gnome-2-12"/> | ||
1612 | <dependencies> | ||
1613 | <dep package="libgnomeui"/> | ||
1614 | <dep package="gnome-keyring"/> | ||
1615 | <dep package="gconf"/> | ||
1616 | </dependencies> | ||
1617 | </autotools> | ||
1618 | <autotools id="gnome-volume-manager"> | ||
1619 | <branch revision="gnome-2-12"/> | ||
1620 | <dependencies> | ||
1621 | <dep package="libgnomeui"/> | ||
1622 | <dep package="libglade"/> | ||
1623 | <dep package="hal"/> | ||
1624 | </dependencies> | ||
1625 | </autotools> | ||
1626 | <metamodule id="meta-storage"> | ||
1627 | <dependencies> | ||
1628 | <dep package="storage/storage-store"/> | ||
1629 | <dep package="storage/vfs"/> | ||
1630 | <dep package="storage/applet"/> | ||
1631 | </dependencies> | ||
1632 | </metamodule> | ||
1633 | <autotools id="storage/storage-store"> | ||
1634 | <branch/> | ||
1635 | <dependencies> | ||
1636 | <dep package="dbus"/> | ||
1637 | </dependencies> | ||
1638 | </autotools> | ||
1639 | <autotools id="storage/libstorage"> | ||
1640 | <branch/> | ||
1641 | <dependencies> | ||
1642 | <dep package="gnome-vfs"/> | ||
1643 | <dep package="pygtk"/> | ||
1644 | </dependencies> | ||
1645 | </autotools> | ||
1646 | <autotools id="storage/libstorage-translators"> | ||
1647 | <branch/> | ||
1648 | <dependencies> | ||
1649 | <dep package="storage/libstorage"/> | ||
1650 | </dependencies> | ||
1651 | </autotools> | ||
1652 | <autotools id="storage/vfs"> | ||
1653 | <branch/> | ||
1654 | <dependencies> | ||
1655 | <dep package="storage/libstorage"/> | ||
1656 | <dep package="storage/libstorage-translators"/> | ||
1657 | </dependencies> | ||
1658 | </autotools> | ||
1659 | <autotools id="storage/pet"> | ||
1660 | <branch/> | ||
1661 | </autotools> | ||
1662 | <autotools id="storage/libmrs"> | ||
1663 | <branch/> | ||
1664 | <dependencies> | ||
1665 | <dep package="storage/pet"/> | ||
1666 | </dependencies> | ||
1667 | </autotools> | ||
1668 | <autotools id="storage/libmrs-converter"> | ||
1669 | <branch/> | ||
1670 | <dependencies> | ||
1671 | <dep package="storage/libmrs"/> | ||
1672 | </dependencies> | ||
1673 | </autotools> | ||
1674 | <autotools id="storage/libstorage-nl"> | ||
1675 | <branch/> | ||
1676 | <dependencies> | ||
1677 | <dep package="storage/libstorage"/> | ||
1678 | <dep package="storage/libmrs"/> | ||
1679 | <dep package="storage/libmrs-converter"/> | ||
1680 | </dependencies> | ||
1681 | </autotools> | ||
1682 | <autotools id="storage/applet"> | ||
1683 | <branch/> | ||
1684 | <dependencies> | ||
1685 | <dep package="gnome-python"/> | ||
1686 | <dep package="storage/libstorage-nl"/> | ||
1687 | </dependencies> | ||
1688 | </autotools> | ||
1689 | <autotools id="gnome-nettool"> | ||
1690 | <branch/> | ||
1691 | <dependencies> | ||
1692 | <dep package="libgnomeui"/> | ||
1693 | </dependencies> | ||
1694 | </autotools> | ||
1695 | <autotools id="monkey-bubble"> | ||
1696 | <branch/> | ||
1697 | <dependencies> | ||
1698 | <dep package="gstreamer"/> | ||
1699 | <dep package="gst-plugins"/> | ||
1700 | <dep package="libxml2"/> | ||
1701 | <dep package="gconf"/> | ||
1702 | <dep package="librsvg"/> | ||
1703 | <dep package="libgnomeui"/> | ||
1704 | </dependencies> | ||
1705 | </autotools> | ||
1706 | <autotools id="gnome-schedule"> | ||
1707 | <branch/> | ||
1708 | <dependencies> | ||
1709 | <dep package="pygtk"/> | ||
1710 | <dep package="yelp"/> | ||
1711 | </dependencies> | ||
1712 | </autotools> | ||
1713 | <autotools id="gnome-backgrounds"> | ||
1714 | <branch/> | ||
1715 | </autotools> | ||
1716 | <autotools id="evince"> | ||
1717 | <branch revision="gnome-2-12"/> | ||
1718 | <dependencies> | ||
1719 | <dep package="libgnomeui"/> | ||
1720 | <dep package="libgnomeprintui"/> | ||
1721 | <dep package="poppler-0-4"/> | ||
1722 | <dep package="gnome-doc-utils"/> | ||
1723 | </dependencies> | ||
1724 | </autotools> | ||
1725 | <autotools id="nautilus-python" supports-non-srcdir-builds="no"> | ||
1726 | <branch/> | ||
1727 | <dependencies> | ||
1728 | <dep package="nautilus"/> | ||
1729 | <dep package="pygtk"/> | ||
1730 | <dep package="gnome-python"/> | ||
1731 | </dependencies> | ||
1732 | </autotools> | ||
1733 | <autotools id="gst-python" autogenargs="--" supports-non-srcdir-builds="no"> | ||
1734 | <branch repo="gstreamer.freedesktop.org" revision="BRANCH-GSTREAMER-0_8"/> | ||
1735 | <dependencies> | ||
1736 | <dep package="gstreamer"/> | ||
1737 | <dep package="gst-plugins"/> | ||
1738 | </dependencies> | ||
1739 | </autotools> | ||
1740 | <autotools id="inkscape"> | ||
1741 | <branch repo="inkscape.sf.net"/> | ||
1742 | <dependencies> | ||
1743 | <dep package="gtkmm"/> | ||
1744 | <dep package="libxslt"/> | ||
1745 | </dependencies> | ||
1746 | </autotools> | ||
1747 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gnome-2.14.modules b/scripts/jhbuild/modulesets/gnome-2.14.modules new file mode 100644 index 0000000000..7d3b8fc9fb --- /dev/null +++ b/scripts/jhbuild/modulesets/gnome-2.14.modules | |||
@@ -0,0 +1,2013 @@ | |||
1 | <?xml version="1.0"?><!--*- mode: nxml -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | <repository type="cvs" name="gnome.org" default="yes" | ||
5 | cvsroot=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
6 | password=""/> | ||
7 | <repository type="cvs" name="cairo.freedesktop.org" | ||
8 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/cairo" | ||
9 | password=""/> | ||
10 | <repository type="cvs" name="mozilla.org" | ||
11 | cvsroot=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" | ||
12 | password="anonymous"/> | ||
13 | <repository type="cvs" name="liboil.freedesktop.org" | ||
14 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/liboil" | ||
15 | password=""/> | ||
16 | <repository type="cvs" name="gstreamer.freedesktop.org" | ||
17 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer" | ||
18 | password=""/> | ||
19 | <repository type="cvs" name="menu.freedesktop.org" | ||
20 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/menus" | ||
21 | password=""/> | ||
22 | <repository type="cvs" name="mime.freedesktop.org" | ||
23 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/mime" | ||
24 | password=""/> | ||
25 | <repository type="cvs" name="xklavier.freedesktop.org" | ||
26 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xklavier" | ||
27 | password=""/> | ||
28 | |||
29 | <repository type="cvs" name="elysium-project.sf.net" | ||
30 | cvsroot=":pserver:anonymous@elysium-project.cvs.sourceforge.net:/cvsroot/elysium-project" | ||
31 | password=""/> | ||
32 | <repository type="cvs" name="gaim.sf.net" | ||
33 | cvsroot=":pserver:anonymous@gaim.cvs.sourceforge.net:/cvsroot/gaim" | ||
34 | password=""/> | ||
35 | <repository type="cvs" name="inkscape.sf.net" | ||
36 | cvsroot=":pserver:anonymous@inkscape.cvs.sourceforge.net:/cvsroot/inkscape" | ||
37 | password=""/> | ||
38 | <repository type="svn" name="svn.galago-project.org" | ||
39 | href="http://svn.galago-project.org/"/> | ||
40 | <repository type="svn" name="osiris.chipx86.com" | ||
41 | href="http://osiris.chipx86.com/svn/osiris-misc/"/> | ||
42 | <repository type="svn" name="svn.debian.org" | ||
43 | href="svn://svn.debian.org/"/> | ||
44 | <repository type="cvs" name="openh323.sf.net" | ||
45 | cvsroot=":pserver:anonymous@openh323.cvs.sourceforge.net:/cvsroot/openh323" | ||
46 | password="" /> | ||
47 | |||
48 | <tarball id="scrollkeeper" version="0.3.14" supports-non-srcdir-builds="no"> | ||
49 | <source href="http://easynews.dl.sourceforge.net/sourceforge/scrollkeeper/scrollkeeper-0.3.14.tar.gz" | ||
50 | size="679513" md5sum="161eb3f29e30e7b24f84eb93ac696155"/> | ||
51 | <dependencies> | ||
52 | <dep package="libxml2"/> | ||
53 | <dep package="libxslt"/> | ||
54 | <dep package="intltool"/> | ||
55 | </dependencies> | ||
56 | <patches> | ||
57 | <patch file="scrollkeeper_clean_xml_validation_context.patch" strip="1"/> | ||
58 | <patch file="scrollkeeper_language_fix.patch" strip="1"/> | ||
59 | <patch file="scrollkeeper_rw_offset_fix.patch" strip="1"/> | ||
60 | </patches> | ||
61 | </tarball> | ||
62 | |||
63 | <autotools id="iso-codes"> | ||
64 | <branch repo="svn.debian.org" module="pkg-isocodes/trunk/iso-codes" checkoutdir="iso-codes"/> | ||
65 | </autotools> | ||
66 | |||
67 | <include href="freedesktop.modules"/> | ||
68 | <include href="gnutls.modules"/> | ||
69 | |||
70 | <autotools id="cairo-gtk-engine"> | ||
71 | <branch repo="cairo.freedesktop.org"/> | ||
72 | <dependencies> | ||
73 | <dep package="gtk+"/> | ||
74 | <dep package="cairo-1-0"/> | ||
75 | </dependencies> | ||
76 | </autotools> | ||
77 | |||
78 | <autotools id="shared-mime-info" supports-non-srcdir-builds="no"> | ||
79 | <branch repo="mime.freedesktop.org"/> | ||
80 | <dependencies> | ||
81 | <dep package="intltool"/> | ||
82 | <dep package="libxml2"/> | ||
83 | <dep package="glib"/> | ||
84 | </dependencies> | ||
85 | </autotools> | ||
86 | |||
87 | <autotools id="desktop-file-utils"> | ||
88 | <branch repo="menu.freedesktop.org"/> | ||
89 | <dependencies> | ||
90 | <dep package="glib"/> | ||
91 | <dep package="intltool"/> | ||
92 | </dependencies> | ||
93 | </autotools> | ||
94 | |||
95 | <autotools id="libxklavier" supports-non-srcdir-builds="no"> | ||
96 | <branch repo="xklavier.freedesktop.org" revision="v_2_x"/> | ||
97 | <dependencies> | ||
98 | <dep package="libxml2"/> | ||
99 | </dependencies> | ||
100 | </autotools> | ||
101 | <autotools id="libbtctl"> | ||
102 | <branch/> | ||
103 | <dependencies> | ||
104 | <dep package="gtk+"/> | ||
105 | <dep package="glib"/> | ||
106 | </dependencies> | ||
107 | </autotools> | ||
108 | <autotools id="gnome-bluetooth"> | ||
109 | <branch/> | ||
110 | <dependencies> | ||
111 | <dep package="gtk+"/> | ||
112 | <dep package="glib"/> | ||
113 | <dep package="libbtctl"/> | ||
114 | <dep package="libglade"/> | ||
115 | <dep package="libgnomeui"/> | ||
116 | <dep package="gconf"/> | ||
117 | </dependencies> | ||
118 | </autotools> | ||
119 | <autotools id="phonemgr"> | ||
120 | <branch/> | ||
121 | <dependencies> | ||
122 | <dep package="gtk+"/> | ||
123 | <dep package="glib"/> | ||
124 | <dep package="libbtctl"/> | ||
125 | <dep package="gnome-bluetooth"/> | ||
126 | <dep package="libglade"/> | ||
127 | <dep package="libgnomeui"/> | ||
128 | <dep package="libgnome"/> | ||
129 | <dep package="gconf"/> | ||
130 | </dependencies> | ||
131 | </autotools> | ||
132 | |||
133 | <autotools id="intltool"> | ||
134 | <branch/> | ||
135 | <dependencies> | ||
136 | <dep package="gnome-common"/> | ||
137 | </dependencies> | ||
138 | </autotools> | ||
139 | <autotools id="gnome-common"> | ||
140 | <branch/> | ||
141 | </autotools> | ||
142 | <autotools id="libxml2"> | ||
143 | <branch module="gnome-xml" checkoutdir="libxml2"/> | ||
144 | </autotools> | ||
145 | <autotools id="libxslt"> | ||
146 | <branch/> | ||
147 | <dependencies> | ||
148 | <dep package="libxml2"/> | ||
149 | </dependencies> | ||
150 | </autotools> | ||
151 | <autotools id="gtk-doc"> | ||
152 | <branch/> | ||
153 | <dependencies> | ||
154 | <dep package="libxslt"/> | ||
155 | <dep package="scrollkeeper"/> | ||
156 | </dependencies> | ||
157 | </autotools> | ||
158 | <autotools id="gamin"> | ||
159 | <branch/> | ||
160 | <dependencies> | ||
161 | <dep package="glib"/> | ||
162 | </dependencies> | ||
163 | </autotools> | ||
164 | <autotools id="glib"> | ||
165 | <branch revision="glib-2-10"/> | ||
166 | <dependencies> | ||
167 | <dep package="gtk-doc"/> | ||
168 | </dependencies> | ||
169 | </autotools> | ||
170 | <autotools id="pango"> | ||
171 | <branch revision="pango-1-12"/> | ||
172 | <dependencies> | ||
173 | <dep package="glib"/> | ||
174 | <dep package="cairo-1-0"/> | ||
175 | <dep package="libXft"/> | ||
176 | </dependencies> | ||
177 | </autotools> | ||
178 | <autotools id="atk"> | ||
179 | <branch revision="gnome-2-14"/> | ||
180 | <dependencies> | ||
181 | <dep package="glib"/> | ||
182 | </dependencies> | ||
183 | </autotools> | ||
184 | <autotools id="gtk+"> | ||
185 | <branch revision="gtk-2-8"/> | ||
186 | <dependencies> | ||
187 | <dep package="cairo-1-0"/> | ||
188 | <dep package="pango"/> | ||
189 | <dep package="atk"/> | ||
190 | <dep package="shared-mime-info"/> | ||
191 | </dependencies> | ||
192 | </autotools> | ||
193 | <autotools id="gail"> | ||
194 | <branch/> | ||
195 | <dependencies> | ||
196 | <dep package="gtk+"/> | ||
197 | <dep package="atk"/> | ||
198 | <dep package="libgnomecanvas"/> | ||
199 | </dependencies> | ||
200 | </autotools> | ||
201 | <autotools id="gtkhtml2"> | ||
202 | <branch/> | ||
203 | <dependencies> | ||
204 | <dep package="gtk+"/> | ||
205 | <dep package="libxml2"/> | ||
206 | <dep package="gail"/> | ||
207 | </dependencies> | ||
208 | </autotools> | ||
209 | <autotools id="libIDL"> | ||
210 | <branch/> | ||
211 | <dependencies> | ||
212 | <dep package="glib"/> | ||
213 | </dependencies> | ||
214 | </autotools> | ||
215 | <autotools id="ORBit2"> | ||
216 | <branch/> | ||
217 | <dependencies> | ||
218 | <dep package="libIDL"/> | ||
219 | <dep package="gnome-common"/> | ||
220 | </dependencies> | ||
221 | </autotools> | ||
222 | <autotools id="gconf"> | ||
223 | <branch/> | ||
224 | <dependencies> | ||
225 | <dep package="ORBit2"/> | ||
226 | <dep package="libxml2"/> | ||
227 | <dep package="gtk+"/> | ||
228 | </dependencies> | ||
229 | </autotools> | ||
230 | <autotools id="libbonobo"> | ||
231 | <branch revision="gnome-2-14"/> | ||
232 | <dependencies> | ||
233 | <dep package="ORBit2"/> | ||
234 | <dep package="intltool"/> | ||
235 | <dep package="gnome-common"/> | ||
236 | <dep package="libxml2"/> | ||
237 | </dependencies> | ||
238 | </autotools> | ||
239 | <autotools id="gnome-mime-data"> | ||
240 | <branch/> | ||
241 | <dependencies> | ||
242 | <dep package="gnome-common"/> | ||
243 | <dep package="glib"/> | ||
244 | </dependencies> | ||
245 | </autotools> | ||
246 | <autotools id="gnome-icon-theme"> | ||
247 | <branch revision="gnome-2-14"/> | ||
248 | <dependencies> | ||
249 | <dep package="hicolor-icon-theme"/> | ||
250 | </dependencies> | ||
251 | </autotools> | ||
252 | <tarball id="howl" version="1.0.0"> | ||
253 | <source href="http://www.porchdogsoft.com/download/howl-1.0.0.tar.gz" | ||
254 | size="542782" md5sum="c389d3ffba0e69a179de2ec650f1fdcc"/> | ||
255 | <patches> | ||
256 | <patch file="howl-1.0.0-buildfix.patch" strip="1"/> | ||
257 | </patches> | ||
258 | </tarball> | ||
259 | <autotools id="gnome-vfs"> | ||
260 | <branch revision="gnome-2-14"/> | ||
261 | <dependencies> | ||
262 | <dep package="libbonobo"/> | ||
263 | <dep package="gconf"/> | ||
264 | <dep package="desktop-file-utils"/> | ||
265 | <dep package="shared-mime-info"/> | ||
266 | <dep package="gnome-mime-data"/> | ||
267 | <dep package="howl"/> | ||
268 | <dep package="hal"/> | ||
269 | <dep package="gamin"/> | ||
270 | </dependencies> | ||
271 | </autotools> | ||
272 | <autotools id="gnome-keyring"> | ||
273 | <branch revision="gnome-2-14"/> | ||
274 | <dependencies> | ||
275 | <dep package="gtk+"/> | ||
276 | </dependencies> | ||
277 | </autotools> | ||
278 | <autotools id="libart_lgpl"> | ||
279 | <branch/> | ||
280 | </autotools> | ||
281 | <autotools id="libgnome"> | ||
282 | <branch revision="gnome-2-14"/> | ||
283 | <dependencies> | ||
284 | <dep package="libxml2"/> | ||
285 | <dep package="libxslt"/> | ||
286 | <dep package="libbonobo"/> | ||
287 | <dep package="gnome-vfs"/> | ||
288 | <dep package="gconf"/> | ||
289 | <dep package="esound"/> | ||
290 | </dependencies> | ||
291 | </autotools> | ||
292 | <autotools id="libgnomecanvas"> | ||
293 | <branch/> | ||
294 | <dependencies> | ||
295 | <dep package="gtk+"/> | ||
296 | <dep package="libart_lgpl"/> | ||
297 | <dep package="libglade"/> | ||
298 | <dep package="gnome-common"/> | ||
299 | </dependencies> | ||
300 | </autotools> | ||
301 | <autotools id="libbonoboui"> | ||
302 | <branch/> | ||
303 | <dependencies> | ||
304 | <dep package="libgnome"/> | ||
305 | <dep package="libbonobo"/> | ||
306 | <dep package="libgnomecanvas"/> | ||
307 | <dep package="libglade"/> | ||
308 | </dependencies> | ||
309 | </autotools> | ||
310 | <autotools id="libgnomeui"> | ||
311 | <branch revision="libgnomeui-2-14"/> | ||
312 | <dependencies> | ||
313 | <dep package="libbonoboui"/> | ||
314 | <dep package="libglade"/> | ||
315 | <dep package="gnome-icon-theme"/> | ||
316 | <dep package="gnome-keyring"/> | ||
317 | </dependencies> | ||
318 | </autotools> | ||
319 | <autotools id="libglade"> | ||
320 | <branch/> | ||
321 | <dependencies> | ||
322 | <dep package="gtk+"/> | ||
323 | <dep package="libxml2"/> | ||
324 | </dependencies> | ||
325 | </autotools> | ||
326 | <autotools id="pygobject"> | ||
327 | <branch revision="pygobject-2-10"/> | ||
328 | <dependencies> | ||
329 | <dep package="glib"/> | ||
330 | </dependencies> | ||
331 | </autotools> | ||
332 | <autotools id="pygtk"> | ||
333 | <branch revision="pygtk-2-8"/> | ||
334 | <dependencies> | ||
335 | <dep package="pygobject"/> | ||
336 | <dep package="gtk+"/> | ||
337 | <dep package="pycairo-1-0"/> | ||
338 | <dep package="libglade"/> | ||
339 | </dependencies> | ||
340 | </autotools> | ||
341 | <autotools id="pyorbit"> | ||
342 | <branch/> | ||
343 | <dependencies> | ||
344 | <dep package="ORBit2"/> | ||
345 | </dependencies> | ||
346 | </autotools> | ||
347 | <autotools id="gnome-python"> | ||
348 | <branch revision="gnome-python-2-12"/> | ||
349 | <dependencies> | ||
350 | <dep package="pygtk"/> | ||
351 | <dep package="pyorbit"/> | ||
352 | <dep package="libgnomecanvas"/> | ||
353 | <dep package="libgnomeui"/> | ||
354 | </dependencies> | ||
355 | </autotools> | ||
356 | <autotools id="gnome-python-desktop"> | ||
357 | <branch revision="gnome-2-14"/> | ||
358 | <dependencies> | ||
359 | <dep package="gnome-python"/> | ||
360 | <dep package="gnome-panel"/> | ||
361 | <dep package="libgnomeprint"/> | ||
362 | <dep package="libgnomeprintui"/> | ||
363 | <dep package="gtksourceview"/> | ||
364 | <dep package="libwnck"/> | ||
365 | <dep package="totem"/> | ||
366 | <dep package="libgtop"/> | ||
367 | <dep package="nautilus-cd-burner"/> | ||
368 | <dep package="gnome-media"/> | ||
369 | <dep package="metacity"/> | ||
370 | </dependencies> | ||
371 | </autotools> | ||
372 | <autotools id="gnome-python-extras"> | ||
373 | <branch/> | ||
374 | <dependencies> | ||
375 | <dep package="pygtk"/> | ||
376 | <dep package="gnome-python"/> | ||
377 | <dep package="gtkhtml2"/> | ||
378 | <dep package="gdl"/> | ||
379 | </dependencies> | ||
380 | </autotools> | ||
381 | <autotools id="bug-buddy"> | ||
382 | <branch/> | ||
383 | <dependencies> | ||
384 | <dep package="libgnomeui"/> | ||
385 | <dep package="gnome-menus"/> | ||
386 | <dep package="gnome-doc-utils"/> | ||
387 | </dependencies> | ||
388 | </autotools> | ||
389 | <autotools id="libwnck"> | ||
390 | <branch/> | ||
391 | <dependencies> | ||
392 | <dep package="gtk+"/> | ||
393 | <dep package="startup-notification"/> | ||
394 | </dependencies> | ||
395 | </autotools> | ||
396 | <autotools id="gnome-desktop" autogenargs="--with-gnome-distributor=JHBuild"> | ||
397 | <branch revision="gnome-2-14"/> | ||
398 | <dependencies> | ||
399 | <dep package="libgnomeui"/> | ||
400 | <dep package="startup-notification"/> | ||
401 | <dep package="gnome-themes"/> | ||
402 | <dep package="scrollkeeper"/> | ||
403 | <dep package="gnome-doc-utils"/> | ||
404 | </dependencies> | ||
405 | </autotools> | ||
406 | <autotools id="gnome-menus"> | ||
407 | <branch revision="gnome-2-14"/> | ||
408 | <dependencies> | ||
409 | <dep package="intltool"/> | ||
410 | <dep package="gnome-common"/> | ||
411 | <dep package="glib"/> | ||
412 | <dep package="pygtk"/> | ||
413 | </dependencies> | ||
414 | </autotools> | ||
415 | <autotools id="gnome-panel"> | ||
416 | <branch revision="gnome-2-14"/> | ||
417 | <dependencies> | ||
418 | <dep package="scrollkeeper"/> | ||
419 | <dep package="libgnomeui"/> | ||
420 | <dep package="gnome-desktop"/> | ||
421 | <dep package="libwnck"/> | ||
422 | <dep package="evolution-data-server"/> | ||
423 | <dep package="gnome-menus"/> | ||
424 | <dep package="gnome-vfs"/> | ||
425 | <dep package="libglade"/> | ||
426 | <dep package="gnome-doc-utils"/> | ||
427 | </dependencies> | ||
428 | </autotools> | ||
429 | <autotools id="gnome-session"> | ||
430 | <branch revision="gnome-2-14"/> | ||
431 | <dependencies> | ||
432 | <dep package="libgnomeui"/> | ||
433 | <dep package="libwnck"/> | ||
434 | <dep package="esound"/> | ||
435 | </dependencies> | ||
436 | </autotools> | ||
437 | <autotools id="gnome-applets" autogenargs="--enable-gstreamer=0.10"> | ||
438 | <branch revision="gnome-2-14"/> | ||
439 | <dependencies> | ||
440 | <dep package="gnome-panel"/> | ||
441 | <dep package="libgtop"/> | ||
442 | <dep package="gail"/> | ||
443 | <dep package="libxklavier"/> | ||
444 | <dep package="gstreamer"/> | ||
445 | <dep package="gst-plugins-base"/> | ||
446 | <dep package="gucharmap"/> | ||
447 | <dep package="system-tools-backends-1.4"/> | ||
448 | </dependencies> | ||
449 | </autotools> | ||
450 | <autotools id="gnome-games"> | ||
451 | <branch revision="gnome-2-14"/> | ||
452 | <dependencies> | ||
453 | <dep package="librsvg"/> | ||
454 | <dep package="scrollkeeper"/> | ||
455 | <dep package="libgnomeui"/> | ||
456 | <dep package="gob"/> | ||
457 | </dependencies> | ||
458 | </autotools> | ||
459 | <autotools id="libcroco" supports-non-srcdir-builds="no"> | ||
460 | <branch/> | ||
461 | <dependencies> | ||
462 | <dep package="libxml2"/> | ||
463 | <dep package="pango"/> | ||
464 | </dependencies> | ||
465 | </autotools> | ||
466 | <autotools id="librsvg" supports-non-srcdir-builds="no"> | ||
467 | <branch revision="gnome-2-14"/> | ||
468 | <dependencies> | ||
469 | <dep package="libxml2"/> | ||
470 | <dep package="gtk+"/> | ||
471 | <dep package="libart_lgpl"/> | ||
472 | <dep package="gnome-common"/> | ||
473 | <dep package="libgsf"/> | ||
474 | <dep package="libcroco"/> | ||
475 | <dep package="libgnomeprintui"/> | ||
476 | </dependencies> | ||
477 | </autotools> | ||
478 | <autotools id="eel"> | ||
479 | <branch revision="gnome-2-14"/> | ||
480 | <dependencies> | ||
481 | <dep package="librsvg"/> | ||
482 | <dep package="libgnomeui"/> | ||
483 | <dep package="gail"/> | ||
484 | <dep package="gnome-desktop"/> | ||
485 | <dep package="gnome-menus"/> | ||
486 | </dependencies> | ||
487 | </autotools> | ||
488 | <autotools id="nautilus"> | ||
489 | <branch revision="gnome-2-14"/> | ||
490 | <dependencies> | ||
491 | <dep package="scrollkeeper"/> | ||
492 | <dep package="esound"/> | ||
493 | <dep package="eel"/> | ||
494 | <dep package="librsvg"/> | ||
495 | <dep package="libgnomeui"/> | ||
496 | <dep package="gnome-desktop"/> | ||
497 | </dependencies> | ||
498 | </autotools> | ||
499 | <autotools id="nautilus-actions"> | ||
500 | <branch/> | ||
501 | <dependencies> | ||
502 | <dep package="nautilus"/> | ||
503 | </dependencies> | ||
504 | </autotools> | ||
505 | <autotools id="nautilus-cd-burner"> | ||
506 | <branch revision="gnome-2-14"/> | ||
507 | <dependencies> | ||
508 | <dep package="nautilus"/> | ||
509 | </dependencies> | ||
510 | </autotools> | ||
511 | <autotools id="nautilus-open-terminal"> | ||
512 | <branch/> | ||
513 | <dependencies> | ||
514 | <dep package="nautilus"/> | ||
515 | </dependencies> | ||
516 | </autotools> | ||
517 | <autotools id="nautilus-media" supports-non-srcdir-builds="no"> | ||
518 | <branch/> | ||
519 | <dependencies> | ||
520 | <dep package="nautilus"/> | ||
521 | <dep package="gstreamer-0-8"/> | ||
522 | <dep package="gst-plugins-0-8"/> | ||
523 | </dependencies> | ||
524 | </autotools> | ||
525 | <autotools id="nautilus-vcs"> | ||
526 | <branch/> | ||
527 | <dependencies> | ||
528 | <dep package="nautilus"/> | ||
529 | </dependencies> | ||
530 | </autotools> | ||
531 | <autotools id="metacity"> | ||
532 | <branch revision="gnome-2-14"/> | ||
533 | <dependencies> | ||
534 | <dep package="gtk+"/> | ||
535 | <dep package="gconf"/> | ||
536 | <dep package="intltool"/> | ||
537 | <dep package="libglade"/> | ||
538 | </dependencies> | ||
539 | </autotools> | ||
540 | <autotools id="libgtop"> | ||
541 | <branch/> | ||
542 | <dependencies> | ||
543 | <dep package="glib"/> | ||
544 | </dependencies> | ||
545 | </autotools> | ||
546 | <autotools id="gnome-system-monitor"> | ||
547 | <branch revision="gnome-2-14"/> | ||
548 | <dependencies> | ||
549 | <dep package="libgnomeui"/> | ||
550 | <dep package="libwnck"/> | ||
551 | <dep package="libgtop"/> | ||
552 | </dependencies> | ||
553 | </autotools> | ||
554 | <autotools id="gnome-control-center" autogenargs="--enable-gstreamer=0.10" | ||
555 | supports-non-srcdir-builds="no"> | ||
556 | <branch revision="gnome-2-14"/> | ||
557 | <dependencies> | ||
558 | <dep package="libgnomeui"/> | ||
559 | <dep package="esound"/> | ||
560 | <dep package="gnome-desktop"/> | ||
561 | <dep package="metacity"/> | ||
562 | <dep package="nautilus"/> | ||
563 | <dep package="libxklavier"/> | ||
564 | <dep package="gnome-menus"/> | ||
565 | <dep package="gnome-doc-utils"/> | ||
566 | <dep package="gstreamer"/> | ||
567 | </dependencies> | ||
568 | </autotools> | ||
569 | <autotools id="yelp"> | ||
570 | <branch revision="gnome-2-14"/> | ||
571 | <dependencies> | ||
572 | <dep package="scrollkeeper"/> | ||
573 | <dep package="libgnomeui"/> | ||
574 | <dep package="gnome-vfs"/> | ||
575 | <dep package="gnome-doc-utils"/> | ||
576 | <dep package="startup-notification"/> | ||
577 | <dep package="libgnomeprintui"/> | ||
578 | <dep package="mozilla"/> | ||
579 | </dependencies> | ||
580 | </autotools> | ||
581 | <autotools id="devhelp"> | ||
582 | <branch/> | ||
583 | <dependencies> | ||
584 | <dep package="libgnomeui"/> | ||
585 | <dep package="gnome-vfs"/> | ||
586 | <dep package="mozilla"/> | ||
587 | </dependencies> | ||
588 | </autotools> | ||
589 | <autotools id="gnome-utils"> | ||
590 | <branch revision="gnome-2-14"/> | ||
591 | <dependencies> | ||
592 | <dep package="libgnomeui"/> | ||
593 | <dep package="gnome-panel"/> | ||
594 | <dep package="gnome-doc-utils"/> | ||
595 | </dependencies> | ||
596 | </autotools> | ||
597 | <autotools id="gconf-editor" supports-non-srcdir-builds="no"> | ||
598 | <branch revision="gnome-2-14" /> | ||
599 | <dependencies> | ||
600 | <dep package="libgnomeui"/> | ||
601 | <dep package="gconf"/> | ||
602 | </dependencies> | ||
603 | </autotools> | ||
604 | <tarball id="audiofile" version="0.2.6" supports-non-srcdir-builds="no"> | ||
605 | <source href="http://www.68k.org/~michael/audiofile/audiofile-0.2.6.tar.gz" | ||
606 | size="374688" md5sum="9c1049876cd51c0f1b12c2886cce4d42"/> | ||
607 | </tarball> | ||
608 | <autotools id="esound"> | ||
609 | <branch/> | ||
610 | <dependencies> | ||
611 | <dep package="audiofile"/> | ||
612 | </dependencies> | ||
613 | </autotools> | ||
614 | <autotools id="gnome-media"> | ||
615 | <branch/> | ||
616 | <dependencies> | ||
617 | <dep package="scrollkeeper"/> | ||
618 | <dep package="libgnomeui"/> | ||
619 | <dep package="esound"/> | ||
620 | <dep package="gail"/> | ||
621 | <dep package="gstreamer"/> | ||
622 | <dep package="gst-plugins-base"/> | ||
623 | <dep package="gst-plugins-good"/> | ||
624 | <dep package="nautilus-cd-burner"/> | ||
625 | </dependencies> | ||
626 | </autotools> | ||
627 | <autotools id="gdm2"> | ||
628 | <branch revision="gnome-2-14"/> | ||
629 | <dependencies> | ||
630 | <dep package="librsvg"/> | ||
631 | <dep package="gnome-doc-utils"/> | ||
632 | </dependencies> | ||
633 | </autotools> | ||
634 | <autotools id="vte"> | ||
635 | <branch revision="vte-0-12"/> | ||
636 | <dependencies> | ||
637 | <dep package="gtk+"/> | ||
638 | </dependencies> | ||
639 | </autotools> | ||
640 | <autotools id="gnome-terminal"> | ||
641 | <branch revision="gnome-2-14"/> | ||
642 | <dependencies> | ||
643 | <dep package="libglade"/> | ||
644 | <dep package="libgnomeui"/> | ||
645 | <dep package="vte"/> | ||
646 | <dep package="startup-notification"/> | ||
647 | </dependencies> | ||
648 | </autotools> | ||
649 | <autotools id="gtk-engines"> | ||
650 | <branch revision="gtk-engines-2-6"/> | ||
651 | <dependencies> | ||
652 | <dep package="gtk+"/> | ||
653 | </dependencies> | ||
654 | </autotools> | ||
655 | <autotools id="libgnomeprint"> | ||
656 | <branch/> | ||
657 | <dependencies> | ||
658 | <dep package="intltool"/> | ||
659 | <dep package="libart_lgpl"/> | ||
660 | <dep package="glib"/> | ||
661 | <dep package="gnome-common"/> | ||
662 | <dep package="pango"/> | ||
663 | <dep package="libgnomecups"/> | ||
664 | </dependencies> | ||
665 | </autotools> | ||
666 | <autotools id="libgnomeprintui"> | ||
667 | <branch/> | ||
668 | <dependencies> | ||
669 | <dep package="libgnomeprint"/> | ||
670 | <dep package="gtk+"/> | ||
671 | <dep package="libgnomecanvas"/> | ||
672 | <dep package="gnome-icon-theme"/> | ||
673 | </dependencies> | ||
674 | </autotools> | ||
675 | <autotools id="gedit"> | ||
676 | <branch revision="gnome-2-14"/> | ||
677 | <dependencies> | ||
678 | <dep package="scrollkeeper"/> | ||
679 | <dep package="libgnomeui"/> | ||
680 | <dep package="gnome-doc-utils"/> | ||
681 | <dep package="libgnomeprintui"/> | ||
682 | <dep package="gtksourceview"/> | ||
683 | <dep package="gnome-python-desktop"/> | ||
684 | </dependencies> | ||
685 | </autotools> | ||
686 | <autotools id="memprof"> | ||
687 | <branch/> | ||
688 | <dependencies> | ||
689 | <dep package="libgnomeui"/> | ||
690 | </dependencies> | ||
691 | </autotools> | ||
692 | <autotools id="eog"> | ||
693 | <branch revision="gnome-2-14"/> | ||
694 | <dependencies> | ||
695 | <dep package="libgnomeui"/> | ||
696 | <dep package="libgnomeprint"/> | ||
697 | </dependencies> | ||
698 | </autotools> | ||
699 | <autotools id="libgsf"> | ||
700 | <branch/> | ||
701 | <dependencies> | ||
702 | <dep package="glib"/> | ||
703 | <dep package="gnome-vfs"/> | ||
704 | <dep package="libbonobo"/> | ||
705 | </dependencies> | ||
706 | </autotools> | ||
707 | <autotools id="goffice"> | ||
708 | <branch/> | ||
709 | <dependencies> | ||
710 | <dep package="glib"/> | ||
711 | <dep package="libgsf"/> | ||
712 | <dep package="libxml2"/> | ||
713 | <dep package="pango"/> | ||
714 | <dep package="libglade"/> | ||
715 | <dep package="libgnomeprint"/> | ||
716 | <dep package="libgnomeprintui"/> | ||
717 | <dep package="libart_lgpl"/> | ||
718 | </dependencies> | ||
719 | </autotools> | ||
720 | <autotools id="gnumeric"> | ||
721 | <branch/> | ||
722 | <dependencies> | ||
723 | <dep package="goffice"/> | ||
724 | <dep package="libgsf"/> | ||
725 | <dep package="pygtk"/> | ||
726 | <dep package="libgnomeprintui"/> | ||
727 | </dependencies> | ||
728 | </autotools> | ||
729 | <autotools id="gimp" autogenargs="--disable-print"> | ||
730 | <branch/> | ||
731 | <dependencies> | ||
732 | <dep package="gtk+"/> | ||
733 | <dep package="libart_lgpl"/> | ||
734 | </dependencies> | ||
735 | </autotools> | ||
736 | <autotools id="glade"> | ||
737 | <branch/> | ||
738 | <dependencies> | ||
739 | <dep package="gtk+"/> | ||
740 | <dep package="libxml2"/> | ||
741 | <dep package="libgnomeui"/> | ||
742 | <dep package="libgnomeprintui"/> | ||
743 | </dependencies> | ||
744 | </autotools> | ||
745 | <autotools id="glade2c"> | ||
746 | <branch/> | ||
747 | <dependencies> | ||
748 | <dep package="gtk+"/> | ||
749 | <dep package="libxml2"/> | ||
750 | <dep package="libgnomeui"/> | ||
751 | </dependencies> | ||
752 | </autotools> | ||
753 | <autotools id="sawfish"> | ||
754 | <branch revision="gnome-2"/> | ||
755 | <dependencies> | ||
756 | <dep package="rep-gtk"/> | ||
757 | </dependencies> | ||
758 | </autotools> | ||
759 | <autotools id="rep-gtk"> | ||
760 | <branch/> | ||
761 | <dependencies> | ||
762 | <dep package="librep"/> | ||
763 | <dep package="gtk+"/> | ||
764 | </dependencies> | ||
765 | </autotools> | ||
766 | <autotools id="librep"> | ||
767 | <branch/> | ||
768 | </autotools> | ||
769 | <autotools id="rhythmbox"> | ||
770 | <branch/> | ||
771 | <dependencies> | ||
772 | <dep package="libgnomeui"/> | ||
773 | <dep package="gst-plugins-base"/> | ||
774 | <dep package="nautilus-cd-burner"/> | ||
775 | <dep package="totem"/> | ||
776 | <dep package="gnome-doc-utils"/> | ||
777 | </dependencies> | ||
778 | </autotools> | ||
779 | <autotools id="gstreamer-0-8" autogenargs="-- --disable-plugin-builddir --disable-tests" supports-non-srcdir-builds="no"> | ||
780 | <branch repo="gstreamer.freedesktop.org" module="gstreamer" | ||
781 | revision="BRANCH-GSTREAMER-0_8" checkoutdir="gstreamer-0-8"/> | ||
782 | <dependencies> | ||
783 | <dep package="glib"/> | ||
784 | <dep package="libxml2"/> | ||
785 | </dependencies> | ||
786 | </autotools> | ||
787 | |||
788 | <autotools id="gst-plugins-0-8" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
789 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins" | ||
790 | revision="BRANCH-GSTREAMER-0_8" checkoutdir="gst-plugins-0-8"/> | ||
791 | <dependencies> | ||
792 | <dep package="gstreamer-0-8"/> | ||
793 | <dep package="gnome-vfs"/> | ||
794 | <dep package="gtk+"/> | ||
795 | </dependencies> | ||
796 | </autotools> | ||
797 | |||
798 | <autotools id="gst-python-0-8" autogenargs="--" supports-non-srcdir-builds="no"> | ||
799 | <branch repo="gstreamer.freedesktop.org" module="gst-python" | ||
800 | revision="BRANCH-GSTREAMER-0_8" checkoutdir="gst-python-0-8"/> | ||
801 | <dependencies> | ||
802 | <dep package="gstreamer-0-8"/> | ||
803 | <dep package="gst-plugins-0-8"/> | ||
804 | </dependencies> | ||
805 | </autotools> | ||
806 | |||
807 | <autotools id="gstreamer" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
808 | <branch repo="gstreamer.freedesktop.org" module="gstreamer"/> | ||
809 | <dependencies> | ||
810 | <dep package="glib"/> | ||
811 | <dep package="libxml2"/> | ||
812 | </dependencies> | ||
813 | </autotools> | ||
814 | |||
815 | <autotools id="liboil"> | ||
816 | <branch repo="liboil.freedesktop.org" revision="liboil_0_3_6"/> | ||
817 | </autotools> | ||
818 | |||
819 | <autotools id="gst-plugins-base" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
820 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-base"/> | ||
821 | <dependencies> | ||
822 | <dep package="gstreamer"/> | ||
823 | <dep package="gnome-vfs"/> | ||
824 | <dep package="gtk+"/> | ||
825 | <dep package="liboil"/> | ||
826 | </dependencies> | ||
827 | </autotools> | ||
828 | |||
829 | <autotools id="gst-plugins-good" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
830 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-good"/> | ||
831 | <dependencies> | ||
832 | <dep package="gstreamer"/> | ||
833 | <dep package="gst-plugins-base"/> | ||
834 | </dependencies> | ||
835 | </autotools> | ||
836 | |||
837 | <autotools id="gst-plugins-ugly" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
838 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-ugly"/> | ||
839 | <dependencies> | ||
840 | <dep package="gstreamer"/> | ||
841 | <dep package="gst-plugins-base"/> | ||
842 | </dependencies> | ||
843 | </autotools> | ||
844 | |||
845 | <autotools id="gst-plugins-bad" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
846 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-bad"/> | ||
847 | <dependencies> | ||
848 | <dep package="gstreamer"/> | ||
849 | <dep package="gst-plugins-base"/> | ||
850 | </dependencies> | ||
851 | </autotools> | ||
852 | |||
853 | <autotools id="gst-ffmpeg" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
854 | <branch repo="gstreamer.freedesktop.org" module="gst-ffmpeg"/> | ||
855 | <dependencies> | ||
856 | <dep package="gstreamer"/> | ||
857 | <dep package="gst-plugins-base"/> | ||
858 | </dependencies> | ||
859 | </autotools> | ||
860 | |||
861 | <autotools id="gst-python" autogenargs="--" supports-non-srcdir-builds="no"> | ||
862 | <branch repo="gstreamer.freedesktop.org" module="gst-python"/> | ||
863 | <dependencies> | ||
864 | <dep package="gstreamer"/> | ||
865 | <dep package="gst-plugins-base"/> | ||
866 | </dependencies> | ||
867 | </autotools> | ||
868 | |||
869 | <autotools id="planner"> | ||
870 | <branch/> | ||
871 | <dependencies> | ||
872 | <dep package="glib"/> | ||
873 | <dep package="libxml2"/> | ||
874 | <dep package="libgnomeui"/> | ||
875 | <dep package="libgnomeprintui"/> | ||
876 | <dep package="libgsf"/> | ||
877 | </dependencies> | ||
878 | </autotools> | ||
879 | <autotools id="file-roller"> | ||
880 | <branch revision="gnome-2-14" /> | ||
881 | <dependencies> | ||
882 | <dep package="scrollkeeper"/> | ||
883 | <dep package="gnome-doc-utils"/> | ||
884 | <dep package="nautilus"/> | ||
885 | </dependencies> | ||
886 | </autotools> | ||
887 | <autotools id="balsa"> | ||
888 | <branch revision="BALSA_2"/> | ||
889 | <dependencies> | ||
890 | <dep package="libgnomeui"/> | ||
891 | </dependencies> | ||
892 | </autotools> | ||
893 | <autotools id="pan"> | ||
894 | <branch/> | ||
895 | <dependencies> | ||
896 | <dep package="libgnomeui"/> | ||
897 | <dep package="gnet"/> | ||
898 | </dependencies> | ||
899 | </autotools> | ||
900 | <autotools id="pyspi"> | ||
901 | <branch/> | ||
902 | <dependencies> | ||
903 | <dep package="at-spi"/> | ||
904 | </dependencies> | ||
905 | </autotools> | ||
906 | <autotools id="dogtail"> | ||
907 | <branch/> | ||
908 | <dependencies> | ||
909 | <dep package="pyspi"/> | ||
910 | </dependencies> | ||
911 | <after> | ||
912 | <dep package="gnome-python-desktop"/> | ||
913 | </after> | ||
914 | </autotools> | ||
915 | <autotools id="gcalctool" supports-non-srcdir-builds="no"> | ||
916 | <branch revision="gnome-2-14"/> | ||
917 | <dependencies> | ||
918 | <dep package="scrollkeeper"/> | ||
919 | <dep package="libgnomeui"/> | ||
920 | </dependencies> | ||
921 | </autotools> | ||
922 | <autotools id="ggv" supports-non-srcdir-builds="no"> | ||
923 | <branch/> | ||
924 | <dependencies> | ||
925 | <dep package="scrollkeeper"/> | ||
926 | <dep package="libgnomeui"/> | ||
927 | </dependencies> | ||
928 | </autotools> | ||
929 | <autotools id="ekiga" autogenargs="--with-pwlib-dir=`ptlib-config --prefix` --with-opal-dir=`ptlib-config --prefix`"> | ||
930 | <branch revision="gnome-2-14"/> | ||
931 | <dependencies> | ||
932 | <dep package="libgnomeui"/> | ||
933 | <dep package="evolution-data-server"/> | ||
934 | <dep package="opal" /> | ||
935 | <dep package="avahi" /> | ||
936 | </dependencies> | ||
937 | </autotools> | ||
938 | <autotools id="pwlib" autogen-sh="configure"> | ||
939 | <branch repo="openh323.sf.net" module="ptlib_unix" checkoutdir="pwlib" | ||
940 | override-checkoutdir="no" update-new-dirs="no" /> | ||
941 | </autotools> | ||
942 | <autotools id="opal" autogen-sh="configure"> | ||
943 | <branch repo="openh323.sf.net"/> | ||
944 | <dependencies> | ||
945 | <dep package="pwlib"/> | ||
946 | </dependencies> | ||
947 | </autotools> | ||
948 | <autotools id="gucharmap" supports-non-srcdir-builds="no"> | ||
949 | <branch revision="gnome-2-14"/> | ||
950 | <dependencies> | ||
951 | <dep package="libgnomeui"/> | ||
952 | <dep package="gnome-doc-utils"/> | ||
953 | </dependencies> | ||
954 | </autotools> | ||
955 | <autotools id="gtksourceview" autogenargs="--enable-compile-warnings=maximum"> | ||
956 | <branch/> | ||
957 | <dependencies> | ||
958 | <dep package="gtk+"/> | ||
959 | <dep package="libxml2"/> | ||
960 | <dep package="libgnomeprint"/> | ||
961 | <dep package="gnome-vfs"/> | ||
962 | </dependencies> | ||
963 | </autotools> | ||
964 | <autotools id="glimmer"> | ||
965 | <branch/> | ||
966 | <dependencies> | ||
967 | <dep package="gtksourceview"/> | ||
968 | <dep package="libgnomeprint"/> | ||
969 | </dependencies> | ||
970 | </autotools> | ||
971 | <autotools id="gdl"> | ||
972 | <branch/> | ||
973 | <dependencies> | ||
974 | <dep package="libgnomeui"/> | ||
975 | <dep package="librsvg"/> | ||
976 | </dependencies> | ||
977 | </autotools> | ||
978 | <autotools id="gnome-build"> | ||
979 | <branch/> | ||
980 | <dependencies> | ||
981 | <dep package="gdl"/> | ||
982 | <dep package="gnome-vfs"/> | ||
983 | <dep package="gtkhtml2"/> | ||
984 | </dependencies> | ||
985 | </autotools> | ||
986 | <autotools id="scaffold"> | ||
987 | <branch/> | ||
988 | <dependencies> | ||
989 | <dep package="libgnomeui"/> | ||
990 | <dep package="vte"/> | ||
991 | <dep package="gdl"/> | ||
992 | </dependencies> | ||
993 | </autotools> | ||
994 | <autotools id="libsigc++2"> | ||
995 | <branch revision="libsigc-2-0"/> | ||
996 | </autotools> | ||
997 | <autotools id="glibmm"> | ||
998 | <branch revision="glibmm-2-8"/> | ||
999 | <dependencies> | ||
1000 | <dep package="glib"/> | ||
1001 | <dep package="libsigc++2"/> | ||
1002 | </dependencies> | ||
1003 | </autotools> | ||
1004 | <autotools id="gtkmm"> | ||
1005 | <branch revision="gtkmm-2-8"/> | ||
1006 | <dependencies> | ||
1007 | <dep package="glibmm"/> | ||
1008 | <dep package="gtk+"/> | ||
1009 | </dependencies> | ||
1010 | </autotools> | ||
1011 | <autotools id="orbitcpp"> | ||
1012 | <branch/> | ||
1013 | <dependencies> | ||
1014 | <dep package="ORBit2"/> | ||
1015 | </dependencies> | ||
1016 | </autotools> | ||
1017 | <autotools id="gnomemm/libgnomemm"> | ||
1018 | <branch revision="gnome-2-14"/> | ||
1019 | <dependencies> | ||
1020 | <dep package="libgnome"/> | ||
1021 | <dep package="gtkmm"/> | ||
1022 | </dependencies> | ||
1023 | </autotools> | ||
1024 | <autotools id="gnomemm/libglademm"> | ||
1025 | <branch/> | ||
1026 | <dependencies> | ||
1027 | <dep package="libglade"/> | ||
1028 | <dep package="gtkmm"/> | ||
1029 | </dependencies> | ||
1030 | </autotools> | ||
1031 | <autotools id="gnomemm/libbonobomm"> | ||
1032 | <branch/> | ||
1033 | <dependencies> | ||
1034 | <dep package="libbonobo"/> | ||
1035 | <dep package="gtkmm"/> | ||
1036 | <dep package="orbitcpp"/> | ||
1037 | </dependencies> | ||
1038 | </autotools> | ||
1039 | <autotools id="gnomemm/libbonobouimm"> | ||
1040 | <branch/> | ||
1041 | <dependencies> | ||
1042 | <dep package="libbonoboui"/> | ||
1043 | <dep package="gnomemm/libbonobomm"/> | ||
1044 | </dependencies> | ||
1045 | </autotools> | ||
1046 | <autotools id="gnomemm/libgnomecanvasmm"> | ||
1047 | <branch/> | ||
1048 | <dependencies> | ||
1049 | <dep package="libgnomecanvas"/> | ||
1050 | <dep package="gtkmm"/> | ||
1051 | </dependencies> | ||
1052 | </autotools> | ||
1053 | <autotools id="gnomemm/gconfmm"> | ||
1054 | <branch/> | ||
1055 | <dependencies> | ||
1056 | <dep package="gconf"/> | ||
1057 | <dep package="gtkmm"/> | ||
1058 | </dependencies> | ||
1059 | </autotools> | ||
1060 | <autotools id="gnomemm/libgnomeuimm"> | ||
1061 | <branch/> | ||
1062 | <dependencies> | ||
1063 | <dep package="gtkmm"/> | ||
1064 | <dep package="libgnomeui"/> | ||
1065 | <dep package="gnomemm/libgnomemm"/> | ||
1066 | <dep package="gnomemm/gconfmm"/> | ||
1067 | <dep package="gnomemm/libgnomecanvasmm"/> | ||
1068 | <dep package="gnomemm/libglademm"/> | ||
1069 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1070 | </dependencies> | ||
1071 | </autotools> | ||
1072 | <autotools id="gnomemm/gnome-vfsmm"> | ||
1073 | <branch/> | ||
1074 | <dependencies> | ||
1075 | <dep package="glibmm"/> | ||
1076 | <dep package="gnome-vfs"/> | ||
1077 | </dependencies> | ||
1078 | </autotools> | ||
1079 | <autotools id="gnomemm/libpanelappletmm"> | ||
1080 | <branch/> | ||
1081 | <dependencies> | ||
1082 | <dep package="gtkmm"/> | ||
1083 | </dependencies> | ||
1084 | </autotools> | ||
1085 | <autotools id="gnomemm/libgnomeprintmm"> | ||
1086 | <branch/> | ||
1087 | <dependencies> | ||
1088 | <dep package="gtkmm"/> | ||
1089 | <dep package="libgnomeprint"/> | ||
1090 | </dependencies> | ||
1091 | </autotools> | ||
1092 | <autotools id="gnomemm/libgnomeprintuimm"> | ||
1093 | <branch/> | ||
1094 | <dependencies> | ||
1095 | <dep package="gtkmm"/> | ||
1096 | <dep package="gnomemm/libgnomeprintmm"/> | ||
1097 | <dep package="libgnomeprintui"/> | ||
1098 | </dependencies> | ||
1099 | </autotools> | ||
1100 | <autotools id="gnomemm/libgdamm"> | ||
1101 | <branch revision="libgda-1-2"/> | ||
1102 | <dependencies> | ||
1103 | <dep package="gtkmm"/> | ||
1104 | <dep package="libgda-1-2"/> | ||
1105 | </dependencies> | ||
1106 | </autotools> | ||
1107 | <autotools id="gnomemm/gtkmm_hello"> | ||
1108 | <branch/> | ||
1109 | <dependencies> | ||
1110 | <dep package="gtkmm"/> | ||
1111 | </dependencies> | ||
1112 | </autotools> | ||
1113 | <autotools id="regexxer"> | ||
1114 | <branch/> | ||
1115 | <dependencies> | ||
1116 | <dep package="intltool"/> | ||
1117 | <dep package="gtkmm"/> | ||
1118 | <dep package="gnomemm/gconfmm"/> | ||
1119 | <dep package="gnomemm/libglademm"/> | ||
1120 | </dependencies> | ||
1121 | </autotools> | ||
1122 | <autotools id="gnet" autogenargs="--enable-glib2"> | ||
1123 | <branch revision="GNET_1_1"/> | ||
1124 | <dependencies> | ||
1125 | <dep package="glib"/> | ||
1126 | </dependencies> | ||
1127 | </autotools> | ||
1128 | <autotools id="gnomeicu"> | ||
1129 | <branch/> | ||
1130 | <dependencies> | ||
1131 | <dep package="libgnomeui"/> | ||
1132 | </dependencies> | ||
1133 | </autotools> | ||
1134 | <autotools id="at-spi"> | ||
1135 | <branch revision="gnome-2-14"/> | ||
1136 | <dependencies> | ||
1137 | <dep package="libbonobo"/> | ||
1138 | <dep package="gail"/> | ||
1139 | </dependencies> | ||
1140 | </autotools> | ||
1141 | <autotools id="libgail-gnome"> | ||
1142 | <branch/> | ||
1143 | <dependencies> | ||
1144 | <dep package="at-spi"/> | ||
1145 | <dep package="libgnomeui"/> | ||
1146 | <dep package="gnome-panel"/> | ||
1147 | </dependencies> | ||
1148 | </autotools> | ||
1149 | <autotools id="at-poke"> | ||
1150 | <branch/> | ||
1151 | <dependencies> | ||
1152 | <dep package="libgail-gnome"/> | ||
1153 | </dependencies> | ||
1154 | </autotools> | ||
1155 | <autotools id="gnome-mag"> | ||
1156 | <branch/> | ||
1157 | <dependencies> | ||
1158 | <dep package="at-spi"/> | ||
1159 | </dependencies> | ||
1160 | </autotools> | ||
1161 | <autotools id="gok"> | ||
1162 | <branch revision="gnome-2-14"/> | ||
1163 | <dependencies> | ||
1164 | <dep package="at-spi"/> | ||
1165 | <dep package="libgnomeui"/> | ||
1166 | <dep package="libwnck"/> | ||
1167 | <dep package="esound"/> | ||
1168 | <dep package="scrollkeeper"/> | ||
1169 | <dep package="gnome-speech"/> | ||
1170 | </dependencies> | ||
1171 | </autotools> | ||
1172 | <autotools id="gnome-speech"> | ||
1173 | <branch revision="gnome-2-14"/> | ||
1174 | <dependencies> | ||
1175 | <dep package="libbonobo"/> | ||
1176 | </dependencies> | ||
1177 | </autotools> | ||
1178 | <autotools id="gnopernicus"> | ||
1179 | <branch revision="gnome-2-14"/> | ||
1180 | <dependencies> | ||
1181 | <dep package="gconf"/> | ||
1182 | <dep package="libgnomeui"/> | ||
1183 | <dep package="gnome-speech"/> | ||
1184 | <dep package="gnome-mag"/> | ||
1185 | </dependencies> | ||
1186 | </autotools> | ||
1187 | <autotools id="dasher" autogenargs="--with-a11y --with-gnome"> | ||
1188 | <branch revision="gnome-2-14"/> | ||
1189 | <dependencies> | ||
1190 | <dep package="at-spi"/> | ||
1191 | <dep package="libgnomeui"/> | ||
1192 | <dep package="gnome-speech"/> | ||
1193 | <dep package="gnome-vfs"/> | ||
1194 | </dependencies> | ||
1195 | </autotools> | ||
1196 | <autotools id="gnome-screensaver"> | ||
1197 | <branch revision="gnome-2-14"/> | ||
1198 | <dependencies> | ||
1199 | <dep package="gconf"/> | ||
1200 | <dep package="gtk+"/> | ||
1201 | <dep package="dbus"/> | ||
1202 | <dep package="gnome-menus"/> | ||
1203 | <dep package="libgnomeui"/> | ||
1204 | </dependencies> | ||
1205 | </autotools> | ||
1206 | <autotools id="gnome-power-manager"> | ||
1207 | <branch revision="gnome-2-14"/> | ||
1208 | <dependencies> | ||
1209 | <dep package="libgnomeui"/> | ||
1210 | <dep package="hal"/> | ||
1211 | <dep package="libwnck"/> | ||
1212 | <dep package="gtk+"/> | ||
1213 | <dep package="gconf"/> | ||
1214 | <dep package="intltool"/> | ||
1215 | <dep package="libglade"/> | ||
1216 | <dep package="libnotify"/> | ||
1217 | </dependencies> | ||
1218 | </autotools> | ||
1219 | <autotools id="gthumb"> | ||
1220 | <branch/> | ||
1221 | <dependencies> | ||
1222 | <dep package="libgnomeui"/> | ||
1223 | <dep package="gnome-vfs"/> | ||
1224 | <dep package="libglade"/> | ||
1225 | <dep package="libbonoboui"/> | ||
1226 | <dep package="libgnomeprintui"/> | ||
1227 | </dependencies> | ||
1228 | </autotools> | ||
1229 | <autotools id="fast-user-switch-applet"> | ||
1230 | <branch revision="gnome-2-14"/> | ||
1231 | <dependencies> | ||
1232 | <dep package="gtk+"/> | ||
1233 | <dep package="gconf"/> | ||
1234 | <dep package="libglade"/> | ||
1235 | <dep package="gnome-panel"/> | ||
1236 | </dependencies> | ||
1237 | </autotools> | ||
1238 | <autotools id="gnome-mount" autogenargs="--enable-nautilus-extension"> | ||
1239 | <branch/> | ||
1240 | <dependencies> | ||
1241 | <dep package="gnome-keyring"/> | ||
1242 | <dep package="libgnomeui"/> | ||
1243 | <dep package="dbus"/> | ||
1244 | <dep package="hal"/> | ||
1245 | <dep package="gtk+"/> | ||
1246 | <dep package="intltool"/> | ||
1247 | <dep package="libglade"/> | ||
1248 | <dep package="eel"/> | ||
1249 | <dep package="nautilus"/> | ||
1250 | </dependencies> | ||
1251 | </autotools> | ||
1252 | <autotools id="libnotify"> | ||
1253 | <branch repo="svn.galago-project.org" module="trunk/libnotify"/> | ||
1254 | <dependencies> | ||
1255 | <dep package="gtk+"/> | ||
1256 | <dep package="dbus"/> | ||
1257 | </dependencies> | ||
1258 | </autotools> | ||
1259 | <autotools id="libsexy"> | ||
1260 | <branch repo="osiris.chipx86.com" module="trunk/libsexy"/> | ||
1261 | <dependencies> | ||
1262 | <dep package="gtk+"/> | ||
1263 | <dep package="libxml2"/> | ||
1264 | <dep package="iso-codes"/> | ||
1265 | </dependencies> | ||
1266 | </autotools> | ||
1267 | <autotools id="notification-daemon"> | ||
1268 | <branch repo="svn.galago-project.org" module="trunk/notification-daemon"/> | ||
1269 | <dependencies> | ||
1270 | <dep package="gtk+"/> | ||
1271 | <dep package="dbus"/> | ||
1272 | <dep package="libsexy"/> | ||
1273 | </dependencies> | ||
1274 | </autotools> | ||
1275 | |||
1276 | <metamodule id="meta-gnome-devel-platform"> | ||
1277 | <dependencies> | ||
1278 | <dep package="libgnome"/> | ||
1279 | <dep package="libbonobo"/> | ||
1280 | <dep package="libbonoboui"/> | ||
1281 | <dep package="libgnomeui"/> | ||
1282 | </dependencies> | ||
1283 | </metamodule> | ||
1284 | <metamodule id="meta-gnome-core"> | ||
1285 | <dependencies> | ||
1286 | <dep package="gnome-desktop"/> | ||
1287 | <dep package="gnome-panel"/> | ||
1288 | <dep package="gnome-session"/> | ||
1289 | <dep package="gnome-terminal"/> | ||
1290 | <dep package="gnome-applets"/> | ||
1291 | </dependencies> | ||
1292 | </metamodule> | ||
1293 | <metamodule id="meta-nautilus"> | ||
1294 | <dependencies> | ||
1295 | <dep package="nautilus"/> | ||
1296 | </dependencies> | ||
1297 | </metamodule> | ||
1298 | <metamodule id="meta-gnome-desktop"> | ||
1299 | <dependencies> | ||
1300 | <dep package="meta-gnome-core"/> | ||
1301 | <dep package="gnome-control-center"/> | ||
1302 | <dep package="meta-nautilus"/> | ||
1303 | <dep package="yelp"/> | ||
1304 | <dep package="bug-buddy"/> | ||
1305 | <dep package="gedit"/> | ||
1306 | <dep package="gtk-engines"/> | ||
1307 | <dep package="eog"/> | ||
1308 | <dep package="metacity"/> | ||
1309 | <dep package="gconf-editor"/> | ||
1310 | <dep package="gnome-utils"/> | ||
1311 | <dep package="gnome-system-monitor"/> | ||
1312 | <dep package="gstreamer"/> | ||
1313 | <dep package="gnome-media"/> | ||
1314 | <dep package="gnome-netstatus"/> | ||
1315 | <dep package="gcalctool"/> | ||
1316 | <dep package="gucharmap"/> | ||
1317 | <dep package="nautilus-cd-burner"/> | ||
1318 | <dep package="zenity"/> | ||
1319 | <dep package="libgail-gnome"/> | ||
1320 | <dep package="gnopernicus"/> | ||
1321 | <dep package="gok"/> | ||
1322 | <dep package="epiphany"/> | ||
1323 | <dep package="gnome-games"/> | ||
1324 | <dep package="gnome-user-docs"/> | ||
1325 | <dep package="file-roller"/> | ||
1326 | <dep package="gnome-system-tools"/> | ||
1327 | <dep package="gnome-nettool"/> | ||
1328 | <dep package="vino"/> | ||
1329 | <dep package="gnome-volume-manager"/> | ||
1330 | <dep package="totem"/> | ||
1331 | <dep package="gnome-menus"/> | ||
1332 | <dep package="gnome-backgrounds"/> | ||
1333 | <dep package="sound-juicer"/> | ||
1334 | <dep package="evolution"/> | ||
1335 | <dep package="evolution-webcal"/> | ||
1336 | <dep package="evolution-exchange"/> | ||
1337 | <dep package="ekiga"/> | ||
1338 | <dep package="evince"/> | ||
1339 | <dep package="dasher"/> | ||
1340 | <dep package="gnome-keyring-manager"/> | ||
1341 | <dep package="deskbar-applet"/> | ||
1342 | <dep package="fast-user-switch-applet"/> | ||
1343 | <dep package="gnome-screensaver"/> | ||
1344 | <dep package="meta-gnome-admin"/> | ||
1345 | </dependencies> | ||
1346 | </metamodule> | ||
1347 | <metamodule id="meta-gnome-admin"> | ||
1348 | <dependencies> | ||
1349 | <dep package="pessulus"/> | ||
1350 | <dep package="sabayon"/> | ||
1351 | </dependencies> | ||
1352 | </metamodule> | ||
1353 | <metamodule id="meta-gnome-devel-tools"> | ||
1354 | <dependencies> | ||
1355 | <dep package="glade"/> | ||
1356 | <dep package="memprof"/> | ||
1357 | <dep package="gconf-editor"/> | ||
1358 | <dep package="devhelp"/> | ||
1359 | <dep package="nautilus-vcs"/> | ||
1360 | </dependencies> | ||
1361 | </metamodule> | ||
1362 | <metamodule id="meta-gnome-python"> | ||
1363 | <dependencies> | ||
1364 | <dep package="pygtk"/> | ||
1365 | <dep package="gnome-python"/> | ||
1366 | <dep package="gnome-python-desktop"/> | ||
1367 | </dependencies> | ||
1368 | <after> | ||
1369 | <dep package="gnome-python-extras"/> | ||
1370 | </after> | ||
1371 | </metamodule> | ||
1372 | <metamodule id="meta-gnome-c++"> | ||
1373 | <dependencies> | ||
1374 | <dep package="gtkmm"/> | ||
1375 | <dep package="gnomemm/libgnomeuimm"/> | ||
1376 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1377 | <dep package="gnomemm/libpanelappletmm"/> | ||
1378 | <dep package="gnomemm/libbonobouimm"/> | ||
1379 | <dep package="gnomemm/libgnomeprintuimm"/> | ||
1380 | <dep package="libxml++"/> | ||
1381 | <dep package="gnomemm/libgdamm"/> | ||
1382 | <dep package="bakery"/> | ||
1383 | </dependencies> | ||
1384 | </metamodule> | ||
1385 | <metamodule id="meta-gnome-accessibility"> | ||
1386 | <dependencies> | ||
1387 | <dep package="libgail-gnome"/> | ||
1388 | <dep package="at-poke"/> | ||
1389 | <dep package="dasher"/> | ||
1390 | <dep package="gnome-mag"/> | ||
1391 | <dep package="gok"/> | ||
1392 | <dep package="gnome-speech"/> | ||
1393 | <dep package="gnopernicus"/> | ||
1394 | </dependencies> | ||
1395 | </metamodule> | ||
1396 | <metamodule id="meta-gnome-proposed"> | ||
1397 | <dependencies> | ||
1398 | <dep package="libnotify"/> | ||
1399 | <dep package="notification-daemon"/> | ||
1400 | <dep package="gnome-power-manager"/> | ||
1401 | </dependencies> | ||
1402 | </metamodule> | ||
1403 | <autotools id="sodipodi"> | ||
1404 | <branch/> | ||
1405 | <dependencies> | ||
1406 | <dep package="gtk+"/> | ||
1407 | <dep package="libgnomeprintui"/> | ||
1408 | <dep package="libart_lgpl"/> | ||
1409 | <dep package="libxml2"/> | ||
1410 | </dependencies> | ||
1411 | </autotools> | ||
1412 | <autotools id="gnome-themes"> | ||
1413 | <branch revision="gnome-2-14"/> | ||
1414 | <dependencies> | ||
1415 | <dep package="gtk-engines"/> | ||
1416 | </dependencies> | ||
1417 | </autotools> | ||
1418 | <autotools id="gob"> | ||
1419 | <branch/> | ||
1420 | <dependencies> | ||
1421 | <dep package="glib"/> | ||
1422 | </dependencies> | ||
1423 | </autotools> | ||
1424 | <autotools id="libgnetwork"> | ||
1425 | <branch/> | ||
1426 | <dependencies> | ||
1427 | <dep package="glib"/> | ||
1428 | <dep package="gconf"/> | ||
1429 | <dep package="intltool"/> | ||
1430 | </dependencies> | ||
1431 | </autotools> | ||
1432 | <autotools id="libgircclient"> | ||
1433 | <branch/> | ||
1434 | <dependencies> | ||
1435 | <dep package="libgnetwork"/> | ||
1436 | </dependencies> | ||
1437 | </autotools> | ||
1438 | <autotools id="gnomechat"> | ||
1439 | <branch/> | ||
1440 | <dependencies> | ||
1441 | <dep package="libgnetwork"/> | ||
1442 | <dep package="libgircclient"/> | ||
1443 | <dep package="libgnomeui"/> | ||
1444 | </dependencies> | ||
1445 | </autotools> | ||
1446 | <mozillamodule id="mozilla" autogenargs="--enable-default-toolkit=gtk2 --disable-mailnews --disable-ldap --disable-debug --enable-optimize --disable-tests --enable-crypto --enable-xft --with-system-zlib --disable-freetype2 --enable-application=browser" cvsroot="mozilla.org" revision="MOZILLA_1_7_BRANCH"> | ||
1447 | <dependencies> | ||
1448 | <dep package="gtk+"/> | ||
1449 | </dependencies> | ||
1450 | </mozillamodule> | ||
1451 | <autotools id="epiphany"> | ||
1452 | <branch revision="gnome-2-14"/> | ||
1453 | <dependencies> | ||
1454 | <dep package="iso-codes"/> | ||
1455 | <dep package="libgnomeui"/> | ||
1456 | <dep package="pygtk"/> | ||
1457 | <dep package="gnome-python"/> | ||
1458 | <dep package="gnome-doc-utils"/> | ||
1459 | <dep package="libgnomeprintui"/> | ||
1460 | <dep package="mozilla"/> | ||
1461 | </dependencies> | ||
1462 | </autotools> | ||
1463 | <autotools id="epiphany-extensions"> | ||
1464 | <branch revision="gnome-2-14"/> | ||
1465 | <dependencies> | ||
1466 | <dep package="epiphany"/> | ||
1467 | </dependencies> | ||
1468 | </autotools> | ||
1469 | <autotools id="galeon"> | ||
1470 | <branch/> | ||
1471 | <dependencies> | ||
1472 | <dep package="mozilla"/> | ||
1473 | <dep package="libgnomeui"/> | ||
1474 | </dependencies> | ||
1475 | </autotools> | ||
1476 | <autotools id="libsoup"> | ||
1477 | <branch/> | ||
1478 | <dependencies> | ||
1479 | <dep package="glib"/> | ||
1480 | <dep package="gnutls"/> | ||
1481 | <dep package="libxml2"/> | ||
1482 | </dependencies> | ||
1483 | </autotools> | ||
1484 | <autotools id="gtkhtml"> | ||
1485 | <branch revision="gnome-2-14"/> | ||
1486 | <dependencies> | ||
1487 | <dep package="gtk+"/> | ||
1488 | <dep package="libgnomeui"/> | ||
1489 | <dep package="libbonoboui"/> | ||
1490 | <dep package="libglade"/> | ||
1491 | <dep package="gail"/> | ||
1492 | <dep package="libgnomeprint"/> | ||
1493 | <dep package="libgnomeprintui"/> | ||
1494 | <dep package="libsoup"/> | ||
1495 | </dependencies> | ||
1496 | </autotools> | ||
1497 | <autotools id="evolution-data-server" supports-non-srcdir-builds="no"> | ||
1498 | <branch revision="gnome-2-14"/> | ||
1499 | <dependencies> | ||
1500 | <dep package="libbonobo"/> | ||
1501 | <dep package="libgnome"/> | ||
1502 | <dep package="libgnomeui"/> | ||
1503 | <dep package="libsoup"/> | ||
1504 | <dep package="libxml2"/> | ||
1505 | <dep package="gconf"/> | ||
1506 | <dep package="gnome-vfs"/> | ||
1507 | <dep package="mozilla"/> | ||
1508 | </dependencies> | ||
1509 | </autotools> | ||
1510 | <autotools id="evolution"> | ||
1511 | <branch revision="gnome-2-14"/> | ||
1512 | <dependencies> | ||
1513 | <dep package="evolution-data-server"/> | ||
1514 | <dep package="gtkhtml"/> | ||
1515 | <dep package="libgnomeui"/> | ||
1516 | <dep package="libbonoboui"/> | ||
1517 | </dependencies> | ||
1518 | <after> | ||
1519 | <dep package="libnotify"/> | ||
1520 | </after> | ||
1521 | </autotools> | ||
1522 | <autotools id="evolution-webcal"> | ||
1523 | <branch/> | ||
1524 | <dependencies> | ||
1525 | <dep package="evolution-data-server"/> | ||
1526 | <dep package="libsoup"/> | ||
1527 | <dep package="libgnomeui"/> | ||
1528 | </dependencies> | ||
1529 | </autotools> | ||
1530 | <autotools id="evolution-exchange"> | ||
1531 | <branch revision="gnome-2-14"/> | ||
1532 | <dependencies> | ||
1533 | <dep package="evolution-data-server"/> | ||
1534 | <dep package="evolution"/> | ||
1535 | <dep package="libsoup"/> | ||
1536 | </dependencies> | ||
1537 | </autotools> | ||
1538 | <tarball id="xchat" version="2.4.5"> | ||
1539 | <source href="http://xchat.org/files/source/2.4/xchat-2.4.5.tar.bz2" | ||
1540 | size="1324626" md5sum="9107a92693e6c62ff2008030e698b92b"/> | ||
1541 | <dependencies> | ||
1542 | <dep package="gtk+"/> | ||
1543 | <dep package="libxml2"/> | ||
1544 | </dependencies> | ||
1545 | </tarball> | ||
1546 | <tarball id="camorama" version="0.17"> | ||
1547 | <source href="http://camorama.fixedgear.org/downloads/camorama-0.17.tar.bz2" | ||
1548 | size="312233" md5sum="2b2784af53a1ba8fa4419aa806967b35"/> | ||
1549 | <dependencies> | ||
1550 | <dep package="gtk+"/> | ||
1551 | </dependencies> | ||
1552 | </tarball> | ||
1553 | <autotools id="gtk-engines-cleanice"> | ||
1554 | <branch repo="elysium-project.sf.net"/> | ||
1555 | <dependencies> | ||
1556 | <dep package="gtk+"/> | ||
1557 | </dependencies> | ||
1558 | </autotools> | ||
1559 | <autotools id="gaim"> | ||
1560 | <branch repo="gaim.sf.net"/> | ||
1561 | <dependencies> | ||
1562 | <dep package="libgnomeui"/> | ||
1563 | </dependencies> | ||
1564 | </autotools> | ||
1565 | <autotools id="zenity"> | ||
1566 | <branch revision="gnome-2-14"/> | ||
1567 | <dependencies> | ||
1568 | <dep package="gtk+"/> | ||
1569 | <dep package="gconf"/> | ||
1570 | <dep package="libgnomecanvas"/> | ||
1571 | <dep package="gnome-doc-utils"/> | ||
1572 | </dependencies> | ||
1573 | </autotools> | ||
1574 | <autotools id="gpdf"> | ||
1575 | <branch/> | ||
1576 | <dependencies> | ||
1577 | <dep package="libgnomeui"/> | ||
1578 | <dep package="libbonoboui"/> | ||
1579 | <dep package="libgnomeprintui"/> | ||
1580 | </dependencies> | ||
1581 | </autotools> | ||
1582 | <autotools id="gnome-netstatus"> | ||
1583 | <branch/> | ||
1584 | <dependencies> | ||
1585 | <dep package="libgnomeui"/> | ||
1586 | <dep package="gnome-panel"/> | ||
1587 | <dep package="gnome-doc-utils"/> | ||
1588 | </dependencies> | ||
1589 | </autotools> | ||
1590 | <autotools id="gnome-doc-utils"> | ||
1591 | <branch revision="gnome-2-14"/> | ||
1592 | <dependencies> | ||
1593 | <dep package="libxslt"/> | ||
1594 | <dep package="intltool"/> | ||
1595 | <dep package="glib"/> | ||
1596 | </dependencies> | ||
1597 | </autotools> | ||
1598 | <tarball id="libmusicbrainz" version="2.1.2"> | ||
1599 | <source href="ftp://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-2.1.2.tar.gz" | ||
1600 | size="504432" md5sum="88d35af903665fecbdee77eb6d5e6cdd"/> | ||
1601 | </tarball> | ||
1602 | <autotools id="totem" autogenargs="--enable-gstreamer=0.10"> | ||
1603 | <branch revision="gnome-2-14"/> | ||
1604 | <dependencies> | ||
1605 | <dep package="gnome-desktop"/> | ||
1606 | <dep package="nautilus-cd-burner"/> | ||
1607 | <dep package="gstreamer"/> | ||
1608 | <dep package="gst-plugins-base"/> | ||
1609 | <dep package="gst-plugins-good"/> | ||
1610 | <dep package="libmusicbrainz"/> | ||
1611 | <dep package="iso-codes"/> | ||
1612 | </dependencies> | ||
1613 | </autotools> | ||
1614 | <autotools id="gnome-themes-extras"> | ||
1615 | <branch/> | ||
1616 | <dependencies> | ||
1617 | <dep package="gnome-themes"/> | ||
1618 | </dependencies> | ||
1619 | </autotools> | ||
1620 | |||
1621 | <autotools id="libgda"> | ||
1622 | <branch module="libgda"/> | ||
1623 | <dependencies> | ||
1624 | <dep package="glib"/> | ||
1625 | </dependencies> | ||
1626 | </autotools> | ||
1627 | <autotools id="libgda-1-2"> | ||
1628 | <branch module="libgda" revision="release-1-2-branch" | ||
1629 | checkoutdir="libgda-1-2"/> | ||
1630 | <dependencies> | ||
1631 | <dep package="glib"/> | ||
1632 | </dependencies> | ||
1633 | </autotools> | ||
1634 | |||
1635 | <autotools id="libgnomedb" autogenargs="--enable-gnome=yes"> | ||
1636 | <branch/> | ||
1637 | <dependencies> | ||
1638 | <dep package="libgda"/> | ||
1639 | <dep package="libgnomeui"/> | ||
1640 | <dep package="libbonoboui"/> | ||
1641 | </dependencies> | ||
1642 | </autotools> | ||
1643 | <autotools id="mergeant"> | ||
1644 | <branch/> | ||
1645 | <dependencies> | ||
1646 | <dep package="libgnomedb"/> | ||
1647 | </dependencies> | ||
1648 | </autotools> | ||
1649 | <autotools id="gtranslator"> | ||
1650 | <branch/> | ||
1651 | <dependencies> | ||
1652 | <dep package="libgnomeui"/> | ||
1653 | </dependencies> | ||
1654 | </autotools> | ||
1655 | <autotools id="gnome-spell"> | ||
1656 | <branch/> | ||
1657 | <dependencies> | ||
1658 | <dep package="libgnomeui"/> | ||
1659 | </dependencies> | ||
1660 | </autotools> | ||
1661 | <autotools id="libgnomecups"> | ||
1662 | <branch/> | ||
1663 | <dependencies> | ||
1664 | <dep package="glib"/> | ||
1665 | </dependencies> | ||
1666 | </autotools> | ||
1667 | <autotools id="gnome-cups-manager"> | ||
1668 | <branch/> | ||
1669 | <dependencies> | ||
1670 | <dep package="libgnomecups"/> | ||
1671 | <dep package="libgnomeui"/> | ||
1672 | <dep package="libglade"/> | ||
1673 | </dependencies> | ||
1674 | </autotools> | ||
1675 | <autotools id="libxml++"> | ||
1676 | <branch/> | ||
1677 | <dependencies> | ||
1678 | <dep package="libxml2"/> | ||
1679 | <dep package="glibmm"/> | ||
1680 | </dependencies> | ||
1681 | </autotools> | ||
1682 | <autotools id="bakery"> | ||
1683 | <branch/> | ||
1684 | <dependencies> | ||
1685 | <dep package="libxml++"/> | ||
1686 | <dep package="gtkmm"/> | ||
1687 | <dep package="gnomemm/libglademm"/> | ||
1688 | <dep package="gnomemm/gconfmm"/> | ||
1689 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1690 | </dependencies> | ||
1691 | </autotools> | ||
1692 | <autotools id="gnome-hello"> | ||
1693 | <branch/> | ||
1694 | <dependencies> | ||
1695 | <dep package="glib"/> | ||
1696 | <dep package="libgnome"/> | ||
1697 | <dep package="libgnomeui"/> | ||
1698 | </dependencies> | ||
1699 | </autotools> | ||
1700 | <autotools id="gnome-system-tools"> | ||
1701 | <branch revision="gnome-2-14" /> | ||
1702 | <dependencies> | ||
1703 | <dep package="glib"/> | ||
1704 | <dep package="libxml2"/> | ||
1705 | <dep package="gconf"/> | ||
1706 | <dep package="libgnomeui"/> | ||
1707 | <dep package="libbonoboui"/> | ||
1708 | <dep package="libglade"/> | ||
1709 | <dep package="nautilus"/> | ||
1710 | <dep package="system-tools-backends-1.4"/> | ||
1711 | <dep package="gnome-doc-utils"/> | ||
1712 | </dependencies> | ||
1713 | </autotools> | ||
1714 | <autotools id="gnome-user-docs"> | ||
1715 | <branch revision="gnome-2-14"/> | ||
1716 | <dependencies> | ||
1717 | <dep package="scrollkeeper"/> | ||
1718 | <dep package="gnome-doc-utils"/> | ||
1719 | </dependencies> | ||
1720 | </autotools> | ||
1721 | <autotools id="loudmouth"> | ||
1722 | <branch/> | ||
1723 | <dependencies> | ||
1724 | <dep package="glib"/> | ||
1725 | </dependencies> | ||
1726 | </autotools> | ||
1727 | <autotools id="gossip"> | ||
1728 | <branch/> | ||
1729 | <dependencies> | ||
1730 | <dep package="loudmouth"/> | ||
1731 | <dep package="libgnomeui"/> | ||
1732 | </dependencies> | ||
1733 | </autotools> | ||
1734 | <autotools id="conglomerate"> | ||
1735 | <branch/> | ||
1736 | <dependencies> | ||
1737 | <dep package="libxslt"/> | ||
1738 | <dep package="gconf"/> | ||
1739 | <dep package="libgnomeui"/> | ||
1740 | </dependencies> | ||
1741 | </autotools> | ||
1742 | <autotools id="sound-juicer"> | ||
1743 | <branch revision="gnome-2-14"/> | ||
1744 | <dependencies> | ||
1745 | <dep package="gnome-doc-utils"/> | ||
1746 | <dep package="libgnomeui"/> | ||
1747 | <dep package="gnome-media"/> | ||
1748 | <dep package="gstreamer"/> | ||
1749 | <dep package="gst-plugins-base"/> | ||
1750 | <dep package="gst-plugins-good"/> | ||
1751 | <dep package="nautilus-cd-burner"/> | ||
1752 | </dependencies> | ||
1753 | </autotools> | ||
1754 | <autotools id="gnome-network"> | ||
1755 | <branch/> | ||
1756 | <dependencies> | ||
1757 | <dep package="glib"/> | ||
1758 | </dependencies> | ||
1759 | </autotools> | ||
1760 | <tarball id="guile" version="1.6.7"> | ||
1761 | <source href="ftp://ftp.gnu.org/gnu/guile/guile-1.6.7.tar.gz" | ||
1762 | size="3039294" md5sum="c2ff2a2231f0cbb2e838dd8701a587c5"/> | ||
1763 | </tarball> | ||
1764 | <tarball id="autogen" version="5.6.5"> | ||
1765 | <source href="http://internap.dl.sourceforge.net/sourceforge/autogen/autogen-5.6.5.tar.gz" | ||
1766 | size="1144260" md5sum="54a6cb0be7e6b526af9aba4a73013885"/> | ||
1767 | <dependencies> | ||
1768 | <dep package="guile"/> | ||
1769 | </dependencies> | ||
1770 | </tarball> | ||
1771 | <autotools id="anjuta"> | ||
1772 | <branch/> | ||
1773 | <dependencies> | ||
1774 | <dep package="libbonoboui"/> | ||
1775 | <dep package="libgnomeprintui"/> | ||
1776 | <dep package="vte"/> | ||
1777 | <dep package="gnome-build"/> | ||
1778 | <dep package="autogen"/> | ||
1779 | </dependencies> | ||
1780 | </autotools> | ||
1781 | <autotools id="OpenApplet"> | ||
1782 | <branch/> | ||
1783 | <dependencies> | ||
1784 | <dep package="gnome-panel"/> | ||
1785 | </dependencies> | ||
1786 | </autotools> | ||
1787 | <autotools id="gtetrinet"> | ||
1788 | <branch/> | ||
1789 | <dependencies> | ||
1790 | <dep package="libgnomeui"/> | ||
1791 | </dependencies> | ||
1792 | </autotools> | ||
1793 | <autotools id="glom"> | ||
1794 | <branch/> | ||
1795 | <dependencies> | ||
1796 | <dep package="gnomemm/libgdamm"/> | ||
1797 | <dep package="bakery"/> | ||
1798 | <dep package="gnomemm/libgnomecanvasmm"/> | ||
1799 | <dep package="libgnome"/> | ||
1800 | <dep package="iso-codes"/> | ||
1801 | <dep package="pygtk"/> | ||
1802 | <dep package="gnome-python-extras"/> | ||
1803 | <dep package="gnome-doc-utils"/> | ||
1804 | </dependencies> | ||
1805 | </autotools> | ||
1806 | <autotools id="vino"> | ||
1807 | <branch/> | ||
1808 | <dependencies> | ||
1809 | <dep package="libgnomeui"/> | ||
1810 | <dep package="libglade"/> | ||
1811 | <dep package="gconf"/> | ||
1812 | <dep package="gnutls"/> | ||
1813 | </dependencies> | ||
1814 | </autotools> | ||
1815 | <autotools id="gnome-keyring-manager" autogenargs="--disable-more-warnings"> | ||
1816 | <branch/> | ||
1817 | <dependencies> | ||
1818 | <dep package="libgnomeui"/> | ||
1819 | <dep package="gnome-keyring"/> | ||
1820 | <dep package="gconf"/> | ||
1821 | </dependencies> | ||
1822 | </autotools> | ||
1823 | <autotools id="gnome-volume-manager"> | ||
1824 | <branch/> | ||
1825 | <dependencies> | ||
1826 | <dep package="libgnomeui"/> | ||
1827 | <dep package="libglade"/> | ||
1828 | <dep package="hal"/> | ||
1829 | </dependencies> | ||
1830 | </autotools> | ||
1831 | <metamodule id="meta-storage"> | ||
1832 | <dependencies> | ||
1833 | <dep package="storage/storage-store"/> | ||
1834 | <dep package="storage/vfs"/> | ||
1835 | <dep package="storage/applet"/> | ||
1836 | </dependencies> | ||
1837 | </metamodule> | ||
1838 | <autotools id="storage/storage-store"> | ||
1839 | <branch/> | ||
1840 | <dependencies> | ||
1841 | <dep package="dbus"/> | ||
1842 | </dependencies> | ||
1843 | </autotools> | ||
1844 | <autotools id="storage/libstorage"> | ||
1845 | <branch/> | ||
1846 | <dependencies> | ||
1847 | <dep package="gnome-vfs"/> | ||
1848 | <dep package="pygtk"/> | ||
1849 | </dependencies> | ||
1850 | </autotools> | ||
1851 | <autotools id="storage/libstorage-translators"> | ||
1852 | <branch/> | ||
1853 | <dependencies> | ||
1854 | <dep package="storage/libstorage"/> | ||
1855 | </dependencies> | ||
1856 | </autotools> | ||
1857 | <autotools id="storage/vfs"> | ||
1858 | <branch/> | ||
1859 | <dependencies> | ||
1860 | <dep package="storage/libstorage"/> | ||
1861 | <dep package="storage/libstorage-translators"/> | ||
1862 | </dependencies> | ||
1863 | </autotools> | ||
1864 | <autotools id="storage/pet"> | ||
1865 | <branch/> | ||
1866 | </autotools> | ||
1867 | <autotools id="storage/libmrs"> | ||
1868 | <branch/> | ||
1869 | <dependencies> | ||
1870 | <dep package="storage/pet"/> | ||
1871 | </dependencies> | ||
1872 | </autotools> | ||
1873 | <autotools id="storage/libmrs-converter"> | ||
1874 | <branch/> | ||
1875 | <dependencies> | ||
1876 | <dep package="storage/libmrs"/> | ||
1877 | </dependencies> | ||
1878 | </autotools> | ||
1879 | <autotools id="storage/libstorage-nl"> | ||
1880 | <branch/> | ||
1881 | <dependencies> | ||
1882 | <dep package="storage/libstorage"/> | ||
1883 | <dep package="storage/libmrs"/> | ||
1884 | <dep package="storage/libmrs-converter"/> | ||
1885 | </dependencies> | ||
1886 | </autotools> | ||
1887 | <autotools id="storage/applet"> | ||
1888 | <branch/> | ||
1889 | <dependencies> | ||
1890 | <dep package="gnome-python"/> | ||
1891 | <dep package="storage/libstorage-nl"/> | ||
1892 | </dependencies> | ||
1893 | </autotools> | ||
1894 | <autotools id="gnome-nettool"> | ||
1895 | <branch revision="gnome-2-14"/> | ||
1896 | <dependencies> | ||
1897 | <dep package="libgnomeui"/> | ||
1898 | </dependencies> | ||
1899 | </autotools> | ||
1900 | <autotools id="monkey-bubble"> | ||
1901 | <branch/> | ||
1902 | <dependencies> | ||
1903 | <dep package="gstreamer-0-8"/> | ||
1904 | <dep package="gst-plugins-0-8"/> | ||
1905 | <dep package="libxml2"/> | ||
1906 | <dep package="gconf"/> | ||
1907 | <dep package="librsvg"/> | ||
1908 | <dep package="libgnomeui"/> | ||
1909 | </dependencies> | ||
1910 | </autotools> | ||
1911 | <autotools id="gnome-schedule"> | ||
1912 | <branch/> | ||
1913 | <dependencies> | ||
1914 | <dep package="pygtk"/> | ||
1915 | <dep package="yelp"/> | ||
1916 | </dependencies> | ||
1917 | </autotools> | ||
1918 | <autotools id="gnome-backgrounds"> | ||
1919 | <branch/> | ||
1920 | <dependencies> | ||
1921 | <dep package="glib"/> | ||
1922 | </dependencies> | ||
1923 | </autotools> | ||
1924 | <autotools id="evince"> | ||
1925 | <branch revision="gnome-2-14"/> | ||
1926 | <dependencies> | ||
1927 | <dep package="libgnomeui"/> | ||
1928 | <dep package="libgnomeprintui"/> | ||
1929 | <dep package="poppler"/> | ||
1930 | <dep package="gnome-doc-utils"/> | ||
1931 | </dependencies> | ||
1932 | </autotools> | ||
1933 | <autotools id="nautilus-python" supports-non-srcdir-builds="no"> | ||
1934 | <branch/> | ||
1935 | <dependencies> | ||
1936 | <dep package="nautilus"/> | ||
1937 | <dep package="pygtk"/> | ||
1938 | <dep package="gnome-python"/> | ||
1939 | </dependencies> | ||
1940 | </autotools> | ||
1941 | <autotools id="inkscape"> | ||
1942 | <branch repo="inkscape.sf.net"/> | ||
1943 | <dependencies> | ||
1944 | <dep package="gtkmm"/> | ||
1945 | <dep package="libxslt"/> | ||
1946 | </dependencies> | ||
1947 | </autotools> | ||
1948 | <autotools id="NetworkManager"> | ||
1949 | <branch repo="gnome.org"/> | ||
1950 | <dependencies> | ||
1951 | <dep package="dbus"/> | ||
1952 | </dependencies> | ||
1953 | </autotools> | ||
1954 | <autotools id="atomix"> | ||
1955 | <branch/> | ||
1956 | <dependencies> | ||
1957 | <dep package="gtk+"/> | ||
1958 | <dep package="libgnome"/> | ||
1959 | <dep package="libgnomeui"/> | ||
1960 | <dep package="libxml2"/> | ||
1961 | <dep package="libgnomecanvas"/> | ||
1962 | <dep package="libbonoboui"/> | ||
1963 | </dependencies> | ||
1964 | </autotools> | ||
1965 | <autotools id="deskbar-applet"> | ||
1966 | <branch revision="gnome-2-14"/> | ||
1967 | <dependencies> | ||
1968 | <dep package="gtk+"/> | ||
1969 | <dep package="gnome-desktop"/> | ||
1970 | <dep package="pygtk"/> | ||
1971 | <dep package="gnome-python"/> | ||
1972 | <dep package="gnome-python-desktop"/> | ||
1973 | </dependencies> | ||
1974 | </autotools> | ||
1975 | <autotools id="pessulus"> | ||
1976 | <branch revision="gnome-2-14"/> | ||
1977 | <dependencies> | ||
1978 | <dep package="pygtk"/> | ||
1979 | <dep package="gnome-python"/> | ||
1980 | </dependencies> | ||
1981 | </autotools> | ||
1982 | <autotools id="sabayon"> | ||
1983 | <branch/> | ||
1984 | <dependencies> | ||
1985 | <dep package="gtk+"/> | ||
1986 | <dep package="pygtk"/> | ||
1987 | </dependencies> | ||
1988 | </autotools> | ||
1989 | <autotools id="muine"> | ||
1990 | <branch/> | ||
1991 | <dependencies> | ||
1992 | <dep package="gtk+"/> | ||
1993 | <dep package="gstreamer"/> | ||
1994 | </dependencies> | ||
1995 | </autotools> | ||
1996 | <autotools id="gnonlin"> | ||
1997 | <branch repo="gstreamer.freedesktop.org" module="gnonlin"/> | ||
1998 | <dependencies> | ||
1999 | <dep package="gstreamer"/> | ||
2000 | <dep package="gst-plugins-base"/> | ||
2001 | </dependencies> | ||
2002 | </autotools> | ||
2003 | <autotools id="pitivi"> | ||
2004 | <branch/> | ||
2005 | <dependencies> | ||
2006 | <dep package="pygtk"/> | ||
2007 | <dep package="gnome-python"/> | ||
2008 | <dep package="gstreamer"/> | ||
2009 | <dep package="gst-python"/> | ||
2010 | <dep package="gnonlin"/> | ||
2011 | </dependencies> | ||
2012 | </autotools> | ||
2013 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gnome-2.16.modules b/scripts/jhbuild/modulesets/gnome-2.16.modules new file mode 100644 index 0000000000..5459c26908 --- /dev/null +++ b/scripts/jhbuild/modulesets/gnome-2.16.modules | |||
@@ -0,0 +1,2087 @@ | |||
1 | <?xml version="1.0"?><!--*- mode: nxml; indent-tabs-mode: nil -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | <repository type="cvs" name="gnome.org" default="yes" | ||
5 | cvsroot=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
6 | password=""/> | ||
7 | <repository type="cvs" name="cairo.freedesktop.org" | ||
8 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/cairo" | ||
9 | password=""/> | ||
10 | <repository type="cvs" name="mozilla.org" | ||
11 | cvsroot=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" | ||
12 | password="anonymous"/> | ||
13 | <repository type="cvs" name="liboil.freedesktop.org" | ||
14 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/liboil" | ||
15 | password=""/> | ||
16 | <repository type="cvs" name="gstreamer.freedesktop.org" | ||
17 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer" | ||
18 | password=""/> | ||
19 | <repository type="cvs" name="menu.freedesktop.org" | ||
20 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/menus" | ||
21 | password=""/> | ||
22 | <repository type="cvs" name="mime.freedesktop.org" | ||
23 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/mime" | ||
24 | password=""/> | ||
25 | <repository type="cvs" name="xklavier.freedesktop.org" | ||
26 | cvsroot=":pserver:anoncvs@anoncvs.freedesktop.org:/cvs/xklavier" | ||
27 | password=""/> | ||
28 | <repository type="cvs" name="elysium-project.sf.net" | ||
29 | cvsroot=":pserver:anonymous@elysium-project.cvs.sourceforge.net:/cvsroot/elysium-project" | ||
30 | password=""/> | ||
31 | <repository type="svn" name="gaim.sf.net" | ||
32 | href="https://svn.sourceforge.net/svnroot/gaim/"/> | ||
33 | <repository type="cvs" name="inkscape.sf.net" | ||
34 | cvsroot=":pserver:anonymous@inkscape.cvs.sourceforge.net:/cvsroot/inkscape" | ||
35 | password=""/> | ||
36 | <repository type="svn" name="svn.galago-project.org" | ||
37 | href="http://svn.galago-project.org/"/> | ||
38 | <repository type="svn" name="osiris.chipx86.com" | ||
39 | href="http://osiris.chipx86.com/svn/osiris-misc/"/> | ||
40 | <repository type="svn" name="svn.debian.org" | ||
41 | href="svn://svn.debian.org/"/> | ||
42 | <repository type="cvs" name="openh323.sf.net" | ||
43 | cvsroot=":pserver:anonymous@openh323.cvs.sourceforge.net:/cvsroot/openh323" | ||
44 | password="" /> | ||
45 | <repository type="svn" name="svn.navi.cx" | ||
46 | href="http://svn.navi.cx/" /> | ||
47 | <repository type="cvs" name="anoncvs.abisource.com" | ||
48 | cvsroot=":pserver:anoncvs@anoncvs.abisource.com:/cvsroot" | ||
49 | password="anoncvs" /> | ||
50 | |||
51 | |||
52 | <tarball id="scrollkeeper" version="0.3.14" supports-non-srcdir-builds="no"> | ||
53 | <source href="http://easynews.dl.sourceforge.net/sourceforge/scrollkeeper/scrollkeeper-0.3.14.tar.gz" | ||
54 | size="679513" md5sum="161eb3f29e30e7b24f84eb93ac696155"/> | ||
55 | <dependencies> | ||
56 | <dep package="libxml2"/> | ||
57 | <dep package="libxslt"/> | ||
58 | <dep package="intltool"/> | ||
59 | </dependencies> | ||
60 | <patches> | ||
61 | <patch file="scrollkeeper_clean_xml_validation_context.patch" strip="1"/> | ||
62 | <patch file="scrollkeeper_language_fix.patch" strip="1"/> | ||
63 | <patch file="scrollkeeper_rw_offset_fix.patch" strip="1"/> | ||
64 | </patches> | ||
65 | </tarball> | ||
66 | |||
67 | <autotools id="iso-codes"> | ||
68 | <branch repo="svn.debian.org" module="pkg-isocodes/trunk/iso-codes" checkoutdir="iso-codes"/> | ||
69 | </autotools> | ||
70 | |||
71 | <include href="freedesktop.modules"/> | ||
72 | <include href="gnutls.modules"/> | ||
73 | |||
74 | <autotools id="cairo-gtk-engine"> | ||
75 | <branch repo="cairo.freedesktop.org"/> | ||
76 | <dependencies> | ||
77 | <dep package="gtk+"/> | ||
78 | <dep package="cairo-1-0"/> | ||
79 | </dependencies> | ||
80 | </autotools> | ||
81 | |||
82 | <autotools id="shared-mime-info" supports-non-srcdir-builds="no"> | ||
83 | <branch repo="mime.freedesktop.org"/> | ||
84 | <dependencies> | ||
85 | <dep package="intltool"/> | ||
86 | <dep package="libxml2"/> | ||
87 | <dep package="glib"/> | ||
88 | </dependencies> | ||
89 | </autotools> | ||
90 | |||
91 | <autotools id="desktop-file-utils"> | ||
92 | <branch repo="menu.freedesktop.org"/> | ||
93 | <dependencies> | ||
94 | <dep package="glib"/> | ||
95 | <dep package="intltool"/> | ||
96 | </dependencies> | ||
97 | </autotools> | ||
98 | |||
99 | <autotools id="libxklavier" supports-non-srcdir-builds="no"> | ||
100 | <branch repo="xklavier.freedesktop.org"/> | ||
101 | <dependencies> | ||
102 | <dep package="libxml2"/> | ||
103 | <dep package="gtk-doc"/> | ||
104 | <dep package="glib"/> | ||
105 | </dependencies> | ||
106 | </autotools> | ||
107 | <autotools id="libbtctl"> | ||
108 | <branch/> | ||
109 | <dependencies> | ||
110 | <dep package="gtk+"/> | ||
111 | <dep package="glib"/> | ||
112 | </dependencies> | ||
113 | </autotools> | ||
114 | <autotools id="gnome-bluetooth"> | ||
115 | <branch/> | ||
116 | <dependencies> | ||
117 | <dep package="gtk+"/> | ||
118 | <dep package="glib"/> | ||
119 | <dep package="libbtctl"/> | ||
120 | <dep package="libglade"/> | ||
121 | <dep package="libgnomeui"/> | ||
122 | <dep package="gconf"/> | ||
123 | </dependencies> | ||
124 | </autotools> | ||
125 | <autotools id="phonemgr"> | ||
126 | <branch/> | ||
127 | <dependencies> | ||
128 | <dep package="gtk+"/> | ||
129 | <dep package="glib"/> | ||
130 | <dep package="libbtctl"/> | ||
131 | <dep package="gnome-bluetooth"/> | ||
132 | <dep package="libglade"/> | ||
133 | <dep package="libgnomeui"/> | ||
134 | <dep package="libgnome"/> | ||
135 | <dep package="gconf"/> | ||
136 | </dependencies> | ||
137 | </autotools> | ||
138 | |||
139 | <autotools id="intltool"> | ||
140 | <branch/> | ||
141 | <dependencies> | ||
142 | <dep package="gnome-common"/> | ||
143 | </dependencies> | ||
144 | </autotools> | ||
145 | <autotools id="gnome-common"> | ||
146 | <branch/> | ||
147 | </autotools> | ||
148 | <autotools id="libxml2"> | ||
149 | <branch module="gnome-xml" checkoutdir="libxml2"/> | ||
150 | </autotools> | ||
151 | <autotools id="libxslt"> | ||
152 | <branch/> | ||
153 | <dependencies> | ||
154 | <dep package="libxml2"/> | ||
155 | <dep package="libgcrypt"/> | ||
156 | </dependencies> | ||
157 | </autotools> | ||
158 | <autotools id="gtk-doc"> | ||
159 | <branch/> | ||
160 | <dependencies> | ||
161 | <dep package="libxslt"/> | ||
162 | <dep package="scrollkeeper"/> | ||
163 | </dependencies> | ||
164 | </autotools> | ||
165 | <autotools id="gamin"> | ||
166 | <branch/> | ||
167 | <dependencies> | ||
168 | <dep package="glib"/> | ||
169 | </dependencies> | ||
170 | </autotools> | ||
171 | <autotools id="glib"> | ||
172 | <branch/> | ||
173 | <dependencies> | ||
174 | <dep package="gtk-doc"/> | ||
175 | </dependencies> | ||
176 | </autotools> | ||
177 | <autotools id="pango"> | ||
178 | <branch/> | ||
179 | <dependencies> | ||
180 | <dep package="gnome-common"/> | ||
181 | <dep package="glib"/> | ||
182 | <dep package="cairo"/> | ||
183 | <dep package="libXft"/> | ||
184 | </dependencies> | ||
185 | </autotools> | ||
186 | <autotools id="atk"> | ||
187 | <branch/> | ||
188 | <dependencies> | ||
189 | <dep package="glib"/> | ||
190 | </dependencies> | ||
191 | </autotools> | ||
192 | <autotools id="gtk+"> | ||
193 | <branch/> | ||
194 | <dependencies> | ||
195 | <dep package="cairo"/> | ||
196 | <dep package="pango"/> | ||
197 | <dep package="atk"/> | ||
198 | <dep package="shared-mime-info"/> | ||
199 | </dependencies> | ||
200 | </autotools> | ||
201 | <autotools id="gail"> | ||
202 | <branch/> | ||
203 | <dependencies> | ||
204 | <dep package="gtk+"/> | ||
205 | <dep package="atk"/> | ||
206 | <dep package="libgnomecanvas"/> | ||
207 | </dependencies> | ||
208 | </autotools> | ||
209 | <autotools id="gtkhtml2"> | ||
210 | <branch/> | ||
211 | <dependencies> | ||
212 | <dep package="gtk+"/> | ||
213 | <dep package="libxml2"/> | ||
214 | <dep package="gail"/> | ||
215 | </dependencies> | ||
216 | </autotools> | ||
217 | <autotools id="libIDL"> | ||
218 | <branch/> | ||
219 | <dependencies> | ||
220 | <dep package="glib"/> | ||
221 | </dependencies> | ||
222 | </autotools> | ||
223 | <autotools id="ORBit2"> | ||
224 | <branch/> | ||
225 | <dependencies> | ||
226 | <dep package="libIDL"/> | ||
227 | <dep package="gnome-common"/> | ||
228 | </dependencies> | ||
229 | </autotools> | ||
230 | <autotools id="gconf"> | ||
231 | <branch/> | ||
232 | <dependencies> | ||
233 | <dep package="ORBit2"/> | ||
234 | <dep package="libxml2"/> | ||
235 | <dep package="gtk+"/> | ||
236 | </dependencies> | ||
237 | </autotools> | ||
238 | <autotools id="libbonobo"> | ||
239 | <branch/> | ||
240 | <dependencies> | ||
241 | <dep package="ORBit2"/> | ||
242 | <dep package="intltool"/> | ||
243 | <dep package="gnome-common"/> | ||
244 | <dep package="libxml2"/> | ||
245 | </dependencies> | ||
246 | </autotools> | ||
247 | <autotools id="gnome-mime-data"> | ||
248 | <branch/> | ||
249 | <dependencies> | ||
250 | <dep package="gnome-common"/> | ||
251 | <dep package="glib"/> | ||
252 | </dependencies> | ||
253 | </autotools> | ||
254 | <autotools id="gnome-icon-theme"> | ||
255 | <branch/> | ||
256 | <dependencies> | ||
257 | <dep package="hicolor-icon-theme"/> | ||
258 | <dep package="icon-naming-utils"/> | ||
259 | </dependencies> | ||
260 | </autotools> | ||
261 | <autotools id="gnome-vfs"> | ||
262 | <branch/> | ||
263 | <dependencies> | ||
264 | <dep package="gconf"/> | ||
265 | <dep package="desktop-file-utils"/> | ||
266 | <dep package="shared-mime-info"/> | ||
267 | <dep package="gnome-mime-data"/> | ||
268 | <dep package="avahi"/> | ||
269 | <dep package="hal"/> | ||
270 | <dep package="gamin"/> | ||
271 | </dependencies> | ||
272 | </autotools> | ||
273 | <autotools id="gnome-vfs-monikers"> | ||
274 | <branch/> | ||
275 | <dependencies> | ||
276 | <dep package="libbonobo"/> | ||
277 | <dep package="gnome-vfs"/> | ||
278 | </dependencies> | ||
279 | </autotools> | ||
280 | <autotools id="gnome-keyring"> | ||
281 | <branch/> | ||
282 | <dependencies> | ||
283 | <dep package="gtk+"/> | ||
284 | </dependencies> | ||
285 | </autotools> | ||
286 | <autotools id="libart_lgpl"> | ||
287 | <branch/> | ||
288 | </autotools> | ||
289 | <autotools id="libgnome"> | ||
290 | <branch/> | ||
291 | <dependencies> | ||
292 | <dep package="libxml2"/> | ||
293 | <dep package="libxslt"/> | ||
294 | <dep package="libbonobo"/> | ||
295 | <dep package="gnome-vfs"/> | ||
296 | <dep package="gconf"/> | ||
297 | <dep package="esound"/> | ||
298 | </dependencies> | ||
299 | </autotools> | ||
300 | <autotools id="libgnomecanvas"> | ||
301 | <branch/> | ||
302 | <dependencies> | ||
303 | <dep package="gtk+"/> | ||
304 | <dep package="libart_lgpl"/> | ||
305 | <dep package="libglade"/> | ||
306 | <dep package="gnome-common"/> | ||
307 | </dependencies> | ||
308 | </autotools> | ||
309 | <autotools id="libbonoboui"> | ||
310 | <branch/> | ||
311 | <dependencies> | ||
312 | <dep package="libgnome"/> | ||
313 | <dep package="libbonobo"/> | ||
314 | <dep package="libgnomecanvas"/> | ||
315 | <dep package="libglade"/> | ||
316 | </dependencies> | ||
317 | </autotools> | ||
318 | <autotools id="libgnomeui"> | ||
319 | <branch/> | ||
320 | <dependencies> | ||
321 | <dep package="libbonoboui"/> | ||
322 | <dep package="libglade"/> | ||
323 | <dep package="gnome-icon-theme"/> | ||
324 | <dep package="gnome-keyring"/> | ||
325 | </dependencies> | ||
326 | </autotools> | ||
327 | <autotools id="libglade"> | ||
328 | <branch/> | ||
329 | <dependencies> | ||
330 | <dep package="gtk+"/> | ||
331 | <dep package="libxml2"/> | ||
332 | </dependencies> | ||
333 | </autotools> | ||
334 | <autotools id="pygobject"> | ||
335 | <branch/> | ||
336 | <dependencies> | ||
337 | <dep package="glib"/> | ||
338 | </dependencies> | ||
339 | </autotools> | ||
340 | <autotools id="pygtk"> | ||
341 | <branch/> | ||
342 | <dependencies> | ||
343 | <dep package="pygobject"/> | ||
344 | <dep package="gtk+"/> | ||
345 | <dep package="pycairo"/> | ||
346 | <dep package="libglade"/> | ||
347 | </dependencies> | ||
348 | </autotools> | ||
349 | <autotools id="pyorbit"> | ||
350 | <branch/> | ||
351 | <dependencies> | ||
352 | <dep package="ORBit2"/> | ||
353 | </dependencies> | ||
354 | </autotools> | ||
355 | <autotools id="gnome-python"> | ||
356 | <branch/> | ||
357 | <dependencies> | ||
358 | <dep package="pygtk"/> | ||
359 | <dep package="pyorbit"/> | ||
360 | <dep package="libgnomecanvas"/> | ||
361 | <dep package="libgnomeui"/> | ||
362 | </dependencies> | ||
363 | </autotools> | ||
364 | <autotools id="gnome-python-desktop"> | ||
365 | <branch/> | ||
366 | <dependencies> | ||
367 | <dep package="gnome-python"/> | ||
368 | <dep package="gnome-panel"/> | ||
369 | <dep package="libgnomeprint"/> | ||
370 | <dep package="libgnomeprintui"/> | ||
371 | <dep package="gtksourceview"/> | ||
372 | <dep package="libwnck"/> | ||
373 | <dep package="totem"/> | ||
374 | <dep package="libgtop"/> | ||
375 | <dep package="nautilus-cd-burner"/> | ||
376 | <dep package="gnome-media"/> | ||
377 | <dep package="metacity"/> | ||
378 | </dependencies> | ||
379 | </autotools> | ||
380 | <autotools id="gnome-python-extras"> | ||
381 | <branch/> | ||
382 | <dependencies> | ||
383 | <dep package="pygtk"/> | ||
384 | <dep package="gnome-python"/> | ||
385 | <dep package="gtkhtml2"/> | ||
386 | <dep package="gdl"/> | ||
387 | </dependencies> | ||
388 | </autotools> | ||
389 | <autotools id="bug-buddy"> | ||
390 | <branch/> | ||
391 | <dependencies> | ||
392 | <dep package="libgnomeui"/> | ||
393 | <dep package="gnome-menus"/> | ||
394 | <dep package="gnome-doc-utils"/> | ||
395 | <dep package="evolution-data-server"/> | ||
396 | <dep package="libsoup"/> | ||
397 | </dependencies> | ||
398 | <suggests> | ||
399 | <dep package="NetworkManager"/> | ||
400 | </suggests> | ||
401 | </autotools> | ||
402 | <autotools id="libwnck"> | ||
403 | <branch/> | ||
404 | <dependencies> | ||
405 | <dep package="gtk+"/> | ||
406 | <dep package="startup-notification"/> | ||
407 | </dependencies> | ||
408 | </autotools> | ||
409 | <autotools id="gnome-desktop" autogenargs="--with-gnome-distributor=JHBuild"> | ||
410 | <branch/> | ||
411 | <dependencies> | ||
412 | <dep package="libgnomeui"/> | ||
413 | <dep package="startup-notification"/> | ||
414 | <dep package="gnome-themes"/> | ||
415 | <dep package="scrollkeeper"/> | ||
416 | <dep package="gnome-doc-utils"/> | ||
417 | </dependencies> | ||
418 | </autotools> | ||
419 | <autotools id="gnome-menus"> | ||
420 | <branch/> | ||
421 | <dependencies> | ||
422 | <dep package="intltool"/> | ||
423 | <dep package="gnome-common"/> | ||
424 | <dep package="glib"/> | ||
425 | <dep package="pygtk"/> | ||
426 | </dependencies> | ||
427 | </autotools> | ||
428 | <autotools id="gnome-panel"> | ||
429 | <branch/> | ||
430 | <dependencies> | ||
431 | <dep package="scrollkeeper"/> | ||
432 | <dep package="libgnomeui"/> | ||
433 | <dep package="gnome-desktop"/> | ||
434 | <dep package="libwnck"/> | ||
435 | <dep package="evolution-data-server"/> | ||
436 | <dep package="gnome-menus"/> | ||
437 | <dep package="gnome-vfs"/> | ||
438 | <dep package="libglade"/> | ||
439 | <dep package="gnome-doc-utils"/> | ||
440 | <dep package="dbus-glib"/> | ||
441 | </dependencies> | ||
442 | </autotools> | ||
443 | <autotools id="gnome-session"> | ||
444 | <branch/> | ||
445 | <dependencies> | ||
446 | <dep package="libgnomeui"/> | ||
447 | <dep package="libwnck"/> | ||
448 | <dep package="esound"/> | ||
449 | <dep package="gnome-control-center"/> | ||
450 | <dep package="gnome-keyring"/> | ||
451 | </dependencies> | ||
452 | </autotools> | ||
453 | <autotools id="gnome-applets" autogenargs="--enable-gstreamer=0.10"> | ||
454 | <branch/> | ||
455 | <dependencies> | ||
456 | <dep package="gnome-panel"/> | ||
457 | <dep package="libgtop"/> | ||
458 | <dep package="gail"/> | ||
459 | <dep package="libxklavier"/> | ||
460 | <dep package="gstreamer"/> | ||
461 | <dep package="gst-plugins-base"/> | ||
462 | <dep package="gucharmap"/> | ||
463 | <dep package="system-tools-backends-1.4"/> | ||
464 | <dep package="pygtk"/> | ||
465 | </dependencies> | ||
466 | </autotools> | ||
467 | <autotools id="gnome-games"> | ||
468 | <branch/> | ||
469 | <dependencies> | ||
470 | <dep package="librsvg"/> | ||
471 | <dep package="scrollkeeper"/> | ||
472 | <dep package="libgnomeui"/> | ||
473 | <dep package="gob"/> | ||
474 | </dependencies> | ||
475 | </autotools> | ||
476 | <autotools id="libcroco" supports-non-srcdir-builds="no"> | ||
477 | <branch/> | ||
478 | <dependencies> | ||
479 | <dep package="libxml2"/> | ||
480 | <dep package="pango"/> | ||
481 | </dependencies> | ||
482 | </autotools> | ||
483 | <autotools id="librsvg" supports-non-srcdir-builds="no"> | ||
484 | <branch/> | ||
485 | <dependencies> | ||
486 | <dep package="libxml2"/> | ||
487 | <dep package="gtk+"/> | ||
488 | <dep package="libart_lgpl"/> | ||
489 | <dep package="gnome-common"/> | ||
490 | <dep package="libgsf"/> | ||
491 | <dep package="libcroco"/> | ||
492 | <dep package="libgnomeprintui"/> | ||
493 | </dependencies> | ||
494 | </autotools> | ||
495 | <autotools id="eel"> | ||
496 | <branch/> | ||
497 | <dependencies> | ||
498 | <dep package="librsvg"/> | ||
499 | <dep package="libgnomeui"/> | ||
500 | <dep package="gail"/> | ||
501 | <dep package="gnome-desktop"/> | ||
502 | <dep package="gnome-menus"/> | ||
503 | </dependencies> | ||
504 | </autotools> | ||
505 | <autotools id="nautilus"> | ||
506 | <branch/> | ||
507 | <dependencies> | ||
508 | <dep package="scrollkeeper"/> | ||
509 | <dep package="esound"/> | ||
510 | <dep package="eel"/> | ||
511 | <dep package="librsvg"/> | ||
512 | <dep package="libgnomeui"/> | ||
513 | <dep package="gnome-desktop"/> | ||
514 | </dependencies> | ||
515 | </autotools> | ||
516 | <autotools id="nautilus-actions"> | ||
517 | <branch/> | ||
518 | <dependencies> | ||
519 | <dep package="nautilus"/> | ||
520 | </dependencies> | ||
521 | </autotools> | ||
522 | <autotools id="nautilus-cd-burner"> | ||
523 | <branch/> | ||
524 | <dependencies> | ||
525 | <dep package="nautilus"/> | ||
526 | </dependencies> | ||
527 | </autotools> | ||
528 | <autotools id="nautilus-open-terminal"> | ||
529 | <branch/> | ||
530 | <dependencies> | ||
531 | <dep package="nautilus"/> | ||
532 | </dependencies> | ||
533 | </autotools> | ||
534 | <autotools id="nautilus-media" supports-non-srcdir-builds="no"> | ||
535 | <branch/> | ||
536 | <dependencies> | ||
537 | <dep package="nautilus"/> | ||
538 | <dep package="gstreamer-0-8"/> | ||
539 | <dep package="gst-plugins-0-8"/> | ||
540 | </dependencies> | ||
541 | </autotools> | ||
542 | <autotools id="nautilus-vcs"> | ||
543 | <branch/> | ||
544 | <dependencies> | ||
545 | <dep package="nautilus"/> | ||
546 | </dependencies> | ||
547 | </autotools> | ||
548 | <autotools id="metacity"> | ||
549 | <branch/> | ||
550 | <dependencies> | ||
551 | <dep package="gtk+"/> | ||
552 | <dep package="gconf"/> | ||
553 | <dep package="intltool"/> | ||
554 | <dep package="libglade"/> | ||
555 | </dependencies> | ||
556 | </autotools> | ||
557 | <autotools id="libgtop"> | ||
558 | <branch/> | ||
559 | <dependencies> | ||
560 | <dep package="glib"/> | ||
561 | </dependencies> | ||
562 | </autotools> | ||
563 | <autotools id="gnome-system-monitor"> | ||
564 | <branch/> | ||
565 | <dependencies> | ||
566 | <dep package="libgnomeui"/> | ||
567 | <dep package="libwnck"/> | ||
568 | <dep package="libgtop"/> | ||
569 | </dependencies> | ||
570 | </autotools> | ||
571 | <autotools id="gnome-control-center" autogenargs="--enable-gstreamer=0.10" | ||
572 | supports-non-srcdir-builds="no"> | ||
573 | <branch/> | ||
574 | <dependencies> | ||
575 | <dep package="libgnomeui"/> | ||
576 | <dep package="esound"/> | ||
577 | <dep package="gnome-desktop"/> | ||
578 | <dep package="metacity"/> | ||
579 | <dep package="nautilus"/> | ||
580 | <dep package="libxklavier"/> | ||
581 | <dep package="gnome-menus"/> | ||
582 | <dep package="gnome-doc-utils"/> | ||
583 | <dep package="gst-plugins-base"/> | ||
584 | </dependencies> | ||
585 | </autotools> | ||
586 | <autotools id="yelp"> | ||
587 | <branch/> | ||
588 | <dependencies> | ||
589 | <dep package="scrollkeeper"/> | ||
590 | <dep package="libgnomeui"/> | ||
591 | <dep package="gnome-vfs"/> | ||
592 | <dep package="gnome-doc-utils"/> | ||
593 | <dep package="startup-notification"/> | ||
594 | <dep package="mozilla"/> | ||
595 | </dependencies> | ||
596 | </autotools> | ||
597 | <autotools id="devhelp"> | ||
598 | <branch/> | ||
599 | <dependencies> | ||
600 | <dep package="libgnomeui"/> | ||
601 | <dep package="gnome-vfs"/> | ||
602 | <dep package="mozilla"/> | ||
603 | </dependencies> | ||
604 | </autotools> | ||
605 | <autotools id="gnome-utils"> | ||
606 | <branch/> | ||
607 | <dependencies> | ||
608 | <dep package="libgnomeui"/> | ||
609 | <dep package="gnome-panel"/> | ||
610 | <dep package="gnome-doc-utils"/> | ||
611 | </dependencies> | ||
612 | </autotools> | ||
613 | <autotools id="gconf-editor" supports-non-srcdir-builds="no"> | ||
614 | <branch/> | ||
615 | <dependencies> | ||
616 | <dep package="libgnomeui"/> | ||
617 | <dep package="gconf"/> | ||
618 | </dependencies> | ||
619 | </autotools> | ||
620 | <tarball id="audiofile" version="0.2.6" supports-non-srcdir-builds="no"> | ||
621 | <source href="http://www.68k.org/~michael/audiofile/audiofile-0.2.6.tar.gz" | ||
622 | size="374688" md5sum="9c1049876cd51c0f1b12c2886cce4d42"/> | ||
623 | </tarball> | ||
624 | <autotools id="esound"> | ||
625 | <branch/> | ||
626 | <dependencies> | ||
627 | <dep package="audiofile"/> | ||
628 | </dependencies> | ||
629 | </autotools> | ||
630 | <autotools id="gnome-media"> | ||
631 | <branch/> | ||
632 | <dependencies> | ||
633 | <dep package="scrollkeeper"/> | ||
634 | <dep package="libgnomeui"/> | ||
635 | <dep package="esound"/> | ||
636 | <dep package="gail"/> | ||
637 | <dep package="gstreamer"/> | ||
638 | <dep package="gst-plugins-base"/> | ||
639 | <dep package="gst-plugins-good"/> | ||
640 | <dep package="nautilus-cd-burner"/> | ||
641 | </dependencies> | ||
642 | </autotools> | ||
643 | <autotools id="gdm2"> | ||
644 | <branch/> | ||
645 | <dependencies> | ||
646 | <dep package="librsvg"/> | ||
647 | <dep package="gnome-doc-utils"/> | ||
648 | </dependencies> | ||
649 | </autotools> | ||
650 | <autotools id="vte"> | ||
651 | <branch/> | ||
652 | <dependencies> | ||
653 | <dep package="gtk+"/> | ||
654 | </dependencies> | ||
655 | </autotools> | ||
656 | <autotools id="gnome-terminal"> | ||
657 | <branch/> | ||
658 | <dependencies> | ||
659 | <dep package="libglade"/> | ||
660 | <dep package="libgnomeui"/> | ||
661 | <dep package="vte"/> | ||
662 | <dep package="startup-notification"/> | ||
663 | </dependencies> | ||
664 | </autotools> | ||
665 | <autotools id="gtk-engines"> | ||
666 | <branch/> | ||
667 | <dependencies> | ||
668 | <dep package="gtk+"/> | ||
669 | </dependencies> | ||
670 | </autotools> | ||
671 | <autotools id="libgnomeprint"> | ||
672 | <branch/> | ||
673 | <dependencies> | ||
674 | <dep package="intltool"/> | ||
675 | <dep package="libart_lgpl"/> | ||
676 | <dep package="glib"/> | ||
677 | <dep package="gnome-common"/> | ||
678 | <dep package="pango"/> | ||
679 | <dep package="libgnomecups"/> | ||
680 | </dependencies> | ||
681 | </autotools> | ||
682 | <autotools id="libgnomeprintui"> | ||
683 | <branch/> | ||
684 | <dependencies> | ||
685 | <dep package="libgnomeprint"/> | ||
686 | <dep package="gtk+"/> | ||
687 | <dep package="libgnomecanvas"/> | ||
688 | <dep package="gnome-icon-theme"/> | ||
689 | </dependencies> | ||
690 | </autotools> | ||
691 | <autotools id="gedit"> | ||
692 | <branch/> | ||
693 | <dependencies> | ||
694 | <dep package="scrollkeeper"/> | ||
695 | <dep package="libgnomeui"/> | ||
696 | <dep package="gnome-doc-utils"/> | ||
697 | <dep package="libgnomeprintui"/> | ||
698 | <dep package="gtksourceview"/> | ||
699 | <dep package="gnome-python-desktop"/> | ||
700 | </dependencies> | ||
701 | </autotools> | ||
702 | <autotools id="gedit-plugins"> | ||
703 | <branch/> | ||
704 | <dependencies> | ||
705 | <dep package="gedit"/> | ||
706 | </dependencies> | ||
707 | </autotools> | ||
708 | <autotools id="memprof"> | ||
709 | <branch/> | ||
710 | <dependencies> | ||
711 | <dep package="libgnomeui"/> | ||
712 | </dependencies> | ||
713 | </autotools> | ||
714 | <autotools id="eog"> | ||
715 | <branch/> | ||
716 | <dependencies> | ||
717 | <dep package="libgnomeui"/> | ||
718 | <dep package="libgnomeprint"/> | ||
719 | </dependencies> | ||
720 | </autotools> | ||
721 | <autotools id="libgsf"> | ||
722 | <branch/> | ||
723 | <dependencies> | ||
724 | <dep package="glib"/> | ||
725 | <dep package="gnome-vfs"/> | ||
726 | <dep package="libbonobo"/> | ||
727 | </dependencies> | ||
728 | </autotools> | ||
729 | <autotools id="goffice"> | ||
730 | <branch/> | ||
731 | <dependencies> | ||
732 | <dep package="glib"/> | ||
733 | <dep package="libgsf"/> | ||
734 | <dep package="libxml2"/> | ||
735 | <dep package="pango"/> | ||
736 | <dep package="libglade"/> | ||
737 | <dep package="libgnomeprint"/> | ||
738 | <dep package="libgnomeprintui"/> | ||
739 | <dep package="libart_lgpl"/> | ||
740 | </dependencies> | ||
741 | </autotools> | ||
742 | <autotools id="gnumeric"> | ||
743 | <branch/> | ||
744 | <dependencies> | ||
745 | <dep package="goffice"/> | ||
746 | <dep package="libgsf"/> | ||
747 | <dep package="pygtk"/> | ||
748 | <dep package="libgnomeprintui"/> | ||
749 | </dependencies> | ||
750 | </autotools> | ||
751 | <autotools id="gimp" autogenargs="--disable-print"> | ||
752 | <branch/> | ||
753 | <dependencies> | ||
754 | <dep package="gtk+"/> | ||
755 | <dep package="libart_lgpl"/> | ||
756 | </dependencies> | ||
757 | </autotools> | ||
758 | <autotools id="glade"> | ||
759 | <branch/> | ||
760 | <dependencies> | ||
761 | <dep package="gtk+"/> | ||
762 | <dep package="libxml2"/> | ||
763 | <dep package="libgnomeui"/> | ||
764 | <dep package="libgnomeprintui"/> | ||
765 | </dependencies> | ||
766 | </autotools> | ||
767 | <autotools id="glade2c"> | ||
768 | <branch/> | ||
769 | <dependencies> | ||
770 | <dep package="gtk+"/> | ||
771 | <dep package="libxml2"/> | ||
772 | <dep package="libgnomeui"/> | ||
773 | </dependencies> | ||
774 | </autotools> | ||
775 | <autotools id="sawfish"> | ||
776 | <branch revision="gnome-2"/> | ||
777 | <dependencies> | ||
778 | <dep package="rep-gtk"/> | ||
779 | </dependencies> | ||
780 | </autotools> | ||
781 | <autotools id="rep-gtk"> | ||
782 | <branch/> | ||
783 | <dependencies> | ||
784 | <dep package="librep"/> | ||
785 | <dep package="gtk+"/> | ||
786 | </dependencies> | ||
787 | </autotools> | ||
788 | <autotools id="librep"> | ||
789 | <branch/> | ||
790 | </autotools> | ||
791 | <autotools id="rhythmbox"> | ||
792 | <branch/> | ||
793 | <dependencies> | ||
794 | <dep package="libgnomeui"/> | ||
795 | <dep package="gst-plugins-base"/> | ||
796 | <dep package="nautilus-cd-burner"/> | ||
797 | <dep package="totem"/> | ||
798 | <dep package="gnome-doc-utils"/> | ||
799 | </dependencies> | ||
800 | </autotools> | ||
801 | <autotools id="gstreamer-0-8" autogenargs="-- --disable-plugin-builddir --disable-tests" supports-non-srcdir-builds="no"> | ||
802 | <branch repo="gstreamer.freedesktop.org" module="gstreamer" | ||
803 | revision="BRANCH-GSTREAMER-0_8" checkoutdir="gstreamer-0-8"/> | ||
804 | <dependencies> | ||
805 | <dep package="glib"/> | ||
806 | <dep package="libxml2"/> | ||
807 | </dependencies> | ||
808 | </autotools> | ||
809 | |||
810 | <autotools id="gst-plugins-0-8" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
811 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins" | ||
812 | revision="BRANCH-GSTREAMER-0_8" checkoutdir="gst-plugins-0-8"/> | ||
813 | <dependencies> | ||
814 | <dep package="gstreamer-0-8"/> | ||
815 | <dep package="gnome-vfs"/> | ||
816 | <dep package="gtk+"/> | ||
817 | </dependencies> | ||
818 | </autotools> | ||
819 | |||
820 | <autotools id="gst-python-0-8" autogenargs="--" supports-non-srcdir-builds="no"> | ||
821 | <branch repo="gstreamer.freedesktop.org" module="gst-python" | ||
822 | revision="BRANCH-GSTREAMER-0_8" checkoutdir="gst-python-0-8"/> | ||
823 | <dependencies> | ||
824 | <dep package="gstreamer-0-8"/> | ||
825 | <dep package="gst-plugins-0-8"/> | ||
826 | </dependencies> | ||
827 | </autotools> | ||
828 | |||
829 | <autotools id="gstreamer" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
830 | <branch repo="gstreamer.freedesktop.org" module="gstreamer"/> | ||
831 | <dependencies> | ||
832 | <dep package="glib"/> | ||
833 | <dep package="libxml2"/> | ||
834 | </dependencies> | ||
835 | </autotools> | ||
836 | |||
837 | <autotools id="liboil"> | ||
838 | <branch repo="liboil.freedesktop.org" revision="liboil_0_3_6"/> | ||
839 | </autotools> | ||
840 | |||
841 | <autotools id="gst-plugins-base" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
842 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-base"/> | ||
843 | <dependencies> | ||
844 | <dep package="gstreamer"/> | ||
845 | <dep package="gnome-vfs"/> | ||
846 | <dep package="gtk+"/> | ||
847 | <dep package="liboil"/> | ||
848 | </dependencies> | ||
849 | </autotools> | ||
850 | |||
851 | <autotools id="gst-plugins-good" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
852 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-good"/> | ||
853 | <dependencies> | ||
854 | <dep package="gstreamer"/> | ||
855 | <dep package="gst-plugins-base"/> | ||
856 | </dependencies> | ||
857 | </autotools> | ||
858 | |||
859 | <autotools id="gst-plugins-ugly" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
860 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-ugly"/> | ||
861 | <dependencies> | ||
862 | <dep package="gstreamer"/> | ||
863 | <dep package="gst-plugins-base"/> | ||
864 | </dependencies> | ||
865 | </autotools> | ||
866 | |||
867 | <autotools id="gst-plugins-bad" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
868 | <branch repo="gstreamer.freedesktop.org" module="gst-plugins-bad"/> | ||
869 | <dependencies> | ||
870 | <dep package="gstreamer"/> | ||
871 | <dep package="gst-plugins-base"/> | ||
872 | </dependencies> | ||
873 | </autotools> | ||
874 | |||
875 | <autotools id="gst-ffmpeg" autogenargs="-- --disable-tests" supports-non-srcdir-builds="no"> | ||
876 | <branch repo="gstreamer.freedesktop.org" module="gst-ffmpeg"/> | ||
877 | <dependencies> | ||
878 | <dep package="gstreamer"/> | ||
879 | <dep package="gst-plugins-base"/> | ||
880 | </dependencies> | ||
881 | </autotools> | ||
882 | |||
883 | <autotools id="gst-python" autogenargs="--" supports-non-srcdir-builds="no"> | ||
884 | <branch repo="gstreamer.freedesktop.org" module="gst-python"/> | ||
885 | <dependencies> | ||
886 | <dep package="gstreamer"/> | ||
887 | <dep package="gst-plugins-base"/> | ||
888 | </dependencies> | ||
889 | </autotools> | ||
890 | |||
891 | <autotools id="planner"> | ||
892 | <branch/> | ||
893 | <dependencies> | ||
894 | <dep package="glib"/> | ||
895 | <dep package="libxml2"/> | ||
896 | <dep package="libgnomeui"/> | ||
897 | <dep package="libgnomeprintui"/> | ||
898 | <dep package="libgsf"/> | ||
899 | </dependencies> | ||
900 | </autotools> | ||
901 | <autotools id="file-roller"> | ||
902 | <branch/> | ||
903 | <dependencies> | ||
904 | <dep package="scrollkeeper"/> | ||
905 | <dep package="gnome-doc-utils"/> | ||
906 | <dep package="nautilus"/> | ||
907 | </dependencies> | ||
908 | </autotools> | ||
909 | <autotools id="balsa"> | ||
910 | <branch revision="BALSA_2"/> | ||
911 | <dependencies> | ||
912 | <dep package="libgnomeui"/> | ||
913 | </dependencies> | ||
914 | </autotools> | ||
915 | <autotools id="pan"> | ||
916 | <branch/> | ||
917 | <dependencies> | ||
918 | <dep package="libgnomeui"/> | ||
919 | <dep package="gnet"/> | ||
920 | </dependencies> | ||
921 | </autotools> | ||
922 | <distutils id="pyspi"> | ||
923 | <branch/> | ||
924 | <dependencies> | ||
925 | <dep package="at-spi"/> | ||
926 | </dependencies> | ||
927 | </distutils> | ||
928 | <distutils id="dogtail"> | ||
929 | <branch/> | ||
930 | <dependencies> | ||
931 | <dep package="pyspi"/> | ||
932 | </dependencies> | ||
933 | <after> | ||
934 | <dep package="gnome-python-desktop"/> | ||
935 | </after> | ||
936 | </distutils> | ||
937 | <autotools id="gcalctool" supports-non-srcdir-builds="no"> | ||
938 | <branch/> | ||
939 | <dependencies> | ||
940 | <dep package="scrollkeeper"/> | ||
941 | <dep package="libgnomeui"/> | ||
942 | <dep package="gnome-doc-utils"/> | ||
943 | </dependencies> | ||
944 | </autotools> | ||
945 | <autotools id="ggv" supports-non-srcdir-builds="no"> | ||
946 | <branch/> | ||
947 | <dependencies> | ||
948 | <dep package="scrollkeeper"/> | ||
949 | <dep package="libgnomeui"/> | ||
950 | </dependencies> | ||
951 | </autotools> | ||
952 | <autotools id="ekiga" autogenargs="--with-pwlib-dir=`ptlib-config --prefix` --with-opal-dir=`ptlib-config --prefix`"> | ||
953 | <branch revision="gnome-2-14"/> | ||
954 | <dependencies> | ||
955 | <dep package="libgnomeui"/> | ||
956 | <dep package="evolution-data-server"/> | ||
957 | <dep package="opal" /> | ||
958 | </dependencies> | ||
959 | </autotools> | ||
960 | <autotools id="pwlib" autogen-sh="configure"> | ||
961 | <branch repo="openh323.sf.net" module="ptlib_unix" checkoutdir="pwlib" | ||
962 | override-checkoutdir="no" update-new-dirs="no" /> | ||
963 | </autotools> | ||
964 | <autotools id="opal" autogen-sh="configure"> | ||
965 | <branch repo="openh323.sf.net"/> | ||
966 | <dependencies> | ||
967 | <dep package="pwlib"/> | ||
968 | </dependencies> | ||
969 | </autotools> | ||
970 | <autotools id="gucharmap"> | ||
971 | <branch/> | ||
972 | <dependencies> | ||
973 | <dep package="libgnomeui"/> | ||
974 | <dep package="gnome-doc-utils"/> | ||
975 | </dependencies> | ||
976 | </autotools> | ||
977 | <autotools id="gtksourceview" autogenargs="--enable-compile-warnings=maximum"> | ||
978 | <branch/> | ||
979 | <dependencies> | ||
980 | <dep package="gtk+"/> | ||
981 | <dep package="libxml2"/> | ||
982 | <dep package="libgnomeprint"/> | ||
983 | <dep package="gnome-vfs"/> | ||
984 | </dependencies> | ||
985 | </autotools> | ||
986 | <autotools id="glimmer"> | ||
987 | <branch/> | ||
988 | <dependencies> | ||
989 | <dep package="gtksourceview"/> | ||
990 | <dep package="libgnomeprint"/> | ||
991 | </dependencies> | ||
992 | </autotools> | ||
993 | <autotools id="gdl"> | ||
994 | <branch/> | ||
995 | <dependencies> | ||
996 | <dep package="libgnomeui"/> | ||
997 | <dep package="librsvg"/> | ||
998 | </dependencies> | ||
999 | </autotools> | ||
1000 | <autotools id="gnome-build"> | ||
1001 | <branch/> | ||
1002 | <dependencies> | ||
1003 | <dep package="gdl"/> | ||
1004 | <dep package="gnome-vfs"/> | ||
1005 | <dep package="gtkhtml2"/> | ||
1006 | </dependencies> | ||
1007 | </autotools> | ||
1008 | <autotools id="scaffold"> | ||
1009 | <branch/> | ||
1010 | <dependencies> | ||
1011 | <dep package="libgnomeui"/> | ||
1012 | <dep package="vte"/> | ||
1013 | <dep package="gdl"/> | ||
1014 | </dependencies> | ||
1015 | </autotools> | ||
1016 | <autotools id="libsigc++2"> | ||
1017 | <branch revision="libsigc-2-0"/> | ||
1018 | </autotools> | ||
1019 | <autotools id="glibmm"> | ||
1020 | <branch/> | ||
1021 | <dependencies> | ||
1022 | <dep package="glib"/> | ||
1023 | <dep package="libsigc++2"/> | ||
1024 | </dependencies> | ||
1025 | </autotools> | ||
1026 | <autotools id="gtkmm"> | ||
1027 | <branch/> | ||
1028 | <dependencies> | ||
1029 | <dep package="glibmm"/> | ||
1030 | <dep package="cairomm"/> | ||
1031 | <dep package="gtk+"/> | ||
1032 | </dependencies> | ||
1033 | </autotools> | ||
1034 | <autotools id="orbitcpp"> | ||
1035 | <branch/> | ||
1036 | <dependencies> | ||
1037 | <dep package="ORBit2"/> | ||
1038 | </dependencies> | ||
1039 | </autotools> | ||
1040 | <autotools id="gnomemm/libgnomemm"> | ||
1041 | <branch/> | ||
1042 | <dependencies> | ||
1043 | <dep package="libgnome"/> | ||
1044 | <dep package="gtkmm"/> | ||
1045 | </dependencies> | ||
1046 | </autotools> | ||
1047 | <autotools id="gnomemm/libglademm"> | ||
1048 | <branch/> | ||
1049 | <dependencies> | ||
1050 | <dep package="libglade"/> | ||
1051 | <dep package="gtkmm"/> | ||
1052 | </dependencies> | ||
1053 | </autotools> | ||
1054 | <autotools id="gnomemm/libbonobomm"> | ||
1055 | <branch/> | ||
1056 | <dependencies> | ||
1057 | <dep package="libbonobo"/> | ||
1058 | <dep package="gtkmm"/> | ||
1059 | <dep package="orbitcpp"/> | ||
1060 | </dependencies> | ||
1061 | </autotools> | ||
1062 | <autotools id="gnomemm/libbonobouimm"> | ||
1063 | <branch/> | ||
1064 | <dependencies> | ||
1065 | <dep package="libbonoboui"/> | ||
1066 | <dep package="gnomemm/libbonobomm"/> | ||
1067 | </dependencies> | ||
1068 | </autotools> | ||
1069 | <autotools id="gnomemm/libgnomecanvasmm"> | ||
1070 | <branch/> | ||
1071 | <dependencies> | ||
1072 | <dep package="libgnomecanvas"/> | ||
1073 | <dep package="gtkmm"/> | ||
1074 | </dependencies> | ||
1075 | </autotools> | ||
1076 | <autotools id="gnomemm/gconfmm"> | ||
1077 | <branch/> | ||
1078 | <dependencies> | ||
1079 | <dep package="gconf"/> | ||
1080 | <dep package="gtkmm"/> | ||
1081 | </dependencies> | ||
1082 | </autotools> | ||
1083 | <autotools id="gnomemm/libgnomeuimm"> | ||
1084 | <branch/> | ||
1085 | <dependencies> | ||
1086 | <dep package="gtkmm"/> | ||
1087 | <dep package="libgnomeui"/> | ||
1088 | <dep package="gnomemm/libgnomemm"/> | ||
1089 | <dep package="gnomemm/gconfmm"/> | ||
1090 | <dep package="gnomemm/libgnomecanvasmm"/> | ||
1091 | <dep package="gnomemm/libglademm"/> | ||
1092 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1093 | </dependencies> | ||
1094 | </autotools> | ||
1095 | <autotools id="gnomemm/gnome-vfsmm"> | ||
1096 | <branch/> | ||
1097 | <dependencies> | ||
1098 | <dep package="glibmm"/> | ||
1099 | <dep package="gnome-vfs"/> | ||
1100 | </dependencies> | ||
1101 | </autotools> | ||
1102 | <autotools id="gnomemm/libpanelappletmm"> | ||
1103 | <branch/> | ||
1104 | <dependencies> | ||
1105 | <dep package="gtkmm"/> | ||
1106 | </dependencies> | ||
1107 | </autotools> | ||
1108 | <autotools id="gnomemm/libgnomeprintmm"> | ||
1109 | <branch/> | ||
1110 | <dependencies> | ||
1111 | <dep package="gtkmm"/> | ||
1112 | <dep package="libgnomeprint"/> | ||
1113 | </dependencies> | ||
1114 | </autotools> | ||
1115 | <autotools id="gnomemm/libgnomeprintuimm"> | ||
1116 | <branch/> | ||
1117 | <dependencies> | ||
1118 | <dep package="gtkmm"/> | ||
1119 | <dep package="gnomemm/libgnomeprintmm"/> | ||
1120 | <dep package="libgnomeprintui"/> | ||
1121 | </dependencies> | ||
1122 | </autotools> | ||
1123 | <autotools id="gnomemm/libgdamm"> | ||
1124 | <branch revision="libgda-1-2"/> | ||
1125 | <dependencies> | ||
1126 | <dep package="gtkmm"/> | ||
1127 | <dep package="libgda-1-2"/> | ||
1128 | </dependencies> | ||
1129 | </autotools> | ||
1130 | <autotools id="gnomemm/gtkmm_hello"> | ||
1131 | <branch/> | ||
1132 | <dependencies> | ||
1133 | <dep package="gtkmm"/> | ||
1134 | </dependencies> | ||
1135 | </autotools> | ||
1136 | <autotools id="regexxer"> | ||
1137 | <branch/> | ||
1138 | <dependencies> | ||
1139 | <dep package="intltool"/> | ||
1140 | <dep package="gtkmm"/> | ||
1141 | <dep package="gnomemm/gconfmm"/> | ||
1142 | <dep package="gnomemm/libglademm"/> | ||
1143 | </dependencies> | ||
1144 | </autotools> | ||
1145 | <autotools id="gnet" autogenargs="--enable-glib2"> | ||
1146 | <branch revision="GNET_1_1"/> | ||
1147 | <dependencies> | ||
1148 | <dep package="glib"/> | ||
1149 | </dependencies> | ||
1150 | </autotools> | ||
1151 | <autotools id="gnomeicu"> | ||
1152 | <branch/> | ||
1153 | <dependencies> | ||
1154 | <dep package="libgnomeui"/> | ||
1155 | </dependencies> | ||
1156 | </autotools> | ||
1157 | <autotools id="at-spi"> | ||
1158 | <branch/> | ||
1159 | <dependencies> | ||
1160 | <dep package="libbonobo"/> | ||
1161 | <dep package="gail"/> | ||
1162 | </dependencies> | ||
1163 | </autotools> | ||
1164 | <autotools id="libgail-gnome"> | ||
1165 | <branch/> | ||
1166 | <dependencies> | ||
1167 | <dep package="at-spi"/> | ||
1168 | <dep package="libgnomeui"/> | ||
1169 | <dep package="gnome-panel"/> | ||
1170 | </dependencies> | ||
1171 | </autotools> | ||
1172 | <autotools id="at-poke"> | ||
1173 | <branch/> | ||
1174 | <dependencies> | ||
1175 | <dep package="libgail-gnome"/> | ||
1176 | </dependencies> | ||
1177 | </autotools> | ||
1178 | <autotools id="gnome-mag"> | ||
1179 | <branch/> | ||
1180 | <dependencies> | ||
1181 | <dep package="at-spi"/> | ||
1182 | </dependencies> | ||
1183 | </autotools> | ||
1184 | <autotools id="gok"> | ||
1185 | <branch/> | ||
1186 | <dependencies> | ||
1187 | <dep package="at-spi"/> | ||
1188 | <dep package="libgnomeui"/> | ||
1189 | <dep package="libwnck"/> | ||
1190 | <dep package="esound"/> | ||
1191 | <dep package="scrollkeeper"/> | ||
1192 | <dep package="gnome-speech"/> | ||
1193 | </dependencies> | ||
1194 | </autotools> | ||
1195 | <autotools id="gnome-speech"> | ||
1196 | <branch/> | ||
1197 | <dependencies> | ||
1198 | <dep package="libbonobo"/> | ||
1199 | </dependencies> | ||
1200 | </autotools> | ||
1201 | <autotools id="gnopernicus"> | ||
1202 | <branch/> | ||
1203 | <dependencies> | ||
1204 | <dep package="gconf"/> | ||
1205 | <dep package="libgnomeui"/> | ||
1206 | <dep package="gnome-speech"/> | ||
1207 | <dep package="gnome-mag"/> | ||
1208 | </dependencies> | ||
1209 | </autotools> | ||
1210 | <autotools id="orca"> | ||
1211 | <branch/> | ||
1212 | <dependencies> | ||
1213 | <dep package="gnome-python"/> | ||
1214 | <dep package="libgail-gnome"/> | ||
1215 | <dep package="gnome-mag"/> | ||
1216 | <dep package="gnome-speech"/> | ||
1217 | <dep package="eel"/> | ||
1218 | </dependencies> | ||
1219 | </autotools> | ||
1220 | <autotools id="dasher" autogenargs="--with-a11y --with-gnome"> | ||
1221 | <branch/> | ||
1222 | <dependencies> | ||
1223 | <dep package="at-spi"/> | ||
1224 | <dep package="libgnomeui"/> | ||
1225 | <dep package="gnome-speech"/> | ||
1226 | <dep package="gnome-vfs"/> | ||
1227 | <dep package="gnome-doc-utils"/> | ||
1228 | </dependencies> | ||
1229 | </autotools> | ||
1230 | <autotools id="gnome-screensaver"> | ||
1231 | <branch/> | ||
1232 | <dependencies> | ||
1233 | <dep package="gconf"/> | ||
1234 | <dep package="gtk+"/> | ||
1235 | <dep package="dbus"/> | ||
1236 | <dep package="gnome-menus"/> | ||
1237 | <dep package="libgnomeui"/> | ||
1238 | </dependencies> | ||
1239 | </autotools> | ||
1240 | <autotools id="gnome-power-manager"> | ||
1241 | <branch/> | ||
1242 | <dependencies> | ||
1243 | <dep package="libgnomeui"/> | ||
1244 | <dep package="hal"/> | ||
1245 | <dep package="libwnck"/> | ||
1246 | <dep package="gtk+"/> | ||
1247 | <dep package="gconf"/> | ||
1248 | <dep package="intltool"/> | ||
1249 | <dep package="libglade"/> | ||
1250 | <dep package="gnome-doc-utils"/> | ||
1251 | </dependencies> | ||
1252 | <suggests> | ||
1253 | <dep package="libnotify"/> | ||
1254 | </suggests> | ||
1255 | </autotools> | ||
1256 | <autotools id="gthumb"> | ||
1257 | <branch/> | ||
1258 | <dependencies> | ||
1259 | <dep package="libgnomeui"/> | ||
1260 | <dep package="gnome-vfs"/> | ||
1261 | <dep package="libglade"/> | ||
1262 | <dep package="libbonoboui"/> | ||
1263 | <dep package="libgnomeprintui"/> | ||
1264 | </dependencies> | ||
1265 | </autotools> | ||
1266 | <autotools id="fast-user-switch-applet"> | ||
1267 | <branch/> | ||
1268 | <dependencies> | ||
1269 | <dep package="gtk+"/> | ||
1270 | <dep package="gconf"/> | ||
1271 | <dep package="libglade"/> | ||
1272 | <dep package="gnome-panel"/> | ||
1273 | </dependencies> | ||
1274 | </autotools> | ||
1275 | <autotools id="gnome-mount" autogenargs="--enable-nautilus-extension"> | ||
1276 | <branch/> | ||
1277 | <dependencies> | ||
1278 | <dep package="gnome-keyring"/> | ||
1279 | <dep package="libgnomeui"/> | ||
1280 | <dep package="dbus"/> | ||
1281 | <dep package="hal"/> | ||
1282 | <dep package="gtk+"/> | ||
1283 | <dep package="intltool"/> | ||
1284 | <dep package="libglade"/> | ||
1285 | <dep package="eel"/> | ||
1286 | <dep package="nautilus"/> | ||
1287 | </dependencies> | ||
1288 | </autotools> | ||
1289 | <autotools id="libnotify"> | ||
1290 | <branch repo="svn.galago-project.org" module="trunk/libnotify"/> | ||
1291 | <dependencies> | ||
1292 | <dep package="gtk+"/> | ||
1293 | <dep package="dbus"/> | ||
1294 | </dependencies> | ||
1295 | </autotools> | ||
1296 | <autotools id="libsexy"> | ||
1297 | <branch repo="osiris.chipx86.com" module="trunk/libsexy"/> | ||
1298 | <dependencies> | ||
1299 | <dep package="gtk+"/> | ||
1300 | <dep package="libxml2"/> | ||
1301 | <dep package="iso-codes"/> | ||
1302 | </dependencies> | ||
1303 | </autotools> | ||
1304 | <autotools id="notification-daemon"> | ||
1305 | <branch repo="svn.galago-project.org" module="trunk/notification-daemon"/> | ||
1306 | <dependencies> | ||
1307 | <dep package="gtk+"/> | ||
1308 | <dep package="dbus"/> | ||
1309 | <dep package="libsexy"/> | ||
1310 | </dependencies> | ||
1311 | </autotools> | ||
1312 | <autotools id="alacarte"> | ||
1313 | <branch/> | ||
1314 | <dependencies> | ||
1315 | <dep package="gnome-menus"/> | ||
1316 | <dep package="pygtk"/> | ||
1317 | </dependencies> | ||
1318 | </autotools> | ||
1319 | |||
1320 | <metamodule id="meta-gnome-devel-platform"> | ||
1321 | <dependencies> | ||
1322 | <dep package="libgnome"/> | ||
1323 | <dep package="libbonobo"/> | ||
1324 | <dep package="libbonoboui"/> | ||
1325 | <dep package="libgnomeui"/> | ||
1326 | </dependencies> | ||
1327 | </metamodule> | ||
1328 | <metamodule id="meta-gnome-core"> | ||
1329 | <dependencies> | ||
1330 | <dep package="gnome-desktop"/> | ||
1331 | <dep package="gnome-panel"/> | ||
1332 | <dep package="gnome-session"/> | ||
1333 | <dep package="gnome-terminal"/> | ||
1334 | <dep package="gnome-applets"/> | ||
1335 | </dependencies> | ||
1336 | </metamodule> | ||
1337 | <metamodule id="meta-nautilus"> | ||
1338 | <dependencies> | ||
1339 | <dep package="nautilus"/> | ||
1340 | </dependencies> | ||
1341 | </metamodule> | ||
1342 | <metamodule id="meta-gnome-desktop"> | ||
1343 | <dependencies> | ||
1344 | <dep package="meta-gnome-core"/> | ||
1345 | <dep package="gnome-control-center"/> | ||
1346 | <dep package="meta-nautilus"/> | ||
1347 | <dep package="yelp"/> | ||
1348 | <dep package="bug-buddy"/> | ||
1349 | <dep package="gedit"/> | ||
1350 | <dep package="gtk-engines"/> | ||
1351 | <dep package="eog"/> | ||
1352 | <dep package="metacity"/> | ||
1353 | <dep package="gconf-editor"/> | ||
1354 | <dep package="gnome-utils"/> | ||
1355 | <dep package="gnome-system-monitor"/> | ||
1356 | <dep package="gstreamer"/> | ||
1357 | <dep package="gnome-media"/> | ||
1358 | <dep package="gnome-netstatus"/> | ||
1359 | <dep package="gcalctool"/> | ||
1360 | <dep package="gucharmap"/> | ||
1361 | <dep package="nautilus-cd-burner"/> | ||
1362 | <dep package="zenity"/> | ||
1363 | <dep package="libgail-gnome"/> | ||
1364 | <dep package="gnopernicus"/> | ||
1365 | <dep package="gok"/> | ||
1366 | <dep package="epiphany"/> | ||
1367 | <dep package="gnome-games"/> | ||
1368 | <dep package="gnome-user-docs"/> | ||
1369 | <dep package="file-roller"/> | ||
1370 | <dep package="gnome-system-tools"/> | ||
1371 | <dep package="gnome-nettool"/> | ||
1372 | <dep package="vino"/> | ||
1373 | <dep package="gnome-volume-manager"/> | ||
1374 | <dep package="totem"/> | ||
1375 | <dep package="gnome-menus"/> | ||
1376 | <dep package="gnome-backgrounds"/> | ||
1377 | <dep package="sound-juicer"/> | ||
1378 | <dep package="evolution"/> | ||
1379 | <dep package="evolution-webcal"/> | ||
1380 | <dep package="evolution-exchange"/> | ||
1381 | <dep package="ekiga"/> | ||
1382 | <dep package="evince"/> | ||
1383 | <dep package="dasher"/> | ||
1384 | <dep package="gnome-keyring-manager"/> | ||
1385 | <dep package="deskbar-applet"/> | ||
1386 | <dep package="fast-user-switch-applet"/> | ||
1387 | <dep package="gnome-screensaver"/> | ||
1388 | <dep package="meta-gnome-admin"/> | ||
1389 | </dependencies> | ||
1390 | </metamodule> | ||
1391 | <metamodule id="meta-gnome-admin"> | ||
1392 | <dependencies> | ||
1393 | <dep package="pessulus"/> | ||
1394 | <dep package="sabayon"/> | ||
1395 | </dependencies> | ||
1396 | </metamodule> | ||
1397 | <metamodule id="meta-gnome-devel-tools"> | ||
1398 | <dependencies> | ||
1399 | <dep package="glade"/> | ||
1400 | <dep package="memprof"/> | ||
1401 | <dep package="gconf-editor"/> | ||
1402 | <dep package="devhelp"/> | ||
1403 | <dep package="nautilus-vcs"/> | ||
1404 | </dependencies> | ||
1405 | </metamodule> | ||
1406 | <metamodule id="meta-gnome-python"> | ||
1407 | <dependencies> | ||
1408 | <dep package="pygtk"/> | ||
1409 | <dep package="gnome-python"/> | ||
1410 | <dep package="gnome-python-desktop"/> | ||
1411 | </dependencies> | ||
1412 | <after> | ||
1413 | <dep package="gnome-python-extras"/> | ||
1414 | </after> | ||
1415 | </metamodule> | ||
1416 | <metamodule id="meta-gnome-c++"> | ||
1417 | <dependencies> | ||
1418 | <dep package="gtkmm"/> | ||
1419 | <dep package="gnomemm/libgnomeuimm"/> | ||
1420 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1421 | <dep package="gnomemm/libpanelappletmm"/> | ||
1422 | <dep package="gnomemm/libbonobouimm"/> | ||
1423 | <dep package="gnomemm/libgnomeprintuimm"/> | ||
1424 | <dep package="libxml++"/> | ||
1425 | <dep package="gnomemm/libgdamm"/> | ||
1426 | <dep package="bakery"/> | ||
1427 | </dependencies> | ||
1428 | </metamodule> | ||
1429 | <metamodule id="meta-gnome-accessibility"> | ||
1430 | <dependencies> | ||
1431 | <dep package="libgail-gnome"/> | ||
1432 | <dep package="at-poke"/> | ||
1433 | <dep package="dasher"/> | ||
1434 | <dep package="gnome-mag"/> | ||
1435 | <dep package="gok"/> | ||
1436 | <dep package="gnome-speech"/> | ||
1437 | <dep package="gnopernicus"/> | ||
1438 | </dependencies> | ||
1439 | </metamodule> | ||
1440 | <metamodule id="meta-gnome-proposed"> | ||
1441 | <dependencies> | ||
1442 | <dep package="alacarte"/> | ||
1443 | <dep package="gnome-power-manager"/> | ||
1444 | <dep package="orca"/> | ||
1445 | </dependencies> | ||
1446 | </metamodule> | ||
1447 | <autotools id="sodipodi"> | ||
1448 | <branch/> | ||
1449 | <dependencies> | ||
1450 | <dep package="gtk+"/> | ||
1451 | <dep package="libgnomeprintui"/> | ||
1452 | <dep package="libart_lgpl"/> | ||
1453 | <dep package="libxml2"/> | ||
1454 | </dependencies> | ||
1455 | </autotools> | ||
1456 | <autotools id="gnome-themes"> | ||
1457 | <branch/> | ||
1458 | <dependencies> | ||
1459 | <dep package="gtk-engines"/> | ||
1460 | </dependencies> | ||
1461 | </autotools> | ||
1462 | <autotools id="gob"> | ||
1463 | <branch/> | ||
1464 | <dependencies> | ||
1465 | <dep package="glib"/> | ||
1466 | </dependencies> | ||
1467 | </autotools> | ||
1468 | <autotools id="libgnetwork"> | ||
1469 | <branch/> | ||
1470 | <dependencies> | ||
1471 | <dep package="glib"/> | ||
1472 | <dep package="gconf"/> | ||
1473 | <dep package="intltool"/> | ||
1474 | </dependencies> | ||
1475 | </autotools> | ||
1476 | <autotools id="libgircclient"> | ||
1477 | <branch/> | ||
1478 | <dependencies> | ||
1479 | <dep package="libgnetwork"/> | ||
1480 | </dependencies> | ||
1481 | </autotools> | ||
1482 | <autotools id="gnomechat"> | ||
1483 | <branch/> | ||
1484 | <dependencies> | ||
1485 | <dep package="libgnetwork"/> | ||
1486 | <dep package="libgircclient"/> | ||
1487 | <dep package="libgnomeui"/> | ||
1488 | </dependencies> | ||
1489 | </autotools> | ||
1490 | <mozillamodule id="mozilla" autogenargs="--enable-default-toolkit=gtk2 --disable-mailnews --disable-ldap --disable-debug --enable-optimize --disable-tests --enable-crypto --enable-xft --with-system-zlib --disable-freetype2 --enable-application=browser" cvsroot="mozilla.org" revision="MOZILLA_1_7_BRANCH"> | ||
1491 | <dependencies> | ||
1492 | <dep package="gtk+"/> | ||
1493 | </dependencies> | ||
1494 | </mozillamodule> | ||
1495 | <autotools id="enchant"> | ||
1496 | <branch repo="anoncvs.abisource.com"/> | ||
1497 | <dependencies> | ||
1498 | <dep package="glib"/> | ||
1499 | </dependencies> | ||
1500 | </autotools> | ||
1501 | <autotools id="epiphany"> | ||
1502 | <branch/> | ||
1503 | <dependencies> | ||
1504 | <dep package="iso-codes"/> | ||
1505 | <dep package="libgnomeui"/> | ||
1506 | <dep package="pygtk"/> | ||
1507 | <dep package="gnome-python"/> | ||
1508 | <dep package="gnome-doc-utils"/> | ||
1509 | </dependencies> | ||
1510 | <suggests> | ||
1511 | <dep package="enchant"/> | ||
1512 | </suggests> | ||
1513 | </autotools> | ||
1514 | <autotools id="epiphany-extensions"> | ||
1515 | <branch/> | ||
1516 | <dependencies> | ||
1517 | <dep package="epiphany"/> | ||
1518 | </dependencies> | ||
1519 | </autotools> | ||
1520 | <autotools id="galeon"> | ||
1521 | <branch/> | ||
1522 | <dependencies> | ||
1523 | <dep package="mozilla"/> | ||
1524 | <dep package="libgnomeui"/> | ||
1525 | </dependencies> | ||
1526 | </autotools> | ||
1527 | <autotools id="libsoup"> | ||
1528 | <branch/> | ||
1529 | <dependencies> | ||
1530 | <dep package="glib"/> | ||
1531 | <dep package="gnutls"/> | ||
1532 | <dep package="libxml2"/> | ||
1533 | </dependencies> | ||
1534 | </autotools> | ||
1535 | <autotools id="gtkhtml"> | ||
1536 | <branch/> | ||
1537 | <dependencies> | ||
1538 | <dep package="gtk+"/> | ||
1539 | <dep package="libgnomeui"/> | ||
1540 | <dep package="libbonoboui"/> | ||
1541 | <dep package="libglade"/> | ||
1542 | <dep package="gail"/> | ||
1543 | <dep package="libgnomeprint"/> | ||
1544 | <dep package="libgnomeprintui"/> | ||
1545 | <dep package="libsoup"/> | ||
1546 | </dependencies> | ||
1547 | </autotools> | ||
1548 | <autotools id="evolution-data-server" supports-non-srcdir-builds="no"> | ||
1549 | <branch/> | ||
1550 | <dependencies> | ||
1551 | <dep package="libbonobo"/> | ||
1552 | <dep package="libgnome"/> | ||
1553 | <dep package="libgnomeui"/> | ||
1554 | <dep package="libsoup"/> | ||
1555 | <dep package="libxml2"/> | ||
1556 | <dep package="gconf"/> | ||
1557 | <dep package="gnome-vfs"/> | ||
1558 | <dep package="mozilla"/> | ||
1559 | </dependencies> | ||
1560 | </autotools> | ||
1561 | <autotools id="evolution"> | ||
1562 | <branch/> | ||
1563 | <dependencies> | ||
1564 | <dep package="evolution-data-server"/> | ||
1565 | <dep package="gtkhtml"/> | ||
1566 | <dep package="libgnomeui"/> | ||
1567 | <dep package="libbonoboui"/> | ||
1568 | </dependencies> | ||
1569 | <after> | ||
1570 | <dep package="libnotify"/> | ||
1571 | </after> | ||
1572 | </autotools> | ||
1573 | <autotools id="evolution-webcal"> | ||
1574 | <branch/> | ||
1575 | <dependencies> | ||
1576 | <dep package="evolution-data-server"/> | ||
1577 | <dep package="libsoup"/> | ||
1578 | <dep package="libgnomeui"/> | ||
1579 | </dependencies> | ||
1580 | </autotools> | ||
1581 | <autotools id="evolution-exchange"> | ||
1582 | <branch/> | ||
1583 | <dependencies> | ||
1584 | <dep package="evolution-data-server"/> | ||
1585 | <dep package="evolution"/> | ||
1586 | <dep package="libsoup"/> | ||
1587 | </dependencies> | ||
1588 | </autotools> | ||
1589 | <tarball id="xchat" version="2.6.2"> | ||
1590 | <source href="http://xchat.org/files/source/2.6/xchat-2.6.2.tar.bz2" | ||
1591 | size="1046910" md5sum="6b534baf9a4df6bf23d7d16f7e4eb379"/> | ||
1592 | <dependencies> | ||
1593 | <dep package="gtk+"/> | ||
1594 | <dep package="libxml2"/> | ||
1595 | </dependencies> | ||
1596 | </tarball> | ||
1597 | <tarball id="camorama" version="0.17"> | ||
1598 | <source href="http://camorama.fixedgear.org/downloads/camorama-0.17.tar.bz2" | ||
1599 | size="312233" md5sum="2b2784af53a1ba8fa4419aa806967b35"/> | ||
1600 | <dependencies> | ||
1601 | <dep package="gtk+"/> | ||
1602 | </dependencies> | ||
1603 | </tarball> | ||
1604 | <autotools id="gtk-engines-cleanice"> | ||
1605 | <branch repo="elysium-project.sf.net"/> | ||
1606 | <dependencies> | ||
1607 | <dep package="gtk+"/> | ||
1608 | </dependencies> | ||
1609 | </autotools> | ||
1610 | <autotools id="gaim"> | ||
1611 | <branch repo="gaim.sf.net" module="trunk" checkoutdir="gaim"/> | ||
1612 | <dependencies> | ||
1613 | <dep package="libgnomeui"/> | ||
1614 | </dependencies> | ||
1615 | </autotools> | ||
1616 | <autotools id="zenity"> | ||
1617 | <branch/> | ||
1618 | <dependencies> | ||
1619 | <dep package="gtk+"/> | ||
1620 | <dep package="gconf"/> | ||
1621 | <dep package="libgnomecanvas"/> | ||
1622 | <dep package="gnome-doc-utils"/> | ||
1623 | </dependencies> | ||
1624 | </autotools> | ||
1625 | <autotools id="gpdf"> | ||
1626 | <branch/> | ||
1627 | <dependencies> | ||
1628 | <dep package="libgnomeui"/> | ||
1629 | <dep package="libbonoboui"/> | ||
1630 | <dep package="libgnomeprintui"/> | ||
1631 | </dependencies> | ||
1632 | </autotools> | ||
1633 | <autotools id="gnome-netstatus"> | ||
1634 | <branch/> | ||
1635 | <dependencies> | ||
1636 | <dep package="libgnomeui"/> | ||
1637 | <dep package="gnome-panel"/> | ||
1638 | <dep package="gnome-doc-utils"/> | ||
1639 | </dependencies> | ||
1640 | </autotools> | ||
1641 | <autotools id="gnome-doc-utils"> | ||
1642 | <branch/> | ||
1643 | <dependencies> | ||
1644 | <dep package="libxslt"/> | ||
1645 | <dep package="intltool"/> | ||
1646 | <dep package="glib"/> | ||
1647 | </dependencies> | ||
1648 | </autotools> | ||
1649 | <tarball id="libmusicbrainz" version="2.1.2"> | ||
1650 | <source href="http://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-2.1.2.tar.gz" | ||
1651 | size="504432" md5sum="88d35af903665fecbdee77eb6d5e6cdd"/> | ||
1652 | </tarball> | ||
1653 | <autotools id="totem" autogenargs="--enable-gstreamer"> | ||
1654 | <branch/> | ||
1655 | <dependencies> | ||
1656 | <dep package="gnome-desktop"/> | ||
1657 | <dep package="nautilus-cd-burner"/> | ||
1658 | <dep package="gstreamer"/> | ||
1659 | <dep package="gst-plugins-base"/> | ||
1660 | <dep package="gst-plugins-good"/> | ||
1661 | <dep package="libmusicbrainz"/> | ||
1662 | <dep package="iso-codes"/> | ||
1663 | </dependencies> | ||
1664 | </autotools> | ||
1665 | <autotools id="gnome-themes-extras"> | ||
1666 | <branch/> | ||
1667 | <dependencies> | ||
1668 | <dep package="gnome-themes"/> | ||
1669 | </dependencies> | ||
1670 | </autotools> | ||
1671 | |||
1672 | <autotools id="libgda"> | ||
1673 | <branch module="libgda"/> | ||
1674 | <dependencies> | ||
1675 | <dep package="glib"/> | ||
1676 | </dependencies> | ||
1677 | </autotools> | ||
1678 | <autotools id="libgda-1-2"> | ||
1679 | <branch module="libgda" revision="release-1-2-branch" | ||
1680 | checkoutdir="libgda-1-2"/> | ||
1681 | <dependencies> | ||
1682 | <dep package="glib"/> | ||
1683 | </dependencies> | ||
1684 | </autotools> | ||
1685 | |||
1686 | <autotools id="libgnomedb" autogenargs="--enable-gnome=yes"> | ||
1687 | <branch/> | ||
1688 | <dependencies> | ||
1689 | <dep package="libgda"/> | ||
1690 | <dep package="libgnomeui"/> | ||
1691 | <dep package="libbonoboui"/> | ||
1692 | </dependencies> | ||
1693 | </autotools> | ||
1694 | <autotools id="mergeant"> | ||
1695 | <branch/> | ||
1696 | <dependencies> | ||
1697 | <dep package="libgnomedb"/> | ||
1698 | </dependencies> | ||
1699 | </autotools> | ||
1700 | <autotools id="gtranslator"> | ||
1701 | <branch/> | ||
1702 | <dependencies> | ||
1703 | <dep package="libgnomeui"/> | ||
1704 | </dependencies> | ||
1705 | </autotools> | ||
1706 | <autotools id="gnome-spell"> | ||
1707 | <branch/> | ||
1708 | <dependencies> | ||
1709 | <dep package="libgnomeui"/> | ||
1710 | </dependencies> | ||
1711 | </autotools> | ||
1712 | <autotools id="libgnomecups"> | ||
1713 | <branch/> | ||
1714 | <dependencies> | ||
1715 | <dep package="glib"/> | ||
1716 | </dependencies> | ||
1717 | </autotools> | ||
1718 | <autotools id="gnome-cups-manager"> | ||
1719 | <branch/> | ||
1720 | <dependencies> | ||
1721 | <dep package="libgnomecups"/> | ||
1722 | <dep package="libgnomeui"/> | ||
1723 | <dep package="libglade"/> | ||
1724 | </dependencies> | ||
1725 | </autotools> | ||
1726 | <autotools id="libxml++"> | ||
1727 | <branch/> | ||
1728 | <dependencies> | ||
1729 | <dep package="libxml2"/> | ||
1730 | <dep package="glibmm"/> | ||
1731 | </dependencies> | ||
1732 | </autotools> | ||
1733 | <autotools id="bakery"> | ||
1734 | <branch/> | ||
1735 | <dependencies> | ||
1736 | <dep package="libxml++"/> | ||
1737 | <dep package="gtkmm"/> | ||
1738 | <dep package="gnomemm/libglademm"/> | ||
1739 | <dep package="gnomemm/gconfmm"/> | ||
1740 | <dep package="gnomemm/gnome-vfsmm"/> | ||
1741 | </dependencies> | ||
1742 | </autotools> | ||
1743 | <autotools id="gnome-hello"> | ||
1744 | <branch/> | ||
1745 | <dependencies> | ||
1746 | <dep package="glib"/> | ||
1747 | <dep package="libgnome"/> | ||
1748 | <dep package="libgnomeui"/> | ||
1749 | </dependencies> | ||
1750 | </autotools> | ||
1751 | <autotools id="liboobs"> | ||
1752 | <branch/> | ||
1753 | <dependencies> | ||
1754 | <dep package="glib"/> | ||
1755 | <dep package="dbus"/> | ||
1756 | <dep package="gtk-doc"/> | ||
1757 | <dep package="system-tools-backends"/> | ||
1758 | </dependencies> | ||
1759 | </autotools> | ||
1760 | <autotools id="gnome-system-tools"> | ||
1761 | <branch revision="gnome-2-14"/> | ||
1762 | <dependencies> | ||
1763 | <dep package="glib"/> | ||
1764 | <dep package="libxml2"/> | ||
1765 | <dep package="gconf"/> | ||
1766 | <dep package="libgnomeui"/> | ||
1767 | <dep package="libbonoboui"/> | ||
1768 | <dep package="libglade"/> | ||
1769 | <dep package="nautilus"/> | ||
1770 | <dep package="system-tools-backends"/> | ||
1771 | <dep package="gnome-doc-utils"/> | ||
1772 | </dependencies> | ||
1773 | </autotools> | ||
1774 | <autotools id="gnome-user-docs"> | ||
1775 | <branch/> | ||
1776 | <dependencies> | ||
1777 | <dep package="scrollkeeper"/> | ||
1778 | <dep package="gnome-doc-utils"/> | ||
1779 | </dependencies> | ||
1780 | </autotools> | ||
1781 | <autotools id="loudmouth"> | ||
1782 | <branch/> | ||
1783 | <dependencies> | ||
1784 | <dep package="glib"/> | ||
1785 | </dependencies> | ||
1786 | </autotools> | ||
1787 | <autotools id="gossip"> | ||
1788 | <branch/> | ||
1789 | <dependencies> | ||
1790 | <dep package="loudmouth"/> | ||
1791 | <dep package="libgnomeui"/> | ||
1792 | </dependencies> | ||
1793 | </autotools> | ||
1794 | <autotools id="conglomerate"> | ||
1795 | <branch/> | ||
1796 | <dependencies> | ||
1797 | <dep package="libxslt"/> | ||
1798 | <dep package="gconf"/> | ||
1799 | <dep package="libgnomeui"/> | ||
1800 | </dependencies> | ||
1801 | </autotools> | ||
1802 | <autotools id="sound-juicer"> | ||
1803 | <branch/> | ||
1804 | <dependencies> | ||
1805 | <dep package="gnome-doc-utils"/> | ||
1806 | <dep package="libgnomeui"/> | ||
1807 | <dep package="gnome-media"/> | ||
1808 | <dep package="gstreamer"/> | ||
1809 | <dep package="gst-plugins-base"/> | ||
1810 | <dep package="gst-plugins-good"/> | ||
1811 | <dep package="nautilus-cd-burner"/> | ||
1812 | </dependencies> | ||
1813 | </autotools> | ||
1814 | <autotools id="gnome-network"> | ||
1815 | <branch/> | ||
1816 | <dependencies> | ||
1817 | <dep package="glib"/> | ||
1818 | </dependencies> | ||
1819 | </autotools> | ||
1820 | <tarball id="guile" version="1.8.0"> | ||
1821 | <source href="ftp://ftp.gnu.org/gnu/guile/guile-1.8.0.tar.gz" | ||
1822 | size="3691677" md5sum="3f47443602f93e94bf43218d9b86099d"/> | ||
1823 | </tarball> | ||
1824 | <tarball id="autogen" version="5.8.4"> | ||
1825 | <source href="http://internap.dl.sourceforge.net/sourceforge/autogen/autogen-5.8.4.tar.bz2" | ||
1826 | size="931015" md5sum="b65d4b9e3ddbcfd5418b708858c05b66"/> | ||
1827 | <dependencies> | ||
1828 | <dep package="guile"/> | ||
1829 | </dependencies> | ||
1830 | </tarball> | ||
1831 | <autotools id="anjuta"> | ||
1832 | <branch/> | ||
1833 | <dependencies> | ||
1834 | <dep package="libbonoboui"/> | ||
1835 | <dep package="libgnomeprintui"/> | ||
1836 | <dep package="vte"/> | ||
1837 | <dep package="gnome-build"/> | ||
1838 | <dep package="autogen"/> | ||
1839 | <dep package="devhelp"/> | ||
1840 | </dependencies> | ||
1841 | </autotools> | ||
1842 | <autotools id="OpenApplet"> | ||
1843 | <branch/> | ||
1844 | <dependencies> | ||
1845 | <dep package="gnome-panel"/> | ||
1846 | </dependencies> | ||
1847 | </autotools> | ||
1848 | <autotools id="gtetrinet"> | ||
1849 | <branch/> | ||
1850 | <dependencies> | ||
1851 | <dep package="libgnomeui"/> | ||
1852 | </dependencies> | ||
1853 | </autotools> | ||
1854 | <autotools id="glom"> | ||
1855 | <branch/> | ||
1856 | <dependencies> | ||
1857 | <dep package="gnomemm/libgdamm"/> | ||
1858 | <dep package="bakery"/> | ||
1859 | <dep package="gnomemm/libgnomecanvasmm"/> | ||
1860 | <dep package="libgnome"/> | ||
1861 | <dep package="iso-codes"/> | ||
1862 | <dep package="pygtk"/> | ||
1863 | <dep package="gnome-python-extras"/> | ||
1864 | </dependencies> | ||
1865 | </autotools> | ||
1866 | <autotools id="vino"> | ||
1867 | <branch/> | ||
1868 | <dependencies> | ||
1869 | <dep package="libgnomeui"/> | ||
1870 | <dep package="libglade"/> | ||
1871 | <dep package="gconf"/> | ||
1872 | <dep package="gnutls"/> | ||
1873 | </dependencies> | ||
1874 | </autotools> | ||
1875 | <autotools id="gnome-keyring-manager" autogenargs="--disable-more-warnings"> | ||
1876 | <branch/> | ||
1877 | <dependencies> | ||
1878 | <dep package="libgnomeui"/> | ||
1879 | <dep package="gnome-keyring"/> | ||
1880 | <dep package="gconf"/> | ||
1881 | </dependencies> | ||
1882 | </autotools> | ||
1883 | <autotools id="gnome-volume-manager"> | ||
1884 | <branch/> | ||
1885 | <dependencies> | ||
1886 | <dep package="libgnomeui"/> | ||
1887 | <dep package="libglade"/> | ||
1888 | <dep package="hal"/> | ||
1889 | </dependencies> | ||
1890 | </autotools> | ||
1891 | <metamodule id="meta-storage"> | ||
1892 | <dependencies> | ||
1893 | <dep package="storage/storage-store"/> | ||
1894 | <dep package="storage/vfs"/> | ||
1895 | <dep package="storage/applet"/> | ||
1896 | </dependencies> | ||
1897 | </metamodule> | ||
1898 | <autotools id="storage/storage-store"> | ||
1899 | <branch/> | ||
1900 | <dependencies> | ||
1901 | <dep package="dbus"/> | ||
1902 | </dependencies> | ||
1903 | </autotools> | ||
1904 | <autotools id="storage/libstorage"> | ||
1905 | <branch/> | ||
1906 | <dependencies> | ||
1907 | <dep package="gnome-vfs"/> | ||
1908 | <dep package="pygtk"/> | ||
1909 | </dependencies> | ||
1910 | </autotools> | ||
1911 | <autotools id="storage/libstorage-translators"> | ||
1912 | <branch/> | ||
1913 | <dependencies> | ||
1914 | <dep package="storage/libstorage"/> | ||
1915 | </dependencies> | ||
1916 | </autotools> | ||
1917 | <autotools id="storage/vfs"> | ||
1918 | <branch/> | ||
1919 | <dependencies> | ||
1920 | <dep package="storage/libstorage"/> | ||
1921 | <dep package="storage/libstorage-translators"/> | ||
1922 | </dependencies> | ||
1923 | </autotools> | ||
1924 | <autotools id="storage/pet"> | ||
1925 | <branch/> | ||
1926 | </autotools> | ||
1927 | <autotools id="storage/libmrs"> | ||
1928 | <branch/> | ||
1929 | <dependencies> | ||
1930 | <dep package="storage/pet"/> | ||
1931 | </dependencies> | ||
1932 | </autotools> | ||
1933 | <autotools id="storage/libmrs-converter"> | ||
1934 | <branch/> | ||
1935 | <dependencies> | ||
1936 | <dep package="storage/libmrs"/> | ||
1937 | </dependencies> | ||
1938 | </autotools> | ||
1939 | <autotools id="storage/libstorage-nl"> | ||
1940 | <branch/> | ||
1941 | <dependencies> | ||
1942 | <dep package="storage/libstorage"/> | ||
1943 | <dep package="storage/libmrs"/> | ||
1944 | <dep package="storage/libmrs-converter"/> | ||
1945 | </dependencies> | ||
1946 | </autotools> | ||
1947 | <autotools id="storage/applet"> | ||
1948 | <branch/> | ||
1949 | <dependencies> | ||
1950 | <dep package="gnome-python"/> | ||
1951 | <dep package="storage/libstorage-nl"/> | ||
1952 | </dependencies> | ||
1953 | </autotools> | ||
1954 | <autotools id="gnome-nettool"> | ||
1955 | <branch/> | ||
1956 | <dependencies> | ||
1957 | <dep package="gtk+"/> | ||
1958 | <dep package="gconf"/> | ||
1959 | <dep package="libglade"/> | ||
1960 | <dep package="gnome-doc-utils"/> | ||
1961 | </dependencies> | ||
1962 | </autotools> | ||
1963 | <autotools id="monkey-bubble"> | ||
1964 | <branch/> | ||
1965 | <dependencies> | ||
1966 | <dep package="gstreamer-0-8"/> | ||
1967 | <dep package="gst-plugins-0-8"/> | ||
1968 | <dep package="libxml2"/> | ||
1969 | <dep package="gconf"/> | ||
1970 | <dep package="librsvg"/> | ||
1971 | <dep package="libgnomeui"/> | ||
1972 | </dependencies> | ||
1973 | </autotools> | ||
1974 | <autotools id="gnome-schedule"> | ||
1975 | <branch/> | ||
1976 | <dependencies> | ||
1977 | <dep package="pygtk"/> | ||
1978 | <dep package="yelp"/> | ||
1979 | </dependencies> | ||
1980 | </autotools> | ||
1981 | <autotools id="gnome-backgrounds"> | ||
1982 | <branch/> | ||
1983 | <dependencies> | ||
1984 | <dep package="glib"/> | ||
1985 | </dependencies> | ||
1986 | </autotools> | ||
1987 | <autotools id="evince"> | ||
1988 | <branch/> | ||
1989 | <dependencies> | ||
1990 | <dep package="libgnomeui"/> | ||
1991 | <dep package="libgnomeprintui"/> | ||
1992 | <dep package="poppler"/> | ||
1993 | <dep package="gnome-doc-utils"/> | ||
1994 | </dependencies> | ||
1995 | </autotools> | ||
1996 | <autotools id="nautilus-python" supports-non-srcdir-builds="no"> | ||
1997 | <branch/> | ||
1998 | <dependencies> | ||
1999 | <dep package="nautilus"/> | ||
2000 | <dep package="pygtk"/> | ||
2001 | <dep package="gnome-python"/> | ||
2002 | </dependencies> | ||
2003 | </autotools> | ||
2004 | <autotools id="inkscape"> | ||
2005 | <branch repo="inkscape.sf.net"/> | ||
2006 | <dependencies> | ||
2007 | <dep package="gtkmm"/> | ||
2008 | <dep package="libxslt"/> | ||
2009 | </dependencies> | ||
2010 | </autotools> | ||
2011 | <autotools id="NetworkManager"> | ||
2012 | <branch repo="gnome.org"/> | ||
2013 | <dependencies> | ||
2014 | <dep package="dbus"/> | ||
2015 | </dependencies> | ||
2016 | </autotools> | ||
2017 | <autotools id="atomix"> | ||
2018 | <branch/> | ||
2019 | <dependencies> | ||
2020 | <dep package="gtk+"/> | ||
2021 | <dep package="libgnome"/> | ||
2022 | <dep package="libgnomeui"/> | ||
2023 | <dep package="libxml2"/> | ||
2024 | <dep package="libgnomecanvas"/> | ||
2025 | <dep package="libbonoboui"/> | ||
2026 | </dependencies> | ||
2027 | </autotools> | ||
2028 | <autotools id="deskbar-applet"> | ||
2029 | <branch/> | ||
2030 | <dependencies> | ||
2031 | <dep package="gtk+"/> | ||
2032 | <dep package="gnome-desktop"/> | ||
2033 | <dep package="pygtk"/> | ||
2034 | <dep package="gnome-python"/> | ||
2035 | <dep package="gnome-python-desktop"/> | ||
2036 | </dependencies> | ||
2037 | </autotools> | ||
2038 | <autotools id="pessulus"> | ||
2039 | <branch/> | ||
2040 | <dependencies> | ||
2041 | <dep package="pygtk"/> | ||
2042 | <dep package="gnome-python"/> | ||
2043 | </dependencies> | ||
2044 | </autotools> | ||
2045 | <autotools id="sabayon"> | ||
2046 | <branch/> | ||
2047 | <dependencies> | ||
2048 | <dep package="gtk+"/> | ||
2049 | <dep package="pygtk"/> | ||
2050 | </dependencies> | ||
2051 | </autotools> | ||
2052 | <autotools id="muine"> | ||
2053 | <branch/> | ||
2054 | <dependencies> | ||
2055 | <dep package="gtk+"/> | ||
2056 | <dep package="gstreamer"/> | ||
2057 | </dependencies> | ||
2058 | </autotools> | ||
2059 | <autotools id="gnonlin"> | ||
2060 | <branch repo="gstreamer.freedesktop.org" module="gnonlin"/> | ||
2061 | <dependencies> | ||
2062 | <dep package="gstreamer"/> | ||
2063 | <dep package="gst-plugins-base"/> | ||
2064 | </dependencies> | ||
2065 | </autotools> | ||
2066 | <autotools id="pitivi"> | ||
2067 | <branch/> | ||
2068 | <dependencies> | ||
2069 | <dep package="pygtk"/> | ||
2070 | <dep package="gnome-python"/> | ||
2071 | <dep package="gstreamer"/> | ||
2072 | <dep package="gst-python"/> | ||
2073 | <dep package="gnonlin"/> | ||
2074 | </dependencies> | ||
2075 | </autotools> | ||
2076 | <autotools id="xchat-gnome"> | ||
2077 | <branch repo="svn.navi.cx" module="misc/trunk/xchat-gnome"/> | ||
2078 | <dependencies> | ||
2079 | <dep package="gtk+" /> | ||
2080 | <dep package="gconf" /> | ||
2081 | <dep package="libgnomeui" /> | ||
2082 | <dep package="libglade" /> | ||
2083 | <dep package="gnome-vfs" /> | ||
2084 | <dep package="libsexy" /> | ||
2085 | </dependencies> | ||
2086 | </autotools> | ||
2087 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gnutls.modules b/scripts/jhbuild/modulesets/gnutls.modules new file mode 100644 index 0000000000..e8f75cfe86 --- /dev/null +++ b/scripts/jhbuild/modulesets/gnutls.modules | |||
@@ -0,0 +1,36 @@ | |||
1 | <?xml version="1.0" standalone="no"?> <!--*- mode: nxml -*--> | ||
2 | <!DOCTYPE moduleset SYSTEM "moduleset.dtd"> | ||
3 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
4 | <moduleset> | ||
5 | <tarball id="libgpg-error" version="1.3"> | ||
6 | <source href="http://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.3.tar.bz2" | ||
7 | size="452266" md5sum="d978065d62cde48e79497b63f80ba8fc" /> | ||
8 | </tarball> | ||
9 | <tarball id="libgcrypt" version="1.2.2"> | ||
10 | <source href="http://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.2.2.tar.bz2" | ||
11 | size="780315" md5sum="4a8a9a7572892ae3803a5aa558e52e02" /> | ||
12 | <dependencies> | ||
13 | <dep package="libgpg-error" /> | ||
14 | </dependencies> | ||
15 | </tarball> | ||
16 | <tarball id="libtasn1" version="0.3.4" supports-non-srcdir-builds="no"> | ||
17 | <source href="http://ftp.gnupg.org/gcrypt/alpha/gnutls/libtasn1/libtasn1-0.3.4.tar.gz" | ||
18 | size="1246545" md5sum="1dbfce0e1fbd6aebc1a4506814c23d35" /> | ||
19 | </tarball> | ||
20 | <tarball id="opencdk" version="0.5.8" supports-non-srcdir-builds="no"> | ||
21 | <source href="http://ftp.gnupg.org/gcrypt/alpha/gnutls/opencdk/opencdk-0.5.8.tar.gz" | ||
22 | size="497122" md5sum="900c4dee7712845c19d7b2d2a93ea546" /> | ||
23 | <dependencies> | ||
24 | <dep package="libgcrypt" /> | ||
25 | </dependencies> | ||
26 | </tarball> | ||
27 | <tarball id="gnutls" version="1.4.0"> | ||
28 | <source href="http://ftp.gnupg.org/gcrypt/alpha/gnutls/gnutls-1.4.0.tar.bz2" | ||
29 | size="3281324" md5sum="9e1e1b07e971c604923ec394f6922301" /> | ||
30 | <dependencies> | ||
31 | <dep package="libgcrypt" /> | ||
32 | <dep package="libtasn1" /> | ||
33 | <dep package="opencdk" /> | ||
34 | </dependencies> | ||
35 | </tarball> | ||
36 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gtk.modules b/scripts/jhbuild/modulesets/gtk.modules new file mode 100644 index 0000000000..a26a44c2ac --- /dev/null +++ b/scripts/jhbuild/modulesets/gtk.modules | |||
@@ -0,0 +1,72 @@ | |||
1 | <?xml version="1.0"?><!--*- mode: nxml -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | <repository type="cvs" name="gnome.org" default="yes" | ||
5 | cvsroot=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
6 | password=""/> | ||
7 | <repository type="cvs" name="mime.freedesktop.org" | ||
8 | cvsroot=":pserver:anoncvs@cvs.freedesktop.org:/cvs/mime" | ||
9 | password=""/> | ||
10 | |||
11 | <include href="freedesktop.modules"/> | ||
12 | |||
13 | <autotools id="gnome-common"> | ||
14 | <branch/> | ||
15 | </autotools> | ||
16 | <autotools id="intltool"> | ||
17 | <branch/> | ||
18 | <dependencies> | ||
19 | <dep package="gnome-common"/> | ||
20 | </dependencies> | ||
21 | </autotools> | ||
22 | <autotools id="shared-mime-info" supports-non-srcdir-builds="no"> | ||
23 | <branch repo="mime.freedesktop.org"/> | ||
24 | <dependencies> | ||
25 | <dep package="intltool"/> | ||
26 | </dependencies> | ||
27 | </autotools> | ||
28 | <autotools id="libxml2"> | ||
29 | <branch module="gnome-xml" checkoutdir="libxml2"/> | ||
30 | </autotools> | ||
31 | <autotools id="libxslt"> | ||
32 | <branch/> | ||
33 | <dependencies> | ||
34 | <dep package="libxml2"/> | ||
35 | </dependencies> | ||
36 | </autotools> | ||
37 | <autotools id="gtk-doc"> | ||
38 | <branch/> | ||
39 | <dependencies> | ||
40 | <dep package="libxslt"/> | ||
41 | </dependencies> | ||
42 | </autotools> | ||
43 | <autotools id="glib"> | ||
44 | <branch/> | ||
45 | <dependencies> | ||
46 | <dep package="gtk-doc"/> | ||
47 | </dependencies> | ||
48 | </autotools> | ||
49 | <autotools id="pango"> | ||
50 | <branch/> | ||
51 | <dependencies> | ||
52 | <dep package="glib"/> | ||
53 | <dep package="cairo"/> | ||
54 | <dep package="libXft"/> | ||
55 | </dependencies> | ||
56 | </autotools> | ||
57 | <autotools id="atk"> | ||
58 | <branch/> | ||
59 | <dependencies> | ||
60 | <dep package="glib"/> | ||
61 | </dependencies> | ||
62 | </autotools> | ||
63 | <autotools id="gtk+"> | ||
64 | <branch/> | ||
65 | <dependencies> | ||
66 | <dep package="cairo"/> | ||
67 | <dep package="atk"/> | ||
68 | <dep package="pango"/> | ||
69 | <dep package="shared-mime-info"/> | ||
70 | </dependencies> | ||
71 | </autotools> | ||
72 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/gtk28.modules b/scripts/jhbuild/modulesets/gtk28.modules new file mode 100644 index 0000000000..5fe56ea926 --- /dev/null +++ b/scripts/jhbuild/modulesets/gtk28.modules | |||
@@ -0,0 +1,72 @@ | |||
1 | <?xml version="1.0"?><!--*- mode: nxml -*--> | ||
2 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
3 | <moduleset> | ||
4 | <repository type="cvs" name="gnome.org" default="yes" | ||
5 | cvsroot=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" | ||
6 | password=""/> | ||
7 | <repository type="cvs" name="mime.freedesktop.org" | ||
8 | cvsroot=":pserver:anoncvs@cvs.freedesktop.org:/cvs/mime" | ||
9 | password=""/> | ||
10 | |||
11 | <include href="freedesktop.modules"/> | ||
12 | |||
13 | <autotools id="gnome-common"> | ||
14 | <branch/> | ||
15 | </autotools> | ||
16 | <autotools id="intltool"> | ||
17 | <branch/> | ||
18 | <dependencies> | ||
19 | <dep package="gnome-common"/> | ||
20 | </dependencies> | ||
21 | </autotools> | ||
22 | <autotools id="shared-mime-info" supports-non-srcdir-builds="no"> | ||
23 | <branch repo="mime.freedesktop.org"/> | ||
24 | <dependencies> | ||
25 | <dep package="intltool"/> | ||
26 | </dependencies> | ||
27 | </autotools> | ||
28 | <autotools id="libxml2"> | ||
29 | <branch module="gnome-xml" checkoutdir="libxml2"/> | ||
30 | </autotools> | ||
31 | <autotools id="libxslt"> | ||
32 | <branch/> | ||
33 | <dependencies> | ||
34 | <dep package="libxml2"/> | ||
35 | </dependencies> | ||
36 | </autotools> | ||
37 | <autotools id="gtk-doc"> | ||
38 | <branch/> | ||
39 | <dependencies> | ||
40 | <dep package="libxslt"/> | ||
41 | </dependencies> | ||
42 | </autotools> | ||
43 | <autotools id="glib"> | ||
44 | <branch revision="glib-2-8"/> | ||
45 | <dependencies> | ||
46 | <dep package="gtk-doc"/> | ||
47 | </dependencies> | ||
48 | </autotools> | ||
49 | <autotools id="pango"> | ||
50 | <branch revision="pango-1-10"/> | ||
51 | <dependencies> | ||
52 | <dep package="glib"/> | ||
53 | <dep package="cairo"/> | ||
54 | <dep package="libXft"/> | ||
55 | </dependencies> | ||
56 | </autotools> | ||
57 | <autotools id="atk"> | ||
58 | <branch/> | ||
59 | <dependencies> | ||
60 | <dep package="glib"/> | ||
61 | </dependencies> | ||
62 | </autotools> | ||
63 | <autotools id="gtk+"> | ||
64 | <branch revision="gtk-2-8"/> | ||
65 | <dependencies> | ||
66 | <dep package="cairo"/> | ||
67 | <dep package="atk"/> | ||
68 | <dep package="pango"/> | ||
69 | <dep package="shared-mime-info"/> | ||
70 | </dependencies> | ||
71 | </autotools> | ||
72 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/moduleset.dtd b/scripts/jhbuild/modulesets/moduleset.dtd new file mode 100644 index 0000000000..bee7c8c17e --- /dev/null +++ b/scripts/jhbuild/modulesets/moduleset.dtd | |||
@@ -0,0 +1,115 @@ | |||
1 | <!ELEMENT moduleset ((cvsroot|svnroot|arch-archive|darcs-archive)*, | ||
2 | (include|cvsmodule|svnmodule|archmodule|darcsmodule| | ||
3 | metamodule|tarball|mozillamodule)*) > | ||
4 | |||
5 | <!ELEMENT cvsroot EMPTY > | ||
6 | <!ATTLIST cvsroot | ||
7 | name CDATA #REQUIRED | ||
8 | root CDATA #REQUIRED | ||
9 | password CDATA #IMPLIED | ||
10 | default (yes|no) 'no' > | ||
11 | |||
12 | <!ELEMENT svnroot EMPTY > | ||
13 | <!ATTLIST svnroot | ||
14 | name CDATA #REQUIRED | ||
15 | href CDATA #REQUIRED | ||
16 | default (yes|no) 'no' > | ||
17 | |||
18 | <!ELEMENT arch-archive EMPTY > | ||
19 | <!ATTLIST arch-archive | ||
20 | name CDATA #REQUIRED | ||
21 | href CDATA #REQUIRED | ||
22 | default (yes|no) 'no' > | ||
23 | |||
24 | <!ELEMENT darcs-archive EMPTY > | ||
25 | <!ATTLIST darcs-archive | ||
26 | name CDATA #REQUIRED | ||
27 | href CDATA #REQUIRED | ||
28 | default (yes|no) 'no' > | ||
29 | |||
30 | <!ELEMENT include EMPTY > | ||
31 | <!ATTLIST include | ||
32 | href CDATA #REQUIRED > | ||
33 | |||
34 | <!ELEMENT cvsmodule (dependencies?,suggests?) > | ||
35 | <!ATTLIST cvsmodule | ||
36 | id CDATA #REQUIRED | ||
37 | module CDATA #IMPLIED | ||
38 | revision CDATA #IMPLIED | ||
39 | checkoutdir CDATA #IMPLIED | ||
40 | autogenargs CDATA #IMPLIED | ||
41 | makeargs CDATA #IMPLIED | ||
42 | cvsroot CDATA #IMPLIED | ||
43 | supports-non-srcdir-builds (yes|no) 'yes' > | ||
44 | |||
45 | <!ELEMENT svnmodule (dependencies?,suggests?) > | ||
46 | <!ATTLIST svnmodule | ||
47 | id CDATA #REQUIRED | ||
48 | module CDATA #IMPLIED | ||
49 | checkoutdir CDATA #IMPLIED | ||
50 | autogenargs CDATA #IMPLIED | ||
51 | makeargs CDATA #IMPLIED | ||
52 | root CDATA #IMPLIED | ||
53 | supports-non-srcdir-builds (yes|no) 'yes' > | ||
54 | |||
55 | <!ELEMENT archmodule (dependencies?,suggests?) > | ||
56 | <!ATTLIST archmodule | ||
57 | id CDATA #REQUIRED | ||
58 | version CDATA #IMPLIED | ||
59 | checkoutdir CDATA #IMPLIED | ||
60 | autogenargs CDATA #IMPLIED | ||
61 | makeargs CDATA #IMPLIED | ||
62 | root CDATA #IMPLIED | ||
63 | supports-non-srcdir-builds (yes|no) 'yes' > | ||
64 | |||
65 | <!ELEMENT darcsmodule (dependencies?,suggests?) > | ||
66 | <!ATTLIST darcsmodule | ||
67 | id CDATA #REQUIRED | ||
68 | checkoutdir CDATA #IMPLIED | ||
69 | autogenargs CDATA #IMPLIED | ||
70 | makeargs CDATA #IMPLIED | ||
71 | root CDATA #IMPLIED | ||
72 | supports-non-srcdir-builds (yes|no) 'yes' > | ||
73 | |||
74 | <!ELEMENT metamodule (dependencies) > | ||
75 | <!ATTLIST metamodule | ||
76 | id CDATA #REQUIRED > | ||
77 | |||
78 | <!ELEMENT tarball | ||
79 | (source,patches?,dependencies?,suggests?) > | ||
80 | <!ATTLIST tarball | ||
81 | id CDATA #REQUIRED | ||
82 | version CDATA #REQUIRED | ||
83 | checkoutdir CDATA #IMPLIED | ||
84 | autogenargs CDATA #IMPLIED | ||
85 | makeargs CDATA #IMPLIED | ||
86 | supports-non-srcdir-builds (yes|no) 'yes' > | ||
87 | |||
88 | <!ELEMENT mozillamodule (dependencies?,suggests?) > | ||
89 | <!ATTLIST mozillamodule | ||
90 | id CDATA #REQUIRED | ||
91 | module CDATA #IMPLIED | ||
92 | revision CDATA #IMPLIED | ||
93 | checkoutdir CDATA #IMPLIED | ||
94 | autogenargs CDATA #IMPLIED | ||
95 | makeargs CDATA #IMPLIED | ||
96 | cvsroot CDATA #IMPLIED > | ||
97 | |||
98 | <!-- Tarball sub-elements --> | ||
99 | <!ELEMENT source EMPTY > | ||
100 | <!ATTLIST source | ||
101 | href CDATA #REQUIRED | ||
102 | size CDATA #IMPLIED | ||
103 | md5sum CDATA #IMPLIED > | ||
104 | <!ELEMENT patches (patch)* > | ||
105 | <!ELEMENT patch EMPTY > | ||
106 | <!ATTLIST patch | ||
107 | file CDATA #REQUIRED | ||
108 | strip CDATA '0' > | ||
109 | |||
110 | <!-- common sub-elements --> | ||
111 | <!ELEMENT dependencies (dep*) > | ||
112 | <!ELEMENT suggests (dep*) > | ||
113 | <!ELEMENT dep EMPTY > | ||
114 | <!ATTLIST dep | ||
115 | package CDATA #REQUIRED > | ||
diff --git a/scripts/jhbuild/modulesets/moduleset.rnc b/scripts/jhbuild/modulesets/moduleset.rnc new file mode 100644 index 0000000000..b46122101d --- /dev/null +++ b/scripts/jhbuild/modulesets/moduleset.rnc | |||
@@ -0,0 +1,131 @@ | |||
1 | default namespace = "" | ||
2 | |||
3 | start = moduleset | ||
4 | |||
5 | boolean = "yes" | "no" | ||
6 | |||
7 | moduleset = element moduleset { repository*, | ||
8 | (\include|package)* } | ||
9 | |||
10 | repository_cvs = attribute type { "cvs" }, | ||
11 | attribute cvsroot { text }, | ||
12 | attribute password { text }? | ||
13 | repository_svn = attribute type { "svn" }, | ||
14 | attribute href { xsd:anyURI } | ||
15 | repository_arch = attribute type { "arch" }, | ||
16 | attribute archive { text }, | ||
17 | attribute href { xsd:anyURI }? | ||
18 | repository_darcs = attribute type { "darcs" }, | ||
19 | attribute href { xsd:anyURI } | ||
20 | repository_git = attribute type { "git" }, | ||
21 | attribute href { xsd:anyURI } | ||
22 | repository_tarball = attribute type { "tarball" }, | ||
23 | attribute href { xsd:anyURI } | ||
24 | |||
25 | repository = element repository { | ||
26 | attribute name { text }, | ||
27 | attribute default { boolean }?, | ||
28 | (repository_cvs|repository_svn|repository_arch| | ||
29 | repository_darcs|repository_git|repository_tarball) | ||
30 | } | ||
31 | |||
32 | \include = element include { | ||
33 | attribute href { xsd:anyURI } | ||
34 | } | ||
35 | |||
36 | package = autotools | | ||
37 | metamodule | | ||
38 | distutils | | ||
39 | perl | | ||
40 | tarball | | ||
41 | mozillamodule | ||
42 | |||
43 | dep = element dep { | ||
44 | attribute package { text } | ||
45 | } | ||
46 | dependencies = element dependencies { dep* } | ||
47 | after = element after { dep* } | element suggests { dep* } | ||
48 | |||
49 | common = attribute id { text } & dependencies* & after* | ||
50 | |||
51 | branch_cvs = attribute module { text }?, | ||
52 | attribute checkoutdir { text }?, | ||
53 | attribute revision { text}?, | ||
54 | attribute override-checkoutdir { boolean }?, | ||
55 | attribute update-new-dirs { boolean }? | ||
56 | branch_svn = attribute module { xsd:anyURI }?, | ||
57 | attribute checkoutdir { text }? | ||
58 | branch_arch = attribute module { xsd:anyURI }?, | ||
59 | attribute checkoutdir { text }? | ||
60 | branch_darcs = attribute module { xsd:anyURI }?, | ||
61 | attribute checkoutdir { text }? | ||
62 | branch_git = attribute module { xsd:anyURI }?, | ||
63 | attribute checkoutdir { text }? | ||
64 | branch_tarball = attribute module { xsd:anyURI }, | ||
65 | attribute version { text }, | ||
66 | attribute size { text }?, | ||
67 | attribute md5sum { text }?, | ||
68 | element patch { | ||
69 | attribute file { text }, | ||
70 | attribute strip { text }? | ||
71 | }* | ||
72 | |||
73 | |||
74 | branch = element branch { | ||
75 | attribute repo { text }?, | ||
76 | (branch_cvs|branch_svn|branch_arch|branch_darcs|branch_git|branch_tarball) | ||
77 | } | ||
78 | |||
79 | autotools = element autotools { | ||
80 | branch & | ||
81 | attribute autogen-sh { text }? & | ||
82 | attribute autogenargs { text }? & | ||
83 | attribute makeargs { text }? & | ||
84 | attribute supports-non-srcdir-builds { boolean }? & | ||
85 | common | ||
86 | } | ||
87 | |||
88 | metamodule = element metamodule { common } | ||
89 | |||
90 | distutils = element distutils { | ||
91 | branch & | ||
92 | attribute supports-non-srcdir-builds { boolean }? & | ||
93 | common | ||
94 | } | ||
95 | |||
96 | perl = element perl { | ||
97 | branch & | ||
98 | attribute makeargs { text }? & | ||
99 | common | ||
100 | } | ||
101 | |||
102 | tarball = element tarball { | ||
103 | attribute version { text }, | ||
104 | attribute checkoutdir { text }?, | ||
105 | attribute autogenargs { text }?, | ||
106 | attribute makeargs { text }?, | ||
107 | attribute supports-non-srcdir-builds { boolean }?, | ||
108 | |||
109 | (element source { | ||
110 | attribute href { text }, | ||
111 | attribute size { text }?, | ||
112 | attribute md5sum { text }? } & | ||
113 | element patches { | ||
114 | element patch { | ||
115 | attribute file { text }, | ||
116 | attribute strip { text }? | ||
117 | }+ }? & | ||
118 | common) | ||
119 | } | ||
120 | |||
121 | mozillamodule = element mozillamodule { | ||
122 | attribute module { text }?, | ||
123 | attribute revision { text }?, | ||
124 | attribute checkoutdir { text }?, | ||
125 | attribute autogenargs { text }?, | ||
126 | attribute makeargs { text }?, | ||
127 | attribute cvsroot { text }?, | ||
128 | attribute root { text }?, | ||
129 | common | ||
130 | } | ||
131 | |||
diff --git a/scripts/jhbuild/modulesets/moduleset.xsl b/scripts/jhbuild/modulesets/moduleset.xsl new file mode 100644 index 0000000000..a057bfa692 --- /dev/null +++ b/scripts/jhbuild/modulesets/moduleset.xsl | |||
@@ -0,0 +1,283 @@ | |||
1 | <?xml version='1.0'?> <!--*- mode: nxml -*--> | ||
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
3 | version="1.0"> | ||
4 | |||
5 | <xsl:output method="html" encoding="ISO-8859-1" indent="yes" /> | ||
6 | <xsl:key name="module-id" match="moduleset/*" use="@id" /> | ||
7 | |||
8 | <xsl:template match="/"> | ||
9 | <html> | ||
10 | <head> | ||
11 | <title>Module Set</title> | ||
12 | <style type="text/css"> | ||
13 | <xsl:text> | ||
14 | div.cvsmodule, div.mozillamodule { | ||
15 | padding: 0.5em; | ||
16 | margin: 0.5em; | ||
17 | background: #87CEFA; | ||
18 | } | ||
19 | div.svnmodule { | ||
20 | padding: 0.5em; | ||
21 | margin: 0.5em; | ||
22 | background: #67AEDA; | ||
23 | } | ||
24 | div.metamodule { | ||
25 | padding: 0.5em; | ||
26 | margin: 0.5em; | ||
27 | background: #F08080; | ||
28 | } | ||
29 | div.tarball { | ||
30 | padding: 0.5em; | ||
31 | margin: 0.5em; | ||
32 | background: #EEDD82; | ||
33 | } | ||
34 | </xsl:text> | ||
35 | </style> | ||
36 | </head> | ||
37 | <body> | ||
38 | <xsl:apply-templates /> | ||
39 | </body> | ||
40 | </html> | ||
41 | </xsl:template> | ||
42 | |||
43 | <xsl:template match="moduleset"> | ||
44 | <h1>Module Set</h1> | ||
45 | <xsl:apply-templates /> | ||
46 | </xsl:template> | ||
47 | |||
48 | <xsl:template match="dependencies"> | ||
49 | <xsl:variable name="deps" select="dep/@package" /> | ||
50 | <xsl:for-each select="$deps"> | ||
51 | <a href="#{generate-id(key('module-id', .))}"> | ||
52 | <xsl:value-of select="." /> | ||
53 | </a> | ||
54 | <xsl:if test="not($deps[last()] = .)"> | ||
55 | <xsl:text>, </xsl:text> | ||
56 | </xsl:if> | ||
57 | </xsl:for-each> | ||
58 | </xsl:template> | ||
59 | |||
60 | <xsl:template match="cvsmodule"> | ||
61 | <div class="{name(.)}"> | ||
62 | <h2> | ||
63 | <xsl:value-of select="@id" /> | ||
64 | <a name="{generate-id(.)}" /> | ||
65 | </h2> | ||
66 | <table> | ||
67 | <tr> | ||
68 | <th align="left">Module:</th> | ||
69 | <td> | ||
70 | <xsl:choose> | ||
71 | <xsl:when test="@module"> | ||
72 | <xsl:value-of select="@module" /> | ||
73 | </xsl:when> | ||
74 | <xsl:otherwise> | ||
75 | <xsl:value-of select="@id" /> | ||
76 | </xsl:otherwise> | ||
77 | </xsl:choose> | ||
78 | <xsl:if test="@revision"> | ||
79 | <xsl:text> rv:</xsl:text> | ||
80 | <xsl:value-of select="@revision" /> | ||
81 | </xsl:if> | ||
82 | </td> | ||
83 | </tr> | ||
84 | <xsl:if test="@checkoutdir"> | ||
85 | <tr> | ||
86 | <th align="left">Checkout directory:</th> | ||
87 | <td><xsl:value-of select="@checkoutdir" /></td> | ||
88 | </tr> | ||
89 | </xsl:if> | ||
90 | <xsl:if test="@autogenargs"> | ||
91 | <tr> | ||
92 | <th align="left">Autogen args:</th> | ||
93 | <td><xsl:value-of select="@autogenargs" /></td> | ||
94 | </tr> | ||
95 | </xsl:if> | ||
96 | <xsl:if test="@cvsroot"> | ||
97 | <tr> | ||
98 | <th align="left">CVS Root:</th> | ||
99 | <td><xsl:value-of select="@cvsroot" /></td> | ||
100 | </tr> | ||
101 | </xsl:if> | ||
102 | <xsl:if test="dependencies"> | ||
103 | <tr> | ||
104 | <th align="left" valign="top">Dependencies:</th> | ||
105 | <td><xsl:apply-templates select="dependencies" /></td> | ||
106 | </tr> | ||
107 | </xsl:if> | ||
108 | </table> | ||
109 | </div> | ||
110 | </xsl:template> | ||
111 | |||
112 | <xsl:template match="svnmodule"> | ||
113 | <div class="{name(.)}"> | ||
114 | <h2> | ||
115 | <xsl:value-of select="@id" /> | ||
116 | <a name="{generate-id(.)}" /> | ||
117 | </h2> | ||
118 | <table> | ||
119 | <tr> | ||
120 | <th align="left">Module:</th> | ||
121 | <td> | ||
122 | <xsl:choose> | ||
123 | <xsl:when test="@module"> | ||
124 | <xsl:value-of select="@module" /> | ||
125 | </xsl:when> | ||
126 | <xsl:otherwise> | ||
127 | <xsl:value-of select="@id" /> | ||
128 | </xsl:otherwise> | ||
129 | </xsl:choose> | ||
130 | </td> | ||
131 | </tr> | ||
132 | <xsl:if test="@checkoutdir"> | ||
133 | <tr> | ||
134 | <th align="left">Checkout directory:</th> | ||
135 | <td><xsl:value-of select="@checkoutdir" /></td> | ||
136 | </tr> | ||
137 | </xsl:if> | ||
138 | <xsl:if test="@autogenargs"> | ||
139 | <tr> | ||
140 | <th align="left">Autogen args:</th> | ||
141 | <td><xsl:value-of select="@autogenargs" /></td> | ||
142 | </tr> | ||
143 | </xsl:if> | ||
144 | <xsl:if test="@svnroot"> | ||
145 | <tr> | ||
146 | <th align="left">SVN Repository:</th> | ||
147 | <td><xsl:value-of select="@svnroot" /><xsl:if test="@path"><xsl:value-of select="@path" /></xsl:if></td> | ||
148 | </tr> | ||
149 | </xsl:if> | ||
150 | <xsl:if test="dependencies"> | ||
151 | <tr> | ||
152 | <th align="left" valign="top">Dependencies:</th> | ||
153 | <td><xsl:apply-templates select="dependencies" /></td> | ||
154 | </tr> | ||
155 | </xsl:if> | ||
156 | </table> | ||
157 | </div> | ||
158 | </xsl:template> | ||
159 | |||
160 | <xsl:template match="metamodule"> | ||
161 | <div class="{name(.)}"> | ||
162 | <h2> | ||
163 | <xsl:value-of select="@id" /> | ||
164 | <a name="{generate-id(.)}" /> | ||
165 | </h2> | ||
166 | <table> | ||
167 | <xsl:if test="dependencies"> | ||
168 | <tr> | ||
169 | <th align="left" valign="top">Dependencies:</th> | ||
170 | <td><xsl:apply-templates select="dependencies" /></td> | ||
171 | </tr> | ||
172 | </xsl:if> | ||
173 | </table> | ||
174 | </div> | ||
175 | </xsl:template> | ||
176 | |||
177 | <xsl:template match="patches"> | ||
178 | <ul> | ||
179 | <xsl:for-each select="patch"> | ||
180 | <li><xsl:value-of select="." /></li> | ||
181 | </xsl:for-each> | ||
182 | </ul> | ||
183 | </xsl:template> | ||
184 | |||
185 | <xsl:template match="tarball"> | ||
186 | <div class="{name(.)}"> | ||
187 | <h2> | ||
188 | <xsl:value-of select="@id" /> | ||
189 | <a name="{generate-id(.)}" /> | ||
190 | </h2> | ||
191 | <table> | ||
192 | <tr> | ||
193 | <th align="left">Version:</th> | ||
194 | <td><xsl:value-of select="@version" /></td> | ||
195 | </tr> | ||
196 | <xsl:if test="@versioncheck"> | ||
197 | <tr> | ||
198 | <th align="left">Version check:</th> | ||
199 | <td><xsl:value-of select="@versioncheck" /></td> | ||
200 | </tr> | ||
201 | </xsl:if> | ||
202 | <tr> | ||
203 | <th align="left">Source:</th> | ||
204 | <td> | ||
205 | <a href="{source/@href}"> | ||
206 | <xsl:value-of select="source/@href" /> | ||
207 | </a> | ||
208 | <xsl:if test="source/@size"> | ||
209 | <xsl:text> (</xsl:text> | ||
210 | <xsl:value-of select="source/@size" /> | ||
211 | <xsl:text> bytes)</xsl:text> | ||
212 | </xsl:if> | ||
213 | </td> | ||
214 | </tr> | ||
215 | <xsl:if test="patches"> | ||
216 | <tr> | ||
217 | <th align="left" valign="top">Patches:</th> | ||
218 | <td><xsl:apply-templates select="patches" /></td> | ||
219 | </tr> | ||
220 | </xsl:if> | ||
221 | <xsl:if test="dependencies"> | ||
222 | <tr> | ||
223 | <th align="left" valign="top">Dependencies:</th> | ||
224 | <td><xsl:apply-templates select="dependencies" /></td> | ||
225 | </tr> | ||
226 | </xsl:if> | ||
227 | </table> | ||
228 | </div> | ||
229 | </xsl:template> | ||
230 | |||
231 | <xsl:template match="mozillamodule"> | ||
232 | <div class="{name(.)}"> | ||
233 | <h2> | ||
234 | <xsl:value-of select="@id" /> | ||
235 | <a name="{generate-id(.)}" /> | ||
236 | </h2> | ||
237 | <table> | ||
238 | <tr> | ||
239 | <th align="left">Module:</th> | ||
240 | <td> | ||
241 | <xsl:choose> | ||
242 | <xsl:when test="@module"> | ||
243 | <xsl:value-of select="@module" /> | ||
244 | </xsl:when> | ||
245 | <xsl:otherwise> | ||
246 | <xsl:value-of select="@id" /> | ||
247 | </xsl:otherwise> | ||
248 | </xsl:choose> | ||
249 | <xsl:if test="@revision"> | ||
250 | <xsl:text> rv:</xsl:text> | ||
251 | <xsl:value-of select="@revision" /> | ||
252 | </xsl:if> | ||
253 | </td> | ||
254 | </tr> | ||
255 | <xsl:if test="@checkoutdir"> | ||
256 | <tr> | ||
257 | <th align="left">Checkout directory:</th> | ||
258 | <td><xsl:value-of select="@checkoutdir" /></td> | ||
259 | </tr> | ||
260 | </xsl:if> | ||
261 | <xsl:if test="@autogenargs"> | ||
262 | <tr> | ||
263 | <th align="left">Autogen args:</th> | ||
264 | <td><xsl:value-of select="@autogenargs" /></td> | ||
265 | </tr> | ||
266 | </xsl:if> | ||
267 | <xsl:if test="@cvsroot"> | ||
268 | <tr> | ||
269 | <th align="left">CVS Root:</th> | ||
270 | <td><xsl:value-of select="@cvsroot" /></td> | ||
271 | </tr> | ||
272 | </xsl:if> | ||
273 | <xsl:if test="dependencies"> | ||
274 | <tr> | ||
275 | <th align="left" valign="top">Dependencies:</th> | ||
276 | <td><xsl:apply-templates select="dependencies" /></td> | ||
277 | </tr> | ||
278 | </xsl:if> | ||
279 | </table> | ||
280 | </div> | ||
281 | </xsl:template> | ||
282 | |||
283 | </xsl:stylesheet> | ||
diff --git a/scripts/jhbuild/modulesets/schemas.xml b/scripts/jhbuild/modulesets/schemas.xml new file mode 100644 index 0000000000..94675e4da6 --- /dev/null +++ b/scripts/jhbuild/modulesets/schemas.xml | |||
@@ -0,0 +1,4 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> | ||
3 | <documentElement localName="moduleset" uri="moduleset.rnc" /> | ||
4 | </locatingRules> | ||
diff --git a/scripts/jhbuild/modulesets/xorg-7.0.modules b/scripts/jhbuild/modulesets/xorg-7.0.modules new file mode 100644 index 0000000000..72e7328ab6 --- /dev/null +++ b/scripts/jhbuild/modulesets/xorg-7.0.modules | |||
@@ -0,0 +1,4847 @@ | |||
1 | <?xml version="1.0" standalone="no"?> <!--*- mode: nxml -*--> | ||
2 | |||
3 | <!DOCTYPE moduleset SYSTEM "moduleset.dtd"> | ||
4 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
5 | <moduleset> | ||
6 | |||
7 | <!-- | ||
8 | Note that all of the dependencies below are in metamodules. The | ||
9 | reason for using this scheme is because the list of tarballs can | ||
10 | be automatically generated whereas the dependency information | ||
11 | currently cannot. | ||
12 | |||
13 | The dependencies work as follows: Each tarball depends on a | ||
14 | metamodule with the same name (see below for the metamodule and | ||
15 | tarball id naming scheme used), and each metamodule can have | ||
16 | dependencies on other tarballs. | ||
17 | |||
18 | Each metamodule id is "<module name>-<tarballname>". | ||
19 | Each tarball id is "<module name>/<tarballname>" | ||
20 | |||
21 | For example, if you need to add a new dependency on | ||
22 | lib/foo-1.2.3.tar.bz2 to app/bar-4.5.6.tar.bz2, then you would | ||
23 | add a <dep package="lib/foo"/> to <metamodule id="app-bar">. | ||
24 | --> | ||
25 | |||
26 | <!-- util --> | ||
27 | |||
28 | <metamodule id="util-util-macros"/> | ||
29 | |||
30 | <metamodule id="util-xorg-cf-files"> | ||
31 | <dependencies> | ||
32 | <dep package="util/util-macros"/> | ||
33 | </dependencies> | ||
34 | </metamodule> | ||
35 | |||
36 | <metamodule id="util-makedepend"> | ||
37 | <dependencies> | ||
38 | <dep package="util/util-macros"/> | ||
39 | </dependencies> | ||
40 | </metamodule> | ||
41 | |||
42 | <metamodule id="util-imake"> | ||
43 | <dependencies> | ||
44 | <dep package="util/util-macros"/> | ||
45 | <dep package="util/xorg-cf-files"/> | ||
46 | <dep package="proto/xproto"/> | ||
47 | </dependencies> | ||
48 | </metamodule> | ||
49 | |||
50 | <metamodule id="util-gccmakedep"> | ||
51 | <dependencies> | ||
52 | <dep package="util/util-macros"/> | ||
53 | </dependencies> | ||
54 | </metamodule> | ||
55 | |||
56 | <metamodule id="util-lndir"> | ||
57 | <dependencies> | ||
58 | <dep package="util/util-macros"/> | ||
59 | <dep package="proto/xproto"/> | ||
60 | </dependencies> | ||
61 | </metamodule> | ||
62 | |||
63 | <metamodule id="util"> | ||
64 | <dependencies> | ||
65 | <dep package="util/util-macros"/> | ||
66 | <dep package="util/xorg-cf-files"/> | ||
67 | <dep package="util/imake"/> | ||
68 | <dep package="util/makedepend"/> | ||
69 | <dep package="util/gccmakedep"/> | ||
70 | <dep package="util/lndir"/> | ||
71 | </dependencies> | ||
72 | </metamodule> | ||
73 | |||
74 | |||
75 | <!-- doc --> | ||
76 | |||
77 | <metamodule id="doc-xorg-sgml-doctools"> | ||
78 | <dependencies> | ||
79 | <dep package="util/util-macros"/> | ||
80 | </dependencies> | ||
81 | </metamodule> | ||
82 | |||
83 | <metamodule id="doc-xorg-docs"> | ||
84 | <dependencies> | ||
85 | <dep package="util/util-macros"/> | ||
86 | <dep package="doc/xorg-sgml-doctools"/> | ||
87 | </dependencies> | ||
88 | </metamodule> | ||
89 | |||
90 | <metamodule id="doc"> | ||
91 | <dependencies> | ||
92 | <dep package="doc/xorg-sgml-doctools"/> | ||
93 | <dep package="doc/xorg-docs"/> | ||
94 | </dependencies> | ||
95 | </metamodule> | ||
96 | |||
97 | |||
98 | <!-- proto --> | ||
99 | |||
100 | <metamodule id="proto-applewmproto"> | ||
101 | <dependencies> | ||
102 | <dep package="util/util-macros"/> | ||
103 | </dependencies> | ||
104 | </metamodule> | ||
105 | |||
106 | <metamodule id="proto-bigreqsproto"> | ||
107 | <dependencies> | ||
108 | <dep package="util/util-macros"/> | ||
109 | </dependencies> | ||
110 | </metamodule> | ||
111 | |||
112 | <metamodule id="proto-compositeproto"> | ||
113 | <dependencies> | ||
114 | <dep package="util/util-macros"/> | ||
115 | </dependencies> | ||
116 | </metamodule> | ||
117 | |||
118 | <metamodule id="proto-damageproto"> | ||
119 | <dependencies> | ||
120 | <dep package="util/util-macros"/> | ||
121 | </dependencies> | ||
122 | </metamodule> | ||
123 | |||
124 | <metamodule id="proto-dmxproto"> | ||
125 | <dependencies> | ||
126 | <dep package="util/util-macros"/> | ||
127 | </dependencies> | ||
128 | </metamodule> | ||
129 | |||
130 | <metamodule id="proto-evieext"> | ||
131 | <dependencies> | ||
132 | <dep package="util/util-macros"/> | ||
133 | </dependencies> | ||
134 | </metamodule> | ||
135 | |||
136 | <metamodule id="proto-fixesproto"> | ||
137 | <dependencies> | ||
138 | <dep package="util/util-macros"/> | ||
139 | </dependencies> | ||
140 | </metamodule> | ||
141 | |||
142 | <metamodule id="proto-fontcacheproto"> | ||
143 | <dependencies> | ||
144 | <dep package="util/util-macros"/> | ||
145 | </dependencies> | ||
146 | </metamodule> | ||
147 | |||
148 | <metamodule id="proto-fontsproto"> | ||
149 | <dependencies> | ||
150 | <dep package="util/util-macros"/> | ||
151 | </dependencies> | ||
152 | </metamodule> | ||
153 | |||
154 | <metamodule id="proto-glproto"> | ||
155 | <dependencies> | ||
156 | <dep package="util/util-macros"/> | ||
157 | </dependencies> | ||
158 | </metamodule> | ||
159 | |||
160 | <metamodule id="proto-inputproto"> | ||
161 | <dependencies> | ||
162 | <dep package="util/util-macros"/> | ||
163 | </dependencies> | ||
164 | </metamodule> | ||
165 | |||
166 | <metamodule id="proto-kbproto"> | ||
167 | <dependencies> | ||
168 | <dep package="util/util-macros"/> | ||
169 | </dependencies> | ||
170 | </metamodule> | ||
171 | |||
172 | <metamodule id="proto-printproto"> | ||
173 | <dependencies> | ||
174 | <dep package="util/util-macros"/> | ||
175 | </dependencies> | ||
176 | </metamodule> | ||
177 | |||
178 | <metamodule id="proto-xproxymanagementprotocol"> | ||
179 | <dependencies> | ||
180 | <dep package="util/util-macros"/> | ||
181 | </dependencies> | ||
182 | </metamodule> | ||
183 | |||
184 | <metamodule id="proto-randrproto"> | ||
185 | <dependencies> | ||
186 | <dep package="util/util-macros"/> | ||
187 | </dependencies> | ||
188 | </metamodule> | ||
189 | |||
190 | <metamodule id="proto-recordproto"> | ||
191 | <dependencies> | ||
192 | <dep package="util/util-macros"/> | ||
193 | </dependencies> | ||
194 | </metamodule> | ||
195 | |||
196 | <metamodule id="proto-renderproto"> | ||
197 | <dependencies> | ||
198 | <dep package="util/util-macros"/> | ||
199 | </dependencies> | ||
200 | </metamodule> | ||
201 | |||
202 | <metamodule id="proto-resourceproto"> | ||
203 | <dependencies> | ||
204 | <dep package="util/util-macros"/> | ||
205 | </dependencies> | ||
206 | </metamodule> | ||
207 | |||
208 | <metamodule id="proto-scrnsaverproto"> | ||
209 | <dependencies> | ||
210 | <dep package="util/util-macros"/> | ||
211 | </dependencies> | ||
212 | </metamodule> | ||
213 | |||
214 | <metamodule id="proto-trapproto"> | ||
215 | <dependencies> | ||
216 | <dep package="util/util-macros"/> | ||
217 | </dependencies> | ||
218 | </metamodule> | ||
219 | |||
220 | <metamodule id="proto-videoproto"> | ||
221 | <dependencies> | ||
222 | <dep package="util/util-macros"/> | ||
223 | </dependencies> | ||
224 | </metamodule> | ||
225 | |||
226 | <metamodule id="proto-windowswmproto"> | ||
227 | <dependencies> | ||
228 | <dep package="util/util-macros"/> | ||
229 | </dependencies> | ||
230 | </metamodule> | ||
231 | |||
232 | <metamodule id="proto-xcmiscproto"> | ||
233 | <dependencies> | ||
234 | <dep package="util/util-macros"/> | ||
235 | </dependencies> | ||
236 | </metamodule> | ||
237 | |||
238 | <metamodule id="proto-xextproto"> | ||
239 | <dependencies> | ||
240 | <dep package="util/util-macros"/> | ||
241 | </dependencies> | ||
242 | </metamodule> | ||
243 | |||
244 | <metamodule id="proto-xf86bigfontproto"> | ||
245 | <dependencies> | ||
246 | <dep package="util/util-macros"/> | ||
247 | </dependencies> | ||
248 | </metamodule> | ||
249 | |||
250 | <metamodule id="proto-xf86dgaproto"> | ||
251 | <dependencies> | ||
252 | <dep package="util/util-macros"/> | ||
253 | </dependencies> | ||
254 | </metamodule> | ||
255 | |||
256 | <metamodule id="proto-xf86driproto"> | ||
257 | <dependencies> | ||
258 | <dep package="util/util-macros"/> | ||
259 | </dependencies> | ||
260 | </metamodule> | ||
261 | |||
262 | <metamodule id="proto-xf86miscproto"> | ||
263 | <dependencies> | ||
264 | <dep package="util/util-macros"/> | ||
265 | </dependencies> | ||
266 | </metamodule> | ||
267 | |||
268 | <metamodule id="proto-xf86rushproto"> | ||
269 | <dependencies> | ||
270 | <dep package="util/util-macros"/> | ||
271 | </dependencies> | ||
272 | </metamodule> | ||
273 | |||
274 | <metamodule id="proto-xf86vidmodeproto"> | ||
275 | <dependencies> | ||
276 | <dep package="util/util-macros"/> | ||
277 | </dependencies> | ||
278 | </metamodule> | ||
279 | |||
280 | <metamodule id="proto-xineramaproto"> | ||
281 | <dependencies> | ||
282 | <dep package="util/util-macros"/> | ||
283 | </dependencies> | ||
284 | </metamodule> | ||
285 | |||
286 | <metamodule id="proto-xproto"> | ||
287 | <dependencies> | ||
288 | <dep package="util/util-macros"/> | ||
289 | </dependencies> | ||
290 | </metamodule> | ||
291 | |||
292 | <metamodule id="proto"> | ||
293 | <dependencies> | ||
294 | <!-- <dep package="proto/applewmproto"/> --> | ||
295 | <dep package="proto/bigreqsproto"/> | ||
296 | <dep package="proto/compositeproto"/> | ||
297 | <dep package="proto/damageproto"/> | ||
298 | <dep package="proto/dmxproto"/> | ||
299 | <dep package="proto/evieext"/> | ||
300 | <dep package="proto/fixesproto"/> | ||
301 | <dep package="proto/fontcacheproto"/> | ||
302 | <dep package="proto/fontsproto"/> | ||
303 | <dep package="proto/glproto"/> | ||
304 | <dep package="proto/inputproto"/> | ||
305 | <dep package="proto/kbproto"/> | ||
306 | <dep package="proto/printproto"/> | ||
307 | <dep package="proto/xproxymanagementprotocol"/> | ||
308 | <dep package="proto/randrproto"/> | ||
309 | <dep package="proto/recordproto"/> | ||
310 | <dep package="proto/renderproto"/> | ||
311 | <dep package="proto/resourceproto"/> | ||
312 | <dep package="proto/scrnsaverproto"/> | ||
313 | <dep package="proto/trapproto"/> | ||
314 | <dep package="proto/videoproto"/> | ||
315 | <!-- <dep package="proto/windowswmproto"/> --> | ||
316 | <dep package="proto/xcmiscproto"/> | ||
317 | <dep package="proto/xextproto"/> | ||
318 | <dep package="proto/xf86bigfontproto"/> | ||
319 | <dep package="proto/xf86dgaproto"/> | ||
320 | <dep package="proto/xf86driproto"/> | ||
321 | <dep package="proto/xf86miscproto"/> | ||
322 | <dep package="proto/xf86rushproto"/> | ||
323 | <dep package="proto/xf86vidmodeproto"/> | ||
324 | <dep package="proto/xineramaproto"/> | ||
325 | <dep package="proto/xproto"/> | ||
326 | </dependencies> | ||
327 | </metamodule> | ||
328 | |||
329 | |||
330 | <!-- lib --> | ||
331 | |||
332 | <metamodule id="lib-libdmx"> | ||
333 | <dependencies> | ||
334 | <dep package="util/util-macros"/> | ||
335 | <dep package="lib/libX11"/> | ||
336 | <dep package="lib/libXext"/> | ||
337 | <dep package="proto/xextproto"/> | ||
338 | <dep package="proto/dmxproto"/> | ||
339 | </dependencies> | ||
340 | </metamodule> | ||
341 | |||
342 | <metamodule id="lib-libfontenc"> | ||
343 | <dependencies> | ||
344 | <dep package="util/util-macros"/> | ||
345 | <dep package="proto/xproto"/> | ||
346 | </dependencies> | ||
347 | </metamodule> | ||
348 | |||
349 | <metamodule id="lib-libAppleWM"> | ||
350 | <dependencies> | ||
351 | <dep package="util/util-macros"/> | ||
352 | <dep package="lib/libX11"/> | ||
353 | <dep package="lib/libXext"/> | ||
354 | </dependencies> | ||
355 | </metamodule> | ||
356 | |||
357 | <metamodule id="lib-libFS"> | ||
358 | <dependencies> | ||
359 | <dep package="util/util-macros"/> | ||
360 | <dep package="proto/xproto"/> | ||
361 | <dep package="proto/fontsproto"/> | ||
362 | <dep package="lib/xtrans"/> | ||
363 | </dependencies> | ||
364 | </metamodule> | ||
365 | |||
366 | <metamodule id="lib-libICE"> | ||
367 | <dependencies> | ||
368 | <dep package="util/util-macros"/> | ||
369 | <dep package="proto/xproto"/> | ||
370 | <dep package="lib/xtrans"/> | ||
371 | </dependencies> | ||
372 | </metamodule> | ||
373 | |||
374 | <metamodule id="lib-liblbxutil"> | ||
375 | <dependencies> | ||
376 | <dep package="util/util-macros"/> | ||
377 | <dep package="proto/xextproto"/> | ||
378 | <dep package="proto/xproto"/> | ||
379 | </dependencies> | ||
380 | </metamodule> | ||
381 | |||
382 | <metamodule id="lib-liboldX"> | ||
383 | <dependencies> | ||
384 | <dep package="util/util-macros"/> | ||
385 | <dep package="lib/libX11"/> | ||
386 | </dependencies> | ||
387 | </metamodule> | ||
388 | |||
389 | <metamodule id="lib-libSM"> | ||
390 | <dependencies> | ||
391 | <dep package="util/util-macros"/> | ||
392 | <dep package="proto/xproto"/> | ||
393 | <dep package="lib/libICE"/> | ||
394 | <dep package="lib/xtrans"/> | ||
395 | </dependencies> | ||
396 | </metamodule> | ||
397 | |||
398 | <metamodule id="lib-libX11"> | ||
399 | <dependencies> | ||
400 | <dep package="util/util-macros"/> | ||
401 | <dep package="proto/xproto"/> | ||
402 | <dep package="proto/bigreqsproto"/> | ||
403 | <dep package="proto/xextproto"/> | ||
404 | <dep package="lib/xtrans"/> | ||
405 | <dep package="lib/libXau"/> | ||
406 | <dep package="proto/xcmiscproto"/> | ||
407 | <dep package="proto/xf86bigfontproto"/> | ||
408 | <dep package="lib/libXdmcp"/> | ||
409 | <dep package="proto/kbproto"/> | ||
410 | <dep package="proto/inputproto"/> | ||
411 | </dependencies> | ||
412 | </metamodule> | ||
413 | |||
414 | <metamodule id="lib-libXau"> | ||
415 | <dependencies> | ||
416 | <dep package="util/util-macros"/> | ||
417 | <dep package="proto/xproto"/> | ||
418 | </dependencies> | ||
419 | </metamodule> | ||
420 | |||
421 | <metamodule id="lib-libXaw"> | ||
422 | <dependencies> | ||
423 | <dep package="util/util-macros"/> | ||
424 | <dep package="proto/xproto"/> | ||
425 | <dep package="lib/libX11"/> | ||
426 | <dep package="lib/libXt"/> | ||
427 | <dep package="lib/libXmu"/> | ||
428 | <dep package="lib/libXpm"/> | ||
429 | </dependencies> | ||
430 | <suggests> | ||
431 | <dep package="lib/libXp"/> | ||
432 | </suggests> | ||
433 | </metamodule> | ||
434 | |||
435 | <metamodule id="lib-libXcomposite"> | ||
436 | <dependencies> | ||
437 | <dep package="util/util-macros"/> | ||
438 | <dep package="proto/compositeproto"/> | ||
439 | <dep package="lib/libX11"/> | ||
440 | <dep package="lib/libXfixes"/> | ||
441 | <dep package="lib/libXext"/> | ||
442 | <dep package="proto/fixesproto"/> | ||
443 | </dependencies> | ||
444 | </metamodule> | ||
445 | |||
446 | <metamodule id="lib-libXcursor"> | ||
447 | <dependencies> | ||
448 | <dep package="util/util-macros"/> | ||
449 | <dep package="lib/libXrender"/> | ||
450 | <dep package="lib/libX11"/> | ||
451 | <dep package="lib/libXfixes"/> | ||
452 | <dep package="proto/fixesproto"/> | ||
453 | </dependencies> | ||
454 | </metamodule> | ||
455 | |||
456 | <metamodule id="lib-libXdamage"> | ||
457 | <dependencies> | ||
458 | <dep package="util/util-macros"/> | ||
459 | <dep package="lib/libX11"/> | ||
460 | <dep package="proto/damageproto"/> | ||
461 | <dep package="lib/libXfixes"/> | ||
462 | <dep package="proto/fixesproto"/> | ||
463 | <dep package="proto/xextproto"/> | ||
464 | </dependencies> | ||
465 | </metamodule> | ||
466 | |||
467 | <metamodule id="lib-libXdmcp"> | ||
468 | <dependencies> | ||
469 | <dep package="util/util-macros"/> | ||
470 | <dep package="proto/xproto"/> | ||
471 | </dependencies> | ||
472 | </metamodule> | ||
473 | |||
474 | <metamodule id="lib-libXevie"> | ||
475 | <dependencies> | ||
476 | <dep package="util/util-macros"/> | ||
477 | <dep package="proto/xproto"/> | ||
478 | <dep package="lib/libX11"/> | ||
479 | <dep package="proto/xextproto"/> | ||
480 | <dep package="lib/libXext"/> | ||
481 | <dep package="proto/evieext"/> | ||
482 | </dependencies> | ||
483 | </metamodule> | ||
484 | |||
485 | <metamodule id="lib-libXext"> | ||
486 | <dependencies> | ||
487 | <dep package="util/util-macros"/> | ||
488 | <dep package="proto/xproto"/> | ||
489 | <dep package="lib/libX11"/> | ||
490 | <dep package="proto/xextproto"/> | ||
491 | <dep package="lib/libXau"/> | ||
492 | </dependencies> | ||
493 | </metamodule> | ||
494 | |||
495 | <metamodule id="lib-libXfixes"> | ||
496 | <dependencies> | ||
497 | <dep package="util/util-macros"/> | ||
498 | <dep package="lib/libX11"/> | ||
499 | <dep package="proto/xproto"/> | ||
500 | <dep package="proto/fixesproto"/> | ||
501 | <dep package="proto/xextproto"/> | ||
502 | </dependencies> | ||
503 | </metamodule> | ||
504 | |||
505 | <metamodule id="lib-libXfont"> | ||
506 | <dependencies> | ||
507 | <dep package="util/util-macros"/> | ||
508 | <dep package="proto/xproto"/> | ||
509 | <dep package="lib/xtrans"/> | ||
510 | <dep package="proto/fontsproto"/> | ||
511 | <dep package="lib/libfontenc"/> | ||
512 | <dep package="proto/fontcacheproto"/> | ||
513 | </dependencies> | ||
514 | </metamodule> | ||
515 | |||
516 | <metamodule id="lib-libXfontcache"> | ||
517 | <dependencies> | ||
518 | <dep package="util/util-macros"/> | ||
519 | <dep package="lib/libX11"/> | ||
520 | <dep package="lib/libXext"/> | ||
521 | <dep package="proto/xextproto"/> | ||
522 | <dep package="proto/fontcacheproto"/> | ||
523 | </dependencies> | ||
524 | </metamodule> | ||
525 | |||
526 | <metamodule id="lib-libXft"> | ||
527 | <dependencies> | ||
528 | <dep package="util/util-macros"/> | ||
529 | <dep package="lib/libXrender"/> | ||
530 | <dep package="fontconfig"/> | ||
531 | </dependencies> | ||
532 | </metamodule> | ||
533 | |||
534 | <metamodule id="lib-libXi"> | ||
535 | <dependencies> | ||
536 | <dep package="util/util-macros"/> | ||
537 | <dep package="proto/xproto"/> | ||
538 | <dep package="lib/libX11"/> | ||
539 | <dep package="proto/xextproto"/> | ||
540 | <dep package="lib/libXext"/> | ||
541 | <dep package="proto/inputproto"/> | ||
542 | </dependencies> | ||
543 | </metamodule> | ||
544 | |||
545 | <metamodule id="lib-libXinerama"> | ||
546 | <dependencies> | ||
547 | <dep package="util/util-macros"/> | ||
548 | <dep package="lib/libX11"/> | ||
549 | <dep package="lib/libXext"/> | ||
550 | <dep package="proto/xextproto"/> | ||
551 | <dep package="proto/xineramaproto"/> | ||
552 | </dependencies> | ||
553 | </metamodule> | ||
554 | |||
555 | <metamodule id="lib-libxkbfile"> | ||
556 | <dependencies> | ||
557 | <dep package="util/util-macros"/> | ||
558 | <dep package="lib/libX11"/> | ||
559 | <dep package="proto/kbproto"/> | ||
560 | </dependencies> | ||
561 | </metamodule> | ||
562 | |||
563 | <metamodule id="lib-libxkbui"> | ||
564 | <dependencies> | ||
565 | <dep package="util/util-macros"/> | ||
566 | <dep package="lib/libX11"/> | ||
567 | <dep package="lib/libXt"/> | ||
568 | <dep package="lib/libxkbfile"/> | ||
569 | </dependencies> | ||
570 | </metamodule> | ||
571 | |||
572 | <metamodule id="lib-libXmu"> | ||
573 | <dependencies> | ||
574 | <dep package="util/util-macros"/> | ||
575 | <dep package="lib/libX11"/> | ||
576 | <dep package="lib/libXt"/> | ||
577 | <dep package="lib/libXext"/> | ||
578 | </dependencies> | ||
579 | </metamodule> | ||
580 | |||
581 | <metamodule id="lib-libXp"> | ||
582 | <dependencies> | ||
583 | <dep package="util/util-macros"/> | ||
584 | <dep package="lib/libX11"/> | ||
585 | <dep package="lib/libXext"/> | ||
586 | <dep package="lib/libXau"/> | ||
587 | <dep package="proto/printproto"/> | ||
588 | </dependencies> | ||
589 | </metamodule> | ||
590 | |||
591 | <metamodule id="lib-libXpm"> | ||
592 | <dependencies> | ||
593 | <dep package="util/util-macros"/> | ||
594 | <dep package="lib/libX11"/> | ||
595 | <dep package="proto/xproto"/> | ||
596 | <dep package="lib/libXt"/> | ||
597 | <dep package="lib/libXext"/> | ||
598 | </dependencies> | ||
599 | </metamodule> | ||
600 | |||
601 | <metamodule id="lib-libXprintAppUtil"> | ||
602 | <dependencies> | ||
603 | <dep package="util/util-macros"/> | ||
604 | <dep package="lib/libX11"/> | ||
605 | <dep package="lib/libXp"/> | ||
606 | <dep package="lib/libXprintUtil"/> | ||
607 | </dependencies> | ||
608 | </metamodule> | ||
609 | |||
610 | <metamodule id="lib-libXprintUtil"> | ||
611 | <dependencies> | ||
612 | <dep package="util/util-macros"/> | ||
613 | <dep package="lib/libX11"/> | ||
614 | <dep package="lib/libXp"/> | ||
615 | </dependencies> | ||
616 | </metamodule> | ||
617 | |||
618 | <metamodule id="lib-libXrandr"> | ||
619 | <dependencies> | ||
620 | <dep package="util/util-macros"/> | ||
621 | <dep package="lib/libX11"/> | ||
622 | <dep package="lib/libXext"/> | ||
623 | <dep package="lib/libXrender"/> | ||
624 | <dep package="proto/randrproto"/> | ||
625 | </dependencies> | ||
626 | </metamodule> | ||
627 | |||
628 | <metamodule id="lib-libXrender"> | ||
629 | <dependencies> | ||
630 | <dep package="util/util-macros"/> | ||
631 | <dep package="proto/renderproto"/> | ||
632 | <dep package="lib/libX11"/> | ||
633 | </dependencies> | ||
634 | </metamodule> | ||
635 | |||
636 | <metamodule id="lib-libXres"> | ||
637 | <dependencies> | ||
638 | <dep package="util/util-macros"/> | ||
639 | <dep package="lib/libX11"/> | ||
640 | <dep package="lib/libXext"/> | ||
641 | <dep package="proto/resourceproto"/> | ||
642 | </dependencies> | ||
643 | </metamodule> | ||
644 | |||
645 | <metamodule id="lib-libXScrnSaver"> | ||
646 | <dependencies> | ||
647 | <dep package="util/util-macros"/> | ||
648 | <dep package="lib/libX11"/> | ||
649 | <dep package="lib/libXext"/> | ||
650 | <dep package="proto/xextproto"/> | ||
651 | <dep package="proto/scrnsaverproto"/> | ||
652 | </dependencies> | ||
653 | </metamodule> | ||
654 | |||
655 | <metamodule id="lib-libXt"> | ||
656 | <dependencies> | ||
657 | <dep package="util/util-macros"/> | ||
658 | <dep package="lib/libSM"/> | ||
659 | <dep package="lib/libX11"/> | ||
660 | <dep package="proto/xproto"/> | ||
661 | <dep package="proto/kbproto"/> | ||
662 | </dependencies> | ||
663 | </metamodule> | ||
664 | |||
665 | <metamodule id="lib-libXTrap"> | ||
666 | <dependencies> | ||
667 | <dep package="util/util-macros"/> | ||
668 | <dep package="lib/libX11"/> | ||
669 | <dep package="lib/libXt"/> | ||
670 | <dep package="proto/trapproto"/> | ||
671 | <dep package="lib/libXext"/> | ||
672 | <dep package="proto/xextproto"/> | ||
673 | </dependencies> | ||
674 | </metamodule> | ||
675 | |||
676 | <metamodule id="lib-libXtst"> | ||
677 | <dependencies> | ||
678 | <dep package="util/util-macros"/> | ||
679 | <dep package="lib/libX11"/> | ||
680 | <dep package="lib/libXext"/> | ||
681 | <dep package="proto/recordproto"/> | ||
682 | <dep package="proto/xextproto"/> | ||
683 | <dep package="proto/inputproto"/> | ||
684 | </dependencies> | ||
685 | </metamodule> | ||
686 | |||
687 | <metamodule id="lib-libXv"> | ||
688 | <dependencies> | ||
689 | <dep package="util/util-macros"/> | ||
690 | <dep package="lib/libX11"/> | ||
691 | <dep package="lib/libXext"/> | ||
692 | <dep package="proto/xextproto"/> | ||
693 | <dep package="proto/videoproto"/> | ||
694 | </dependencies> | ||
695 | </metamodule> | ||
696 | |||
697 | <metamodule id="lib-libXvMC"> | ||
698 | <dependencies> | ||
699 | <dep package="util/util-macros"/> | ||
700 | <dep package="lib/libX11"/> | ||
701 | <dep package="lib/libXext"/> | ||
702 | <dep package="proto/xextproto"/> | ||
703 | <dep package="proto/videoproto"/> | ||
704 | </dependencies> | ||
705 | </metamodule> | ||
706 | |||
707 | <metamodule id="lib-libXxf86dga"> | ||
708 | <dependencies> | ||
709 | <dep package="util/util-macros"/> | ||
710 | <dep package="proto/xproto"/> | ||
711 | <dep package="lib/libX11"/> | ||
712 | <dep package="lib/libXext"/> | ||
713 | <dep package="proto/xextproto"/> | ||
714 | <dep package="proto/xf86dgaproto"/> | ||
715 | </dependencies> | ||
716 | </metamodule> | ||
717 | |||
718 | <metamodule id="lib-libXxf86misc"> | ||
719 | <dependencies> | ||
720 | <dep package="util/util-macros"/> | ||
721 | <dep package="proto/xproto"/> | ||
722 | <dep package="lib/libX11"/> | ||
723 | <dep package="lib/libXext"/> | ||
724 | <dep package="proto/xextproto"/> | ||
725 | <dep package="proto/xf86miscproto"/> | ||
726 | </dependencies> | ||
727 | </metamodule> | ||
728 | |||
729 | <metamodule id="lib-libXxf86vm"> | ||
730 | <dependencies> | ||
731 | <dep package="util/util-macros"/> | ||
732 | <dep package="proto/xproto"/> | ||
733 | <dep package="lib/libX11"/> | ||
734 | <dep package="lib/libXext"/> | ||
735 | <dep package="proto/xextproto"/> | ||
736 | <dep package="proto/xf86vidmodeproto"/> | ||
737 | </dependencies> | ||
738 | </metamodule> | ||
739 | |||
740 | <metamodule id="lib-xtrans"> | ||
741 | <dependencies> | ||
742 | <dep package="util/util-macros"/> | ||
743 | </dependencies> | ||
744 | </metamodule> | ||
745 | |||
746 | <metamodule id="lib"> | ||
747 | <dependencies> | ||
748 | <!-- <dep package="lib/libAppleWM"/> --> | ||
749 | <dep package="lib/libdmx"/> | ||
750 | <dep package="lib/libfontenc"/> | ||
751 | <dep package="lib/libFS"/> | ||
752 | <dep package="lib/libICE"/> | ||
753 | <dep package="lib/liblbxutil"/> | ||
754 | <dep package="lib/liboldX"/> | ||
755 | <dep package="lib/libSM"/> | ||
756 | <!-- <dep package="lib/libWindowsWM"/> --> | ||
757 | <dep package="lib/libX11"/> | ||
758 | <dep package="lib/libXau"/> | ||
759 | <dep package="lib/libXaw"/> | ||
760 | <dep package="lib/libXcomposite"/> | ||
761 | <dep package="lib/libXcursor"/> | ||
762 | <dep package="lib/libXdamage"/> | ||
763 | <dep package="lib/libXdmcp"/> | ||
764 | <dep package="lib/libXevie"/> | ||
765 | <dep package="lib/libXext"/> | ||
766 | <dep package="lib/libXfixes"/> | ||
767 | <dep package="lib/libXfont"/> | ||
768 | <dep package="lib/libXfontcache"/> | ||
769 | <dep package="lib/libXft"/> | ||
770 | <dep package="lib/libXi"/> | ||
771 | <dep package="lib/libXinerama"/> | ||
772 | <dep package="lib/libxkbfile"/> | ||
773 | <dep package="lib/libxkbui"/> | ||
774 | <dep package="lib/libXmu"/> | ||
775 | <dep package="lib/libXp"/> | ||
776 | <dep package="lib/libXpm"/> | ||
777 | <dep package="lib/libXprintAppUtil"/> | ||
778 | <dep package="lib/libXprintUtil"/> | ||
779 | <dep package="lib/libXrandr"/> | ||
780 | <dep package="lib/libXrender"/> | ||
781 | <dep package="lib/libXres"/> | ||
782 | <dep package="lib/libXScrnSaver"/> | ||
783 | <dep package="lib/libXt"/> | ||
784 | <dep package="lib/libXTrap"/> | ||
785 | <dep package="lib/libXtst"/> | ||
786 | <dep package="lib/libXv"/> | ||
787 | <dep package="lib/libXvMC"/> | ||
788 | <dep package="lib/libXxf86dga"/> | ||
789 | <dep package="lib/libXxf86misc"/> | ||
790 | <dep package="lib/libXxf86vm"/> | ||
791 | <dep package="lib/xtrans"/> | ||
792 | </dependencies> | ||
793 | </metamodule> | ||
794 | |||
795 | |||
796 | <!-- font --> | ||
797 | |||
798 | <metamodule id="font-encodings"> | ||
799 | <dependencies> | ||
800 | <dep package="util/util-macros"/> | ||
801 | <dep package="app/mkfontscale"/> | ||
802 | </dependencies> | ||
803 | </metamodule> | ||
804 | |||
805 | <metamodule id="font-font-adobe-100dpi"> | ||
806 | <dependencies> | ||
807 | <dep package="util/util-macros"/> | ||
808 | <dep package="font/font-util"/> | ||
809 | <dep package="app/bdftopcf"/> | ||
810 | <dep package="app/mkfontscale"/> | ||
811 | <dep package="app/mkfontdir"/> | ||
812 | </dependencies> | ||
813 | </metamodule> | ||
814 | |||
815 | <metamodule id="font-font-adobe-75dpi"> | ||
816 | <dependencies> | ||
817 | <dep package="util/util-macros"/> | ||
818 | <dep package="font/font-util"/> | ||
819 | <dep package="app/bdftopcf"/> | ||
820 | <dep package="app/mkfontscale"/> | ||
821 | <dep package="app/mkfontdir"/> | ||
822 | </dependencies> | ||
823 | </metamodule> | ||
824 | |||
825 | <metamodule id="font-font-adobe-utopia-100dpi"> | ||
826 | <dependencies> | ||
827 | <dep package="util/util-macros"/> | ||
828 | <dep package="font/font-util"/> | ||
829 | <dep package="app/bdftopcf"/> | ||
830 | <dep package="app/mkfontscale"/> | ||
831 | <dep package="app/mkfontdir"/> | ||
832 | </dependencies> | ||
833 | </metamodule> | ||
834 | |||
835 | <metamodule id="font-font-adobe-utopia-75dpi"> | ||
836 | <dependencies> | ||
837 | <dep package="util/util-macros"/> | ||
838 | <dep package="font/font-util"/> | ||
839 | <dep package="app/bdftopcf"/> | ||
840 | <dep package="app/mkfontscale"/> | ||
841 | <dep package="app/mkfontdir"/> | ||
842 | </dependencies> | ||
843 | </metamodule> | ||
844 | |||
845 | <metamodule id="font-font-adobe-utopia-type1"> | ||
846 | <dependencies> | ||
847 | <dep package="util/util-macros"/> | ||
848 | <dep package="app/mkfontscale"/> | ||
849 | <dep package="app/mkfontdir"/> | ||
850 | <dep package="fontconfig"/> | ||
851 | </dependencies> | ||
852 | </metamodule> | ||
853 | |||
854 | <metamodule id="font-font-alias"> | ||
855 | <dependencies> | ||
856 | <dep package="util/util-macros"/> | ||
857 | </dependencies> | ||
858 | </metamodule> | ||
859 | |||
860 | <metamodule id="font-font-arabic-misc"> | ||
861 | <dependencies> | ||
862 | <dep package="util/util-macros"/> | ||
863 | <dep package="app/bdftopcf"/> | ||
864 | <dep package="app/mkfontscale"/> | ||
865 | <dep package="app/mkfontdir"/> | ||
866 | </dependencies> | ||
867 | </metamodule> | ||
868 | |||
869 | <metamodule id="font-font-bh-100dpi"> | ||
870 | <dependencies> | ||
871 | <dep package="util/util-macros"/> | ||
872 | <dep package="font/font-util"/> | ||
873 | <dep package="app/bdftopcf"/> | ||
874 | <dep package="app/mkfontscale"/> | ||
875 | <dep package="app/mkfontdir"/> | ||
876 | </dependencies> | ||
877 | </metamodule> | ||
878 | |||
879 | <metamodule id="font-font-bh-75dpi"> | ||
880 | <dependencies> | ||
881 | <dep package="util/util-macros"/> | ||
882 | <dep package="font/font-util"/> | ||
883 | <dep package="app/bdftopcf"/> | ||
884 | <dep package="app/mkfontscale"/> | ||
885 | <dep package="app/mkfontdir"/> | ||
886 | </dependencies> | ||
887 | </metamodule> | ||
888 | |||
889 | <metamodule id="font-font-bh-lucidatypewriter-100dpi"> | ||
890 | <dependencies> | ||
891 | <dep package="util/util-macros"/> | ||
892 | <dep package="font/font-util"/> | ||
893 | <dep package="app/bdftopcf"/> | ||
894 | <dep package="app/mkfontscale"/> | ||
895 | <dep package="app/mkfontdir"/> | ||
896 | </dependencies> | ||
897 | </metamodule> | ||
898 | |||
899 | <metamodule id="font-font-bh-lucidatypewriter-75dpi"> | ||
900 | <dependencies> | ||
901 | <dep package="util/util-macros"/> | ||
902 | <dep package="font/font-util"/> | ||
903 | <dep package="app/bdftopcf"/> | ||
904 | <dep package="app/mkfontscale"/> | ||
905 | <dep package="app/mkfontdir"/> | ||
906 | </dependencies> | ||
907 | </metamodule> | ||
908 | |||
909 | <metamodule id="font-font-bh-ttf"> | ||
910 | <dependencies> | ||
911 | <dep package="util/util-macros"/> | ||
912 | <dep package="app/mkfontscale"/> | ||
913 | <dep package="app/mkfontdir"/> | ||
914 | <dep package="fontconfig"/> | ||
915 | </dependencies> | ||
916 | </metamodule> | ||
917 | |||
918 | <metamodule id="font-font-bh-type1"> | ||
919 | <dependencies> | ||
920 | <dep package="util/util-macros"/> | ||
921 | <dep package="app/mkfontscale"/> | ||
922 | <dep package="app/mkfontdir"/> | ||
923 | <dep package="fontconfig"/> | ||
924 | </dependencies> | ||
925 | </metamodule> | ||
926 | |||
927 | <metamodule id="font-font-bitstream-100dpi"> | ||
928 | <dependencies> | ||
929 | <dep package="util/util-macros"/> | ||
930 | <dep package="app/bdftopcf"/> | ||
931 | <dep package="app/mkfontscale"/> | ||
932 | <dep package="app/mkfontdir"/> | ||
933 | </dependencies> | ||
934 | </metamodule> | ||
935 | |||
936 | <metamodule id="font-font-bitstream-75dpi"> | ||
937 | <dependencies> | ||
938 | <dep package="util/util-macros"/> | ||
939 | <dep package="app/bdftopcf"/> | ||
940 | <dep package="app/mkfontscale"/> | ||
941 | <dep package="app/mkfontdir"/> | ||
942 | </dependencies> | ||
943 | </metamodule> | ||
944 | |||
945 | <metamodule id="font-font-bitstream-speedo"> | ||
946 | <dependencies> | ||
947 | <dep package="util/util-macros"/> | ||
948 | <dep package="app/mkfontdir"/> | ||
949 | </dependencies> | ||
950 | </metamodule> | ||
951 | |||
952 | <metamodule id="font-font-bitstream-type1"> | ||
953 | <dependencies> | ||
954 | <dep package="util/util-macros"/> | ||
955 | <dep package="app/mkfontscale"/> | ||
956 | <dep package="app/mkfontdir"/> | ||
957 | <dep package="fontconfig"/> | ||
958 | </dependencies> | ||
959 | </metamodule> | ||
960 | |||
961 | <metamodule id="font-font-cronyx-cyrillic"> | ||
962 | <dependencies> | ||
963 | <dep package="util/util-macros"/> | ||
964 | <dep package="app/bdftopcf"/> | ||
965 | <dep package="app/mkfontscale"/> | ||
966 | <dep package="app/mkfontdir"/> | ||
967 | </dependencies> | ||
968 | </metamodule> | ||
969 | |||
970 | <metamodule id="font-font-cursor-misc"> | ||
971 | <dependencies> | ||
972 | <dep package="util/util-macros"/> | ||
973 | <dep package="app/bdftopcf"/> | ||
974 | <dep package="app/mkfontscale"/> | ||
975 | <dep package="app/mkfontdir"/> | ||
976 | </dependencies> | ||
977 | </metamodule> | ||
978 | |||
979 | <metamodule id="font-font-daewoo-misc"> | ||
980 | <dependencies> | ||
981 | <dep package="util/util-macros"/> | ||
982 | <dep package="app/bdftopcf"/> | ||
983 | <dep package="app/mkfontscale"/> | ||
984 | <dep package="app/mkfontdir"/> | ||
985 | </dependencies> | ||
986 | </metamodule> | ||
987 | |||
988 | <metamodule id="font-font-dec-misc"> | ||
989 | <dependencies> | ||
990 | <dep package="util/util-macros"/> | ||
991 | <dep package="app/bdftopcf"/> | ||
992 | <dep package="app/mkfontscale"/> | ||
993 | <dep package="app/mkfontdir"/> | ||
994 | </dependencies> | ||
995 | </metamodule> | ||
996 | |||
997 | <metamodule id="font-font-ibm-type1"> | ||
998 | <dependencies> | ||
999 | <dep package="util/util-macros"/> | ||
1000 | <dep package="app/mkfontscale"/> | ||
1001 | <dep package="app/mkfontdir"/> | ||
1002 | <dep package="fontconfig"/> | ||
1003 | </dependencies> | ||
1004 | </metamodule> | ||
1005 | |||
1006 | <metamodule id="font-font-isas-misc"> | ||
1007 | <dependencies> | ||
1008 | <dep package="util/util-macros"/> | ||
1009 | <dep package="app/bdftopcf"/> | ||
1010 | <dep package="app/mkfontscale"/> | ||
1011 | <dep package="app/mkfontdir"/> | ||
1012 | </dependencies> | ||
1013 | </metamodule> | ||
1014 | |||
1015 | <metamodule id="font-font-jis-misc"> | ||
1016 | <dependencies> | ||
1017 | <dep package="util/util-macros"/> | ||
1018 | <dep package="app/bdftopcf"/> | ||
1019 | <dep package="app/mkfontscale"/> | ||
1020 | <dep package="app/mkfontdir"/> | ||
1021 | </dependencies> | ||
1022 | </metamodule> | ||
1023 | |||
1024 | <metamodule id="font-font-micro-misc"> | ||
1025 | <dependencies> | ||
1026 | <dep package="util/util-macros"/> | ||
1027 | <dep package="app/bdftopcf"/> | ||
1028 | <dep package="app/mkfontscale"/> | ||
1029 | <dep package="app/mkfontdir"/> | ||
1030 | </dependencies> | ||
1031 | </metamodule> | ||
1032 | |||
1033 | <metamodule id="font-font-misc-cyrillic"> | ||
1034 | <dependencies> | ||
1035 | <dep package="util/util-macros"/> | ||
1036 | <dep package="app/bdftopcf"/> | ||
1037 | <dep package="app/mkfontscale"/> | ||
1038 | <dep package="app/mkfontdir"/> | ||
1039 | </dependencies> | ||
1040 | </metamodule> | ||
1041 | |||
1042 | <metamodule id="font-font-misc-ethiopic"> | ||
1043 | <dependencies> | ||
1044 | <dep package="util/util-macros"/> | ||
1045 | <dep package="app/mkfontscale"/> | ||
1046 | <dep package="app/mkfontdir"/> | ||
1047 | <dep package="fontconfig"/> | ||
1048 | </dependencies> | ||
1049 | </metamodule> | ||
1050 | |||
1051 | <metamodule id="font-font-misc-meltho"> | ||
1052 | <dependencies> | ||
1053 | <dep package="util/util-macros"/> | ||
1054 | <dep package="app/mkfontscale"/> | ||
1055 | <dep package="app/mkfontdir"/> | ||
1056 | <dep package="fontconfig"/> | ||
1057 | </dependencies> | ||
1058 | </metamodule> | ||
1059 | |||
1060 | <metamodule id="font-font-misc-misc"> | ||
1061 | <dependencies> | ||
1062 | <dep package="util/util-macros"/> | ||
1063 | <dep package="font/font-util"/> | ||
1064 | <dep package="app/bdftopcf"/> | ||
1065 | <dep package="app/mkfontscale"/> | ||
1066 | <dep package="app/mkfontdir"/> | ||
1067 | </dependencies> | ||
1068 | </metamodule> | ||
1069 | |||
1070 | <metamodule id="font-font-mutt-misc"> | ||
1071 | <dependencies> | ||
1072 | <dep package="util/util-macros"/> | ||
1073 | <dep package="app/bdftopcf"/> | ||
1074 | <dep package="app/mkfontscale"/> | ||
1075 | <dep package="app/mkfontdir"/> | ||
1076 | </dependencies> | ||
1077 | </metamodule> | ||
1078 | |||
1079 | <metamodule id="font-font-schumacher-misc"> | ||
1080 | <dependencies> | ||
1081 | <dep package="util/util-macros"/> | ||
1082 | <dep package="font/font-util"/>n | ||
1083 | <dep package="app/bdftopcf"/> | ||
1084 | <dep package="app/mkfontscale"/> | ||
1085 | <dep package="app/mkfontdir"/> | ||
1086 | </dependencies> | ||
1087 | </metamodule> | ||
1088 | |||
1089 | <metamodule id="font-font-screen-cyrillic"> | ||
1090 | <dependencies> | ||
1091 | <dep package="util/util-macros"/> | ||
1092 | <dep package="app/bdftopcf"/> | ||
1093 | <dep package="app/mkfontscale"/> | ||
1094 | <dep package="app/mkfontdir"/> | ||
1095 | </dependencies> | ||
1096 | </metamodule> | ||
1097 | |||
1098 | <metamodule id="font-font-sony-misc"> | ||
1099 | <dependencies> | ||
1100 | <dep package="util/util-macros"/> | ||
1101 | <dep package="app/bdftopcf"/> | ||
1102 | <dep package="app/mkfontscale"/> | ||
1103 | <dep package="app/mkfontdir"/> | ||
1104 | </dependencies> | ||
1105 | </metamodule> | ||
1106 | |||
1107 | <metamodule id="font-font-sun-misc"> | ||
1108 | <dependencies> | ||
1109 | <dep package="util/util-macros"/> | ||
1110 | <dep package="app/bdftopcf"/> | ||
1111 | <dep package="app/mkfontscale"/> | ||
1112 | <dep package="app/mkfontdir"/> | ||
1113 | </dependencies> | ||
1114 | </metamodule> | ||
1115 | |||
1116 | <metamodule id="font-font-util"> | ||
1117 | <dependencies> | ||
1118 | <dep package="util/util-macros"/> | ||
1119 | </dependencies> | ||
1120 | </metamodule> | ||
1121 | |||
1122 | <metamodule id="font-font-winitzki-cyrillic"> | ||
1123 | <dependencies> | ||
1124 | <dep package="util/util-macros"/> | ||
1125 | <dep package="app/bdftopcf"/> | ||
1126 | <dep package="app/mkfontscale"/> | ||
1127 | <dep package="app/mkfontdir"/> | ||
1128 | </dependencies> | ||
1129 | </metamodule> | ||
1130 | |||
1131 | <metamodule id="font-font-xfree86-type1"> | ||
1132 | <dependencies> | ||
1133 | <dep package="util/util-macros"/> | ||
1134 | <dep package="app/mkfontscale"/> | ||
1135 | <dep package="app/mkfontdir"/> | ||
1136 | <dep package="fontconfig"/> | ||
1137 | </dependencies> | ||
1138 | </metamodule> | ||
1139 | |||
1140 | <metamodule id="font"> | ||
1141 | <dependencies> | ||
1142 | <dep package="font/encodings"/> | ||
1143 | <dep package="font/font-adobe-100dpi"/> | ||
1144 | <dep package="font/font-adobe-75dpi"/> | ||
1145 | <dep package="font/font-adobe-utopia-100dpi"/> | ||
1146 | <dep package="font/font-adobe-utopia-75dpi"/> | ||
1147 | <dep package="font/font-adobe-utopia-type1"/> | ||
1148 | <dep package="font/font-alias"/> | ||
1149 | <dep package="font/font-arabic-misc"/> | ||
1150 | <dep package="font/font-bh-100dpi"/> | ||
1151 | <dep package="font/font-bh-75dpi"/> | ||
1152 | <dep package="font/font-bh-lucidatypewriter-100dpi"/> | ||
1153 | <dep package="font/font-bh-lucidatypewriter-75dpi"/> | ||
1154 | <dep package="font/font-bh-ttf"/> | ||
1155 | <dep package="font/font-bh-type1"/> | ||
1156 | <dep package="font/font-bitstream-100dpi"/> | ||
1157 | <dep package="font/font-bitstream-75dpi"/> | ||
1158 | <dep package="font/font-bitstream-speedo"/> | ||
1159 | <dep package="font/font-bitstream-type1"/> | ||
1160 | <dep package="font/font-cronyx-cyrillic"/> | ||
1161 | <dep package="font/font-cursor-misc"/> | ||
1162 | <dep package="font/font-daewoo-misc"/> | ||
1163 | <dep package="font/font-dec-misc"/> | ||
1164 | <dep package="font/font-ibm-type1"/> | ||
1165 | <dep package="font/font-isas-misc"/> | ||
1166 | <dep package="font/font-jis-misc"/> | ||
1167 | <dep package="font/font-micro-misc"/> | ||
1168 | <dep package="font/font-misc-cyrillic"/> | ||
1169 | <dep package="font/font-misc-ethiopic"/> | ||
1170 | <dep package="font/font-misc-meltho"/> | ||
1171 | <dep package="font/font-misc-misc"/> | ||
1172 | <dep package="font/font-mutt-misc"/> | ||
1173 | <dep package="font/font-schumacher-misc"/> | ||
1174 | <dep package="font/font-screen-cyrillic"/> | ||
1175 | <dep package="font/font-sony-misc"/> | ||
1176 | <dep package="font/font-sun-misc"/> | ||
1177 | <dep package="font/font-util"/> | ||
1178 | <dep package="font/font-winitzki-cyrillic"/> | ||
1179 | <dep package="font/font-xfree86-type1"/> | ||
1180 | </dependencies> | ||
1181 | </metamodule> | ||
1182 | |||
1183 | |||
1184 | <!-- data --> | ||
1185 | |||
1186 | <metamodule id="data-xbitmaps"> | ||
1187 | <dependencies> | ||
1188 | <dep package="util/util-macros"/> | ||
1189 | </dependencies> | ||
1190 | </metamodule> | ||
1191 | |||
1192 | <metamodule id="data-xcursor-themes"> | ||
1193 | <dependencies> | ||
1194 | <dep package="util/util-macros"/> | ||
1195 | <dep package="app/xcursorgen"/> | ||
1196 | </dependencies> | ||
1197 | </metamodule> | ||
1198 | |||
1199 | <metamodule id="data-xkbdata"> | ||
1200 | <dependencies> | ||
1201 | <dep package="util/util-macros"/> | ||
1202 | <dep package="app/xkbcomp"/> | ||
1203 | </dependencies> | ||
1204 | </metamodule> | ||
1205 | |||
1206 | <metamodule id="data"> | ||
1207 | <dependencies> | ||
1208 | <dep package="data/xbitmaps"/> | ||
1209 | <dep package="data/xcursor-themes"/> | ||
1210 | <dep package="data/xkbdata"/> | ||
1211 | </dependencies> | ||
1212 | </metamodule> | ||
1213 | |||
1214 | |||
1215 | <!-- app --> | ||
1216 | |||
1217 | <metamodule id="app-appres"> | ||
1218 | <dependencies> | ||
1219 | <dep package="util/util-macros"/> | ||
1220 | <dep package="lib/libX11"/> | ||
1221 | <dep package="lib/libXt"/> | ||
1222 | </dependencies> | ||
1223 | </metamodule> | ||
1224 | |||
1225 | <metamodule id="app-bdftopcf"> | ||
1226 | <dependencies> | ||
1227 | <dep package="util/util-macros"/> | ||
1228 | <dep package="lib/libXfont"/> | ||
1229 | <dep package="proto/fontsproto"/> | ||
1230 | <dep package="proto/xproto"/> | ||
1231 | </dependencies> | ||
1232 | </metamodule> | ||
1233 | |||
1234 | <metamodule id="app-beforelight"> | ||
1235 | <dependencies> | ||
1236 | <dep package="util/util-macros"/> | ||
1237 | <dep package="lib/libX11"/> | ||
1238 | <dep package="lib/libXScrnSaver"/> | ||
1239 | <dep package="lib/libXt"/> | ||
1240 | <dep package="lib/libXaw"/> | ||
1241 | </dependencies> | ||
1242 | </metamodule> | ||
1243 | |||
1244 | <metamodule id="app-bitmap"> | ||
1245 | <dependencies> | ||
1246 | <dep package="util/util-macros"/> | ||
1247 | <dep package="lib/libX11"/> | ||
1248 | <dep package="lib/libXmu"/> | ||
1249 | <dep package="lib/libXaw"/> | ||
1250 | <dep package="data/xbitmaps"/> | ||
1251 | </dependencies> | ||
1252 | </metamodule> | ||
1253 | |||
1254 | <metamodule id="app-constype"> | ||
1255 | <dependencies> | ||
1256 | <dep package="util/util-macros"/> | ||
1257 | </dependencies> | ||
1258 | </metamodule> | ||
1259 | |||
1260 | <metamodule id="app-editres"> | ||
1261 | <dependencies> | ||
1262 | <dep package="util/util-macros"/> | ||
1263 | <dep package="lib/libXaw"/> | ||
1264 | <dep package="lib/libX11"/> | ||
1265 | <dep package="lib/libXt"/> | ||
1266 | <dep package="lib/libXmu"/> | ||
1267 | </dependencies> | ||
1268 | </metamodule> | ||
1269 | |||
1270 | <metamodule id="app-fonttosfnt"> | ||
1271 | <dependencies> | ||
1272 | <dep package="util/util-macros"/> | ||
1273 | <dep package="lib/libX11"/> | ||
1274 | <dep package="lib/libfontenc"/> | ||
1275 | <dep package="freetype2"/> | ||
1276 | </dependencies> | ||
1277 | </metamodule> | ||
1278 | |||
1279 | <metamodule id="app-fslsfonts"> | ||
1280 | <dependencies> | ||
1281 | <dep package="util/util-macros"/> | ||
1282 | <dep package="lib/libX11"/> | ||
1283 | <dep package="lib/libFS"/> | ||
1284 | </dependencies> | ||
1285 | </metamodule> | ||
1286 | |||
1287 | <metamodule id="app-fstobdf"> | ||
1288 | <dependencies> | ||
1289 | <dep package="util/util-macros"/> | ||
1290 | <dep package="lib/libX11"/> | ||
1291 | <dep package="lib/libFS"/> | ||
1292 | </dependencies> | ||
1293 | </metamodule> | ||
1294 | |||
1295 | <metamodule id="app-iceauth"> | ||
1296 | <dependencies> | ||
1297 | <dep package="util/util-macros"/> | ||
1298 | <dep package="lib/libX11"/> | ||
1299 | <dep package="lib/libICE"/> | ||
1300 | </dependencies> | ||
1301 | </metamodule> | ||
1302 | |||
1303 | <metamodule id="app-ico"> | ||
1304 | <dependencies> | ||
1305 | <dep package="util/util-macros"/> | ||
1306 | <dep package="lib/libX11"/> | ||
1307 | </dependencies> | ||
1308 | </metamodule> | ||
1309 | |||
1310 | <metamodule id="app-lbxproxy"> | ||
1311 | <dependencies> | ||
1312 | <dep package="util/util-macros"/> | ||
1313 | <dep package="lib/xtrans"/> | ||
1314 | <dep package="lib/libXext"/> | ||
1315 | <dep package="lib/liblbxutil"/> | ||
1316 | <dep package="lib/libX11"/> | ||
1317 | <dep package="lib/libICE"/> | ||
1318 | <dep package="proto/xproxymanagementprotocol"/> | ||
1319 | <dep package="proto/bigreqsproto"/> | ||
1320 | </dependencies> | ||
1321 | </metamodule> | ||
1322 | |||
1323 | <metamodule id="app-listres"> | ||
1324 | <dependencies> | ||
1325 | <dep package="util/util-macros"/> | ||
1326 | <dep package="lib/libXaw"/> | ||
1327 | <dep package="lib/libX11"/> | ||
1328 | <dep package="lib/libXt"/> | ||
1329 | <dep package="lib/libXmu"/> | ||
1330 | </dependencies> | ||
1331 | </metamodule> | ||
1332 | |||
1333 | <metamodule id="app-luit"> | ||
1334 | <dependencies> | ||
1335 | <dep package="util/util-macros"/> | ||
1336 | <dep package="lib/libX11"/> | ||
1337 | <dep package="lib/libfontenc"/> | ||
1338 | </dependencies> | ||
1339 | </metamodule> | ||
1340 | |||
1341 | <metamodule id="app-mkcfm"> | ||
1342 | <dependencies> | ||
1343 | <dep package="util/util-macros"/> | ||
1344 | <dep package="lib/libX11"/> | ||
1345 | <dep package="lib/libXfont"/> | ||
1346 | <dep package="lib/libFS"/> | ||
1347 | <dep package="proto/fontsproto"/> | ||
1348 | <dep package="lib/libfontenc"/> | ||
1349 | </dependencies> | ||
1350 | </metamodule> | ||
1351 | |||
1352 | <metamodule id="app-mkfontdir"> | ||
1353 | <dependencies> | ||
1354 | <dep package="util/util-macros"/> | ||
1355 | </dependencies> | ||
1356 | </metamodule> | ||
1357 | |||
1358 | <metamodule id="app-mkfontscale"> | ||
1359 | <dependencies> | ||
1360 | <dep package="util/util-macros"/> | ||
1361 | <dep package="lib/libfontenc"/> | ||
1362 | <dep package="freetype2"/> | ||
1363 | </dependencies> | ||
1364 | </metamodule> | ||
1365 | |||
1366 | <metamodule id="app-oclock"> | ||
1367 | <dependencies> | ||
1368 | <dep package="util/util-macros"/> | ||
1369 | <dep package="lib/libX11"/> | ||
1370 | <dep package="lib/libXmu"/> | ||
1371 | <dep package="lib/libXext"/> | ||
1372 | </dependencies> | ||
1373 | </metamodule> | ||
1374 | |||
1375 | <metamodule id="app-proxymngr"> | ||
1376 | <dependencies> | ||
1377 | <dep package="util/util-macros"/> | ||
1378 | <dep package="lib/libX11"/> | ||
1379 | <dep package="lib/libXt"/> | ||
1380 | <dep package="lib/libICE"/> | ||
1381 | <dep package="proto/xproxymanagementprotocol"/> | ||
1382 | </dependencies> | ||
1383 | </metamodule> | ||
1384 | |||
1385 | <metamodule id="app-rgb"> | ||
1386 | <dependencies> | ||
1387 | <dep package="util/util-macros"/> | ||
1388 | <dep package="proto/xproto"/> | ||
1389 | </dependencies> | ||
1390 | </metamodule> | ||
1391 | |||
1392 | <metamodule id="app-rstart"> | ||
1393 | <dependencies> | ||
1394 | <dep package="util/util-macros"/> | ||
1395 | <dep package="lib/libX11"/> | ||
1396 | </dependencies> | ||
1397 | </metamodule> | ||
1398 | |||
1399 | <metamodule id="app-scripts"> | ||
1400 | <dependencies> | ||
1401 | <dep package="util/util-macros"/> | ||
1402 | <dep package="lib/libX11"/> | ||
1403 | </dependencies> | ||
1404 | </metamodule> | ||
1405 | |||
1406 | <metamodule id="app-sessreg"> | ||
1407 | <dependencies> | ||
1408 | <dep package="util/util-macros"/> | ||
1409 | <dep package="proto/xproto"/> | ||
1410 | </dependencies> | ||
1411 | </metamodule> | ||
1412 | |||
1413 | <metamodule id="app-setxkbmap"> | ||
1414 | <dependencies> | ||
1415 | <dep package="util/util-macros"/> | ||
1416 | <dep package="lib/libxkbfile"/> | ||
1417 | <dep package="lib/libX11"/> | ||
1418 | </dependencies> | ||
1419 | </metamodule> | ||
1420 | |||
1421 | <metamodule id="app-showfont"> | ||
1422 | <dependencies> | ||
1423 | <dep package="util/util-macros"/> | ||
1424 | <dep package="lib/libFS"/> | ||
1425 | </dependencies> | ||
1426 | </metamodule> | ||
1427 | |||
1428 | <metamodule id="app-smproxy"> | ||
1429 | <dependencies> | ||
1430 | <dep package="util/util-macros"/> | ||
1431 | <dep package="lib/libXt"/> | ||
1432 | <dep package="lib/libXmu"/> | ||
1433 | </dependencies> | ||
1434 | </metamodule> | ||
1435 | |||
1436 | <metamodule id="app-twm"> | ||
1437 | <dependencies> | ||
1438 | <dep package="util/util-macros"/> | ||
1439 | <dep package="lib/libX11"/> | ||
1440 | <dep package="lib/libXt"/> | ||
1441 | <dep package="lib/libXmu"/> | ||
1442 | </dependencies> | ||
1443 | </metamodule> | ||
1444 | |||
1445 | <metamodule id="app-viewres"> | ||
1446 | <dependencies> | ||
1447 | <dep package="util/util-macros"/> | ||
1448 | <dep package="lib/libXaw"/> | ||
1449 | </dependencies> | ||
1450 | </metamodule> | ||
1451 | |||
1452 | <metamodule id="app-x11perf"> | ||
1453 | <dependencies> | ||
1454 | <dep package="util/util-macros"/> | ||
1455 | <dep package="lib/libX11"/> | ||
1456 | <dep package="lib/libXmu"/> | ||
1457 | </dependencies> | ||
1458 | </metamodule> | ||
1459 | |||
1460 | <metamodule id="app-xauth"> | ||
1461 | <dependencies> | ||
1462 | <dep package="util/util-macros"/> | ||
1463 | <dep package="lib/libX11"/> | ||
1464 | <dep package="lib/libXau"/> | ||
1465 | <dep package="lib/libXext"/> | ||
1466 | <dep package="lib/libXmu"/> | ||
1467 | </dependencies> | ||
1468 | </metamodule> | ||
1469 | |||
1470 | <metamodule id="app-xbiff"> | ||
1471 | <dependencies> | ||
1472 | <dep package="util/util-macros"/> | ||
1473 | <dep package="lib/libXaw"/> | ||
1474 | <dep package="data/xbitmaps"/> | ||
1475 | </dependencies> | ||
1476 | </metamodule> | ||
1477 | |||
1478 | <metamodule id="app-xcalc"> | ||
1479 | <dependencies> | ||
1480 | <dep package="util/util-macros"/> | ||
1481 | <dep package="lib/libXaw"/> | ||
1482 | </dependencies> | ||
1483 | </metamodule> | ||
1484 | |||
1485 | <metamodule id="app-xclipboard"> | ||
1486 | <dependencies> | ||
1487 | <dep package="util/util-macros"/> | ||
1488 | <dep package="lib/libXaw"/> | ||
1489 | </dependencies> | ||
1490 | </metamodule> | ||
1491 | |||
1492 | <metamodule id="app-xclock"> | ||
1493 | <dependencies> | ||
1494 | <dep package="util/util-macros"/> | ||
1495 | <dep package="lib/libXaw"/> | ||
1496 | </dependencies> | ||
1497 | </metamodule> | ||
1498 | |||
1499 | <metamodule id="app-xcmsdb"> | ||
1500 | <dependencies> | ||
1501 | <dep package="util/util-macros"/> | ||
1502 | <dep package="lib/libX11"/> | ||
1503 | </dependencies> | ||
1504 | </metamodule> | ||
1505 | |||
1506 | <metamodule id="app-xconsole"> | ||
1507 | <dependencies> | ||
1508 | <dep package="util/util-macros"/> | ||
1509 | <dep package="lib/libXaw"/> | ||
1510 | </dependencies> | ||
1511 | </metamodule> | ||
1512 | |||
1513 | <metamodule id="app-xcursorgen"> | ||
1514 | <dependencies> | ||
1515 | <dep package="util/util-macros"/> | ||
1516 | <dep package="lib/libX11"/> | ||
1517 | <dep package="lib/libXcursor"/> | ||
1518 | </dependencies> | ||
1519 | </metamodule> | ||
1520 | |||
1521 | <metamodule id="app-xdbedizzy"> | ||
1522 | <dependencies> | ||
1523 | <dep package="util/util-macros"/> | ||
1524 | <dep package="lib/libXext"/> | ||
1525 | </dependencies> | ||
1526 | </metamodule> | ||
1527 | |||
1528 | <metamodule id="app-xditview"> | ||
1529 | <dependencies> | ||
1530 | <dep package="util/util-macros"/> | ||
1531 | <dep package="lib/libXaw"/> | ||
1532 | </dependencies> | ||
1533 | </metamodule> | ||
1534 | |||
1535 | <metamodule id="app-xdm"> | ||
1536 | <dependencies> | ||
1537 | <dep package="util/util-macros"/> | ||
1538 | <dep package="lib/libXaw"/> | ||
1539 | <dep package="lib/libXdmcp"/> | ||
1540 | <dep package="proto/xproto"/> | ||
1541 | <dep package="lib/libXau"/> | ||
1542 | <dep package="lib/libXt"/> | ||
1543 | </dependencies> | ||
1544 | <suggests> | ||
1545 | <dep package="lib/libXinerama"/> | ||
1546 | <dep package="lib/libXpm"/> | ||
1547 | </suggests> | ||
1548 | </metamodule> | ||
1549 | |||
1550 | <metamodule id="app-xdpyinfo"> | ||
1551 | <dependencies> | ||
1552 | <dep package="util/util-macros"/> | ||
1553 | <dep package="lib/libX11"/> | ||
1554 | <dep package="lib/libXext"/> | ||
1555 | <dep package="lib/libXtst"/> | ||
1556 | </dependencies> | ||
1557 | <suggests> | ||
1558 | <dep package="proto/xextproto"/> | ||
1559 | <dep package="proto/kbproto"/> | ||
1560 | <dep package="proto/xf86vidmodeproto"/> | ||
1561 | <dep package="lib/libXxf86vm"/> | ||
1562 | <dep package="proto/xf86dgaproto"/> | ||
1563 | <dep package="lib/libXxf86dga"/> | ||
1564 | <dep package="proto/xf86miscproto"/> | ||
1565 | <dep package="lib/libXxf86misc"/> | ||
1566 | <dep package="proto/inputproto"/> | ||
1567 | <dep package="lib/libXi"/> | ||
1568 | <dep package="proto/renderproto"/> | ||
1569 | <dep package="lib/libXrender"/> | ||
1570 | <dep package="proto/xineramaproto"/> | ||
1571 | <dep package="lib/libXinerama"/> | ||
1572 | <dep package="proto/dmxproto"/> | ||
1573 | <dep package="lib/libdmx"/> | ||
1574 | <dep package="proto/printproto"/> | ||
1575 | <dep package="lib/libXp"/> | ||
1576 | </suggests> | ||
1577 | </metamodule> | ||
1578 | |||
1579 | <metamodule id="app-xdriinfo"> | ||
1580 | <dependencies> | ||
1581 | <dep package="util/util-macros"/> | ||
1582 | <dep package="lib/libX11"/> | ||
1583 | <dep package="proto/glproto"/> | ||
1584 | </dependencies> | ||
1585 | </metamodule> | ||
1586 | |||
1587 | <metamodule id="app-xedit"> | ||
1588 | <dependencies> | ||
1589 | <dep package="util/util-macros"/> | ||
1590 | <dep package="lib/libXaw"/> | ||
1591 | </dependencies> | ||
1592 | </metamodule> | ||
1593 | |||
1594 | <metamodule id="app-xev"> | ||
1595 | <dependencies> | ||
1596 | <dep package="util/util-macros"/> | ||
1597 | <dep package="lib/libX11"/> | ||
1598 | </dependencies> | ||
1599 | </metamodule> | ||
1600 | |||
1601 | <metamodule id="app-xeyes"> | ||
1602 | <dependencies> | ||
1603 | <dep package="util/util-macros"/> | ||
1604 | <dep package="lib/libX11"/> | ||
1605 | <dep package="lib/libXt"/> | ||
1606 | <dep package="lib/libXext"/> | ||
1607 | <dep package="lib/libXmu"/> | ||
1608 | </dependencies> | ||
1609 | </metamodule> | ||
1610 | |||
1611 | <metamodule id="app-xf86dga"> | ||
1612 | <dependencies> | ||
1613 | <dep package="util/util-macros"/> | ||
1614 | <dep package="lib/libX11"/> | ||
1615 | <dep package="lib/libXxf86dga"/> | ||
1616 | <dep package="lib/libXt"/> | ||
1617 | <dep package="lib/libXaw"/> | ||
1618 | <dep package="lib/libXmu"/> | ||
1619 | </dependencies> | ||
1620 | </metamodule> | ||
1621 | |||
1622 | <metamodule id="app-xfd"> | ||
1623 | <dependencies> | ||
1624 | <dep package="util/util-macros"/> | ||
1625 | <dep package="lib/libXaw"/> | ||
1626 | <dep package="lib/libXft"/> | ||
1627 | <dep package="freetype2"/> | ||
1628 | <dep package="fontconfig"/> | ||
1629 | </dependencies> | ||
1630 | </metamodule> | ||
1631 | |||
1632 | <metamodule id="app-xfindproxy"> | ||
1633 | <dependencies> | ||
1634 | <dep package="util/util-macros"/> | ||
1635 | <dep package="lib/libX11"/> | ||
1636 | <dep package="lib/libICE"/> | ||
1637 | <dep package="lib/libXt"/> | ||
1638 | <dep package="proto/xproxymanagementprotocol"/> | ||
1639 | </dependencies> | ||
1640 | </metamodule> | ||
1641 | |||
1642 | <metamodule id="app-xfontsel"> | ||
1643 | <dependencies> | ||
1644 | <dep package="util/util-macros"/> | ||
1645 | <dep package="lib/libXaw"/> | ||
1646 | </dependencies> | ||
1647 | </metamodule> | ||
1648 | |||
1649 | <metamodule id="app-xfs"> | ||
1650 | <dependencies> | ||
1651 | <dep package="util/util-macros"/> | ||
1652 | <dep package="lib/libFS"/> | ||
1653 | <dep package="lib/libXfont"/> | ||
1654 | <dep package="proto/fontsproto"/> | ||
1655 | <dep package="lib/xtrans"/> | ||
1656 | </dependencies> | ||
1657 | </metamodule> | ||
1658 | |||
1659 | <metamodule id="app-xfsinfo"> | ||
1660 | <dependencies> | ||
1661 | <dep package="util/util-macros"/> | ||
1662 | <dep package="lib/libX11"/> | ||
1663 | <dep package="lib/libFS"/> | ||
1664 | </dependencies> | ||
1665 | </metamodule> | ||
1666 | |||
1667 | <metamodule id="app-xfwp"> | ||
1668 | <dependencies> | ||
1669 | <dep package="util/util-macros"/> | ||
1670 | <dep package="lib/libX11"/> | ||
1671 | <dep package="lib/libICE"/> | ||
1672 | <dep package="proto/xproxymanagementprotocol"/> | ||
1673 | </dependencies> | ||
1674 | </metamodule> | ||
1675 | |||
1676 | <metamodule id="app-xgamma"> | ||
1677 | <dependencies> | ||
1678 | <dep package="util/util-macros"/> | ||
1679 | <dep package="lib/libXxf86vm"/> | ||
1680 | </dependencies> | ||
1681 | </metamodule> | ||
1682 | |||
1683 | <metamodule id="app-xgc"> | ||
1684 | <dependencies> | ||
1685 | <dep package="util/util-macros"/> | ||
1686 | <dep package="lib/libXaw"/> | ||
1687 | </dependencies> | ||
1688 | </metamodule> | ||
1689 | |||
1690 | <metamodule id="app-xhost"> | ||
1691 | <dependencies> | ||
1692 | <dep package="util/util-macros"/> | ||
1693 | <dep package="lib/libX11"/> | ||
1694 | <dep package="lib/libXmu"/> | ||
1695 | <dep package="lib/libXau"/> | ||
1696 | </dependencies> | ||
1697 | </metamodule> | ||
1698 | |||
1699 | <metamodule id="app-xinit"> | ||
1700 | <dependencies> | ||
1701 | <dep package="util/util-macros"/> | ||
1702 | <dep package="lib/libX11"/> | ||
1703 | </dependencies> | ||
1704 | </metamodule> | ||
1705 | |||
1706 | <metamodule id="app-xkbcomp"> | ||
1707 | <dependencies> | ||
1708 | <dep package="util/util-macros"/> | ||
1709 | <dep package="lib/libX11"/> | ||
1710 | <dep package="lib/libxkbfile"/> | ||
1711 | </dependencies> | ||
1712 | </metamodule> | ||
1713 | |||
1714 | <metamodule id="app-xkbevd"> | ||
1715 | <dependencies> | ||
1716 | <dep package="util/util-macros"/> | ||
1717 | <dep package="lib/libxkbfile"/> | ||
1718 | </dependencies> | ||
1719 | </metamodule> | ||
1720 | |||
1721 | <metamodule id="app-xkbprint"> | ||
1722 | <dependencies> | ||
1723 | <dep package="util/util-macros"/> | ||
1724 | <dep package="lib/libxkbfile"/> | ||
1725 | </dependencies> | ||
1726 | </metamodule> | ||
1727 | |||
1728 | <metamodule id="app-xkbutils"> | ||
1729 | <dependencies> | ||
1730 | <dep package="util/util-macros"/> | ||
1731 | <dep package="lib/libxkbfile"/> | ||
1732 | <dep package="lib/libXaw"/> | ||
1733 | <dep package="proto/inputproto"/> | ||
1734 | </dependencies> | ||
1735 | </metamodule> | ||
1736 | |||
1737 | <metamodule id="app-xkill"> | ||
1738 | <dependencies> | ||
1739 | <dep package="util/util-macros"/> | ||
1740 | <dep package="lib/libX11"/> | ||
1741 | <dep package="lib/libXmu"/> | ||
1742 | </dependencies> | ||
1743 | </metamodule> | ||
1744 | |||
1745 | <metamodule id="app-xload"> | ||
1746 | <dependencies> | ||
1747 | <dep package="util/util-macros"/> | ||
1748 | <dep package="lib/libXaw"/> | ||
1749 | </dependencies> | ||
1750 | </metamodule> | ||
1751 | |||
1752 | <metamodule id="app-xlogo"> | ||
1753 | <dependencies> | ||
1754 | <dep package="util/util-macros"/> | ||
1755 | <dep package="lib/libXaw"/> | ||
1756 | </dependencies> | ||
1757 | </metamodule> | ||
1758 | |||
1759 | <metamodule id="app-xlsatoms"> | ||
1760 | <dependencies> | ||
1761 | <dep package="util/util-macros"/> | ||
1762 | <dep package="lib/libX11"/> | ||
1763 | <dep package="lib/libXmu"/> | ||
1764 | </dependencies> | ||
1765 | </metamodule> | ||
1766 | |||
1767 | <metamodule id="app-xlsclients"> | ||
1768 | <dependencies> | ||
1769 | <dep package="util/util-macros"/> | ||
1770 | <dep package="lib/libX11"/> | ||
1771 | <dep package="lib/libXmu"/> | ||
1772 | </dependencies> | ||
1773 | </metamodule> | ||
1774 | |||
1775 | <metamodule id="app-xlsfonts"> | ||
1776 | <dependencies> | ||
1777 | <dep package="util/util-macros"/> | ||
1778 | <dep package="lib/libX11"/> | ||
1779 | </dependencies> | ||
1780 | </metamodule> | ||
1781 | |||
1782 | <metamodule id="app-xmag"> | ||
1783 | <dependencies> | ||
1784 | <dep package="util/util-macros"/> | ||
1785 | <dep package="lib/libXaw"/> | ||
1786 | </dependencies> | ||
1787 | </metamodule> | ||
1788 | |||
1789 | <metamodule id="app-xman"> | ||
1790 | <dependencies> | ||
1791 | <dep package="util/util-macros"/> | ||
1792 | <dep package="lib/libXaw"/> | ||
1793 | </dependencies> | ||
1794 | </metamodule> | ||
1795 | |||
1796 | <metamodule id="app-xmessage"> | ||
1797 | <dependencies> | ||
1798 | <dep package="util/util-macros"/> | ||
1799 | <dep package="lib/libXaw"/> | ||
1800 | </dependencies> | ||
1801 | </metamodule> | ||
1802 | |||
1803 | <metamodule id="app-xmh"> | ||
1804 | <dependencies> | ||
1805 | <dep package="util/util-macros"/> | ||
1806 | <dep package="lib/libXaw"/> | ||
1807 | </dependencies> | ||
1808 | </metamodule> | ||
1809 | |||
1810 | <metamodule id="app-xmodmap"> | ||
1811 | <dependencies> | ||
1812 | <dep package="util/util-macros"/> | ||
1813 | <dep package="lib/libX11"/> | ||
1814 | </dependencies> | ||
1815 | </metamodule> | ||
1816 | |||
1817 | <metamodule id="app-xmore"> | ||
1818 | <dependencies> | ||
1819 | <dep package="util/util-macros"/> | ||
1820 | <dep package="lib/libXaw"/> | ||
1821 | </dependencies> | ||
1822 | </metamodule> | ||
1823 | |||
1824 | <metamodule id="app-xphelloworld"> | ||
1825 | <dependencies> | ||
1826 | <dep package="util/util-macros"/> | ||
1827 | <dep package="lib/libX11"/> | ||
1828 | <dep package="lib/libXaw"/> | ||
1829 | <dep package="lib/libXprintUtil"/> | ||
1830 | <dep package="lib/libXt"/> | ||
1831 | </dependencies> | ||
1832 | </metamodule> | ||
1833 | |||
1834 | <metamodule id="app-xplsprinters"> | ||
1835 | <dependencies> | ||
1836 | <dep package="util/util-macros"/> | ||
1837 | <dep package="lib/libX11"/> | ||
1838 | <dep package="lib/libXprintUtil"/> | ||
1839 | <dep package="lib/libXt"/> | ||
1840 | </dependencies> | ||
1841 | </metamodule> | ||
1842 | |||
1843 | <metamodule id="app-xpr"> | ||
1844 | <dependencies> | ||
1845 | <dep package="util/util-macros"/> | ||
1846 | <dep package="lib/libX11"/> | ||
1847 | <dep package="lib/libXmu"/> | ||
1848 | </dependencies> | ||
1849 | </metamodule> | ||
1850 | |||
1851 | <metamodule id="app-xprehashprinterlist"> | ||
1852 | <dependencies> | ||
1853 | <dep package="util/util-macros"/> | ||
1854 | <dep package="lib/libX11"/> | ||
1855 | <dep package="lib/libXp"/> | ||
1856 | </dependencies> | ||
1857 | </metamodule> | ||
1858 | |||
1859 | <metamodule id="app-xprop"> | ||
1860 | <dependencies> | ||
1861 | <dep package="util/util-macros"/> | ||
1862 | <dep package="lib/libX11"/> | ||
1863 | <dep package="lib/libXmu"/> | ||
1864 | </dependencies> | ||
1865 | </metamodule> | ||
1866 | |||
1867 | <metamodule id="app-xrandr"> | ||
1868 | <dependencies> | ||
1869 | <dep package="util/util-macros"/> | ||
1870 | <dep package="lib/libX11"/> | ||
1871 | <dep package="lib/libXrandr"/> | ||
1872 | </dependencies> | ||
1873 | </metamodule> | ||
1874 | |||
1875 | <metamodule id="app-xrdb"> | ||
1876 | <dependencies> | ||
1877 | <dep package="util/util-macros"/> | ||
1878 | <dep package="lib/libX11"/> | ||
1879 | <dep package="lib/libXmu"/> | ||
1880 | </dependencies> | ||
1881 | </metamodule> | ||
1882 | |||
1883 | <metamodule id="app-xrefresh"> | ||
1884 | <dependencies> | ||
1885 | <dep package="util/util-macros"/> | ||
1886 | <dep package="lib/libX11"/> | ||
1887 | </dependencies> | ||
1888 | </metamodule> | ||
1889 | |||
1890 | <metamodule id="app-xrx"> | ||
1891 | <dependencies> | ||
1892 | <dep package="util/util-macros"/> | ||
1893 | <dep package="lib/libX11"/> | ||
1894 | <dep package="lib/libXt"/> | ||
1895 | <dep package="lib/libXext"/> | ||
1896 | <dep package="lib/xtrans"/> | ||
1897 | <dep package="proto/xproxymanagementprotocol"/> | ||
1898 | </dependencies> | ||
1899 | </metamodule> | ||
1900 | |||
1901 | <metamodule id="app-xset"> | ||
1902 | <dependencies> | ||
1903 | <dep package="util/util-macros"/> | ||
1904 | <dep package="lib/libXmu"/> | ||
1905 | </dependencies> | ||
1906 | <suggests> | ||
1907 | <dep package="proto/xextproto"/> | ||
1908 | <dep package="lib/libXext"/> | ||
1909 | <dep package="proto/kbproto"/> | ||
1910 | <dep package="lib/libX11"/> | ||
1911 | <dep package="proto/xf86miscproto"/> | ||
1912 | <dep package="lib/libXxf86misc"/> | ||
1913 | <dep package="proto/fontcacheproto"/> | ||
1914 | <dep package="lib/libXfontcache"/> | ||
1915 | <dep package="proto/printproto"/> | ||
1916 | <dep package="lib/libXp"/> | ||
1917 | </suggests> | ||
1918 | </metamodule> | ||
1919 | |||
1920 | <metamodule id="app-xsetmode"> | ||
1921 | <dependencies> | ||
1922 | <dep package="util/util-macros"/> | ||
1923 | <dep package="lib/libX11"/> | ||
1924 | <dep package="lib/libXi"/> | ||
1925 | </dependencies> | ||
1926 | </metamodule> | ||
1927 | |||
1928 | <metamodule id="app-xsetpointer"> | ||
1929 | <dependencies> | ||
1930 | <dep package="util/util-macros"/> | ||
1931 | <dep package="lib/libX11"/> | ||
1932 | <dep package="lib/libXi"/> | ||
1933 | </dependencies> | ||
1934 | </metamodule> | ||
1935 | |||
1936 | <metamodule id="app-xsetroot"> | ||
1937 | <dependencies> | ||
1938 | <dep package="util/util-macros"/> | ||
1939 | <dep package="lib/libX11"/> | ||
1940 | <dep package="lib/libXmu"/> | ||
1941 | <dep package="data/xbitmaps"/> | ||
1942 | </dependencies> | ||
1943 | </metamodule> | ||
1944 | |||
1945 | <metamodule id="app-xsm"> | ||
1946 | <dependencies> | ||
1947 | <dep package="util/util-macros"/> | ||
1948 | <dep package="lib/libXaw"/> | ||
1949 | </dependencies> | ||
1950 | </metamodule> | ||
1951 | |||
1952 | <metamodule id="app-xstdcmap"> | ||
1953 | <dependencies> | ||
1954 | <dep package="util/util-macros"/> | ||
1955 | <dep package="lib/libX11"/> | ||
1956 | <dep package="lib/libXmu"/> | ||
1957 | </dependencies> | ||
1958 | </metamodule> | ||
1959 | |||
1960 | <metamodule id="app-xtrap"> | ||
1961 | <dependencies> | ||
1962 | <dep package="util/util-macros"/> | ||
1963 | <dep package="lib/libX11"/> | ||
1964 | <dep package="lib/libXTrap"/> | ||
1965 | </dependencies> | ||
1966 | </metamodule> | ||
1967 | |||
1968 | <metamodule id="app-xvidtune"> | ||
1969 | <dependencies> | ||
1970 | <dep package="util/util-macros"/> | ||
1971 | <dep package="lib/libXaw"/> | ||
1972 | <dep package="lib/libXxf86vm"/> | ||
1973 | </dependencies> | ||
1974 | </metamodule> | ||
1975 | |||
1976 | <metamodule id="app-xvinfo"> | ||
1977 | <dependencies> | ||
1978 | <dep package="util/util-macros"/> | ||
1979 | <dep package="lib/libX11"/> | ||
1980 | <dep package="lib/libXv"/> | ||
1981 | </dependencies> | ||
1982 | </metamodule> | ||
1983 | |||
1984 | <metamodule id="app-xwd"> | ||
1985 | <dependencies> | ||
1986 | <dep package="util/util-macros"/> | ||
1987 | <dep package="lib/libX11"/> | ||
1988 | <dep package="lib/libXmu"/> | ||
1989 | </dependencies> | ||
1990 | </metamodule> | ||
1991 | |||
1992 | <metamodule id="app-xwininfo"> | ||
1993 | <dependencies> | ||
1994 | <dep package="util/util-macros"/> | ||
1995 | <dep package="lib/libX11"/> | ||
1996 | <dep package="lib/libXmu"/> | ||
1997 | </dependencies> | ||
1998 | </metamodule> | ||
1999 | |||
2000 | <metamodule id="app-xwud"> | ||
2001 | <dependencies> | ||
2002 | <dep package="util/util-macros"/> | ||
2003 | <dep package="lib/libX11"/> | ||
2004 | </dependencies> | ||
2005 | </metamodule> | ||
2006 | |||
2007 | <metamodule id="app"> | ||
2008 | <dependencies> | ||
2009 | <dep package="app/appres"/> | ||
2010 | <dep package="app/bdftopcf"/> | ||
2011 | <dep package="app/beforelight"/> | ||
2012 | <dep package="app/bitmap"/> | ||
2013 | <!-- <dep package="app/constype"/> --> | ||
2014 | <dep package="app/editres"/> | ||
2015 | <dep package="app/fonttosfnt"/> | ||
2016 | <dep package="app/fslsfonts"/> | ||
2017 | <dep package="app/fstobdf"/> | ||
2018 | <dep package="app/iceauth"/> | ||
2019 | <dep package="app/ico"/> | ||
2020 | <dep package="app/lbxproxy"/> | ||
2021 | <dep package="app/listres"/> | ||
2022 | <dep package="app/luit"/> | ||
2023 | <dep package="app/mkcfm"/> | ||
2024 | <dep package="app/mkfontdir"/> | ||
2025 | <dep package="app/mkfontscale"/> | ||
2026 | <dep package="app/oclock"/> | ||
2027 | <dep package="app/proxymngr"/> | ||
2028 | <dep package="app/rgb"/> | ||
2029 | <dep package="app/rstart"/> | ||
2030 | <dep package="app/scripts"/> | ||
2031 | <dep package="app/sessreg"/> | ||
2032 | <dep package="app/setxkbmap"/> | ||
2033 | <dep package="app/showfont"/> | ||
2034 | <dep package="app/smproxy"/> | ||
2035 | <dep package="app/twm"/> | ||
2036 | <dep package="app/viewres"/> | ||
2037 | <dep package="app/x11perf"/> | ||
2038 | <dep package="app/xauth"/> | ||
2039 | <dep package="app/xbiff"/> | ||
2040 | <dep package="app/xcalc"/> | ||
2041 | <dep package="app/xclipboard"/> | ||
2042 | <dep package="app/xclock"/> | ||
2043 | <dep package="app/xcmsdb"/> | ||
2044 | <dep package="app/xconsole"/> | ||
2045 | <dep package="app/xcursorgen"/> | ||
2046 | <dep package="app/xdbedizzy"/> | ||
2047 | <dep package="app/xditview"/> | ||
2048 | <dep package="app/xdm"/> | ||
2049 | <dep package="app/xdpyinfo"/> | ||
2050 | <dep package="app/xdriinfo"/> | ||
2051 | <dep package="app/xedit"/> | ||
2052 | <dep package="app/xev"/> | ||
2053 | <dep package="app/xeyes"/> | ||
2054 | <dep package="app/xf86dga"/> | ||
2055 | <dep package="app/xfd"/> | ||
2056 | <dep package="app/xfindproxy"/> | ||
2057 | <dep package="app/xfontsel"/> | ||
2058 | <dep package="app/xfs"/> | ||
2059 | <dep package="app/xfsinfo"/> | ||
2060 | <dep package="app/xfwp"/> | ||
2061 | <dep package="app/xgamma"/> | ||
2062 | <dep package="app/xgc"/> | ||
2063 | <dep package="app/xhost"/> | ||
2064 | <dep package="app/xinit"/> | ||
2065 | <dep package="app/xkbcomp"/> | ||
2066 | <dep package="app/xkbevd"/> | ||
2067 | <dep package="app/xkbprint"/> | ||
2068 | <dep package="app/xkbutils"/> | ||
2069 | <dep package="app/xkill"/> | ||
2070 | <dep package="app/xload"/> | ||
2071 | <dep package="app/xlogo"/> | ||
2072 | <dep package="app/xlsatoms"/> | ||
2073 | <dep package="app/xlsclients"/> | ||
2074 | <dep package="app/xlsfonts"/> | ||
2075 | <dep package="app/xmag"/> | ||
2076 | <dep package="app/xman"/> | ||
2077 | <dep package="app/xmessage"/> | ||
2078 | <dep package="app/xmh"/> | ||
2079 | <dep package="app/xmodmap"/> | ||
2080 | <dep package="app/xmore"/> | ||
2081 | <dep package="app/xphelloworld"/> | ||
2082 | <dep package="app/xplsprinters"/> | ||
2083 | <dep package="app/xpr"/> | ||
2084 | <dep package="app/xprehashprinterlist"/> | ||
2085 | <dep package="app/xprop"/> | ||
2086 | <dep package="app/xrandr"/> | ||
2087 | <dep package="app/xrdb"/> | ||
2088 | <dep package="app/xrefresh"/> | ||
2089 | <dep package="app/xrx"/> | ||
2090 | <dep package="app/xset"/> | ||
2091 | <dep package="app/xsetmode"/> | ||
2092 | <dep package="app/xsetpointer"/> | ||
2093 | <dep package="app/xsetroot"/> | ||
2094 | <dep package="app/xsm"/> | ||
2095 | <dep package="app/xstdcmap"/> | ||
2096 | <dep package="app/xtrap"/> | ||
2097 | <dep package="app/xvidtune"/> | ||
2098 | <dep package="app/xvinfo"/> | ||
2099 | <dep package="app/xwd"/> | ||
2100 | <dep package="app/xwininfo"/> | ||
2101 | <dep package="app/xwud"/> | ||
2102 | </dependencies> | ||
2103 | </metamodule> | ||
2104 | |||
2105 | |||
2106 | <!-- input drivers --> | ||
2107 | |||
2108 | <metamodule id="driver-xf86-input-acecad"> | ||
2109 | <dependencies> | ||
2110 | <dep package="util/util-macros"/> | ||
2111 | <dep package="proto/xproto"/> | ||
2112 | <dep package="xserver/xorg-server"/> | ||
2113 | </dependencies> | ||
2114 | </metamodule> | ||
2115 | |||
2116 | <metamodule id="driver-xf86-input-aiptek"> | ||
2117 | <dependencies> | ||
2118 | <dep package="util/util-macros"/> | ||
2119 | <dep package="proto/xproto"/> | ||
2120 | <dep package="xserver/xorg-server"/> | ||
2121 | </dependencies> | ||
2122 | </metamodule> | ||
2123 | |||
2124 | <metamodule id="driver-xf86-input-calcomp"> | ||
2125 | <dependencies> | ||
2126 | <dep package="util/util-macros"/> | ||
2127 | <dep package="proto/xproto"/> | ||
2128 | <dep package="xserver/xorg-server"/> | ||
2129 | </dependencies> | ||
2130 | </metamodule> | ||
2131 | |||
2132 | <metamodule id="driver-xf86-input-citron"> | ||
2133 | <dependencies> | ||
2134 | <dep package="util/util-macros"/> | ||
2135 | <dep package="proto/xproto"/> | ||
2136 | <dep package="xserver/xorg-server"/> | ||
2137 | </dependencies> | ||
2138 | </metamodule> | ||
2139 | |||
2140 | <metamodule id="driver-xf86-input-digitaledge"> | ||
2141 | <dependencies> | ||
2142 | <dep package="util/util-macros"/> | ||
2143 | <dep package="proto/xproto"/> | ||
2144 | <dep package="xserver/xorg-server"/> | ||
2145 | </dependencies> | ||
2146 | </metamodule> | ||
2147 | |||
2148 | <metamodule id="driver-xf86-input-dmc"> | ||
2149 | <dependencies> | ||
2150 | <dep package="util/util-macros"/> | ||
2151 | <dep package="proto/xproto"/> | ||
2152 | <dep package="xserver/xorg-server"/> | ||
2153 | </dependencies> | ||
2154 | </metamodule> | ||
2155 | |||
2156 | <metamodule id="driver-xf86-input-dynapro"> | ||
2157 | <dependencies> | ||
2158 | <dep package="util/util-macros"/> | ||
2159 | <dep package="proto/xproto"/> | ||
2160 | <dep package="xserver/xorg-server"/> | ||
2161 | </dependencies> | ||
2162 | </metamodule> | ||
2163 | |||
2164 | <metamodule id="driver-xf86-input-elo2300"> | ||
2165 | <dependencies> | ||
2166 | <dep package="util/util-macros"/> | ||
2167 | <dep package="proto/xproto"/> | ||
2168 | <dep package="xserver/xorg-server"/> | ||
2169 | </dependencies> | ||
2170 | </metamodule> | ||
2171 | |||
2172 | <metamodule id="driver-xf86-input-elographics"> | ||
2173 | <dependencies> | ||
2174 | <dep package="util/util-macros"/> | ||
2175 | <dep package="proto/xproto"/> | ||
2176 | <dep package="xserver/xorg-server"/> | ||
2177 | </dependencies> | ||
2178 | </metamodule> | ||
2179 | |||
2180 | <metamodule id="driver-xf86-input-evdev"> | ||
2181 | <dependencies> | ||
2182 | <dep package="util/util-macros"/> | ||
2183 | <dep package="proto/xproto"/> | ||
2184 | <dep package="xserver/xorg-server"/> | ||
2185 | </dependencies> | ||
2186 | </metamodule> | ||
2187 | |||
2188 | <metamodule id="driver-xf86-input-fpit"> | ||
2189 | <dependencies> | ||
2190 | <dep package="util/util-macros"/> | ||
2191 | <dep package="proto/xproto"/> | ||
2192 | <dep package="xserver/xorg-server"/> | ||
2193 | </dependencies> | ||
2194 | </metamodule> | ||
2195 | |||
2196 | <metamodule id="driver-xf86-input-hyperpen"> | ||
2197 | <dependencies> | ||
2198 | <dep package="util/util-macros"/> | ||
2199 | <dep package="proto/xproto"/> | ||
2200 | <dep package="xserver/xorg-server"/> | ||
2201 | </dependencies> | ||
2202 | </metamodule> | ||
2203 | |||
2204 | <metamodule id="driver-xf86-input-jamstudio"> | ||
2205 | <dependencies> | ||
2206 | <dep package="util/util-macros"/> | ||
2207 | <dep package="proto/xproto"/> | ||
2208 | <dep package="xserver/xorg-server"/> | ||
2209 | </dependencies> | ||
2210 | </metamodule> | ||
2211 | |||
2212 | <metamodule id="driver-xf86-input-joystick"> | ||
2213 | <dependencies> | ||
2214 | <dep package="util/util-macros"/> | ||
2215 | <dep package="proto/xproto"/> | ||
2216 | <dep package="xserver/xorg-server"/> | ||
2217 | </dependencies> | ||
2218 | </metamodule> | ||
2219 | |||
2220 | <metamodule id="driver-xf86-input-keyboard"> | ||
2221 | <dependencies> | ||
2222 | <dep package="util/util-macros"/> | ||
2223 | <dep package="proto/xproto"/> | ||
2224 | <dep package="xserver/xorg-server"/> | ||
2225 | </dependencies> | ||
2226 | </metamodule> | ||
2227 | |||
2228 | <metamodule id="driver-xf86-input-magellan"> | ||
2229 | <dependencies> | ||
2230 | <dep package="util/util-macros"/> | ||
2231 | <dep package="proto/xproto"/> | ||
2232 | <dep package="xserver/xorg-server"/> | ||
2233 | </dependencies> | ||
2234 | </metamodule> | ||
2235 | |||
2236 | <metamodule id="driver-xf86-input-magictouch"> | ||
2237 | <dependencies> | ||
2238 | <dep package="util/util-macros"/> | ||
2239 | <dep package="proto/xproto"/> | ||
2240 | <dep package="xserver/xorg-server"/> | ||
2241 | </dependencies> | ||
2242 | </metamodule> | ||
2243 | |||
2244 | <metamodule id="driver-xf86-input-microtouch"> | ||
2245 | <dependencies> | ||
2246 | <dep package="util/util-macros"/> | ||
2247 | <dep package="proto/xproto"/> | ||
2248 | <dep package="xserver/xorg-server"/> | ||
2249 | </dependencies> | ||
2250 | </metamodule> | ||
2251 | |||
2252 | <metamodule id="driver-xf86-input-mouse"> | ||
2253 | <dependencies> | ||
2254 | <dep package="util/util-macros"/> | ||
2255 | <dep package="proto/xproto"/> | ||
2256 | <dep package="xserver/xorg-server"/> | ||
2257 | </dependencies> | ||
2258 | </metamodule> | ||
2259 | |||
2260 | <metamodule id="driver-xf86-input-mutouch"> | ||
2261 | <dependencies> | ||
2262 | <dep package="util/util-macros"/> | ||
2263 | <dep package="proto/xproto"/> | ||
2264 | <dep package="xserver/xorg-server"/> | ||
2265 | </dependencies> | ||
2266 | </metamodule> | ||
2267 | |||
2268 | <metamodule id="driver-xf86-input-palmax"> | ||
2269 | <dependencies> | ||
2270 | <dep package="util/util-macros"/> | ||
2271 | <dep package="proto/xproto"/> | ||
2272 | <dep package="xserver/xorg-server"/> | ||
2273 | </dependencies> | ||
2274 | </metamodule> | ||
2275 | |||
2276 | <metamodule id="driver-xf86-input-penmount"> | ||
2277 | <dependencies> | ||
2278 | <dep package="util/util-macros"/> | ||
2279 | <dep package="proto/xproto"/> | ||
2280 | <dep package="xserver/xorg-server"/> | ||
2281 | </dependencies> | ||
2282 | </metamodule> | ||
2283 | |||
2284 | <metamodule id="driver-xf86-input-spaceorb"> | ||
2285 | <dependencies> | ||
2286 | <dep package="util/util-macros"/> | ||
2287 | <dep package="proto/xproto"/> | ||
2288 | <dep package="xserver/xorg-server"/> | ||
2289 | </dependencies> | ||
2290 | </metamodule> | ||
2291 | |||
2292 | <metamodule id="driver-xf86-input-summa"> | ||
2293 | <dependencies> | ||
2294 | <dep package="util/util-macros"/> | ||
2295 | <dep package="proto/xproto"/> | ||
2296 | <dep package="xserver/xorg-server"/> | ||
2297 | </dependencies> | ||
2298 | </metamodule> | ||
2299 | |||
2300 | <metamodule id="driver-xf86-input-tek4957"> | ||
2301 | <dependencies> | ||
2302 | <dep package="util/util-macros"/> | ||
2303 | <dep package="proto/xproto"/> | ||
2304 | <dep package="xserver/xorg-server"/> | ||
2305 | </dependencies> | ||
2306 | </metamodule> | ||
2307 | |||
2308 | <metamodule id="driver-xf86-input-ur98"> | ||
2309 | <dependencies> | ||
2310 | <dep package="util/util-macros"/> | ||
2311 | <dep package="proto/xproto"/> | ||
2312 | <dep package="xserver/xorg-server"/> | ||
2313 | </dependencies> | ||
2314 | </metamodule> | ||
2315 | |||
2316 | <metamodule id="driver-xf86-input-void"> | ||
2317 | <dependencies> | ||
2318 | <dep package="util/util-macros"/> | ||
2319 | <dep package="proto/xproto"/> | ||
2320 | <dep package="xserver/xorg-server"/> | ||
2321 | </dependencies> | ||
2322 | </metamodule> | ||
2323 | |||
2324 | |||
2325 | <!-- video drivers --> | ||
2326 | |||
2327 | <metamodule id="driver-xf86-video-apm"> | ||
2328 | <dependencies> | ||
2329 | <dep package="util/util-macros"/> | ||
2330 | <dep package="proto/xproto"/> | ||
2331 | <dep package="xserver/xorg-server"/> | ||
2332 | </dependencies> | ||
2333 | </metamodule> | ||
2334 | |||
2335 | <metamodule id="driver-xf86-video-ark"> | ||
2336 | <dependencies> | ||
2337 | <dep package="util/util-macros"/> | ||
2338 | <dep package="proto/xproto"/> | ||
2339 | <dep package="xserver/xorg-server"/> | ||
2340 | </dependencies> | ||
2341 | </metamodule> | ||
2342 | |||
2343 | <metamodule id="driver-xf86-video-ati"> | ||
2344 | <dependencies> | ||
2345 | <dep package="util/util-macros"/> | ||
2346 | <dep package="proto/xproto"/> | ||
2347 | <dep package="xserver/xorg-server"/> | ||
2348 | </dependencies> | ||
2349 | </metamodule> | ||
2350 | |||
2351 | <metamodule id="driver-xf86-video-chips"> | ||
2352 | <dependencies> | ||
2353 | <dep package="util/util-macros"/> | ||
2354 | <dep package="proto/xproto"/> | ||
2355 | <dep package="xserver/xorg-server"/> | ||
2356 | </dependencies> | ||
2357 | </metamodule> | ||
2358 | |||
2359 | <metamodule id="driver-xf86-video-cirrus"> | ||
2360 | <dependencies> | ||
2361 | <dep package="util/util-macros"/> | ||
2362 | <dep package="proto/xproto"/> | ||
2363 | <dep package="xserver/xorg-server"/> | ||
2364 | </dependencies> | ||
2365 | </metamodule> | ||
2366 | |||
2367 | <metamodule id="driver-xf86-video-cyrix"> | ||
2368 | <dependencies> | ||
2369 | <dep package="util/util-macros"/> | ||
2370 | <dep package="proto/xproto"/> | ||
2371 | <dep package="xserver/xorg-server"/> | ||
2372 | </dependencies> | ||
2373 | </metamodule> | ||
2374 | |||
2375 | <metamodule id="driver-xf86-video-dummy"> | ||
2376 | <dependencies> | ||
2377 | <dep package="util/util-macros"/> | ||
2378 | <dep package="proto/xproto"/> | ||
2379 | <dep package="xserver/xorg-server"/> | ||
2380 | </dependencies> | ||
2381 | </metamodule> | ||
2382 | |||
2383 | <metamodule id="driver-xf86-video-fbdev"> | ||
2384 | <dependencies> | ||
2385 | <dep package="util/util-macros"/> | ||
2386 | <dep package="proto/xproto"/> | ||
2387 | <dep package="xserver/xorg-server"/> | ||
2388 | </dependencies> | ||
2389 | </metamodule> | ||
2390 | |||
2391 | <metamodule id="driver-xf86-video-glide"> | ||
2392 | <dependencies> | ||
2393 | <dep package="util/util-macros"/> | ||
2394 | <dep package="proto/xproto"/> | ||
2395 | <dep package="xserver/xorg-server"/> | ||
2396 | </dependencies> | ||
2397 | </metamodule> | ||
2398 | |||
2399 | <metamodule id="driver-xf86-video-glint"> | ||
2400 | <dependencies> | ||
2401 | <dep package="util/util-macros"/> | ||
2402 | <dep package="proto/xproto"/> | ||
2403 | <dep package="xserver/xorg-server"/> | ||
2404 | </dependencies> | ||
2405 | </metamodule> | ||
2406 | |||
2407 | <metamodule id="driver-xf86-video-i128"> | ||
2408 | <dependencies> | ||
2409 | <dep package="util/util-macros"/> | ||
2410 | <dep package="proto/xproto"/> | ||
2411 | <dep package="xserver/xorg-server"/> | ||
2412 | </dependencies> | ||
2413 | </metamodule> | ||
2414 | |||
2415 | <metamodule id="driver-xf86-video-i740"> | ||
2416 | <dependencies> | ||
2417 | <dep package="util/util-macros"/> | ||
2418 | <dep package="proto/xproto"/> | ||
2419 | <dep package="xserver/xorg-server"/> | ||
2420 | </dependencies> | ||
2421 | </metamodule> | ||
2422 | |||
2423 | <metamodule id="driver-xf86-video-i810"> | ||
2424 | <dependencies> | ||
2425 | <dep package="util/util-macros"/> | ||
2426 | <dep package="proto/xproto"/> | ||
2427 | <dep package="xserver/xorg-server"/> | ||
2428 | </dependencies> | ||
2429 | </metamodule> | ||
2430 | |||
2431 | <metamodule id="driver-xf86-video-imstt"> | ||
2432 | <dependencies> | ||
2433 | <dep package="util/util-macros"/> | ||
2434 | <dep package="proto/xproto"/> | ||
2435 | <dep package="xserver/xorg-server"/> | ||
2436 | </dependencies> | ||
2437 | </metamodule> | ||
2438 | |||
2439 | <metamodule id="driver-xf86-video-mga"> | ||
2440 | <dependencies> | ||
2441 | <dep package="util/util-macros"/> | ||
2442 | <dep package="proto/xproto"/> | ||
2443 | <dep package="xserver/xorg-server"/> | ||
2444 | </dependencies> | ||
2445 | </metamodule> | ||
2446 | |||
2447 | <metamodule id="driver-xf86-video-neomagic"> | ||
2448 | <dependencies> | ||
2449 | <dep package="util/util-macros"/> | ||
2450 | <dep package="proto/xproto"/> | ||
2451 | <dep package="xserver/xorg-server"/> | ||
2452 | </dependencies> | ||
2453 | </metamodule> | ||
2454 | |||
2455 | <metamodule id="driver-xf86-video-newport"> | ||
2456 | <dependencies> | ||
2457 | <dep package="util/util-macros"/> | ||
2458 | <dep package="proto/xproto"/> | ||
2459 | <dep package="xserver/xorg-server"/> | ||
2460 | </dependencies> | ||
2461 | </metamodule> | ||
2462 | |||
2463 | <metamodule id="driver-xf86-video-nsc"> | ||
2464 | <dependencies> | ||
2465 | <dep package="util/util-macros"/> | ||
2466 | <dep package="proto/xproto"/> | ||
2467 | <dep package="xserver/xorg-server"/> | ||
2468 | </dependencies> | ||
2469 | </metamodule> | ||
2470 | |||
2471 | <metamodule id="driver-xf86-video-nv"> | ||
2472 | <dependencies> | ||
2473 | <dep package="util/util-macros"/> | ||
2474 | <dep package="proto/xproto"/> | ||
2475 | <dep package="xserver/xorg-server"/> | ||
2476 | </dependencies> | ||
2477 | </metamodule> | ||
2478 | |||
2479 | <metamodule id="driver-xf86-video-rendition"> | ||
2480 | <dependencies> | ||
2481 | <dep package="util/util-macros"/> | ||
2482 | <dep package="proto/xproto"/> | ||
2483 | <dep package="xserver/xorg-server"/> | ||
2484 | </dependencies> | ||
2485 | </metamodule> | ||
2486 | |||
2487 | <metamodule id="driver-xf86-video-s3"> | ||
2488 | <dependencies> | ||
2489 | <dep package="util/util-macros"/> | ||
2490 | <dep package="proto/xproto"/> | ||
2491 | <dep package="xserver/xorg-server"/> | ||
2492 | </dependencies> | ||
2493 | </metamodule> | ||
2494 | |||
2495 | <metamodule id="driver-xf86-video-s3virge"> | ||
2496 | <dependencies> | ||
2497 | <dep package="util/util-macros"/> | ||
2498 | <dep package="proto/xproto"/> | ||
2499 | <dep package="xserver/xorg-server"/> | ||
2500 | </dependencies> | ||
2501 | </metamodule> | ||
2502 | |||
2503 | <metamodule id="driver-xf86-video-savage"> | ||
2504 | <dependencies> | ||
2505 | <dep package="util/util-macros"/> | ||
2506 | <dep package="proto/xproto"/> | ||
2507 | <dep package="xserver/xorg-server"/> | ||
2508 | </dependencies> | ||
2509 | </metamodule> | ||
2510 | |||
2511 | <metamodule id="driver-xf86-video-siliconmotion"> | ||
2512 | <dependencies> | ||
2513 | <dep package="util/util-macros"/> | ||
2514 | <dep package="proto/xproto"/> | ||
2515 | <dep package="xserver/xorg-server"/> | ||
2516 | </dependencies> | ||
2517 | </metamodule> | ||
2518 | |||
2519 | <metamodule id="driver-xf86-video-sis"> | ||
2520 | <dependencies> | ||
2521 | <dep package="util/util-macros"/> | ||
2522 | <dep package="proto/xproto"/> | ||
2523 | <dep package="xserver/xorg-server"/> | ||
2524 | </dependencies> | ||
2525 | </metamodule> | ||
2526 | |||
2527 | <metamodule id="driver-xf86-video-sisusb"> | ||
2528 | <dependencies> | ||
2529 | <dep package="util/util-macros"/> | ||
2530 | <dep package="proto/xproto"/> | ||
2531 | <dep package="xserver/xorg-server"/> | ||
2532 | </dependencies> | ||
2533 | </metamodule> | ||
2534 | |||
2535 | <metamodule id="driver-xf86-video-sunbw2"> | ||
2536 | <dependencies> | ||
2537 | <dep package="util/util-macros"/> | ||
2538 | <dep package="proto/xproto"/> | ||
2539 | <dep package="xserver/xorg-server"/> | ||
2540 | </dependencies> | ||
2541 | </metamodule> | ||
2542 | |||
2543 | <metamodule id="driver-xf86-video-suncg14"> | ||
2544 | <dependencies> | ||
2545 | <dep package="util/util-macros"/> | ||
2546 | <dep package="proto/xproto"/> | ||
2547 | <dep package="xserver/xorg-server"/> | ||
2548 | </dependencies> | ||
2549 | </metamodule> | ||
2550 | |||
2551 | <metamodule id="driver-xf86-video-suncg3"> | ||
2552 | <dependencies> | ||
2553 | <dep package="util/util-macros"/> | ||
2554 | <dep package="proto/xproto"/> | ||
2555 | <dep package="xserver/xorg-server"/> | ||
2556 | </dependencies> | ||
2557 | </metamodule> | ||
2558 | |||
2559 | <metamodule id="driver-xf86-video-suncg6"> | ||
2560 | <dependencies> | ||
2561 | <dep package="util/util-macros"/> | ||
2562 | <dep package="proto/xproto"/> | ||
2563 | <dep package="xserver/xorg-server"/> | ||
2564 | </dependencies> | ||
2565 | </metamodule> | ||
2566 | |||
2567 | <metamodule id="driver-xf86-video-sunffb"> | ||
2568 | <dependencies> | ||
2569 | <dep package="util/util-macros"/> | ||
2570 | <dep package="proto/xproto"/> | ||
2571 | <dep package="xserver/xorg-server"/> | ||
2572 | </dependencies> | ||
2573 | </metamodule> | ||
2574 | |||
2575 | <metamodule id="driver-xf86-video-sunleo"> | ||
2576 | <dependencies> | ||
2577 | <dep package="util/util-macros"/> | ||
2578 | <dep package="proto/xproto"/> | ||
2579 | <dep package="xserver/xorg-server"/> | ||
2580 | </dependencies> | ||
2581 | </metamodule> | ||
2582 | |||
2583 | <metamodule id="driver-xf86-video-suntcx"> | ||
2584 | <dependencies> | ||
2585 | <dep package="util/util-macros"/> | ||
2586 | <dep package="proto/xproto"/> | ||
2587 | <dep package="xserver/xorg-server"/> | ||
2588 | </dependencies> | ||
2589 | </metamodule> | ||
2590 | |||
2591 | <metamodule id="driver-xf86-video-tdfx"> | ||
2592 | <dependencies> | ||
2593 | <dep package="util/util-macros"/> | ||
2594 | <dep package="proto/xproto"/> | ||
2595 | <dep package="xserver/xorg-server"/> | ||
2596 | </dependencies> | ||
2597 | </metamodule> | ||
2598 | |||
2599 | <metamodule id="driver-xf86-video-tga"> | ||
2600 | <dependencies> | ||
2601 | <dep package="util/util-macros"/> | ||
2602 | <dep package="proto/xproto"/> | ||
2603 | <dep package="xserver/xorg-server"/> | ||
2604 | </dependencies> | ||
2605 | </metamodule> | ||
2606 | |||
2607 | <metamodule id="driver-xf86-video-trident"> | ||
2608 | <dependencies> | ||
2609 | <dep package="util/util-macros"/> | ||
2610 | <dep package="proto/xproto"/> | ||
2611 | <dep package="xserver/xorg-server"/> | ||
2612 | </dependencies> | ||
2613 | </metamodule> | ||
2614 | |||
2615 | <metamodule id="driver-xf86-video-tseng"> | ||
2616 | <dependencies> | ||
2617 | <dep package="util/util-macros"/> | ||
2618 | <dep package="proto/xproto"/> | ||
2619 | <dep package="xserver/xorg-server"/> | ||
2620 | </dependencies> | ||
2621 | </metamodule> | ||
2622 | |||
2623 | <metamodule id="driver-xf86-video-v4l"> | ||
2624 | <dependencies> | ||
2625 | <dep package="util/util-macros"/> | ||
2626 | <dep package="proto/xproto"/> | ||
2627 | <dep package="xserver/xorg-server"/> | ||
2628 | </dependencies> | ||
2629 | </metamodule> | ||
2630 | |||
2631 | <metamodule id="driver-xf86-video-vesa"> | ||
2632 | <dependencies> | ||
2633 | <dep package="util/util-macros"/> | ||
2634 | <dep package="proto/xproto"/> | ||
2635 | <dep package="xserver/xorg-server"/> | ||
2636 | </dependencies> | ||
2637 | </metamodule> | ||
2638 | |||
2639 | <metamodule id="driver-xf86-video-vga"> | ||
2640 | <dependencies> | ||
2641 | <dep package="util/util-macros"/> | ||
2642 | <dep package="proto/xproto"/> | ||
2643 | <dep package="xserver/xorg-server"/> | ||
2644 | </dependencies> | ||
2645 | </metamodule> | ||
2646 | |||
2647 | <metamodule id="driver-xf86-video-via"> | ||
2648 | <dependencies> | ||
2649 | <dep package="util/util-macros"/> | ||
2650 | <dep package="proto/xproto"/> | ||
2651 | <dep package="xserver/xorg-server"/> | ||
2652 | <dep package="drm"/> | ||
2653 | </dependencies> | ||
2654 | </metamodule> | ||
2655 | |||
2656 | <metamodule id="driver-xf86-video-vmware"> | ||
2657 | <dependencies> | ||
2658 | <dep package="util/util-macros"/> | ||
2659 | <dep package="proto/xproto"/> | ||
2660 | <dep package="xserver/xorg-server"/> | ||
2661 | </dependencies> | ||
2662 | </metamodule> | ||
2663 | |||
2664 | <metamodule id="driver-xf86-video-voodoo"> | ||
2665 | <dependencies> | ||
2666 | <dep package="util/util-macros"/> | ||
2667 | <dep package="proto/xproto"/> | ||
2668 | <dep package="xserver/xorg-server"/> | ||
2669 | </dependencies> | ||
2670 | </metamodule> | ||
2671 | |||
2672 | <metamodule id="driver-xf86-video-wsfb"> | ||
2673 | <dependencies> | ||
2674 | <dep package="util/util-macros"/> | ||
2675 | <dep package="proto/xproto"/> | ||
2676 | <dep package="xserver/xorg-server"/> | ||
2677 | </dependencies> | ||
2678 | </metamodule> | ||
2679 | |||
2680 | <metamodule id="driver-input"> | ||
2681 | <dependencies> | ||
2682 | <dep package="driver/xf86-input-acecad"/> | ||
2683 | <dep package="driver/xf86-input-aiptek"/> | ||
2684 | <dep package="driver/xf86-input-calcomp"/> | ||
2685 | <dep package="driver/xf86-input-citron"/> | ||
2686 | <dep package="driver/xf86-input-digitaledge"/> | ||
2687 | <dep package="driver/xf86-input-dmc"/> | ||
2688 | <dep package="driver/xf86-input-dynapro"/> | ||
2689 | <dep package="driver/xf86-input-elo2300"/> | ||
2690 | <dep package="driver/xf86-input-elographics"/> | ||
2691 | <dep package="driver/xf86-input-evdev"/> | ||
2692 | <dep package="driver/xf86-input-fpit"/> | ||
2693 | <dep package="driver/xf86-input-hyperpen"/> | ||
2694 | <dep package="driver/xf86-input-jamstudio"/> | ||
2695 | <dep package="driver/xf86-input-joystick"/> | ||
2696 | <dep package="driver/xf86-input-keyboard"/> | ||
2697 | <dep package="driver/xf86-input-magellan"/> | ||
2698 | <dep package="driver/xf86-input-magictouch"/> | ||
2699 | <dep package="driver/xf86-input-microtouch"/> | ||
2700 | <dep package="driver/xf86-input-mouse"/> | ||
2701 | <dep package="driver/xf86-input-mutouch"/> | ||
2702 | <dep package="driver/xf86-input-palmax"/> | ||
2703 | <dep package="driver/xf86-input-penmount"/> | ||
2704 | <dep package="driver/xf86-input-spaceorb"/> | ||
2705 | <dep package="driver/xf86-input-summa"/> | ||
2706 | <dep package="driver/xf86-input-tek4957"/> | ||
2707 | <!-- <dep package="driver/xf86-input-ur98"/> --> | ||
2708 | <dep package="driver/xf86-input-void"/> | ||
2709 | </dependencies> | ||
2710 | </metamodule> | ||
2711 | |||
2712 | <metamodule id="driver-video"> | ||
2713 | <dependencies> | ||
2714 | <dep package="driver/xf86-video-apm"/> | ||
2715 | <dep package="driver/xf86-video-ark"/> | ||
2716 | <dep package="driver/xf86-video-ati"/> | ||
2717 | <dep package="driver/xf86-video-chips"/> | ||
2718 | <dep package="driver/xf86-video-cirrus"/> | ||
2719 | <dep package="driver/xf86-video-cyrix"/> | ||
2720 | <dep package="driver/xf86-video-dummy"/> | ||
2721 | <dep package="driver/xf86-video-fbdev"/> | ||
2722 | <!-- <dep package="driver/xf86-video-glide"/> --> | ||
2723 | <dep package="driver/xf86-video-glint"/> | ||
2724 | <dep package="driver/xf86-video-i128"/> | ||
2725 | <dep package="driver/xf86-video-i740"/> | ||
2726 | <dep package="driver/xf86-video-i810"/> | ||
2727 | <dep package="driver/xf86-video-imstt"/> | ||
2728 | <dep package="driver/xf86-video-mga"/> | ||
2729 | <dep package="driver/xf86-video-neomagic"/> | ||
2730 | <dep package="driver/xf86-video-newport"/> | ||
2731 | <dep package="driver/xf86-video-nsc"/> | ||
2732 | <dep package="driver/xf86-video-nv"/> | ||
2733 | <dep package="driver/xf86-video-rendition"/> | ||
2734 | <dep package="driver/xf86-video-s3"/> | ||
2735 | <dep package="driver/xf86-video-s3virge"/> | ||
2736 | <dep package="driver/xf86-video-savage"/> | ||
2737 | <dep package="driver/xf86-video-siliconmotion"/> | ||
2738 | <dep package="driver/xf86-video-sis"/> | ||
2739 | <dep package="driver/xf86-video-sisusb"/> <!-- Linux only --> | ||
2740 | <dep package="driver/xf86-video-sunbw2"/> | ||
2741 | <dep package="driver/xf86-video-suncg14"/> | ||
2742 | <dep package="driver/xf86-video-suncg3"/> | ||
2743 | <dep package="driver/xf86-video-suncg6"/> | ||
2744 | <dep package="driver/xf86-video-sunffb"/> | ||
2745 | <dep package="driver/xf86-video-sunleo"/> | ||
2746 | <dep package="driver/xf86-video-suntcx"/> | ||
2747 | <dep package="driver/xf86-video-tdfx"/> | ||
2748 | <dep package="driver/xf86-video-tga"/> | ||
2749 | <dep package="driver/xf86-video-trident"/> | ||
2750 | <dep package="driver/xf86-video-tseng"/> | ||
2751 | <dep package="driver/xf86-video-v4l"/> <!-- Linux only --> | ||
2752 | <dep package="driver/xf86-video-vesa"/> | ||
2753 | <dep package="driver/xf86-video-vga"/> | ||
2754 | <dep package="driver/xf86-video-via"/> | ||
2755 | <dep package="driver/xf86-video-vmware"/> | ||
2756 | <dep package="driver/xf86-video-voodoo"/> | ||
2757 | </dependencies> | ||
2758 | </metamodule> | ||
2759 | |||
2760 | <metamodule id="driver-sun"> | ||
2761 | <dependencies> | ||
2762 | <dep package="driver/xf86-video-wsfb"/> | ||
2763 | </dependencies> | ||
2764 | </metamodule> | ||
2765 | |||
2766 | <metamodule id="driver"> | ||
2767 | <dependencies> | ||
2768 | <dep package="driver-input"/> | ||
2769 | <dep package="driver-video"/> | ||
2770 | </dependencies> | ||
2771 | </metamodule> | ||
2772 | |||
2773 | |||
2774 | <!-- X servers --> | ||
2775 | |||
2776 | <!-- TODO: Lots more work is needed here for deps --> | ||
2777 | <metamodule id="xserver-xorg-server"> | ||
2778 | <dependencies> | ||
2779 | <dep package="util/util-macros"/> | ||
2780 | <dep package="proto"/> | ||
2781 | <dep package="lib/libXaw"/> | ||
2782 | <dep package="lib/libxkbui"/> | ||
2783 | <dep package="lib/libXfont"/> | ||
2784 | <dep package="lib/xtrans"/> | ||
2785 | <dep package="lib/libXau"/> | ||
2786 | <dep package="lib/libxkbfile"/> | ||
2787 | <dep package="lib/libXdmcp"/> | ||
2788 | <dep package="lib/libXxf86misc"/> | ||
2789 | <dep package="lib/libXxf86vm"/> | ||
2790 | <dep package="drm"/> | ||
2791 | </dependencies> | ||
2792 | </metamodule> | ||
2793 | |||
2794 | <metamodule id="xserver"> | ||
2795 | <dependencies> | ||
2796 | <dep package="xserver/xorg-server"/> | ||
2797 | </dependencies> | ||
2798 | </metamodule> | ||
2799 | |||
2800 | |||
2801 | <!-- everything --> | ||
2802 | |||
2803 | <!-- Note that data and utils are brought in from dependencies --> | ||
2804 | <metamodule id="xorg"> | ||
2805 | <dependencies> | ||
2806 | <dep package="doc"/> | ||
2807 | <dep package="proto"/> | ||
2808 | <dep package="lib"/> | ||
2809 | <dep package="app"/> | ||
2810 | <dep package="xserver"/> | ||
2811 | <dep package="driver"/> | ||
2812 | <dep package="data"/> | ||
2813 | <dep package="font"/> | ||
2814 | <dep package="util"/> | ||
2815 | </dependencies> | ||
2816 | </metamodule> | ||
2817 | |||
2818 | |||
2819 | <!-- Extras --> | ||
2820 | |||
2821 | <tarball id="freetype2" version="2.1.9"> | ||
2822 | <source href="http://ftp.x.org/pub/X11R7.0/src/extras/freetype-2.1.9.tar.gz" | ||
2823 | size="1334560" md5sum="1336a6851753c962495ff02ff7ea71c1"/> | ||
2824 | </tarball> | ||
2825 | <tarball id="fontconfig" version="2.2.3"> | ||
2826 | <source href="http://ftp.x.org/pub/X11R7.0/src/extras/fontconfig-2.2.3.tar.gz" | ||
2827 | size="750035" md5sum="2466a797d645cda5eb466080fdaec416"/> | ||
2828 | </tarball> | ||
2829 | <tarball id="drm" version="2.0"> | ||
2830 | <source href="http://ftp.x.org/pub/X11R7.0/src/extras/libdrm-2.0.tar.gz" | ||
2831 | size="370965" md5sum="9d1aab104eb757ceeb2c1a6d38d57411"/> | ||
2832 | </tarball> | ||
2833 | |||
2834 | |||
2835 | <!-- Tarball set for X11R7-RC4 --> | ||
2836 | |||
2837 | <tarball id="app/appres" version="X11R7.0-1.0.0"> | ||
2838 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/appres-X11R7.0-1.0.0.tar.bz2" | ||
2839 | size="74597" md5sum="3327357fc851a49e8e5dc44405e7b862"/> | ||
2840 | <dependencies> | ||
2841 | <dep package="app-appres"/> | ||
2842 | </dependencies> | ||
2843 | </tarball> | ||
2844 | <tarball id="app/bdftopcf" version="X11R7.0-1.0.0"> | ||
2845 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/bdftopcf-X11R7.0-1.0.0.tar.bz2" | ||
2846 | size="74661" md5sum="f43667fcf613054cae0679f5dc5a1e7a"/> | ||
2847 | <dependencies> | ||
2848 | <dep package="app-bdftopcf"/> | ||
2849 | </dependencies> | ||
2850 | </tarball> | ||
2851 | <tarball id="app/beforelight" version="X11R7.0-1.0.1"> | ||
2852 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/beforelight-X11R7.0-1.0.1.tar.bz2" | ||
2853 | size="77142" md5sum="e0326eff9d1bd4e3a1af9e615a0048b3"/> | ||
2854 | <dependencies> | ||
2855 | <dep package="app-beforelight"/> | ||
2856 | </dependencies> | ||
2857 | </tarball> | ||
2858 | <tarball id="app/bitmap" version="X11R7.0-1.0.1"> | ||
2859 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/bitmap-X11R7.0-1.0.1.tar.bz2" | ||
2860 | size="117790" md5sum="bbb3df097821d3edb4d5a4b2ae731de6"/> | ||
2861 | <dependencies> | ||
2862 | <dep package="app-bitmap"/> | ||
2863 | </dependencies> | ||
2864 | </tarball> | ||
2865 | <tarball id="app/editres" version="X11R7.0-1.0.1"> | ||
2866 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/editres-X11R7.0-1.0.1.tar.bz2" | ||
2867 | size="115967" md5sum="a9dc7f3b0cb59f08ab1e6554a5e60721"/> | ||
2868 | <dependencies> | ||
2869 | <dep package="app-editres"/> | ||
2870 | </dependencies> | ||
2871 | </tarball> | ||
2872 | <tarball id="app/fonttosfnt" version="X11R7.0-1.0.1"> | ||
2873 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/fonttosfnt-X11R7.0-1.0.1.tar.bz2" | ||
2874 | size="90512" md5sum="89b65e010acaa3c5d370e1cc0ea9fce9"/> | ||
2875 | <dependencies> | ||
2876 | <dep package="app-fonttosfnt"/> | ||
2877 | </dependencies> | ||
2878 | </tarball> | ||
2879 | <tarball id="app/fslsfonts" version="X11R7.0-1.0.1"> | ||
2880 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/fslsfonts-X11R7.0-1.0.1.tar.bz2" | ||
2881 | size="76899" md5sum="c500b96cfec485e362204a8fc0bdfd44"/> | ||
2882 | <dependencies> | ||
2883 | <dep package="app-fslsfonts"/> | ||
2884 | </dependencies> | ||
2885 | </tarball> | ||
2886 | <tarball id="app/fstobdf" version="X11R7.0-1.0.1"> | ||
2887 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/fstobdf-X11R7.0-1.0.1.tar.bz2" | ||
2888 | size="78666" md5sum="233615dca862b64c69bc212090a22b4c"/> | ||
2889 | <dependencies> | ||
2890 | <dep package="app-fstobdf"/> | ||
2891 | </dependencies> | ||
2892 | </tarball> | ||
2893 | <tarball id="app/iceauth" version="X11R7.0-1.0.1"> | ||
2894 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/iceauth-X11R7.0-1.0.1.tar.bz2" | ||
2895 | size="84372" md5sum="92035bd69b4c9aba47607ba0efcc8530"/> | ||
2896 | <dependencies> | ||
2897 | <dep package="app-iceauth"/> | ||
2898 | </dependencies> | ||
2899 | </tarball> | ||
2900 | <tarball id="app/ico" version="X11R7.0-1.0.1"> | ||
2901 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/ico-X11R7.0-1.0.1.tar.bz2" | ||
2902 | size="85686" md5sum="9c63d68a779819ba79e45d9b15d26b1f"/> | ||
2903 | <dependencies> | ||
2904 | <dep package="app-ico"/> | ||
2905 | </dependencies> | ||
2906 | </tarball> | ||
2907 | <tarball id="app/lbxproxy" version="X11R7.0-1.0.1"> | ||
2908 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/lbxproxy-X11R7.0-1.0.1.tar.bz2" | ||
2909 | size="179860" md5sum="d9c05283660eae742a77dcbc0091841a"/> | ||
2910 | <dependencies> | ||
2911 | <dep package="app-lbxproxy"/> | ||
2912 | </dependencies> | ||
2913 | </tarball> | ||
2914 | <tarball id="app/listres" version="X11R7.0-1.0.1"> | ||
2915 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/listres-X11R7.0-1.0.1.tar.bz2" | ||
2916 | size="76647" md5sum="2eeb802272a7910bb8a52b308bf0d5f6"/> | ||
2917 | <dependencies> | ||
2918 | <dep package="app-listres"/> | ||
2919 | </dependencies> | ||
2920 | </tarball> | ||
2921 | <tarball id="app/luit" version="X11R7.0-1.0.1"> | ||
2922 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/luit-X11R7.0-1.0.1.tar.bz2" | ||
2923 | size="92017" md5sum="30428b8ff783a0cfd61dab05a17cfaa7"/> | ||
2924 | <dependencies> | ||
2925 | <dep package="app-luit"/> | ||
2926 | </dependencies> | ||
2927 | </tarball> | ||
2928 | <tarball id="app/mkcfm" version="X11R7.0-1.0.1"> | ||
2929 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/mkcfm-X11R7.0-1.0.1.tar.bz2" | ||
2930 | size="75940" md5sum="912e6305998441c26852309403742bec"/> | ||
2931 | <dependencies> | ||
2932 | <dep package="app-mkcfm"/> | ||
2933 | </dependencies> | ||
2934 | </tarball> | ||
2935 | <tarball id="app/mkfontdir" version="X11R7.0-1.0.1"> | ||
2936 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/mkfontdir-X11R7.0-1.0.1.tar.bz2" | ||
2937 | size="60892" md5sum="29e6e5e8e7a29ed49abf33af192693cb"/> | ||
2938 | <dependencies> | ||
2939 | <dep package="app-mkfontdir"/> | ||
2940 | </dependencies> | ||
2941 | </tarball> | ||
2942 | <tarball id="app/mkfontscale" version="X11R7.0-1.0.1"> | ||
2943 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/mkfontscale-X11R7.0-1.0.1.tar.bz2" | ||
2944 | size="87485" md5sum="75bbd1dc425849e415a60afd9e74d2ff"/> | ||
2945 | <dependencies> | ||
2946 | <dep package="app-mkfontscale"/> | ||
2947 | </dependencies> | ||
2948 | </tarball> | ||
2949 | <tarball id="app/oclock" version="X11R7.0-1.0.1"> | ||
2950 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/oclock-X11R7.0-1.0.1.tar.bz2" | ||
2951 | size="83165" md5sum="e35af9699c49f0b77fad45a3b942c3b1"/> | ||
2952 | <dependencies> | ||
2953 | <dep package="app-oclock"/> | ||
2954 | </dependencies> | ||
2955 | </tarball> | ||
2956 | <tarball id="app/proxymngr" version="X11R7.0-1.0.1"> | ||
2957 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/proxymngr-X11R7.0-1.0.1.tar.bz2" | ||
2958 | size="91718" md5sum="0d2ca6876d84302f966fd105a3b69a8e"/> | ||
2959 | <dependencies> | ||
2960 | <dep package="app-proxymngr"/> | ||
2961 | </dependencies> | ||
2962 | </tarball> | ||
2963 | <tarball id="app/rgb" version="X11R7.0-1.0.0"> | ||
2964 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/rgb-X11R7.0-1.0.0.tar.bz2" | ||
2965 | size="87271" md5sum="675e72f221714c3db8730daf0b50f69f"/> | ||
2966 | <dependencies> | ||
2967 | <dep package="app-rgb"/> | ||
2968 | </dependencies> | ||
2969 | </tarball> | ||
2970 | <tarball id="app/rstart" version="X11R7.0-1.0.1"> | ||
2971 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/rstart-X11R7.0-1.0.1.tar.bz2" | ||
2972 | size="88773" md5sum="6f33a1bd8e99372b7544ddfcad456369"/> | ||
2973 | <dependencies> | ||
2974 | <dep package="app-rstart"/> | ||
2975 | </dependencies> | ||
2976 | </tarball> | ||
2977 | <tarball id="app/scripts" version="X11R7.0-1.0.1"> | ||
2978 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/scripts-X11R7.0-1.0.1.tar.bz2" | ||
2979 | size="72337" md5sum="b5b43aa53372b78f1d67c86301e3dc02"/> | ||
2980 | <dependencies> | ||
2981 | <dep package="app-scripts"/> | ||
2982 | </dependencies> | ||
2983 | </tarball> | ||
2984 | <tarball id="app/sessreg" version="X11R7.0-1.0.0"> | ||
2985 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/sessreg-X11R7.0-1.0.0.tar.bz2" | ||
2986 | size="82144" md5sum="8289a5b947165449c23bdfad9af02b4c"/> | ||
2987 | <dependencies> | ||
2988 | <dep package="app-sessreg"/> | ||
2989 | </dependencies> | ||
2990 | </tarball> | ||
2991 | <tarball id="app/setxkbmap" version="X11R7.0-1.0.1"> | ||
2992 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/setxkbmap-X11R7.0-1.0.1.tar.bz2" | ||
2993 | size="80162" md5sum="28b141ab0b1c44a5e90d31ad73bd1078"/> | ||
2994 | <dependencies> | ||
2995 | <dep package="app-setxkbmap"/> | ||
2996 | </dependencies> | ||
2997 | </tarball> | ||
2998 | <tarball id="app/showfont" version="X11R7.0-1.0.1"> | ||
2999 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/showfont-X11R7.0-1.0.1.tar.bz2" | ||
3000 | size="76966" md5sum="334cb5133960108ac2c24ee27e16bb8e"/> | ||
3001 | <dependencies> | ||
3002 | <dep package="app-showfont"/> | ||
3003 | </dependencies> | ||
3004 | </tarball> | ||
3005 | <tarball id="app/smproxy" version="X11R7.0-1.0.1"> | ||
3006 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/smproxy-X11R7.0-1.0.1.tar.bz2" | ||
3007 | size="82934" md5sum="60f54881b6fb27a8ba238629e4097c4d"/> | ||
3008 | <dependencies> | ||
3009 | <dep package="app-smproxy"/> | ||
3010 | </dependencies> | ||
3011 | </tarball> | ||
3012 | <tarball id="app/twm" version="X11R7.0-1.0.1"> | ||
3013 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/twm-X11R7.0-1.0.1.tar.bz2" | ||
3014 | size="220067" md5sum="cd525ca3ac5e29d21a61deebc1e0c376"/> | ||
3015 | <dependencies> | ||
3016 | <dep package="app-twm"/> | ||
3017 | </dependencies> | ||
3018 | </tarball> | ||
3019 | <tarball id="app/viewres" version="X11R7.0-1.0.1"> | ||
3020 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/viewres-X11R7.0-1.0.1.tar.bz2" | ||
3021 | size="84830" md5sum="004bf8dd4646aca86faf5aa22b0c3f2f"/> | ||
3022 | <dependencies> | ||
3023 | <dep package="app-viewres"/> | ||
3024 | </dependencies> | ||
3025 | </tarball> | ||
3026 | <tarball id="app/x11perf" version="X11R7.0-1.0.1"> | ||
3027 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/x11perf-X11R7.0-1.0.1.tar.bz2" | ||
3028 | size="127363" md5sum="9986b20301c6a37bb144cb9733bf35a0"/> | ||
3029 | <dependencies> | ||
3030 | <dep package="app-x11perf"/> | ||
3031 | </dependencies> | ||
3032 | </tarball> | ||
3033 | <tarball id="app/xauth" version="X11R7.0-1.0.1"> | ||
3034 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xauth-X11R7.0-1.0.1.tar.bz2" | ||
3035 | size="95898" md5sum="ef2359ddaaea6ffaf9072fa342d6eb09"/> | ||
3036 | <dependencies> | ||
3037 | <dep package="app-xauth"/> | ||
3038 | </dependencies> | ||
3039 | </tarball> | ||
3040 | <tarball id="app/xbiff" version="X11R7.0-1.0.1"> | ||
3041 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xbiff-X11R7.0-1.0.1.tar.bz2" | ||
3042 | size="83656" md5sum="c4eb71a3187586d02365a67fc1445e54"/> | ||
3043 | <dependencies> | ||
3044 | <dep package="app-xbiff"/> | ||
3045 | </dependencies> | ||
3046 | </tarball> | ||
3047 | <tarball id="app/xcalc" version="X11R7.0-1.0.1"> | ||
3048 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xcalc-X11R7.0-1.0.1.tar.bz2" | ||
3049 | size="93681" md5sum="c1ecea85be15f746a59931e288768bdb"/> | ||
3050 | <dependencies> | ||
3051 | <dep package="app-xcalc"/> | ||
3052 | </dependencies> | ||
3053 | </tarball> | ||
3054 | <tarball id="app/xclipboard" version="X11R7.0-1.0.1"> | ||
3055 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xclipboard-X11R7.0-1.0.1.tar.bz2" | ||
3056 | size="83692" md5sum="a661b0f922cbdc62514bfd3e700d00fd"/> | ||
3057 | <dependencies> | ||
3058 | <dep package="app-xclipboard"/> | ||
3059 | </dependencies> | ||
3060 | </tarball> | ||
3061 | <tarball id="app/xclock" version="X11R7.0-1.0.1"> | ||
3062 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xclock-X11R7.0-1.0.1.tar.bz2" | ||
3063 | size="100013" md5sum="00444fed4bf5cd51624476ee11dd1fab"/> | ||
3064 | <dependencies> | ||
3065 | <dep package="app-xclock"/> | ||
3066 | </dependencies> | ||
3067 | </tarball> | ||
3068 | <tarball id="app/xcmsdb" version="X11R7.0-1.0.1"> | ||
3069 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xcmsdb-X11R7.0-1.0.1.tar.bz2" | ||
3070 | size="96468" md5sum="1c8396ed5c416e3a6658394ff6c415ad"/> | ||
3071 | <dependencies> | ||
3072 | <dep package="app-xcmsdb"/> | ||
3073 | </dependencies> | ||
3074 | </tarball> | ||
3075 | <tarball id="app/xconsole" version="X11R7.0-1.0.1"> | ||
3076 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xconsole-X11R7.0-1.0.1.tar.bz2" | ||
3077 | size="82259" md5sum="f983b589ba9de198d90abee220a80f81"/> | ||
3078 | <dependencies> | ||
3079 | <dep package="app-xconsole"/> | ||
3080 | </dependencies> | ||
3081 | </tarball> | ||
3082 | <tarball id="app/xcursorgen" version="X11R7.0-1.0.0"> | ||
3083 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xcursorgen-X11R7.0-1.0.0.tar.bz2" | ||
3084 | size="78039" md5sum="4d7b26dbb4442e89ec65c4147b31a5f7"/> | ||
3085 | <dependencies> | ||
3086 | <dep package="app-xcursorgen"/> | ||
3087 | </dependencies> | ||
3088 | </tarball> | ||
3089 | <tarball id="app/xdbedizzy" version="X11R7.0-1.0.1"> | ||
3090 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xdbedizzy-X11R7.0-1.0.1.tar.bz2" | ||
3091 | size="83105" md5sum="ceaccde801650ffbffc1e5b0657960d2"/> | ||
3092 | <dependencies> | ||
3093 | <dep package="app-xdbedizzy"/> | ||
3094 | </dependencies> | ||
3095 | </tarball> | ||
3096 | <tarball id="app/xditview" version="X11R7.0-1.0.1"> | ||
3097 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xditview-X11R7.0-1.0.1.tar.bz2" | ||
3098 | size="103002" md5sum="21887fe4ec1965d637e82b7840650a6f"/> | ||
3099 | <dependencies> | ||
3100 | <dep package="app-xditview"/> | ||
3101 | </dependencies> | ||
3102 | </tarball> | ||
3103 | <tarball id="app/xdm" version="X11R7.0-1.0.1"> | ||
3104 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xdm-X11R7.0-1.0.1.tar.bz2" | ||
3105 | size="333977" md5sum="9ac363721dbb8cd39aa1064b260624a6"/> | ||
3106 | <dependencies> | ||
3107 | <dep package="app-xdm"/> | ||
3108 | </dependencies> | ||
3109 | </tarball> | ||
3110 | <tarball id="app/xdpyinfo" version="X11R7.0-1.0.1"> | ||
3111 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xdpyinfo-X11R7.0-1.0.1.tar.bz2" | ||
3112 | size="87616" md5sum="2b08e9ca783e3aa91d7fb84fdd716e93"/> | ||
3113 | <dependencies> | ||
3114 | <dep package="app-xdpyinfo"/> | ||
3115 | </dependencies> | ||
3116 | </tarball> | ||
3117 | <tarball id="app/xdriinfo" version="X11R7.0-1.0.0"> | ||
3118 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xdriinfo-X11R7.0-1.0.0.tar.bz2" | ||
3119 | size="77365" md5sum="75b8b53e29bb295f7fbae7909e0e9770"/> | ||
3120 | <dependencies> | ||
3121 | <dep package="app-xdriinfo"/> | ||
3122 | </dependencies> | ||
3123 | </tarball> | ||
3124 | <tarball id="app/xedit" version="X11R7.0-1.0.1"> | ||
3125 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xedit-X11R7.0-1.0.1.tar.bz2" | ||
3126 | size="440739" md5sum="19f607d033f62fb1ee5965f4236b19d4"/> | ||
3127 | <dependencies> | ||
3128 | <dep package="app-xedit"/> | ||
3129 | </dependencies> | ||
3130 | </tarball> | ||
3131 | <tarball id="app/xev" version="X11R7.0-1.0.1"> | ||
3132 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xev-X11R7.0-1.0.1.tar.bz2" | ||
3133 | size="79852" md5sum="5d0d3c13b03e9516eafe536e6bd756c7"/> | ||
3134 | <dependencies> | ||
3135 | <dep package="app-xev"/> | ||
3136 | </dependencies> | ||
3137 | </tarball> | ||
3138 | <tarball id="app/xeyes" version="X11R7.0-1.0.1"> | ||
3139 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xeyes-X11R7.0-1.0.1.tar.bz2" | ||
3140 | size="81054" md5sum="3ffafa7f222ea799bcd9fcd85c60ab98"/> | ||
3141 | <dependencies> | ||
3142 | <dep package="app-xeyes"/> | ||
3143 | </dependencies> | ||
3144 | </tarball> | ||
3145 | <tarball id="app/xf86dga" version="X11R7.0-1.0.1"> | ||
3146 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xf86dga-X11R7.0-1.0.1.tar.bz2" | ||
3147 | size="75128" md5sum="f518fd7ebef3d9e8dbaa57e50a3e2631"/> | ||
3148 | <dependencies> | ||
3149 | <dep package="app-xf86dga"/> | ||
3150 | </dependencies> | ||
3151 | </tarball> | ||
3152 | <tarball id="app/xfd" version="X11R7.0-1.0.1"> | ||
3153 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xfd-X11R7.0-1.0.1.tar.bz2" | ||
3154 | size="88900" md5sum="26c83a6fe245906cc05055abf877d0f2"/> | ||
3155 | <dependencies> | ||
3156 | <dep package="app-xfd"/> | ||
3157 | </dependencies> | ||
3158 | </tarball> | ||
3159 | <tarball id="app/xfindproxy" version="X11R7.0-1.0.1"> | ||
3160 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xfindproxy-X11R7.0-1.0.1.tar.bz2" | ||
3161 | size="77638" md5sum="5ef22b8876bb452f670e0fc425a12504"/> | ||
3162 | <dependencies> | ||
3163 | <dep package="app-xfindproxy"/> | ||
3164 | </dependencies> | ||
3165 | </tarball> | ||
3166 | <tarball id="app/xfontsel" version="X11R7.0-1.0.1"> | ||
3167 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xfontsel-X11R7.0-1.0.1.tar.bz2" | ||
3168 | size="95794" md5sum="d1df7b8622b7f8ebca4b2463118d7073"/> | ||
3169 | <dependencies> | ||
3170 | <dep package="app-xfontsel"/> | ||
3171 | </dependencies> | ||
3172 | </tarball> | ||
3173 | <tarball id="app/xfsinfo" version="X11R7.0-1.0.1"> | ||
3174 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xfsinfo-X11R7.0-1.0.1.tar.bz2" | ||
3175 | size="74357" md5sum="55ca0cfd09b1c1555d492d6961d9af46"/> | ||
3176 | <dependencies> | ||
3177 | <dep package="app-xfsinfo"/> | ||
3178 | </dependencies> | ||
3179 | </tarball> | ||
3180 | <tarball id="app/xfs" version="X11R7.0-1.0.1"> | ||
3181 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xfs-X11R7.0-1.0.1.tar.bz2" | ||
3182 | size="141138" md5sum="a297da3d906110e9c29ec56c5ea578a8"/> | ||
3183 | <dependencies> | ||
3184 | <dep package="app-xfs"/> | ||
3185 | </dependencies> | ||
3186 | </tarball> | ||
3187 | <tarball id="app/xfwp" version="X11R7.0-1.0.1"> | ||
3188 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xfwp-X11R7.0-1.0.1.tar.bz2" | ||
3189 | size="104581" md5sum="e1ef3fef10d1f7fbd936794982a8f0be"/> | ||
3190 | <dependencies> | ||
3191 | <dep package="app-xfwp"/> | ||
3192 | </dependencies> | ||
3193 | </tarball> | ||
3194 | <tarball id="app/xgamma" version="X11R7.0-1.0.1"> | ||
3195 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xgamma-X11R7.0-1.0.1.tar.bz2" | ||
3196 | size="74972" md5sum="07167da3f6b21985e27174ec70f213c0"/> | ||
3197 | <dependencies> | ||
3198 | <dep package="app-xgamma"/> | ||
3199 | </dependencies> | ||
3200 | </tarball> | ||
3201 | <tarball id="app/xgc" version="X11R7.0-1.0.1"> | ||
3202 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xgc-X11R7.0-1.0.1.tar.bz2" | ||
3203 | size="128835" md5sum="8cd01cf558c3eed738115abcf720277d"/> | ||
3204 | <dependencies> | ||
3205 | <dep package="app-xgc"/> | ||
3206 | </dependencies> | ||
3207 | </tarball> | ||
3208 | <tarball id="app/xhost" version="X11R7.0-1.0.0"> | ||
3209 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xhost-X11R7.0-1.0.0.tar.bz2" | ||
3210 | size="85776" md5sum="76c44e84aaf4ad8e97cf15f4dbe4a24a"/> | ||
3211 | <dependencies> | ||
3212 | <dep package="app-xhost"/> | ||
3213 | </dependencies> | ||
3214 | </tarball> | ||
3215 | <tarball id="app/xinit" version="X11R7.0-1.0.1"> | ||
3216 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xinit-X11R7.0-1.0.1.tar.bz2" | ||
3217 | size="92299" md5sum="6d2df59fa328cbc99c0de98bc2e14597"/> | ||
3218 | <dependencies> | ||
3219 | <dep package="app-xinit"/> | ||
3220 | </dependencies> | ||
3221 | </tarball> | ||
3222 | <tarball id="app/xkbcomp" version="X11R7.0-1.0.1"> | ||
3223 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xkbcomp-X11R7.0-1.0.1.tar.bz2" | ||
3224 | size="179839" md5sum="46d1e015897200d4dfed64990abaa8b9"/> | ||
3225 | <dependencies> | ||
3226 | <dep package="app-xkbcomp"/> | ||
3227 | </dependencies> | ||
3228 | </tarball> | ||
3229 | <tarball id="app/xkbevd" version="X11R7.0-1.0.1"> | ||
3230 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xkbevd-X11R7.0-1.0.1.tar.bz2" | ||
3231 | size="102145" md5sum="7ba0496f079552d1918d73bd09bde9b2"/> | ||
3232 | <dependencies> | ||
3233 | <dep package="app-xkbevd"/> | ||
3234 | </dependencies> | ||
3235 | </tarball> | ||
3236 | <tarball id="app/xkbprint" version="X11R7.0-1.0.1"> | ||
3237 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xkbprint-X11R7.0-1.0.1.tar.bz2" | ||
3238 | size="115152" md5sum="6235c39690968d0a9a4c1b1c16c8905a"/> | ||
3239 | <dependencies> | ||
3240 | <dep package="app-xkbprint"/> | ||
3241 | </dependencies> | ||
3242 | </tarball> | ||
3243 | <tarball id="app/xkbutils" version="X11R7.0-1.0.1"> | ||
3244 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xkbutils-X11R7.0-1.0.1.tar.bz2" | ||
3245 | size="65684" md5sum="798502eca0c6c3e8c02d76fabb910532"/> | ||
3246 | <dependencies> | ||
3247 | <dep package="app-xkbutils"/> | ||
3248 | </dependencies> | ||
3249 | </tarball> | ||
3250 | <tarball id="app/xkill" version="X11R7.0-1.0.1"> | ||
3251 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xkill-X11R7.0-1.0.1.tar.bz2" | ||
3252 | size="77135" md5sum="35f47fd58d75c1ea5f414b21a10bdbf3"/> | ||
3253 | <dependencies> | ||
3254 | <dep package="app-xkill"/> | ||
3255 | </dependencies> | ||
3256 | </tarball> | ||
3257 | <tarball id="app/xload" version="X11R7.0-1.0.1"> | ||
3258 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xload-X11R7.0-1.0.1.tar.bz2" | ||
3259 | size="87441" md5sum="11080456822146ebc0118b15f4b911d9"/> | ||
3260 | <dependencies> | ||
3261 | <dep package="app-xload"/> | ||
3262 | </dependencies> | ||
3263 | </tarball> | ||
3264 | <tarball id="app/xlogo" version="X11R7.0-1.0.1"> | ||
3265 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xlogo-X11R7.0-1.0.1.tar.bz2" | ||
3266 | size="87040" md5sum="0314b2f5173da64957031400638fa5f8"/> | ||
3267 | <dependencies> | ||
3268 | <dep package="app-xlogo"/> | ||
3269 | </dependencies> | ||
3270 | </tarball> | ||
3271 | <tarball id="app/xlsatoms" version="X11R7.0-1.0.1"> | ||
3272 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xlsatoms-X11R7.0-1.0.1.tar.bz2" | ||
3273 | size="74840" md5sum="737b4d7893aa886e8e4181c94380a421"/> | ||
3274 | <dependencies> | ||
3275 | <dep package="app-xlsatoms"/> | ||
3276 | </dependencies> | ||
3277 | </tarball> | ||
3278 | <tarball id="app/xlsclients" version="X11R7.0-1.0.1"> | ||
3279 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xlsclients-X11R7.0-1.0.1.tar.bz2" | ||
3280 | size="75661" md5sum="cc0d64e90eab0b90b38355e841824588"/> | ||
3281 | <dependencies> | ||
3282 | <dep package="app-xlsclients"/> | ||
3283 | </dependencies> | ||
3284 | </tarball> | ||
3285 | <tarball id="app/xlsfonts" version="X11R7.0-1.0.1"> | ||
3286 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xlsfonts-X11R7.0-1.0.1.tar.bz2" | ||
3287 | size="87658" md5sum="e8681e5671e7f01922ce6c8f2327e602"/> | ||
3288 | <dependencies> | ||
3289 | <dep package="app-xlsfonts"/> | ||
3290 | </dependencies> | ||
3291 | </tarball> | ||
3292 | <tarball id="app/xmag" version="X11R7.0-1.0.1"> | ||
3293 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xmag-X11R7.0-1.0.1.tar.bz2" | ||
3294 | size="93663" md5sum="38ac487ac1b75be0253fe7f973947386"/> | ||
3295 | <dependencies> | ||
3296 | <dep package="app-xmag"/> | ||
3297 | </dependencies> | ||
3298 | </tarball> | ||
3299 | <tarball id="app/xman" version="X11R7.0-1.0.1"> | ||
3300 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xman-X11R7.0-1.0.1.tar.bz2" | ||
3301 | size="134005" md5sum="a4f21547120952aeb8e5663ebd72e843"/> | ||
3302 | <dependencies> | ||
3303 | <dep package="app-xman"/> | ||
3304 | </dependencies> | ||
3305 | </tarball> | ||
3306 | <tarball id="app/xmessage" version="X11R7.0-1.0.1"> | ||
3307 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xmessage-X11R7.0-1.0.1.tar.bz2" | ||
3308 | size="83378" md5sum="5a17607184fd348c2b36b5499ae9d2e6"/> | ||
3309 | <dependencies> | ||
3310 | <dep package="app-xmessage"/> | ||
3311 | </dependencies> | ||
3312 | </tarball> | ||
3313 | <tarball id="app/xmh" version="X11R7.0-1.0.1"> | ||
3314 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xmh-X11R7.0-1.0.1.tar.bz2" | ||
3315 | size="153096" md5sum="53af2f87dc096d84f11ca6fbd6748b34"/> | ||
3316 | <dependencies> | ||
3317 | <dep package="app-xmh"/> | ||
3318 | </dependencies> | ||
3319 | </tarball> | ||
3320 | <tarball id="app/xmodmap" version="X11R7.0-1.0.0"> | ||
3321 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xmodmap-X11R7.0-1.0.0.tar.bz2" | ||
3322 | size="89685" md5sum="240ed53111925e005d2f138ea98ef5e1"/> | ||
3323 | <dependencies> | ||
3324 | <dep package="app-xmodmap"/> | ||
3325 | </dependencies> | ||
3326 | </tarball> | ||
3327 | <tarball id="app/xmore" version="X11R7.0-1.0.1"> | ||
3328 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xmore-X11R7.0-1.0.1.tar.bz2" | ||
3329 | size="92055" md5sum="99a48c50d486b7c9098b4f5598782cac"/> | ||
3330 | <dependencies> | ||
3331 | <dep package="app-xmore"/> | ||
3332 | </dependencies> | ||
3333 | </tarball> | ||
3334 | <tarball id="app/xphelloworld" version="X11R7.0-1.0.1"> | ||
3335 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xphelloworld-X11R7.0-1.0.1.tar.bz2" | ||
3336 | size="73098" md5sum="80c9a23c7efb72b9674d7af6b7346992"/> | ||
3337 | <dependencies> | ||
3338 | <dep package="app-xphelloworld"/> | ||
3339 | </dependencies> | ||
3340 | </tarball> | ||
3341 | <tarball id="app/xplsprinters" version="X11R7.0-1.0.1"> | ||
3342 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xplsprinters-X11R7.0-1.0.1.tar.bz2" | ||
3343 | size="77170" md5sum="1d0a68dada5e14ab07d7660abd4d03e3"/> | ||
3344 | <dependencies> | ||
3345 | <dep package="app-xplsprinters"/> | ||
3346 | </dependencies> | ||
3347 | </tarball> | ||
3348 | <tarball id="app/xprehashprinterlist" version="X11R7.0-1.0.1"> | ||
3349 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xprehashprinterlist-X11R7.0-1.0.1.tar.bz2" | ||
3350 | size="75554" md5sum="3907bce78d304dedb2a5dd6944bd2ed5"/> | ||
3351 | <dependencies> | ||
3352 | <dep package="app-xprehashprinterlist"/> | ||
3353 | </dependencies> | ||
3354 | </tarball> | ||
3355 | <tarball id="app/xprop" version="X11R7.0-1.0.1"> | ||
3356 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xprop-X11R7.0-1.0.1.tar.bz2" | ||
3357 | size="92550" md5sum="6730f0fbad6969825580de46e66b44dd"/> | ||
3358 | <dependencies> | ||
3359 | <dep package="app-xprop"/> | ||
3360 | </dependencies> | ||
3361 | </tarball> | ||
3362 | <tarball id="app/xpr" version="X11R7.0-1.0.1"> | ||
3363 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xpr-X11R7.0-1.0.1.tar.bz2" | ||
3364 | size="107488" md5sum="487b5ab96b373acb80808758ce23eb49"/> | ||
3365 | <dependencies> | ||
3366 | <dep package="app-xpr"/> | ||
3367 | </dependencies> | ||
3368 | </tarball> | ||
3369 | <tarball id="app/xrandr" version="X11R7.0-1.0.1"> | ||
3370 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xrandr-X11R7.0-1.0.1.tar.bz2" | ||
3371 | size="76130" md5sum="e433ccca3c4f9ab8609dfd1c9c8e36ea"/> | ||
3372 | <dependencies> | ||
3373 | <dep package="app-xrandr"/> | ||
3374 | </dependencies> | ||
3375 | </tarball> | ||
3376 | <tarball id="app/xrdb" version="X11R7.0-1.0.1"> | ||
3377 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xrdb-X11R7.0-1.0.1.tar.bz2" | ||
3378 | size="85598" md5sum="a3c1fd6f5391de7f810239a912d39fa5"/> | ||
3379 | <dependencies> | ||
3380 | <dep package="app-xrdb"/> | ||
3381 | </dependencies> | ||
3382 | </tarball> | ||
3383 | <tarball id="app/xrefresh" version="X11R7.0-1.0.1"> | ||
3384 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xrefresh-X11R7.0-1.0.1.tar.bz2" | ||
3385 | size="76351" md5sum="5a46d5fb82aeeb4d6aac58c9cc367439"/> | ||
3386 | <dependencies> | ||
3387 | <dep package="app-xrefresh"/> | ||
3388 | </dependencies> | ||
3389 | </tarball> | ||
3390 | <tarball id="app/xrx" version="X11R7.0-1.0.1"> | ||
3391 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xrx-X11R7.0-1.0.1.tar.bz2" | ||
3392 | size="260441" md5sum="9de3b04392c98df59c79a34fd51c385f"/> | ||
3393 | <dependencies> | ||
3394 | <dep package="app-xrx"/> | ||
3395 | </dependencies> | ||
3396 | </tarball> | ||
3397 | <tarball id="app/xsetmode" version="X11R7.0-1.0.0"> | ||
3398 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xsetmode-X11R7.0-1.0.0.tar.bz2" | ||
3399 | size="73740" md5sum="d83d6ef0b73762feab724aab95d9a4a2"/> | ||
3400 | <dependencies> | ||
3401 | <dep package="app-xsetmode"/> | ||
3402 | </dependencies> | ||
3403 | </tarball> | ||
3404 | <tarball id="app/xsetpointer" version="X11R7.0-1.0.0"> | ||
3405 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xsetpointer-X11R7.0-1.0.0.tar.bz2" | ||
3406 | size="73882" md5sum="195614431e2431508e07a42a3b6d4568"/> | ||
3407 | <dependencies> | ||
3408 | <dep package="app-xsetpointer"/> | ||
3409 | </dependencies> | ||
3410 | </tarball> | ||
3411 | <tarball id="app/xsetroot" version="X11R7.0-1.0.1"> | ||
3412 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xsetroot-X11R7.0-1.0.1.tar.bz2" | ||
3413 | size="77672" md5sum="e2831b39cd395d6f6f4824b0e25f55ed"/> | ||
3414 | <dependencies> | ||
3415 | <dep package="app-xsetroot"/> | ||
3416 | </dependencies> | ||
3417 | </tarball> | ||
3418 | <tarball id="app/xset" version="X11R7.0-1.0.1"> | ||
3419 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xset-X11R7.0-1.0.1.tar.bz2" | ||
3420 | size="88719" md5sum="a0350e334a215829166266e2ce504b1c"/> | ||
3421 | <dependencies> | ||
3422 | <dep package="app-xset"/> | ||
3423 | </dependencies> | ||
3424 | </tarball> | ||
3425 | <tarball id="app/xsm" version="X11R7.0-1.0.1"> | ||
3426 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xsm-X11R7.0-1.0.1.tar.bz2" | ||
3427 | size="116842" md5sum="e3588272ce3b7dc21d42ead683135a8a"/> | ||
3428 | <dependencies> | ||
3429 | <dep package="app-xsm"/> | ||
3430 | </dependencies> | ||
3431 | </tarball> | ||
3432 | <tarball id="app/xstdcmap" version="X11R7.0-1.0.1"> | ||
3433 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xstdcmap-X11R7.0-1.0.1.tar.bz2" | ||
3434 | size="76275" md5sum="e276aa02d44dcacf5ac13aa0cabd404d"/> | ||
3435 | <dependencies> | ||
3436 | <dep package="app-xstdcmap"/> | ||
3437 | </dependencies> | ||
3438 | </tarball> | ||
3439 | <tarball id="app/xtrap" version="X11R7.0-1.0.1"> | ||
3440 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xtrap-X11R7.0-1.0.1.tar.bz2" | ||
3441 | size="91255" md5sum="6d56946322d2875eb33f25f5e5f621a3"/> | ||
3442 | <dependencies> | ||
3443 | <dep package="app-xtrap"/> | ||
3444 | </dependencies> | ||
3445 | </tarball> | ||
3446 | <tarball id="app/xvidtune" version="X11R7.0-1.0.1"> | ||
3447 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xvidtune-X11R7.0-1.0.1.tar.bz2" | ||
3448 | size="88178" md5sum="a12e27fb732cb115b6adc4c724c44c5d"/> | ||
3449 | <dependencies> | ||
3450 | <dep package="app-xvidtune"/> | ||
3451 | </dependencies> | ||
3452 | </tarball> | ||
3453 | <tarball id="app/xvinfo" version="X11R7.0-1.0.1"> | ||
3454 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xvinfo-X11R7.0-1.0.1.tar.bz2" | ||
3455 | size="74754" md5sum="39d79590345bed51da6df838f6490cbf"/> | ||
3456 | <dependencies> | ||
3457 | <dep package="app-xvinfo"/> | ||
3458 | </dependencies> | ||
3459 | </tarball> | ||
3460 | <tarball id="app/xwd" version="X11R7.0-1.0.1"> | ||
3461 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xwd-X11R7.0-1.0.1.tar.bz2" | ||
3462 | size="97002" md5sum="596c443465ab9ab67c59c794261d4571"/> | ||
3463 | <dependencies> | ||
3464 | <dep package="app-xwd"/> | ||
3465 | </dependencies> | ||
3466 | </tarball> | ||
3467 | <tarball id="app/xwininfo" version="X11R7.0-1.0.1"> | ||
3468 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xwininfo-X11R7.0-1.0.1.tar.bz2" | ||
3469 | size="87409" md5sum="3ec67e4e1b9f5a1fe7e56b56ab931893"/> | ||
3470 | <dependencies> | ||
3471 | <dep package="app-xwininfo"/> | ||
3472 | </dependencies> | ||
3473 | </tarball> | ||
3474 | <tarball id="app/xwud" version="X11R7.0-1.0.1"> | ||
3475 | <source href="http://ftp.x.org/pub/X11R7.0/src/app/xwud-X11R7.0-1.0.1.tar.bz2" | ||
3476 | size="83089" md5sum="e08d2ee04abb89a6348f47c84a1ff3ed"/> | ||
3477 | <dependencies> | ||
3478 | <dep package="app-xwud"/> | ||
3479 | </dependencies> | ||
3480 | </tarball> | ||
3481 | <tarball id="data/xbitmaps" version="X11R7.0-1.0.1"> | ||
3482 | <source href="http://ftp.x.org/pub/X11R7.0/src/data/xbitmaps-X11R7.0-1.0.1.tar.bz2" | ||
3483 | size="55492" md5sum="22c6f4a17220cd6b41d9799905f8e357"/> | ||
3484 | <dependencies> | ||
3485 | <dep package="data-xbitmaps"/> | ||
3486 | </dependencies> | ||
3487 | </tarball> | ||
3488 | <tarball id="data/xcursor-themes" version="X11R7.0-1.0.1"> | ||
3489 | <source href="http://ftp.x.org/pub/X11R7.0/src/data/xcursor-themes-X11R7.0-1.0.1.tar.bz2" | ||
3490 | size="2219697" md5sum="c39afeae55a7d330297b2fec3d113634"/> | ||
3491 | <dependencies> | ||
3492 | <dep package="data-xcursor-themes"/> | ||
3493 | </dependencies> | ||
3494 | </tarball> | ||
3495 | <tarball id="data/xkbdata" version="X11R7.0-1.0.1"> | ||
3496 | <source href="http://ftp.x.org/pub/X11R7.0/src/data/xkbdata-X11R7.0-1.0.1.tar.bz2" | ||
3497 | size="285091" md5sum="1f706f92334ee65818512b3b45d7be65"/> | ||
3498 | <dependencies> | ||
3499 | <dep package="data-xkbdata"/> | ||
3500 | </dependencies> | ||
3501 | </tarball> | ||
3502 | <tarball id="doc/xorg-docs" version="X11R7.0-1.0.1"> | ||
3503 | <source href="http://ftp.x.org/pub/X11R7.0/src/doc/xorg-docs-X11R7.0-1.0.1.tar.bz2" | ||
3504 | size="8339757" md5sum="ac0d76afa46ef5da9e1cf33558f4b303"/> | ||
3505 | <dependencies> | ||
3506 | <dep package="doc-xorg-docs"/> | ||
3507 | </dependencies> | ||
3508 | </tarball> | ||
3509 | <tarball id="doc/xorg-sgml-doctools" version="X11R7.0-1.0.1"> | ||
3510 | <source href="http://ftp.x.org/pub/X11R7.0/src/doc/xorg-sgml-doctools-X11R7.0-1.0.1.tar.bz2" | ||
3511 | size="37232" md5sum="d08d4fd10ac46d8b4636efe4d8c0de74"/> | ||
3512 | <dependencies> | ||
3513 | <dep package="doc-xorg-sgml-doctools"/> | ||
3514 | </dependencies> | ||
3515 | </tarball> | ||
3516 | <tarball id="driver/xf86-input-acecad" version="X11R7.0-1.0.0.5"> | ||
3517 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-acecad-X11R7.0-1.0.0.5.tar.bz2" | ||
3518 | size="213979" md5sum="b35b1756579ebe296801622bdf063ab1"/> | ||
3519 | <dependencies> | ||
3520 | <dep package="driver-xf86-input-acecad"/> | ||
3521 | </dependencies> | ||
3522 | </tarball> | ||
3523 | <tarball id="driver/xf86-input-aiptek" version="X11R7.0-1.0.0.5"> | ||
3524 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-aiptek-X11R7.0-1.0.0.5.tar.bz2" | ||
3525 | size="225634" md5sum="9ee5109ef33e281ce0784ad077f26cee"/> | ||
3526 | <dependencies> | ||
3527 | <dep package="driver-xf86-input-aiptek"/> | ||
3528 | </dependencies> | ||
3529 | </tarball> | ||
3530 | <tarball id="driver/xf86-input-calcomp" version="X11R7.0-1.0.0.5"> | ||
3531 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-calcomp-X11R7.0-1.0.0.5.tar.bz2" | ||
3532 | size="215168" md5sum="f4199b5df063701462d5a8c84aadd190"/> | ||
3533 | <dependencies> | ||
3534 | <dep package="driver-xf86-input-calcomp"/> | ||
3535 | </dependencies> | ||
3536 | </tarball> | ||
3537 | <tarball id="driver/xf86-input-citron" version="X11R7.0-2.1.1.5"> | ||
3538 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-citron-X11R7.0-2.1.1.5.tar.bz2" | ||
3539 | size="233902" md5sum="62b5405d337bc055bc9345565cc0da8c"/> | ||
3540 | <dependencies> | ||
3541 | <dep package="driver-xf86-input-citron"/> | ||
3542 | </dependencies> | ||
3543 | </tarball> | ||
3544 | <tarball id="driver/xf86-input-digitaledge" version="X11R7.0-1.0.1.3"> | ||
3545 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-digitaledge-X11R7.0-1.0.1.3.tar.bz2" | ||
3546 | size="216971" md5sum="8342f3a0dcdaa1120af01dd25dabf0d7"/> | ||
3547 | <dependencies> | ||
3548 | <dep package="driver-xf86-input-digitaledge"/> | ||
3549 | </dependencies> | ||
3550 | </tarball> | ||
3551 | <tarball id="driver/xf86-input-dmc" version="X11R7.0-1.0.0.5"> | ||
3552 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-dmc-X11R7.0-1.0.0.5.tar.bz2" | ||
3553 | size="212774" md5sum="fdf127a2d419f7c2e02bec27273091d3"/> | ||
3554 | <dependencies> | ||
3555 | <dep package="driver-xf86-input-dmc"/> | ||
3556 | </dependencies> | ||
3557 | </tarball> | ||
3558 | <tarball id="driver/xf86-input-dynapro" version="X11R7.0-1.0.0.5"> | ||
3559 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-dynapro-X11R7.0-1.0.0.5.tar.bz2" | ||
3560 | size="212029" md5sum="89dbb839ab4c5fca3dbc3c2805a7efb9"/> | ||
3561 | <dependencies> | ||
3562 | <dep package="driver-xf86-input-dynapro"/> | ||
3563 | </dependencies> | ||
3564 | </tarball> | ||
3565 | <tarball id="driver/xf86-input-elo2300" version="X11R7.0-1.0.0.5"> | ||
3566 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-elo2300-X11R7.0-1.0.0.5.tar.bz2" | ||
3567 | size="214388" md5sum="6009a17f13a37bfde8b60c2fba5b0e5b"/> | ||
3568 | <dependencies> | ||
3569 | <dep package="driver-xf86-input-elo2300"/> | ||
3570 | </dependencies> | ||
3571 | </tarball> | ||
3572 | <tarball id="driver/xf86-input-elographics" version="X11R7.0-1.0.0.5"> | ||
3573 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-elographics-X11R7.0-1.0.0.5.tar.bz2" | ||
3574 | size="219736" md5sum="24c33f833bb2db72a07c3d28bfc0aae9"/> | ||
3575 | <dependencies> | ||
3576 | <dep package="driver-xf86-input-elographics"/> | ||
3577 | </dependencies> | ||
3578 | </tarball> | ||
3579 | <tarball id="driver/xf86-input-evdev" version="X11R7.0-1.0.0.5"> | ||
3580 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-evdev-X11R7.0-1.0.0.5.tar.bz2" | ||
3581 | size="212372" md5sum="d982c6f185f4c75a4b65703ceed7be06"/> | ||
3582 | <dependencies> | ||
3583 | <dep package="driver-xf86-input-evdev"/> | ||
3584 | </dependencies> | ||
3585 | </tarball> | ||
3586 | <tarball id="driver/xf86-input-fpit" version="X11R7.0-1.0.0.5"> | ||
3587 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-fpit-X11R7.0-1.0.0.5.tar.bz2" | ||
3588 | size="215828" md5sum="fc0e11fefc322623914a2d819d5b6d51"/> | ||
3589 | <dependencies> | ||
3590 | <dep package="driver-xf86-input-fpit"/> | ||
3591 | </dependencies> | ||
3592 | </tarball> | ||
3593 | <tarball id="driver/xf86-input-hyperpen" version="X11R7.0-1.0.0.5"> | ||
3594 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-hyperpen-X11R7.0-1.0.0.5.tar.bz2" | ||
3595 | size="218554" md5sum="0c4f2a6390e3045e4c48a48b47b6332c"/> | ||
3596 | <dependencies> | ||
3597 | <dep package="driver-xf86-input-hyperpen"/> | ||
3598 | </dependencies> | ||
3599 | </tarball> | ||
3600 | <tarball id="driver/xf86-input-jamstudio" version="X11R7.0-1.0.0.5"> | ||
3601 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-jamstudio-X11R7.0-1.0.0.5.tar.bz2" | ||
3602 | size="209954" md5sum="49de35ca024be2cb785832ae37ec30d0"/> | ||
3603 | <dependencies> | ||
3604 | <dep package="driver-xf86-input-jamstudio"/> | ||
3605 | </dependencies> | ||
3606 | </tarball> | ||
3607 | <tarball id="driver/xf86-input-joystick" version="X11R7.0-1.0.0.5"> | ||
3608 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-joystick-X11R7.0-1.0.0.5.tar.bz2" | ||
3609 | size="212507" md5sum="9e3ba60836f4c1d2e4cebc63a28321b4"/> | ||
3610 | <dependencies> | ||
3611 | <dep package="driver-xf86-input-joystick"/> | ||
3612 | </dependencies> | ||
3613 | </tarball> | ||
3614 | <tarball id="driver/xf86-input-keyboard" version="X11R7.0-1.0.1.3"> | ||
3615 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-keyboard-X11R7.0-1.0.1.3.tar.bz2" | ||
3616 | size="215665" md5sum="8fb8a30fd9d7f152a1aef4eb8ef32b3f"/> | ||
3617 | <dependencies> | ||
3618 | <dep package="driver-xf86-input-keyboard"/> | ||
3619 | </dependencies> | ||
3620 | </tarball> | ||
3621 | <tarball id="driver/xf86-input-magellan" version="X11R7.0-1.0.0.5"> | ||
3622 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-magellan-X11R7.0-1.0.0.5.tar.bz2" | ||
3623 | size="212433" md5sum="fd7367f467dc3302604274cee59a7c7b"/> | ||
3624 | <dependencies> | ||
3625 | <dep package="driver-xf86-input-magellan"/> | ||
3626 | </dependencies> | ||
3627 | </tarball> | ||
3628 | <tarball id="driver/xf86-input-magictouch" version="X11R7.0-1.0.0.5"> | ||
3629 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-magictouch-X11R7.0-1.0.0.5.tar.bz2" | ||
3630 | size="214562" md5sum="a51d84792b8c0079d7c8d13eb17acf31"/> | ||
3631 | <dependencies> | ||
3632 | <dep package="driver-xf86-input-magictouch"/> | ||
3633 | </dependencies> | ||
3634 | </tarball> | ||
3635 | <tarball id="driver/xf86-input-microtouch" version="X11R7.0-1.0.0.5"> | ||
3636 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-microtouch-X11R7.0-1.0.0.5.tar.bz2" | ||
3637 | size="215714" md5sum="0c25e0340b6483fb2a600b0e885724a2"/> | ||
3638 | <dependencies> | ||
3639 | <dep package="driver-xf86-input-microtouch"/> | ||
3640 | </dependencies> | ||
3641 | </tarball> | ||
3642 | <tarball id="driver/xf86-input-mouse" version="X11R7.0-1.0.3.1"> | ||
3643 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-mouse-X11R7.0-1.0.3.1.tar.bz2" | ||
3644 | size="259054" md5sum="12a908e5a97b1b03e8717abf167f4f27"/> | ||
3645 | <dependencies> | ||
3646 | <dep package="driver-xf86-input-mouse"/> | ||
3647 | </dependencies> | ||
3648 | </tarball> | ||
3649 | <tarball id="driver/xf86-input-mutouch" version="X11R7.0-1.0.0.5"> | ||
3650 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-mutouch-X11R7.0-1.0.0.5.tar.bz2" | ||
3651 | size="219973" md5sum="4758e667bfbba517df2a58d51270cfe2"/> | ||
3652 | <dependencies> | ||
3653 | <dep package="driver-xf86-input-mutouch"/> | ||
3654 | </dependencies> | ||
3655 | </tarball> | ||
3656 | <tarball id="driver/xf86-input-palmax" version="X11R7.0-1.0.0.5"> | ||
3657 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-palmax-X11R7.0-1.0.0.5.tar.bz2" | ||
3658 | size="213854" md5sum="d138024a20298304af883631d23c5338"/> | ||
3659 | <dependencies> | ||
3660 | <dep package="driver-xf86-input-palmax"/> | ||
3661 | </dependencies> | ||
3662 | </tarball> | ||
3663 | <tarball id="driver/xf86-input-penmount" version="X11R7.0-1.0.0.5"> | ||
3664 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-penmount-X11R7.0-1.0.0.5.tar.bz2" | ||
3665 | size="212934" md5sum="065b1cf862864741aebcfefcc7c09539"/> | ||
3666 | <dependencies> | ||
3667 | <dep package="driver-xf86-input-penmount"/> | ||
3668 | </dependencies> | ||
3669 | </tarball> | ||
3670 | <tarball id="driver/xf86-input-spaceorb" version="X11R7.0-1.0.0.5"> | ||
3671 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-spaceorb-X11R7.0-1.0.0.5.tar.bz2" | ||
3672 | size="211269" md5sum="193ca7b1e87c3995b86f15a01b63b297"/> | ||
3673 | <dependencies> | ||
3674 | <dep package="driver-xf86-input-spaceorb"/> | ||
3675 | </dependencies> | ||
3676 | </tarball> | ||
3677 | <tarball id="driver/xf86-input-summa" version="X11R7.0-1.0.0.5"> | ||
3678 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-summa-X11R7.0-1.0.0.5.tar.bz2" | ||
3679 | size="218264" md5sum="61d780857e5dc139081718c075e74a01"/> | ||
3680 | <dependencies> | ||
3681 | <dep package="driver-xf86-input-summa"/> | ||
3682 | </dependencies> | ||
3683 | </tarball> | ||
3684 | <tarball id="driver/xf86-input-tek4957" version="X11R7.0-1.0.0.5"> | ||
3685 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-tek4957-X11R7.0-1.0.0.5.tar.bz2" | ||
3686 | size="213488" md5sum="df633403c91a48c6a316c6a5f48e53e2"/> | ||
3687 | <dependencies> | ||
3688 | <dep package="driver-xf86-input-tek4957"/> | ||
3689 | </dependencies> | ||
3690 | </tarball> | ||
3691 | <tarball id="driver/xf86-input-ur98" version="X11R7.0-1.0.0.5"> | ||
3692 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-ur98-X11R7.0-1.0.0.5.tar.bz2" | ||
3693 | size="214459" md5sum="9b1530b3dcbb77690ad0e61f60489899"/> | ||
3694 | <dependencies> | ||
3695 | <dep package="driver-xf86-input-ur98"/> | ||
3696 | </dependencies> | ||
3697 | </tarball> | ||
3698 | <tarball id="driver/xf86-input-void" version="X11R7.0-1.0.0.5"> | ||
3699 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-input-void-X11R7.0-1.0.0.5.tar.bz2" | ||
3700 | size="209891" md5sum="c7ae53dee1f3e95fa5ce9659b34d8446"/> | ||
3701 | <dependencies> | ||
3702 | <dep package="driver-xf86-input-void"/> | ||
3703 | </dependencies> | ||
3704 | </tarball> | ||
3705 | <tarball id="driver/xf86-video-apm" version="X11R7.0-1.0.1.5"> | ||
3706 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-apm-X11R7.0-1.0.1.5.tar.bz2" | ||
3707 | size="255034" md5sum="323911ab16a6147d3cabceff9336a3d2"/> | ||
3708 | <dependencies> | ||
3709 | <dep package="driver-xf86-video-apm"/> | ||
3710 | </dependencies> | ||
3711 | </tarball> | ||
3712 | <tarball id="driver/xf86-video-ark" version="X11R7.0-0.5.0.5"> | ||
3713 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-ark-X11R7.0-0.5.0.5.tar.bz2" | ||
3714 | size="215060" md5sum="342937e275dbc92f437417a3186a8222"/> | ||
3715 | <dependencies> | ||
3716 | <dep package="driver-xf86-video-ark"/> | ||
3717 | </dependencies> | ||
3718 | </tarball> | ||
3719 | <tarball id="driver/xf86-video-ati" version="X11R7.0-6.5.7.3"> | ||
3720 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-ati-X11R7.0-6.5.7.3.tar.bz2" | ||
3721 | size="659422" md5sum="92525195a7a36f5ffbffcb4e6a564e50"/> | ||
3722 | <dependencies> | ||
3723 | <dep package="driver-xf86-video-ati"/> | ||
3724 | </dependencies> | ||
3725 | </tarball> | ||
3726 | <tarball id="driver/xf86-video-chips" version="X11R7.0-1.0.1.3"> | ||
3727 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-chips-X11R7.0-1.0.1.3.tar.bz2" | ||
3728 | size="302529" md5sum="90f23505faceac30d3f46ab94f7293e1"/> | ||
3729 | <dependencies> | ||
3730 | <dep package="driver-xf86-video-chips"/> | ||
3731 | </dependencies> | ||
3732 | </tarball> | ||
3733 | <tarball id="driver/xf86-video-cirrus" version="X11R7.0-1.0.0.5"> | ||
3734 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-cirrus-X11R7.0-1.0.0.5.tar.bz2" | ||
3735 | size="250335" md5sum="7708693ad9d73cd76d4caef7c644a46f"/> | ||
3736 | <dependencies> | ||
3737 | <dep package="driver-xf86-video-cirrus"/> | ||
3738 | </dependencies> | ||
3739 | </tarball> | ||
3740 | <tarball id="driver/xf86-video-cyrix" version="X11R7.0-1.0.0.5"> | ||
3741 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-cyrix-X11R7.0-1.0.0.5.tar.bz2" | ||
3742 | size="230817" md5sum="14f868d16554b19fef4f30398a7b9cf1"/> | ||
3743 | <dependencies> | ||
3744 | <dep package="driver-xf86-video-cyrix"/> | ||
3745 | </dependencies> | ||
3746 | </tarball> | ||
3747 | <tarball id="driver/xf86-video-dummy" version="X11R7.0-0.1.0.5"> | ||
3748 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-dummy-X11R7.0-0.1.0.5.tar.bz2" | ||
3749 | size="212668" md5sum="462654f9be7e3022f97147e3390db97a"/> | ||
3750 | <dependencies> | ||
3751 | <dep package="driver-xf86-video-dummy"/> | ||
3752 | </dependencies> | ||
3753 | </tarball> | ||
3754 | <tarball id="driver/xf86-video-fbdev" version="X11R7.0-0.1.0.5"> | ||
3755 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-fbdev-X11R7.0-0.1.0.5.tar.bz2" | ||
3756 | size="215158" md5sum="1cf374eeb9151ac16a7ec2cd38048737"/> | ||
3757 | <dependencies> | ||
3758 | <dep package="driver-xf86-video-fbdev"/> | ||
3759 | </dependencies> | ||
3760 | </tarball> | ||
3761 | <tarball id="driver/xf86-video-glint" version="X11R7.0-1.0.1.3"> | ||
3762 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-glint-X11R7.0-1.0.1.3.tar.bz2" | ||
3763 | size="320027" md5sum="f14c2f1696c05760207adcaac856e5e5"/> | ||
3764 | <dependencies> | ||
3765 | <dep package="driver-xf86-video-glint"/> | ||
3766 | </dependencies> | ||
3767 | </tarball> | ||
3768 | <tarball id="driver/xf86-video-i128" version="X11R7.0-1.1.0.5"> | ||
3769 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-i128-X11R7.0-1.1.0.5.tar.bz2" | ||
3770 | size="250215" md5sum="078eed8c3673488ee618dfc7a3ef101b"/> | ||
3771 | <dependencies> | ||
3772 | <dep package="driver-xf86-video-i128"/> | ||
3773 | </dependencies> | ||
3774 | </tarball> | ||
3775 | <tarball id="driver/xf86-video-i740" version="X11R7.0-1.0.0.5"> | ||
3776 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-i740-X11R7.0-1.0.0.5.tar.bz2" | ||
3777 | size="240418" md5sum="625448b13ebe2a13b7defad1efec05c4"/> | ||
3778 | <dependencies> | ||
3779 | <dep package="driver-xf86-video-i740"/> | ||
3780 | </dependencies> | ||
3781 | </tarball> | ||
3782 | <tarball id="driver/xf86-video-i810" version="X11R7.0-1.4.1.3"> | ||
3783 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-i810-X11R7.0-1.4.1.3.tar.bz2" | ||
3784 | size="356294" md5sum="fe6bec726fc1657b537508bbe8c2005b"/> | ||
3785 | <dependencies> | ||
3786 | <dep package="driver-xf86-video-i810"/> | ||
3787 | </dependencies> | ||
3788 | </tarball> | ||
3789 | <tarball id="driver/xf86-video-imstt" version="X11R7.0-1.0.0.5"> | ||
3790 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-imstt-X11R7.0-1.0.0.5.tar.bz2" | ||
3791 | size="217637" md5sum="cc949688918b78f830d78a9613e6896b"/> | ||
3792 | <dependencies> | ||
3793 | <dep package="driver-xf86-video-imstt"/> | ||
3794 | </dependencies> | ||
3795 | </tarball> | ||
3796 | <tarball id="driver/xf86-video-mga" version="X11R7.0-1.2.1.3"> | ||
3797 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-mga-X11R7.0-1.2.1.3.tar.bz2" | ||
3798 | size="335360" md5sum="cb0409782020b5cc7edc273624ffdd17"/> | ||
3799 | <dependencies> | ||
3800 | <dep package="driver-xf86-video-mga"/> | ||
3801 | </dependencies> | ||
3802 | </tarball> | ||
3803 | <tarball id="driver/xf86-video-neomagic" version="X11R7.0-1.0.0.5"> | ||
3804 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-neomagic-X11R7.0-1.0.0.5.tar.bz2" | ||
3805 | size="250327" md5sum="ffe9015678a41e97bdbd2825066bb47b"/> | ||
3806 | <dependencies> | ||
3807 | <dep package="driver-xf86-video-neomagic"/> | ||
3808 | </dependencies> | ||
3809 | </tarball> | ||
3810 | <tarball id="driver/xf86-video-newport" version="X11R7.0-0.1.4.1"> | ||
3811 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-newport-X11R7.0-0.1.4.1.tar.bz2" | ||
3812 | size="233693" md5sum="d74d9896d57c3caf224ba3472630d874"/> | ||
3813 | <dependencies> | ||
3814 | <dep package="driver-xf86-video-newport"/> | ||
3815 | </dependencies> | ||
3816 | </tarball> | ||
3817 | <tarball id="driver/xf86-video-nsc" version="X11R7.0-2.7.6.5"> | ||
3818 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-nsc-X11R7.0-2.7.6.5.tar.bz2" | ||
3819 | size="453051" md5sum="ab16611b3ec7d21503b16b0a31addae0"/> | ||
3820 | <dependencies> | ||
3821 | <dep package="driver-xf86-video-nsc"/> | ||
3822 | </dependencies> | ||
3823 | </tarball> | ||
3824 | <tarball id="driver/xf86-video-nv" version="X11R7.0-1.0.1.5"> | ||
3825 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-nv-X11R7.0-1.0.1.5.tar.bz2" | ||
3826 | size="267738" md5sum="9a88547fe550e20edcc5a938d31e22b1"/> | ||
3827 | <dependencies> | ||
3828 | <dep package="driver-xf86-video-nv"/> | ||
3829 | </dependencies> | ||
3830 | </tarball> | ||
3831 | <tarball id="driver/xf86-video-rendition" version="X11R7.0-4.0.1.3"> | ||
3832 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-rendition-X11R7.0-4.0.1.3.tar.bz2" | ||
3833 | size="278961" md5sum="f1a25db74a148dea45115e813027b932"/> | ||
3834 | <dependencies> | ||
3835 | <dep package="driver-xf86-video-rendition"/> | ||
3836 | </dependencies> | ||
3837 | </tarball> | ||
3838 | <tarball id="driver/xf86-video-s3virge" version="X11R7.0-1.8.6.5"> | ||
3839 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-s3virge-X11R7.0-1.8.6.5.tar.bz2" | ||
3840 | size="270294" md5sum="d0164c37749ab5f565db9813487e1900"/> | ||
3841 | <dependencies> | ||
3842 | <dep package="driver-xf86-video-s3virge"/> | ||
3843 | </dependencies> | ||
3844 | </tarball> | ||
3845 | <tarball id="driver/xf86-video-s3" version="X11R7.0-0.3.5.5"> | ||
3846 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-s3-X11R7.0-0.3.5.5.tar.bz2" | ||
3847 | size="234539" md5sum="83b9e8a9b8fc1c49bda2811358e5007c"/> | ||
3848 | <dependencies> | ||
3849 | <dep package="driver-xf86-video-s3"/> | ||
3850 | </dependencies> | ||
3851 | </tarball> | ||
3852 | <tarball id="driver/xf86-video-savage" version="X11R7.0-2.0.2.3"> | ||
3853 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-savage-X11R7.0-2.0.2.3.tar.bz2" | ||
3854 | size="282811" md5sum="6b638dd500d10dba1822d3ea5061fc65"/> | ||
3855 | <dependencies> | ||
3856 | <dep package="driver-xf86-video-savage"/> | ||
3857 | </dependencies> | ||
3858 | </tarball> | ||
3859 | <tarball id="driver/xf86-video-siliconmotion" version="X11R7.0-1.3.1.5"> | ||
3860 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-siliconmotion-X11R7.0-1.3.1.5.tar.bz2" | ||
3861 | size="257549" md5sum="957de4e2a3c687dbb2e9e18582397804"/> | ||
3862 | <dependencies> | ||
3863 | <dep package="driver-xf86-video-siliconmotion"/> | ||
3864 | </dependencies> | ||
3865 | </tarball> | ||
3866 | <tarball id="driver/xf86-video-sisusb" version="X11R7.0-0.7.1.3"> | ||
3867 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-sisusb-X11R7.0-0.7.1.3.tar.bz2" | ||
3868 | size="282820" md5sum="781d726a0ca54b65521e383ab99043c8"/> | ||
3869 | <dependencies> | ||
3870 | <dep package="driver-xf86-video-sisusb"/> | ||
3871 | </dependencies> | ||
3872 | </tarball> | ||
3873 | <tarball id="driver/xf86-video-sis" version="X11R7.0-0.8.1.3"> | ||
3874 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-sis-X11R7.0-0.8.1.3.tar.bz2" | ||
3875 | size="585512" md5sum="e3bac5a208b8bacfbec236b5a5b0ef40"/> | ||
3876 | <dependencies> | ||
3877 | <dep package="driver-xf86-video-sis"/> | ||
3878 | </dependencies> | ||
3879 | </tarball> | ||
3880 | <tarball id="driver/xf86-video-sunbw2" version="X11R7.0-1.0.0.5"> | ||
3881 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-sunbw2-X11R7.0-1.0.0.5.tar.bz2" | ||
3882 | size="211092" md5sum="0cdda1ab939ea1190c142aa8aabfaf83"/> | ||
3883 | <dependencies> | ||
3884 | <dep package="driver-xf86-video-sunbw2"/> | ||
3885 | </dependencies> | ||
3886 | </tarball> | ||
3887 | <tarball id="driver/xf86-video-suncg14" version="X11R7.0-1.0.0.5"> | ||
3888 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-suncg14-X11R7.0-1.0.0.5.tar.bz2" | ||
3889 | size="212377" md5sum="8f3a734d02ae716415f9c6344fa661bd"/> | ||
3890 | <dependencies> | ||
3891 | <dep package="driver-xf86-video-suncg14"/> | ||
3892 | </dependencies> | ||
3893 | </tarball> | ||
3894 | <tarball id="driver/xf86-video-suncg3" version="X11R7.0-1.0.0.5"> | ||
3895 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-suncg3-X11R7.0-1.0.0.5.tar.bz2" | ||
3896 | size="210725" md5sum="799a54cef1f4435e00fa94a1d97d056f"/> | ||
3897 | <dependencies> | ||
3898 | <dep package="driver-xf86-video-suncg3"/> | ||
3899 | </dependencies> | ||
3900 | </tarball> | ||
3901 | <tarball id="driver/xf86-video-suncg6" version="X11R7.0-1.0.0.5"> | ||
3902 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-suncg6-X11R7.0-1.0.0.5.tar.bz2" | ||
3903 | size="215040" md5sum="2227f3fb86b02148f347e002662e53c8"/> | ||
3904 | <dependencies> | ||
3905 | <dep package="driver-xf86-video-suncg6"/> | ||
3906 | </dependencies> | ||
3907 | </tarball> | ||
3908 | <tarball id="driver/xf86-video-sunffb" version="X11R7.0-1.0.1.3"> | ||
3909 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-sunffb-X11R7.0-1.0.1.3.tar.bz2" | ||
3910 | size="278439" md5sum="bb5182e3b74b3baa6fee245ac8bbf09a"/> | ||
3911 | <dependencies> | ||
3912 | <dep package="driver-xf86-video-sunffb"/> | ||
3913 | </dependencies> | ||
3914 | </tarball> | ||
3915 | <tarball id="driver/xf86-video-sunleo" version="X11R7.0-1.0.0.5"> | ||
3916 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-sunleo-X11R7.0-1.0.0.5.tar.bz2" | ||
3917 | size="220890" md5sum="deb17a74ba68ee9593ac774206bd3612"/> | ||
3918 | <dependencies> | ||
3919 | <dep package="driver-xf86-video-sunleo"/> | ||
3920 | </dependencies> | ||
3921 | </tarball> | ||
3922 | <tarball id="driver/xf86-video-suntcx" version="X11R7.0-1.0.0.5"> | ||
3923 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-suntcx-X11R7.0-1.0.0.5.tar.bz2" | ||
3924 | size="214253" md5sum="74d6ba5e55afdfebff84db08b6589e26"/> | ||
3925 | <dependencies> | ||
3926 | <dep package="driver-xf86-video-suntcx"/> | ||
3927 | </dependencies> | ||
3928 | </tarball> | ||
3929 | <tarball id="driver/xf86-video-tdfx" version="X11R7.0-1.1.1.3"> | ||
3930 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-tdfx-X11R7.0-1.1.1.3.tar.bz2" | ||
3931 | size="257113" md5sum="0201415230bf0454384c3bad099520d2"/> | ||
3932 | <dependencies> | ||
3933 | <dep package="driver-xf86-video-tdfx"/> | ||
3934 | </dependencies> | ||
3935 | </tarball> | ||
3936 | <tarball id="driver/xf86-video-tga" version="X11R7.0-1.0.0.5"> | ||
3937 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-tga-X11R7.0-1.0.0.5.tar.bz2" | ||
3938 | size="244810" md5sum="fa67bf34454888d38e15708395cfed87"/> | ||
3939 | <dependencies> | ||
3940 | <dep package="driver-xf86-video-tga"/> | ||
3941 | </dependencies> | ||
3942 | </tarball> | ||
3943 | <tarball id="driver/xf86-video-trident" version="X11R7.0-1.0.1.2"> | ||
3944 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-trident-X11R7.0-1.0.1.2.tar.bz2" | ||
3945 | size="261260" md5sum="69f28afc7b585d01bb06b1e2f872f8ea"/> | ||
3946 | <dependencies> | ||
3947 | <dep package="driver-xf86-video-trident"/> | ||
3948 | </dependencies> | ||
3949 | </tarball> | ||
3950 | <tarball id="driver/xf86-video-tseng" version="X11R7.0-1.0.0.5"> | ||
3951 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-tseng-X11R7.0-1.0.0.5.tar.bz2" | ||
3952 | size="260944" md5sum="981f46914c1e54742418f0444ea2e092"/> | ||
3953 | <dependencies> | ||
3954 | <dep package="driver-xf86-video-tseng"/> | ||
3955 | </dependencies> | ||
3956 | </tarball> | ||
3957 | <tarball id="driver/xf86-video-v4l" version="X11R7.0-0.0.1.5"> | ||
3958 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-v4l-X11R7.0-0.0.1.5.tar.bz2" | ||
3959 | size="218210" md5sum="e422c63bc83717ecd0686aef2036802b"/> | ||
3960 | <dependencies> | ||
3961 | <dep package="driver-xf86-video-v4l"/> | ||
3962 | </dependencies> | ||
3963 | </tarball> | ||
3964 | <tarball id="driver/xf86-video-vesa" version="X11R7.0-1.0.1.3"> | ||
3965 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-vesa-X11R7.0-1.0.1.3.tar.bz2" | ||
3966 | size="218918" md5sum="049ada4df1abb5aa2b6633ba90353e78"/> | ||
3967 | <dependencies> | ||
3968 | <dep package="driver-xf86-video-vesa"/> | ||
3969 | </dependencies> | ||
3970 | </tarball> | ||
3971 | <tarball id="driver/xf86-video-vga" version="X11R7.0-4.0.0.5"> | ||
3972 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-vga-X11R7.0-4.0.0.5.tar.bz2" | ||
3973 | size="216215" md5sum="24437857707acc337cab331cc56f64e2"/> | ||
3974 | <dependencies> | ||
3975 | <dep package="driver-xf86-video-vga"/> | ||
3976 | </dependencies> | ||
3977 | </tarball> | ||
3978 | <tarball id="driver/xf86-video-via" version="X11R7.0-0.1.33.2"> | ||
3979 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-via-X11R7.0-0.1.33.2.tar.bz2" | ||
3980 | size="355172" md5sum="4d3268d226a40f580ab105796bfed1f5"/> | ||
3981 | <dependencies> | ||
3982 | <dep package="driver-xf86-video-via"/> | ||
3983 | </dependencies> | ||
3984 | </tarball> | ||
3985 | <tarball id="driver/xf86-video-vmware" version="X11R7.0-10.11.1.3"> | ||
3986 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-vmware-X11R7.0-10.11.1.3.tar.bz2" | ||
3987 | size="239037" md5sum="4df79349e26add4c23f6be8bec347ad4"/> | ||
3988 | <dependencies> | ||
3989 | <dep package="driver-xf86-video-vmware"/> | ||
3990 | </dependencies> | ||
3991 | </tarball> | ||
3992 | <tarball id="driver/xf86-video-voodoo" version="X11R7.0-1.0.0.5"> | ||
3993 | <source href="http://ftp.x.org/pub/X11R7.0/src/driver/xf86-video-voodoo-X11R7.0-1.0.0.5.tar.bz2" | ||
3994 | size="226952" md5sum="e00cc814ebdb3f3067e075bc93b26199"/> | ||
3995 | <dependencies> | ||
3996 | <dep package="driver-xf86-video-voodoo"/> | ||
3997 | </dependencies> | ||
3998 | </tarball> | ||
3999 | <tarball id="font/encodings" version="X11R7.0-1.0.0"> | ||
4000 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/encodings-X11R7.0-1.0.0.tar.bz2" | ||
4001 | size="594892" md5sum="385cbd4093b610610ca54c06cbb0f497"/> | ||
4002 | <dependencies> | ||
4003 | <dep package="font-encodings"/> | ||
4004 | </dependencies> | ||
4005 | </tarball> | ||
4006 | <tarball id="font/font-adobe-100dpi" version="X11R7.0-1.0.0"> | ||
4007 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-adobe-100dpi-X11R7.0-1.0.0.tar.bz2" | ||
4008 | size="1007038" md5sum="f5de34fa63976de9263f032453348f6c"/> | ||
4009 | <dependencies> | ||
4010 | <dep package="font-font-adobe-100dpi"/> | ||
4011 | </dependencies> | ||
4012 | </tarball> | ||
4013 | <tarball id="font/font-adobe-75dpi" version="X11R7.0-1.0.0"> | ||
4014 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-adobe-75dpi-X11R7.0-1.0.0.tar.bz2" | ||
4015 | size="789768" md5sum="361fc4c9da3c34c5105df4f4688029d0"/> | ||
4016 | <dependencies> | ||
4017 | <dep package="font-font-adobe-75dpi"/> | ||
4018 | </dependencies> | ||
4019 | </tarball> | ||
4020 | <tarball id="font/font-adobe-utopia-100dpi" version="X11R7.0-1.0.1"> | ||
4021 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-adobe-utopia-100dpi-X11R7.0-1.0.1.tar.bz2" | ||
4022 | size="284406" md5sum="b720eed8eba0e4c5bcb9fdf6c2003355"/> | ||
4023 | <dependencies> | ||
4024 | <dep package="font-font-adobe-utopia-100dpi"/> | ||
4025 | </dependencies> | ||
4026 | </tarball> | ||
4027 | <tarball id="font/font-adobe-utopia-75dpi" version="X11R7.0-1.0.1"> | ||
4028 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-adobe-utopia-75dpi-X11R7.0-1.0.1.tar.bz2" | ||
4029 | size="206053" md5sum="a6d5d355b92a7e640698c934b0b79b53"/> | ||
4030 | <dependencies> | ||
4031 | <dep package="font-font-adobe-utopia-75dpi"/> | ||
4032 | </dependencies> | ||
4033 | </tarball> | ||
4034 | <tarball id="font/font-adobe-utopia-type1" version="X11R7.0-1.0.1"> | ||
4035 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-adobe-utopia-type1-X11R7.0-1.0.1.tar.bz2" | ||
4036 | size="208787" md5sum="db1cc2f707cffd08a461f093b55ced5e"/> | ||
4037 | <dependencies> | ||
4038 | <dep package="font-font-adobe-utopia-type1"/> | ||
4039 | </dependencies> | ||
4040 | </tarball> | ||
4041 | <tarball id="font/font-alias" version="X11R7.0-1.0.1"> | ||
4042 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-alias-X11R7.0-1.0.1.tar.bz2" | ||
4043 | size="42497" md5sum="de7035b15ba7edc36f8685ab3c17a9cf"/> | ||
4044 | <dependencies> | ||
4045 | <dep package="font-font-alias"/> | ||
4046 | </dependencies> | ||
4047 | </tarball> | ||
4048 | <tarball id="font/font-arabic-misc" version="X11R7.0-1.0.0"> | ||
4049 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-arabic-misc-X11R7.0-1.0.0.tar.bz2" | ||
4050 | size="52842" md5sum="b95dc750ddc7d511e1f570034d9e1b27"/> | ||
4051 | <dependencies> | ||
4052 | <dep package="font-font-arabic-misc"/> | ||
4053 | </dependencies> | ||
4054 | </tarball> | ||
4055 | <tarball id="font/font-bh-100dpi" version="X11R7.0-1.0.0"> | ||
4056 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bh-100dpi-X11R7.0-1.0.0.tar.bz2" | ||
4057 | size="642898" md5sum="29eeed0ad42653f27b929119581deb3e"/> | ||
4058 | <dependencies> | ||
4059 | <dep package="font-font-bh-100dpi"/> | ||
4060 | </dependencies> | ||
4061 | </tarball> | ||
4062 | <tarball id="font/font-bh-75dpi" version="X11R7.0-1.0.0"> | ||
4063 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bh-75dpi-X11R7.0-1.0.0.tar.bz2" | ||
4064 | size="475715" md5sum="7546c97560eb325400365adbc426308b"/> | ||
4065 | <dependencies> | ||
4066 | <dep package="font-font-bh-75dpi"/> | ||
4067 | </dependencies> | ||
4068 | </tarball> | ||
4069 | <tarball id="font/font-bh-lucidatypewriter-100dpi" version="X11R7.0-1.0.0"> | ||
4070 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bh-lucidatypewriter-100dpi-X11R7.0-1.0.0.tar.bz2" | ||
4071 | size="179267" md5sum="8a56f4cbea74f4dbbf9bdac95686dca8"/> | ||
4072 | <dependencies> | ||
4073 | <dep package="font-font-bh-lucidatypewriter-100dpi"/> | ||
4074 | </dependencies> | ||
4075 | </tarball> | ||
4076 | <tarball id="font/font-bh-lucidatypewriter-75dpi" version="X11R7.0-1.0.0"> | ||
4077 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bh-lucidatypewriter-75dpi-X11R7.0-1.0.0.tar.bz2" | ||
4078 | size="151564" md5sum="e5cccf93f4f1f793cd32adfa81cc1b40"/> | ||
4079 | <dependencies> | ||
4080 | <dep package="font-font-bh-lucidatypewriter-75dpi"/> | ||
4081 | </dependencies> | ||
4082 | </tarball> | ||
4083 | <tarball id="font/font-bh-ttf" version="X11R7.0-1.0.0"> | ||
4084 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bh-ttf-X11R7.0-1.0.0.tar.bz2" | ||
4085 | size="370568" md5sum="53b984889aec3c0c2eb07f8aaa49dba9"/> | ||
4086 | <dependencies> | ||
4087 | <dep package="font-font-bh-ttf"/> | ||
4088 | </dependencies> | ||
4089 | </tarball> | ||
4090 | <tarball id="font/font-bh-type1" version="X11R7.0-1.0.0"> | ||
4091 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bh-type1-X11R7.0-1.0.0.tar.bz2" | ||
4092 | size="571692" md5sum="302111513d1e94303c0ec0139d5ae681"/> | ||
4093 | <dependencies> | ||
4094 | <dep package="font-font-bh-type1"/> | ||
4095 | </dependencies> | ||
4096 | </tarball> | ||
4097 | <tarball id="font/font-bitstream-100dpi" version="X11R7.0-1.0.0"> | ||
4098 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bitstream-100dpi-X11R7.0-1.0.0.tar.bz2" | ||
4099 | size="129846" md5sum="dc595e77074de890974726769f25e123"/> | ||
4100 | <dependencies> | ||
4101 | <dep package="font-font-bitstream-100dpi"/> | ||
4102 | </dependencies> | ||
4103 | </tarball> | ||
4104 | <tarball id="font/font-bitstream-75dpi" version="X11R7.0-1.0.0"> | ||
4105 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bitstream-75dpi-X11R7.0-1.0.0.tar.bz2" | ||
4106 | size="103866" md5sum="408515646743d14e1e2e240da4fffdc2"/> | ||
4107 | <dependencies> | ||
4108 | <dep package="font-font-bitstream-75dpi"/> | ||
4109 | </dependencies> | ||
4110 | </tarball> | ||
4111 | <tarball id="font/font-bitstream-speedo" version="X11R7.0-1.0.0"> | ||
4112 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bitstream-speedo-X11R7.0-1.0.0.tar.bz2" | ||
4113 | size="337301" md5sum="068c78ce48e5e6c4f25e0bba839a6b7a"/> | ||
4114 | <dependencies> | ||
4115 | <dep package="font-font-bitstream-speedo"/> | ||
4116 | </dependencies> | ||
4117 | </tarball> | ||
4118 | <tarball id="font/font-bitstream-type1" version="X11R7.0-1.0.0"> | ||
4119 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-bitstream-type1-X11R7.0-1.0.0.tar.bz2" | ||
4120 | size="352053" md5sum="f4881a7e28eaeb7580d5eaf0f09239da"/> | ||
4121 | <dependencies> | ||
4122 | <dep package="font-font-bitstream-type1"/> | ||
4123 | </dependencies> | ||
4124 | </tarball> | ||
4125 | <tarball id="font/font-cronyx-cyrillic" version="X11R7.0-1.0.0"> | ||
4126 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-cronyx-cyrillic-X11R7.0-1.0.0.tar.bz2" | ||
4127 | size="182134" md5sum="447163fff74b57968fc5139d8b2ad988"/> | ||
4128 | <dependencies> | ||
4129 | <dep package="font-font-cronyx-cyrillic"/> | ||
4130 | </dependencies> | ||
4131 | </tarball> | ||
4132 | <tarball id="font/font-cursor-misc" version="X11R7.0-1.0.0"> | ||
4133 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-cursor-misc-X11R7.0-1.0.0.tar.bz2" | ||
4134 | size="42627" md5sum="82e89de0e1b9c95f32b0fc12f5131d2c"/> | ||
4135 | <dependencies> | ||
4136 | <dep package="font-font-cursor-misc"/> | ||
4137 | </dependencies> | ||
4138 | </tarball> | ||
4139 | <tarball id="font/font-daewoo-misc" version="X11R7.0-1.0.0"> | ||
4140 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-daewoo-misc-X11R7.0-1.0.0.tar.bz2" | ||
4141 | size="668277" md5sum="2fd7e6c8c21990ad906872efd02f3873"/> | ||
4142 | <dependencies> | ||
4143 | <dep package="font-font-daewoo-misc"/> | ||
4144 | </dependencies> | ||
4145 | </tarball> | ||
4146 | <tarball id="font/font-dec-misc" version="X11R7.0-1.0.0"> | ||
4147 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-dec-misc-X11R7.0-1.0.0.tar.bz2" | ||
4148 | size="40713" md5sum="7ff9aba4c65aa226bda7528294c7998c"/> | ||
4149 | <dependencies> | ||
4150 | <dep package="font-font-dec-misc"/> | ||
4151 | </dependencies> | ||
4152 | </tarball> | ||
4153 | <tarball id="font/font-ibm-type1" version="X11R7.0-1.0.0"> | ||
4154 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-ibm-type1-X11R7.0-1.0.0.tar.bz2" | ||
4155 | size="315301" md5sum="fab2c49cb0f9fcee0bc0ac77e510d4e5"/> | ||
4156 | <dependencies> | ||
4157 | <dep package="font-font-ibm-type1"/> | ||
4158 | </dependencies> | ||
4159 | </tarball> | ||
4160 | <tarball id="font/font-isas-misc" version="X11R7.0-1.0.0"> | ||
4161 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-isas-misc-X11R7.0-1.0.0.tar.bz2" | ||
4162 | size="781027" md5sum="c0981507c9276c22956c7bfe932223d9"/> | ||
4163 | <dependencies> | ||
4164 | <dep package="font-font-isas-misc"/> | ||
4165 | </dependencies> | ||
4166 | </tarball> | ||
4167 | <tarball id="font/font-jis-misc" version="X11R7.0-1.0.0"> | ||
4168 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-jis-misc-X11R7.0-1.0.0.tar.bz2" | ||
4169 | size="555563" md5sum="3732ca6c34d03e44c73f0c103512ef26"/> | ||
4170 | <dependencies> | ||
4171 | <dep package="font-font-jis-misc"/> | ||
4172 | </dependencies> | ||
4173 | </tarball> | ||
4174 | <tarball id="font/font-micro-misc" version="X11R7.0-1.0.0"> | ||
4175 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-micro-misc-X11R7.0-1.0.0.tar.bz2" | ||
4176 | size="38802" md5sum="eb0050d73145c5b9fb6b9035305edeb6"/> | ||
4177 | <dependencies> | ||
4178 | <dep package="font-font-micro-misc"/> | ||
4179 | </dependencies> | ||
4180 | </tarball> | ||
4181 | <tarball id="font/font-misc-cyrillic" version="X11R7.0-1.0.0"> | ||
4182 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-misc-cyrillic-X11R7.0-1.0.0.tar.bz2" | ||
4183 | size="65603" md5sum="58d31311e8e51efbe16517adaf1a239d"/> | ||
4184 | <dependencies> | ||
4185 | <dep package="font-font-misc-cyrillic"/> | ||
4186 | </dependencies> | ||
4187 | </tarball> | ||
4188 | <tarball id="font/font-misc-ethiopic" version="X11R7.0-1.0.0"> | ||
4189 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-misc-ethiopic-X11R7.0-1.0.0.tar.bz2" | ||
4190 | size="184289" md5sum="190738980705826a27fbf4685650d3b9"/> | ||
4191 | <dependencies> | ||
4192 | <dep package="font-font-misc-ethiopic"/> | ||
4193 | </dependencies> | ||
4194 | </tarball> | ||
4195 | <tarball id="font/font-misc-meltho" version="X11R7.0-1.0.0"> | ||
4196 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-misc-meltho-X11R7.0-1.0.0.tar.bz2" | ||
4197 | size="1446293" md5sum="8812c57220bcd139b4ba6266eafbd712"/> | ||
4198 | <dependencies> | ||
4199 | <dep package="font-font-misc-meltho"/> | ||
4200 | </dependencies> | ||
4201 | </tarball> | ||
4202 | <tarball id="font/font-misc-misc" version="X11R7.0-1.0.0"> | ||
4203 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-misc-misc-X11R7.0-1.0.0.tar.bz2" | ||
4204 | size="1831073" md5sum="4a5a7987183a9e1ea232c8391ae4c244"/> | ||
4205 | <dependencies> | ||
4206 | <dep package="font-font-misc-misc"/> | ||
4207 | </dependencies> | ||
4208 | </tarball> | ||
4209 | <tarball id="font/font-mutt-misc" version="X11R7.0-1.0.0"> | ||
4210 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-mutt-misc-X11R7.0-1.0.0.tar.bz2" | ||
4211 | size="199237" md5sum="139b368edecf8185d16a33b4a7c09657"/> | ||
4212 | <dependencies> | ||
4213 | <dep package="font-font-mutt-misc"/> | ||
4214 | </dependencies> | ||
4215 | </tarball> | ||
4216 | <tarball id="font/font-schumacher-misc" version="X11R7.0-1.0.0"> | ||
4217 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-schumacher-misc-X11R7.0-1.0.0.tar.bz2" | ||
4218 | size="78036" md5sum="d51808138ef63b84363f7d82ed8bb681"/> | ||
4219 | <dependencies> | ||
4220 | <dep package="font-font-schumacher-misc"/> | ||
4221 | </dependencies> | ||
4222 | </tarball> | ||
4223 | <tarball id="font/font-screen-cyrillic" version="X11R7.0-1.0.0"> | ||
4224 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-screen-cyrillic-X11R7.0-1.0.0.tar.bz2" | ||
4225 | size="42859" md5sum="c08da585feb173e1b27c3fbf8f90ba45"/> | ||
4226 | <dependencies> | ||
4227 | <dep package="font-font-screen-cyrillic"/> | ||
4228 | </dependencies> | ||
4229 | </tarball> | ||
4230 | <tarball id="font/font-sony-misc" version="X11R7.0-1.0.0"> | ||
4231 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-sony-misc-X11R7.0-1.0.0.tar.bz2" | ||
4232 | size="48447" md5sum="014725f97635da9e5e9b303ab796817e"/> | ||
4233 | <dependencies> | ||
4234 | <dep package="font-font-sony-misc"/> | ||
4235 | </dependencies> | ||
4236 | </tarball> | ||
4237 | <tarball id="font/font-sun-misc" version="X11R7.0-1.0.0"> | ||
4238 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-sun-misc-X11R7.0-1.0.0.tar.bz2" | ||
4239 | size="56437" md5sum="0259436c430034f24f3b239113c9630e"/> | ||
4240 | <dependencies> | ||
4241 | <dep package="font-font-sun-misc"/> | ||
4242 | </dependencies> | ||
4243 | </tarball> | ||
4244 | <tarball id="font/font-util" version="X11R7.0-1.0.0"> | ||
4245 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-util-X11R7.0-1.0.0.tar.bz2" | ||
4246 | size="94683" md5sum="73cc445cb20a658037ad3a7ac571f525"/> | ||
4247 | <dependencies> | ||
4248 | <dep package="font-font-util"/> | ||
4249 | </dependencies> | ||
4250 | </tarball> | ||
4251 | <tarball id="font/font-winitzki-cyrillic" version="X11R7.0-1.0.0"> | ||
4252 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-winitzki-cyrillic-X11R7.0-1.0.0.tar.bz2" | ||
4253 | size="41002" md5sum="6dc447609609e4e2454ad7da29873501"/> | ||
4254 | <dependencies> | ||
4255 | <dep package="font-font-winitzki-cyrillic"/> | ||
4256 | </dependencies> | ||
4257 | </tarball> | ||
4258 | <tarball id="font/font-xfree86-type1" version="X11R7.0-1.0.0"> | ||
4259 | <source href="http://ftp.x.org/pub/X11R7.0/src/font/font-xfree86-type1-X11R7.0-1.0.0.tar.bz2" | ||
4260 | size="66041" md5sum="27a6bbf5c8bbe998ff7e8537929ccbc8"/> | ||
4261 | <dependencies> | ||
4262 | <dep package="font-font-xfree86-type1"/> | ||
4263 | </dependencies> | ||
4264 | </tarball> | ||
4265 | <tarball id="lib/libAppleWM" version="X11R7.0-1.0.0"> | ||
4266 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libAppleWM-X11R7.0-1.0.0.tar.bz2" | ||
4267 | size="208693" md5sum="8af30932ebc278835375fca34a2790f5"/> | ||
4268 | <dependencies> | ||
4269 | <dep package="lib-libAppleWM"/> | ||
4270 | </dependencies> | ||
4271 | </tarball> | ||
4272 | <tarball id="lib/libdmx" version="X11R7.0-1.0.1"> | ||
4273 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libdmx-X11R7.0-1.0.1.tar.bz2" | ||
4274 | size="213045" md5sum="ae6b3c48f1349fc5dfa7d7c4b9cf4718"/> | ||
4275 | <dependencies> | ||
4276 | <dep package="lib-libdmx"/> | ||
4277 | </dependencies> | ||
4278 | </tarball> | ||
4279 | <tarball id="lib/libfontenc" version="X11R7.0-1.0.1"> | ||
4280 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libfontenc-X11R7.0-1.0.1.tar.bz2" | ||
4281 | size="211589" md5sum="d7971cbb2d1000737bba86a4bd70b900"/> | ||
4282 | <dependencies> | ||
4283 | <dep package="lib-libfontenc"/> | ||
4284 | </dependencies> | ||
4285 | </tarball> | ||
4286 | <tarball id="lib/libFS" version="X11R7.0-1.0.0"> | ||
4287 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libFS-X11R7.0-1.0.0.tar.bz2" | ||
4288 | size="229218" md5sum="12d2d89e7eb6ab0eb5823c3296f4e7a5"/> | ||
4289 | <dependencies> | ||
4290 | <dep package="lib-libFS"/> | ||
4291 | </dependencies> | ||
4292 | </tarball> | ||
4293 | <tarball id="lib/libICE" version="X11R7.0-1.0.0"> | ||
4294 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libICE-X11R7.0-1.0.0.tar.bz2" | ||
4295 | size="239843" md5sum="c778084b135311726da8dc74a16b3555"/> | ||
4296 | <dependencies> | ||
4297 | <dep package="lib-libICE"/> | ||
4298 | </dependencies> | ||
4299 | </tarball> | ||
4300 | <tarball id="lib/liblbxutil" version="X11R7.0-1.0.0"> | ||
4301 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/liblbxutil-X11R7.0-1.0.0.tar.bz2" | ||
4302 | size="222016" md5sum="1bcffde85723f78243d1ba60e1ebaef6"/> | ||
4303 | <dependencies> | ||
4304 | <dep package="lib-liblbxutil"/> | ||
4305 | </dependencies> | ||
4306 | </tarball> | ||
4307 | <tarball id="lib/liboldX" version="X11R7.0-1.0.1"> | ||
4308 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/liboldX-X11R7.0-1.0.1.tar.bz2" | ||
4309 | size="210365" md5sum="a443a2dc15aa96a3d18340a1617d1bae"/> | ||
4310 | <dependencies> | ||
4311 | <dep package="lib-liboldX"/> | ||
4312 | </dependencies> | ||
4313 | </tarball> | ||
4314 | <tarball id="lib/libSM" version="X11R7.0-1.0.0"> | ||
4315 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libSM-X11R7.0-1.0.0.tar.bz2" | ||
4316 | size="220369" md5sum="8a4eec299e8f14e26200718af7b2dcfc"/> | ||
4317 | <dependencies> | ||
4318 | <dep package="lib-libSM"/> | ||
4319 | </dependencies> | ||
4320 | </tarball> | ||
4321 | <tarball id="lib/libWindowsWM" version="X11R7.0-1.0.0"> | ||
4322 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libWindowsWM-X11R7.0-1.0.0.tar.bz2" | ||
4323 | size="211133" md5sum="d94f0389cd655b50e2987d5b988b82a5"/> | ||
4324 | <dependencies> | ||
4325 | <dep package="lib-libWindowsWM"/> | ||
4326 | </dependencies> | ||
4327 | </tarball> | ||
4328 | <tarball id="lib/libX11" version="X11R7.0-1.0.0"> | ||
4329 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libX11-X11R7.0-1.0.0.tar.bz2" | ||
4330 | size="1344417" md5sum="dcf59f148c978816ebbe3fbc5c9ef0e1"/> | ||
4331 | <dependencies> | ||
4332 | <dep package="lib-libX11"/> | ||
4333 | </dependencies> | ||
4334 | </tarball> | ||
4335 | <tarball id="lib/libXau" version="X11R7.0-1.0.0"> | ||
4336 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXau-X11R7.0-1.0.0.tar.bz2" | ||
4337 | size="213408" md5sum="51ceac78ae0eaf40ffb77b3cccc028cc"/> | ||
4338 | <dependencies> | ||
4339 | <dep package="lib-libXau"/> | ||
4340 | </dependencies> | ||
4341 | </tarball> | ||
4342 | <tarball id="lib/libXaw" version="X11R7.0-1.0.1"> | ||
4343 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXaw-X11R7.0-1.0.1.tar.bz2" | ||
4344 | size="502016" md5sum="ded3c7ed6d6ca2c5e257f60079a1a824"/> | ||
4345 | <dependencies> | ||
4346 | <dep package="lib-libXaw"/> | ||
4347 | </dependencies> | ||
4348 | </tarball> | ||
4349 | <tarball id="lib/libXcomposite" version="X11R7.0-0.2.2.2"> | ||
4350 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXcomposite-X11R7.0-0.2.2.2.tar.bz2" | ||
4351 | size="200827" md5sum="5773fe74d0f44b7264bd37c874efc7b1"/> | ||
4352 | <dependencies> | ||
4353 | <dep package="lib-libXcomposite"/> | ||
4354 | </dependencies> | ||
4355 | </tarball> | ||
4356 | <tarball id="lib/libXcursor" version="X11R7.0-1.1.5.2"> | ||
4357 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXcursor-X11R7.0-1.1.5.2.tar.bz2" | ||
4358 | size="225765" md5sum="048e15b725d8e081ac520e021af9a62c"/> | ||
4359 | <dependencies> | ||
4360 | <dep package="lib-libXcursor"/> | ||
4361 | </dependencies> | ||
4362 | </tarball> | ||
4363 | <tarball id="lib/libXdamage" version="X11R7.0-1.0.2.2"> | ||
4364 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXdamage-X11R7.0-1.0.2.2.tar.bz2" | ||
4365 | size="205151" md5sum="e98c6cc1075db5f6e7e6c8aef303c562"/> | ||
4366 | <dependencies> | ||
4367 | <dep package="lib-libXdamage"/> | ||
4368 | </dependencies> | ||
4369 | </tarball> | ||
4370 | <tarball id="lib/libXdmcp" version="X11R7.0-1.0.0"> | ||
4371 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXdmcp-X11R7.0-1.0.0.tar.bz2" | ||
4372 | size="211397" md5sum="509390dc46af61e3a6d07656fc5ad0ec"/> | ||
4373 | <dependencies> | ||
4374 | <dep package="lib-libXdmcp"/> | ||
4375 | </dependencies> | ||
4376 | </tarball> | ||
4377 | <tarball id="lib/libXevie" version="X11R7.0-1.0.0"> | ||
4378 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXevie-X11R7.0-1.0.0.tar.bz2" | ||
4379 | size="207641" md5sum="70b1787315d8d5f961edac05fef95fd6"/> | ||
4380 | <dependencies> | ||
4381 | <dep package="lib-libXevie"/> | ||
4382 | </dependencies> | ||
4383 | </tarball> | ||
4384 | <tarball id="lib/libXext" version="X11R7.0-1.0.0"> | ||
4385 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXext-X11R7.0-1.0.0.tar.bz2" | ||
4386 | size="250668" md5sum="9e47f574ac747446ac58ff9f6f402ceb"/> | ||
4387 | <dependencies> | ||
4388 | <dep package="lib-libXext"/> | ||
4389 | </dependencies> | ||
4390 | </tarball> | ||
4391 | <tarball id="lib/libXfixes" version="X11R7.0-3.0.1.2"> | ||
4392 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXfixes-X11R7.0-3.0.1.2.tar.bz2" | ||
4393 | size="209960" md5sum="5a027e5959dae32b69dce42118938544"/> | ||
4394 | <dependencies> | ||
4395 | <dep package="lib-libXfixes"/> | ||
4396 | </dependencies> | ||
4397 | </tarball> | ||
4398 | <tarball id="lib/libXfontcache" version="X11R7.0-1.0.1"> | ||
4399 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXfontcache-X11R7.0-1.0.1.tar.bz2" | ||
4400 | size="204829" md5sum="1e3c7718ffaf4f617d3f67ada5a7601e"/> | ||
4401 | <dependencies> | ||
4402 | <dep package="lib-libXfontcache"/> | ||
4403 | </dependencies> | ||
4404 | </tarball> | ||
4405 | <tarball id="lib/libXfont" version="X11R7.0-1.0.0"> | ||
4406 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXfont-X11R7.0-1.0.0.tar.bz2" | ||
4407 | size="586748" md5sum="955c41694772c9fd214e3e206f5d2178"/> | ||
4408 | <dependencies> | ||
4409 | <dep package="lib-libXfont"/> | ||
4410 | </dependencies> | ||
4411 | </tarball> | ||
4412 | <tarball id="lib/libXft" version="X11R7.0-2.1.8.2"> | ||
4413 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXft-X11R7.0-2.1.8.2.tar.bz2" | ||
4414 | size="248233" md5sum="c42292b35325a9eeb24eb0f8d3a6ec52"/> | ||
4415 | <dependencies> | ||
4416 | <dep package="lib-libXft"/> | ||
4417 | </dependencies> | ||
4418 | </tarball> | ||
4419 | <tarball id="lib/libXinerama" version="X11R7.0-1.0.1"> | ||
4420 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXinerama-X11R7.0-1.0.1.tar.bz2" | ||
4421 | size="201413" md5sum="1a1be870bb106193a4acc73c8c584dbc"/> | ||
4422 | <dependencies> | ||
4423 | <dep package="lib-libXinerama"/> | ||
4424 | </dependencies> | ||
4425 | </tarball> | ||
4426 | <tarball id="lib/libXi" version="X11R7.0-1.0.0"> | ||
4427 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXi-X11R7.0-1.0.0.tar.bz2" | ||
4428 | size="239015" md5sum="99503799b4d52ec0cac8e203341bb7b3"/> | ||
4429 | <dependencies> | ||
4430 | <dep package="lib-libXi"/> | ||
4431 | </dependencies> | ||
4432 | </tarball> | ||
4433 | <tarball id="lib/libxkbfile" version="X11R7.0-1.0.1"> | ||
4434 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libxkbfile-X11R7.0-1.0.1.tar.bz2" | ||
4435 | size="255310" md5sum="0b1bb70a1df474c26dd83feab52e733d"/> | ||
4436 | <dependencies> | ||
4437 | <dep package="lib-libxkbfile"/> | ||
4438 | </dependencies> | ||
4439 | </tarball> | ||
4440 | <tarball id="lib/libxkbui" version="X11R7.0-1.0.1"> | ||
4441 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libxkbui-X11R7.0-1.0.1.tar.bz2" | ||
4442 | size="203717" md5sum="1992547d377b510517fc7681207eead5"/> | ||
4443 | <dependencies> | ||
4444 | <dep package="lib-libxkbui"/> | ||
4445 | </dependencies> | ||
4446 | </tarball> | ||
4447 | <tarball id="lib/libXmu" version="X11R7.0-1.0.0"> | ||
4448 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXmu-X11R7.0-1.0.0.tar.bz2" | ||
4449 | size="279996" md5sum="df62f44da82c6780f07dc475a68dd9fa"/> | ||
4450 | <dependencies> | ||
4451 | <dep package="lib-libXmu"/> | ||
4452 | </dependencies> | ||
4453 | </tarball> | ||
4454 | <tarball id="lib/libXpm" version="X11R7.0-3.5.4.2"> | ||
4455 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXpm-X11R7.0-3.5.4.2.tar.bz2" | ||
4456 | size="329956" md5sum="f3b3b6e687f567bbff7688d60edc81ba"/> | ||
4457 | <dependencies> | ||
4458 | <dep package="lib-libXpm"/> | ||
4459 | </dependencies> | ||
4460 | </tarball> | ||
4461 | <tarball id="lib/libXprintAppUtil" version="X11R7.0-1.0.1"> | ||
4462 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXprintAppUtil-X11R7.0-1.0.1.tar.bz2" | ||
4463 | size="202104" md5sum="6d3f5d8d1f6c2c380bfc739128f41909"/> | ||
4464 | <dependencies> | ||
4465 | <dep package="lib-libXprintAppUtil"/> | ||
4466 | </dependencies> | ||
4467 | </tarball> | ||
4468 | <tarball id="lib/libXprintUtil" version="X11R7.0-1.0.1"> | ||
4469 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXprintUtil-X11R7.0-1.0.1.tar.bz2" | ||
4470 | size="215208" md5sum="47f1863042a53a48b40c2fb0aa55a8f7"/> | ||
4471 | <dependencies> | ||
4472 | <dep package="lib-libXprintUtil"/> | ||
4473 | </dependencies> | ||
4474 | </tarball> | ||
4475 | <tarball id="lib/libXp" version="X11R7.0-1.0.0"> | ||
4476 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXp-X11R7.0-1.0.0.tar.bz2" | ||
4477 | size="237834" md5sum="63c3048e06da4f6a033c5ce25217b0c3"/> | ||
4478 | <dependencies> | ||
4479 | <dep package="lib-libXp"/> | ||
4480 | </dependencies> | ||
4481 | </tarball> | ||
4482 | <tarball id="lib/libXrandr" version="X11R7.0-1.1.0.2"> | ||
4483 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXrandr-X11R7.0-1.1.0.2.tar.bz2" | ||
4484 | size="214724" md5sum="e10aed44c2e1e5d9e6848a62ff2c90c7"/> | ||
4485 | <dependencies> | ||
4486 | <dep package="lib-libXrandr"/> | ||
4487 | </dependencies> | ||
4488 | </tarball> | ||
4489 | <tarball id="lib/libXrender" version="X11R7.0-0.9.0.2"> | ||
4490 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXrender-X11R7.0-0.9.0.2.tar.bz2" | ||
4491 | size="221203" md5sum="3f0fa590dd84df07568631c91fbe68ab"/> | ||
4492 | <dependencies> | ||
4493 | <dep package="lib-libXrender"/> | ||
4494 | </dependencies> | ||
4495 | </tarball> | ||
4496 | <tarball id="lib/libXres" version="X11R7.0-1.0.0"> | ||
4497 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXres-X11R7.0-1.0.0.tar.bz2" | ||
4498 | size="209322" md5sum="cc5c4f130c9305e5bd973fbb7c56a254"/> | ||
4499 | <dependencies> | ||
4500 | <dep package="lib-libXres"/> | ||
4501 | </dependencies> | ||
4502 | </tarball> | ||
4503 | <tarball id="lib/libXScrnSaver" version="X11R7.0-1.0.1"> | ||
4504 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXScrnSaver-X11R7.0-1.0.1.tar.bz2" | ||
4505 | size="209914" md5sum="b9deb6ac3194aeab15d8f6220481af6d"/> | ||
4506 | <dependencies> | ||
4507 | <dep package="lib-libXScrnSaver"/> | ||
4508 | </dependencies> | ||
4509 | </tarball> | ||
4510 | <tarball id="lib/libXTrap" version="X11R7.0-1.0.0"> | ||
4511 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXTrap-X11R7.0-1.0.0.tar.bz2" | ||
4512 | size="214200" md5sum="8f2f1cc3b35f005e9030e162d89e2bdd"/> | ||
4513 | <dependencies> | ||
4514 | <dep package="lib-libXTrap"/> | ||
4515 | </dependencies> | ||
4516 | </tarball> | ||
4517 | <tarball id="lib/libXtst" version="X11R7.0-1.0.1"> | ||
4518 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXtst-X11R7.0-1.0.1.tar.bz2" | ||
4519 | size="207156" md5sum="3a3a3b88b4bc2a82f0b6de8ff526cc8c"/> | ||
4520 | <dependencies> | ||
4521 | <dep package="lib-libXtst"/> | ||
4522 | </dependencies> | ||
4523 | </tarball> | ||
4524 | <tarball id="lib/libXt" version="X11R7.0-1.0.0"> | ||
4525 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXt-X11R7.0-1.0.0.tar.bz2" | ||
4526 | size="482948" md5sum="d9c1c161f086a4d6c7510a924ee35c94"/> | ||
4527 | <dependencies> | ||
4528 | <dep package="lib-libXt"/> | ||
4529 | </dependencies> | ||
4530 | </tarball> | ||
4531 | <tarball id="lib/libXvMC" version="X11R7.0-1.0.1"> | ||
4532 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXvMC-X11R7.0-1.0.1.tar.bz2" | ||
4533 | size="212613" md5sum="c3eb4f526f08862489355a99e3eda1bd"/> | ||
4534 | <dependencies> | ||
4535 | <dep package="lib-libXvMC"/> | ||
4536 | </dependencies> | ||
4537 | </tarball> | ||
4538 | <tarball id="lib/libXv" version="X11R7.0-1.0.1"> | ||
4539 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXv-X11R7.0-1.0.1.tar.bz2" | ||
4540 | size="217511" md5sum="9f0075619fc8d8df460be8aaa9d9ab5d"/> | ||
4541 | <dependencies> | ||
4542 | <dep package="lib-libXv"/> | ||
4543 | </dependencies> | ||
4544 | </tarball> | ||
4545 | <tarball id="lib/libXxf86dga" version="X11R7.0-1.0.0"> | ||
4546 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXxf86dga-X11R7.0-1.0.0.tar.bz2" | ||
4547 | size="214036" md5sum="d2154a588953d8db4ae6252ebc7db439"/> | ||
4548 | <dependencies> | ||
4549 | <dep package="lib-libXxf86dga"/> | ||
4550 | </dependencies> | ||
4551 | </tarball> | ||
4552 | <tarball id="lib/libXxf86misc" version="X11R7.0-1.0.0"> | ||
4553 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXxf86misc-X11R7.0-1.0.0.tar.bz2" | ||
4554 | size="205438" md5sum="338568c9ca48b801f314c89c97327397"/> | ||
4555 | <dependencies> | ||
4556 | <dep package="lib-libXxf86misc"/> | ||
4557 | </dependencies> | ||
4558 | </tarball> | ||
4559 | <tarball id="lib/libXxf86vm" version="X11R7.0-1.0.0"> | ||
4560 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/libXxf86vm-X11R7.0-1.0.0.tar.bz2" | ||
4561 | size="210002" md5sum="ed59db622581b33ec2a62e12b2f9c274"/> | ||
4562 | <dependencies> | ||
4563 | <dep package="lib-libXxf86vm"/> | ||
4564 | </dependencies> | ||
4565 | </tarball> | ||
4566 | <tarball id="lib/xtrans" version="X11R7.0-1.0.0"> | ||
4567 | <source href="http://ftp.x.org/pub/X11R7.0/src/lib/xtrans-X11R7.0-1.0.0.tar.bz2" | ||
4568 | size="88972" md5sum="153642136a003871a9093c8103d6ac5a"/> | ||
4569 | <dependencies> | ||
4570 | <dep package="lib-xtrans"/> | ||
4571 | </dependencies> | ||
4572 | </tarball> | ||
4573 | <tarball id="proto/applewmproto" version="X11R7.0-1.0.3"> | ||
4574 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/applewmproto-X11R7.0-1.0.3.tar.bz2" | ||
4575 | size="38932" md5sum="2acf46c814a27c40acd3e448ed17fee3"/> | ||
4576 | <dependencies> | ||
4577 | <dep package="proto-applewmproto"/> | ||
4578 | </dependencies> | ||
4579 | </tarball> | ||
4580 | <tarball id="proto/bigreqsproto" version="X11R7.0-1.0.2"> | ||
4581 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/bigreqsproto-X11R7.0-1.0.2.tar.bz2" | ||
4582 | size="36662" md5sum="ec15d17e3f04ddb5870ef7239b4ab367"/> | ||
4583 | <dependencies> | ||
4584 | <dep package="proto-bigreqsproto"/> | ||
4585 | </dependencies> | ||
4586 | </tarball> | ||
4587 | <tarball id="proto/compositeproto" version="X11R7.0-0.2.2"> | ||
4588 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/compositeproto-X11R7.0-0.2.2.tar.bz2" | ||
4589 | size="37336" md5sum="4de13ee64fdfd409134dfee9b184e6a9"/> | ||
4590 | <dependencies> | ||
4591 | <dep package="proto-compositeproto"/> | ||
4592 | </dependencies> | ||
4593 | </tarball> | ||
4594 | <tarball id="proto/damageproto" version="X11R7.0-1.0.3"> | ||
4595 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/damageproto-X11R7.0-1.0.3.tar.bz2" | ||
4596 | size="37637" md5sum="b906344d68e09a5639deb0097bd74224"/> | ||
4597 | <dependencies> | ||
4598 | <dep package="proto-damageproto"/> | ||
4599 | </dependencies> | ||
4600 | </tarball> | ||
4601 | <tarball id="proto/dmxproto" version="X11R7.0-2.2.2"> | ||
4602 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/dmxproto-X11R7.0-2.2.2.tar.bz2" | ||
4603 | size="39332" md5sum="21c79302beb868a078490549f558cdcf"/> | ||
4604 | <dependencies> | ||
4605 | <dep package="proto-dmxproto"/> | ||
4606 | </dependencies> | ||
4607 | </tarball> | ||
4608 | <tarball id="proto/evieext" version="X11R7.0-1.0.2"> | ||
4609 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/evieext-X11R7.0-1.0.2.tar.bz2" | ||
4610 | size="37487" md5sum="411c0d4f9eaa7d220a8d13edc790e3de"/> | ||
4611 | <dependencies> | ||
4612 | <dep package="proto-evieext"/> | ||
4613 | </dependencies> | ||
4614 | </tarball> | ||
4615 | <tarball id="proto/fixesproto" version="X11R7.0-3.0.2"> | ||
4616 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/fixesproto-X11R7.0-3.0.2.tar.bz2" | ||
4617 | size="38756" md5sum="ff8899d2325ed8a5787cde372ca8f80f"/> | ||
4618 | <dependencies> | ||
4619 | <dep package="proto-fixesproto"/> | ||
4620 | </dependencies> | ||
4621 | </tarball> | ||
4622 | <tarball id="proto/fontcacheproto" version="X11R7.0-0.1.2"> | ||
4623 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/fontcacheproto-X11R7.0-0.1.2.tar.bz2" | ||
4624 | size="38175" md5sum="116997d63cf6f65b75593ff5ae7afecb"/> | ||
4625 | <dependencies> | ||
4626 | <dep package="proto-fontcacheproto"/> | ||
4627 | </dependencies> | ||
4628 | </tarball> | ||
4629 | <tarball id="proto/fontsproto" version="X11R7.0-2.0.2"> | ||
4630 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/fontsproto-X11R7.0-2.0.2.tar.bz2" | ||
4631 | size="45141" md5sum="e2ca22df3a20177f060f04f15b8ce19b"/> | ||
4632 | <dependencies> | ||
4633 | <dep package="proto-fontsproto"/> | ||
4634 | </dependencies> | ||
4635 | </tarball> | ||
4636 | <tarball id="proto/glproto" version="X11R7.0-1.4.3"> | ||
4637 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/glproto-X11R7.0-1.4.3.tar.bz2" | ||
4638 | size="53730" md5sum="0ecb98487d7457f0592298fe9b8688f0"/> | ||
4639 | <dependencies> | ||
4640 | <dep package="proto-glproto"/> | ||
4641 | </dependencies> | ||
4642 | </tarball> | ||
4643 | <tarball id="proto/inputproto" version="X11R7.0-1.3.2"> | ||
4644 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/inputproto-X11R7.0-1.3.2.tar.bz2" | ||
4645 | size="46316" md5sum="0da271f396bede5b8d09a61f6d1c4484"/> | ||
4646 | <dependencies> | ||
4647 | <dep package="proto-inputproto"/> | ||
4648 | </dependencies> | ||
4649 | </tarball> | ||
4650 | <tarball id="proto/kbproto" version="X11R7.0-1.0.2"> | ||
4651 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/kbproto-X11R7.0-1.0.2.tar.bz2" | ||
4652 | size="57988" md5sum="403f56d717b3fefe465ddd03d9c7bc81"/> | ||
4653 | <dependencies> | ||
4654 | <dep package="proto-kbproto"/> | ||
4655 | </dependencies> | ||
4656 | </tarball> | ||
4657 | <tarball id="proto/printproto" version="X11R7.0-1.0.3"> | ||
4658 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/printproto-X11R7.0-1.0.3.tar.bz2" | ||
4659 | size="43464" md5sum="15c629a109b074d669886b1c6b7b319e"/> | ||
4660 | <dependencies> | ||
4661 | <dep package="proto-printproto"/> | ||
4662 | </dependencies> | ||
4663 | </tarball> | ||
4664 | <tarball id="proto/randrproto" version="X11R7.0-1.1.2"> | ||
4665 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/randrproto-X11R7.0-1.1.2.tar.bz2" | ||
4666 | size="38331" md5sum="bcf36d524f6f50aa16ee8e183350f7b8"/> | ||
4667 | <dependencies> | ||
4668 | <dep package="proto-randrproto"/> | ||
4669 | </dependencies> | ||
4670 | </tarball> | ||
4671 | <tarball id="proto/recordproto" version="X11R7.0-1.13.2"> | ||
4672 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/recordproto-X11R7.0-1.13.2.tar.bz2" | ||
4673 | size="39255" md5sum="6f41a40e8cf4452f1c1725d46b08eb2e"/> | ||
4674 | <dependencies> | ||
4675 | <dep package="proto-recordproto"/> | ||
4676 | </dependencies> | ||
4677 | </tarball> | ||
4678 | <tarball id="proto/renderproto" version="X11R7.0-0.9.2"> | ||
4679 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/renderproto-X11R7.0-0.9.2.tar.bz2" | ||
4680 | size="40003" md5sum="a7f3be0960c92ecb6a06a1022fe957df"/> | ||
4681 | <dependencies> | ||
4682 | <dep package="proto-renderproto"/> | ||
4683 | </dependencies> | ||
4684 | </tarball> | ||
4685 | <tarball id="proto/resourceproto" version="X11R7.0-1.0.2"> | ||
4686 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/resourceproto-X11R7.0-1.0.2.tar.bz2" | ||
4687 | size="36828" md5sum="e13d7b0aa5c591224f073bbbd9d1b038"/> | ||
4688 | <dependencies> | ||
4689 | <dep package="proto-resourceproto"/> | ||
4690 | </dependencies> | ||
4691 | </tarball> | ||
4692 | <tarball id="proto/scrnsaverproto" version="X11R7.0-1.0.2"> | ||
4693 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/scrnsaverproto-X11R7.0-1.0.2.tar.bz2" | ||
4694 | size="38353" md5sum="3185971597710d8843d986da3271b83f"/> | ||
4695 | <dependencies> | ||
4696 | <dep package="proto-scrnsaverproto"/> | ||
4697 | </dependencies> | ||
4698 | </tarball> | ||
4699 | <tarball id="proto/trapproto" version="X11R7.0-3.4.3"> | ||
4700 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/trapproto-X11R7.0-3.4.3.tar.bz2" | ||
4701 | size="48801" md5sum="84ab290758d2c177df5924e10bff4835"/> | ||
4702 | <dependencies> | ||
4703 | <dep package="proto-trapproto"/> | ||
4704 | </dependencies> | ||
4705 | </tarball> | ||
4706 | <tarball id="proto/videoproto" version="X11R7.0-2.2.2"> | ||
4707 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/videoproto-X11R7.0-2.2.2.tar.bz2" | ||
4708 | size="42721" md5sum="de9e16a8a464531a54a36211d2f983bd"/> | ||
4709 | <dependencies> | ||
4710 | <dep package="proto-videoproto"/> | ||
4711 | </dependencies> | ||
4712 | </tarball> | ||
4713 | <tarball id="proto/windowswmproto" version="X11R7.0-1.0.3"> | ||
4714 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/windowswmproto-X11R7.0-1.0.3.tar.bz2" | ||
4715 | size="38828" md5sum="ea2f71075f68371fec22eb98a6af8074"/> | ||
4716 | <dependencies> | ||
4717 | <dep package="proto-windowswmproto"/> | ||
4718 | </dependencies> | ||
4719 | </tarball> | ||
4720 | <tarball id="proto/xcmiscproto" version="X11R7.0-1.1.2"> | ||
4721 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xcmiscproto-X11R7.0-1.1.2.tar.bz2" | ||
4722 | size="36766" md5sum="77f3ba0cbef119e0230d235507a1d916"/> | ||
4723 | <dependencies> | ||
4724 | <dep package="proto-xcmiscproto"/> | ||
4725 | </dependencies> | ||
4726 | </tarball> | ||
4727 | <tarball id="proto/xextproto" version="X11R7.0-7.0.2"> | ||
4728 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xextproto-X11R7.0-7.0.2.tar.bz2" | ||
4729 | size="68316" md5sum="c0e88fc3483d90a7fea6a399298d90ea"/> | ||
4730 | <dependencies> | ||
4731 | <dep package="proto-xextproto"/> | ||
4732 | </dependencies> | ||
4733 | </tarball> | ||
4734 | <tarball id="proto/xf86bigfontproto" version="X11R7.0-1.1.2"> | ||
4735 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xf86bigfontproto-X11R7.0-1.1.2.tar.bz2" | ||
4736 | size="37360" md5sum="5509d420a2bc898ca7d817cd8bf1b2a7"/> | ||
4737 | <dependencies> | ||
4738 | <dep package="proto-xf86bigfontproto"/> | ||
4739 | </dependencies> | ||
4740 | </tarball> | ||
4741 | <tarball id="proto/xf86dgaproto" version="X11R7.0-2.0.2"> | ||
4742 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xf86dgaproto-X11R7.0-2.0.2.tar.bz2" | ||
4743 | size="40016" md5sum="48ddcc6b764dba7e711f8e25596abdb0"/> | ||
4744 | <dependencies> | ||
4745 | <dep package="proto-xf86dgaproto"/> | ||
4746 | </dependencies> | ||
4747 | </tarball> | ||
4748 | <tarball id="proto/xf86driproto" version="X11R7.0-2.0.3"> | ||
4749 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xf86driproto-X11R7.0-2.0.3.tar.bz2" | ||
4750 | size="42797" md5sum="839a70dfb8d5b02bcfc24996ab99a618"/> | ||
4751 | <dependencies> | ||
4752 | <dep package="proto-xf86driproto"/> | ||
4753 | </dependencies> | ||
4754 | </tarball> | ||
4755 | <tarball id="proto/xf86miscproto" version="X11R7.0-0.9.2"> | ||
4756 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xf86miscproto-X11R7.0-0.9.2.tar.bz2" | ||
4757 | size="38412" md5sum="1cc082d8a6da5177ede354bedbacd4ed"/> | ||
4758 | <dependencies> | ||
4759 | <dep package="proto-xf86miscproto"/> | ||
4760 | </dependencies> | ||
4761 | </tarball> | ||
4762 | <tarball id="proto/xf86rushproto" version="X11R7.0-1.1.2"> | ||
4763 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xf86rushproto-X11R7.0-1.1.2.tar.bz2" | ||
4764 | size="37679" md5sum="1a6b258d72c3c3baccfd695d278e847c"/> | ||
4765 | <dependencies> | ||
4766 | <dep package="proto-xf86rushproto"/> | ||
4767 | </dependencies> | ||
4768 | </tarball> | ||
4769 | <tarball id="proto/xf86vidmodeproto" version="X11R7.0-2.2.2"> | ||
4770 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xf86vidmodeproto-X11R7.0-2.2.2.tar.bz2" | ||
4771 | size="39489" md5sum="475f19a2ffbfab9a0886791c5f89c978"/> | ||
4772 | <dependencies> | ||
4773 | <dep package="proto-xf86vidmodeproto"/> | ||
4774 | </dependencies> | ||
4775 | </tarball> | ||
4776 | <tarball id="proto/xineramaproto" version="X11R7.0-1.1.2"> | ||
4777 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xineramaproto-X11R7.0-1.1.2.tar.bz2" | ||
4778 | size="38362" md5sum="80516ad305063f4e6c6c3ccf42ea2142"/> | ||
4779 | <dependencies> | ||
4780 | <dep package="proto-xineramaproto"/> | ||
4781 | </dependencies> | ||
4782 | </tarball> | ||
4783 | <tarball id="proto/xproto" version="X11R7.0-7.0.4"> | ||
4784 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xproto-X11R7.0-7.0.4.tar.bz2" | ||
4785 | size="127645" md5sum="643259d00e02db8e9a6f4c047281b5d9"/> | ||
4786 | <dependencies> | ||
4787 | <dep package="proto-xproto"/> | ||
4788 | </dependencies> | ||
4789 | </tarball> | ||
4790 | <tarball id="proto/xproxymanagementprotocol" version="X11R7.0-1.0.2"> | ||
4791 | <source href="http://ftp.x.org/pub/X11R7.0/src/proto/xproxymanagementprotocol-X11R7.0-1.0.2.tar.bz2" | ||
4792 | size="36984" md5sum="977ee3fd1525418aaa8bfc55ffbf6fc9"/> | ||
4793 | <dependencies> | ||
4794 | <dep package="proto-xproxymanagementprotocol"/> | ||
4795 | </dependencies> | ||
4796 | </tarball> | ||
4797 | <tarball id="util/gccmakedep" version="X11R7.0-1.0.1"> | ||
4798 | <source href="http://ftp.x.org/pub/X11R7.0/src/util/gccmakedep-X11R7.0-1.0.1.tar.bz2" | ||
4799 | size="66964" md5sum="328eea864d27b2d3a88ceb2fa66eca6d"/> | ||
4800 | <dependencies> | ||
4801 | <dep package="util-gccmakedep"/> | ||
4802 | </dependencies> | ||
4803 | </tarball> | ||
4804 | <tarball id="util/imake" version="X11R7.0-1.0.1"> | ||
4805 | <source href="http://ftp.x.org/pub/X11R7.0/src/util/imake-X11R7.0-1.0.1.tar.bz2" | ||
4806 | size="108622" md5sum="487b4b86b2bd0c09e6d220a85d94efae"/> | ||
4807 | <dependencies> | ||
4808 | <dep package="util-imake"/> | ||
4809 | </dependencies> | ||
4810 | </tarball> | ||
4811 | <tarball id="util/lndir" version="X11R7.0-1.0.1"> | ||
4812 | <source href="http://ftp.x.org/pub/X11R7.0/src/util/lndir-X11R7.0-1.0.1.tar.bz2" | ||
4813 | size="75972" md5sum="aa3616b9795e2445c85b2c79b0f94f7b"/> | ||
4814 | <dependencies> | ||
4815 | <dep package="util-lndir"/> | ||
4816 | </dependencies> | ||
4817 | </tarball> | ||
4818 | <tarball id="util/makedepend" version="X11R7.0-1.0.0"> | ||
4819 | <source href="http://ftp.x.org/pub/X11R7.0/src/util/makedepend-X11R7.0-1.0.0.tar.bz2" | ||
4820 | size="103203" md5sum="7494c7ff65d8c31ef8db13661487b54c"/> | ||
4821 | <dependencies> | ||
4822 | <dep package="util-makedepend"/> | ||
4823 | </dependencies> | ||
4824 | </tarball> | ||
4825 | <tarball id="util/util-macros" version="X11R7.0-1.0.1"> | ||
4826 | <source href="http://ftp.x.org/pub/X11R7.0/src/util/util-macros-X11R7.0-1.0.1.tar.bz2" | ||
4827 | size="38475" md5sum="bc6be634532d4936eb753de54e1663d3"/> | ||
4828 | <dependencies> | ||
4829 | <dep package="util-util-macros"/> | ||
4830 | </dependencies> | ||
4831 | </tarball> | ||
4832 | <tarball id="util/xorg-cf-files" version="X11R7.0-1.0.1"> | ||
4833 | <source href="http://ftp.x.org/pub/X11R7.0/src/util/xorg-cf-files-X11R7.0-1.0.1.tar.bz2" | ||
4834 | size="252075" md5sum="f2dd453c37386293fb207431b4a073dd"/> | ||
4835 | <dependencies> | ||
4836 | <dep package="util-xorg-cf-files"/> | ||
4837 | </dependencies> | ||
4838 | </tarball> | ||
4839 | <tarball id="xserver/xorg-server" version="X11R7.0-1.0.1"> | ||
4840 | <source href="http://ftp.x.org/pub/X11R7.0/src/xserver/xorg-server-X11R7.0-1.0.1.tar.bz2" | ||
4841 | size="5849840" md5sum="0e7527480fb845a3c2e333bd0f47ff50"/> | ||
4842 | <dependencies> | ||
4843 | <dep package="xserver-xorg-server"/> | ||
4844 | </dependencies> | ||
4845 | </tarball> | ||
4846 | |||
4847 | </moduleset> | ||
diff --git a/scripts/jhbuild/modulesets/xorg.modules b/scripts/jhbuild/modulesets/xorg.modules new file mode 100644 index 0000000000..1429cf09e3 --- /dev/null +++ b/scripts/jhbuild/modulesets/xorg.modules | |||
@@ -0,0 +1,2201 @@ | |||
1 | <?xml version="1.0" standalone="no"?> <!--*- mode: nxml -*--> | ||
2 | <!-- TODO: what to do about AppleWM and WindowsWM? --> | ||
3 | <!-- TODO: what to do about doc/sgml-tools? --> | ||
4 | <!-- TODO: util/cf has problems, commented out --> | ||
5 | |||
6 | <!DOCTYPE moduleset SYSTEM "moduleset.dtd"> | ||
7 | <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> | ||
8 | <moduleset> | ||
9 | <repository type="git" name="git.freedesktop.org" | ||
10 | href="git://anongit.freedesktop.org/git/"/> | ||
11 | |||
12 | <cvsroot name="fontconfig.freedesktop.org" | ||
13 | root=":pserver:anoncvs@cvs.freedesktop.org:/cvs/fontconfig" | ||
14 | password="" /> | ||
15 | |||
16 | <autotools id="macros"> | ||
17 | <branch repo="git.freedesktop.org" module="xorg/util/macros" checkoutdir="xorg/util/macros" /> | ||
18 | </autotools> | ||
19 | <autotools id="makedepend"> | ||
20 | <branch repo="git.freedesktop.org" module="xorg/util/makedepend" checkoutdir="xorg/util/makedepend" /> | ||
21 | </autotools> | ||
22 | <autotools id="cf"> | ||
23 | <branch repo="git.freedesktop.org" module="xorg/util/cf" checkoutdir="xorg/util/cf" /> | ||
24 | </autotools> | ||
25 | <autotools id="imake"> | ||
26 | <branch repo="git.freedesktop.org" module="xorg/util/imake" checkoutdir="xorg/util/imake" /> | ||
27 | <dependencies> | ||
28 | <!-- <dep package="util/cf"/> --> | ||
29 | </dependencies> | ||
30 | </autotools> | ||
31 | |||
32 | <autotools id="bigreqsproto"> | ||
33 | <branch repo="git.freedesktop.org" module="xorg/proto/bigreqsproto" checkoutdir="xorg/proto/bigreqsproto" /> | ||
34 | </autotools> | ||
35 | <autotools id="compositeproto"> | ||
36 | <branch repo="git.freedesktop.org" module="xorg/proto/compositeproto" checkoutdir="xorg/proto/compositeproto" /> | ||
37 | </autotools> | ||
38 | <autotools id="damageproto"> | ||
39 | <branch repo="git.freedesktop.org" module="xorg/proto/damageproto" checkoutdir="xorg/proto/damageproto" /> | ||
40 | </autotools> | ||
41 | <autotools id="dmxproto"> | ||
42 | <branch repo="git.freedesktop.org" module="xorg/proto/dmxproto" checkoutdir="xorg/proto/dmxproto" /> | ||
43 | </autotools> | ||
44 | <autotools id="evieproto"> | ||
45 | <branch repo="git.freedesktop.org" module="xorg/proto/evieproto" checkoutdir="xorg/proto/evieproto" /> | ||
46 | </autotools> | ||
47 | <autotools id="fixesproto"> | ||
48 | <branch repo="git.freedesktop.org" module="xorg/proto/fixesproto" checkoutdir="xorg/proto/fixesproto" /> | ||
49 | </autotools> | ||
50 | <autotools id="fontcacheproto"> | ||
51 | <branch repo="git.freedesktop.org" module="xorg/proto/fontcacheproto" checkoutdir="xorg/proto/fontcacheproto" /> | ||
52 | </autotools> | ||
53 | <autotools id="fontsproto"> | ||
54 | <branch repo="git.freedesktop.org" module="xorg/proto/fontsproto" checkoutdir="xorg/proto/fontsproto" /> | ||
55 | </autotools> | ||
56 | <autotools id="glproto"> | ||
57 | <branch repo="git.freedesktop.org" module="xorg/proto/glproto" checkoutdir="xorg/proto/glproto" /> | ||
58 | </autotools> | ||
59 | <autotools id="inputproto"> | ||
60 | <branch repo="git.freedesktop.org" module="xorg/proto/inputproto" checkoutdir="xorg/proto/inputproto" /> | ||
61 | </autotools> | ||
62 | <autotools id="kbproto"> | ||
63 | <branch repo="git.freedesktop.org" module="xorg/proto/kbproto" checkoutdir="xorg/proto/kbproto" /> | ||
64 | </autotools> | ||
65 | <autotools id="pmproto"> | ||
66 | <branch repo="git.freedesktop.org" module="xorg/proto/pmproto" checkoutdir="xorg/proto/pmproto" /> | ||
67 | </autotools> | ||
68 | <autotools id="printproto"> | ||
69 | <branch repo="git.freedesktop.org" module="xorg/proto/printproto" checkoutdir="xorg/proto/printproto" /> | ||
70 | </autotools> | ||
71 | <autotools id="randrproto"> | ||
72 | <branch repo="git.freedesktop.org" module="xorg/proto/randrproto" checkoutdir="xorg/proto/randrproto" /> | ||
73 | </autotools> | ||
74 | <autotools id="recordproto"> | ||
75 | <branch repo="git.freedesktop.org" module="xorg/proto/recordproto" checkoutdir="xorg/proto/recordproto" /> | ||
76 | </autotools> | ||
77 | <autotools id="renderproto"> | ||
78 | <branch repo="git.freedesktop.org" module="xorg/proto/renderproto" checkoutdir="xorg/proto/renderproto" /> | ||
79 | </autotools> | ||
80 | <autotools id="resourceproto"> | ||
81 | <branch repo="git.freedesktop.org" module="xorg/proto/resourceproto" checkoutdir="xorg/proto/resourceproto" /> | ||
82 | </autotools> | ||
83 | <autotools id="scrnsaverproto"> | ||
84 | <branch repo="git.freedesktop.org" module="xorg/proto/scrnsaverproto" checkoutdir="xorg/proto/scrnsaverproto" /> | ||
85 | </autotools> | ||
86 | <autotools id="trapproto"> | ||
87 | <branch repo="git.freedesktop.org" module="xorg/proto/trapproto" checkoutdir="xorg/proto/trapproto" /> | ||
88 | </autotools> | ||
89 | <autotools id="videoproto"> | ||
90 | <branch repo="git.freedesktop.org" module="xorg/proto/videoproto" checkoutdir="xorg/proto/videoproto" /> | ||
91 | </autotools> | ||
92 | <autotools id="windowswmproto"> | ||
93 | <branch repo="git.freedesktop.org" module="xorg/proto/windowswmproto" checkoutdir="xorg/proto/windowswmproto" /> | ||
94 | </autotools> | ||
95 | <autotools id="xcmiscproto"> | ||
96 | <branch repo="git.freedesktop.org" module="xorg/proto/xcmiscproto" checkoutdir="xorg/proto/xcmiscproto" /> | ||
97 | </autotools> | ||
98 | <autotools id="xextproto"> | ||
99 | <branch repo="git.freedesktop.org" module="xorg/proto/xextproto" checkoutdir="xorg/proto/xextproto" /> | ||
100 | </autotools> | ||
101 | <autotools id="xf86bigfontproto"> | ||
102 | <branch repo="git.freedesktop.org" module="xorg/proto/xf86bigfontproto" checkoutdir="xorg/proto/xf86bigfontproto" /> | ||
103 | </autotools> | ||
104 | <autotools id="xf86dgaproto"> | ||
105 | <branch repo="git.freedesktop.org" module="xorg/proto/xf86dgaproto" checkoutdir="xorg/proto/xf86dgaproto" /> | ||
106 | </autotools> | ||
107 | <autotools id="xf86driproto"> | ||
108 | <branch repo="git.freedesktop.org" module="xorg/proto/xf86driproto" checkoutdir="xorg/proto/xf86driproto" /> | ||
109 | </autotools> | ||
110 | <autotools id="xf86miscproto"> | ||
111 | <branch repo="git.freedesktop.org" module="xorg/proto/xf86miscproto" checkoutdir="xorg/proto/xf86miscproto" /> | ||
112 | </autotools> | ||
113 | <autotools id="xf86rushproto"> | ||
114 | <branch repo="git.freedesktop.org" module="xorg/proto/xf86rushproto" checkoutdir="xorg/proto/xf86rushproto" /> | ||
115 | </autotools> | ||
116 | <autotools id="xf86vidmodeproto"> | ||
117 | <branch repo="git.freedesktop.org" module="xorg/proto/xf86vidmodeproto" checkoutdir="xorg/proto/xf86vidmodeproto" /> | ||
118 | </autotools> | ||
119 | <autotools id="xineramaproto"> | ||
120 | <branch repo="git.freedesktop.org" module="xorg/proto/xineramaproto" checkoutdir="xorg/proto/xineramaproto" /> | ||
121 | </autotools> | ||
122 | <autotools id="x11proto"> | ||
123 | <branch repo="git.freedesktop.org" module="xorg/proto/x11proto" checkoutdir="xorg/proto/x11proto" /> | ||
124 | </autotools> | ||
125 | |||
126 | <metamodule id="xorg-protos"> | ||
127 | <dependencies> | ||
128 | <dep package="bigreqsproto"/> | ||
129 | <dep package="compositeproto"/> | ||
130 | <dep package="damageproto"/> | ||
131 | <dep package="dmxproto"/> | ||
132 | <dep package="evieproto"/> | ||
133 | <dep package="fixesproto"/> | ||
134 | <dep package="fontcacheproto"/> | ||
135 | <dep package="fontsproto"/> | ||
136 | <dep package="glproto"/> | ||
137 | <dep package="inputproto"/> | ||
138 | <dep package="kbproto"/> | ||
139 | <dep package="xineramaproto"/> | ||
140 | <dep package="printproto"/> | ||
141 | <dep package="randrproto"/> | ||
142 | <dep package="recordproto"/> | ||
143 | <dep package="renderproto"/> | ||
144 | <dep package="resourceproto"/> | ||
145 | <dep package="scrnsaverproto"/> | ||
146 | <dep package="trapproto"/> | ||
147 | <dep package="videoproto"/> | ||
148 | <dep package="xcmiscproto"/> | ||
149 | <dep package="xextproto"/> | ||
150 | <dep package="xf86bigfontproto"/> | ||
151 | <dep package="xf86dgaproto"/> | ||
152 | <dep package="xf86driproto"/> | ||
153 | <dep package="xf86miscproto"/> | ||
154 | <dep package="xf86rushproto"/> | ||
155 | <dep package="xf86vidmodeproto"/> | ||
156 | <dep package="x11proto"/> | ||
157 | <dep package="pmproto"/> | ||
158 | </dependencies> | ||
159 | </metamodule> | ||
160 | |||
161 | <!-- libs --> | ||
162 | |||
163 | <autotools id="libFS"> | ||
164 | <branch repo="git.freedesktop.org" module="xorg/lib/libFS" checkoutdir="xorg/lib/libFS" /> | ||
165 | <dependencies> | ||
166 | <dep package="macros"/> | ||
167 | <dep package="x11proto"/> | ||
168 | <dep package="fontsproto"/> | ||
169 | <dep package="libxtrans"/> | ||
170 | </dependencies> | ||
171 | </autotools> | ||
172 | |||
173 | <autotools id="libICE"> | ||
174 | <branch repo="git.freedesktop.org" module="xorg/lib/libICE" checkoutdir="xorg/lib/libICE" /> | ||
175 | <dependencies> | ||
176 | <dep package="macros"/> | ||
177 | <dep package="x11proto"/> | ||
178 | <dep package="libxtrans"/> | ||
179 | </dependencies> | ||
180 | </autotools> | ||
181 | |||
182 | <autotools id="libSM"> | ||
183 | <branch repo="git.freedesktop.org" module="xorg/lib/libSM" checkoutdir="xorg/lib/libSM" /> | ||
184 | <dependencies> | ||
185 | <dep package="macros"/> | ||
186 | <dep package="x11proto"/> | ||
187 | <dep package="libICE"/> | ||
188 | <dep package="libxtrans"/> | ||
189 | </dependencies> | ||
190 | </autotools> | ||
191 | |||
192 | <autotools id="libX11"> | ||
193 | <branch repo="git.freedesktop.org" module="xorg/lib/libX11" checkoutdir="xorg/lib/libX11" /> | ||
194 | <dependencies> | ||
195 | <dep package="macros"/> | ||
196 | <dep package="x11proto"/> | ||
197 | <dep package="bigreqsproto"/> | ||
198 | <dep package="xextproto"/> | ||
199 | <dep package="libxtrans"/> | ||
200 | <dep package="libXau"/> | ||
201 | <dep package="xcmiscproto"/> | ||
202 | <dep package="libXdmcp"/> | ||
203 | <dep package="kbproto"/> | ||
204 | <dep package="inputproto"/> | ||
205 | </dependencies> | ||
206 | </autotools> | ||
207 | |||
208 | <autotools id="libXScrnSaver"> | ||
209 | <branch repo="git.freedesktop.org" module="xorg/lib/libXScrnSaver" checkoutdir="xorg/lib/libXScrnSaver" /> | ||
210 | <dependencies> | ||
211 | <dep package="macros"/> | ||
212 | <dep package="libX11"/> | ||
213 | <dep package="libXext"/> | ||
214 | <dep package="xextproto"/> | ||
215 | <dep package="scrnsaverproto"/> | ||
216 | </dependencies> | ||
217 | </autotools> | ||
218 | |||
219 | <autotools id="libXTrap"> | ||
220 | <branch repo="git.freedesktop.org" module="xorg/lib/libXTrap" checkoutdir="xorg/lib/libXTrap" /> | ||
221 | <dependencies> | ||
222 | <dep package="macros"/> | ||
223 | <dep package="libX11"/> | ||
224 | <dep package="libXt"/> | ||
225 | <dep package="trapproto"/> | ||
226 | <dep package="libXext"/> | ||
227 | <dep package="xextproto"/> | ||
228 | </dependencies> | ||
229 | </autotools> | ||
230 | |||
231 | <autotools id="libXau"> | ||
232 | <branch repo="git.freedesktop.org" module="xorg/lib/libXau" checkoutdir="xorg/lib/libXau" /> | ||
233 | <dependencies> | ||
234 | <dep package="macros"/> | ||
235 | <dep package="x11proto"/> | ||
236 | </dependencies> | ||
237 | </autotools> | ||
238 | |||
239 | <autotools id="libXaw"> | ||
240 | <branch repo="git.freedesktop.org" module="xorg/lib/libXaw" checkoutdir="xorg/lib/libXaw" /> | ||
241 | <dependencies> | ||
242 | <dep package="macros"/> | ||
243 | <dep package="x11proto"/> | ||
244 | <dep package="libX11"/> | ||
245 | <dep package="libXt"/> | ||
246 | <dep package="libXmu"/> | ||
247 | <dep package="libXpm"/> | ||
248 | </dependencies> | ||
249 | </autotools> | ||
250 | |||
251 | <autotools id="libXcomposite"> | ||
252 | <branch repo="git.freedesktop.org" module="xorg/lib/libXcomposite" checkoutdir="xorg/lib/libXcomposite" /> | ||
253 | <dependencies> | ||
254 | <dep package="macros"/> | ||
255 | <dep package="compositeproto"/> | ||
256 | <dep package="libX11"/> | ||
257 | <dep package="libXfixes"/> | ||
258 | <dep package="libXext"/> | ||
259 | </dependencies> | ||
260 | </autotools> | ||
261 | |||
262 | <autotools id="libXcursor"> | ||
263 | <branch repo="git.freedesktop.org" module="xorg/lib/libXcursor" checkoutdir="xorg/lib/libXcursor" /> | ||
264 | <dependencies> | ||
265 | <dep package="macros"/> | ||
266 | <dep package="libXrender"/> | ||
267 | <dep package="libX11"/> | ||
268 | <dep package="libXfixes"/> | ||
269 | </dependencies> | ||
270 | </autotools> | ||
271 | |||
272 | <autotools id="libXdamage"> | ||
273 | <branch repo="git.freedesktop.org" module="xorg/lib/libXdamage" checkoutdir="xorg/lib/libXdamage" /> | ||
274 | <dependencies> | ||
275 | <dep package="macros"/> | ||
276 | <dep package="libX11"/> | ||
277 | <dep package="damageproto"/> | ||
278 | <dep package="libXfixes"/> | ||
279 | </dependencies> | ||
280 | </autotools> | ||
281 | |||
282 | <autotools id="libXdmcp"> | ||
283 | <branch repo="git.freedesktop.org" module="xorg/lib/libXdmcp" checkoutdir="xorg/lib/libXdmcp" /> | ||
284 | <dependencies> | ||
285 | <dep package="macros"/> | ||
286 | <dep package="x11proto"/> | ||
287 | </dependencies> | ||
288 | </autotools> | ||
289 | |||
290 | <autotools id="libXevie"> | ||
291 | <branch repo="git.freedesktop.org" module="xorg/lib/libXevie" checkoutdir="xorg/lib/libXevie" /> | ||
292 | <dependencies> | ||
293 | <dep package="macros"/> | ||
294 | <dep package="x11proto"/> | ||
295 | <dep package="libX11"/> | ||
296 | <dep package="xextproto"/> | ||
297 | <dep package="libXext"/> | ||
298 | <dep package="evieproto"/> | ||
299 | </dependencies> | ||
300 | </autotools> | ||
301 | |||
302 | <autotools id="libXext"> | ||
303 | <branch repo="git.freedesktop.org" module="xorg/lib/libXext" checkoutdir="xorg/lib/libXext" /> | ||
304 | <dependencies> | ||
305 | <dep package="macros"/> | ||
306 | <dep package="x11proto"/> | ||
307 | <dep package="libX11"/> | ||
308 | <dep package="xextproto"/> | ||
309 | </dependencies> | ||
310 | </autotools> | ||
311 | |||
312 | <autotools id="libXfixes"> | ||
313 | <branch repo="git.freedesktop.org" module="xorg/lib/libXfixes" checkoutdir="xorg/lib/libXfixes" /> | ||
314 | <dependencies> | ||
315 | <dep package="macros"/> | ||
316 | <dep package="libX11"/> | ||
317 | <dep package="fixesproto"/> | ||
318 | </dependencies> | ||
319 | </autotools> | ||
320 | |||
321 | <autotools id="libXfont"> | ||
322 | <branch repo="git.freedesktop.org" module="xorg/lib/libXfont" checkoutdir="xorg/lib/libXfont" /> | ||
323 | <dependencies> | ||
324 | <dep package="macros"/> | ||
325 | <dep package="x11proto"/> | ||
326 | <dep package="libxtrans"/> | ||
327 | <dep package="fontsproto"/> | ||
328 | <dep package="libfontenc"/> | ||
329 | <dep package="fontcacheproto"/> | ||
330 | </dependencies> | ||
331 | </autotools> | ||
332 | |||
333 | <autotools id="libXfontcache"> | ||
334 | <branch repo="git.freedesktop.org" module="xorg/lib/libXfontcache" checkoutdir="xorg/lib/libXfontcache" /> | ||
335 | <dependencies> | ||
336 | <dep package="macros"/> | ||
337 | <dep package="libX11"/> | ||
338 | <dep package="libXext"/> | ||
339 | <dep package="xextproto"/> | ||
340 | <dep package="fontcacheproto"/> | ||
341 | </dependencies> | ||
342 | </autotools> | ||
343 | |||
344 | <cvsmodule id="fontconfig" cvsroot="fontconfig.freedesktop.org" /> | ||
345 | |||
346 | <autotools id="libXft"> | ||
347 | <branch repo="git.freedesktop.org" module="xorg/lib/libXft" checkoutdir="xorg/lib/libXft" /> | ||
348 | <dependencies> | ||
349 | <dep package="macros"/> | ||
350 | <dep package="libXrender"/> | ||
351 | <dep package="fontconfig"/> | ||
352 | </dependencies> | ||
353 | </autotools> | ||
354 | |||
355 | <autotools id="libXi"> | ||
356 | <branch repo="git.freedesktop.org" module="xorg/lib/libXi" checkoutdir="xorg/lib/libXi" /> | ||
357 | <dependencies> | ||
358 | <dep package="macros"/> | ||
359 | <dep package="x11proto"/> | ||
360 | <dep package="libX11"/> | ||
361 | <dep package="xextproto"/> | ||
362 | <dep package="libXext"/> | ||
363 | <dep package="inputproto"/> | ||
364 | </dependencies> | ||
365 | </autotools> | ||
366 | |||
367 | <autotools id="libXinerama"> | ||
368 | <branch repo="git.freedesktop.org" module="xorg/lib/libXinerama" checkoutdir="xorg/lib/libXinerama" /> | ||
369 | <dependencies> | ||
370 | <dep package="macros"/> | ||
371 | <dep package="libX11"/> | ||
372 | <dep package="libXext"/> | ||
373 | <dep package="xextproto"/> | ||
374 | <dep package="xineramaproto"/> | ||
375 | </dependencies> | ||
376 | </autotools> | ||
377 | |||
378 | <autotools id="libXmu"> | ||
379 | <branch repo="git.freedesktop.org" module="xorg/lib/libXmu" checkoutdir="xorg/lib/libXmu" /> | ||
380 | <dependencies> | ||
381 | <dep package="macros"/> | ||
382 | <dep package="libX11"/> | ||
383 | <dep package="libXt"/> | ||
384 | <dep package="libXext"/> | ||
385 | </dependencies> | ||
386 | </autotools> | ||
387 | |||
388 | <autotools id="libXp"> | ||
389 | <branch repo="git.freedesktop.org" module="xorg/lib/libXp" checkoutdir="xorg/lib/libXp" /> | ||
390 | <dependencies> | ||
391 | <dep package="macros"/> | ||
392 | <dep package="libX11"/> | ||
393 | <dep package="libXext"/> | ||
394 | <dep package="libXau"/> | ||
395 | <dep package="printproto"/> | ||
396 | </dependencies> | ||
397 | </autotools> | ||
398 | |||
399 | <autotools id="libXpm"> | ||
400 | <branch repo="git.freedesktop.org" module="xorg/lib/libXpm" checkoutdir="xorg/lib/libXpm" /> | ||
401 | <dependencies> | ||
402 | <dep package="macros"/> | ||
403 | <dep package="libX11"/> | ||
404 | <dep package="x11proto"/> | ||
405 | <dep package="libXt"/> | ||
406 | <dep package="libXext"/> | ||
407 | </dependencies> | ||
408 | </autotools> | ||
409 | |||
410 | <autotools id="libXprintAppUtil"> | ||
411 | <branch repo="git.freedesktop.org" module="xorg/lib/libXprintAppUtil" checkoutdir="xorg/lib/libXprintAppUtil" /> | ||
412 | <dependencies> | ||
413 | <dep package="macros"/> | ||
414 | <dep package="libX11"/> | ||
415 | <dep package="libXp"/> | ||
416 | <dep package="libXprintUtil"/> | ||
417 | </dependencies> | ||
418 | </autotools> | ||
419 | |||
420 | <autotools id="libXprintUtil"> | ||
421 | <branch repo="git.freedesktop.org" module="xorg/lib/libXprintUtil" checkoutdir="xorg/lib/libXprintUtil" /> | ||
422 | <dependencies> | ||
423 | <dep package="macros"/> | ||
424 | <dep package="libX11"/> | ||
425 | <dep package="libXp"/> | ||
426 | </dependencies> | ||
427 | </autotools> | ||
428 | |||
429 | <autotools id="libXrandr"> | ||
430 | <branch repo="git.freedesktop.org" module="xorg/lib/libXrandr" checkoutdir="xorg/lib/libXrandr" /> | ||
431 | <dependencies> | ||
432 | <dep package="macros"/> | ||
433 | <dep package="libX11"/> | ||
434 | <dep package="randrproto"/> | ||
435 | </dependencies> | ||
436 | </autotools> | ||
437 | |||
438 | <autotools id="libXrender"> | ||
439 | <branch repo="git.freedesktop.org" module="xorg/lib/libXrender" checkoutdir="xorg/lib/libXrender" /> | ||
440 | <dependencies> | ||
441 | <dep package="macros"/> | ||
442 | <dep package="renderproto"/> | ||
443 | <dep package="libX11"/> | ||
444 | </dependencies> | ||
445 | </autotools> | ||
446 | |||
447 | <autotools id="libXRes"> | ||
448 | <branch repo="git.freedesktop.org" module="xorg/lib/libXRes" checkoutdir="xorg/lib/libXRes" /> | ||
449 | <dependencies> | ||
450 | <dep package="macros"/> | ||
451 | <dep package="libX11"/> | ||
452 | <dep package="libXext"/> | ||
453 | <dep package="resourceproto"/> | ||
454 | </dependencies> | ||
455 | </autotools> | ||
456 | |||
457 | <autotools id="libXt"> | ||
458 | <branch repo="git.freedesktop.org" module="xorg/lib/libXt" checkoutdir="xorg/lib/libXt" /> | ||
459 | <dependencies> | ||
460 | <dep package="macros"/> | ||
461 | <dep package="libSM"/> | ||
462 | <dep package="libX11"/> | ||
463 | <dep package="x11proto"/> | ||
464 | </dependencies> | ||
465 | </autotools> | ||
466 | |||
467 | <autotools id="libXtst"> | ||
468 | <branch repo="git.freedesktop.org" module="xorg/lib/libXtst" checkoutdir="xorg/lib/libXtst" /> | ||
469 | <dependencies> | ||
470 | <dep package="macros"/> | ||
471 | <dep package="libX11"/> | ||
472 | <dep package="libXext"/> | ||
473 | <dep package="recordproto"/> | ||
474 | <dep package="xextproto"/> | ||
475 | </dependencies> | ||
476 | </autotools> | ||
477 | |||
478 | <autotools id="libXv"> | ||
479 | <branch repo="git.freedesktop.org" module="xorg/lib/libXv" checkoutdir="xorg/lib/libXv" /> | ||
480 | <dependencies> | ||
481 | <dep package="macros"/> | ||
482 | <dep package="libX11"/> | ||
483 | <dep package="libXext"/> | ||
484 | <dep package="xextproto"/> | ||
485 | <dep package="videoproto"/> | ||
486 | </dependencies> | ||
487 | </autotools> | ||
488 | |||
489 | <autotools id="libXvMC"> | ||
490 | <branch repo="git.freedesktop.org" module="xorg/lib/libXvMC" checkoutdir="xorg/lib/libXvMC" /> | ||
491 | <dependencies> | ||
492 | <dep package="macros"/> | ||
493 | <dep package="libX11"/> | ||
494 | <dep package="libXext"/> | ||
495 | <dep package="libXv"/> | ||
496 | <dep package="xextproto"/> | ||
497 | <dep package="videoproto"/> | ||
498 | </dependencies> | ||
499 | </autotools> | ||
500 | |||
501 | <autotools id="libXxf86dga"> | ||
502 | <branch repo="git.freedesktop.org" module="xorg/lib/libXxf86dga" checkoutdir="xorg/lib/libXxf86dga" /> | ||
503 | <dependencies> | ||
504 | <dep package="macros"/> | ||
505 | <dep package="x11proto"/> | ||
506 | <dep package="libX11"/> | ||
507 | <dep package="libXext"/> | ||
508 | <dep package="xextproto"/> | ||
509 | <dep package="xf86dgaproto"/> | ||
510 | </dependencies> | ||
511 | </autotools> | ||
512 | |||
513 | <autotools id="libXxf86misc"> | ||
514 | <branch repo="git.freedesktop.org" module="xorg/lib/libXxf86misc" checkoutdir="xorg/lib/libXxf86misc" /> | ||
515 | <dependencies> | ||
516 | <dep package="macros"/> | ||
517 | <dep package="x11proto"/> | ||
518 | <dep package="libX11"/> | ||
519 | <dep package="libXext"/> | ||
520 | <dep package="xextproto"/> | ||
521 | <dep package="xf86miscproto"/> | ||
522 | </dependencies> | ||
523 | </autotools> | ||
524 | |||
525 | <autotools id="libXxf86vm"> | ||
526 | <branch repo="git.freedesktop.org" module="xorg/lib/libXxf86vm" checkoutdir="xorg/lib/libXxf86vm" /> | ||
527 | <dependencies> | ||
528 | <dep package="macros"/> | ||
529 | <dep package="x11proto"/> | ||
530 | <dep package="libX11"/> | ||
531 | <dep package="libXext"/> | ||
532 | <dep package="xextproto"/> | ||
533 | <dep package="xf86vidmodeproto"/> | ||
534 | </dependencies> | ||
535 | </autotools> | ||
536 | |||
537 | <autotools id="libdmx"> | ||
538 | <branch repo="git.freedesktop.org" module="xorg/lib/libdmx" checkoutdir="xorg/lib/libdmx" /> | ||
539 | <dependencies> | ||
540 | <dep package="macros"/> | ||
541 | <dep package="libX11"/> | ||
542 | <dep package="libXext"/> | ||
543 | <dep package="xextproto"/> | ||
544 | <dep package="dmxproto"/> | ||
545 | </dependencies> | ||
546 | </autotools> | ||
547 | |||
548 | <autotools id="libfontenc"> | ||
549 | <branch repo="git.freedesktop.org" module="xorg/lib/libfontenc" checkoutdir="xorg/lib/libfontenc" /> | ||
550 | <dependencies> | ||
551 | <dep package="macros"/> | ||
552 | <dep package="x11proto"/> | ||
553 | </dependencies> | ||
554 | </autotools> | ||
555 | |||
556 | <autotools id="liblbxutil"> | ||
557 | <branch repo="git.freedesktop.org" module="xorg/lib/liblbxutil" checkoutdir="xorg/lib/liblbxutil" /> | ||
558 | <dependencies> | ||
559 | <dep package="macros"/> | ||
560 | <dep package="xextproto"/> | ||
561 | </dependencies> | ||
562 | </autotools> | ||
563 | |||
564 | <autotools id="liboldX"> | ||
565 | <branch repo="git.freedesktop.org" module="xorg/lib/liboldX" checkoutdir="xorg/lib/liboldX" /> | ||
566 | <dependencies> | ||
567 | <dep package="macros"/> | ||
568 | <dep package="libX11"/> | ||
569 | </dependencies> | ||
570 | </autotools> | ||
571 | |||
572 | <autotools id="libxkbfile"> | ||
573 | <branch repo="git.freedesktop.org" module="xorg/lib/libxkbfile" checkoutdir="xorg/lib/libxkbfile" /> | ||
574 | <dependencies> | ||
575 | <dep package="macros"/> | ||
576 | <dep package="libX11"/> | ||
577 | <dep package="kbproto"/> | ||
578 | </dependencies> | ||
579 | </autotools> | ||
580 | |||
581 | <autotools id="libxkbui"> | ||
582 | <branch repo="git.freedesktop.org" module="xorg/lib/libxkbui" checkoutdir="xorg/lib/libxkbui" /> | ||
583 | <dependencies> | ||
584 | <dep package="macros"/> | ||
585 | <dep package="libX11"/> | ||
586 | <dep package="libXt"/> | ||
587 | <dep package="libxkbfile"/> | ||
588 | </dependencies> | ||
589 | </autotools> | ||
590 | |||
591 | <autotools id="libxtrans"> | ||
592 | <branch repo="git.freedesktop.org" module="xorg/lib/libxtrans" checkoutdir="xorg/lib/libxtrans"/> | ||
593 | <dependencies> | ||
594 | <dep package="macros"/> | ||
595 | </dependencies> | ||
596 | </autotools> | ||
597 | |||
598 | <autotools id="libdrm"> | ||
599 | <branch repo="git.freedesktop.org" module="mesa/drm"/> | ||
600 | <dependencies> | ||
601 | <dep package="macros"/> | ||
602 | </dependencies> | ||
603 | </autotools> | ||
604 | |||
605 | <metamodule id="xorg-libs"> | ||
606 | <dependencies> | ||
607 | <dep package="libFS"/> | ||
608 | <dep package="libICE"/> | ||
609 | <dep package="libSM"/> | ||
610 | <dep package="libX11"/> | ||
611 | <dep package="libXScrnSaver"/> | ||
612 | <dep package="libXTrap"/> | ||
613 | <dep package="libXau"/> | ||
614 | <dep package="libXaw"/> | ||
615 | <dep package="libXcomposite"/> | ||
616 | <dep package="libXcursor"/> | ||
617 | <dep package="libXdamage"/> | ||
618 | <dep package="libXdmcp"/> | ||
619 | <dep package="libXevie"/> | ||
620 | <dep package="libXext"/> | ||
621 | <dep package="libXfixes"/> | ||
622 | <dep package="libXfont"/> | ||
623 | <dep package="libXfontcache"/> | ||
624 | <dep package="libXft"/> | ||
625 | <dep package="libXi"/> | ||
626 | <dep package="libXinerama"/> | ||
627 | <dep package="libXmu"/> | ||
628 | <dep package="libXp"/> | ||
629 | <dep package="libXpm"/> | ||
630 | <dep package="libXprintAppUtil"/> | ||
631 | <dep package="libXprintUtil"/> | ||
632 | <dep package="libXrandr"/> | ||
633 | <dep package="libXrender"/> | ||
634 | <dep package="libXRes"/> | ||
635 | <dep package="libXt"/> | ||
636 | <dep package="libXtst"/> | ||
637 | <dep package="libXv"/> | ||
638 | <dep package="libXvMC"/> | ||
639 | <dep package="libXxf86dga"/> | ||
640 | <dep package="libXxf86misc"/> | ||
641 | <dep package="libXxf86vm"/> | ||
642 | <dep package="libdmx"/> | ||
643 | <dep package="libfontenc"/> | ||
644 | <dep package="liblbxutil"/> | ||
645 | <dep package="liboldX"/> | ||
646 | <dep package="libxkbfile"/> | ||
647 | <dep package="libxkbui"/> | ||
648 | <dep package="libxtrans"/> | ||
649 | <dep package="libdrm"/> | ||
650 | </dependencies> | ||
651 | </metamodule> | ||
652 | |||
653 | <autotools id="xtrans"> | ||
654 | <branch repo="git.freedesktop.org" module="xorg/lib/libxtrans" checkoutdir="xorg/lib/libxtrans" /> | ||
655 | </autotools> | ||
656 | |||
657 | <autotools id="100dpi"> | ||
658 | <branch repo="git.freedesktop.org" module="xorg/font/100dpi" checkoutdir="xorg/font/100dpi" /> | ||
659 | <dependencies> | ||
660 | <dep package="util"/> | ||
661 | </dependencies> | ||
662 | </autotools> | ||
663 | |||
664 | <autotools id="adobe-100dpi"> | ||
665 | <branch repo="git.freedesktop.org" module="xorg/font/adobe-100dpi" checkoutdir="xorg/font/adobe-100dpi" /> | ||
666 | <dependencies> | ||
667 | <dep package="util"/> | ||
668 | </dependencies> | ||
669 | </autotools> | ||
670 | |||
671 | <autotools id="adobe-75dpi"> | ||
672 | <branch repo="git.freedesktop.org" module="xorg/font/adobe-75dpi" checkoutdir="xorg/font/adobe-75dpi" /> | ||
673 | <dependencies> | ||
674 | <dep package="util"/> | ||
675 | </dependencies> | ||
676 | </autotools> | ||
677 | |||
678 | <autotools id="adobe-utopia-100dpi"> | ||
679 | <branch repo="git.freedesktop.org" module="xorg/font/adobe-utopia-100dpi" checkoutdir="xorg/font/adobe-utopia-100dpi" /> | ||
680 | <dependencies> | ||
681 | <dep package="util"/> | ||
682 | </dependencies> | ||
683 | </autotools> | ||
684 | |||
685 | <autotools id="adobe-utopia-75dpi"> | ||
686 | <branch repo="git.freedesktop.org" module="xorg/font/adobe-utopia-75dpi" checkoutdir="xorg/font/adobe-utopia-75dpi" /> | ||
687 | <dependencies> | ||
688 | <dep package="util"/> | ||
689 | </dependencies> | ||
690 | </autotools> | ||
691 | |||
692 | <autotools id="adobe-utopia-type1"> | ||
693 | <branch repo="git.freedesktop.org" module="xorg/font/adobe-utopia-type1" checkoutdir="xorg/font/adobe-utopia-type1" /> | ||
694 | <dependencies> | ||
695 | <dep package="util"/> | ||
696 | </dependencies> | ||
697 | </autotools> | ||
698 | |||
699 | <autotools id="alias"> | ||
700 | <branch repo="git.freedesktop.org" module="xorg/font/alias" checkoutdir="xorg/font/alias" /> | ||
701 | <dependencies> | ||
702 | <dep package="util"/> | ||
703 | </dependencies> | ||
704 | </autotools> | ||
705 | |||
706 | <autotools id="arabic-misc"> | ||
707 | <branch repo="git.freedesktop.org" module="xorg/font/arabic-misc" checkoutdir="xorg/font/arabic-misc" /> | ||
708 | <dependencies> | ||
709 | <dep package="util"/> | ||
710 | </dependencies> | ||
711 | </autotools> | ||
712 | |||
713 | <autotools id="bh-100dpi"> | ||
714 | <branch repo="git.freedesktop.org" module="xorg/font/bh-100dpi" checkoutdir="xorg/font/bh-100dpi" /> | ||
715 | <dependencies> | ||
716 | <dep package="util"/> | ||
717 | </dependencies> | ||
718 | </autotools> | ||
719 | |||
720 | <autotools id="bh-75dpi"> | ||
721 | <branch repo="git.freedesktop.org" module="xorg/font/bh-75dpi" checkoutdir="xorg/font/bh-75dpi" /> | ||
722 | <dependencies> | ||
723 | <dep package="util"/> | ||
724 | </dependencies> | ||
725 | </autotools> | ||
726 | |||
727 | <autotools id="bh-lucidatypewriter-100dpi"> | ||
728 | <branch repo="git.freedesktop.org" module="xorg/font/bh-lucidatypewriter-100dpi" checkoutdir="xorg/font/bh-lucidatypewriter-100dpi" /> | ||
729 | <dependencies> | ||
730 | <dep package="util"/> | ||
731 | </dependencies> | ||
732 | </autotools> | ||
733 | |||
734 | <autotools id="bh-lucidatypewriter-75dpi"> | ||
735 | <branch repo="git.freedesktop.org" module="xorg/font/bh-lucidatypewriter-75dpi" checkoutdir="xorg/font/bh-lucidatypewriter-75dpi" /> | ||
736 | <dependencies> | ||
737 | <dep package="util"/> | ||
738 | </dependencies> | ||
739 | </autotools> | ||
740 | |||
741 | <autotools id="bh-ttf"> | ||
742 | <branch repo="git.freedesktop.org" module="xorg/font/bh-ttf" checkoutdir="xorg/font/bh-ttf" /> | ||
743 | <dependencies> | ||
744 | <dep package="util"/> | ||
745 | </dependencies> | ||
746 | </autotools> | ||
747 | |||
748 | <autotools id="bh-type1"> | ||
749 | <branch repo="git.freedesktop.org" module="xorg/font/bh-type1" checkoutdir="xorg/font/bh-type1" /> | ||
750 | <dependencies> | ||
751 | <dep package="util"/> | ||
752 | </dependencies> | ||
753 | </autotools> | ||
754 | |||
755 | <autotools id="bitstream-100dpi"> | ||
756 | <branch repo="git.freedesktop.org" module="xorg/font/bitstream-100dpi" checkoutdir="xorg/font/bitstream-100dpi" /> | ||
757 | <dependencies> | ||
758 | <dep package="util"/> | ||
759 | </dependencies> | ||
760 | </autotools> | ||
761 | |||
762 | <autotools id="bitstream-75dpi"> | ||
763 | <branch repo="git.freedesktop.org" module="xorg/font/bitstream-75dpi" checkoutdir="xorg/font/bitstream-75dpi" /> | ||
764 | <dependencies> | ||
765 | <dep package="util"/> | ||
766 | </dependencies> | ||
767 | </autotools> | ||
768 | |||
769 | <autotools id="bitstream-speedo"> | ||
770 | <branch repo="git.freedesktop.org" module="xorg/font/bitstream-speedo" checkoutdir="xorg/font/bitstream-speedo" /> | ||
771 | <dependencies> | ||
772 | <dep package="util"/> | ||
773 | </dependencies> | ||
774 | </autotools> | ||
775 | |||
776 | <autotools id="bitstream-type1"> | ||
777 | <branch repo="git.freedesktop.org" module="xorg/font/bitstream-type1" checkoutdir="xorg/font/bitstream-type1" /> | ||
778 | <dependencies> | ||
779 | <dep package="util"/> | ||
780 | </dependencies> | ||
781 | </autotools> | ||
782 | |||
783 | <autotools id="cronyx-cyrillic"> | ||
784 | <branch repo="git.freedesktop.org" module="xorg/font/cronyx-cyrillic" checkoutdir="xorg/font/cronyx-cyrillic" /> | ||
785 | <dependencies> | ||
786 | <dep package="util"/> | ||
787 | </dependencies> | ||
788 | </autotools> | ||
789 | |||
790 | <autotools id="cursor-misc"> | ||
791 | <branch repo="git.freedesktop.org" module="xorg/font/cursor-misc" checkoutdir="xorg/font/cursor-misc" /> | ||
792 | <dependencies> | ||
793 | <dep package="util"/> | ||
794 | </dependencies> | ||
795 | </autotools> | ||
796 | |||
797 | <autotools id="CVS"> | ||
798 | <branch repo="git.freedesktop.org" module="xorg/font/CVS" checkoutdir="xorg/font/CVS" /> | ||
799 | <dependencies> | ||
800 | <dep package="util"/> | ||
801 | </dependencies> | ||
802 | </autotools> | ||
803 | |||
804 | <autotools id="daewoo-misc"> | ||
805 | <branch repo="git.freedesktop.org" module="xorg/font/daewoo-misc" checkoutdir="xorg/font/daewoo-misc" /> | ||
806 | <dependencies> | ||
807 | <dep package="util"/> | ||
808 | </dependencies> | ||
809 | </autotools> | ||
810 | |||
811 | <autotools id="dec-misc"> | ||
812 | <branch repo="git.freedesktop.org" module="xorg/font/dec-misc" checkoutdir="xorg/font/dec-misc" /> | ||
813 | <dependencies> | ||
814 | <dep package="util"/> | ||
815 | </dependencies> | ||
816 | </autotools> | ||
817 | |||
818 | <autotools id="encodings"> | ||
819 | <branch repo="git.freedesktop.org" module="xorg/font/encodings" checkoutdir="xorg/font/encodings" /> | ||
820 | <dependencies> | ||
821 | <dep package="util"/> | ||
822 | </dependencies> | ||
823 | </autotools> | ||
824 | |||
825 | <autotools id="ibm-type1"> | ||
826 | <branch repo="git.freedesktop.org" module="xorg/font/ibm-type1" checkoutdir="xorg/font/ibm-type1" /> | ||
827 | <dependencies> | ||
828 | <dep package="util"/> | ||
829 | </dependencies> | ||
830 | </autotools> | ||
831 | |||
832 | <autotools id="isas-misc"> | ||
833 | <branch repo="git.freedesktop.org" module="xorg/font/isas-misc" checkoutdir="xorg/font/isas-misc" /> | ||
834 | <dependencies> | ||
835 | <dep package="util"/> | ||
836 | </dependencies> | ||
837 | </autotools> | ||
838 | |||
839 | <autotools id="jis-misc"> | ||
840 | <branch repo="git.freedesktop.org" module="xorg/font/jis-misc" checkoutdir="xorg/font/jis-misc" /> | ||
841 | <dependencies> | ||
842 | <dep package="util"/> | ||
843 | </dependencies> | ||
844 | </autotools> | ||
845 | |||
846 | <autotools id="micro-misc"> | ||
847 | <branch repo="git.freedesktop.org" module="xorg/font/micro-misc" checkoutdir="xorg/font/micro-misc" /> | ||
848 | <dependencies> | ||
849 | <dep package="util"/> | ||
850 | </dependencies> | ||
851 | </autotools> | ||
852 | |||
853 | <autotools id="misc-cyrillic"> | ||
854 | <branch repo="git.freedesktop.org" module="xorg/font/misc-cyrillic" checkoutdir="xorg/font/misc-cyrillic" /> | ||
855 | <dependencies> | ||
856 | <dep package="util"/> | ||
857 | </dependencies> | ||
858 | </autotools> | ||
859 | |||
860 | <autotools id="misc-ethiopic"> | ||
861 | <branch repo="git.freedesktop.org" module="xorg/font/misc-ethiopic" checkoutdir="xorg/font/misc-ethiopic" /> | ||
862 | <dependencies> | ||
863 | <dep package="util"/> | ||
864 | </dependencies> | ||
865 | </autotools> | ||
866 | |||
867 | <autotools id="misc-meltho"> | ||
868 | <branch repo="git.freedesktop.org" module="xorg/font/misc-meltho" checkoutdir="xorg/font/misc-meltho" /> | ||
869 | <dependencies> | ||
870 | <dep package="util"/> | ||
871 | </dependencies> | ||
872 | </autotools> | ||
873 | |||
874 | <autotools id="misc-misc"> | ||
875 | <branch repo="git.freedesktop.org" module="xorg/font/misc-misc" checkoutdir="xorg/font/misc-misc" /> | ||
876 | <dependencies> | ||
877 | <dep package="util"/> | ||
878 | </dependencies> | ||
879 | </autotools> | ||
880 | |||
881 | <autotools id="mutt-misc"> | ||
882 | <branch repo="git.freedesktop.org" module="xorg/font/mutt-misc" checkoutdir="xorg/font/mutt-misc" /> | ||
883 | <dependencies> | ||
884 | <dep package="util"/> | ||
885 | </dependencies> | ||
886 | </autotools> | ||
887 | |||
888 | <autotools id="schumacher-misc"> | ||
889 | <branch repo="git.freedesktop.org" module="xorg/font/schumacher-misc" checkoutdir="xorg/font/schumacher-misc" /> | ||
890 | <dependencies> | ||
891 | <dep package="util"/> | ||
892 | </dependencies> | ||
893 | </autotools> | ||
894 | |||
895 | <autotools id="screen-cyrillic"> | ||
896 | <branch repo="git.freedesktop.org" module="xorg/font/screen-cyrillic" checkoutdir="xorg/font/screen-cyrillic" /> | ||
897 | <dependencies> | ||
898 | <dep package="util"/> | ||
899 | </dependencies> | ||
900 | </autotools> | ||
901 | |||
902 | <autotools id="sony-misc"> | ||
903 | <branch repo="git.freedesktop.org" module="xorg/font/sony-misc" checkoutdir="xorg/font/sony-misc" /> | ||
904 | <dependencies> | ||
905 | <dep package="util"/> | ||
906 | </dependencies> | ||
907 | </autotools> | ||
908 | |||
909 | <autotools id="sun-misc"> | ||
910 | <branch repo="git.freedesktop.org" module="xorg/font/sun-misc" checkoutdir="xorg/font/sun-misc" /> | ||
911 | <dependencies> | ||
912 | <dep package="util"/> | ||
913 | </dependencies> | ||
914 | </autotools> | ||
915 | |||
916 | <autotools id="util"> | ||
917 | <branch repo="git.freedesktop.org" module="xorg/font/util" checkoutdir="xorg/font/util" /> | ||
918 | <dependencies> | ||
919 | <dep package="util"/> | ||
920 | </dependencies> | ||
921 | </autotools> | ||
922 | |||
923 | <autotools id="winitzki-cyrillic"> | ||
924 | <branch repo="git.freedesktop.org" module="xorg/font/winitzki-cyrillic" checkoutdir="xorg/font/winitzki-cyrillic" /> | ||
925 | <dependencies> | ||
926 | <dep package="util"/> | ||
927 | </dependencies> | ||
928 | </autotools> | ||
929 | |||
930 | <autotools id="xfree86-type1"> | ||
931 | <branch repo="git.freedesktop.org" module="xorg/font/xfree86-type1" checkoutdir="xorg/font/xfree86-type1" /> | ||
932 | <dependencies> | ||
933 | <dep package="util"/> | ||
934 | </dependencies> | ||
935 | </autotools> | ||
936 | |||
937 | <metamodule id="xorg-fonts"> | ||
938 | <dependencies> | ||
939 | <dep package="encodings"/> | ||
940 | <dep package="adobe-75dpi"/> | ||
941 | <dep package="adobe-100dpi"/> | ||
942 | <dep package="adobe-utopia-75dpi"/> | ||
943 | <dep package="adobe-utopia-100dpi"/> | ||
944 | <dep package="adobe-utopia-type1"/> | ||
945 | <dep package="alias"/> | ||
946 | <dep package="arabic-misc"/> | ||
947 | <dep package="bh-75dpi"/> | ||
948 | <dep package="bh-100dpi"/> | ||
949 | <dep package="bh-lucidatypewriter-75dpi"/> | ||
950 | <dep package="bh-lucidatypewriter-100dpi"/> | ||
951 | <dep package="bh-ttf"/> | ||
952 | <dep package="bh-type1"/> | ||
953 | <dep package="bitstream-75dpi"/> | ||
954 | <dep package="bitstream-100dpi"/> | ||
955 | <dep package="bitstream-type1"/> | ||
956 | <dep package="cronyx-cyrillic"/> | ||
957 | <dep package="cursor-misc"/> | ||
958 | <dep package="daewoo-misc"/> | ||
959 | <dep package="dec-misc"/> | ||
960 | <dep package="ibm-type1"/> | ||
961 | <dep package="isas-misc"/> | ||
962 | <dep package="jis-misc"/> | ||
963 | <dep package="micro-misc"/> | ||
964 | <dep package="misc-cyrillic"/> | ||
965 | <dep package="misc-misc"/> | ||
966 | <dep package="mutt-misc"/> | ||
967 | </dependencies> | ||
968 | </metamodule> | ||
969 | |||
970 | <!-- data --> | ||
971 | <autotools id="bitmaps"> | ||
972 | <branch repo="git.freedesktop.org" module="xorg/data/bitmaps" checkoutdir="xorg/data/bitmaps" /> | ||
973 | <dependencies> | ||
974 | <dep package="macros"/> | ||
975 | </dependencies> | ||
976 | </autotools> | ||
977 | |||
978 | <autotools id="cursors"> | ||
979 | <branch repo="git.freedesktop.org" module="xorg/data/cursors" checkoutdir="xorg/data/cursors" /> | ||
980 | <dependencies> | ||
981 | <dep package="app/xcursorgen"/> | ||
982 | </dependencies> | ||
983 | </autotools> | ||
984 | |||
985 | <autotools id="xkbdata"> | ||
986 | <branch repo="git.freedesktop.org" module="xorg/data/xkbdata" checkoutdir="xorg/data/xkbdata" /> | ||
987 | <dependencies> | ||
988 | <dep package="app/xkbcomp"/> | ||
989 | </dependencies> | ||
990 | </autotools> | ||
991 | |||
992 | <!-- apps --> | ||
993 | |||
994 | <autotools id="appres"> | ||
995 | <branch repo="git.freedesktop.org" module="xorg/app/appres" checkoutdir="xorg/app/appres" /> | ||
996 | <dependencies> | ||
997 | <dep package="libXt"/> | ||
998 | </dependencies> | ||
999 | </autotools> | ||
1000 | |||
1001 | <autotools id="bdftopcf"> | ||
1002 | <branch repo="git.freedesktop.org" module="xorg/app/bdftopcf" checkoutdir="xorg/app/bdftopcf" /> | ||
1003 | <dependencies> | ||
1004 | <dep package="libXfont"/> | ||
1005 | </dependencies> | ||
1006 | </autotools> | ||
1007 | |||
1008 | <autotools id="beforelight"> | ||
1009 | <branch repo="git.freedesktop.org" module="xorg/app/beforelight" checkoutdir="xorg/app/beforelight" /> | ||
1010 | <dependencies> | ||
1011 | <dep package="libXScrnSaver"/> | ||
1012 | <dep package="libXt"/> | ||
1013 | </dependencies> | ||
1014 | </autotools> | ||
1015 | |||
1016 | <autotools id="bitmap"> | ||
1017 | <branch repo="git.freedesktop.org" module="xorg/app/bitmap" checkoutdir="xorg/app/bitmap" /> | ||
1018 | <dependencies> | ||
1019 | <dep package="libXaw"/> | ||
1020 | <dep package="libXmu"/> | ||
1021 | <dep package="bitmaps"/> | ||
1022 | </dependencies> | ||
1023 | </autotools> | ||
1024 | |||
1025 | <autotools id="editres"> | ||
1026 | <branch repo="git.freedesktop.org" module="xorg/app/editres" checkoutdir="xorg/app/editres" /> | ||
1027 | <dependencies> | ||
1028 | <dep package="libXaw"/> | ||
1029 | </dependencies> | ||
1030 | </autotools> | ||
1031 | |||
1032 | <autotools id="fonttosfnt"> | ||
1033 | <branch repo="git.freedesktop.org" module="xorg/app/fonttosfnt" checkoutdir="xorg/app/fonttosfnt" /> | ||
1034 | <dependencies> | ||
1035 | <dep package="libX11"/> | ||
1036 | <dep package="libfontenc"/> | ||
1037 | <!-- <dep package="freetype2"/> --> | ||
1038 | </dependencies> | ||
1039 | </autotools> | ||
1040 | |||
1041 | <autotools id="fslsfonts"> | ||
1042 | <branch repo="git.freedesktop.org" module="xorg/app/fslsfonts" checkoutdir="xorg/app/fslsfonts" /> | ||
1043 | <dependencies> | ||
1044 | <dep package="libX11"/> | ||
1045 | <dep package="libFS"/> | ||
1046 | </dependencies> | ||
1047 | </autotools> | ||
1048 | |||
1049 | <autotools id="fstobdf"> | ||
1050 | <branch repo="git.freedesktop.org" module="xorg/app/fstobdf" checkoutdir="xorg/app/fstobdf" /> | ||
1051 | <dependencies> | ||
1052 | <dep package="libX11"/> | ||
1053 | <dep package="libFS"/> | ||
1054 | </dependencies> | ||
1055 | </autotools> | ||
1056 | |||
1057 | <autotools id="iceauth"> | ||
1058 | <branch repo="git.freedesktop.org" module="xorg/app/iceauth" checkoutdir="xorg/app/iceauth" /> | ||
1059 | <dependencies> | ||
1060 | <dep package="libX11"/> | ||
1061 | <dep package="libICE"/> | ||
1062 | </dependencies> | ||
1063 | </autotools> | ||
1064 | |||
1065 | <autotools id="ico"> | ||
1066 | <branch repo="git.freedesktop.org" module="xorg/app/ico" checkoutdir="xorg/app/ico" /> | ||
1067 | <dependencies> | ||
1068 | <dep package="libX11"/> | ||
1069 | </dependencies> | ||
1070 | </autotools> | ||
1071 | |||
1072 | <autotools id="lbxproxy"> | ||
1073 | <branch repo="git.freedesktop.org" module="xorg/app/lbxproxy" checkoutdir="xorg/app/lbxproxy" /> | ||
1074 | <dependencies> | ||
1075 | <dep package="libxtrans"/> | ||
1076 | <dep package="libXext"/> | ||
1077 | <dep package="liblbxutil"/> | ||
1078 | <dep package="libX11"/> | ||
1079 | <dep package="libICE"/> | ||
1080 | <dep package="pmproto"/> | ||
1081 | </dependencies> | ||
1082 | </autotools> | ||
1083 | |||
1084 | <autotools id="listres"> | ||
1085 | <branch repo="git.freedesktop.org" module="xorg/app/listres" checkoutdir="xorg/app/listres" /> | ||
1086 | <dependencies> | ||
1087 | <dep package="libXaw"/> | ||
1088 | </dependencies> | ||
1089 | </autotools> | ||
1090 | |||
1091 | <autotools id="luit"> | ||
1092 | <branch repo="git.freedesktop.org" module="xorg/app/luit" checkoutdir="xorg/app/luit" /> | ||
1093 | <dependencies> | ||
1094 | <dep package="libX11"/> | ||
1095 | <dep package="libfontenc"/> | ||
1096 | </dependencies> | ||
1097 | </autotools> | ||
1098 | |||
1099 | <autotools id="mkcfm"> | ||
1100 | <branch repo="git.freedesktop.org" module="xorg/app/mkcfm" checkoutdir="xorg/app/mkcfm" /> | ||
1101 | </autotools> | ||
1102 | |||
1103 | <autotools id="mkfontdir"> | ||
1104 | <branch repo="git.freedesktop.org" module="xorg/app/mkfontdir" checkoutdir="xorg/app/mkfontdir" /> | ||
1105 | </autotools> | ||
1106 | |||
1107 | <autotools id="mkfontscale"> | ||
1108 | <branch repo="git.freedesktop.org" module="xorg/app/mkfontscale" checkoutdir="xorg/app/mkfontscale" /> | ||
1109 | <dependencies> | ||
1110 | <dep package="libfontenc"/> | ||
1111 | <!-- <dep package="freetype2"/> --> | ||
1112 | </dependencies> | ||
1113 | </autotools> | ||
1114 | |||
1115 | <autotools id="oclock"> | ||
1116 | <branch repo="git.freedesktop.org" module="xorg/app/oclock" checkoutdir="xorg/app/oclock" /> | ||
1117 | <dependencies> | ||
1118 | <dep package="libX11"/> | ||
1119 | <dep package="libXmu"/> | ||
1120 | <dep package="libXext"/> | ||
1121 | </dependencies> | ||
1122 | </autotools> | ||
1123 | |||
1124 | <autotools id="proxymngr"> | ||
1125 | <branch repo="git.freedesktop.org" module="xorg/app/proxymngr" checkoutdir="xorg/app/proxymngr" /> | ||
1126 | <dependencies> | ||
1127 | <dep package="libX11"/> | ||
1128 | <dep package="libXt"/> | ||
1129 | <dep package="pmproto"/> | ||
1130 | <dep package="libICE"/> | ||
1131 | </dependencies> | ||
1132 | </autotools> | ||
1133 | |||
1134 | <autotools id="rgb"> | ||
1135 | <branch repo="git.freedesktop.org" module="xorg/app/rgb" checkoutdir="xorg/app/rgb" /> | ||
1136 | <dependencies> | ||
1137 | <dep package="x11proto"/> | ||
1138 | </dependencies> | ||
1139 | </autotools> | ||
1140 | |||
1141 | <autotools id="rstart"> | ||
1142 | <branch repo="git.freedesktop.org" module="xorg/app/rstart" checkoutdir="xorg/app/rstart" /> | ||
1143 | </autotools> | ||
1144 | <autotools id="scripts"> | ||
1145 | <branch repo="git.freedesktop.org" module="xorg/app/scripts" checkoutdir="xorg/app/scripts" /> | ||
1146 | </autotools> | ||
1147 | |||
1148 | <!-- <branch repo="git.freedesktop.org" module="xorg/app/sessreg"/> --> | ||
1149 | |||
1150 | <autotools id="setxkbmap"> | ||
1151 | <branch repo="git.freedesktop.org" module="xorg/app/setxkbmap" checkoutdir="xorg/app/setxkbmap" /> | ||
1152 | </autotools> | ||
1153 | <autotools id="showfont"> | ||
1154 | <branch repo="git.freedesktop.org" module="xorg/app/showfont" checkoutdir="xorg/app/showfont" /> | ||
1155 | </autotools> | ||
1156 | <autotools id="smproxy"> | ||
1157 | <branch repo="git.freedesktop.org" module="xorg/app/smproxy" checkoutdir="xorg/app/smproxy" /> | ||
1158 | </autotools> | ||
1159 | <autotools id="twm"> | ||
1160 | <branch repo="git.freedesktop.org" module="xorg/app/twm" checkoutdir="xorg/app/twm" /> | ||
1161 | </autotools> | ||
1162 | |||
1163 | <autotools id="viewres"> | ||
1164 | <branch repo="git.freedesktop.org" module="xorg/app/viewres" checkoutdir="xorg/app/viewres" /> | ||
1165 | <dependencies> | ||
1166 | <dep package="libXaw"/> | ||
1167 | </dependencies> | ||
1168 | </autotools> | ||
1169 | |||
1170 | <autotools id="x11perf"> | ||
1171 | <branch repo="git.freedesktop.org" module="xorg/app/x11perf" checkoutdir="xorg/app/x11perf" /> | ||
1172 | </autotools> | ||
1173 | <autotools id="xauth"> | ||
1174 | <branch repo="git.freedesktop.org" module="xorg/app/xauth" checkoutdir="xorg/app/xauth" /> | ||
1175 | </autotools> | ||
1176 | <autotools id="xbiff"> | ||
1177 | <branch repo="git.freedesktop.org" module="xorg/app/xbiff" checkoutdir="xorg/app/xbiff" /> | ||
1178 | <dependencies> | ||
1179 | <dep package="libXaw"/> | ||
1180 | </dependencies> | ||
1181 | </autotools> | ||
1182 | |||
1183 | <autotools id="xcalc"> | ||
1184 | <branch repo="git.freedesktop.org" module="xorg/app/xcalc" checkoutdir="xorg/app/xcalc" /> | ||
1185 | <dependencies> | ||
1186 | <dep package="libXaw"/> | ||
1187 | </dependencies> | ||
1188 | </autotools> | ||
1189 | |||
1190 | <autotools id="xclipboard"> | ||
1191 | <branch repo="git.freedesktop.org" module="xorg/app/xclipboard" checkoutdir="xorg/app/xclipboard" /> | ||
1192 | <dependencies> | ||
1193 | <dep package="libXaw"/> | ||
1194 | </dependencies> | ||
1195 | </autotools> | ||
1196 | |||
1197 | <autotools id="xclock"> | ||
1198 | <branch repo="git.freedesktop.org" module="xorg/app/xclock" checkoutdir="xorg/app/xclock" /> | ||
1199 | <dependencies> | ||
1200 | <dep package="libXaw"/> | ||
1201 | </dependencies> | ||
1202 | </autotools> | ||
1203 | |||
1204 | <autotools id="xcmsdb"> | ||
1205 | <branch repo="git.freedesktop.org" module="xorg/app/xcmsdb" checkoutdir="xorg/app/xcmsdb" /> | ||
1206 | </autotools> | ||
1207 | <autotools id="xconsole"> | ||
1208 | <branch repo="git.freedesktop.org" module="xorg/app/xconsole" checkoutdir="xorg/app/xconsole" /> | ||
1209 | <dependencies> | ||
1210 | <dep package="libXaw"/> | ||
1211 | </dependencies> | ||
1212 | </autotools> | ||
1213 | |||
1214 | <autotools id="xcursorgen"> | ||
1215 | <branch repo="git.freedesktop.org" module="xorg/app/xcursorgen" checkoutdir="xorg/app/xcursorgen" /> | ||
1216 | </autotools> | ||
1217 | <autotools id="xdbedizzy"> | ||
1218 | <branch repo="git.freedesktop.org" module="xorg/app/xdbedizzy" checkoutdir="xorg/app/xdbedizzy" /> | ||
1219 | </autotools> | ||
1220 | <autotools id="xditview"> | ||
1221 | <branch repo="git.freedesktop.org" module="xorg/app/xditview" checkoutdir="xorg/app/xditview" /> | ||
1222 | <dependencies> | ||
1223 | <dep package="libXaw"/> | ||
1224 | </dependencies> | ||
1225 | </autotools> | ||
1226 | |||
1227 | <autotools id="xdm"> | ||
1228 | <branch repo="git.freedesktop.org" module="xorg/app/xdm" checkoutdir="xorg/app/xdm" /> | ||
1229 | <dependencies> | ||
1230 | <dep package="libXaw"/> | ||
1231 | </dependencies> | ||
1232 | </autotools> | ||
1233 | |||
1234 | <autotools id="xdpyinfo"> | ||
1235 | <branch repo="git.freedesktop.org" module="xorg/app/xdpyinfo" checkoutdir="xorg/app/xdpyinfo" /> | ||
1236 | <dependencies> | ||
1237 | <dep package="libX11"/> | ||
1238 | <dep package="libXext"/> | ||
1239 | <dep package="libXtst"/> | ||
1240 | </dependencies> | ||
1241 | </autotools> | ||
1242 | |||
1243 | <autotools id="xdriinfo"> | ||
1244 | <branch repo="git.freedesktop.org" module="xorg/app/xdriinfo" checkoutdir="xorg/app/xdriinfo" /> | ||
1245 | <dependencies> | ||
1246 | <dep package="glproto"/> | ||
1247 | </dependencies> | ||
1248 | </autotools> | ||
1249 | |||
1250 | <autotools id="xedit"> | ||
1251 | <branch repo="git.freedesktop.org" module="xorg/app/xedit" checkoutdir="xorg/app/xedit" /> | ||
1252 | </autotools> | ||
1253 | <autotools id="xev"> | ||
1254 | <branch repo="git.freedesktop.org" module="xorg/app/xev" checkoutdir="xorg/app/xev" /> | ||
1255 | </autotools> | ||
1256 | <autotools id="xeyes"> | ||
1257 | <branch repo="git.freedesktop.org" module="xorg/app/xeyes" checkoutdir="xorg/app/xeyes" /> | ||
1258 | </autotools> | ||
1259 | <autotools id="xf86dga"> | ||
1260 | <branch repo="git.freedesktop.org" module="xorg/app/xf86dga" checkoutdir="xorg/app/xf86dga" /> | ||
1261 | </autotools> | ||
1262 | <autotools id="xfd"> | ||
1263 | <branch repo="git.freedesktop.org" module="xorg/app/xfd" checkoutdir="xorg/app/xfd" /> | ||
1264 | <dependencies> | ||
1265 | <dep package="libXaw"/> | ||
1266 | </dependencies> | ||
1267 | </autotools> | ||
1268 | |||
1269 | <autotools id="xfindproxy"> | ||
1270 | <branch repo="git.freedesktop.org" module="xorg/app/xfindproxy" checkoutdir="xorg/app/xfindproxy" /> | ||
1271 | </autotools> | ||
1272 | <autotools id="xfontsel"> | ||
1273 | <branch repo="git.freedesktop.org" module="xorg/app/xfontsel" checkoutdir="xorg/app/xfontsel" /> | ||
1274 | </autotools> | ||
1275 | <autotools id="xfs"> | ||
1276 | <branch repo="git.freedesktop.org" module="xorg/app/xfs" checkoutdir="xorg/app/xfs" /> | ||
1277 | </autotools> | ||
1278 | <autotools id="xfsinfo"> | ||
1279 | <branch repo="git.freedesktop.org" module="xorg/app/xfsinfo" checkoutdir="xorg/app/xfsinfo" /> | ||
1280 | </autotools> | ||
1281 | <autotools id="xfwp"> | ||
1282 | <branch repo="git.freedesktop.org" module="xorg/app/xfwp" checkoutdir="xorg/app/xfwp" /> | ||
1283 | </autotools> | ||
1284 | <autotools id="xgamma"> | ||
1285 | <branch repo="git.freedesktop.org" module="xorg/app/xgamma" checkoutdir="xorg/app/xgamma" /> | ||
1286 | </autotools> | ||
1287 | <autotools id="xgc"> | ||
1288 | <branch repo="git.freedesktop.org" module="xorg/app/xgc" checkoutdir="xorg/app/xgc" /> | ||
1289 | <dependencies> | ||
1290 | <dep package="libXaw"/> | ||
1291 | </dependencies> | ||
1292 | </autotools> | ||
1293 | |||
1294 | <autotools id="xhost"> | ||
1295 | <branch repo="git.freedesktop.org" module="xorg/app/xhost" checkoutdir="xorg/app/xhost" /> | ||
1296 | </autotools> | ||
1297 | <autotools id="xinit"> | ||
1298 | <branch repo="git.freedesktop.org" module="xorg/app/xinit" checkoutdir="xorg/app/xinit" /> | ||
1299 | </autotools> | ||
1300 | <autotools id="xkbcomp"> | ||
1301 | <branch repo="git.freedesktop.org" module="xorg/app/xkbcomp" checkoutdir="xorg/app/xkbcomp" /> | ||
1302 | </autotools> | ||
1303 | <autotools id="xkbevd"> | ||
1304 | <branch repo="git.freedesktop.org" module="xorg/app/xkbevd" checkoutdir="xorg/app/xkbevd" /> | ||
1305 | </autotools> | ||
1306 | <autotools id="xkbprint"> | ||
1307 | <branch repo="git.freedesktop.org" module="xorg/app/xkbprint" checkoutdir="xorg/app/xkbprint" /> | ||
1308 | </autotools> | ||
1309 | <autotools id="xkbutils"> | ||
1310 | <branch repo="git.freedesktop.org" module="xorg/app/xkbutils" checkoutdir="xorg/app/xkbutils" /> | ||
1311 | <dependencies> | ||
1312 | <dep package="libXaw"/> | ||
1313 | </dependencies> | ||
1314 | </autotools> | ||
1315 | |||
1316 | <autotools id="xkill"> | ||
1317 | <branch repo="git.freedesktop.org" module="xorg/app/xkill" checkoutdir="xorg/app/xkill" /> | ||
1318 | </autotools> | ||
1319 | <autotools id="xload"> | ||
1320 | <branch repo="git.freedesktop.org" module="xorg/app/xload" checkoutdir="xorg/app/xload" /> | ||
1321 | <dependencies> | ||
1322 | <dep package="libXaw"/> | ||
1323 | </dependencies> | ||
1324 | </autotools> | ||
1325 | |||
1326 | <autotools id="xlogo"> | ||
1327 | <branch repo="git.freedesktop.org" module="xorg/app/xlogo" checkoutdir="xorg/app/xlogo" /> | ||
1328 | <dependencies> | ||
1329 | <dep package="libXaw"/> | ||
1330 | </dependencies> | ||
1331 | </autotools> | ||
1332 | |||
1333 | <autotools id="xlsatoms"> | ||
1334 | <branch repo="git.freedesktop.org" module="xorg/app/xlsatoms" checkoutdir="xorg/app/xlsatoms" /> | ||
1335 | </autotools> | ||
1336 | <autotools id="xlsclients"> | ||
1337 | <branch repo="git.freedesktop.org" module="xorg/app/xlsclients" checkoutdir="xorg/app/xlsclients" /> | ||
1338 | </autotools> | ||
1339 | <autotools id="xlsfonts"> | ||
1340 | <branch repo="git.freedesktop.org" module="xorg/app/xlsfonts" checkoutdir="xorg/app/xlsfonts" /> | ||
1341 | </autotools> | ||
1342 | <autotools id="xmag"> | ||
1343 | <branch repo="git.freedesktop.org" module="xorg/app/xmag" checkoutdir="xorg/app/xmag" /> | ||
1344 | <dependencies> | ||
1345 | <dep package="libXaw"/> | ||
1346 | </dependencies> | ||
1347 | </autotools> | ||
1348 | |||
1349 | <autotools id="xman"> | ||
1350 | <branch repo="git.freedesktop.org" module="xorg/app/xman" checkoutdir="xorg/app/xman" /> | ||
1351 | <dependencies> | ||
1352 | <dep package="libXaw"/> | ||
1353 | </dependencies> | ||
1354 | </autotools> | ||
1355 | |||
1356 | <autotools id="xmessage"> | ||
1357 | <branch repo="git.freedesktop.org" module="xorg/app/xmessage" checkoutdir="xorg/app/xmessage" /> | ||
1358 | <dependencies> | ||
1359 | <dep package="libXaw"/> | ||
1360 | </dependencies> | ||
1361 | </autotools> | ||
1362 | |||
1363 | <autotools id="xmh"> | ||
1364 | <branch repo="git.freedesktop.org" module="xorg/app/xmh" checkoutdir="xorg/app/xmh" /> | ||
1365 | <dependencies> | ||
1366 | <dep package="libXaw"/> | ||
1367 | </dependencies> | ||
1368 | </autotools> | ||
1369 | |||
1370 | <autotools id="xmodmap"> | ||
1371 | <branch repo="git.freedesktop.org" module="xorg/app/xmodmap" checkoutdir="xorg/app/xmodmap" /> | ||
1372 | </autotools> | ||
1373 | <autotools id="xmore"> | ||
1374 | <branch repo="git.freedesktop.org" module="xorg/app/xmore" checkoutdir="xorg/app/xmore" /> | ||
1375 | <dependencies> | ||
1376 | <dep package="libXaw"/> | ||
1377 | </dependencies> | ||
1378 | </autotools> | ||
1379 | |||
1380 | <!-- | ||
1381 | <autotools id="xphelloworld"> | ||
1382 | <branch repo="git.freedesktop.org" module="xorg/app/xphelloworld" checkoutdir="xorg/app/xphelloworld" /> | ||
1383 | </autotools> | ||
1384 | <autotools id="xplsprinters"> | ||
1385 | <branch repo="git.freedesktop.org" module="xorg/app/xplsprinters" checkoutdir="xorg/app/xplsprinters" /> | ||
1386 | </autotools> | ||
1387 | <autotools id="xpr"> | ||
1388 | <branch repo="git.freedesktop.org" module="xorg/app/xpr" checkoutdir="xorg/app/xpr" /> | ||
1389 | </autotools> | ||
1390 | <autotools id="xprehashprinterlist"> | ||
1391 | <branch repo="git.freedesktop.org" module="xorg/app/xprehashprinterlist" checkoutdir="xorg/app/xprehashprinterlist" /> | ||
1392 | </autotools> | ||
1393 | --> | ||
1394 | |||
1395 | <autotools id="xprop"> | ||
1396 | <branch repo="git.freedesktop.org" module="xorg/app/xprop" checkoutdir="xorg/app/xprop" /> | ||
1397 | </autotools> | ||
1398 | <autotools id="xrandr"> | ||
1399 | <branch repo="git.freedesktop.org" module="xorg/app/xrandr" checkoutdir="xorg/app/xrandr" /> | ||
1400 | </autotools> | ||
1401 | <autotools id="xrdb"> | ||
1402 | <branch repo="git.freedesktop.org" module="xorg/app/xrdb" checkoutdir="xorg/app/xrdb" /> | ||
1403 | </autotools> | ||
1404 | <autotools id="xrefresh"> | ||
1405 | <branch repo="git.freedesktop.org" module="xorg/app/xrefresh" checkoutdir="xorg/app/xrefresh" /> | ||
1406 | </autotools> | ||
1407 | |||
1408 | <autotools id="xrx"> | ||
1409 | <branch repo="git.freedesktop.org" module="xorg/app/xrx" checkoutdir="xorg/app/xrx" /> | ||
1410 | <dependencies> | ||
1411 | <dep package="libXext"/> | ||
1412 | </dependencies> | ||
1413 | </autotools> | ||
1414 | |||
1415 | <autotools id="xset"> | ||
1416 | <branch repo="git.freedesktop.org" module="xorg/app/xset" checkoutdir="xorg/app/xset" /> | ||
1417 | <dependencies> | ||
1418 | <dep package="libXext"/> | ||
1419 | </dependencies> | ||
1420 | </autotools> | ||
1421 | |||
1422 | <autotools id="xsetmode"> | ||
1423 | <branch repo="git.freedesktop.org" module="xorg/app/xsetmode" checkoutdir="xorg/app/xsetmode" /> | ||
1424 | </autotools> | ||
1425 | <autotools id="xsetpointer"> | ||
1426 | <branch repo="git.freedesktop.org" module="xorg/app/xsetpointer" checkoutdir="xorg/app/xsetpointer" /> | ||
1427 | </autotools> | ||
1428 | |||
1429 | <autotools id="xsetroot"> | ||
1430 | <branch repo="git.freedesktop.org" module="xorg/app/xsetroot" checkoutdir="xorg/app/xsetroot" /> | ||
1431 | <dependencies> | ||
1432 | <dep package="libX11"/> | ||
1433 | <dep package="libXmu"/> | ||
1434 | <dep package="bitmaps"/> | ||
1435 | </dependencies> | ||
1436 | </autotools> | ||
1437 | |||
1438 | <autotools id="xsm"> | ||
1439 | <branch repo="git.freedesktop.org" module="xorg/app/xsm" checkoutdir="xorg/app/xsm" /> | ||
1440 | <dependencies> | ||
1441 | <dep package="libXaw"/> | ||
1442 | </dependencies> | ||
1443 | </autotools> | ||
1444 | |||
1445 | <autotools id="xstdcmap"> | ||
1446 | <branch repo="git.freedesktop.org" module="xorg/app/xstdcmap" checkoutdir="xorg/app/xstdcmap" /> | ||
1447 | </autotools> | ||
1448 | <autotools id="xtrap"> | ||
1449 | <branch repo="git.freedesktop.org" module="xorg/app/xtrap" checkoutdir="xorg/app/xtrap" /> | ||
1450 | </autotools> | ||
1451 | |||
1452 | <autotools id="xvidtune"> | ||
1453 | <branch repo="git.freedesktop.org" module="xorg/app/xvidtune" checkoutdir="xorg/app/xvidtune" /> | ||
1454 | <dependencies> | ||
1455 | <dep package="libXaw"/> | ||
1456 | </dependencies> | ||
1457 | </autotools> | ||
1458 | |||
1459 | <autotools id="xvinfo"> | ||
1460 | <branch repo="git.freedesktop.org" module="xorg/app/xvinfo" checkoutdir="xorg/app/xvinfo" /> | ||
1461 | </autotools> | ||
1462 | <autotools id="xwd"> | ||
1463 | <branch repo="git.freedesktop.org" module="xorg/app/xwd" checkoutdir="xorg/app/xwd" /> | ||
1464 | </autotools> | ||
1465 | <autotools id="xwininfo"> | ||
1466 | <branch repo="git.freedesktop.org" module="xorg/app/xwininfo" checkoutdir="xorg/app/xwininfo" /> | ||
1467 | </autotools> | ||
1468 | <autotools id="xwud"> | ||
1469 | <branch repo="git.freedesktop.org" module="xorg/app/xwud" checkoutdir="xorg/app/xwud" /> | ||
1470 | </autotools> | ||
1471 | |||
1472 | <metamodule id="xorg-apps"> | ||
1473 | <dependencies> | ||
1474 | <dep package="appres"/> | ||
1475 | <dep package="bdftopcf"/> | ||
1476 | <dep package="beforelight"/> | ||
1477 | <dep package="bitmap"/> | ||
1478 | <dep package="editres"/> | ||
1479 | <dep package="fonttosfnt"/> | ||
1480 | <dep package="fslsfonts"/> | ||
1481 | <dep package="fstobdf"/> | ||
1482 | <dep package="iceauth"/> | ||
1483 | <dep package="ico"/> | ||
1484 | <dep package="lbxproxy"/> | ||
1485 | <dep package="listres"/> | ||
1486 | <dep package="luit"/> | ||
1487 | <dep package="mkcfm"/> | ||
1488 | <dep package="mkfontdir"/> | ||
1489 | <dep package="mkfontscale"/> | ||
1490 | <dep package="oclock"/> | ||
1491 | <dep package="proxymngr"/> | ||
1492 | <dep package="rgb"/> | ||
1493 | <dep package="rstart"/> | ||
1494 | <dep package="scripts"/> | ||
1495 | <dep package="setxkbmap"/> | ||
1496 | <dep package="showfont"/> | ||
1497 | <dep package="smproxy"/> | ||
1498 | <dep package="twm"/> | ||
1499 | <dep package="viewres"/> | ||
1500 | <dep package="x11perf"/> | ||
1501 | <dep package="xauth"/> | ||
1502 | <dep package="xbiff"/> | ||
1503 | <dep package="xcalc"/> | ||
1504 | <dep package="xclipboard"/> | ||
1505 | <dep package="xclock"/> | ||
1506 | <dep package="xcmsdb"/> | ||
1507 | <dep package="xconsole"/> | ||
1508 | <dep package="xcursorgen"/> | ||
1509 | <dep package="xdbedizzy"/> | ||
1510 | <dep package="xditview"/> | ||
1511 | <dep package="xdm"/> | ||
1512 | <dep package="xdpyinfo"/> | ||
1513 | <dep package="xdriinfo"/> | ||
1514 | <dep package="xedit"/> | ||
1515 | <dep package="xev"/> | ||
1516 | <dep package="xeyes"/> | ||
1517 | <dep package="xf86dga"/> | ||
1518 | <dep package="xfd"/> | ||
1519 | <dep package="xfindproxy"/> | ||
1520 | <dep package="xfontsel"/> | ||
1521 | <dep package="xfs"/> | ||
1522 | <dep package="xfsinfo"/> | ||
1523 | <dep package="xfwp"/> | ||
1524 | <dep package="xgamma"/> | ||
1525 | <dep package="xgc"/> | ||
1526 | <dep package="xhost"/> | ||
1527 | <dep package="xinit"/> | ||
1528 | <dep package="xkbcomp"/> | ||
1529 | <dep package="xkbevd"/> | ||
1530 | <dep package="xkbprint"/> | ||
1531 | <dep package="xkbutils"/> | ||
1532 | <dep package="xkill"/> | ||
1533 | <dep package="xload"/> | ||
1534 | <dep package="xlogo"/> | ||
1535 | <dep package="xfontsel"/> | ||
1536 | <dep package="xlsatoms"/> | ||
1537 | <dep package="xlsclients"/> | ||
1538 | <dep package="xlsfonts"/> | ||
1539 | <dep package="xmag"/> | ||
1540 | <dep package="xman"/> | ||
1541 | <dep package="xmessage"/> | ||
1542 | <dep package="xmh"/> | ||
1543 | <dep package="xmodmap"/> | ||
1544 | <dep package="xmore"/> | ||
1545 | |||
1546 | <!-- | ||
1547 | <dep package="xphelloworld"/> | ||
1548 | <dep package="xplsprinters"/> | ||
1549 | <dep package="xpr"/> | ||
1550 | <dep package="xprehashprinterlist"/> | ||
1551 | --> | ||
1552 | |||
1553 | <dep package="xprop"/> | ||
1554 | <dep package="xrandr"/> | ||
1555 | <dep package="xrdb"/> | ||
1556 | <dep package="xrefresh"/> | ||
1557 | <dep package="xrx"/> | ||
1558 | <dep package="xset"/> | ||
1559 | <dep package="xsetmode"/> | ||
1560 | <dep package="xsetpointer"/> | ||
1561 | <dep package="xsetroot"/> | ||
1562 | <dep package="xsm"/> | ||
1563 | <dep package="xstdcmap"/> | ||
1564 | <dep package="xtrap"/> | ||
1565 | <dep package="xvidtune"/> | ||
1566 | <dep package="xvinfo"/> | ||
1567 | <dep package="xwd"/> | ||
1568 | <dep package="xwininfo"/> | ||
1569 | <dep package="xwud"/> | ||
1570 | </dependencies> | ||
1571 | </metamodule> | ||
1572 | |||
1573 | <!-- input drivers --> | ||
1574 | |||
1575 | <autotools id="xf86-input-acecad"> | ||
1576 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-acecad" checkoutdir="xorg/driver/xf86-input-acecad" /> | ||
1577 | <dependencies> | ||
1578 | <dep package="xserver"/> | ||
1579 | </dependencies> | ||
1580 | </autotools> | ||
1581 | |||
1582 | <autotools id="xf86-input-aiptek"> | ||
1583 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-aiptek" checkoutdir="xorg/driver/xf86-input-aiptek" /> | ||
1584 | <dependencies> | ||
1585 | <dep package="xserver"/> | ||
1586 | </dependencies> | ||
1587 | </autotools> | ||
1588 | |||
1589 | <autotools id="xf86-input-calcomp"> | ||
1590 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-calcomp" checkoutdir="xorg/driver/xf86-input-calcomp" /> | ||
1591 | <dependencies> | ||
1592 | <dep package="xserver"/> | ||
1593 | </dependencies> | ||
1594 | </autotools> | ||
1595 | |||
1596 | <autotools id="xf86-input-citron"> | ||
1597 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-citron" checkoutdir="xorg/driver/xf86-input-citron" /> | ||
1598 | <dependencies> | ||
1599 | <dep package="xserver"/> | ||
1600 | </dependencies> | ||
1601 | </autotools> | ||
1602 | |||
1603 | <autotools id="xf86-input-digitaledge"> | ||
1604 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-digitaledge" checkoutdir="xorg/driver/xf86-input-digitaledge" /> | ||
1605 | <dependencies> | ||
1606 | <dep package="xserver"/> | ||
1607 | </dependencies> | ||
1608 | </autotools> | ||
1609 | |||
1610 | <autotools id="xf86-input-dmc"> | ||
1611 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-dmc" checkoutdir="xorg/driver/xf86-input-dmc" /> | ||
1612 | <dependencies> | ||
1613 | <dep package="xserver"/> | ||
1614 | </dependencies> | ||
1615 | </autotools> | ||
1616 | |||
1617 | <autotools id="xf86-input-dynapro"> | ||
1618 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-dynapro" checkoutdir="xorg/driver/xf86-input-dynapro" /> | ||
1619 | <dependencies> | ||
1620 | <dep package="xserver"/> | ||
1621 | </dependencies> | ||
1622 | </autotools> | ||
1623 | |||
1624 | <autotools id="xf86-input-elo2300"> | ||
1625 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-elo2300" checkoutdir="xorg/driver/xf86-input-elo2300" /> | ||
1626 | <dependencies> | ||
1627 | <dep package="xserver"/> | ||
1628 | </dependencies> | ||
1629 | </autotools> | ||
1630 | |||
1631 | <autotools id="xf86-input-elographics"> | ||
1632 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-elographics" checkoutdir="xorg/driver/xf86-input-elographics" /> | ||
1633 | <dependencies> | ||
1634 | <dep package="xserver"/> | ||
1635 | </dependencies> | ||
1636 | </autotools> | ||
1637 | |||
1638 | <autotools id="xf86-input-evdev"> | ||
1639 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-evdev" checkoutdir="xorg/driver/xf86-input-evdev" /> | ||
1640 | <dependencies> | ||
1641 | <dep package="xserver"/> | ||
1642 | </dependencies> | ||
1643 | </autotools> | ||
1644 | |||
1645 | <autotools id="xf86-input-fpit"> | ||
1646 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-fpit" checkoutdir="xorg/driver/xf86-input-fpit" /> | ||
1647 | <dependencies> | ||
1648 | <dep package="xserver"/> | ||
1649 | </dependencies> | ||
1650 | </autotools> | ||
1651 | |||
1652 | <autotools id="xf86-input-hyperpen"> | ||
1653 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-hyperpen" checkoutdir="xorg/driver/xf86-input-hyperpen" /> | ||
1654 | <dependencies> | ||
1655 | <dep package="xserver"/> | ||
1656 | </dependencies> | ||
1657 | </autotools> | ||
1658 | |||
1659 | <autotools id="xf86-input-jamstudio"> | ||
1660 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-jamstudio" checkoutdir="xorg/driver/xf86-input-jamstudio" /> | ||
1661 | <dependencies> | ||
1662 | <dep package="xserver"/> | ||
1663 | </dependencies> | ||
1664 | </autotools> | ||
1665 | |||
1666 | <autotools id="xf86-input-joystick"> | ||
1667 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-joystick" checkoutdir="xorg/driver/xf86-input-joystick" /> | ||
1668 | <dependencies> | ||
1669 | <dep package="xserver"/> | ||
1670 | </dependencies> | ||
1671 | </autotools> | ||
1672 | |||
1673 | <autotools id="xf86-input-keyboard"> | ||
1674 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-keyboard" checkoutdir="xorg/driver/xf86-input-keyboard" /> | ||
1675 | <dependencies> | ||
1676 | <dep package="xserver"/> | ||
1677 | </dependencies> | ||
1678 | </autotools> | ||
1679 | |||
1680 | <autotools id="xf86-input-magellan"> | ||
1681 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-magellan" checkoutdir="xorg/driver/xf86-input-magellan" /> | ||
1682 | <dependencies> | ||
1683 | <dep package="xserver"/> | ||
1684 | </dependencies> | ||
1685 | </autotools> | ||
1686 | |||
1687 | <autotools id="xf86-input-magictouch"> | ||
1688 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-magictouch" checkoutdir="xorg/driver/xf86-input-magictouch" /> | ||
1689 | <dependencies> | ||
1690 | <dep package="xserver"/> | ||
1691 | </dependencies> | ||
1692 | </autotools> | ||
1693 | |||
1694 | <autotools id="xf86-input-microtouch"> | ||
1695 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-microtouch" checkoutdir="xorg/driver/xf86-input-microtouch" /> | ||
1696 | <dependencies> | ||
1697 | <dep package="xserver"/> | ||
1698 | </dependencies> | ||
1699 | </autotools> | ||
1700 | |||
1701 | <autotools id="xf86-input-mouse"> | ||
1702 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-mouse" checkoutdir="xorg/driver/xf86-input-mouse" /> | ||
1703 | <dependencies> | ||
1704 | <dep package="xserver"/> | ||
1705 | </dependencies> | ||
1706 | </autotools> | ||
1707 | |||
1708 | <autotools id="xf86-input-mutouch"> | ||
1709 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-mutouch" checkoutdir="xorg/driver/xf86-input-mutouch" /> | ||
1710 | <dependencies> | ||
1711 | <dep package="xserver"/> | ||
1712 | </dependencies> | ||
1713 | </autotools> | ||
1714 | |||
1715 | <autotools id="xf86-input-palmax"> | ||
1716 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-palmax" checkoutdir="xorg/driver/xf86-input-palmax" /> | ||
1717 | <dependencies> | ||
1718 | <dep package="xserver"/> | ||
1719 | </dependencies> | ||
1720 | </autotools> | ||
1721 | |||
1722 | <autotools id="xf86-input-penmount"> | ||
1723 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-penmount" checkoutdir="xorg/driver/xf86-input-penmount" /> | ||
1724 | <dependencies> | ||
1725 | <dep package="xserver"/> | ||
1726 | </dependencies> | ||
1727 | </autotools> | ||
1728 | |||
1729 | <autotools id="xf86-input-spaceorb"> | ||
1730 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-spaceorb" checkoutdir="xorg/driver/xf86-input-spaceorb" /> | ||
1731 | <dependencies> | ||
1732 | <dep package="xserver"/> | ||
1733 | </dependencies> | ||
1734 | </autotools> | ||
1735 | |||
1736 | <autotools id="xf86-input-summa"> | ||
1737 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-summa" checkoutdir="xorg/driver/xf86-input-summa" /> | ||
1738 | <dependencies> | ||
1739 | <dep package="xserver"/> | ||
1740 | </dependencies> | ||
1741 | </autotools> | ||
1742 | |||
1743 | <autotools id="xf86-input-tek4957"> | ||
1744 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-tek4957" checkoutdir="xorg/driver/xf86-input-tek4957" /> | ||
1745 | <dependencies> | ||
1746 | <dep package="xserver"/> | ||
1747 | </dependencies> | ||
1748 | </autotools> | ||
1749 | |||
1750 | <autotools id="xf86-input-ur98"> | ||
1751 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-ur98" checkoutdir="xorg/driver/xf86-input-ur98" /> | ||
1752 | <dependencies> | ||
1753 | <dep package="xserver"/> | ||
1754 | </dependencies> | ||
1755 | </autotools> | ||
1756 | |||
1757 | <autotools id="xf86-input-vmmouse"> | ||
1758 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-vmmouse" checkoutdir="xorg/driver/xf86-input-vmmouse" /> | ||
1759 | <dependencies> | ||
1760 | <dep package="xserver"/> | ||
1761 | </dependencies> | ||
1762 | </autotools> | ||
1763 | |||
1764 | <autotools id="xf86-input-void"> | ||
1765 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-input-void" checkoutdir="xorg/driver/xf86-input-void" /> | ||
1766 | <dependencies> | ||
1767 | <dep package="xserver"/> | ||
1768 | </dependencies> | ||
1769 | </autotools> | ||
1770 | |||
1771 | <autotools id="xf86-video-apm"> | ||
1772 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-apm" checkoutdir="xorg/driver/xf86-video-apm" /> | ||
1773 | <dependencies> | ||
1774 | <dep package="xserver"/> | ||
1775 | </dependencies> | ||
1776 | </autotools> | ||
1777 | |||
1778 | <autotools id="xf86-video-ark"> | ||
1779 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-ark" checkoutdir="xorg/driver/xf86-video-ark" /> | ||
1780 | <dependencies> | ||
1781 | <dep package="xserver"/> | ||
1782 | </dependencies> | ||
1783 | </autotools> | ||
1784 | |||
1785 | <autotools id="xf86-video-ati"> | ||
1786 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-ati" checkoutdir="xorg/driver/xf86-video-ati" /> | ||
1787 | <dependencies> | ||
1788 | <dep package="xserver"/> | ||
1789 | </dependencies> | ||
1790 | </autotools> | ||
1791 | |||
1792 | <autotools id="xf86-video-chips"> | ||
1793 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-chips" checkoutdir="xorg/driver/xf86-video-chips" /> | ||
1794 | <dependencies> | ||
1795 | <dep package="xserver"/> | ||
1796 | </dependencies> | ||
1797 | </autotools> | ||
1798 | |||
1799 | <autotools id="xf86-video-cirrus"> | ||
1800 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-cirrus" checkoutdir="xorg/driver/xf86-video-cirrus" /> | ||
1801 | <dependencies> | ||
1802 | <dep package="xserver"/> | ||
1803 | </dependencies> | ||
1804 | </autotools> | ||
1805 | |||
1806 | <autotools id="xf86-video-cyrix"> | ||
1807 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-cyrix" checkoutdir="xorg/driver/xf86-video-cyrix" /> | ||
1808 | <dependencies> | ||
1809 | <dep package="xserver"/> | ||
1810 | </dependencies> | ||
1811 | </autotools> | ||
1812 | |||
1813 | <autotools id="xf86-video-dummy"> | ||
1814 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-dummy" checkoutdir="xorg/driver/xf86-video-dummy" /> | ||
1815 | <dependencies> | ||
1816 | <dep package="xserver"/> | ||
1817 | </dependencies> | ||
1818 | </autotools> | ||
1819 | |||
1820 | <autotools id="xf86-video-fbdev"> | ||
1821 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-fbdev" checkoutdir="xorg/driver/xf86-video-fbdev" /> | ||
1822 | <dependencies> | ||
1823 | <dep package="xserver"/> | ||
1824 | </dependencies> | ||
1825 | </autotools> | ||
1826 | |||
1827 | <autotools id="xf86-video-glint"> | ||
1828 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-glint" checkoutdir="xorg/driver/xf86-video-glint" /> | ||
1829 | <dependencies> | ||
1830 | <dep package="xserver"/> | ||
1831 | </dependencies> | ||
1832 | </autotools> | ||
1833 | |||
1834 | <autotools id="xf86-video-i128"> | ||
1835 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-i128" checkoutdir="xorg/driver/xf86-video-i128" /> | ||
1836 | <dependencies> | ||
1837 | <dep package="xserver"/> | ||
1838 | </dependencies> | ||
1839 | </autotools> | ||
1840 | |||
1841 | <autotools id="xf86-video-i740"> | ||
1842 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-i740" checkoutdir="xorg/driver/xf86-video-i740" /> | ||
1843 | <dependencies> | ||
1844 | <dep package="xserver"/> | ||
1845 | </dependencies> | ||
1846 | </autotools> | ||
1847 | |||
1848 | <autotools id="xf86-video-imstt"> | ||
1849 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-imstt" checkoutdir="xorg/driver/xf86-video-imstt" /> | ||
1850 | <dependencies> | ||
1851 | <dep package="xserver"/> | ||
1852 | </dependencies> | ||
1853 | </autotools> | ||
1854 | |||
1855 | <autotools id="xf86-video-intel"> | ||
1856 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-intel" checkoutdir="xorg/driver/xf86-video-intel" /> | ||
1857 | <dependencies> | ||
1858 | <dep package="xserver"/> | ||
1859 | <dep package="x11proto"/> | ||
1860 | <dep package="libXvMC"/> | ||
1861 | </dependencies> | ||
1862 | </autotools> | ||
1863 | |||
1864 | <autotools id="xf86-video-mga"> | ||
1865 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-mga" checkoutdir="xorg/driver/xf86-video-mga" /> | ||
1866 | <dependencies> | ||
1867 | <dep package="xserver"/> | ||
1868 | </dependencies> | ||
1869 | </autotools> | ||
1870 | |||
1871 | <autotools id="xf86-video-neomagic"> | ||
1872 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-neomagic" checkoutdir="xorg/driver/xf86-video-neomagic" /> | ||
1873 | <dependencies> | ||
1874 | <dep package="xserver"/> | ||
1875 | </dependencies> | ||
1876 | </autotools> | ||
1877 | |||
1878 | <autotools id="xf86-video-newport"> | ||
1879 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-newport" checkoutdir="xorg/driver/xf86-video-newport" /> | ||
1880 | <dependencies> | ||
1881 | <dep package="xserver"/> | ||
1882 | </dependencies> | ||
1883 | </autotools> | ||
1884 | |||
1885 | <autotools id="xf86-video-nsc"> | ||
1886 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-nsc" checkoutdir="xorg/driver/xf86-video-nsc" /> | ||
1887 | <dependencies> | ||
1888 | <dep package="xserver"/> | ||
1889 | </dependencies> | ||
1890 | </autotools> | ||
1891 | |||
1892 | <autotools id="xf86-video-nv"> | ||
1893 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-nv" checkoutdir="xorg/driver/xf86-video-nv" /> | ||
1894 | <dependencies> | ||
1895 | <dep package="xserver"/> | ||
1896 | </dependencies> | ||
1897 | </autotools> | ||
1898 | |||
1899 | <autotools id="xf86-video-rendition"> | ||
1900 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-rendition" checkoutdir="xorg/driver/xf86-video-rendition" /> | ||
1901 | <dependencies> | ||
1902 | <dep package="xserver"/> | ||
1903 | </dependencies> | ||
1904 | </autotools> | ||
1905 | |||
1906 | <autotools id="xf86-video-s3"> | ||
1907 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-s3" checkoutdir="xorg/driver/xf86-video-s3" /> | ||
1908 | <dependencies> | ||
1909 | <dep package="xserver"/> | ||
1910 | </dependencies> | ||
1911 | </autotools> | ||
1912 | |||
1913 | <autotools id="xf86-video-s3virge"> | ||
1914 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-s3virge" checkoutdir="xorg/driver/xf86-video-s3virge" /> | ||
1915 | <dependencies> | ||
1916 | <dep package="xserver"/> | ||
1917 | </dependencies> | ||
1918 | </autotools> | ||
1919 | |||
1920 | <autotools id="xf86-video-savage"> | ||
1921 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-savage" checkoutdir="xorg/driver/xf86-video-savage" /> | ||
1922 | <dependencies> | ||
1923 | <dep package="xserver"/> | ||
1924 | </dependencies> | ||
1925 | </autotools> | ||
1926 | |||
1927 | <autotools id="xf86-video-siliconmotion"> | ||
1928 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-siliconmotion" checkoutdir="xorg/driver/xf86-video-siliconmotion" /> | ||
1929 | <dependencies> | ||
1930 | <dep package="xserver"/> | ||
1931 | </dependencies> | ||
1932 | </autotools> | ||
1933 | |||
1934 | <autotools id="xf86-video-sis"> | ||
1935 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-sis" checkoutdir="xorg/driver/xf86-video-sis" /> | ||
1936 | <dependencies> | ||
1937 | <dep package="xserver"/> | ||
1938 | </dependencies> | ||
1939 | </autotools> | ||
1940 | |||
1941 | <autotools id="xf86-video-sisusb"> | ||
1942 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-sisusb" checkoutdir="xorg/driver/xf86-video-sisusb" /> | ||
1943 | <dependencies> | ||
1944 | <dep package="xserver"/> | ||
1945 | </dependencies> | ||
1946 | </autotools> | ||
1947 | |||
1948 | <autotools id="xf86-video-sunbw2"> | ||
1949 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-sunbw2" checkoutdir="xorg/driver/xf86-video-sunbw2" /> | ||
1950 | <dependencies> | ||
1951 | <dep package="xserver"/> | ||
1952 | </dependencies> | ||
1953 | </autotools> | ||
1954 | |||
1955 | <autotools id="xf86-video-suncg14"> | ||
1956 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-suncg14" checkoutdir="xorg/driver/xf86-video-suncg14" /> | ||
1957 | <dependencies> | ||
1958 | <dep package="xserver"/> | ||
1959 | </dependencies> | ||
1960 | </autotools> | ||
1961 | |||
1962 | <autotools id="xf86-video-suncg3"> | ||
1963 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-suncg3" checkoutdir="xorg/driver/xf86-video-suncg3" /> | ||
1964 | <dependencies> | ||
1965 | <dep package="xserver"/> | ||
1966 | </dependencies> | ||
1967 | </autotools> | ||
1968 | |||
1969 | <autotools id="xf86-video-suncg6"> | ||
1970 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-suncg6" checkoutdir="xorg/driver/xf86-video-suncg6" /> | ||
1971 | <dependencies> | ||
1972 | <dep package="xserver"/> | ||
1973 | </dependencies> | ||
1974 | </autotools> | ||
1975 | |||
1976 | <autotools id="xf86-video-sunffb"> | ||
1977 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-sunffb" checkoutdir="xorg/driver/xf86-video-sunffb" /> | ||
1978 | <dependencies> | ||
1979 | <dep package="xserver"/> | ||
1980 | </dependencies> | ||
1981 | </autotools> | ||
1982 | |||
1983 | <autotools id="xf86-video-sunleo"> | ||
1984 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-sunleo" checkoutdir="xorg/driver/xf86-video-sunleo" /> | ||
1985 | <dependencies> | ||
1986 | <dep package="xserver"/> | ||
1987 | </dependencies> | ||
1988 | </autotools> | ||
1989 | |||
1990 | <autotools id="xf86-video-suntcx"> | ||
1991 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-suntcx" checkoutdir="xorg/driver/xf86-video-suntcx" /> | ||
1992 | <dependencies> | ||
1993 | <dep package="xserver"/> | ||
1994 | </dependencies> | ||
1995 | </autotools> | ||
1996 | |||
1997 | <autotools id="xf86-video-tdfx"> | ||
1998 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-tdfx" checkoutdir="xorg/driver/xf86-video-tdfx" /> | ||
1999 | <dependencies> | ||
2000 | <dep package="xserver"/> | ||
2001 | </dependencies> | ||
2002 | </autotools> | ||
2003 | |||
2004 | <autotools id="xf86-video-tga"> | ||
2005 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-tga" checkoutdir="xorg/driver/xf86-video-tga" /> | ||
2006 | <dependencies> | ||
2007 | <dep package="xserver"/> | ||
2008 | </dependencies> | ||
2009 | </autotools> | ||
2010 | |||
2011 | <autotools id="xf86-video-trident"> | ||
2012 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-trident" checkoutdir="xorg/driver/xf86-video-trident" /> | ||
2013 | <dependencies> | ||
2014 | <dep package="xserver"/> | ||
2015 | </dependencies> | ||
2016 | </autotools> | ||
2017 | |||
2018 | <autotools id="xf86-video-tseng"> | ||
2019 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-tseng" checkoutdir="xorg/driver/xf86-video-tseng" /> | ||
2020 | <dependencies> | ||
2021 | <dep package="xserver"/> | ||
2022 | </dependencies> | ||
2023 | </autotools> | ||
2024 | |||
2025 | <autotools id="xf86-video-v4l"> | ||
2026 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-v4l" checkoutdir="xorg/driver/xf86-video-v4l" /> | ||
2027 | <dependencies> | ||
2028 | <dep package="xserver"/> | ||
2029 | </dependencies> | ||
2030 | </autotools> | ||
2031 | |||
2032 | <autotools id="xf86-video-vesa"> | ||
2033 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-vesa" checkoutdir="xorg/driver/xf86-video-vesa" /> | ||
2034 | <dependencies> | ||
2035 | <dep package="xserver"/> | ||
2036 | </dependencies> | ||
2037 | </autotools> | ||
2038 | |||
2039 | <autotools id="xf86-video-vga"> | ||
2040 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-vga" checkoutdir="xorg/driver/xf86-video-vga" /> | ||
2041 | <dependencies> | ||
2042 | <dep package="xserver"/> | ||
2043 | </dependencies> | ||
2044 | </autotools> | ||
2045 | |||
2046 | <autotools id="xf86-video-via"> | ||
2047 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-via" checkoutdir="xorg/driver/xf86-video-via" /> | ||
2048 | <dependencies> | ||
2049 | <dep package="xserver"/> | ||
2050 | </dependencies> | ||
2051 | </autotools> | ||
2052 | |||
2053 | <autotools id="xf86-video-vmware"> | ||
2054 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-vmware" checkoutdir="xorg/driver/xf86-video-vmware" /> | ||
2055 | <dependencies> | ||
2056 | <dep package="xserver"/> | ||
2057 | </dependencies> | ||
2058 | </autotools> | ||
2059 | |||
2060 | <autotools id="xf86-video-voodoo"> | ||
2061 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-voodoo" checkoutdir="xorg/driver/xf86-video-voodoo" /> | ||
2062 | <dependencies> | ||
2063 | <dep package="xserver"/> | ||
2064 | </dependencies> | ||
2065 | </autotools> | ||
2066 | |||
2067 | <autotools id="xf86-video-wsfb"> | ||
2068 | <branch repo="git.freedesktop.org" module="xorg/driver/xf86-video-wsfb" checkoutdir="xorg/driver/xf86-video-wsfb" /> | ||
2069 | <dependencies> | ||
2070 | <dep package="xserver"/> | ||
2071 | </dependencies> | ||
2072 | </autotools> | ||
2073 | |||
2074 | <metamodule id="xorg-drivers"> | ||
2075 | <dependencies> | ||
2076 | <dep package="xf86-input-acecad"/> | ||
2077 | <dep package="xf86-input-aiptek"/> | ||
2078 | <dep package="xf86-input-calcomp"/> | ||
2079 | <dep package="xf86-input-citron"/> | ||
2080 | <dep package="xf86-input-digitaledge"/> | ||
2081 | <dep package="xf86-input-dmc"/> | ||
2082 | <dep package="xf86-input-dynapro"/> | ||
2083 | <dep package="xf86-input-elo2300"/> | ||
2084 | <dep package="xf86-input-elographics"/> | ||
2085 | <dep package="xf86-input-evdev"/> | ||
2086 | <dep package="xf86-input-fpit"/> | ||
2087 | <dep package="xf86-input-hyperpen"/> | ||
2088 | <dep package="xf86-input-jamstudio"/> | ||
2089 | <dep package="xf86-input-joystick"/> | ||
2090 | <dep package="xf86-input-keyboard"/> | ||
2091 | <dep package="xf86-input-magellan"/> | ||
2092 | <dep package="xf86-input-magictouch"/> | ||
2093 | <dep package="xf86-input-microtouch"/> | ||
2094 | <dep package="xf86-input-mouse"/> | ||
2095 | <dep package="xf86-input-mutouch"/> | ||
2096 | <dep package="xf86-input-palmax"/> | ||
2097 | <dep package="xf86-input-penmount"/> | ||
2098 | <dep package="xf86-input-spaceorb"/> | ||
2099 | <dep package="xf86-input-tek4957"/> | ||
2100 | <dep package="xf86-input-ur98"/> | ||
2101 | <dep package="xf86-input-void"/> | ||
2102 | <dep package="xf86-video-apm"/> | ||
2103 | <dep package="xf86-video-ark"/> | ||
2104 | <dep package="xf86-video-ati"/> | ||
2105 | <dep package="xf86-video-chips"/> | ||
2106 | <dep package="xf86-video-cirrus"/> | ||
2107 | <dep package="xf86-video-cyrix"/> | ||
2108 | <dep package="xf86-video-dummy"/> | ||
2109 | <dep package="xf86-video-fbdev"/> | ||
2110 | <dep package="xf86-video-glint"/> | ||
2111 | <dep package="xf86-video-i128"/> | ||
2112 | <dep package="xf86-video-i740"/> | ||
2113 | <dep package="xf86-video-intel"/> | ||
2114 | <dep package="xf86-video-imstt"/> | ||
2115 | <dep package="xf86-video-mga"/> | ||
2116 | <dep package="xf86-video-neomagic"/> | ||
2117 | <dep package="xf86-video-newport"/> | ||
2118 | <dep package="xf86-video-nsc"/> | ||
2119 | <dep package="xf86-video-nv"/> | ||
2120 | <dep package="xf86-video-rendition"/> | ||
2121 | <dep package="xf86-video-s3"/> | ||
2122 | <dep package="xf86-video-s3virge"/> | ||
2123 | <dep package="xf86-video-savage"/> | ||
2124 | <dep package="xf86-video-siliconmotion"/> | ||
2125 | <dep package="xf86-video-sis"/> | ||
2126 | <dep package="xf86-video-sisusb"/> | ||
2127 | <dep package="xf86-video-sunbw2"/> | ||
2128 | <dep package="xf86-video-suncg14"/> | ||
2129 | <dep package="xf86-video-suncg3"/> | ||
2130 | <dep package="xf86-video-suncg6"/> | ||
2131 | <dep package="xf86-video-sunffb"/> | ||
2132 | <dep package="xf86-video-sunleo"/> | ||
2133 | <dep package="xf86-video-suntcx"/> | ||
2134 | <dep package="xf86-video-tdfx"/> | ||
2135 | <dep package="xf86-video-tga"/> | ||
2136 | <dep package="xf86-video-trident"/> | ||
2137 | <dep package="xf86-video-tseng"/> | ||
2138 | <dep package="xf86-video-v4l"/> | ||
2139 | <dep package="xf86-video-vesa"/> | ||
2140 | <dep package="xf86-video-vga"/> | ||
2141 | <dep package="xf86-video-via"/> | ||
2142 | <dep package="xf86-video-vmware"/> | ||
2143 | <dep package="xf86-video-voodoo"/> | ||
2144 | <dep package="xf86-video-wsfb"/> | ||
2145 | </dependencies> | ||
2146 | </metamodule> | ||
2147 | |||
2148 | <!-- Modules that only build on x86 (32 and 64bit) --> | ||
2149 | |||
2150 | <metamodule id="xorg-x86-drivers"> | ||
2151 | <dependencies> | ||
2152 | <dep package="xf86-input-vmmouse"/> | ||
2153 | </dependencies> | ||
2154 | </metamodule> | ||
2155 | |||
2156 | <!-- This probably isn't sufficient, but it is a start --> | ||
2157 | |||
2158 | <metamodule id="xorg-sun-drivers"> | ||
2159 | <dependencies> | ||
2160 | <dep package="xf86-video-sunbw2"/> | ||
2161 | <dep package="xf86-video-suncg14"/> | ||
2162 | <dep package="xf86-video-suncg3"/> | ||
2163 | <dep package="xf86-video-suncg6"/> | ||
2164 | <dep package="xf86-video-sunffb"/> | ||
2165 | <dep package="xf86-video-sunleo"/> | ||
2166 | <dep package="xf86-video-suntcx"/> | ||
2167 | </dependencies> | ||
2168 | </metamodule> | ||
2169 | |||
2170 | |||
2171 | <!-- Bogosity of depending on libraries caused by Xnest. Sigh --> | ||
2172 | <autotools id="xserver"> | ||
2173 | <branch repo="git.freedesktop.org" module="xorg/xserver"/> | ||
2174 | <dependencies> | ||
2175 | <dep package="xorg-protos"/> | ||
2176 | <dep package="libXaw"/> | ||
2177 | <dep package="libxkbui"/> | ||
2178 | <dep package="libXfont"/> | ||
2179 | <dep package="libxtrans"/> | ||
2180 | <dep package="libXau"/> | ||
2181 | <dep package="libxkbfile"/> | ||
2182 | <dep package="libXdmcp"/> | ||
2183 | <dep package="libXxf86misc"/> | ||
2184 | <dep package="libXxf86vm"/> | ||
2185 | <dep package="liblbxutil"/> | ||
2186 | <dep package="libdrm"/> | ||
2187 | </dependencies> | ||
2188 | </autotools> | ||
2189 | |||
2190 | <metamodule id="xorg"> | ||
2191 | <dependencies> | ||
2192 | <dep package="xorg-protos"/> | ||
2193 | <dep package="xorg-libs"/> | ||
2194 | <dep package="xorg-fonts"/> | ||
2195 | <dep package="xorg-apps"/> | ||
2196 | <dep package="xorg-drivers"/> | ||
2197 | <dep package="xserver"/> | ||
2198 | </dependencies> | ||
2199 | </metamodule> | ||
2200 | |||
2201 | </moduleset> | ||
diff --git a/scripts/lib/bsp/__init__.py b/scripts/lib/bsp/__init__.py new file mode 100644 index 0000000000..8bbb6e1530 --- /dev/null +++ b/scripts/lib/bsp/__init__.py | |||
@@ -0,0 +1,22 @@ | |||
1 | # | ||
2 | # Yocto BSP tools library | ||
3 | # | ||
4 | # Copyright (c) 2012, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # AUTHORS | ||
21 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
22 | # | ||
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py new file mode 100644 index 0000000000..7d6be239da --- /dev/null +++ b/scripts/lib/bsp/engine.py | |||
@@ -0,0 +1,1947 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2012, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module implements the templating engine used by 'yocto-bsp' to | ||
22 | # create BSPs. The BSP templates are simply the set of files expected | ||
23 | # to appear in a generated BSP, marked up with a small set of tags | ||
24 | # used to customize the output. The engine parses through the | ||
25 | # templates and generates a Python program containing all the logic | ||
26 | # and input elements needed to display and retrieve BSP-specific | ||
27 | # information from the user. The resulting program uses those results | ||
28 | # to generate the final BSP files. | ||
29 | # | ||
30 | # AUTHORS | ||
31 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
32 | # | ||
33 | |||
34 | import os | ||
35 | import sys | ||
36 | from abc import ABCMeta, abstractmethod | ||
37 | from tags import * | ||
38 | import shlex | ||
39 | import json | ||
40 | import subprocess | ||
41 | import shutil | ||
42 | |||
43 | class Line(): | ||
44 | """ | ||
45 | Generic (abstract) container representing a line that will appear | ||
46 | in the BSP-generating program. | ||
47 | """ | ||
48 | __metaclass__ = ABCMeta | ||
49 | |||
50 | def __init__(self, line): | ||
51 | self.line = line | ||
52 | self.generated_line = "" | ||
53 | self.prio = sys.maxint | ||
54 | self.discard = False | ||
55 | |||
56 | @abstractmethod | ||
57 | def gen(self, context = None): | ||
58 | """ | ||
59 | Generate the final executable line that will appear in the | ||
60 | BSP-generation program. | ||
61 | """ | ||
62 | pass | ||
63 | |||
64 | def escape(self, line): | ||
65 | """ | ||
66 | Escape single and double quotes and backslashes until I find | ||
67 | something better (re.escape() escapes way too much). | ||
68 | """ | ||
69 | return line.replace("\\", "\\\\").replace("\"", "\\\"").replace("'", "\\'") | ||
70 | |||
71 | def parse_error(self, msg, lineno, line): | ||
72 | raise SyntaxError("%s: %s" % (msg, line)) | ||
73 | |||
74 | |||
75 | class NormalLine(Line): | ||
76 | """ | ||
77 | Container for normal (non-tag) lines. | ||
78 | """ | ||
79 | def __init__(self, line): | ||
80 | Line.__init__(self, line) | ||
81 | self.is_filename = False | ||
82 | self.is_dirname = False | ||
83 | self.out_filebase = None | ||
84 | |||
85 | def gen(self, context = None): | ||
86 | if self.is_filename: | ||
87 | line = "current_file = \"" + os.path.join(self.out_filebase, self.escape(self.line)) + "\"; of = open(current_file, \"w\")" | ||
88 | elif self.is_dirname: | ||
89 | dirname = os.path.join(self.out_filebase, self.escape(self.line)) | ||
90 | line = "if not os.path.exists(\"" + dirname + "\"): os.mkdir(\"" + dirname + "\")" | ||
91 | else: | ||
92 | line = "of.write(\"" + self.escape(self.line) + "\\n\")" | ||
93 | return line | ||
94 | |||
95 | |||
96 | class CodeLine(Line): | ||
97 | """ | ||
98 | Container for Python code tag lines. | ||
99 | """ | ||
100 | def __init__(self, line): | ||
101 | Line.__init__(self, line) | ||
102 | |||
103 | def gen(self, context = None): | ||
104 | return self.line | ||
105 | |||
106 | |||
107 | class Assignment: | ||
108 | """ | ||
109 | Representation of everything we know about {{=name }} tags. | ||
110 | Instances of these are used by Assignment lines. | ||
111 | """ | ||
112 | def __init__(self, start, end, name): | ||
113 | self.start = start | ||
114 | self.end = end | ||
115 | self.name = name | ||
116 | |||
117 | |||
118 | class AssignmentLine(NormalLine): | ||
119 | """ | ||
120 | Container for normal lines containing assignment tags. Assignment | ||
121 | tags must be in ascending order of 'start' value. | ||
122 | """ | ||
123 | def __init__(self, line): | ||
124 | NormalLine.__init__(self, line) | ||
125 | self.assignments = [] | ||
126 | |||
127 | def add_assignment(self, start, end, name): | ||
128 | self.assignments.append(Assignment(start, end, name)) | ||
129 | |||
130 | def gen(self, context = None): | ||
131 | line = self.escape(self.line) | ||
132 | |||
133 | for assignment in self.assignments: | ||
134 | replacement = "\" + " + assignment.name + " + \"" | ||
135 | idx = line.find(ASSIGN_TAG) | ||
136 | line = line[:idx] + replacement + line[idx + assignment.end - assignment.start:] | ||
137 | if self.is_filename: | ||
138 | return "current_file = \"" + os.path.join(self.out_filebase, line) + "\"; of = open(current_file, \"w\")" | ||
139 | elif self.is_dirname: | ||
140 | dirname = os.path.join(self.out_filebase, line) | ||
141 | return "if not os.path.exists(\"" + dirname + "\"): os.mkdir(\"" + dirname + "\")" | ||
142 | else: | ||
143 | return "of.write(\"" + line + "\\n\")" | ||
144 | |||
145 | |||
146 | class InputLine(Line): | ||
147 | """ | ||
148 | Base class for Input lines. | ||
149 | """ | ||
150 | def __init__(self, props, tag, lineno): | ||
151 | Line.__init__(self, tag) | ||
152 | self.props = props | ||
153 | self.lineno = lineno | ||
154 | |||
155 | try: | ||
156 | self.prio = int(props["prio"]) | ||
157 | except KeyError: | ||
158 | self.prio = sys.maxint | ||
159 | |||
160 | def gen(self, context = None): | ||
161 | try: | ||
162 | depends_on = self.props["depends-on"] | ||
163 | try: | ||
164 | depends_on_val = self.props["depends-on-val"] | ||
165 | except KeyError: | ||
166 | self.parse_error("No 'depends-on-val' for 'depends-on' property", | ||
167 | self.lineno, self.line) | ||
168 | except KeyError: | ||
169 | pass | ||
170 | |||
171 | |||
172 | class EditBoxInputLine(InputLine): | ||
173 | """ | ||
174 | Base class for 'editbox' Input lines. | ||
175 | |||
176 | props: | ||
177 | name: example - "Load address" | ||
178 | msg: example - "Please enter the load address" | ||
179 | result: | ||
180 | Sets the value of the variable specified by 'name' to | ||
181 | whatever the user typed. | ||
182 | """ | ||
183 | def __init__(self, props, tag, lineno): | ||
184 | InputLine.__init__(self, props, tag, lineno) | ||
185 | |||
186 | def gen(self, context = None): | ||
187 | InputLine.gen(self, context) | ||
188 | name = self.props["name"] | ||
189 | if not name: | ||
190 | self.parse_error("No input 'name' property found", | ||
191 | self.lineno, self.line) | ||
192 | msg = self.props["msg"] | ||
193 | if not msg: | ||
194 | self.parse_error("No input 'msg' property found", | ||
195 | self.lineno, self.line) | ||
196 | |||
197 | try: | ||
198 | default_choice = self.props["default"] | ||
199 | except KeyError: | ||
200 | default_choice = "" | ||
201 | |||
202 | msg += " [default: " + default_choice + "]" | ||
203 | |||
204 | line = name + " = default(raw_input(\"" + msg + " \"), " + name + ")" | ||
205 | |||
206 | return line | ||
207 | |||
208 | |||
209 | class GitRepoEditBoxInputLine(EditBoxInputLine): | ||
210 | """ | ||
211 | Base class for 'editbox' Input lines for user input of remote git | ||
212 | repos. This class verifies the existence and connectivity of the | ||
213 | specified git repo. | ||
214 | |||
215 | props: | ||
216 | name: example - "Load address" | ||
217 | msg: example - "Please enter the load address" | ||
218 | result: | ||
219 | Sets the value of the variable specified by 'name' to | ||
220 | whatever the user typed. | ||
221 | """ | ||
222 | def __init__(self, props, tag, lineno): | ||
223 | EditBoxInputLine.__init__(self, props, tag, lineno) | ||
224 | |||
225 | def gen(self, context = None): | ||
226 | EditBoxInputLine.gen(self, context) | ||
227 | name = self.props["name"] | ||
228 | if not name: | ||
229 | self.parse_error("No input 'name' property found", | ||
230 | self.lineno, self.line) | ||
231 | msg = self.props["msg"] | ||
232 | if not msg: | ||
233 | self.parse_error("No input 'msg' property found", | ||
234 | self.lineno, self.line) | ||
235 | |||
236 | try: | ||
237 | default_choice = self.props["default"] | ||
238 | except KeyError: | ||
239 | default_choice = "" | ||
240 | |||
241 | msg += " [default: " + default_choice + "]" | ||
242 | |||
243 | line = name + " = get_verified_git_repo(\"" + msg + "\"," + name + ")" | ||
244 | |||
245 | return line | ||
246 | |||
247 | |||
248 | class FileEditBoxInputLine(EditBoxInputLine): | ||
249 | """ | ||
250 | Base class for 'editbox' Input lines for user input of existing | ||
251 | files. This class verifies the existence of the specified file. | ||
252 | |||
253 | props: | ||
254 | name: example - "Load address" | ||
255 | msg: example - "Please enter the load address" | ||
256 | result: | ||
257 | Sets the value of the variable specified by 'name' to | ||
258 | whatever the user typed. | ||
259 | """ | ||
260 | def __init__(self, props, tag, lineno): | ||
261 | EditBoxInputLine.__init__(self, props, tag, lineno) | ||
262 | |||
263 | def gen(self, context = None): | ||
264 | EditBoxInputLine.gen(self, context) | ||
265 | name = self.props["name"] | ||
266 | if not name: | ||
267 | self.parse_error("No input 'name' property found", | ||
268 | self.lineno, self.line) | ||
269 | msg = self.props["msg"] | ||
270 | if not msg: | ||
271 | self.parse_error("No input 'msg' property found", | ||
272 | self.lineno, self.line) | ||
273 | |||
274 | try: | ||
275 | default_choice = self.props["default"] | ||
276 | except KeyError: | ||
277 | default_choice = "" | ||
278 | |||
279 | msg += " [default: " + default_choice + "]" | ||
280 | |||
281 | line = name + " = get_verified_file(\"" + msg + "\"," + name + ", True)" | ||
282 | |||
283 | return line | ||
284 | |||
285 | |||
286 | class BooleanInputLine(InputLine): | ||
287 | """ | ||
288 | Base class for boolean Input lines. | ||
289 | props: | ||
290 | name: example - "keyboard" | ||
291 | msg: example - "Got keyboard?" | ||
292 | result: | ||
293 | Sets the value of the variable specified by 'name' to "yes" or "no" | ||
294 | example - keyboard = "yes" | ||
295 | """ | ||
296 | def __init__(self, props, tag, lineno): | ||
297 | InputLine.__init__(self, props, tag, lineno) | ||
298 | |||
299 | def gen(self, context = None): | ||
300 | InputLine.gen(self, context) | ||
301 | name = self.props["name"] | ||
302 | if not name: | ||
303 | self.parse_error("No input 'name' property found", | ||
304 | self.lineno, self.line) | ||
305 | msg = self.props["msg"] | ||
306 | if not msg: | ||
307 | self.parse_error("No input 'msg' property found", | ||
308 | self.lineno, self.line) | ||
309 | |||
310 | try: | ||
311 | default_choice = self.props["default"] | ||
312 | except KeyError: | ||
313 | default_choice = "" | ||
314 | |||
315 | msg += " [default: " + default_choice + "]" | ||
316 | |||
317 | line = name + " = boolean(raw_input(\"" + msg + " \"), " + name + ")" | ||
318 | |||
319 | return line | ||
320 | |||
321 | |||
322 | class ListInputLine(InputLine): | ||
323 | """ | ||
324 | Base class for List-based Input lines. e.g. Choicelist, Checklist. | ||
325 | """ | ||
326 | __metaclass__ = ABCMeta | ||
327 | |||
328 | def __init__(self, props, tag, lineno): | ||
329 | InputLine.__init__(self, props, tag, lineno) | ||
330 | self.choices = [] | ||
331 | |||
332 | def gen_choicepair_list(self): | ||
333 | """Generate a list of 2-item val:desc lists from self.choices.""" | ||
334 | if not self.choices: | ||
335 | return None | ||
336 | |||
337 | choicepair_list = list() | ||
338 | |||
339 | for choice in self.choices: | ||
340 | choicepair = [] | ||
341 | choicepair.append(choice.val) | ||
342 | choicepair.append(choice.desc) | ||
343 | choicepair_list.append(choicepair) | ||
344 | |||
345 | return choicepair_list | ||
346 | |||
347 | def gen_degenerate_choicepair_list(self, choices): | ||
348 | """Generate a list of 2-item val:desc with val=desc from passed-in choices.""" | ||
349 | choicepair_list = list() | ||
350 | |||
351 | for choice in choices: | ||
352 | choicepair = [] | ||
353 | choicepair.append(choice) | ||
354 | choicepair.append(choice) | ||
355 | choicepair_list.append(choicepair) | ||
356 | |||
357 | return choicepair_list | ||
358 | |||
359 | def exec_listgen_fn(self, context = None): | ||
360 | """ | ||
361 | Execute the list-generating function contained as a string in | ||
362 | the "gen" property. | ||
363 | """ | ||
364 | retval = None | ||
365 | try: | ||
366 | fname = self.props["gen"] | ||
367 | modsplit = fname.split('.') | ||
368 | mod_fn = modsplit.pop() | ||
369 | mod = '.'.join(modsplit) | ||
370 | |||
371 | __import__(mod) | ||
372 | # python 2.7 has a better way to do this using importlib.import_module | ||
373 | m = sys.modules[mod] | ||
374 | |||
375 | fn = getattr(m, mod_fn) | ||
376 | if not fn: | ||
377 | self.parse_error("couldn't load function specified for 'gen' property ", | ||
378 | self.lineno, self.line) | ||
379 | retval = fn(context) | ||
380 | if not retval: | ||
381 | self.parse_error("function specified for 'gen' property returned nothing ", | ||
382 | self.lineno, self.line) | ||
383 | except KeyError: | ||
384 | pass | ||
385 | |||
386 | return retval | ||
387 | |||
388 | def gen_choices_str(self, choicepairs): | ||
389 | """ | ||
390 | Generate a numbered list of choices from a list of choicepairs | ||
391 | for display to the user. | ||
392 | """ | ||
393 | choices_str = "" | ||
394 | |||
395 | for i, choicepair in enumerate(choicepairs): | ||
396 | choices_str += "\t" + str(i + 1) + ") " + choicepair[1] + "\n" | ||
397 | |||
398 | return choices_str | ||
399 | |||
400 | def gen_choices_val_str(self, choicepairs): | ||
401 | """ | ||
402 | Generate an array of choice values corresponding to the | ||
403 | numbered list generated by gen_choices_str(). | ||
404 | """ | ||
405 | choices_val_list = "[" | ||
406 | |||
407 | for i, choicepair in enumerate(choicepairs): | ||
408 | choices_val_list += "\"" + choicepair[0] + "\"," | ||
409 | choices_val_list += "]" | ||
410 | |||
411 | return choices_val_list | ||
412 | |||
413 | def gen_choices_val_list(self, choicepairs): | ||
414 | """ | ||
415 | Generate an array of choice values corresponding to the | ||
416 | numbered list generated by gen_choices_str(). | ||
417 | """ | ||
418 | choices_val_list = [] | ||
419 | |||
420 | for i, choicepair in enumerate(choicepairs): | ||
421 | choices_val_list.append(choicepair[0]) | ||
422 | |||
423 | return choices_val_list | ||
424 | |||
425 | def gen_choices_list(self, context = None, checklist = False): | ||
426 | """ | ||
427 | Generate an array of choice values corresponding to the | ||
428 | numbered list generated by gen_choices_str(). | ||
429 | """ | ||
430 | choices = self.exec_listgen_fn(context) | ||
431 | if choices: | ||
432 | if len(choices) == 0: | ||
433 | self.parse_error("No entries available for input list", | ||
434 | self.lineno, self.line) | ||
435 | choicepairs = self.gen_degenerate_choicepair_list(choices) | ||
436 | else: | ||
437 | if len(self.choices) == 0: | ||
438 | self.parse_error("No entries available for input list", | ||
439 | self.lineno, self.line) | ||
440 | choicepairs = self.gen_choicepair_list() | ||
441 | |||
442 | return choicepairs | ||
443 | |||
444 | def gen_choices(self, context = None, checklist = False): | ||
445 | """ | ||
446 | Generate an array of choice values corresponding to the | ||
447 | numbered list generated by gen_choices_str(), display it to | ||
448 | the user, and process the result. | ||
449 | """ | ||
450 | msg = self.props["msg"] | ||
451 | if not msg: | ||
452 | self.parse_error("No input 'msg' property found", | ||
453 | self.lineno, self.line) | ||
454 | |||
455 | try: | ||
456 | default_choice = self.props["default"] | ||
457 | except KeyError: | ||
458 | default_choice = "" | ||
459 | |||
460 | msg += " [default: " + default_choice + "]" | ||
461 | |||
462 | choicepairs = self.gen_choices_list(context, checklist) | ||
463 | |||
464 | choices_str = self.gen_choices_str(choicepairs) | ||
465 | choices_val_list = self.gen_choices_val_list(choicepairs) | ||
466 | if checklist: | ||
467 | choiceval = default(find_choicevals(raw_input(msg + "\n" + choices_str), choices_val_list), default_choice) | ||
468 | else: | ||
469 | choiceval = default(find_choiceval(raw_input(msg + "\n" + choices_str), choices_val_list), default_choice) | ||
470 | |||
471 | return choiceval | ||
472 | |||
473 | |||
474 | def find_choiceval(choice_str, choice_list): | ||
475 | """ | ||
476 | Take number as string and return val string from choice_list, | ||
477 | empty string if oob. choice_list is a simple python list. | ||
478 | """ | ||
479 | choice_val = "" | ||
480 | |||
481 | try: | ||
482 | choice_idx = int(choice_str) | ||
483 | if choice_idx <= len(choice_list): | ||
484 | choice_idx -= 1 | ||
485 | choice_val = choice_list[choice_idx] | ||
486 | except ValueError: | ||
487 | pass | ||
488 | |||
489 | return choice_val | ||
490 | |||
491 | |||
492 | def find_choicevals(choice_str, choice_list): | ||
493 | """ | ||
494 | Take numbers as space-separated string and return vals list from | ||
495 | choice_list, empty list if oob. choice_list is a simple python | ||
496 | list. | ||
497 | """ | ||
498 | choice_vals = [] | ||
499 | |||
500 | choices = choice_str.split() | ||
501 | for choice in choices: | ||
502 | choice_vals.append(find_choiceval(choice, choice_list)) | ||
503 | |||
504 | return choice_vals | ||
505 | |||
506 | |||
507 | def default(input_str, name): | ||
508 | """ | ||
509 | Return default if no input_str, otherwise stripped input_str. | ||
510 | """ | ||
511 | if not input_str: | ||
512 | return name | ||
513 | |||
514 | return input_str.strip() | ||
515 | |||
516 | |||
517 | def verify_git_repo(giturl): | ||
518 | """ | ||
519 | Verify that the giturl passed in can be connected to. This can be | ||
520 | used as a check for the existence of the given repo and/or basic | ||
521 | git remote connectivity. | ||
522 | |||
523 | Returns True if the connection was successful, fals otherwise | ||
524 | """ | ||
525 | if not giturl: | ||
526 | return False | ||
527 | |||
528 | gitcmd = "git ls-remote %s > /dev/null 2>&1" % (giturl) | ||
529 | rc = subprocess.call(gitcmd, shell=True) | ||
530 | if rc == 0: | ||
531 | return True | ||
532 | |||
533 | return False | ||
534 | |||
535 | |||
536 | def get_verified_git_repo(input_str, name): | ||
537 | """ | ||
538 | Return git repo if verified, otherwise loop forever asking user | ||
539 | for filename. | ||
540 | """ | ||
541 | msg = input_str.strip() + " " | ||
542 | |||
543 | giturl = default(raw_input(msg), name) | ||
544 | |||
545 | while True: | ||
546 | if verify_git_repo(giturl): | ||
547 | return giturl | ||
548 | giturl = default(raw_input(msg), name) | ||
549 | |||
550 | |||
551 | def get_verified_file(input_str, name, filename_can_be_null): | ||
552 | """ | ||
553 | Return filename if the file exists, otherwise loop forever asking | ||
554 | user for filename. | ||
555 | """ | ||
556 | msg = input_str.strip() + " " | ||
557 | |||
558 | filename = default(raw_input(msg), name) | ||
559 | |||
560 | while True: | ||
561 | if not filename and filename_can_be_null: | ||
562 | return filename | ||
563 | if os.path.isfile(filename): | ||
564 | return filename | ||
565 | filename = default(raw_input(msg), name) | ||
566 | |||
567 | |||
568 | def replace_file(replace_this, with_this): | ||
569 | """ | ||
570 | Replace the given file with the contents of filename, retaining | ||
571 | the original filename. | ||
572 | """ | ||
573 | try: | ||
574 | replace_this.close() | ||
575 | shutil.copy(with_this, replace_this.name) | ||
576 | except IOError: | ||
577 | pass | ||
578 | |||
579 | |||
580 | def boolean(input_str, name): | ||
581 | """ | ||
582 | Return lowercase version of first char in string, or value in name. | ||
583 | """ | ||
584 | if not input_str: | ||
585 | return name | ||
586 | |||
587 | str = input_str.lower().strip() | ||
588 | if str and str[0] == "y" or str[0] == "n": | ||
589 | return str[0] | ||
590 | else: | ||
591 | return name | ||
592 | |||
593 | |||
594 | def strip_base(input_str): | ||
595 | """ | ||
596 | strip '/base' off the end of input_str, so we can use 'base' in | ||
597 | the branch names we present to the user. | ||
598 | """ | ||
599 | if input_str and input_str.endswith("/base"): | ||
600 | return input_str[:-len("/base")] | ||
601 | return input_str.strip() | ||
602 | |||
603 | |||
604 | deferred_choices = {} | ||
605 | |||
606 | def gen_choices_defer(input_line, context, checklist = False): | ||
607 | """ | ||
608 | Save the context hashed the name of the input item, which will be | ||
609 | passed to the gen function later. | ||
610 | """ | ||
611 | name = input_line.props["name"] | ||
612 | |||
613 | try: | ||
614 | nameappend = input_line.props["nameappend"] | ||
615 | except KeyError: | ||
616 | nameappend = "" | ||
617 | |||
618 | try: | ||
619 | branches_base = input_line.props["branches_base"] | ||
620 | except KeyError: | ||
621 | branches_base = "" | ||
622 | |||
623 | filename = input_line.props["filename"] | ||
624 | |||
625 | closetag_start = filename.find(CLOSE_TAG) | ||
626 | |||
627 | if closetag_start != -1: | ||
628 | filename = filename[closetag_start + len(CLOSE_TAG):] | ||
629 | |||
630 | filename = filename.strip() | ||
631 | filename = os.path.splitext(filename)[0] | ||
632 | |||
633 | captured_context = capture_context(context) | ||
634 | context["filename"] = filename | ||
635 | captured_context["filename"] = filename | ||
636 | context["nameappend"] = nameappend | ||
637 | captured_context["nameappend"] = nameappend | ||
638 | context["branches_base"] = branches_base | ||
639 | captured_context["branches_base"] = branches_base | ||
640 | |||
641 | deferred_choice = (input_line, captured_context, checklist) | ||
642 | key = name + "_" + filename + "_" + nameappend | ||
643 | deferred_choices[key] = deferred_choice | ||
644 | |||
645 | |||
646 | def invoke_deferred_choices(name): | ||
647 | """ | ||
648 | Invoke the choice generation function using the context hashed by | ||
649 | 'name'. | ||
650 | """ | ||
651 | deferred_choice = deferred_choices[name] | ||
652 | input_line = deferred_choice[0] | ||
653 | context = deferred_choice[1] | ||
654 | checklist = deferred_choice[2] | ||
655 | |||
656 | context["name"] = name | ||
657 | |||
658 | choices = input_line.gen_choices(context, checklist) | ||
659 | |||
660 | return choices | ||
661 | |||
662 | |||
663 | class ChoicelistInputLine(ListInputLine): | ||
664 | """ | ||
665 | Base class for choicelist Input lines. | ||
666 | props: | ||
667 | name: example - "xserver_choice" | ||
668 | msg: example - "Please select an xserver for this machine" | ||
669 | result: | ||
670 | Sets the value of the variable specified by 'name' to whichever Choice was chosen | ||
671 | example - xserver_choice = "xserver_vesa" | ||
672 | """ | ||
673 | def __init__(self, props, tag, lineno): | ||
674 | ListInputLine.__init__(self, props, tag, lineno) | ||
675 | |||
676 | def gen(self, context = None): | ||
677 | InputLine.gen(self, context) | ||
678 | |||
679 | gen_choices_defer(self, context) | ||
680 | name = self.props["name"] | ||
681 | nameappend = context["nameappend"] | ||
682 | filename = context["filename"] | ||
683 | |||
684 | try: | ||
685 | default_choice = self.props["default"] | ||
686 | except KeyError: | ||
687 | default_choice = "" | ||
688 | |||
689 | line = name + " = default(invoke_deferred_choices(\"" + name + "_" + filename + "_" + nameappend + "\"), \"" + default_choice + "\")" | ||
690 | |||
691 | return line | ||
692 | |||
693 | |||
694 | class ListValInputLine(InputLine): | ||
695 | """ | ||
696 | Abstract base class for choice and checkbox Input lines. | ||
697 | """ | ||
698 | def __init__(self, props, tag, lineno): | ||
699 | InputLine.__init__(self, props, tag, lineno) | ||
700 | |||
701 | try: | ||
702 | self.val = self.props["val"] | ||
703 | except KeyError: | ||
704 | self.parse_error("No input 'val' property found", self.lineno, self.line) | ||
705 | |||
706 | try: | ||
707 | self.desc = self.props["msg"] | ||
708 | except KeyError: | ||
709 | self.parse_error("No input 'msg' property found", self.lineno, self.line) | ||
710 | |||
711 | |||
712 | class ChoiceInputLine(ListValInputLine): | ||
713 | """ | ||
714 | Base class for choicelist item Input lines. | ||
715 | """ | ||
716 | def __init__(self, props, tag, lineno): | ||
717 | ListValInputLine.__init__(self, props, tag, lineno) | ||
718 | |||
719 | def gen(self, context = None): | ||
720 | return None | ||
721 | |||
722 | |||
723 | class ChecklistInputLine(ListInputLine): | ||
724 | """ | ||
725 | Base class for checklist Input lines. | ||
726 | """ | ||
727 | def __init__(self, props, tag, lineno): | ||
728 | ListInputLine.__init__(self, props, tag, lineno) | ||
729 | |||
730 | def gen(self, context = None): | ||
731 | InputLine.gen(self, context) | ||
732 | |||
733 | gen_choices_defer(self, context, True) | ||
734 | name = self.props["name"] | ||
735 | nameappend = context["nameappend"] | ||
736 | filename = context["filename"] | ||
737 | |||
738 | try: | ||
739 | default_choice = self.props["default"] | ||
740 | except KeyError: | ||
741 | default_choice = "" | ||
742 | |||
743 | line = name + " = default(invoke_deferred_choices(\"" + name + "_" + filename + "_" + nameappend + "\"), \"" + default_choice + "\")" | ||
744 | |||
745 | return line | ||
746 | |||
747 | |||
748 | class CheckInputLine(ListValInputLine): | ||
749 | """ | ||
750 | Base class for checklist item Input lines. | ||
751 | """ | ||
752 | def __init__(self, props, tag, lineno): | ||
753 | ListValInputLine.__init__(self, props, tag, lineno) | ||
754 | |||
755 | def gen(self, context = None): | ||
756 | return None | ||
757 | |||
758 | |||
759 | dirname_substitutions = {} | ||
760 | |||
761 | class SubstrateBase(object): | ||
762 | """ | ||
763 | Base class for both expanded and unexpanded file and dir container | ||
764 | objects. | ||
765 | """ | ||
766 | def __init__(self, filename, filebase, out_filebase): | ||
767 | self.filename = filename | ||
768 | self.filebase = filebase | ||
769 | self.translated_filename = filename | ||
770 | self.out_filebase = out_filebase | ||
771 | self.raw_lines = [] | ||
772 | self.expanded_lines = [] | ||
773 | self.prev_choicelist = None | ||
774 | |||
775 | def parse_error(self, msg, lineno, line): | ||
776 | raise SyntaxError("%s: [%s: %d]: %s" % (msg, self.filename, lineno, line)) | ||
777 | |||
778 | def expand_input_tag(self, tag, lineno): | ||
779 | """ | ||
780 | Input tags consist of the word 'input' at the beginning, | ||
781 | followed by name:value property pairs which are converted into | ||
782 | a dictionary. | ||
783 | """ | ||
784 | propstr = tag[len(INPUT_TAG):] | ||
785 | |||
786 | props = dict(prop.split(":", 1) for prop in shlex.split(propstr)) | ||
787 | props["filename"] = self.filename | ||
788 | |||
789 | input_type = props[INPUT_TYPE_PROPERTY] | ||
790 | if not props[INPUT_TYPE_PROPERTY]: | ||
791 | self.parse_error("No input 'type' property found", lineno, tag) | ||
792 | |||
793 | if input_type == "boolean": | ||
794 | return BooleanInputLine(props, tag, lineno) | ||
795 | if input_type == "edit": | ||
796 | return EditBoxInputLine(props, tag, lineno) | ||
797 | if input_type == "edit-git-repo": | ||
798 | return GitRepoEditBoxInputLine(props, tag, lineno) | ||
799 | if input_type == "edit-file": | ||
800 | return FileEditBoxInputLine(props, tag, lineno) | ||
801 | elif input_type == "choicelist": | ||
802 | self.prev_choicelist = ChoicelistInputLine(props, tag, lineno) | ||
803 | return self.prev_choicelist | ||
804 | elif input_type == "choice": | ||
805 | if not self.prev_choicelist: | ||
806 | self.parse_error("Found 'choice' input tag but no previous choicelist", | ||
807 | lineno, tag) | ||
808 | choice = ChoiceInputLine(props, tag, lineno) | ||
809 | self.prev_choicelist.choices.append(choice) | ||
810 | return choice | ||
811 | elif input_type == "checklist": | ||
812 | return ChecklistInputLine(props, tag, lineno) | ||
813 | elif input_type == "check": | ||
814 | return CheckInputLine(props, tag, lineno) | ||
815 | |||
816 | def expand_assignment_tag(self, start, line, lineno): | ||
817 | """ | ||
818 | Expand all tags in a line. | ||
819 | """ | ||
820 | expanded_line = AssignmentLine(line.rstrip()) | ||
821 | |||
822 | while start != -1: | ||
823 | end = line.find(CLOSE_TAG, start) | ||
824 | if end == -1: | ||
825 | self.parse_error("No close tag found for assignment tag", lineno, line) | ||
826 | else: | ||
827 | name = line[start + len(ASSIGN_TAG):end].strip() | ||
828 | expanded_line.add_assignment(start, end + len(CLOSE_TAG), name) | ||
829 | start = line.find(ASSIGN_TAG, end) | ||
830 | |||
831 | return expanded_line | ||
832 | |||
833 | def expand_tag(self, line, lineno): | ||
834 | """ | ||
835 | Returns a processed tag line, or None if there was no tag | ||
836 | |||
837 | The rules for tags are very simple: | ||
838 | - No nested tags | ||
839 | - Tags start with {{ and end with }} | ||
840 | - An assign tag, {{=, can appear anywhere and will | ||
841 | be replaced with what the assignment evaluates to | ||
842 | - Any other tag occupies the whole line it is on | ||
843 | - if there's anything else on the tag line, it's an error | ||
844 | - if it starts with 'input', it's an input tag and | ||
845 | will only be used for prompting and setting variables | ||
846 | - anything else is straight Python | ||
847 | - tags are in effect only until the next blank line or tag or 'pass' tag | ||
848 | - we don't have indentation in tags, but we need some way to end a block | ||
849 | forcefully without blank lines or other tags - that's the 'pass' tag | ||
850 | - todo: implement pass tag | ||
851 | - directories and filenames can have tags as well, but only assignment | ||
852 | and 'if' code lines | ||
853 | - directories and filenames are the only case where normal tags can | ||
854 | coexist with normal text on the same 'line' | ||
855 | """ | ||
856 | start = line.find(ASSIGN_TAG) | ||
857 | if start != -1: | ||
858 | return self.expand_assignment_tag(start, line, lineno) | ||
859 | |||
860 | start = line.find(OPEN_TAG) | ||
861 | if start == -1: | ||
862 | return None | ||
863 | |||
864 | end = line.find(CLOSE_TAG, 0) | ||
865 | if end == -1: | ||
866 | self.parse_error("No close tag found for open tag", lineno, line) | ||
867 | |||
868 | tag = line[start + len(OPEN_TAG):end].strip() | ||
869 | |||
870 | if not tag.lstrip().startswith(INPUT_TAG): | ||
871 | return CodeLine(tag) | ||
872 | |||
873 | return self.expand_input_tag(tag, lineno) | ||
874 | |||
875 | def append_translated_filename(self, filename): | ||
876 | """ | ||
877 | Simply append filename to translated_filename | ||
878 | """ | ||
879 | self.translated_filename = os.path.join(self.translated_filename, filename) | ||
880 | |||
881 | def get_substituted_file_or_dir_name(self, first_line, tag): | ||
882 | """ | ||
883 | If file or dir names contain name substitutions, return the name | ||
884 | to substitute. Note that this is just the file or dirname and | ||
885 | doesn't include the path. | ||
886 | """ | ||
887 | filename = first_line.find(tag) | ||
888 | if filename != -1: | ||
889 | filename += len(tag) | ||
890 | substituted_filename = first_line[filename:].strip() | ||
891 | this = substituted_filename.find(" this") | ||
892 | if this != -1: | ||
893 | head, tail = os.path.split(self.filename) | ||
894 | substituted_filename = substituted_filename[:this + 1] + tail | ||
895 | if tag == DIRNAME_TAG: # get rid of .noinstall in dirname | ||
896 | substituted_filename = substituted_filename.split('.')[0] | ||
897 | |||
898 | return substituted_filename | ||
899 | |||
900 | def get_substituted_filename(self, first_line): | ||
901 | """ | ||
902 | If a filename contains a name substitution, return the name to | ||
903 | substitute. Note that this is just the filename and doesn't | ||
904 | include the path. | ||
905 | """ | ||
906 | return self.get_substituted_file_or_dir_name(first_line, FILENAME_TAG) | ||
907 | |||
908 | def get_substituted_dirname(self, first_line): | ||
909 | """ | ||
910 | If a dirname contains a name substitution, return the name to | ||
911 | substitute. Note that this is just the dirname and doesn't | ||
912 | include the path. | ||
913 | """ | ||
914 | return self.get_substituted_file_or_dir_name(first_line, DIRNAME_TAG) | ||
915 | |||
916 | def substitute_filename(self, first_line): | ||
917 | """ | ||
918 | Find the filename in first_line and append it to translated_filename. | ||
919 | """ | ||
920 | substituted_filename = self.get_substituted_filename(first_line) | ||
921 | self.append_translated_filename(substituted_filename); | ||
922 | |||
923 | def substitute_dirname(self, first_line): | ||
924 | """ | ||
925 | Find the dirname in first_line and append it to translated_filename. | ||
926 | """ | ||
927 | substituted_dirname = self.get_substituted_dirname(first_line) | ||
928 | self.append_translated_filename(substituted_dirname); | ||
929 | |||
930 | def is_filename_substitution(self, line): | ||
931 | """ | ||
932 | Do we have a filename subustition? | ||
933 | """ | ||
934 | if line.find(FILENAME_TAG) != -1: | ||
935 | return True | ||
936 | return False | ||
937 | |||
938 | def is_dirname_substitution(self, line): | ||
939 | """ | ||
940 | Do we have a dirname subustition? | ||
941 | """ | ||
942 | if line.find(DIRNAME_TAG) != -1: | ||
943 | return True | ||
944 | return False | ||
945 | |||
946 | def translate_dirname(self, first_line): | ||
947 | """ | ||
948 | Just save the first_line mapped by filename. The later pass | ||
949 | through the directories will look for a dirname.noinstall | ||
950 | match and grab the substitution line. | ||
951 | """ | ||
952 | dirname_substitutions[self.filename] = first_line | ||
953 | |||
954 | def translate_dirnames_in_path(self, path): | ||
955 | """ | ||
956 | Translate dirnames below this file or dir, not including tail. | ||
957 | dirname_substititions is keyed on actual untranslated filenames. | ||
958 | translated_path contains the subsititutions for each element. | ||
959 | """ | ||
960 | remainder = path[len(self.filebase)+1:] | ||
961 | translated_path = untranslated_path = self.filebase | ||
962 | |||
963 | untranslated_dirs = remainder.split(os.sep) | ||
964 | |||
965 | for dir in untranslated_dirs: | ||
966 | key = os.path.join(untranslated_path, dir + '.noinstall') | ||
967 | try: | ||
968 | first_line = dirname_substitutions[key] | ||
969 | except KeyError: | ||
970 | translated_path = os.path.join(translated_path, dir) | ||
971 | untranslated_path = os.path.join(untranslated_path, dir) | ||
972 | continue | ||
973 | substituted_dir = self.get_substituted_dirname(first_line) | ||
974 | translated_path = os.path.join(translated_path, substituted_dir) | ||
975 | untranslated_path = os.path.join(untranslated_path, dir) | ||
976 | |||
977 | return translated_path | ||
978 | |||
979 | def translate_file_or_dir_name(self): | ||
980 | """ | ||
981 | Originally we were allowed to use open/close/assign tags and python | ||
982 | code in the filename, which fit in nicely with the way we | ||
983 | processed the templates and generated code. Now that we can't | ||
984 | do that, we make those tags proper file contents and have this | ||
985 | pass substitute the nice but non-functional names with those | ||
986 | 'strange' ones, and then proceed as usual. | ||
987 | |||
988 | So, if files or matching dir<.noinstall> files contain | ||
989 | filename substitutions, this function translates them into the | ||
990 | corresponding 'strange' names, which future passes will expand | ||
991 | as they always have. The resulting pathname is kept in the | ||
992 | file or directory's translated_filename. Another way to think | ||
993 | about it is that self.filename is the input filename, and | ||
994 | translated_filename is the output filename before expansion. | ||
995 | """ | ||
996 | # remove leaf file or dirname | ||
997 | head, tail = os.path.split(self.filename) | ||
998 | translated_path = self.translate_dirnames_in_path(head) | ||
999 | self.translated_filename = translated_path | ||
1000 | |||
1001 | # This is a dirname - does it have a matching .noinstall with | ||
1002 | # a substitution? If so, apply the dirname subsititution. | ||
1003 | if not os.path.isfile(self.filename): | ||
1004 | key = self.filename + ".noinstall" | ||
1005 | try: | ||
1006 | first_line = dirname_substitutions[key] | ||
1007 | except KeyError: | ||
1008 | self.append_translated_filename(tail) | ||
1009 | return | ||
1010 | self.substitute_dirname(first_line) | ||
1011 | return | ||
1012 | |||
1013 | f = open(self.filename) | ||
1014 | first_line = f.readline() | ||
1015 | f.close() | ||
1016 | |||
1017 | # This is a normal filename not needing translation, just use | ||
1018 | # it as-is. | ||
1019 | if not first_line or not first_line.startswith("#"): | ||
1020 | self.append_translated_filename(tail) | ||
1021 | return | ||
1022 | |||
1023 | # If we have a filename substitution (first line in the file | ||
1024 | # is a FILENAME_TAG line) do the substitution now. If we have | ||
1025 | # a dirname substitution (DIRNAME_TAG in dirname.noinstall | ||
1026 | # meta-file), hash it so we can apply it when we see the | ||
1027 | # matching dirname later. Otherwise we have a regular | ||
1028 | # filename, just use it as-is. | ||
1029 | if self.is_filename_substitution(first_line): | ||
1030 | self.substitute_filename(first_line) | ||
1031 | elif self.is_dirname_substitution(first_line): | ||
1032 | self.translate_dirname(first_line) | ||
1033 | else: | ||
1034 | self.append_translated_filename(tail) | ||
1035 | |||
1036 | def expand_file_or_dir_name(self): | ||
1037 | """ | ||
1038 | Expand file or dir names into codeline. Dirnames and | ||
1039 | filenames can only have assignments or if statements. First | ||
1040 | translate if statements into CodeLine + (dirname or filename | ||
1041 | creation). | ||
1042 | """ | ||
1043 | lineno = 0 | ||
1044 | |||
1045 | line = self.translated_filename[len(self.filebase):] | ||
1046 | if line.startswith("/"): | ||
1047 | line = line[1:] | ||
1048 | opentag_start = -1 | ||
1049 | |||
1050 | start = line.find(OPEN_TAG) | ||
1051 | while start != -1: | ||
1052 | if not line[start:].startswith(ASSIGN_TAG): | ||
1053 | opentag_start = start | ||
1054 | break | ||
1055 | start += len(ASSIGN_TAG) | ||
1056 | start = line.find(OPEN_TAG, start) | ||
1057 | |||
1058 | if opentag_start != -1: | ||
1059 | end = line.find(CLOSE_TAG, opentag_start) | ||
1060 | if end == -1: | ||
1061 | self.parse_error("No close tag found for open tag", lineno, line) | ||
1062 | # we have a {{ tag i.e. code | ||
1063 | tag = line[opentag_start + len(OPEN_TAG):end].strip() | ||
1064 | if not tag.lstrip().startswith(IF_TAG): | ||
1065 | self.parse_error("Only 'if' tags are allowed in file or directory names", | ||
1066 | lineno, line) | ||
1067 | self.expanded_lines.append(CodeLine(tag)) | ||
1068 | |||
1069 | # everything after }} is the actual filename (possibly with assignments) | ||
1070 | # everything before is the pathname | ||
1071 | line = line[:opentag_start] + line[end + len(CLOSE_TAG):].strip() | ||
1072 | |||
1073 | assign_start = line.find(ASSIGN_TAG) | ||
1074 | if assign_start != -1: | ||
1075 | assignment_tag = self.expand_assignment_tag(assign_start, line, lineno) | ||
1076 | if isinstance(self, SubstrateFile): | ||
1077 | assignment_tag.is_filename = True | ||
1078 | assignment_tag.out_filebase = self.out_filebase | ||
1079 | elif isinstance(self, SubstrateDir): | ||
1080 | assignment_tag.is_dirname = True | ||
1081 | assignment_tag.out_filebase = self.out_filebase | ||
1082 | self.expanded_lines.append(assignment_tag) | ||
1083 | return | ||
1084 | |||
1085 | normal_line = NormalLine(line) | ||
1086 | if isinstance(self, SubstrateFile): | ||
1087 | normal_line.is_filename = True | ||
1088 | normal_line.out_filebase = self.out_filebase | ||
1089 | elif isinstance(self, SubstrateDir): | ||
1090 | normal_line.is_dirname = True | ||
1091 | normal_line.out_filebase = self.out_filebase | ||
1092 | self.expanded_lines.append(normal_line) | ||
1093 | |||
1094 | def expand(self): | ||
1095 | """ | ||
1096 | Expand the file or dir name first, eventually this ends up | ||
1097 | creating the file or dir. | ||
1098 | """ | ||
1099 | self.translate_file_or_dir_name() | ||
1100 | self.expand_file_or_dir_name() | ||
1101 | |||
1102 | |||
1103 | class SubstrateFile(SubstrateBase): | ||
1104 | """ | ||
1105 | Container for both expanded and unexpanded substrate files. | ||
1106 | """ | ||
1107 | def __init__(self, filename, filebase, out_filebase): | ||
1108 | SubstrateBase.__init__(self, filename, filebase, out_filebase) | ||
1109 | |||
1110 | def read(self): | ||
1111 | if self.raw_lines: | ||
1112 | return | ||
1113 | f = open(self.filename) | ||
1114 | self.raw_lines = f.readlines() | ||
1115 | |||
1116 | def expand(self): | ||
1117 | """Expand the contents of all template tags in the file.""" | ||
1118 | SubstrateBase.expand(self) | ||
1119 | self.read() | ||
1120 | |||
1121 | for lineno, line in enumerate(self.raw_lines): | ||
1122 | # only first line can be a filename substitition | ||
1123 | if lineno == 0 and line.startswith("#") and FILENAME_TAG in line: | ||
1124 | continue # skip it - we've already expanded it | ||
1125 | expanded_line = self.expand_tag(line, lineno + 1) # humans not 0-based | ||
1126 | if not expanded_line: | ||
1127 | expanded_line = NormalLine(line.rstrip()) | ||
1128 | self.expanded_lines.append(expanded_line) | ||
1129 | |||
1130 | def gen(self, context = None): | ||
1131 | """Generate the code that generates the BSP.""" | ||
1132 | base_indent = 0 | ||
1133 | |||
1134 | indent = new_indent = base_indent | ||
1135 | |||
1136 | for line in self.expanded_lines: | ||
1137 | genline = line.gen(context) | ||
1138 | if not genline: | ||
1139 | continue | ||
1140 | if isinstance(line, InputLine): | ||
1141 | line.generated_line = genline | ||
1142 | continue | ||
1143 | if genline.startswith(OPEN_START): | ||
1144 | if indent == 1: | ||
1145 | base_indent = 1 | ||
1146 | if indent: | ||
1147 | if genline == BLANKLINE_STR or (not genline.startswith(NORMAL_START) | ||
1148 | and not genline.startswith(OPEN_START)): | ||
1149 | indent = new_indent = base_indent | ||
1150 | if genline.endswith(":"): | ||
1151 | new_indent = base_indent + 1 | ||
1152 | line.generated_line = (indent * INDENT_STR) + genline | ||
1153 | indent = new_indent | ||
1154 | |||
1155 | |||
1156 | class SubstrateDir(SubstrateBase): | ||
1157 | """ | ||
1158 | Container for both expanded and unexpanded substrate dirs. | ||
1159 | """ | ||
1160 | def __init__(self, filename, filebase, out_filebase): | ||
1161 | SubstrateBase.__init__(self, filename, filebase, out_filebase) | ||
1162 | |||
1163 | def expand(self): | ||
1164 | SubstrateBase.expand(self) | ||
1165 | |||
1166 | def gen(self, context = None): | ||
1167 | """Generate the code that generates the BSP.""" | ||
1168 | indent = new_indent = 0 | ||
1169 | for line in self.expanded_lines: | ||
1170 | genline = line.gen(context) | ||
1171 | if not genline: | ||
1172 | continue | ||
1173 | if genline.endswith(":"): | ||
1174 | new_indent = 1 | ||
1175 | else: | ||
1176 | new_indent = 0 | ||
1177 | line.generated_line = (indent * INDENT_STR) + genline | ||
1178 | indent = new_indent | ||
1179 | |||
1180 | |||
1181 | def expand_target(target, all_files, out_filebase): | ||
1182 | """ | ||
1183 | Expand the contents of all template tags in the target. This | ||
1184 | means removing tags and categorizing or creating lines so that | ||
1185 | future passes can process and present input lines and generate the | ||
1186 | corresponding lines of the Python program that will be exec'ed to | ||
1187 | actually produce the final BSP. 'all_files' includes directories. | ||
1188 | """ | ||
1189 | for root, dirs, files in os.walk(target): | ||
1190 | for file in files: | ||
1191 | if file.endswith("~") or file.endswith("#"): | ||
1192 | continue | ||
1193 | f = os.path.join(root, file) | ||
1194 | sfile = SubstrateFile(f, target, out_filebase) | ||
1195 | sfile.expand() | ||
1196 | all_files.append(sfile) | ||
1197 | |||
1198 | for dir in dirs: | ||
1199 | d = os.path.join(root, dir) | ||
1200 | sdir = SubstrateDir(d, target, out_filebase) | ||
1201 | sdir.expand() | ||
1202 | all_files.append(sdir) | ||
1203 | |||
1204 | |||
1205 | def gen_program_machine_lines(machine, program_lines): | ||
1206 | """ | ||
1207 | Use the input values we got from the command line. | ||
1208 | """ | ||
1209 | line = "machine = \"" + machine + "\"" | ||
1210 | program_lines.append(line) | ||
1211 | |||
1212 | line = "layer_name = \"" + machine + "\"" | ||
1213 | program_lines.append(line) | ||
1214 | |||
1215 | |||
1216 | def sort_inputlines(input_lines): | ||
1217 | """Sort input lines according to priority (position).""" | ||
1218 | input_lines.sort(key = lambda l: l.prio) | ||
1219 | |||
1220 | |||
1221 | def find_parent_dependency(lines, depends_on): | ||
1222 | for i, line in lines: | ||
1223 | if isinstance(line, CodeLine): | ||
1224 | continue | ||
1225 | if line.props["name"] == depends_on: | ||
1226 | return i | ||
1227 | |||
1228 | return -1 | ||
1229 | |||
1230 | |||
1231 | def process_inputline_dependencies(input_lines, all_inputlines): | ||
1232 | """If any input lines depend on others, put the others first.""" | ||
1233 | for line in input_lines: | ||
1234 | if isinstance(line, InputLineGroup): | ||
1235 | group_inputlines = [] | ||
1236 | process_inputline_dependencies(line.group, group_inputlines) | ||
1237 | line.group = group_inputlines | ||
1238 | all_inputlines.append(line) | ||
1239 | continue | ||
1240 | |||
1241 | if isinstance(line, CodeLine) or isinstance(line, NormalLine): | ||
1242 | all_inputlines.append(line) | ||
1243 | continue | ||
1244 | |||
1245 | try: | ||
1246 | depends_on = line.props["depends-on"] | ||
1247 | depends_codeline = "if " + line.props["depends-on"] + " == \"" + line.props["depends-on-val"] + "\":" | ||
1248 | all_inputlines.append(CodeLine(depends_codeline)) | ||
1249 | all_inputlines.append(line) | ||
1250 | except KeyError: | ||
1251 | all_inputlines.append(line) | ||
1252 | |||
1253 | |||
1254 | def conditional_filename(filename): | ||
1255 | """ | ||
1256 | Check if the filename itself contains a conditional statement. If | ||
1257 | so, return a codeline for it. | ||
1258 | """ | ||
1259 | opentag_start = filename.find(OPEN_TAG) | ||
1260 | |||
1261 | if opentag_start != -1: | ||
1262 | if filename[opentag_start:].startswith(ASSIGN_TAG): | ||
1263 | return None | ||
1264 | end = filename.find(CLOSE_TAG, opentag_start) | ||
1265 | if end == -1: | ||
1266 | print "No close tag found for open tag in filename %s" % filename | ||
1267 | sys.exit(1) | ||
1268 | |||
1269 | # we have a {{ tag i.e. code | ||
1270 | tag = filename[opentag_start + len(OPEN_TAG):end].strip() | ||
1271 | if not tag.lstrip().startswith(IF_TAG): | ||
1272 | print "Only 'if' tags are allowed in file or directory names, filename: %s" % filename | ||
1273 | sys.exit(1) | ||
1274 | |||
1275 | return CodeLine(tag) | ||
1276 | |||
1277 | return None | ||
1278 | |||
1279 | |||
1280 | class InputLineGroup(InputLine): | ||
1281 | """ | ||
1282 | InputLine that does nothing but group other input lines | ||
1283 | corresponding to all the input lines in a SubstrateFile so they | ||
1284 | can be generated as a group. prio is the only property used. | ||
1285 | """ | ||
1286 | def __init__(self, codeline): | ||
1287 | InputLine.__init__(self, {}, "", 0) | ||
1288 | self.group = [] | ||
1289 | self.prio = sys.maxint | ||
1290 | self.group.append(codeline) | ||
1291 | |||
1292 | def append(self, line): | ||
1293 | self.group.append(line) | ||
1294 | if line.prio < self.prio: | ||
1295 | self.prio = line.prio | ||
1296 | |||
1297 | def len(self): | ||
1298 | return len(self.group) | ||
1299 | |||
1300 | |||
1301 | def gather_inputlines(files): | ||
1302 | """ | ||
1303 | Gather all the InputLines - we want to generate them first. | ||
1304 | """ | ||
1305 | all_inputlines = [] | ||
1306 | input_lines = [] | ||
1307 | |||
1308 | for file in files: | ||
1309 | if isinstance(file, SubstrateFile): | ||
1310 | group = None | ||
1311 | basename = os.path.basename(file.translated_filename) | ||
1312 | |||
1313 | codeline = conditional_filename(basename) | ||
1314 | if codeline: | ||
1315 | group = InputLineGroup(codeline) | ||
1316 | |||
1317 | have_condition = False | ||
1318 | condition_to_write = None | ||
1319 | for line in file.expanded_lines: | ||
1320 | if isinstance(line, CodeLine): | ||
1321 | have_condition = True | ||
1322 | condition_to_write = line | ||
1323 | continue | ||
1324 | if isinstance(line, InputLine): | ||
1325 | if group: | ||
1326 | if condition_to_write: | ||
1327 | condition_to_write.prio = line.prio | ||
1328 | condition_to_write.discard = True | ||
1329 | group.append(condition_to_write) | ||
1330 | condition_to_write = None | ||
1331 | group.append(line) | ||
1332 | else: | ||
1333 | if condition_to_write: | ||
1334 | condition_to_write.prio = line.prio | ||
1335 | condition_to_write.discard = True | ||
1336 | input_lines.append(condition_to_write) | ||
1337 | condition_to_write = None | ||
1338 | input_lines.append(line) | ||
1339 | else: | ||
1340 | if condition_to_write: | ||
1341 | condition_to_write = None | ||
1342 | if have_condition: | ||
1343 | if not line.line.strip(): | ||
1344 | line.discard = True | ||
1345 | input_lines.append(line) | ||
1346 | have_condition = False | ||
1347 | |||
1348 | if group and group.len() > 1: | ||
1349 | input_lines.append(group) | ||
1350 | |||
1351 | sort_inputlines(input_lines) | ||
1352 | process_inputline_dependencies(input_lines, all_inputlines) | ||
1353 | |||
1354 | return all_inputlines | ||
1355 | |||
1356 | |||
1357 | def run_program_lines(linelist, codedump): | ||
1358 | """ | ||
1359 | For a single file, print all the python code into a buf and execute it. | ||
1360 | """ | ||
1361 | buf = "\n".join(linelist) | ||
1362 | |||
1363 | if codedump: | ||
1364 | of = open("bspgen.out", "w") | ||
1365 | of.write(buf) | ||
1366 | of.close() | ||
1367 | exec buf | ||
1368 | |||
1369 | |||
1370 | def gen_target(files, context = None): | ||
1371 | """ | ||
1372 | Generate the python code for each file. | ||
1373 | """ | ||
1374 | for file in files: | ||
1375 | file.gen(context) | ||
1376 | |||
1377 | |||
1378 | def gen_program_header_lines(program_lines): | ||
1379 | """ | ||
1380 | Generate any imports we need. | ||
1381 | """ | ||
1382 | program_lines.append("current_file = \"\"") | ||
1383 | |||
1384 | |||
1385 | def gen_supplied_property_vals(properties, program_lines): | ||
1386 | """ | ||
1387 | Generate user-specified entries for input values instead of | ||
1388 | generating input prompts. | ||
1389 | """ | ||
1390 | for name, val in properties.iteritems(): | ||
1391 | program_line = name + " = \"" + val + "\"" | ||
1392 | program_lines.append(program_line) | ||
1393 | |||
1394 | |||
1395 | def gen_initial_property_vals(input_lines, program_lines): | ||
1396 | """ | ||
1397 | Generate null or default entries for input values, so we don't | ||
1398 | have undefined variables. | ||
1399 | """ | ||
1400 | for line in input_lines: | ||
1401 | if isinstance(line, InputLineGroup): | ||
1402 | gen_initial_property_vals(line.group, program_lines) | ||
1403 | continue | ||
1404 | |||
1405 | if isinstance(line, InputLine): | ||
1406 | try: | ||
1407 | name = line.props["name"] | ||
1408 | try: | ||
1409 | default_val = "\"" + line.props["default"] + "\"" | ||
1410 | except: | ||
1411 | default_val = "\"\"" | ||
1412 | program_line = name + " = " + default_val | ||
1413 | program_lines.append(program_line) | ||
1414 | except KeyError: | ||
1415 | pass | ||
1416 | |||
1417 | |||
1418 | def gen_program_input_lines(input_lines, program_lines, context, in_group = False): | ||
1419 | """ | ||
1420 | Generate only the input lines used for prompting the user. For | ||
1421 | that, we only have input lines and CodeLines that affect the next | ||
1422 | input line. | ||
1423 | """ | ||
1424 | indent = new_indent = 0 | ||
1425 | |||
1426 | for line in input_lines: | ||
1427 | if isinstance(line, InputLineGroup): | ||
1428 | gen_program_input_lines(line.group, program_lines, context, True) | ||
1429 | continue | ||
1430 | if not line.line.strip(): | ||
1431 | continue | ||
1432 | |||
1433 | genline = line.gen(context) | ||
1434 | if not genline: | ||
1435 | continue | ||
1436 | if genline.endswith(":"): | ||
1437 | new_indent += 1 | ||
1438 | else: | ||
1439 | if indent > 1 or (not in_group and indent): | ||
1440 | new_indent -= 1 | ||
1441 | |||
1442 | line.generated_line = (indent * INDENT_STR) + genline | ||
1443 | program_lines.append(line.generated_line) | ||
1444 | |||
1445 | indent = new_indent | ||
1446 | |||
1447 | |||
1448 | def gen_program_lines(target_files, program_lines): | ||
1449 | """ | ||
1450 | Generate the program lines that make up the BSP generation | ||
1451 | program. This appends the generated lines of all target_files to | ||
1452 | program_lines, and skips input lines, which are dealt with | ||
1453 | separately, or omitted. | ||
1454 | """ | ||
1455 | for file in target_files: | ||
1456 | if file.filename.endswith("noinstall"): | ||
1457 | continue | ||
1458 | |||
1459 | for line in file.expanded_lines: | ||
1460 | if isinstance(line, InputLine): | ||
1461 | continue | ||
1462 | if line.discard: | ||
1463 | continue | ||
1464 | |||
1465 | program_lines.append(line.generated_line) | ||
1466 | |||
1467 | |||
1468 | def create_context(machine, arch, scripts_path): | ||
1469 | """ | ||
1470 | Create a context object for use in deferred function invocation. | ||
1471 | """ | ||
1472 | context = {} | ||
1473 | |||
1474 | context["machine"] = machine | ||
1475 | context["arch"] = arch | ||
1476 | context["scripts_path"] = scripts_path | ||
1477 | |||
1478 | return context | ||
1479 | |||
1480 | |||
1481 | def capture_context(context): | ||
1482 | """ | ||
1483 | Create a context object for use in deferred function invocation. | ||
1484 | """ | ||
1485 | captured_context = {} | ||
1486 | |||
1487 | captured_context["machine"] = context["machine"] | ||
1488 | captured_context["arch"] = context["arch"] | ||
1489 | captured_context["scripts_path"] = context["scripts_path"] | ||
1490 | |||
1491 | return captured_context | ||
1492 | |||
1493 | |||
1494 | def expand_targets(context, bsp_output_dir, expand_common=True): | ||
1495 | """ | ||
1496 | Expand all the tags in both the common and machine-specific | ||
1497 | 'targets'. | ||
1498 | |||
1499 | If expand_common is False, don't expand the common target (this | ||
1500 | option is used to create special-purpose layers). | ||
1501 | """ | ||
1502 | target_files = [] | ||
1503 | |||
1504 | machine = context["machine"] | ||
1505 | arch = context["arch"] | ||
1506 | scripts_path = context["scripts_path"] | ||
1507 | |||
1508 | lib_path = scripts_path + '/lib' | ||
1509 | bsp_path = lib_path + '/bsp' | ||
1510 | arch_path = bsp_path + '/substrate/target/arch' | ||
1511 | |||
1512 | if expand_common: | ||
1513 | common = os.path.join(arch_path, "common") | ||
1514 | expand_target(common, target_files, bsp_output_dir) | ||
1515 | |||
1516 | arches = os.listdir(arch_path) | ||
1517 | if arch not in arches or arch == "common": | ||
1518 | print "Invalid karch, exiting\n" | ||
1519 | sys.exit(1) | ||
1520 | |||
1521 | target = os.path.join(arch_path, arch) | ||
1522 | expand_target(target, target_files, bsp_output_dir) | ||
1523 | |||
1524 | gen_target(target_files, context) | ||
1525 | |||
1526 | return target_files | ||
1527 | |||
1528 | |||
1529 | def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedump, properties_file, properties_str="", expand_common=True): | ||
1530 | """ | ||
1531 | Common layer-creation code | ||
1532 | |||
1533 | machine - user-defined machine name (if needed, will generate 'machine' var) | ||
1534 | target - the 'target' the layer will be based on, must be one in | ||
1535 | scripts/lib/bsp/substrate/target/arch | ||
1536 | scripts_path - absolute path to yocto /scripts dir | ||
1537 | layer_output_dir - dirname to create for layer | ||
1538 | codedump - dump generated code to bspgen.out | ||
1539 | properties_file - use values from this file if nonempty i.e no prompting | ||
1540 | properties_str - use values from this string if nonempty i.e no prompting | ||
1541 | expand_common - boolean, use the contents of (for bsp layers) arch/common | ||
1542 | """ | ||
1543 | if os.path.exists(layer_output_dir): | ||
1544 | print "\nlayer output dir already exists, exiting. (%s)" % layer_output_dir | ||
1545 | sys.exit(1) | ||
1546 | |||
1547 | properties = None | ||
1548 | |||
1549 | if properties_file: | ||
1550 | try: | ||
1551 | infile = open(properties_file, "r") | ||
1552 | except IOError: | ||
1553 | print "Couldn't open properties file %s for reading, exiting" % properties_file | ||
1554 | sys.exit(1) | ||
1555 | |||
1556 | properties = json.load(infile) | ||
1557 | |||
1558 | if properties_str and not properties: | ||
1559 | properties = json.loads(properties_str) | ||
1560 | |||
1561 | os.mkdir(layer_output_dir) | ||
1562 | |||
1563 | context = create_context(machine, target, scripts_path) | ||
1564 | target_files = expand_targets(context, layer_output_dir, expand_common) | ||
1565 | |||
1566 | input_lines = gather_inputlines(target_files) | ||
1567 | |||
1568 | program_lines = [] | ||
1569 | |||
1570 | gen_program_header_lines(program_lines) | ||
1571 | |||
1572 | gen_initial_property_vals(input_lines, program_lines) | ||
1573 | |||
1574 | if properties: | ||
1575 | gen_supplied_property_vals(properties, program_lines) | ||
1576 | |||
1577 | gen_program_machine_lines(machine, program_lines) | ||
1578 | |||
1579 | if not properties: | ||
1580 | gen_program_input_lines(input_lines, program_lines, context) | ||
1581 | |||
1582 | gen_program_lines(target_files, program_lines) | ||
1583 | |||
1584 | run_program_lines(program_lines, codedump) | ||
1585 | |||
1586 | |||
1587 | def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, properties_file, properties=""): | ||
1588 | """ | ||
1589 | Create yocto layer | ||
1590 | |||
1591 | layer_name - user-defined layer name | ||
1592 | scripts_path - absolute path to yocto /scripts dir | ||
1593 | layer_output_dir - dirname to create for layer | ||
1594 | codedump - dump generated code to bspgen.out | ||
1595 | properties_file - use values from this file if nonempty i.e no prompting | ||
1596 | properties - use values from this string if nonempty i.e no prompting | ||
1597 | """ | ||
1598 | yocto_common_create(layer_name, "layer", scripts_path, layer_output_dir, codedump, properties_file, properties, False) | ||
1599 | |||
1600 | print "\nNew layer created in %s.\n" % (layer_output_dir) | ||
1601 | print "Don't forget to add it to your BBLAYERS (for details see %s\README)." % (layer_output_dir) | ||
1602 | |||
1603 | |||
1604 | def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties=None): | ||
1605 | """ | ||
1606 | Create bsp | ||
1607 | |||
1608 | machine - user-defined machine name | ||
1609 | arch - the arch the bsp will be based on, must be one in | ||
1610 | scripts/lib/bsp/substrate/target/arch | ||
1611 | scripts_path - absolute path to yocto /scripts dir | ||
1612 | bsp_output_dir - dirname to create for BSP | ||
1613 | codedump - dump generated code to bspgen.out | ||
1614 | properties_file - use values from this file if nonempty i.e no prompting | ||
1615 | properties - use values from this string if nonempty i.e no prompting | ||
1616 | """ | ||
1617 | yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties) | ||
1618 | |||
1619 | print "\nNew %s BSP created in %s" % (arch, bsp_output_dir) | ||
1620 | |||
1621 | |||
1622 | def print_dict(items, indent = 0): | ||
1623 | """ | ||
1624 | Print the values in a possibly nested dictionary. | ||
1625 | """ | ||
1626 | for key, val in items.iteritems(): | ||
1627 | print " "*indent + "\"%s\" :" % key, | ||
1628 | if type(val) == dict: | ||
1629 | print "{" | ||
1630 | print_dict(val, indent + 1) | ||
1631 | print " "*indent + "}" | ||
1632 | else: | ||
1633 | print "%s" % val | ||
1634 | |||
1635 | |||
1636 | def get_properties(input_lines): | ||
1637 | """ | ||
1638 | Get the complete set of properties for all the input items in the | ||
1639 | BSP, as a possibly nested dictionary. | ||
1640 | """ | ||
1641 | properties = {} | ||
1642 | |||
1643 | for line in input_lines: | ||
1644 | if isinstance(line, InputLineGroup): | ||
1645 | statement = line.group[0].line | ||
1646 | group_properties = get_properties(line.group) | ||
1647 | properties[statement] = group_properties | ||
1648 | continue | ||
1649 | |||
1650 | if not isinstance(line, InputLine): | ||
1651 | continue | ||
1652 | |||
1653 | if isinstance(line, ChoiceInputLine): | ||
1654 | continue | ||
1655 | |||
1656 | props = line.props | ||
1657 | item = {} | ||
1658 | name = props["name"] | ||
1659 | for key, val in props.items(): | ||
1660 | if not key == "name": | ||
1661 | item[key] = val | ||
1662 | properties[name] = item | ||
1663 | |||
1664 | return properties | ||
1665 | |||
1666 | |||
1667 | def yocto_layer_list_properties(arch, scripts_path, properties_file, expand_common=True): | ||
1668 | """ | ||
1669 | List the complete set of properties for all the input items in the | ||
1670 | layer. If properties_file is non-null, write the complete set of | ||
1671 | properties as a nested JSON object corresponding to a possibly | ||
1672 | nested dictionary. | ||
1673 | """ | ||
1674 | context = create_context("unused", arch, scripts_path) | ||
1675 | target_files = expand_targets(context, "unused", expand_common) | ||
1676 | |||
1677 | input_lines = gather_inputlines(target_files) | ||
1678 | |||
1679 | properties = get_properties(input_lines) | ||
1680 | if properties_file: | ||
1681 | try: | ||
1682 | of = open(properties_file, "w") | ||
1683 | except IOError: | ||
1684 | print "Couldn't open properties file %s for writing, exiting" % properties_file | ||
1685 | sys.exit(1) | ||
1686 | |||
1687 | json.dump(properties, of) | ||
1688 | |||
1689 | print_dict(properties) | ||
1690 | |||
1691 | |||
1692 | def split_nested_property(property): | ||
1693 | """ | ||
1694 | A property name of the form x.y describes a nested property | ||
1695 | i.e. the property y is contained within x and can be addressed | ||
1696 | using standard JSON syntax for nested properties. Note that if a | ||
1697 | property name itself contains '.', it should be contained in | ||
1698 | double quotes. | ||
1699 | """ | ||
1700 | splittable_property = "" | ||
1701 | in_quotes = False | ||
1702 | for c in property: | ||
1703 | if c == '.' and not in_quotes: | ||
1704 | splittable_property += '\n' | ||
1705 | continue | ||
1706 | if c == '"': | ||
1707 | in_quotes = not in_quotes | ||
1708 | splittable_property += c | ||
1709 | |||
1710 | split_properties = splittable_property.split('\n') | ||
1711 | |||
1712 | if len(split_properties) > 1: | ||
1713 | return split_properties | ||
1714 | |||
1715 | return None | ||
1716 | |||
1717 | |||
1718 | def find_input_line_group(substring, input_lines): | ||
1719 | """ | ||
1720 | Find and return the InputLineGroup containing the specified substring. | ||
1721 | """ | ||
1722 | for line in input_lines: | ||
1723 | if isinstance(line, InputLineGroup): | ||
1724 | if substring in line.group[0].line: | ||
1725 | return line | ||
1726 | |||
1727 | return None | ||
1728 | |||
1729 | |||
1730 | def find_input_line(name, input_lines): | ||
1731 | """ | ||
1732 | Find the input line with the specified name. | ||
1733 | """ | ||
1734 | for line in input_lines: | ||
1735 | if isinstance(line, InputLineGroup): | ||
1736 | l = find_input_line(name, line.group) | ||
1737 | if l: | ||
1738 | return l | ||
1739 | |||
1740 | if isinstance(line, InputLine): | ||
1741 | try: | ||
1742 | if line.props["name"] == name: | ||
1743 | return line | ||
1744 | if line.props["name"] + "_" + line.props["nameappend"] == name: | ||
1745 | return line | ||
1746 | except KeyError: | ||
1747 | pass | ||
1748 | |||
1749 | return None | ||
1750 | |||
1751 | |||
1752 | def print_values(type, values_list): | ||
1753 | """ | ||
1754 | Print the values in the given list of values. | ||
1755 | """ | ||
1756 | if type == "choicelist": | ||
1757 | for value in values_list: | ||
1758 | print "[\"%s\", \"%s\"]" % (value[0], value[1]) | ||
1759 | elif type == "boolean": | ||
1760 | for value in values_list: | ||
1761 | print "[\"%s\", \"%s\"]" % (value[0], value[1]) | ||
1762 | |||
1763 | |||
1764 | def yocto_layer_list_property_values(arch, property, scripts_path, properties_file, expand_common=True): | ||
1765 | """ | ||
1766 | List the possible values for a given input property. If | ||
1767 | properties_file is non-null, write the complete set of properties | ||
1768 | as a JSON object corresponding to an array of possible values. | ||
1769 | """ | ||
1770 | context = create_context("unused", arch, scripts_path) | ||
1771 | context["name"] = property | ||
1772 | |||
1773 | target_files = expand_targets(context, "unused", expand_common) | ||
1774 | |||
1775 | input_lines = gather_inputlines(target_files) | ||
1776 | |||
1777 | properties = get_properties(input_lines) | ||
1778 | |||
1779 | nested_properties = split_nested_property(property) | ||
1780 | if nested_properties: | ||
1781 | # currently the outer property of a nested property always | ||
1782 | # corresponds to an input line group | ||
1783 | input_line_group = find_input_line_group(nested_properties[0], input_lines) | ||
1784 | if input_line_group: | ||
1785 | input_lines[:] = input_line_group.group[1:] | ||
1786 | # The inner property of a nested property name is the | ||
1787 | # actual property name we want, so reset to that | ||
1788 | property = nested_properties[1] | ||
1789 | |||
1790 | input_line = find_input_line(property, input_lines) | ||
1791 | if not input_line: | ||
1792 | print "Couldn't find values for property %s" % property | ||
1793 | return | ||
1794 | |||
1795 | values_list = [] | ||
1796 | |||
1797 | type = input_line.props["type"] | ||
1798 | if type == "boolean": | ||
1799 | values_list.append(["y", "n"]) | ||
1800 | elif type == "choicelist" or type == "checklist": | ||
1801 | try: | ||
1802 | gen_fn = input_line.props["gen"] | ||
1803 | if nested_properties: | ||
1804 | context["filename"] = nested_properties[0] | ||
1805 | try: | ||
1806 | context["branches_base"] = input_line.props["branches_base"] | ||
1807 | except KeyError: | ||
1808 | context["branches_base"] = None | ||
1809 | values_list = input_line.gen_choices_list(context, False) | ||
1810 | except KeyError: | ||
1811 | for choice in input_line.choices: | ||
1812 | choicepair = [] | ||
1813 | choicepair.append(choice.val) | ||
1814 | choicepair.append(choice.desc) | ||
1815 | values_list.append(choicepair) | ||
1816 | |||
1817 | if properties_file: | ||
1818 | try: | ||
1819 | of = open(properties_file, "w") | ||
1820 | except IOError: | ||
1821 | print "Couldn't open properties file %s for writing, exiting" % properties_file | ||
1822 | sys.exit(1) | ||
1823 | |||
1824 | json.dump(values_list, of) | ||
1825 | |||
1826 | print_values(type, values_list) | ||
1827 | |||
1828 | |||
1829 | def yocto_bsp_list(args, scripts_path, properties_file): | ||
1830 | """ | ||
1831 | Print available architectures, or the complete list of properties | ||
1832 | defined by the BSP, or the possible values for a particular BSP | ||
1833 | property. | ||
1834 | """ | ||
1835 | if len(args) < 1: | ||
1836 | return False | ||
1837 | |||
1838 | if args[0] == "karch": | ||
1839 | lib_path = scripts_path + '/lib' | ||
1840 | bsp_path = lib_path + '/bsp' | ||
1841 | arch_path = bsp_path + '/substrate/target/arch' | ||
1842 | print "Architectures available:" | ||
1843 | for arch in os.listdir(arch_path): | ||
1844 | if arch == "common" or arch == "layer": | ||
1845 | continue | ||
1846 | print " %s" % arch | ||
1847 | return True | ||
1848 | else: | ||
1849 | arch = args[0] | ||
1850 | |||
1851 | if len(args) < 2 or len(args) > 3: | ||
1852 | return False | ||
1853 | |||
1854 | if len(args) == 2: | ||
1855 | if args[1] == "properties": | ||
1856 | yocto_layer_list_properties(arch, scripts_path, properties_file) | ||
1857 | else: | ||
1858 | return False | ||
1859 | |||
1860 | if len(args) == 3: | ||
1861 | if args[1] == "property": | ||
1862 | yocto_layer_list_property_values(arch, args[2], scripts_path, properties_file) | ||
1863 | else: | ||
1864 | return False | ||
1865 | |||
1866 | return True | ||
1867 | |||
1868 | |||
1869 | def yocto_layer_list(args, scripts_path, properties_file): | ||
1870 | """ | ||
1871 | Print the complete list of input properties defined by the layer, | ||
1872 | or the possible values for a particular layer property. | ||
1873 | """ | ||
1874 | if len(args) < 1: | ||
1875 | return False | ||
1876 | |||
1877 | if len(args) < 1 or len(args) > 2: | ||
1878 | return False | ||
1879 | |||
1880 | if len(args) == 1: | ||
1881 | if args[0] == "properties": | ||
1882 | yocto_layer_list_properties("layer", scripts_path, properties_file, False) | ||
1883 | else: | ||
1884 | return False | ||
1885 | |||
1886 | if len(args) == 2: | ||
1887 | if args[0] == "property": | ||
1888 | yocto_layer_list_property_values("layer", args[1], scripts_path, properties_file, False) | ||
1889 | else: | ||
1890 | return False | ||
1891 | |||
1892 | return True | ||
1893 | |||
1894 | |||
1895 | def map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch): | ||
1896 | """ | ||
1897 | Return the linux-yocto bsp branch to use with the specified | ||
1898 | kbranch. This handles the -standard variants for 3.4 and 3.8; the | ||
1899 | other variants don't need mappings. | ||
1900 | """ | ||
1901 | if need_new_kbranch == "y": | ||
1902 | kbranch = new_kbranch | ||
1903 | else: | ||
1904 | kbranch = existing_kbranch | ||
1905 | |||
1906 | if kbranch.startswith("standard/common-pc-64"): | ||
1907 | return "bsp/common-pc-64/common-pc-64-standard.scc" | ||
1908 | if kbranch.startswith("standard/common-pc"): | ||
1909 | return "bsp/common-pc/common-pc-standard.scc" | ||
1910 | else: | ||
1911 | return "ktypes/standard/standard.scc" | ||
1912 | |||
1913 | |||
1914 | def map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch): | ||
1915 | """ | ||
1916 | Return the linux-yocto bsp branch to use with the specified | ||
1917 | kbranch. This handles the -preempt-rt variants for 3.4 and 3.8; | ||
1918 | the other variants don't need mappings. | ||
1919 | """ | ||
1920 | if need_new_kbranch == "y": | ||
1921 | kbranch = new_kbranch | ||
1922 | else: | ||
1923 | kbranch = existing_kbranch | ||
1924 | |||
1925 | if kbranch.startswith("standard/preempt-rt/common-pc-64"): | ||
1926 | return "bsp/common-pc-64/common-pc-64-preempt-rt.scc" | ||
1927 | if kbranch.startswith("standard/preempt-rt/common-pc"): | ||
1928 | return "bsp/common-pc/common-pc-preempt-rt.scc" | ||
1929 | else: | ||
1930 | return "ktypes/preempt-rt/preempt-rt.scc" | ||
1931 | |||
1932 | |||
1933 | def map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch): | ||
1934 | """ | ||
1935 | Return the linux-yocto bsp branch to use with the specified | ||
1936 | kbranch. This handles the -tiny variants for 3.4 and 3.8; the | ||
1937 | other variants don't need mappings. | ||
1938 | """ | ||
1939 | if need_new_kbranch == "y": | ||
1940 | kbranch = new_kbranch | ||
1941 | else: | ||
1942 | kbranch = existing_kbranch | ||
1943 | |||
1944 | if kbranch.startswith("standard/tiny/common-pc"): | ||
1945 | return "bsp/common-pc/common-pc-tiny.scc" | ||
1946 | else: | ||
1947 | return "ktypes/tiny/tiny.scc" | ||
diff --git a/scripts/lib/bsp/help.py b/scripts/lib/bsp/help.py new file mode 100644 index 0000000000..7c436d6be0 --- /dev/null +++ b/scripts/lib/bsp/help.py | |||
@@ -0,0 +1,1043 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2012, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module implements some basic help invocation functions along | ||
22 | # with the bulk of the help topic text for the Yocto BSP Tools. | ||
23 | # | ||
24 | # AUTHORS | ||
25 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
26 | # | ||
27 | |||
28 | import subprocess | ||
29 | import logging | ||
30 | |||
31 | |||
32 | def subcommand_error(args): | ||
33 | logging.info("invalid subcommand %s" % args[0]) | ||
34 | |||
35 | |||
36 | def display_help(subcommand, subcommands): | ||
37 | """ | ||
38 | Display help for subcommand. | ||
39 | """ | ||
40 | if subcommand not in subcommands: | ||
41 | return False | ||
42 | |||
43 | help = subcommands.get(subcommand, subcommand_error)[2] | ||
44 | pager = subprocess.Popen('less', stdin=subprocess.PIPE) | ||
45 | pager.communicate(help) | ||
46 | |||
47 | return True | ||
48 | |||
49 | |||
50 | def yocto_help(args, usage_str, subcommands): | ||
51 | """ | ||
52 | Subcommand help dispatcher. | ||
53 | """ | ||
54 | if len(args) == 1 or not display_help(args[1], subcommands): | ||
55 | print(usage_str) | ||
56 | |||
57 | |||
58 | def invoke_subcommand(args, parser, main_command_usage, subcommands): | ||
59 | """ | ||
60 | Dispatch to subcommand handler borrowed from combo-layer. | ||
61 | Should use argparse, but has to work in 2.6. | ||
62 | """ | ||
63 | if not args: | ||
64 | logging.error("No subcommand specified, exiting") | ||
65 | parser.print_help() | ||
66 | elif args[0] == "help": | ||
67 | yocto_help(args, main_command_usage, subcommands) | ||
68 | elif args[0] not in subcommands: | ||
69 | logging.error("Unsupported subcommand %s, exiting\n" % (args[0])) | ||
70 | parser.print_help() | ||
71 | else: | ||
72 | usage = subcommands.get(args[0], subcommand_error)[1] | ||
73 | subcommands.get(args[0], subcommand_error)[0](args[1:], usage) | ||
74 | |||
75 | |||
76 | ## | ||
77 | # yocto-bsp help and usage strings | ||
78 | ## | ||
79 | |||
80 | yocto_bsp_usage = """ | ||
81 | |||
82 | Create a customized Yocto BSP layer. | ||
83 | |||
84 | usage: yocto-bsp [--version] [--help] COMMAND [ARGS] | ||
85 | |||
86 | Current 'yocto-bsp' commands are: | ||
87 | create Create a new Yocto BSP | ||
88 | list List available values for options and BSP properties | ||
89 | |||
90 | See 'yocto-bsp help COMMAND' for more information on a specific command. | ||
91 | """ | ||
92 | |||
93 | yocto_bsp_help_usage = """ | ||
94 | |||
95 | usage: yocto-bsp help <subcommand> | ||
96 | |||
97 | This command displays detailed help for the specified subcommand. | ||
98 | """ | ||
99 | |||
100 | yocto_bsp_create_usage = """ | ||
101 | |||
102 | Create a new Yocto BSP | ||
103 | |||
104 | usage: yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>] | ||
105 | [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>] | ||
106 | |||
107 | This command creates a Yocto BSP based on the specified parameters. | ||
108 | The new BSP will be a new Yocto BSP layer contained by default within | ||
109 | the top-level directory specified as 'meta-bsp-name'. The -o option | ||
110 | can be used to place the BSP layer in a directory with a different | ||
111 | name and location. | ||
112 | |||
113 | The value of the 'karch' parameter determines the set of files that | ||
114 | will be generated for the BSP, along with the specific set of | ||
115 | 'properties' that will be used to fill out the BSP-specific portions | ||
116 | of the BSP. The possible values for the 'karch' paramter can be | ||
117 | listed via 'yocto-bsp list karch'. | ||
118 | |||
119 | NOTE: Once created, you should add your new layer to your | ||
120 | bblayers.conf file in order for it to be subsequently seen and | ||
121 | modified by the yocto-kernel tool. | ||
122 | |||
123 | See 'yocto bsp help create' for more detailed instructions. | ||
124 | """ | ||
125 | |||
126 | yocto_bsp_create_help = """ | ||
127 | |||
128 | NAME | ||
129 | yocto-bsp create - Create a new Yocto BSP | ||
130 | |||
131 | SYNOPSIS | ||
132 | yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>] | ||
133 | [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>] | ||
134 | |||
135 | DESCRIPTION | ||
136 | This command creates a Yocto BSP based on the specified | ||
137 | parameters. The new BSP will be a new Yocto BSP layer contained | ||
138 | by default within the top-level directory specified as | ||
139 | 'meta-bsp-name'. The -o option can be used to place the BSP layer | ||
140 | in a directory with a different name and location. | ||
141 | |||
142 | The value of the 'karch' parameter determines the set of files | ||
143 | that will be generated for the BSP, along with the specific set of | ||
144 | 'properties' that will be used to fill out the BSP-specific | ||
145 | portions of the BSP. The possible values for the 'karch' paramter | ||
146 | can be listed via 'yocto-bsp list karch'. | ||
147 | |||
148 | The BSP-specific properties that define the values that will be | ||
149 | used to generate a particular BSP can be specified on the | ||
150 | command-line using the -i option and supplying a JSON object | ||
151 | consisting of the set of name:value pairs needed by the BSP. | ||
152 | |||
153 | If the -i option is not used, the user will be interactively | ||
154 | prompted for each of the required property values, which will then | ||
155 | be used as values for BSP generation. | ||
156 | |||
157 | The set of properties available for a given architecture can be | ||
158 | listed using the 'yocto-bsp list' command. | ||
159 | |||
160 | Specifying -c causes the Python code generated and executed to | ||
161 | create the BSP to be dumped to the 'bspgen.out' file in the | ||
162 | current directory, and is useful for debugging. | ||
163 | |||
164 | NOTE: Once created, you should add your new layer to your | ||
165 | bblayers.conf file in order for it to be subsequently seen and | ||
166 | modified by the yocto-kernel tool. | ||
167 | |||
168 | For example, assuming your poky repo is at /path/to/poky, your new | ||
169 | BSP layer is at /path/to/poky/meta-mybsp, and your build directory | ||
170 | is /path/to/build: | ||
171 | |||
172 | $ gedit /path/to/build/conf/bblayers.conf | ||
173 | |||
174 | BBLAYERS ?= " \\ | ||
175 | /path/to/poky/meta \\ | ||
176 | /path/to/poky/meta-yocto \\ | ||
177 | /path/to/poky/meta-mybsp \\ | ||
178 | " | ||
179 | """ | ||
180 | |||
181 | yocto_bsp_list_usage = """ | ||
182 | |||
183 | usage: yocto-bsp list karch | ||
184 | yocto-bsp list <karch> properties | ||
185 | [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>] | ||
186 | yocto-bsp list <karch> property <xxx> | ||
187 | [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>] | ||
188 | |||
189 | This command enumerates the complete set of possible values for a | ||
190 | specified option or property needed by the BSP creation process. | ||
191 | |||
192 | The first form enumerates all the possible values that exist and can | ||
193 | be specified for the 'karch' parameter to the 'yocto bsp create' | ||
194 | command. | ||
195 | |||
196 | The second form enumerates all the possible properties that exist and | ||
197 | must have values specified for them in the 'yocto bsp create' command | ||
198 | for the given 'karch'. | ||
199 | |||
200 | The third form enumerates all the possible values that exist and can | ||
201 | be specified for any of the enumerable properties of the given | ||
202 | 'karch' in the 'yocto bsp create' command. | ||
203 | |||
204 | See 'yocto-bsp help list' for more details. | ||
205 | """ | ||
206 | |||
207 | yocto_bsp_list_help = """ | ||
208 | |||
209 | NAME | ||
210 | yocto-bsp list - List available values for options and BSP properties | ||
211 | |||
212 | SYNOPSIS | ||
213 | yocto-bsp list karch | ||
214 | yocto-bsp list <karch> properties | ||
215 | [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>] | ||
216 | yocto-bsp list <karch> property <xxx> | ||
217 | [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>] | ||
218 | |||
219 | DESCRIPTION | ||
220 | This command enumerates the complete set of possible values for a | ||
221 | specified option or property needed by the BSP creation process. | ||
222 | |||
223 | The first form enumerates all the possible values that exist and | ||
224 | can be specified for the 'karch' parameter to the 'yocto bsp | ||
225 | create' command. Example output for the 'list karch' command: | ||
226 | |||
227 | $ yocto-bsp list karch | ||
228 | Architectures available: | ||
229 | arm | ||
230 | powerpc | ||
231 | i386 | ||
232 | mips | ||
233 | x86_64 | ||
234 | qemu | ||
235 | |||
236 | The second form enumerates all the possible properties that exist | ||
237 | and must have values specified for them in the 'yocto bsp create' | ||
238 | command for the given 'karch'. This command is mainly meant to | ||
239 | allow the development user interface alternatives to the default | ||
240 | text-based prompting interface. If the -o option is specified, | ||
241 | the list of properties, in addition to being displayed, will be | ||
242 | written to the specified file as a JSON object. In this case, the | ||
243 | object will consist of the set of name:value pairs corresponding | ||
244 | to the (possibly nested) dictionary of properties defined by the | ||
245 | input statements used by the BSP. Some example output for the | ||
246 | 'list properties' command: | ||
247 | |||
248 | $ yocto-bsp list arm properties | ||
249 | "touchscreen" : { | ||
250 | "msg" : Does your BSP have a touchscreen? (y/N) | ||
251 | "default" : n | ||
252 | "type" : boolean | ||
253 | } | ||
254 | "uboot_loadaddress" : { | ||
255 | "msg" : Please specify a value for UBOOT_LOADADDRESS. | ||
256 | "default" : 0x80008000 | ||
257 | "type" : edit | ||
258 | "prio" : 40 | ||
259 | } | ||
260 | "kernel_choice" : { | ||
261 | "prio" : 10 | ||
262 | "default" : linux-yocto_3.2 | ||
263 | "depends-on" : use_default_kernel | ||
264 | "depends-on-val" : n | ||
265 | "msg" : Please choose the kernel to use in this BSP => | ||
266 | "type" : choicelist | ||
267 | "gen" : bsp.kernel.kernels | ||
268 | } | ||
269 | "if kernel_choice == "linux-yocto_3.0":" : { | ||
270 | "base_kbranch_linux_yocto_3_0" : { | ||
271 | "prio" : 20 | ||
272 | "default" : yocto/standard | ||
273 | "depends-on" : new_kbranch_linux_yocto_3_0 | ||
274 | "depends-on-val" : y | ||
275 | "msg" : Please choose a machine branch to base this BSP on => | ||
276 | "type" : choicelist | ||
277 | "gen" : bsp.kernel.all_branches | ||
278 | } | ||
279 | . | ||
280 | . | ||
281 | . | ||
282 | |||
283 | Each entry in the output consists of the name of the input element | ||
284 | e.g. "touchscreen", followed by the properties defined for that | ||
285 | element enclosed in braces. This information should provide | ||
286 | sufficient information to create a complete user interface with. | ||
287 | Two features of the scheme provide for conditional input. First, | ||
288 | if a Python "if" statement appears in place of an input element | ||
289 | name, the set of enclosed input elements apply and should be | ||
290 | presented to the user only if the 'if' statement evaluates to | ||
291 | true. The test in the if statement will always reference another | ||
292 | input element in the list, which means that the element being | ||
293 | tested should be presented to the user before the elements | ||
294 | enclosed by the if block. Secondly, in a similar way, some | ||
295 | elements contain "depends-on" and depends-on-val" tags, which mean | ||
296 | that the affected input element should only be presented to the | ||
297 | user if the element it depends on has already been presented to | ||
298 | the user and the user has selected the specified value for that | ||
299 | element. | ||
300 | |||
301 | The third form enumerates all the possible values that exist and | ||
302 | can be specified for any of the enumerable properties of the given | ||
303 | 'karch' in the 'yocto bsp create' command. If the -o option is | ||
304 | specified, the list of values for the given property, in addition | ||
305 | to being displayed, will be written to the specified file as a | ||
306 | JSON object. In this case, the object will consist of the set of | ||
307 | name:value pairs corresponding to the array of property values | ||
308 | associated with the property. | ||
309 | |||
310 | $ yocto-bsp list i386 property xserver_choice | ||
311 | ["xserver_vesa", "VESA xserver support"] | ||
312 | ["xserver_i915", "i915 xserver support"] | ||
313 | |||
314 | $ yocto-bsp list arm property base_kbranch_linux_yocto_3_0 | ||
315 | Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.0... | ||
316 | ["yocto/base", "yocto/base"] | ||
317 | ["yocto/eg20t", "yocto/eg20t"] | ||
318 | ["yocto/gma500", "yocto/gma500"] | ||
319 | ["yocto/pvr", "yocto/pvr"] | ||
320 | ["yocto/standard/arm-versatile-926ejs", "yocto/standard/arm-versatile-926ejs"] | ||
321 | ["yocto/standard/base", "yocto/standard/base"] | ||
322 | ["yocto/standard/cedartrail", "yocto/standard/cedartrail"] | ||
323 | . | ||
324 | . | ||
325 | . | ||
326 | ["yocto/standard/qemu-ppc32", "yocto/standard/qemu-ppc32"] | ||
327 | ["yocto/standard/routerstationpro", "yocto/standard/routerstationpro"] | ||
328 | |||
329 | The third form as well is meant mainly for developers of | ||
330 | alternative interfaces - it allows the developer to fetch the | ||
331 | possible values for a given input element on-demand. This | ||
332 | on-demand capability is especially valuable for elements that | ||
333 | require relatively expensive remote operations to fulfill, such as | ||
334 | the example that returns the set of branches available in a remote | ||
335 | git tree above. | ||
336 | |||
337 | """ | ||
338 | |||
339 | ## | ||
340 | # yocto-kernel help and usage strings | ||
341 | ## | ||
342 | |||
343 | yocto_kernel_usage = """ | ||
344 | |||
345 | Modify and list Yocto BSP kernel config items and patches. | ||
346 | |||
347 | usage: yocto-kernel [--version] [--help] COMMAND [ARGS] | ||
348 | |||
349 | Current 'yocto-kernel' commands are: | ||
350 | config list List the modifiable set of bare kernel config options for a BSP | ||
351 | config add Add or modify bare kernel config options for a BSP | ||
352 | config rm Remove bare kernel config options from a BSP | ||
353 | patch list List the patches associated with a BSP | ||
354 | patch add Patch the Yocto kernel for a BSP | ||
355 | patch rm Remove patches from a BSP | ||
356 | feature list List the features used by a BSP | ||
357 | feature add Have a BSP use a feature | ||
358 | feature rm Have a BSP stop using a feature | ||
359 | features list List the features available to BSPs | ||
360 | feature describe Describe a particular feature | ||
361 | feature create Create a new BSP-local feature | ||
362 | feature destroy Remove a BSP-local feature | ||
363 | |||
364 | See 'yocto-kernel help COMMAND' for more information on a specific command. | ||
365 | |||
366 | """ | ||
367 | |||
368 | |||
369 | yocto_kernel_help_usage = """ | ||
370 | |||
371 | usage: yocto-kernel help <subcommand> | ||
372 | |||
373 | This command displays detailed help for the specified subcommand. | ||
374 | """ | ||
375 | |||
376 | yocto_kernel_config_list_usage = """ | ||
377 | |||
378 | List the modifiable set of bare kernel config options for a BSP | ||
379 | |||
380 | usage: yocto-kernel config list <bsp-name> | ||
381 | |||
382 | This command lists the 'modifiable' config items for a BSP i.e. the | ||
383 | items which are eligible for modification or removal by other | ||
384 | yocto-kernel commands. | ||
385 | |||
386 | 'modifiable' config items are the config items contained a BSP's | ||
387 | user-config.cfg base config. | ||
388 | """ | ||
389 | |||
390 | |||
391 | yocto_kernel_config_list_help = """ | ||
392 | |||
393 | NAME | ||
394 | yocto-kernel config list - List the modifiable set of bare kernel | ||
395 | config options for a BSP | ||
396 | |||
397 | SYNOPSIS | ||
398 | yocto-kernel config list <bsp-name> | ||
399 | |||
400 | DESCRIPTION | ||
401 | This command lists the 'modifiable' config items for a BSP | ||
402 | i.e. the items which are eligible for modification or removal by | ||
403 | other yocto-kernel commands. | ||
404 | """ | ||
405 | |||
406 | |||
407 | yocto_kernel_config_add_usage = """ | ||
408 | |||
409 | Add or modify bare kernel config options for a BSP | ||
410 | |||
411 | usage: yocto-kernel config add <bsp-name> [<CONFIG_XXX=x> ...] | ||
412 | |||
413 | This command adds one or more CONFIG_XXX=x items to a BSP's user-config.cfg | ||
414 | base config. | ||
415 | """ | ||
416 | |||
417 | |||
418 | yocto_kernel_config_add_help = """ | ||
419 | |||
420 | NAME | ||
421 | yocto-kernel config add - Add or modify bare kernel config options | ||
422 | for a BSP | ||
423 | |||
424 | SYNOPSIS | ||
425 | yocto-kernel config add <bsp-name> [<CONFIG_XXX=x> ...] | ||
426 | |||
427 | DESCRIPTION | ||
428 | This command adds one or more CONFIG_XXX=x items to a BSP's | ||
429 | foo.cfg base config. | ||
430 | |||
431 | NOTE: It's up to the user to determine whether or not the config | ||
432 | options being added make sense or not - this command does no | ||
433 | sanity checking or verification of any kind to ensure that a | ||
434 | config option really makes sense and will actually be set in in | ||
435 | the final config. For example, if a config option depends on | ||
436 | other config options, it will be turned off by kconfig if the | ||
437 | other options aren't set correctly. | ||
438 | """ | ||
439 | |||
440 | |||
441 | yocto_kernel_config_rm_usage = """ | ||
442 | |||
443 | Remove bare kernel config options from a BSP | ||
444 | |||
445 | usage: yocto-kernel config rm <bsp-name> | ||
446 | |||
447 | This command removes (turns off) one or more CONFIG_XXX items from a | ||
448 | BSP's user-config.cfg base config. | ||
449 | |||
450 | The set of config items available to be removed by this command for a | ||
451 | BSP is listed and the user prompted for the specific items to remove. | ||
452 | """ | ||
453 | |||
454 | |||
455 | yocto_kernel_config_rm_help = """ | ||
456 | |||
457 | NAME | ||
458 | yocto-kernel config rm - Remove bare kernel config options from a | ||
459 | BSP | ||
460 | |||
461 | SYNOPSIS | ||
462 | yocto-kernel config rm <bsp-name> | ||
463 | |||
464 | DESCRIPTION | ||
465 | This command removes (turns off) one or more CONFIG_XXX items from a | ||
466 | BSP's user-config.cfg base config. | ||
467 | |||
468 | The set of config items available to be removed by this command | ||
469 | for a BSP is listed and the user prompted for the specific items | ||
470 | to remove. | ||
471 | """ | ||
472 | |||
473 | |||
474 | yocto_kernel_patch_list_usage = """ | ||
475 | |||
476 | List the patches associated with the kernel for a BSP | ||
477 | |||
478 | usage: yocto-kernel patch list <bsp-name> | ||
479 | |||
480 | This command lists the patches associated with a BSP. | ||
481 | |||
482 | NOTE: this only applies to patches listed in the kernel recipe's | ||
483 | user-patches.scc file (and currently repeated in its SRC_URI). | ||
484 | """ | ||
485 | |||
486 | |||
487 | yocto_kernel_patch_list_help = """ | ||
488 | |||
489 | NAME | ||
490 | yocto-kernel patch list - List the patches associated with the kernel | ||
491 | for a BSP | ||
492 | |||
493 | SYNOPSIS | ||
494 | yocto-kernel patch list <bsp-name> | ||
495 | |||
496 | DESCRIPTION | ||
497 | This command lists the patches associated with a BSP. | ||
498 | |||
499 | NOTE: this only applies to patches listed in the kernel recipe's | ||
500 | user-patches.scc file (and currently repeated in its SRC_URI). | ||
501 | """ | ||
502 | |||
503 | |||
504 | yocto_kernel_patch_add_usage = """ | ||
505 | |||
506 | Patch the Yocto kernel for a specific BSP | ||
507 | |||
508 | usage: yocto-kernel patch add <bsp-name> [<PATCH> ...] | ||
509 | |||
510 | This command adds one or more patches to a BSP's machine branch. The | ||
511 | patch will be added to the BSP's linux-yocto kernel user-patches.scc | ||
512 | file (and currently repeated in its SRC_URI) and will be guaranteed | ||
513 | to be applied in the order specified. | ||
514 | """ | ||
515 | |||
516 | |||
517 | yocto_kernel_patch_add_help = """ | ||
518 | |||
519 | NAME | ||
520 | yocto-kernel patch add - Patch the Yocto kernel for a specific BSP | ||
521 | |||
522 | SYNOPSIS | ||
523 | yocto-kernel patch add <bsp-name> [<PATCH> ...] | ||
524 | |||
525 | DESCRIPTION | ||
526 | This command adds one or more patches to a BSP's machine branch. | ||
527 | The patch will be added to the BSP's linux-yocto kernel | ||
528 | user-patches.scc file (and currently repeated in its SRC_URI) and | ||
529 | will be guaranteed to be applied in the order specified. | ||
530 | |||
531 | NOTE: It's up to the user to determine whether or not the patches | ||
532 | being added makes sense or not - this command does no sanity | ||
533 | checking or verification of any kind to ensure that a patch can | ||
534 | actually be applied to the BSP's kernel branch; it's assumed that | ||
535 | the user has already done that. | ||
536 | """ | ||
537 | |||
538 | |||
539 | yocto_kernel_patch_rm_usage = """ | ||
540 | |||
541 | Remove a patch from the Yocto kernel for a specific BSP | ||
542 | |||
543 | usage: yocto-kernel patch rm <bsp-name> | ||
544 | |||
545 | This command removes one or more patches from a BSP's machine branch. | ||
546 | The patch will be removed from the BSP's linux-yocto kernel | ||
547 | user-patches.scc file (and currently repeated in its SRC_URI) and | ||
548 | kernel SRC_URI dir. | ||
549 | |||
550 | The set of patches available to be removed by this command for a BSP | ||
551 | is listed and the user prompted for the specific patches to remove. | ||
552 | """ | ||
553 | |||
554 | |||
555 | yocto_kernel_patch_rm_help = """ | ||
556 | |||
557 | NAME | ||
558 | yocto-kernel patch rm - Remove a patch from the Yocto kernel for a specific BSP | ||
559 | |||
560 | SYNOPSIS | ||
561 | yocto-kernel patch rm <bsp-name> | ||
562 | |||
563 | DESCRIPTION | ||
564 | This command removes one or more patches from a BSP's machine | ||
565 | branch. The patch will be removed from the BSP's linux-yocto | ||
566 | kernel user-patches.scc file (and currently repeated in its | ||
567 | SRC_URI). | ||
568 | |||
569 | The set of patches available to be removed by this command for a | ||
570 | BSP is listed and the user prompted for the specific patches to | ||
571 | remove. | ||
572 | """ | ||
573 | |||
574 | yocto_kernel_feature_list_usage = """ | ||
575 | |||
576 | List the BSP features that are being used by a BSP | ||
577 | |||
578 | usage: yocto-kernel feature list <bsp-name> | ||
579 | |||
580 | This command lists the features being used by a BSP i.e. the features | ||
581 | which are eligible for modification or removal by other yocto-kernel | ||
582 | commands. | ||
583 | |||
584 | 'modifiable' features are the features listed in a BSP's | ||
585 | user-features.scc file. | ||
586 | """ | ||
587 | |||
588 | |||
589 | yocto_kernel_feature_list_help = """ | ||
590 | |||
591 | NAME | ||
592 | yocto-kernel feature list - List the modifiable set of features | ||
593 | being used by a BSP | ||
594 | |||
595 | SYNOPSIS | ||
596 | yocto-kernel feature list <bsp-name> | ||
597 | |||
598 | DESCRIPTION | ||
599 | This command lists the 'modifiable' features being used by a BSP | ||
600 | i.e. the features which are eligible for modification or removal | ||
601 | by other yocto-kernel commands. | ||
602 | """ | ||
603 | |||
604 | |||
605 | yocto_kernel_feature_add_usage = """ | ||
606 | |||
607 | Add to or modify the list of features being used for a BSP | ||
608 | |||
609 | usage: yocto-kernel feature add <bsp-name> [/xxxx/yyyy/feature.scc ...] | ||
610 | |||
611 | This command adds one or more feature items to a BSP's kernel | ||
612 | user-features.scc file, which is the file used to manage features in | ||
613 | a yocto-bsp-generated BSP. Features to be added must be specified as | ||
614 | fully-qualified feature names. | ||
615 | """ | ||
616 | |||
617 | |||
618 | yocto_kernel_feature_add_help = """ | ||
619 | |||
620 | NAME | ||
621 | yocto-kernel feature add - Add to or modify the list of features | ||
622 | being used for a BSP | ||
623 | |||
624 | SYNOPSIS | ||
625 | yocto-kernel feature add <bsp-name> [/xxxx/yyyy/feature.scc ...] | ||
626 | |||
627 | DESCRIPTION | ||
628 | This command adds one or more feature items to a BSP's | ||
629 | user-features.scc file, which is the file used to manage features | ||
630 | in a yocto-bsp-generated BSP. Features to be added must be | ||
631 | specified as fully-qualified feature names. | ||
632 | """ | ||
633 | |||
634 | |||
635 | yocto_kernel_feature_rm_usage = """ | ||
636 | |||
637 | Remove a feature from the list of features being used for a BSP | ||
638 | |||
639 | usage: yocto-kernel feature rm <bsp-name> | ||
640 | |||
641 | This command removes (turns off) one or more features from a BSP's | ||
642 | user-features.scc file, which is the file used to manage features in | ||
643 | a yocto-bsp-generated BSP. | ||
644 | |||
645 | The set of features available to be removed by this command for a BSP | ||
646 | is listed and the user prompted for the specific items to remove. | ||
647 | """ | ||
648 | |||
649 | |||
650 | yocto_kernel_feature_rm_help = """ | ||
651 | |||
652 | NAME | ||
653 | yocto-kernel feature rm - Remove a feature from the list of | ||
654 | features being used for a BSP | ||
655 | |||
656 | SYNOPSIS | ||
657 | yocto-kernel feature rm <bsp-name> | ||
658 | |||
659 | DESCRIPTION | ||
660 | This command removes (turns off) one or more features from a BSP's | ||
661 | user-features.scc file, which is the file used to manage features | ||
662 | in a yocto-bsp-generated BSP. | ||
663 | |||
664 | The set of features available to be removed by this command for a | ||
665 | BSP is listed and the user prompted for the specific items to | ||
666 | remove. | ||
667 | """ | ||
668 | |||
669 | |||
670 | yocto_kernel_available_features_list_usage = """ | ||
671 | |||
672 | List the set of kernel features available to a BSP | ||
673 | |||
674 | usage: yocto-kernel features list <bsp-name> | ||
675 | |||
676 | This command lists the complete set of kernel features available to a | ||
677 | BSP. This includes the features contained in linux-yocto meta | ||
678 | branches as well as recipe-space features defined locally to the BSP. | ||
679 | """ | ||
680 | |||
681 | |||
682 | yocto_kernel_available_features_list_help = """ | ||
683 | |||
684 | NAME | ||
685 | yocto-kernel features list - List the set of kernel features | ||
686 | available to a BSP | ||
687 | |||
688 | SYNOPSIS | ||
689 | yocto-kernel features list <bsp-name> | ||
690 | |||
691 | DESCRIPTION | ||
692 | This command lists the complete set of kernel features available | ||
693 | to a BSP. This includes the features contained in linux-yocto | ||
694 | meta branches as well as recipe-space features defined locally to | ||
695 | the BSP. | ||
696 | """ | ||
697 | |||
698 | |||
699 | yocto_kernel_feature_describe_usage = """ | ||
700 | |||
701 | Print the description and compatibility information for a given kernel feature | ||
702 | |||
703 | usage: yocto-kernel feature describe <bsp-name> [/xxxx/yyyy/feature.scc ...] | ||
704 | |||
705 | This command prints the description and compatibility of a specific | ||
706 | feature in the format 'description [compatibility]. | ||
707 | """ | ||
708 | |||
709 | |||
710 | yocto_kernel_feature_describe_help = """ | ||
711 | |||
712 | NAME | ||
713 | yocto-kernel feature describe - print the description and | ||
714 | compatibility information for a given kernel feature | ||
715 | |||
716 | SYNOPSIS | ||
717 | yocto-kernel feature describe <bsp-name> [/xxxx/yyyy/feature.scc ...] | ||
718 | |||
719 | DESCRIPTION | ||
720 | This command prints the description and compatibility of a | ||
721 | specific feature in the format 'description [compatibility]. If | ||
722 | the feature doesn't define a description or compatibility, a | ||
723 | string with generic unknown values will be printed. | ||
724 | """ | ||
725 | |||
726 | |||
727 | yocto_kernel_feature_create_usage = """ | ||
728 | |||
729 | Create a recipe-space kernel feature in a BSP | ||
730 | |||
731 | usage: yocto-kernel feature create <bsp-name> newfeature.scc \ | ||
732 | "Feature Description" capabilities [<CONFIG_XXX=x> ...] [<PATCH> ...] | ||
733 | |||
734 | This command creates a new kernel feature from the bare config | ||
735 | options and patches specified on the command-line. | ||
736 | """ | ||
737 | |||
738 | |||
739 | yocto_kernel_feature_create_help = """ | ||
740 | |||
741 | NAME | ||
742 | yocto-kernel feature create - create a recipe-space kernel feature | ||
743 | in a BSP | ||
744 | |||
745 | SYNOPSIS | ||
746 | yocto-kernel feature create <bsp-name> newfeature.scc \ | ||
747 | "Feature Description" capabilities [<CONFIG_XXX=x> ...] [<PATCH> ...] | ||
748 | |||
749 | DESCRIPTION | ||
750 | This command creates a new kernel feature from the bare config | ||
751 | options and patches specified on the command-line. The new | ||
752 | feature will be created in recipe-space, specifically in either | ||
753 | the kernel .bbappend's /files/cfg or /files/features subdirectory, | ||
754 | depending on whether or not the feature contains config items only | ||
755 | or config items along with patches. The named feature must end | ||
756 | with .scc and must not contain a feature directory to contain the | ||
757 | feature (this will be determined automatically), and a feature | ||
758 | decription in double-quotes along with a capabilities string | ||
759 | (which for the time being can be one of: 'all' or 'board'). | ||
760 | """ | ||
761 | |||
762 | |||
763 | yocto_kernel_feature_destroy_usage = """ | ||
764 | |||
765 | Destroy a recipe-space kernel feature in a BSP | ||
766 | |||
767 | usage: yocto-kernel feature destroy <bsp-name> feature.scc | ||
768 | |||
769 | This command destroys a kernel feature defined in the specified BSP's | ||
770 | recipe-space kernel definition. | ||
771 | """ | ||
772 | |||
773 | |||
774 | yocto_kernel_feature_destroy_help = """ | ||
775 | |||
776 | NAME | ||
777 | yocto-kernel feature destroy <bsp-name> feature.scc - destroy a | ||
778 | recipe-space kernel feature in a BSP | ||
779 | |||
780 | SYNOPSIS | ||
781 | yocto-kernel feature destroy <bsp-name> feature.scc | ||
782 | |||
783 | DESCRIPTION | ||
784 | This command destroys a kernel feature defined in the specified | ||
785 | BSP's recipe-space kernel definition. The named feature must end | ||
786 | with .scc and must not contain a feature directory to contain the | ||
787 | feature (this will be determined automatically). If the kernel | ||
788 | feature is in use by a BSP, it can't be removed until the BSP | ||
789 | stops using it (see yocto-kernel feature rm to stop using it). | ||
790 | """ | ||
791 | |||
792 | ## | ||
793 | # yocto-layer help and usage strings | ||
794 | ## | ||
795 | |||
796 | yocto_layer_usage = """ | ||
797 | |||
798 | Create a generic Yocto layer. | ||
799 | |||
800 | usage: yocto-layer [--version] [--help] COMMAND [ARGS] | ||
801 | |||
802 | Current 'yocto-layer' commands are: | ||
803 | create Create a new generic Yocto layer | ||
804 | list List available values for input options and properties | ||
805 | |||
806 | See 'yocto-layer help COMMAND' for more information on a specific command. | ||
807 | """ | ||
808 | |||
809 | yocto_layer_help_usage = """ | ||
810 | |||
811 | usage: yocto-layer help <subcommand> | ||
812 | |||
813 | This command displays detailed help for the specified subcommand. | ||
814 | """ | ||
815 | |||
816 | yocto_layer_create_usage = """ | ||
817 | |||
818 | Create a new generic Yocto layer | ||
819 | |||
820 | usage: yocto-layer create <layer-name> [layer_priority] | ||
821 | [-o <DIRNAME> | --outdir <DIRNAME>] | ||
822 | [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>] | ||
823 | |||
824 | This command creates a generic Yocto layer based on the specified | ||
825 | parameters. The new layer will be a new Yocto layer contained by | ||
826 | default within the top-level directory specified as | ||
827 | 'meta-layer-name'. The -o option can be used to place the layer in a | ||
828 | directory with a different name and location. | ||
829 | |||
830 | If layer_priority is specified, a simple layer will be created using | ||
831 | the given layer priority, and the user will not be prompted for | ||
832 | further input. | ||
833 | |||
834 | NOTE: Once created, you should add your new layer to your | ||
835 | bblayers.conf file in order for it to be subsequently seen and | ||
836 | modified by the yocto-kernel tool. Instructions for doing this can | ||
837 | be found in the README file generated in the layer's top-level | ||
838 | directory. | ||
839 | |||
840 | See 'yocto layer help create' for more detailed instructions. | ||
841 | """ | ||
842 | |||
843 | yocto_layer_create_help = """ | ||
844 | |||
845 | NAME | ||
846 | yocto-layer create - Create a new generic Yocto layer | ||
847 | |||
848 | SYNOPSIS | ||
849 | yocto-layer create <layer-name> [layer_priority] | ||
850 | [-o <DIRNAME> | --outdir <DIRNAME>] | ||
851 | [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>] | ||
852 | |||
853 | DESCRIPTION | ||
854 | This command creates a generic Yocto layer based on the specified | ||
855 | parameters. The new layer will be a new Yocto layer contained by | ||
856 | default within the top-level directory specified as | ||
857 | 'meta-layer-name'. The -o option can be used to place the layer | ||
858 | in a directory with a different name and location. | ||
859 | |||
860 | If layer_priority is specified, a simple layer will be created | ||
861 | using the given layer priority, and the user will not be prompted | ||
862 | for further input. | ||
863 | |||
864 | The layer-specific properties that define the values that will be | ||
865 | used to generate the layer can be specified on the command-line | ||
866 | using the -i option and supplying a JSON object consisting of the | ||
867 | set of name:value pairs needed by the layer. | ||
868 | |||
869 | If the -i option is not used, the user will be interactively | ||
870 | prompted for each of the required property values, which will then | ||
871 | be used as values for layer generation. | ||
872 | |||
873 | The set of properties available can be listed using the | ||
874 | 'yocto-layer list' command. | ||
875 | |||
876 | Specifying -c causes the Python code generated and executed to | ||
877 | create the layer to be dumped to the 'bspgen.out' file in the | ||
878 | current directory, and is useful for debugging. | ||
879 | |||
880 | NOTE: Once created, you should add your new layer to your | ||
881 | bblayers.conf file in order for it to be subsequently seen and | ||
882 | modified by the yocto-kernel tool. Instructions for doing this | ||
883 | can be found in the README file generated in the layer's top-level | ||
884 | directory. | ||
885 | |||
886 | For example, assuming your poky repo is at /path/to/poky, your new | ||
887 | layer is at /path/to/poky/meta-mylayer, and your build directory | ||
888 | is /path/to/build: | ||
889 | |||
890 | $ gedit /path/to/build/conf/bblayers.conf | ||
891 | |||
892 | BBLAYERS ?= " \\ | ||
893 | /path/to/poky/meta \\ | ||
894 | /path/to/poky/meta-yocto \\ | ||
895 | /path/to/poky/meta-mylayer \\ | ||
896 | " | ||
897 | """ | ||
898 | |||
899 | yocto_layer_list_usage = """ | ||
900 | |||
901 | usage: yocto-layer list properties | ||
902 | [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>] | ||
903 | yocto-layer list property <xxx> | ||
904 | [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>] | ||
905 | |||
906 | This command enumerates the complete set of possible values for a | ||
907 | specified option or property needed by the layer creation process. | ||
908 | |||
909 | The first form enumerates all the possible properties that exist and | ||
910 | must have values specified for them in the 'yocto-layer create' | ||
911 | command. | ||
912 | |||
913 | The second form enumerates all the possible values that exist and can | ||
914 | be specified for any of the enumerable properties in the 'yocto-layer | ||
915 | create' command. | ||
916 | |||
917 | See 'yocto-layer help list' for more details. | ||
918 | """ | ||
919 | |||
920 | yocto_layer_list_help = """ | ||
921 | |||
922 | NAME | ||
923 | yocto-layer list - List available values for layer input options and properties | ||
924 | |||
925 | SYNOPSIS | ||
926 | yocto-layer list properties | ||
927 | [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>] | ||
928 | yocto-layer list property <xxx> | ||
929 | [--o <JSON PROPERTY FILE> | -outfile <JSON PROPERTY_FILE>] | ||
930 | |||
931 | DESCRIPTION | ||
932 | This command enumerates the complete set of possible values for a | ||
933 | specified option or property needed by the layer creation process. | ||
934 | |||
935 | The first form enumerates all the possible properties that exist | ||
936 | and must have values specified for them in the 'yocto-layer | ||
937 | create' command. This command is mainly meant to aid the | ||
938 | development of user interface alternatives to the default | ||
939 | text-based prompting interface. If the -o option is specified, | ||
940 | the list of properties, in addition to being displayed, will be | ||
941 | written to the specified file as a JSON object. In this case, the | ||
942 | object will consist of the set of name:value pairs corresponding | ||
943 | to the (possibly nested) dictionary of properties defined by the | ||
944 | input statements used by the BSP. Some example output for the | ||
945 | 'list properties' command: | ||
946 | |||
947 | $ yocto-layer list properties | ||
948 | "example_bbappend_name" : { | ||
949 | "default" : example | ||
950 | "msg" : Please enter the name you'd like to use for your bbappend file: | ||
951 | "type" : edit | ||
952 | "prio" : 20 | ||
953 | "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall | ||
954 | } | ||
955 | "create_example_recipe" : { | ||
956 | "default" : n | ||
957 | "msg" : Would you like to have an example recipe created? (y/n) | ||
958 | "type" : boolean | ||
959 | "prio" : 20 | ||
960 | "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall | ||
961 | } | ||
962 | "example_recipe_name" : { | ||
963 | "default" : example | ||
964 | "msg" : Please enter the name you'd like to use for your example recipe: | ||
965 | "type" : edit | ||
966 | "prio" : 20 | ||
967 | "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall | ||
968 | } | ||
969 | "layer_priority" : { | ||
970 | "default" : 6 | ||
971 | "msg" : Please enter the layer priority you'd like to use for the layer: | ||
972 | "type" : edit | ||
973 | "prio" : 20 | ||
974 | "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall | ||
975 | } | ||
976 | "create_example_bbappend" : { | ||
977 | "default" : n | ||
978 | "msg" : Would you like to have an example bbappend file created? (y/n) | ||
979 | "type" : boolean | ||
980 | "prio" : 20 | ||
981 | "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall | ||
982 | } | ||
983 | "example_bbappend_version" : { | ||
984 | "default" : 0.1 | ||
985 | "msg" : Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to): | ||
986 | "type" : edit | ||
987 | "prio" : 20 | ||
988 | "filename" : /home/trz/yocto/yocto-layer-dev/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall | ||
989 | } | ||
990 | |||
991 | Each entry in the output consists of the name of the input element | ||
992 | e.g. "layer_priority", followed by the properties defined for that | ||
993 | element enclosed in braces. This information should provide | ||
994 | sufficient information to create a complete user interface. Two | ||
995 | features of the scheme provide for conditional input. First, if a | ||
996 | Python "if" statement appears in place of an input element name, | ||
997 | the set of enclosed input elements apply and should be presented | ||
998 | to the user only if the 'if' statement evaluates to true. The | ||
999 | test in the if statement will always reference another input | ||
1000 | element in the list, which means that the element being tested | ||
1001 | should be presented to the user before the elements enclosed by | ||
1002 | the if block. Secondly, in a similar way, some elements contain | ||
1003 | "depends-on" and depends-on-val" tags, which mean that the | ||
1004 | affected input element should only be presented to the user if the | ||
1005 | element it depends on has already been presented to the user and | ||
1006 | the user has selected the specified value for that element. | ||
1007 | |||
1008 | The second form enumerates all the possible values that exist and | ||
1009 | can be specified for any of the enumerable properties in the | ||
1010 | 'yocto-layer create' command. If the -o option is specified, the | ||
1011 | list of values for the given property, in addition to being | ||
1012 | displayed, will be written to the specified file as a JSON object. | ||
1013 | In this case, the object will consist of the set of name:value | ||
1014 | pairs corresponding to the array of property values associated | ||
1015 | with the property. | ||
1016 | |||
1017 | $ yocto-layer list property layer_priority | ||
1018 | [no output - layer_priority is a text field that has no enumerable values] | ||
1019 | |||
1020 | The second form as well is meant mainly for developers of | ||
1021 | alternative interfaces - it allows the developer to fetch the | ||
1022 | possible values for a given input element on-demand. This | ||
1023 | on-demand capability is especially valuable for elements that | ||
1024 | require relatively expensive remote operations to fulfill, such as | ||
1025 | the example that returns the set of branches available in a remote | ||
1026 | git tree above. | ||
1027 | |||
1028 | """ | ||
1029 | |||
1030 | ## | ||
1031 | # test code | ||
1032 | ## | ||
1033 | |||
1034 | test_bsp_properties = { | ||
1035 | 'smp': 'yes', | ||
1036 | 'touchscreen': 'yes', | ||
1037 | 'keyboard': 'no', | ||
1038 | 'xserver': 'yes', | ||
1039 | 'xserver_choice': 'xserver-i915', | ||
1040 | 'features': ['goodfeature', 'greatfeature'], | ||
1041 | 'tunefile': 'tune-quark', | ||
1042 | } | ||
1043 | |||
diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py new file mode 100644 index 0000000000..ba68b60fcb --- /dev/null +++ b/scripts/lib/bsp/kernel.py | |||
@@ -0,0 +1,1071 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2012, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module implements the kernel-related functions used by | ||
22 | # 'yocto-kernel' to manage kernel config items and patches for Yocto | ||
23 | # BSPs. | ||
24 | # | ||
25 | # AUTHORS | ||
26 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
27 | # | ||
28 | |||
29 | import sys | ||
30 | import os | ||
31 | import shutil | ||
32 | from tags import * | ||
33 | import glob | ||
34 | import subprocess | ||
35 | from engine import create_context | ||
36 | |||
37 | |||
38 | def find_bblayers(): | ||
39 | """ | ||
40 | Find and return a sanitized list of the layers found in BBLAYERS. | ||
41 | """ | ||
42 | try: | ||
43 | builddir = os.environ["BUILDDIR"] | ||
44 | except KeyError: | ||
45 | print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" | ||
46 | sys.exit(1) | ||
47 | bblayers_conf = os.path.join(builddir, "conf/bblayers.conf") | ||
48 | |||
49 | layers = [] | ||
50 | |||
51 | bitbake_env_cmd = "bitbake -e" | ||
52 | bitbake_env_lines = subprocess.Popen(bitbake_env_cmd, shell=True, | ||
53 | stdout=subprocess.PIPE).stdout.read() | ||
54 | |||
55 | if not bitbake_env_lines: | ||
56 | print "Couldn't get '%s' output, exiting." % bitbake_env_cmd | ||
57 | sys.exit(1) | ||
58 | |||
59 | for line in bitbake_env_lines.split('\n'): | ||
60 | bblayers = get_line_val(line, "BBLAYERS") | ||
61 | if (bblayers): | ||
62 | break | ||
63 | |||
64 | if not bblayers: | ||
65 | print "Couldn't find BBLAYERS in %s output, exiting." % \ | ||
66 | bitbake_env_cmd | ||
67 | sys.exit(1) | ||
68 | |||
69 | raw_layers = bblayers.split() | ||
70 | |||
71 | for layer in raw_layers: | ||
72 | if layer == 'BBLAYERS' or '=' in layer: | ||
73 | continue | ||
74 | layers.append(layer) | ||
75 | |||
76 | return layers | ||
77 | |||
78 | |||
79 | def get_line_val(line, key): | ||
80 | """ | ||
81 | Extract the value from the VAR="val" string | ||
82 | """ | ||
83 | if line.startswith(key + "="): | ||
84 | stripped_line = line.split('=')[1] | ||
85 | stripped_line = stripped_line.replace('\"', '') | ||
86 | return stripped_line | ||
87 | return None | ||
88 | |||
89 | |||
90 | def find_meta_layer(): | ||
91 | """ | ||
92 | Find and return the meta layer in BBLAYERS. | ||
93 | """ | ||
94 | layers = find_bblayers() | ||
95 | |||
96 | for layer in layers: | ||
97 | if layer.endswith("meta"): | ||
98 | return layer | ||
99 | |||
100 | return None | ||
101 | |||
102 | |||
103 | def find_bsp_layer(machine): | ||
104 | """ | ||
105 | Find and return a machine's BSP layer in BBLAYERS. | ||
106 | """ | ||
107 | layers = find_bblayers() | ||
108 | |||
109 | for layer in layers: | ||
110 | if layer.endswith(machine): | ||
111 | return layer | ||
112 | |||
113 | print "Unable to find the BSP layer for machine %s." % machine | ||
114 | print "Please make sure it is listed in bblayers.conf" | ||
115 | sys.exit(1) | ||
116 | |||
117 | |||
118 | def gen_choices_str(choices): | ||
119 | """ | ||
120 | Generate a numbered list of choices from a list of choices for | ||
121 | display to the user. | ||
122 | """ | ||
123 | choices_str = "" | ||
124 | |||
125 | for i, choice in enumerate(choices): | ||
126 | choices_str += "\t" + str(i + 1) + ") " + choice + "\n" | ||
127 | |||
128 | return choices_str | ||
129 | |||
130 | |||
131 | def open_user_file(scripts_path, machine, userfile, mode): | ||
132 | """ | ||
133 | Find one of the user files (user-config.cfg, user-patches.scc) | ||
134 | associated with the machine (could be in files/, | ||
135 | linux-yocto-custom/, etc). Returns the open file if found, None | ||
136 | otherwise. | ||
137 | |||
138 | The caller is responsible for closing the file returned. | ||
139 | """ | ||
140 | layer = find_bsp_layer(machine) | ||
141 | linuxdir = os.path.join(layer, "recipes-kernel/linux") | ||
142 | linuxdir_list = os.listdir(linuxdir) | ||
143 | for fileobj in linuxdir_list: | ||
144 | fileobj_path = os.path.join(linuxdir, fileobj) | ||
145 | if os.path.isdir(fileobj_path): | ||
146 | userfile_name = os.path.join(fileobj_path, userfile) | ||
147 | try: | ||
148 | f = open(userfile_name, mode) | ||
149 | return f | ||
150 | except IOError: | ||
151 | continue | ||
152 | return None | ||
153 | |||
154 | |||
155 | def read_config_items(scripts_path, machine): | ||
156 | """ | ||
157 | Find and return a list of config items (CONFIG_XXX) in a machine's | ||
158 | user-defined config fragment [${machine}-user-config.cfg]. | ||
159 | """ | ||
160 | config_items = [] | ||
161 | |||
162 | f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "r") | ||
163 | lines = f.readlines() | ||
164 | for line in lines: | ||
165 | s = line.strip() | ||
166 | if s and not s.startswith("#"): | ||
167 | config_items.append(s) | ||
168 | f.close() | ||
169 | |||
170 | return config_items | ||
171 | |||
172 | |||
173 | def write_config_items(scripts_path, machine, config_items): | ||
174 | """ | ||
175 | Write (replace) the list of config items (CONFIG_XXX) in a | ||
176 | machine's user-defined config fragment [${machine}=user-config.cfg]. | ||
177 | """ | ||
178 | f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "w") | ||
179 | for item in config_items: | ||
180 | f.write(item + "\n") | ||
181 | f.close() | ||
182 | |||
183 | kernel_contents_changed(scripts_path, machine) | ||
184 | |||
185 | |||
186 | def yocto_kernel_config_list(scripts_path, machine): | ||
187 | """ | ||
188 | Display the list of config items (CONFIG_XXX) in a machine's | ||
189 | user-defined config fragment [${machine}-user-config.cfg]. | ||
190 | """ | ||
191 | config_items = read_config_items(scripts_path, machine) | ||
192 | |||
193 | print "The current set of machine-specific kernel config items for %s is:" % machine | ||
194 | print gen_choices_str(config_items) | ||
195 | |||
196 | |||
197 | def yocto_kernel_config_rm(scripts_path, machine): | ||
198 | """ | ||
199 | Display the list of config items (CONFIG_XXX) in a machine's | ||
200 | user-defined config fragment [${machine}-user-config.cfg], prompt the user | ||
201 | for one or more to remove, and remove them. | ||
202 | """ | ||
203 | config_items = read_config_items(scripts_path, machine) | ||
204 | |||
205 | print "Specify the kernel config items to remove:" | ||
206 | input = raw_input(gen_choices_str(config_items)) | ||
207 | rm_choices = input.split() | ||
208 | rm_choices.sort() | ||
209 | |||
210 | removed = [] | ||
211 | |||
212 | for choice in reversed(rm_choices): | ||
213 | try: | ||
214 | idx = int(choice) - 1 | ||
215 | except ValueError: | ||
216 | print "Invalid choice (%s), exiting" % choice | ||
217 | sys.exit(1) | ||
218 | if idx < 0 or idx >= len(config_items): | ||
219 | print "Invalid choice (%d), exiting" % (idx + 1) | ||
220 | sys.exit(1) | ||
221 | removed.append(config_items.pop(idx)) | ||
222 | |||
223 | write_config_items(scripts_path, machine, config_items) | ||
224 | |||
225 | print "Removed items:" | ||
226 | for r in removed: | ||
227 | print "\t%s" % r | ||
228 | |||
229 | |||
230 | def yocto_kernel_config_add(scripts_path, machine, config_items): | ||
231 | """ | ||
232 | Add one or more config items (CONFIG_XXX) to a machine's | ||
233 | user-defined config fragment [${machine}-user-config.cfg]. | ||
234 | """ | ||
235 | new_items = [] | ||
236 | dup_items = [] | ||
237 | |||
238 | cur_items = read_config_items(scripts_path, machine) | ||
239 | |||
240 | for item in config_items: | ||
241 | if not item.startswith("CONFIG") or (not "=y" in item and not "=m" in item): | ||
242 | print "Invalid config item (%s), exiting" % item | ||
243 | sys.exit(1) | ||
244 | if item not in cur_items and item not in new_items: | ||
245 | new_items.append(item) | ||
246 | else: | ||
247 | dup_items.append(item) | ||
248 | |||
249 | if len(new_items) > 0: | ||
250 | cur_items.extend(new_items) | ||
251 | write_config_items(scripts_path, machine, cur_items) | ||
252 | print "Added item%s:" % ("" if len(new_items)==1 else "s") | ||
253 | for n in new_items: | ||
254 | print "\t%s" % n | ||
255 | |||
256 | if len(dup_items) > 0: | ||
257 | output="The following item%s already exist%s in the current configuration, ignoring %s:" % \ | ||
258 | (("","s", "it") if len(dup_items)==1 else ("s", "", "them" )) | ||
259 | print output | ||
260 | for n in dup_items: | ||
261 | print "\t%s" % n | ||
262 | |||
263 | def find_current_kernel(bsp_layer, machine): | ||
264 | """ | ||
265 | Determine the kernel and version currently being used in the BSP. | ||
266 | """ | ||
267 | machine_conf = os.path.join(bsp_layer, "conf/machine/" + machine + ".conf") | ||
268 | |||
269 | preferred_kernel = preferred_kernel_version = preferred_version_varname = None | ||
270 | |||
271 | f = open(machine_conf, "r") | ||
272 | lines = f.readlines() | ||
273 | for line in lines: | ||
274 | if line.strip().startswith("PREFERRED_PROVIDER_virtual/kernel"): | ||
275 | preferred_kernel = line.split()[-1] | ||
276 | preferred_kernel = preferred_kernel.replace('\"','') | ||
277 | preferred_version_varname = "PREFERRED_VERSION_" + preferred_kernel | ||
278 | if preferred_version_varname and line.strip().startswith(preferred_version_varname): | ||
279 | preferred_kernel_version = line.split()[-1] | ||
280 | preferred_kernel_version = preferred_kernel_version.replace('\"','') | ||
281 | preferred_kernel_version = preferred_kernel_version.replace('%','') | ||
282 | |||
283 | if preferred_kernel and preferred_kernel_version: | ||
284 | return preferred_kernel + "_" + preferred_kernel_version | ||
285 | elif preferred_kernel: | ||
286 | return preferred_kernel | ||
287 | |||
288 | |||
289 | def find_filesdir(scripts_path, machine): | ||
290 | """ | ||
291 | Find the name of the 'files' dir associated with the machine | ||
292 | (could be in files/, linux-yocto-custom/, etc). Returns the name | ||
293 | of the files dir if found, None otherwise. | ||
294 | """ | ||
295 | layer = find_bsp_layer(machine) | ||
296 | filesdir = None | ||
297 | linuxdir = os.path.join(layer, "recipes-kernel/linux") | ||
298 | linuxdir_list = os.listdir(linuxdir) | ||
299 | for fileobj in linuxdir_list: | ||
300 | fileobj_path = os.path.join(linuxdir, fileobj) | ||
301 | if os.path.isdir(fileobj_path): | ||
302 | # this could be files/ or linux-yocto-custom/, we have no way of distinguishing | ||
303 | # so we take the first (and normally only) dir we find as the 'filesdir' | ||
304 | filesdir = fileobj_path | ||
305 | |||
306 | return filesdir | ||
307 | |||
308 | |||
309 | def read_patch_items(scripts_path, machine): | ||
310 | """ | ||
311 | Find and return a list of patch items in a machine's user-defined | ||
312 | patch list [${machine}-user-patches.scc]. | ||
313 | """ | ||
314 | patch_items = [] | ||
315 | |||
316 | f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "r") | ||
317 | lines = f.readlines() | ||
318 | for line in lines: | ||
319 | s = line.strip() | ||
320 | if s and not s.startswith("#"): | ||
321 | fields = s.split() | ||
322 | if not fields[0] == "patch": | ||
323 | continue | ||
324 | patch_items.append(fields[1]) | ||
325 | f.close() | ||
326 | |||
327 | return patch_items | ||
328 | |||
329 | |||
330 | def write_patch_items(scripts_path, machine, patch_items): | ||
331 | """ | ||
332 | Write (replace) the list of patches in a machine's user-defined | ||
333 | patch list [${machine}-user-patches.scc]. | ||
334 | """ | ||
335 | f = open_user_file(scripts_path, machine, machine+"-user-patches.scc", "w") | ||
336 | for item in patch_items: | ||
337 | f.write("patch " + item + "\n") | ||
338 | f.close() | ||
339 | |||
340 | kernel_contents_changed(scripts_path, machine) | ||
341 | |||
342 | |||
343 | def yocto_kernel_patch_list(scripts_path, machine): | ||
344 | """ | ||
345 | Display the list of patches in a machine's user-defined patch list | ||
346 | [${machine}-user-patches.scc]. | ||
347 | """ | ||
348 | patches = read_patch_items(scripts_path, machine) | ||
349 | |||
350 | print "The current set of machine-specific patches for %s is:" % machine | ||
351 | print gen_choices_str(patches) | ||
352 | |||
353 | |||
354 | def yocto_kernel_patch_rm(scripts_path, machine): | ||
355 | """ | ||
356 | Remove one or more patches from a machine's user-defined patch | ||
357 | list [${machine}-user-patches.scc]. | ||
358 | """ | ||
359 | patches = read_patch_items(scripts_path, machine) | ||
360 | |||
361 | print "Specify the patches to remove:" | ||
362 | input = raw_input(gen_choices_str(patches)) | ||
363 | rm_choices = input.split() | ||
364 | rm_choices.sort() | ||
365 | |||
366 | removed = [] | ||
367 | |||
368 | filesdir = find_filesdir(scripts_path, machine) | ||
369 | if not filesdir: | ||
370 | print "Couldn't rm patch(es) since we couldn't find a 'files' dir" | ||
371 | sys.exit(1) | ||
372 | |||
373 | for choice in reversed(rm_choices): | ||
374 | try: | ||
375 | idx = int(choice) - 1 | ||
376 | except ValueError: | ||
377 | print "Invalid choice (%s), exiting" % choice | ||
378 | sys.exit(1) | ||
379 | if idx < 0 or idx >= len(patches): | ||
380 | print "Invalid choice (%d), exiting" % (idx + 1) | ||
381 | sys.exit(1) | ||
382 | filesdir_patch = os.path.join(filesdir, patches[idx]) | ||
383 | if os.path.isfile(filesdir_patch): | ||
384 | os.remove(filesdir_patch) | ||
385 | removed.append(patches[idx]) | ||
386 | patches.pop(idx) | ||
387 | |||
388 | write_patch_items(scripts_path, machine, patches) | ||
389 | |||
390 | print "Removed patches:" | ||
391 | for r in removed: | ||
392 | print "\t%s" % r | ||
393 | |||
394 | |||
395 | def yocto_kernel_patch_add(scripts_path, machine, patches): | ||
396 | """ | ||
397 | Add one or more patches to a machine's user-defined patch list | ||
398 | [${machine}-user-patches.scc]. | ||
399 | """ | ||
400 | existing_patches = read_patch_items(scripts_path, machine) | ||
401 | |||
402 | for patch in patches: | ||
403 | if os.path.basename(patch) in existing_patches: | ||
404 | print "Couldn't add patch (%s) since it's already been added" % os.path.basename(patch) | ||
405 | sys.exit(1) | ||
406 | |||
407 | filesdir = find_filesdir(scripts_path, machine) | ||
408 | if not filesdir: | ||
409 | print "Couldn't add patch (%s) since we couldn't find a 'files' dir to add it to" % os.path.basename(patch) | ||
410 | sys.exit(1) | ||
411 | |||
412 | new_patches = [] | ||
413 | |||
414 | for patch in patches: | ||
415 | if not os.path.isfile(patch): | ||
416 | print "Couldn't find patch (%s), exiting" % patch | ||
417 | sys.exit(1) | ||
418 | basename = os.path.basename(patch) | ||
419 | filesdir_patch = os.path.join(filesdir, basename) | ||
420 | shutil.copyfile(patch, filesdir_patch) | ||
421 | new_patches.append(basename) | ||
422 | |||
423 | cur_items = read_patch_items(scripts_path, machine) | ||
424 | cur_items.extend(new_patches) | ||
425 | write_patch_items(scripts_path, machine, cur_items) | ||
426 | |||
427 | print "Added patches:" | ||
428 | for n in new_patches: | ||
429 | print "\t%s" % n | ||
430 | |||
431 | |||
432 | def inc_pr(line): | ||
433 | """ | ||
434 | Add 1 to the PR value in the given bbappend PR line. For the PR | ||
435 | lines in kernel .bbappends after modifications. Handles PRs of | ||
436 | the form PR := "${PR}.1" as well as PR = "r0". | ||
437 | """ | ||
438 | idx = line.find("\"") | ||
439 | |||
440 | pr_str = line[idx:] | ||
441 | pr_str = pr_str.replace('\"','') | ||
442 | fields = pr_str.split('.') | ||
443 | if len(fields) > 1: | ||
444 | fields[1] = str(int(fields[1]) + 1) | ||
445 | pr_str = "\"" + '.'.join(fields) + "\"\n" | ||
446 | else: | ||
447 | pr_val = pr_str[1:] | ||
448 | pr_str = "\"" + "r" + str(int(pr_val) + 1) + "\"\n" | ||
449 | idx2 = line.find("\"", idx + 1) | ||
450 | line = line[:idx] + pr_str | ||
451 | |||
452 | return line | ||
453 | |||
454 | |||
455 | def kernel_contents_changed(scripts_path, machine): | ||
456 | """ | ||
457 | Do what we need to do to notify the system that the kernel | ||
458 | recipe's contents have changed. | ||
459 | """ | ||
460 | layer = find_bsp_layer(machine) | ||
461 | |||
462 | kernel = find_current_kernel(layer, machine) | ||
463 | if not kernel: | ||
464 | print "Couldn't determine the kernel for this BSP, exiting." | ||
465 | sys.exit(1) | ||
466 | |||
467 | kernel_bbfile = os.path.join(layer, "recipes-kernel/linux/" + kernel + ".bbappend") | ||
468 | if not os.path.isfile(kernel_bbfile): | ||
469 | kernel_bbfile = os.path.join(layer, "recipes-kernel/linux/" + kernel + ".bb") | ||
470 | if not os.path.isfile(kernel_bbfile): | ||
471 | return | ||
472 | kernel_bbfile_prev = kernel_bbfile + ".prev" | ||
473 | shutil.copyfile(kernel_bbfile, kernel_bbfile_prev) | ||
474 | |||
475 | ifile = open(kernel_bbfile_prev, "r") | ||
476 | ofile = open(kernel_bbfile, "w") | ||
477 | ifile_lines = ifile.readlines() | ||
478 | for ifile_line in ifile_lines: | ||
479 | if ifile_line.strip().startswith("PR"): | ||
480 | ifile_line = inc_pr(ifile_line) | ||
481 | ofile.write(ifile_line) | ||
482 | ofile.close() | ||
483 | ifile.close() | ||
484 | |||
485 | |||
486 | def kernels(context): | ||
487 | """ | ||
488 | Return the list of available kernels in the BSP i.e. corresponding | ||
489 | to the kernel .bbappends found in the layer. | ||
490 | """ | ||
491 | archdir = os.path.join(context["scripts_path"], "lib/bsp/substrate/target/arch/" + context["arch"]) | ||
492 | kerndir = os.path.join(archdir, "recipes-kernel/linux") | ||
493 | bbglob = os.path.join(kerndir, "*.bbappend") | ||
494 | |||
495 | bbappends = glob.glob(bbglob) | ||
496 | |||
497 | kernels = [] | ||
498 | |||
499 | for kernel in bbappends: | ||
500 | filename = os.path.splitext(os.path.basename(kernel))[0] | ||
501 | idx = filename.find(CLOSE_TAG) | ||
502 | if idx != -1: | ||
503 | filename = filename[idx + len(CLOSE_TAG):].strip() | ||
504 | kernels.append(filename) | ||
505 | |||
506 | kernels.append("custom") | ||
507 | |||
508 | return kernels | ||
509 | |||
510 | |||
511 | def extract_giturl(file): | ||
512 | """ | ||
513 | Extract the git url of the kernel repo from the kernel recipe's | ||
514 | SRC_URI. | ||
515 | """ | ||
516 | url = None | ||
517 | f = open(file, "r") | ||
518 | lines = f.readlines() | ||
519 | for line in lines: | ||
520 | line = line.strip() | ||
521 | if line.startswith("SRC_URI"): | ||
522 | line = line[len("SRC_URI"):].strip() | ||
523 | if line.startswith("="): | ||
524 | line = line[1:].strip() | ||
525 | if line.startswith("\""): | ||
526 | line = line[1:].strip() | ||
527 | prot = "git" | ||
528 | for s in line.split(";"): | ||
529 | if s.startswith("git://"): | ||
530 | url = s | ||
531 | if s.startswith("protocol="): | ||
532 | prot = s.split("=")[1] | ||
533 | if url: | ||
534 | url = prot + url[3:] | ||
535 | return url | ||
536 | |||
537 | |||
538 | def find_giturl(context): | ||
539 | """ | ||
540 | Find the git url of the kernel repo from the kernel recipe's | ||
541 | SRC_URI. | ||
542 | """ | ||
543 | name = context["name"] | ||
544 | filebase = context["filename"] | ||
545 | scripts_path = context["scripts_path"] | ||
546 | |||
547 | meta_layer = find_meta_layer() | ||
548 | |||
549 | kerndir = os.path.join(meta_layer, "recipes-kernel/linux") | ||
550 | bbglob = os.path.join(kerndir, "*.bb") | ||
551 | bbs = glob.glob(bbglob) | ||
552 | for kernel in bbs: | ||
553 | filename = os.path.splitext(os.path.basename(kernel))[0] | ||
554 | if filename in filebase: | ||
555 | giturl = extract_giturl(kernel) | ||
556 | return giturl | ||
557 | |||
558 | return None | ||
559 | |||
560 | |||
561 | def read_features(scripts_path, machine): | ||
562 | """ | ||
563 | Find and return a list of features in a machine's user-defined | ||
564 | features fragment [${machine}-user-features.scc]. | ||
565 | """ | ||
566 | features = [] | ||
567 | |||
568 | f = open_user_file(scripts_path, machine, machine+"-user-features.scc", "r") | ||
569 | lines = f.readlines() | ||
570 | for line in lines: | ||
571 | s = line.strip() | ||
572 | if s and not s.startswith("#"): | ||
573 | feature_include = s.split() | ||
574 | features.append(feature_include[1].strip()) | ||
575 | f.close() | ||
576 | |||
577 | return features | ||
578 | |||
579 | |||
580 | def write_features(scripts_path, machine, features): | ||
581 | """ | ||
582 | Write (replace) the list of feature items in a | ||
583 | machine's user-defined features fragment [${machine}=user-features.cfg]. | ||
584 | """ | ||
585 | f = open_user_file(scripts_path, machine, machine+"-user-features.scc", "w") | ||
586 | for item in features: | ||
587 | f.write("include " + item + "\n") | ||
588 | f.close() | ||
589 | |||
590 | kernel_contents_changed(scripts_path, machine) | ||
591 | |||
592 | |||
593 | def yocto_kernel_feature_list(scripts_path, machine): | ||
594 | """ | ||
595 | Display the list of features used in a machine's user-defined | ||
596 | features fragment [${machine}-user-features.scc]. | ||
597 | """ | ||
598 | features = read_features(scripts_path, machine) | ||
599 | |||
600 | print "The current set of machine-specific features for %s is:" % machine | ||
601 | print gen_choices_str(features) | ||
602 | |||
603 | |||
604 | def yocto_kernel_feature_rm(scripts_path, machine): | ||
605 | """ | ||
606 | Display the list of features used in a machine's user-defined | ||
607 | features fragment [${machine}-user-features.scc], prompt the user | ||
608 | for one or more to remove, and remove them. | ||
609 | """ | ||
610 | features = read_features(scripts_path, machine) | ||
611 | |||
612 | print "Specify the features to remove:" | ||
613 | input = raw_input(gen_choices_str(features)) | ||
614 | rm_choices = input.split() | ||
615 | rm_choices.sort() | ||
616 | |||
617 | removed = [] | ||
618 | |||
619 | for choice in reversed(rm_choices): | ||
620 | try: | ||
621 | idx = int(choice) - 1 | ||
622 | except ValueError: | ||
623 | print "Invalid choice (%s), exiting" % choice | ||
624 | sys.exit(1) | ||
625 | if idx < 0 or idx >= len(features): | ||
626 | print "Invalid choice (%d), exiting" % (idx + 1) | ||
627 | sys.exit(1) | ||
628 | removed.append(features.pop(idx)) | ||
629 | |||
630 | write_features(scripts_path, machine, features) | ||
631 | |||
632 | print "Removed features:" | ||
633 | for r in removed: | ||
634 | print "\t%s" % r | ||
635 | |||
636 | |||
637 | def yocto_kernel_feature_add(scripts_path, machine, features): | ||
638 | """ | ||
639 | Add one or more features a machine's user-defined features | ||
640 | fragment [${machine}-user-features.scc]. | ||
641 | """ | ||
642 | new_items = [] | ||
643 | |||
644 | for item in features: | ||
645 | if not item.endswith(".scc"): | ||
646 | print "Invalid feature (%s), exiting" % item | ||
647 | sys.exit(1) | ||
648 | new_items.append(item) | ||
649 | |||
650 | cur_items = read_features(scripts_path, machine) | ||
651 | cur_items.extend(new_items) | ||
652 | |||
653 | write_features(scripts_path, machine, cur_items) | ||
654 | |||
655 | print "Added features:" | ||
656 | for n in new_items: | ||
657 | print "\t%s" % n | ||
658 | |||
659 | |||
660 | def find_feature_url(git_url): | ||
661 | """ | ||
662 | Find the url of the kern-features.rc kernel for the kernel repo | ||
663 | specified from the BSP's kernel recipe SRC_URI. | ||
664 | """ | ||
665 | feature_url = "" | ||
666 | if git_url.startswith("git://"): | ||
667 | git_url = git_url[len("git://"):].strip() | ||
668 | s = git_url.split("/") | ||
669 | if s[1].endswith(".git"): | ||
670 | s[1] = s[1][:len(s[1]) - len(".git")] | ||
671 | feature_url = "http://" + s[0] + "/cgit/cgit.cgi/" + s[1] + \ | ||
672 | "/plain/meta/cfg/kern-features.rc?h=meta" | ||
673 | |||
674 | return feature_url | ||
675 | |||
676 | |||
677 | def find_feature_desc(lines): | ||
678 | """ | ||
679 | Find the feature description and compatibility in the passed-in | ||
680 | set of lines. Returns a string string of the form 'desc | ||
681 | [compat]'. | ||
682 | """ | ||
683 | desc = "no description available" | ||
684 | compat = "unknown" | ||
685 | |||
686 | for line in lines: | ||
687 | idx = line.find("KFEATURE_DESCRIPTION") | ||
688 | if idx != -1: | ||
689 | desc = line[idx + len("KFEATURE_DESCRIPTION"):].strip() | ||
690 | if desc.startswith("\""): | ||
691 | desc = desc[1:] | ||
692 | if desc.endswith("\""): | ||
693 | desc = desc[:-1] | ||
694 | else: | ||
695 | idx = line.find("KFEATURE_COMPATIBILITY") | ||
696 | if idx != -1: | ||
697 | compat = line[idx + len("KFEATURE_COMPATIBILITY"):].strip() | ||
698 | |||
699 | return desc + " [" + compat + "]" | ||
700 | |||
701 | |||
702 | def print_feature_descs(layer, feature_dir): | ||
703 | """ | ||
704 | Print the feature descriptions for the features in feature_dir. | ||
705 | """ | ||
706 | kernel_files_features = os.path.join(layer, "recipes-kernel/linux/files/" + | ||
707 | feature_dir) | ||
708 | for root, dirs, files in os.walk(kernel_files_features): | ||
709 | for file in files: | ||
710 | if file.endswith("~") or file.endswith("#"): | ||
711 | continue | ||
712 | if file.endswith(".scc"): | ||
713 | fullpath = os.path.join(layer, "recipes-kernel/linux/files/" + | ||
714 | feature_dir + "/" + file) | ||
715 | f = open(fullpath) | ||
716 | feature_desc = find_feature_desc(f.readlines()) | ||
717 | print feature_dir + "/" + file + ": " + feature_desc | ||
718 | |||
719 | |||
720 | def yocto_kernel_available_features_list(scripts_path, machine): | ||
721 | """ | ||
722 | Display the list of all the kernel features available for use in | ||
723 | BSPs, as gathered from the set of feature sources. | ||
724 | """ | ||
725 | layer = find_bsp_layer(machine) | ||
726 | kernel = find_current_kernel(layer, machine) | ||
727 | if not kernel: | ||
728 | print "Couldn't determine the kernel for this BSP, exiting." | ||
729 | sys.exit(1) | ||
730 | |||
731 | context = create_context(machine, "arch", scripts_path) | ||
732 | context["name"] = "name" | ||
733 | context["filename"] = kernel | ||
734 | giturl = find_giturl(context) | ||
735 | feature_url = find_feature_url(giturl) | ||
736 | |||
737 | feature_cmd = "wget -q -O - " + feature_url | ||
738 | tmp = subprocess.Popen(feature_cmd, shell=True, stdout=subprocess.PIPE).stdout.read() | ||
739 | |||
740 | print "The current set of kernel features available to %s is:\n" % machine | ||
741 | |||
742 | if tmp: | ||
743 | tmpline = tmp.split("\n") | ||
744 | in_kernel_options = False | ||
745 | for line in tmpline: | ||
746 | if not "=" in line: | ||
747 | if in_kernel_options: | ||
748 | break | ||
749 | if "kernel-options" in line: | ||
750 | in_kernel_options = True | ||
751 | continue | ||
752 | if in_kernel_options: | ||
753 | feature_def = line.split("=") | ||
754 | feature_type = feature_def[0].strip() | ||
755 | feature = feature_def[1].strip() | ||
756 | desc = get_feature_desc(giturl, feature) | ||
757 | print "%s: %s" % (feature, desc) | ||
758 | |||
759 | print "[local]" | ||
760 | |||
761 | print_feature_descs(layer, "cfg") | ||
762 | print_feature_descs(layer, "features") | ||
763 | |||
764 | |||
765 | def find_feature_desc_url(git_url, feature): | ||
766 | """ | ||
767 | Find the url of the kernel feature in the kernel repo specified | ||
768 | from the BSP's kernel recipe SRC_URI. | ||
769 | """ | ||
770 | feature_desc_url = "" | ||
771 | if git_url.startswith("git://"): | ||
772 | git_url = git_url[len("git://"):].strip() | ||
773 | s = git_url.split("/") | ||
774 | if s[1].endswith(".git"): | ||
775 | s[1] = s[1][:len(s[1]) - len(".git")] | ||
776 | feature_desc_url = "http://" + s[0] + "/cgit/cgit.cgi/" + s[1] + \ | ||
777 | "/plain/meta/cfg/kernel-cache/" + feature + "?h=meta" | ||
778 | |||
779 | return feature_desc_url | ||
780 | |||
781 | |||
782 | def get_feature_desc(git_url, feature): | ||
783 | """ | ||
784 | Return a feature description of the form 'description [compatibility] | ||
785 | BSPs, as gathered from the set of feature sources. | ||
786 | """ | ||
787 | feature_desc_url = find_feature_desc_url(git_url, feature) | ||
788 | feature_desc_cmd = "wget -q -O - " + feature_desc_url | ||
789 | tmp = subprocess.Popen(feature_desc_cmd, shell=True, stdout=subprocess.PIPE).stdout.read() | ||
790 | |||
791 | return find_feature_desc(tmp.split("\n")) | ||
792 | |||
793 | |||
794 | def yocto_kernel_feature_describe(scripts_path, machine, feature): | ||
795 | """ | ||
796 | Display the description of a specific kernel feature available for | ||
797 | use in a BSP. | ||
798 | """ | ||
799 | layer = find_bsp_layer(machine) | ||
800 | |||
801 | kernel = find_current_kernel(layer, machine) | ||
802 | if not kernel: | ||
803 | print "Couldn't determine the kernel for this BSP, exiting." | ||
804 | sys.exit(1) | ||
805 | |||
806 | context = create_context(machine, "arch", scripts_path) | ||
807 | context["name"] = "name" | ||
808 | context["filename"] = kernel | ||
809 | giturl = find_giturl(context) | ||
810 | |||
811 | desc = get_feature_desc(giturl, feature) | ||
812 | |||
813 | print desc | ||
814 | |||
815 | |||
816 | def check_feature_name(feature_name): | ||
817 | """ | ||
818 | Sanity-check the feature name for create/destroy. Return False if not OK. | ||
819 | """ | ||
820 | if not feature_name.endswith(".scc"): | ||
821 | print "Invalid feature name (must end with .scc) [%s], exiting" % feature_name | ||
822 | return False | ||
823 | |||
824 | if "/" in feature_name: | ||
825 | print "Invalid feature name (don't specify directory) [%s], exiting" % feature_name | ||
826 | return False | ||
827 | |||
828 | return True | ||
829 | |||
830 | |||
831 | def check_create_input(feature_items): | ||
832 | """ | ||
833 | Sanity-check the create input. Return False if not OK. | ||
834 | """ | ||
835 | if not check_feature_name(feature_items[0]): | ||
836 | return False | ||
837 | |||
838 | if feature_items[1].endswith(".patch") or feature_items[1].startswith("CONFIG_"): | ||
839 | print "Missing description and/or compatibilty [%s], exiting" % feature_items[1] | ||
840 | return False | ||
841 | |||
842 | if feature_items[2].endswith(".patch") or feature_items[2].startswith("CONFIG_"): | ||
843 | print "Missing description and/or compatibility [%s], exiting" % feature_items[1] | ||
844 | return False | ||
845 | |||
846 | return True | ||
847 | |||
848 | |||
849 | def yocto_kernel_feature_create(scripts_path, machine, feature_items): | ||
850 | """ | ||
851 | Create a recipe-space kernel feature in a BSP. | ||
852 | """ | ||
853 | if not check_create_input(feature_items): | ||
854 | sys.exit(1) | ||
855 | |||
856 | feature = feature_items[0] | ||
857 | feature_basename = feature.split(".")[0] | ||
858 | feature_description = feature_items[1] | ||
859 | feature_compat = feature_items[2] | ||
860 | |||
861 | patches = [] | ||
862 | cfg_items = [] | ||
863 | |||
864 | for item in feature_items[3:]: | ||
865 | if item.endswith(".patch"): | ||
866 | patches.append(item) | ||
867 | elif item.startswith("CONFIG"): | ||
868 | if ("=y" in item or "=m" in item): | ||
869 | cfg_items.append(item) | ||
870 | else: | ||
871 | print "Invalid feature item (must be .patch or CONFIG_*) [%s], exiting" % item | ||
872 | sys.exit(1) | ||
873 | |||
874 | feature_dirname = "cfg" | ||
875 | if patches: | ||
876 | feature_dirname = "features" | ||
877 | |||
878 | filesdir = find_filesdir(scripts_path, machine) | ||
879 | if not filesdir: | ||
880 | print "Couldn't add feature (%s), no 'files' dir found" % feature | ||
881 | sys.exit(1) | ||
882 | |||
883 | featdir = os.path.join(filesdir, feature_dirname) | ||
884 | if not os.path.exists(featdir): | ||
885 | os.mkdir(featdir) | ||
886 | |||
887 | for patch in patches: | ||
888 | if not os.path.isfile(patch): | ||
889 | print "Couldn't find patch (%s), exiting" % patch | ||
890 | sys.exit(1) | ||
891 | basename = os.path.basename(patch) | ||
892 | featdir_patch = os.path.join(featdir, basename) | ||
893 | shutil.copyfile(patch, featdir_patch) | ||
894 | |||
895 | new_cfg_filename = os.path.join(featdir, feature_basename + ".cfg") | ||
896 | new_cfg_file = open(new_cfg_filename, "w") | ||
897 | for cfg_item in cfg_items: | ||
898 | new_cfg_file.write(cfg_item + "\n") | ||
899 | new_cfg_file.close() | ||
900 | |||
901 | new_feature_filename = os.path.join(featdir, feature_basename + ".scc") | ||
902 | new_feature_file = open(new_feature_filename, "w") | ||
903 | new_feature_file.write("define KFEATURE_DESCRIPTION \"" + feature_description + "\"\n") | ||
904 | new_feature_file.write("define KFEATURE_COMPATIBILITY " + feature_compat + "\n\n") | ||
905 | |||
906 | for patch in patches: | ||
907 | patch_dir, patch_file = os.path.split(patch) | ||
908 | new_feature_file.write("patch " + patch_file + "\n") | ||
909 | |||
910 | new_feature_file.write("kconf non-hardware " + feature_basename + ".cfg\n") | ||
911 | new_feature_file.close() | ||
912 | |||
913 | print "Added feature:" | ||
914 | print "\t%s" % feature_dirname + "/" + feature | ||
915 | |||
916 | |||
917 | def feature_in_use(scripts_path, machine, feature): | ||
918 | """ | ||
919 | Determine whether the specified feature is in use by the BSP. | ||
920 | Return True if so, False otherwise. | ||
921 | """ | ||
922 | features = read_features(scripts_path, machine) | ||
923 | for f in features: | ||
924 | if f == feature: | ||
925 | return True | ||
926 | return False | ||
927 | |||
928 | |||
929 | def feature_remove(scripts_path, machine, feature): | ||
930 | """ | ||
931 | Remove the specified feature from the available recipe-space | ||
932 | features defined for the BSP. | ||
933 | """ | ||
934 | features = read_features(scripts_path, machine) | ||
935 | new_features = [] | ||
936 | for f in features: | ||
937 | if f == feature: | ||
938 | continue | ||
939 | new_features.append(f) | ||
940 | write_features(scripts_path, machine, new_features) | ||
941 | |||
942 | |||
943 | def yocto_kernel_feature_destroy(scripts_path, machine, feature): | ||
944 | """ | ||
945 | Remove a recipe-space kernel feature from a BSP. | ||
946 | """ | ||
947 | if not check_feature_name(feature): | ||
948 | sys.exit(1) | ||
949 | |||
950 | if feature_in_use(scripts_path, machine, "features/" + feature) or \ | ||
951 | feature_in_use(scripts_path, machine, "cfg/" + feature): | ||
952 | print "Feature %s is in use (use 'feature rm' to un-use it first), exiting" % feature | ||
953 | sys.exit(1) | ||
954 | |||
955 | filesdir = find_filesdir(scripts_path, machine) | ||
956 | if not filesdir: | ||
957 | print "Couldn't destroy feature (%s), no 'files' dir found" % feature | ||
958 | sys.exit(1) | ||
959 | |||
960 | feature_dirname = "features" | ||
961 | featdir = os.path.join(filesdir, feature_dirname) | ||
962 | if not os.path.exists(featdir): | ||
963 | print "Couldn't find feature directory (%s)" % feature_dirname | ||
964 | sys.exit(1) | ||
965 | |||
966 | feature_fqn = os.path.join(featdir, feature) | ||
967 | if not os.path.exists(feature_fqn): | ||
968 | feature_dirname = "cfg" | ||
969 | featdir = os.path.join(filesdir, feature_dirname) | ||
970 | if not os.path.exists(featdir): | ||
971 | print "Couldn't find feature directory (%s)" % feature_dirname | ||
972 | sys.exit(1) | ||
973 | feature_fqn = os.path.join(featdir, feature_filename) | ||
974 | if not os.path.exists(feature_fqn): | ||
975 | print "Couldn't find feature (%s)" % feature | ||
976 | sys.exit(1) | ||
977 | |||
978 | f = open(feature_fqn, "r") | ||
979 | lines = f.readlines() | ||
980 | for line in lines: | ||
981 | s = line.strip() | ||
982 | if s.startswith("patch ") or s.startswith("kconf "): | ||
983 | split_line = s.split() | ||
984 | filename = os.path.join(featdir, split_line[-1]) | ||
985 | if os.path.exists(filename): | ||
986 | os.remove(filename) | ||
987 | f.close() | ||
988 | os.remove(feature_fqn) | ||
989 | |||
990 | feature_remove(scripts_path, machine, feature) | ||
991 | |||
992 | print "Removed feature:" | ||
993 | print "\t%s" % feature_dirname + "/" + feature | ||
994 | |||
995 | |||
996 | def base_branches(context): | ||
997 | """ | ||
998 | Return a list of the base branches found in the kernel git repo. | ||
999 | """ | ||
1000 | giturl = find_giturl(context) | ||
1001 | |||
1002 | print "Getting branches from remote repo %s..." % giturl | ||
1003 | |||
1004 | gitcmd = "git ls-remote %s *heads* 2>&1" % (giturl) | ||
1005 | tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read() | ||
1006 | |||
1007 | branches = [] | ||
1008 | |||
1009 | if tmp: | ||
1010 | tmpline = tmp.split("\n") | ||
1011 | for line in tmpline: | ||
1012 | if len(line)==0: | ||
1013 | break; | ||
1014 | if not line.endswith("base"): | ||
1015 | continue; | ||
1016 | idx = line.find("refs/heads/") | ||
1017 | kbranch = line[idx + len("refs/heads/"):] | ||
1018 | if kbranch.find("/") == -1 and kbranch.find("base") == -1: | ||
1019 | continue | ||
1020 | idx = kbranch.find("base") | ||
1021 | branches.append(kbranch[:idx - 1]) | ||
1022 | |||
1023 | return branches | ||
1024 | |||
1025 | |||
1026 | def all_branches(context): | ||
1027 | """ | ||
1028 | Return a list of all the branches found in the kernel git repo. | ||
1029 | """ | ||
1030 | giturl = find_giturl(context) | ||
1031 | |||
1032 | print "Getting branches from remote repo %s..." % giturl | ||
1033 | |||
1034 | gitcmd = "git ls-remote %s *heads* 2>&1" % (giturl) | ||
1035 | tmp = subprocess.Popen(gitcmd, shell=True, stdout=subprocess.PIPE).stdout.read() | ||
1036 | |||
1037 | branches = [] | ||
1038 | |||
1039 | base_prefixes = None | ||
1040 | |||
1041 | try: | ||
1042 | branches_base = context["branches_base"] | ||
1043 | if branches_base: | ||
1044 | base_prefixes = branches_base.split(":") | ||
1045 | except KeyError: | ||
1046 | pass | ||
1047 | |||
1048 | arch = context["arch"] | ||
1049 | |||
1050 | if tmp: | ||
1051 | tmpline = tmp.split("\n") | ||
1052 | for line in tmpline: | ||
1053 | if len(line)==0: | ||
1054 | break; | ||
1055 | idx = line.find("refs/heads/") | ||
1056 | kbranch = line[idx + len("refs/heads/"):] | ||
1057 | kbranch_prefix = kbranch.rsplit("/", 1)[0] | ||
1058 | |||
1059 | if base_prefixes: | ||
1060 | for base_prefix in base_prefixes: | ||
1061 | if kbranch_prefix == base_prefix: | ||
1062 | branches.append(kbranch) | ||
1063 | continue | ||
1064 | |||
1065 | if (kbranch.find("/") != -1 and | ||
1066 | (kbranch.find("standard") != -1 or kbranch.find("base") != -1) or | ||
1067 | kbranch == "base"): | ||
1068 | branches.append(kbranch) | ||
1069 | continue | ||
1070 | |||
1071 | return branches | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/.gitignore b/scripts/lib/bsp/substrate/target/arch/arm/.gitignore new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/.gitignore | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall new file mode 100644 index 0000000000..b442d02d57 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=machine}} | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf new file mode 100644 index 0000000000..bc52893e2a --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf | |||
@@ -0,0 +1,34 @@ | |||
1 | # yocto-bsp-filename {{ if xserver == "y": }} this | ||
2 | Section "Module" | ||
3 | Load "extmod" | ||
4 | Load "dbe" | ||
5 | Load "glx" | ||
6 | Load "freetype" | ||
7 | Load "type1" | ||
8 | Load "record" | ||
9 | Load "dri" | ||
10 | EndSection | ||
11 | |||
12 | Section "Monitor" | ||
13 | Identifier "Builtin Default Monitor" | ||
14 | EndSection | ||
15 | |||
16 | Section "Device" | ||
17 | Identifier "Builtin Default fbdev Device 0" | ||
18 | Driver "omapfb" | ||
19 | EndSection | ||
20 | |||
21 | Section "Screen" | ||
22 | Identifier "Builtin Default fbdev Screen 0" | ||
23 | Device "Builtin Default fbdev Device 0" | ||
24 | Monitor "Builtin Default Monitor" | ||
25 | EndSection | ||
26 | |||
27 | Section "ServerLayout" | ||
28 | Identifier "Builtin Default Layout" | ||
29 | Screen "Builtin Default fbdev Screen 0" | ||
30 | EndSection | ||
31 | |||
32 | Section "ServerFlags" | ||
33 | Option "DontZap" "0" | ||
34 | EndSection | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend new file mode 100644 index 0000000000..30830031ed --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # yocto-bsp-filename {{ if xserver == "y": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall new file mode 100644 index 0000000000..1e0d92c55c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg new file mode 100644 index 0000000000..9bfc90c6f2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-non_hardware.cfg | |||
@@ -0,0 +1,31 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-non_hardware.cfg | ||
2 | # | ||
3 | # Miscellaneous filesystems | ||
4 | # | ||
5 | CONFIG_NFS_DEF_FILE_IO_SIZE=1024 | ||
6 | |||
7 | # | ||
8 | # Multiple Device Support | ||
9 | # | ||
10 | # CONFIG_MD is not set | ||
11 | |||
12 | # Kernel Features | ||
13 | # | ||
14 | CONFIG_NO_HZ=y | ||
15 | |||
16 | # | ||
17 | # CPUIdle | ||
18 | # | ||
19 | CONFIG_CPU_IDLE=y | ||
20 | CONFIG_CPU_IDLE_GOV_LADDER=y | ||
21 | CONFIG_CPU_IDLE_GOV_MENU=y | ||
22 | |||
23 | # | ||
24 | # Kernel hacking | ||
25 | # | ||
26 | CONFIG_DEBUG_FS=y | ||
27 | |||
28 | # | ||
29 | # Power management options | ||
30 | # | ||
31 | CONFIG_PM_DEBUG=y | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc new file mode 100644 index 0000000000..ca5f3b5be9 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-preempt-rt.scc | |||
@@ -0,0 +1,14 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-preempt-rt.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE preempt-rt | ||
4 | define KARCH arm | ||
5 | |||
6 | include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
11 | |||
12 | # default policy for preempt-rt kernels | ||
13 | include features/latencytop/latencytop.scc | ||
14 | include features/profiling/profiling.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc new file mode 100644 index 0000000000..9014c2c97e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-standard.scc | |||
@@ -0,0 +1,14 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-standard.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE standard | ||
4 | define KARCH arm | ||
5 | |||
6 | include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
11 | |||
12 | # default policy for standard kernels | ||
13 | include features/latencytop/latencytop.scc | ||
14 | include features/profiling/profiling.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc new file mode 100644 index 0000000000..3f1c252232 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-tiny.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-tiny.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE tiny | ||
4 | define KARCH arm | ||
5 | |||
6 | include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg new file mode 100644 index 0000000000..47489e44e9 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-config.cfg | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-config.cfg | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc new file mode 100644 index 0000000000..582759e612 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-features.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-features.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc new file mode 100644 index 0000000000..97f747fa07 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine-user-patches.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-patches.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg new file mode 100644 index 0000000000..a2e1ae0f75 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.cfg | |||
@@ -0,0 +1,321 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.cfg | ||
2 | # | ||
3 | # System Type | ||
4 | # | ||
5 | CONFIG_ARCH_OMAP=y | ||
6 | |||
7 | # | ||
8 | # TI OMAP Implementations | ||
9 | # | ||
10 | # CONFIG_ARCH_OMAP2 is not set | ||
11 | CONFIG_ARCH_OMAP3=y | ||
12 | |||
13 | # | ||
14 | # TI OMAP Common Features | ||
15 | # | ||
16 | CONFIG_ARCH_OMAP2PLUS=y | ||
17 | |||
18 | # | ||
19 | # OMAP Feature Selections | ||
20 | # | ||
21 | CONFIG_OMAP_32K_TIMER=y | ||
22 | CONFIG_OMAP_32K_TIMER_HZ=128 | ||
23 | CONFIG_OMAP_DM_TIMER=y | ||
24 | CONFIG_OMAP_RESET_CLOCKS=y | ||
25 | CONFIG_OMAP_SMARTREFLEX=y | ||
26 | CONFIG_OMAP_SMARTREFLEX_CLASS3=y | ||
27 | CONFIG_OMAP_MBOX_FWK=m | ||
28 | CONFIG_OMAP_MBOX_KFIFO_SIZE=256 | ||
29 | |||
30 | # | ||
31 | # OMAP Board Type | ||
32 | # | ||
33 | CONFIG_MACH_OMAP3_BEAGLE=y | ||
34 | |||
35 | # | ||
36 | # Processor Features | ||
37 | # | ||
38 | CONFIG_ARM_THUMBEE=y | ||
39 | CONFIG_ARM_ERRATA_430973=y | ||
40 | |||
41 | # | ||
42 | # Kernel Features | ||
43 | # | ||
44 | CONFIG_LEDS=y | ||
45 | |||
46 | |||
47 | # | ||
48 | # Serial drivers | ||
49 | # | ||
50 | CONFIG_SERIAL_OMAP=y | ||
51 | CONFIG_SERIAL_OMAP_CONSOLE=y | ||
52 | |||
53 | # | ||
54 | # At least one emulation must be selected | ||
55 | # | ||
56 | CONFIG_VFP=y | ||
57 | CONFIG_NEON=y | ||
58 | |||
59 | # | ||
60 | # Power management options | ||
61 | # | ||
62 | CONFIG_PM=y | ||
63 | CONFIG_PM_RUNTIME=y | ||
64 | |||
65 | # | ||
66 | # Generic Driver Options | ||
67 | # | ||
68 | CONFIG_MTD=y | ||
69 | CONFIG_MTD_CMDLINE_PARTS=y | ||
70 | # | ||
71 | # User Modules And Translation Layers | ||
72 | # | ||
73 | CONFIG_MTD_BLKDEVS=y | ||
74 | CONFIG_MTD_BLOCK=y | ||
75 | |||
76 | # | ||
77 | # RAM/ROM/Flash chip drivers | ||
78 | # | ||
79 | CONFIG_MTD_CFI=y | ||
80 | CONFIG_MTD_CFI_INTELEXT=y | ||
81 | |||
82 | # | ||
83 | # Disk-On-Chip Device Drivers | ||
84 | # | ||
85 | CONFIG_MTD_NAND=y | ||
86 | |||
87 | CONFIG_MTD_NAND_OMAP2=y | ||
88 | |||
89 | CONFIG_MTD_UBI=y | ||
90 | |||
91 | # | ||
92 | # SCSI device support | ||
93 | # | ||
94 | CONFIG_SCSI=y | ||
95 | |||
96 | # | ||
97 | # SCSI support type (disk, tape, CD-ROM) | ||
98 | # | ||
99 | CONFIG_BLK_DEV_SD=y | ||
100 | |||
101 | # | ||
102 | # Ethernet (10 or 100Mbit) | ||
103 | # | ||
104 | CONFIG_SMSC911X=y | ||
105 | CONFIG_USB_NET_SMSC95XX=y | ||
106 | |||
107 | # | ||
108 | # Userland interfaces | ||
109 | # | ||
110 | CONFIG_INPUT_EVDEV=y | ||
111 | |||
112 | # | ||
113 | # Input Device Drivers | ||
114 | # | ||
115 | CONFIG_KEYBOARD_TWL4030=y | ||
116 | CONFIG_INPUT_TOUCHSCREEN=y | ||
117 | CONFIG_TOUCHSCREEN_ADS7846=y | ||
118 | |||
119 | # | ||
120 | # Miscellaneous I2C Chip support | ||
121 | # | ||
122 | CONFIG_I2C=y | ||
123 | CONFIG_I2C_OMAP=y | ||
124 | CONFIG_SPI=y | ||
125 | CONFIG_SPI_MASTER=y | ||
126 | CONFIG_SPI_OMAP24XX=y | ||
127 | |||
128 | # | ||
129 | # I2C GPIO expanders: | ||
130 | # | ||
131 | CONFIG_GPIO_TWL4030=y | ||
132 | |||
133 | # | ||
134 | # SPI GPIO expanders: | ||
135 | # | ||
136 | CONFIG_OMAP_WATCHDOG=y | ||
137 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
138 | |||
139 | # | ||
140 | # Multifunction device drivers | ||
141 | # | ||
142 | CONFIG_TWL4030_CORE=y | ||
143 | CONFIG_REGULATOR=y | ||
144 | CONFIG_REGULATOR_DUMMY=y | ||
145 | CONFIG_REGULATOR_TWL4030=y | ||
146 | |||
147 | # | ||
148 | # Graphics support | ||
149 | # | ||
150 | CONFIG_FB=y | ||
151 | CONFIG_DRM=m | ||
152 | # CONFIG_VGASTATE is not set | ||
153 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
154 | # CONFIG_FIRMWARE_EDID is not set | ||
155 | # CONFIG_FB_DDC is not set | ||
156 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
157 | CONFIG_FB_CFB_FILLRECT=y | ||
158 | CONFIG_FB_CFB_COPYAREA=y | ||
159 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
160 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
161 | # CONFIG_FB_SYS_FILLRECT is not set | ||
162 | # CONFIG_FB_SYS_COPYAREA is not set | ||
163 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
164 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
165 | # CONFIG_FB_SYS_FOPS is not set | ||
166 | # CONFIG_FB_SVGALIB is not set | ||
167 | # CONFIG_FB_MACMODES is not set | ||
168 | # CONFIG_FB_BACKLIGHT is not set | ||
169 | CONFIG_FB_MODE_HELPERS=y | ||
170 | # CONFIG_FB_TILEBLITTING is not set | ||
171 | |||
172 | # | ||
173 | # Frame buffer hardware drivers | ||
174 | # | ||
175 | # CONFIG_FB_S1D13XXX is not set | ||
176 | # CONFIG_FB_TMIO is not set | ||
177 | # CONFIG_FB_VIRTUAL is not set | ||
178 | # CONFIG_FB_METRONOME is not set | ||
179 | # CONFIG_FB_MB862XX is not set | ||
180 | # CONFIG_FB_BROADSHEET is not set | ||
181 | # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set | ||
182 | CONFIG_OMAP2_VRAM=y | ||
183 | CONFIG_OMAP2_VRFB=y | ||
184 | CONFIG_OMAP2_DSS=y | ||
185 | CONFIG_OMAP2_VRAM_SIZE=14 | ||
186 | CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y | ||
187 | # CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set | ||
188 | CONFIG_OMAP2_DSS_DPI=y | ||
189 | # CONFIG_OMAP2_DSS_RFBI is not set | ||
190 | CONFIG_OMAP2_DSS_VENC=y | ||
191 | # CONFIG_OMAP2_DSS_SDI is not set | ||
192 | CONFIG_OMAP2_DSS_DSI=y | ||
193 | # CONFIG_OMAP2_DSS_FAKE_VSYNC is not set | ||
194 | CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 | ||
195 | CONFIG_FB_OMAP2=y | ||
196 | CONFIG_FB_OMAP2_DEBUG_SUPPORT=y | ||
197 | CONFIG_FB_OMAP2_NUM_FBS=2 | ||
198 | |||
199 | # | ||
200 | # OMAP2/3 Display Device Drivers | ||
201 | # | ||
202 | CONFIG_PANEL_GENERIC_DPI=y | ||
203 | CONFIG_PANEL_DVI=y | ||
204 | CONFIG_PANEL_SHARP_LS037V7DW01=y | ||
205 | # CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set | ||
206 | # CONFIG_PANEL_TAAL is not set | ||
207 | CONFIG_PANEL_TPO_TD043MTEA1=m | ||
208 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
209 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
210 | |||
211 | # | ||
212 | # Display device support | ||
213 | # | ||
214 | CONFIG_DISPLAY_SUPPORT=y | ||
215 | CONFIG_DUMMY_CONSOLE=y | ||
216 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
217 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | ||
218 | # CONFIG_FONTS is not set | ||
219 | CONFIG_FONT_8x8=y | ||
220 | CONFIG_FONT_8x16=y | ||
221 | # CONFIG_LOGO_LINUX_MONO is not set | ||
222 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
223 | |||
224 | # | ||
225 | # Console display driver support | ||
226 | # | ||
227 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
228 | CONFIG_LOGO=y | ||
229 | # CONFIG_VGA_CONSOLE is not set | ||
230 | |||
231 | # DMA Devices | ||
232 | CONFIG_DMADEVICES=y | ||
233 | CONFIG_DMA_OMAP=y | ||
234 | CONFIG_DMA_OF=y | ||
235 | |||
236 | CONFIG_SOUND=y | ||
237 | CONFIG_SND=y | ||
238 | CONFIG_SND_SOC=y | ||
239 | CONFIG_SND_OMAP_SOC=y | ||
240 | CONFIG_SND_OMAP_SOC_OMAP_TWL4030=y | ||
241 | |||
242 | # | ||
243 | # USB Input Devices | ||
244 | # | ||
245 | CONFIG_USB=y | ||
246 | CONFIG_USB_SUPPORT=y | ||
247 | |||
248 | # | ||
249 | # Miscellaneous USB options | ||
250 | # | ||
251 | CONFIG_USB_OTG=y | ||
252 | # CONFIG_USB_OTG_WHITELIST is not set | ||
253 | |||
254 | # | ||
255 | # USB Host Controller Drivers | ||
256 | # | ||
257 | CONFIG_USB_EHCI_HCD=y | ||
258 | CONFIG_USB_EHCI_TT_NEWSCHED=y | ||
259 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | ||
260 | CONFIG_USB_MUSB_HDRC=y | ||
261 | CONFIG_USB_MUSB_OMAP2PLUS=y | ||
262 | CONFIG_USB_OMAP=y | ||
263 | |||
264 | # | ||
265 | # OMAP 343x high speed USB support | ||
266 | # | ||
267 | CONFIG_USB_MUSB_OTG=y | ||
268 | CONFIG_USB_GADGET_MUSB_HDRC=y | ||
269 | CONFIG_USB_MUSB_HDRC_HCD=y | ||
270 | CONFIG_USB_INVENTRA_DMA=y | ||
271 | |||
272 | # | ||
273 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
274 | # | ||
275 | |||
276 | # | ||
277 | # may also be needed; see USB_STORAGE Help for more information | ||
278 | # | ||
279 | CONFIG_USB_STORAGE=y | ||
280 | |||
281 | # | ||
282 | # USB Miscellaneous drivers | ||
283 | # | ||
284 | CONFIG_USB_GADGET=y | ||
285 | CONFIG_USB_GADGET_DUALSPEED=y | ||
286 | CONFIG_USB_OTG_UTILS=y | ||
287 | CONFIG_TWL4030_USB=y | ||
288 | |||
289 | # USB gadget modules | ||
290 | CONFIG_USB_G_NCM=y | ||
291 | CONFIG_USB_MASS_STORAGE=y | ||
292 | |||
293 | CONFIG_MMC=y | ||
294 | |||
295 | # | ||
296 | # MMC/SD Host Controller Drivers | ||
297 | # | ||
298 | CONFIG_MMC_OMAP_HS=y | ||
299 | |||
300 | # | ||
301 | # Real Time Clock | ||
302 | # | ||
303 | CONFIG_RTC_LIB=y | ||
304 | CONFIG_RTC_CLASS=y | ||
305 | CONFIG_RTC_DRV_TWL4030=y | ||
306 | |||
307 | # | ||
308 | # DOS/FAT/NT Filesystems | ||
309 | # | ||
310 | CONFIG_VFAT_FS=y | ||
311 | |||
312 | # | ||
313 | # Multimedia core support | ||
314 | # | ||
315 | |||
316 | # CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set | ||
317 | |||
318 | # | ||
319 | # Advanced Power Management Emulation support | ||
320 | # | ||
321 | CONFIG_APM_EMULATION=y | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc new file mode 100644 index 0000000000..828400df40 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/files/machine.scc | |||
@@ -0,0 +1,8 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.scc | ||
2 | kconf hardware {{=machine}}.cfg | ||
3 | kconf non-hardware {{machine}}-non_hardware.cfg | ||
4 | |||
5 | include features/usb-net/usb-net.scc | ||
6 | |||
7 | kconf hardware {{=machine}}-user-config.cfg | ||
8 | include {{=machine}}-user-patches.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall new file mode 100644 index 0000000000..a04e6c7852 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall | |||
@@ -0,0 +1,5 @@ | |||
1 | {{ if kernel_choice != "custom": }} | ||
2 | {{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}} | ||
3 | |||
4 | {{ if kernel_choice != "custom" and use_default_kernel == "n": }} | ||
5 | {{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_3.14"}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 0000000000..2fa6231cbf --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -0,0 +1,26 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "n": }} | ||
16 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
17 | |||
18 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
19 | {{ if smp == "y": }} | ||
20 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
21 | |||
22 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
23 | file://{{=machine}}-user-config.cfg \ | ||
24 | file://{{=machine}}-user-patches.scc \ | ||
25 | file://{{=machine}}-user-features.scc \ | ||
26 | " | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend new file mode 100644 index 0000000000..35b0958582 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-preempt-rt.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb" | ||
32 | #SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend new file mode 100644 index 0000000000..f04dd0cce4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend new file mode 100644 index 0000000000..471ccbcc3e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000000..badb3aa239 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "19f7e43b54aef08d58135ed2a897d77b624b320a" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "459165c1dd61c4e843c36e6a1abeb30949a20ba7" | ||
33 | #LINUX_VERSION = "3.10.9" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend new file mode 100644 index 0000000000..1e1cc51315 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT b/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT new file mode 100644 index 0000000000..fb950dc69f --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/COPYING.MIT | |||
@@ -0,0 +1,17 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE SOFTWARE. | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/README b/scripts/lib/bsp/substrate/target/arch/common/README new file mode 100644 index 0000000000..928659f302 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/README | |||
@@ -0,0 +1,118 @@ | |||
1 | This README file contains information on building the meta-{{=machine}} | ||
2 | BSP layer, and booting the images contained in the /binary directory. | ||
3 | Please see the corresponding sections below for details. | ||
4 | |||
5 | |||
6 | Dependencies | ||
7 | ============ | ||
8 | |||
9 | This layer depends on: | ||
10 | |||
11 | URI: git://git.openembedded.org/bitbake | ||
12 | branch: master | ||
13 | |||
14 | URI: git://git.openembedded.org/openembedded-core | ||
15 | layers: meta | ||
16 | branch: master | ||
17 | |||
18 | URI: git://git.yoctoproject.org/xxxx | ||
19 | layers: xxxx | ||
20 | branch: master | ||
21 | |||
22 | |||
23 | Patches | ||
24 | ======= | ||
25 | |||
26 | Please submit any patches against this BSP to the Yocto mailing list | ||
27 | (yocto@yoctoproject.org) and cc: the maintainer: | ||
28 | |||
29 | Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com> | ||
30 | |||
31 | Please see the meta-xxxx/MAINTAINERS file for more details. | ||
32 | |||
33 | |||
34 | Table of Contents | ||
35 | ================= | ||
36 | |||
37 | I. Building the meta-{{=machine}} BSP layer | ||
38 | II. Booting the images in /binary | ||
39 | |||
40 | |||
41 | I. Building the meta-{{=machine}} BSP layer | ||
42 | ======================================== | ||
43 | |||
44 | --- replace with specific instructions for your layer --- | ||
45 | |||
46 | In order to build an image with BSP support for a given release, you | ||
47 | need to download the corresponding BSP tarball from the 'Board Support | ||
48 | Package (BSP) Downloads' page of the Yocto Project website. | ||
49 | |||
50 | Having done that, and assuming you extracted the BSP tarball contents | ||
51 | at the top-level of your yocto build tree, you can build a | ||
52 | {{=machine}} image by adding the location of the meta-{{=machine}} | ||
53 | layer to bblayers.conf, along with any other layers needed (to access | ||
54 | common metadata shared between BSPs) e.g.: | ||
55 | |||
56 | yocto/meta-xxxx \ | ||
57 | yocto/meta-xxxx/meta-{{=machine}} \ | ||
58 | |||
59 | To enable the {{=machine}} layer, add the {{=machine}} MACHINE to local.conf: | ||
60 | |||
61 | MACHINE ?= "{{=machine}}" | ||
62 | |||
63 | You should then be able to build a {{=machine}} image as such: | ||
64 | |||
65 | $ source oe-init-build-env | ||
66 | $ bitbake core-image-sato | ||
67 | |||
68 | At the end of a successful build, you should have a live image that | ||
69 | you can boot from a USB flash drive (see instructions on how to do | ||
70 | that below, in the section 'Booting the images from /binary'). | ||
71 | |||
72 | As an alternative to downloading the BSP tarball, you can also work | ||
73 | directly from the meta-xxxx git repository. For each BSP in the | ||
74 | 'meta-xxxx' repository, there are multiple branches, one corresponding | ||
75 | to each major release starting with 'laverne' (0.90), in addition to | ||
76 | the latest code which tracks the current master (note that not all | ||
77 | BSPs are present in every release). Instead of extracting a BSP | ||
78 | tarball at the top level of your yocto build tree, you can | ||
79 | equivalently check out the appropriate branch from the meta-xxxx | ||
80 | repository at the same location. | ||
81 | |||
82 | |||
83 | II. Booting the images in /binary | ||
84 | ================================= | ||
85 | |||
86 | --- replace with specific instructions for your platform --- | ||
87 | |||
88 | This BSP contains bootable live images, which can be used to directly | ||
89 | boot Yocto off of a USB flash drive. | ||
90 | |||
91 | Under Linux, insert a USB flash drive. Assuming the USB flash drive | ||
92 | takes device /dev/sdf, use dd to copy the live image to it. For | ||
93 | example: | ||
94 | |||
95 | # dd if=core-image-sato-{{=machine}}-20101207053738.hddimg of=/dev/sdf | ||
96 | # sync | ||
97 | # eject /dev/sdf | ||
98 | |||
99 | This should give you a bootable USB flash device. Insert the device | ||
100 | into a bootable USB socket on the target, and power on. This should | ||
101 | result in a system booted to the Sato graphical desktop. | ||
102 | |||
103 | If you want a terminal, use the arrows at the top of the UI to move to | ||
104 | different pages of available applications, one of which is named | ||
105 | 'Terminal'. Clicking that should give you a root terminal. | ||
106 | |||
107 | If you want to ssh into the system, you can use the root terminal to | ||
108 | ifconfig the IP address and use that to ssh in. The root password is | ||
109 | empty, so to log in type 'root' for the user name and hit 'Enter' at | ||
110 | the Password prompt: and you should be in. | ||
111 | |||
112 | ---- | ||
113 | |||
114 | If you find you're getting corrupt images on the USB (it doesn't show | ||
115 | the syslinux boot: prompt, or the boot: prompt contains strange | ||
116 | characters), try doing this first: | ||
117 | |||
118 | # dd if=/dev/zero of=/dev/sdf bs=1M count=512 | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/README.sources b/scripts/lib/bsp/substrate/target/arch/common/README.sources new file mode 100644 index 0000000000..3c4cb7b435 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/README.sources | |||
@@ -0,0 +1,17 @@ | |||
1 | The sources for the packages comprising the images shipped with this | ||
2 | BSP can be found at the following location: | ||
3 | |||
4 | http://downloads.yoctoproject.org/mirror/sources/ | ||
5 | |||
6 | The metadata used to generate the images shipped with this BSP, in | ||
7 | addition to the code contained in this BSP, can be found at the | ||
8 | following location: | ||
9 | |||
10 | http://www.yoctoproject.org/downloads/yocto-1.1/poky-edison-6.0.tar.bz2 | ||
11 | |||
12 | The metadata used to generate the images shipped with this BSP, in | ||
13 | addition to the code contained in this BSP, can also be found at the | ||
14 | following locations: | ||
15 | |||
16 | git://git.yoctoproject.org/poky.git | ||
17 | git://git.yoctoproject.org/meta-xxxx | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore b/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/binary/.gitignore | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf b/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf new file mode 100644 index 0000000000..5529f45954 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/conf/layer.conf | |||
@@ -0,0 +1,10 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have a recipes-* directories, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "{{=machine}}" | ||
9 | BBFILE_PATTERN_{{=machine}} = "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_{{=machine}} = "6" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall new file mode 100644 index 0000000000..b442d02d57 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=machine}} | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig new file mode 100644 index 0000000000..3b85d3821f --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor/machine/machconfig | |||
@@ -0,0 +1,5 @@ | |||
1 | # Assume a USB mouse and keyboard are connected | ||
2 | {{ input type:"boolean" name:"touchscreen" msg:"Does your BSP have a touchscreen? (y/n)" default:"n" }} | ||
3 | HAVE_TOUCHSCREEN={{=touchscreen}} | ||
4 | {{ input type:"boolean" name:"keyboard" msg:"Does your BSP have a keyboard? (y/n)" default:"y" }} | ||
5 | HAVE_KEYBOARD={{=keyboard}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend new file mode 100644 index 0000000000..6d4804d127 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-bsp/formfactor/formfactor_0.0.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall new file mode 100644 index 0000000000..03b7d84ec2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/kernel-list.noinstall | |||
@@ -0,0 +1,26 @@ | |||
1 | {{ if kernel_choice == "custom": }} | ||
2 | {{ input type:"boolean" name:"custom_kernel_remote" prio:"20" msg:"Is the custom kernel you'd like to use in a remote git repo? (y/n)" default:"y"}} | ||
3 | |||
4 | {{ if kernel_choice == "custom" and custom_kernel_remote == "y": }} | ||
5 | {{ input type:"edit-git-repo" name:"custom_kernel_remote_path" prio:"20" msg:"Please enter the full URI to the remote git repo (the default corresponds to linux-stable v3.13.9)" default:"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"}} | ||
6 | |||
7 | {{ if kernel_choice == "custom" and custom_kernel_remote == "n": }} | ||
8 | {{ input type:"edit-git-repo" name:"custom_kernel_local_path" prio:"20" msg:"You've indicated that you're not using a remote git repo. Please enter the full path to the local git repo you want to use (the default assumes a local linux-stable v3.13.9)" default:"/home/trz/yocto/kernels/linux-stable.git"}} | ||
9 | |||
10 | {{ if kernel_choice == "custom": }} | ||
11 | {{ input type:"boolean" name:"custom_kernel_need_kbranch" prio:"20" msg:"Do you need to use a specific (non-master) branch? (y/n)" default:"n"}} | ||
12 | |||
13 | {{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y": }} | ||
14 | {{ input type:"edit" name:"custom_kernel_kbranch" prio:"20" msg:"Please enter the branch you want to use (the default branch corresponds to the linux-stable 'linux-3.13.y' branch):" default:"linux-3.13.y"}} | ||
15 | |||
16 | {{ if kernel_choice == "custom": }} | ||
17 | {{ input type:"edit" name:"custom_kernel_srcrev" prio:"20" msg:"Please enter the SRCREV (commit id) you'd like to use (use '${AUTOREV}' to track the current HEAD):" default:"${AUTOREV}"}} | ||
18 | |||
19 | {{ if kernel_choice == "custom": }} | ||
20 | {{ input type:"edit" name:"custom_kernel_linux_version" prio:"20" msg:"Please enter the Linux version of the kernel you've specified:" default:"3.13.9"}} | ||
21 | |||
22 | {{ if kernel_choice == "custom": }} | ||
23 | {{ input type:"edit" name:"custom_kernel_linux_version_extension" prio:"20" msg:"Please enter a Linux version extension if you want (it will show up at the end of the kernel name shown by uname):" default:"-custom"}} | ||
24 | |||
25 | {{ if kernel_choice == "custom": }} | ||
26 | {{ input type:"edit-file" name:"custom_kernel_defconfig" prio:"20" msg:"It's recommended (but not required) that custom kernels be built using a defconfig. Please enter the full path to the defconfig for your kernel (NOTE: if you don't specify a defconfig the kernel probably won't build or boot):" default:""}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb new file mode 100644 index 0000000000..80a52e7cae --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.bb | |||
@@ -0,0 +1,58 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "custom": }} this | ||
2 | # This file was derived from the linux-yocto-custom.bb recipe in | ||
3 | # oe-core. | ||
4 | # | ||
5 | # linux-yocto-custom.bb: | ||
6 | # | ||
7 | # A yocto-bsp-generated kernel recipe that uses the linux-yocto and | ||
8 | # oe-core kernel classes to apply a subset of yocto kernel | ||
9 | # management to git managed kernel repositories. | ||
10 | # | ||
11 | # Warning: | ||
12 | # | ||
13 | # Building this kernel without providing a defconfig or BSP | ||
14 | # configuration will result in build or boot errors. This is not a | ||
15 | # bug. | ||
16 | # | ||
17 | # Notes: | ||
18 | # | ||
19 | # patches: patches can be merged into to the source git tree itself, | ||
20 | # added via the SRC_URI, or controlled via a BSP | ||
21 | # configuration. | ||
22 | # | ||
23 | # example configuration addition: | ||
24 | # SRC_URI += "file://smp.cfg" | ||
25 | # example patch addition: | ||
26 | # SRC_URI += "file://0001-linux-version-tweak.patch | ||
27 | # example feature addition: | ||
28 | # SRC_URI += "file://feature.scc" | ||
29 | # | ||
30 | |||
31 | inherit kernel | ||
32 | require recipes-kernel/linux/linux-yocto.inc | ||
33 | |||
34 | {{ if kernel_choice == "custom" and custom_kernel_remote == "y": }} | ||
35 | SRC_URI = "{{=custom_kernel_remote_path}};protocol=git;bareclone=1;branch=${KBRANCH}" | ||
36 | {{ if kernel_choice == "custom" and custom_kernel_remote == "n": }} | ||
37 | SRC_URI = "git://{{=custom_kernel_local_path}};protocol=file;bareclone=1;branch=${KBRANCH}" | ||
38 | |||
39 | SRC_URI += "file://defconfig" | ||
40 | |||
41 | SRC_URI += "file://{{=machine}}.scc \ | ||
42 | file://{{=machine}}.cfg \ | ||
43 | file://{{=machine}}-user-config.cfg \ | ||
44 | file://{{=machine}}-user-patches.scc \ | ||
45 | " | ||
46 | |||
47 | {{ if kernel_choice == "custom" and custom_kernel_need_kbranch == "y" and custom_kernel_kbranch and custom_kernel_kbranch != "master": }} | ||
48 | KBRANCH = "{{=custom_kernel_kbranch}}" | ||
49 | |||
50 | LINUX_VERSION ?= "{{=custom_kernel_linux_version}}" | ||
51 | LINUX_VERSION_EXTENSION ?= "{{=custom_kernel_linux_version_extension}}" | ||
52 | |||
53 | SRCREV="{{=custom_kernel_srcrev}}" | ||
54 | |||
55 | PR = "r0" | ||
56 | PV = "${LINUX_VERSION}+git${SRCPV}" | ||
57 | |||
58 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall new file mode 100644 index 0000000000..017d206c24 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if kernel_choice == "custom": }} linux-yocto-custom | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig new file mode 100644 index 0000000000..ceb0ffa30c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/defconfig | |||
@@ -0,0 +1,5 @@ | |||
1 | # | ||
2 | # Placeholder for custom default kernel configuration. yocto-bsp will | ||
3 | # replace this file with a user-specified defconfig. | ||
4 | # | ||
5 | {{ if custom_kernel_defconfig: replace_file(of, custom_kernel_defconfig) }} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg new file mode 100644 index 0000000000..922309d5ab --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-config.cfg | |||
@@ -0,0 +1,9 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-user-config.cfg | ||
2 | # | ||
3 | # Used by yocto-kernel to manage config options. | ||
4 | # | ||
5 | # yocto-kernel may change the contents of this file in any | ||
6 | # way it sees fit, including removing comments like this, | ||
7 | # so don't manually make any modifications you don't want | ||
8 | # to lose. | ||
9 | # | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc new file mode 100644 index 0000000000..6d1138f42a --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine-user-patches.scc | |||
@@ -0,0 +1,9 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-user-patches.scc | ||
2 | # | ||
3 | # Used by yocto-kernel to manage patches. | ||
4 | # | ||
5 | # yocto-kernel may change the contents of this file in any | ||
6 | # way it sees fit, including removing comments like this, | ||
7 | # so don't manually make any modifications you don't want | ||
8 | # to lose. | ||
9 | # | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg new file mode 100644 index 0000000000..1ba8201f16 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.cfg | |||
@@ -0,0 +1,4 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.cfg | ||
2 | # | ||
3 | # A convenient place to add config options, nothing more. | ||
4 | # | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc new file mode 100644 index 0000000000..0b6b413377 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/common/recipes-kernel/linux/linux-yocto-custom/machine.scc | |||
@@ -0,0 +1,18 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.scc | ||
2 | # | ||
3 | # The top-level 'feature' for the {{=machine}} custom kernel. | ||
4 | # | ||
5 | # Essentially this is a convenient top-level container or starting | ||
6 | # point for adding lower-level config fragements and features. | ||
7 | # | ||
8 | |||
9 | # {{=machine}}.cfg in the linux-yocto-custom subdir is just a | ||
10 | # convenient place for adding random config fragments. | ||
11 | |||
12 | kconf hardware {{=machine}}.cfg | ||
13 | |||
14 | # These are used by yocto-kernel to add config fragments and features. | ||
15 | # Don't remove if you plan on using yocto-kernel with this BSP. | ||
16 | |||
17 | kconf hardware {{=machine}}-user-config.cfg | ||
18 | include {{=machine}}-user-patches.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf b/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf new file mode 100644 index 0000000000..43e38d06d0 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf | |||
@@ -0,0 +1,67 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.conf | ||
2 | #@TYPE: Machine | ||
3 | #@NAME: {{=machine}} | ||
4 | |||
5 | #@DESCRIPTION: Machine configuration for {{=machine}} systems | ||
6 | |||
7 | {{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }} | ||
8 | {{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }} | ||
9 | {{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }} | ||
10 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
11 | |||
12 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }} | ||
13 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }} | ||
14 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }} | ||
15 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
16 | PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%" | ||
17 | |||
18 | {{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_core2" }} | ||
19 | {{ input type:"choice" val:"tune_i586" msg:"i586 tuning optimizations" }} | ||
20 | {{ input type:"choice" val:"tune_atom" msg:"Atom tuning optimizations" }} | ||
21 | {{ input type:"choice" val:"tune_core2" msg:"Core2 tuning optimizations" }} | ||
22 | {{ if tunefile == "tune_i586": }} | ||
23 | require conf/machine/include/tune-i586.inc | ||
24 | {{ if tunefile == "tune_atom": }} | ||
25 | require conf/machine/include/tune-atom.inc | ||
26 | {{ if tunefile == "tune_core2": }} | ||
27 | DEFAULTTUNE="core2-32" | ||
28 | require conf/machine/include/tune-core2.inc | ||
29 | |||
30 | require conf/machine/include/x86-base.inc | ||
31 | |||
32 | MACHINE_FEATURES += "wifi efi pcbios" | ||
33 | |||
34 | {{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }} | ||
35 | |||
36 | {{ if xserver == "y" and (kernel_choice == "linux-yocto_3.14" or kernel_choice == "linux-yocto_3.10"): }} | ||
37 | {{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }} | ||
38 | {{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }} | ||
39 | {{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }} | ||
40 | {{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }} | ||
41 | |||
42 | {{ if xserver == "y" and kernel_choice == "custom": }} | ||
43 | {{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }} | ||
44 | {{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }} | ||
45 | {{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }} | ||
46 | {{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }} | ||
47 | |||
48 | {{ if xserver == "y" and kernel_choice != "linux-yocto_3.14" and kernel_choice != "linux-yocto_3.10" and kernel_choice != "custom": xserver_choice = "xserver_i915" }} | ||
49 | |||
50 | {{ if xserver == "y": }} | ||
51 | XSERVER ?= "${XSERVER_X86_BASE} \ | ||
52 | ${XSERVER_X86_EXT} \ | ||
53 | {{ if xserver == "y" and xserver_choice == "xserver_vesa": }} | ||
54 | ${XSERVER_X86_VESA} \ | ||
55 | {{ if xserver == "y" and xserver_choice == "xserver_i915": }} | ||
56 | ${XSERVER_X86_I915} \ | ||
57 | {{ if xserver == "y" and xserver_choice == "xserver_i965": }} | ||
58 | ${XSERVER_X86_I965} \ | ||
59 | {{ if xserver == "y": }} | ||
60 | " | ||
61 | |||
62 | MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d" | ||
63 | |||
64 | EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi" | ||
65 | |||
66 | {{ if xserver == "y" and xserver_choice == "xserver_vesa": }} | ||
67 | APPEND += "video=vesafb vga=0x318" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall new file mode 100644 index 0000000000..b442d02d57 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=machine}} | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf new file mode 100644 index 0000000000..ac9a0f1bb0 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{ if xserver == "y": }} this | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend new file mode 100644 index 0000000000..30830031ed --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # yocto-bsp-filename {{ if xserver == "y": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall new file mode 100644 index 0000000000..1e0d92c55c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc new file mode 100644 index 0000000000..619ee3f367 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-preempt-rt.scc | |||
@@ -0,0 +1,16 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-preempt-rt.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE preempt-rt | ||
4 | define KARCH i386 | ||
5 | |||
6 | include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
11 | |||
12 | # default policy for preempt-rt kernels | ||
13 | include cfg/usb-mass-storage.scc | ||
14 | include cfg/boot-live.scc | ||
15 | include features/latencytop/latencytop.scc | ||
16 | include features/profiling/profiling.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc new file mode 100644 index 0000000000..682012fafc --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-standard.scc | |||
@@ -0,0 +1,16 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-standard.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE standard | ||
4 | define KARCH i386 | ||
5 | |||
6 | include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
11 | |||
12 | # default policy for standard kernels | ||
13 | include cfg/usb-mass-storage.scc | ||
14 | include cfg/boot-live.scc | ||
15 | include features/latencytop/latencytop.scc | ||
16 | include features/profiling/profiling.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc new file mode 100644 index 0000000000..cc7519699a --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-tiny.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-tiny.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE tiny | ||
4 | define KARCH i386 | ||
5 | |||
6 | include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg new file mode 100644 index 0000000000..69efdcc759 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-config.cfg | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-config.cfg \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc new file mode 100644 index 0000000000..85be26de97 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-features.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-features.scc \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc new file mode 100644 index 0000000000..4c59daac46 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine-user-patches.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-patches.scc \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg new file mode 100644 index 0000000000..3b168b7e36 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.cfg | |||
@@ -0,0 +1,55 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.cfg | ||
2 | CONFIG_X86_32=y | ||
3 | CONFIG_MATOM=y | ||
4 | CONFIG_PRINTK=y | ||
5 | |||
6 | # Basic hardware support for the box - network, USB, PCI, sound | ||
7 | CONFIG_NETDEVICES=y | ||
8 | CONFIG_ATA=y | ||
9 | CONFIG_ATA_GENERIC=y | ||
10 | CONFIG_ATA_SFF=y | ||
11 | CONFIG_PCI=y | ||
12 | CONFIG_MMC=y | ||
13 | CONFIG_MMC_SDHCI=y | ||
14 | CONFIG_USB_SUPPORT=y | ||
15 | CONFIG_USB=y | ||
16 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
17 | CONFIG_R8169=y | ||
18 | CONFIG_PATA_SCH=y | ||
19 | CONFIG_MMC_SDHCI_PCI=y | ||
20 | CONFIG_USB_EHCI_HCD=y | ||
21 | CONFIG_PCIEPORTBUS=y | ||
22 | CONFIG_NET=y | ||
23 | CONFIG_USB_UHCI_HCD=y | ||
24 | CONFIG_USB_OHCI_HCD=y | ||
25 | CONFIG_BLK_DEV_SD=y | ||
26 | CONFIG_CHR_DEV_SG=y | ||
27 | CONFIG_SOUND=y | ||
28 | CONFIG_SND=y | ||
29 | CONFIG_SND_HDA_INTEL=y | ||
30 | CONFIG_SATA_AHCI=y | ||
31 | CONFIG_AGP=y | ||
32 | CONFIG_PM=y | ||
33 | CONFIG_ACPI=y | ||
34 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
35 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
36 | CONFIG_INPUT=y | ||
37 | |||
38 | # Make sure these are on, otherwise the bootup won't be fun | ||
39 | CONFIG_EXT3_FS=y | ||
40 | CONFIG_UNIX=y | ||
41 | CONFIG_INET=y | ||
42 | CONFIG_MODULES=y | ||
43 | CONFIG_SHMEM=y | ||
44 | CONFIG_TMPFS=y | ||
45 | CONFIG_PACKET=y | ||
46 | |||
47 | # Needed for booting (and using) USB memory sticks | ||
48 | CONFIG_BLK_DEV_LOOP=y | ||
49 | CONFIG_NLS_CODEPAGE_437=y | ||
50 | CONFIG_NLS_ISO8859_1=y | ||
51 | |||
52 | CONFIG_RD_GZIP=y | ||
53 | |||
54 | # Needed for booting (and using) CD images | ||
55 | CONFIG_BLK_DEV_SR=y | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc new file mode 100644 index 0000000000..3d32f111b0 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/files/machine.scc | |||
@@ -0,0 +1,21 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.scc | ||
2 | kconf hardware {{=machine}}.cfg | ||
3 | |||
4 | include features/intel-e1xxxx/intel-e100.scc | ||
5 | include features/intel-e1xxxx/intel-e1xxxx.scc | ||
6 | |||
7 | {{ if xserver == "y" and xserver_choice == "xserver_i915" or xserver_choice == "xserver_i965": }} | ||
8 | include features/i915/i915.scc | ||
9 | |||
10 | include features/serial/8250.scc | ||
11 | include features/ericsson-3g/f5521gw.scc | ||
12 | |||
13 | {{ if xserver == "y" and xserver_choice == "xserver_vesa": }} | ||
14 | include cfg/vesafb.scc | ||
15 | |||
16 | include cfg/usb-mass-storage.scc | ||
17 | include cfg/boot-live.scc | ||
18 | include features/power/intel.scc | ||
19 | |||
20 | kconf hardware {{=machine}}-user-config.cfg | ||
21 | include {{=machine}}-user-patches.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall new file mode 100644 index 0000000000..a04e6c7852 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall | |||
@@ -0,0 +1,5 @@ | |||
1 | {{ if kernel_choice != "custom": }} | ||
2 | {{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}} | ||
3 | |||
4 | {{ if kernel_choice != "custom" and use_default_kernel == "n": }} | ||
5 | {{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_3.14"}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 0000000000..2fa6231cbf --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -0,0 +1,26 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "n": }} | ||
16 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
17 | |||
18 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
19 | {{ if smp == "y": }} | ||
20 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
21 | |||
22 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
23 | file://{{=machine}}-user-config.cfg \ | ||
24 | file://{{=machine}}-user-patches.scc \ | ||
25 | file://{{=machine}}-user-features.scc \ | ||
26 | " | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend new file mode 100644 index 0000000000..35b0958582 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-preempt-rt.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb" | ||
32 | #SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend new file mode 100644 index 0000000000..f04dd0cce4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend new file mode 100644 index 0000000000..471ccbcc3e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000000..1cfc611949 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "19f7e43b54aef08d58135ed2a897d77b624b320a" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "459165c1dd61c4e843c36e6a1abeb30949a20ba7" | ||
33 | #LINUX_VERSION = "3.10.9" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend new file mode 100644 index 0000000000..fbb49edb26 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT b/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT new file mode 100644 index 0000000000..89de354795 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/COPYING.MIT | |||
@@ -0,0 +1,17 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE SOFTWARE. | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/README b/scripts/lib/bsp/substrate/target/arch/layer/README new file mode 100644 index 0000000000..943dfc4412 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/README | |||
@@ -0,0 +1,64 @@ | |||
1 | This README file contains information on the contents of the | ||
2 | {{=layer_name}} layer. | ||
3 | |||
4 | Please see the corresponding sections below for details. | ||
5 | |||
6 | |||
7 | Dependencies | ||
8 | ============ | ||
9 | |||
10 | This layer depends on: | ||
11 | |||
12 | URI: git://git.openembedded.org/bitbake | ||
13 | branch: master | ||
14 | |||
15 | URI: git://git.openembedded.org/openembedded-core | ||
16 | layers: meta | ||
17 | branch: master | ||
18 | |||
19 | URI: git://git.yoctoproject.org/xxxx | ||
20 | layers: xxxx | ||
21 | branch: master | ||
22 | |||
23 | |||
24 | Patches | ||
25 | ======= | ||
26 | |||
27 | Please submit any patches against the {{=layer_name}} layer to the | ||
28 | xxxx mailing list (xxxx@zzzz.org) and cc: the maintainer: | ||
29 | |||
30 | Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com> | ||
31 | |||
32 | |||
33 | Table of Contents | ||
34 | ================= | ||
35 | |||
36 | I. Adding the {{=layer_name}} layer to your build | ||
37 | II. Misc | ||
38 | |||
39 | |||
40 | I. Adding the {{=layer_name}} layer to your build | ||
41 | ================================================= | ||
42 | |||
43 | --- replace with specific instructions for the {{=layer_name}} layer --- | ||
44 | |||
45 | In order to use this layer, you need to make the build system aware of | ||
46 | it. | ||
47 | |||
48 | Assuming the {{=layer_name}} layer exists at the top-level of your | ||
49 | yocto build tree, you can add it to the build system by adding the | ||
50 | location of the {{=layer_name}} layer to bblayers.conf, along with any | ||
51 | other layers needed. e.g.: | ||
52 | |||
53 | BBLAYERS ?= " \ | ||
54 | /path/to/yocto/meta \ | ||
55 | /path/to/yocto/meta-yocto \ | ||
56 | /path/to/yocto/meta-yocto-bsp \ | ||
57 | /path/to/yocto/meta-{{=layer_name}} \ | ||
58 | " | ||
59 | |||
60 | |||
61 | II. Misc | ||
62 | ======== | ||
63 | |||
64 | --- replace with specific information about the {{=layer_name}} layer --- | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf b/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf new file mode 100644 index 0000000000..bdffe17195 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/conf/layer.conf | |||
@@ -0,0 +1,10 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have recipes-* directories, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "{{=layer_name}}" | ||
9 | BBFILE_PATTERN_{{=layer_name}} = "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_{{=layer_name}} = "{{=layer_priority}}" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall b/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall new file mode 100644 index 0000000000..e2a89c3b5d --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/layer-questions.noinstall | |||
@@ -0,0 +1,14 @@ | |||
1 | {{ input type:"edit" name:"layer_priority" prio:"20" msg:"Please enter the layer priority you'd like to use for the layer:" default:"6"}} | ||
2 | |||
3 | {{ input type:"boolean" name:"create_example_recipe" prio:"20" msg:"Would you like to have an example recipe created? (y/n)" default:"n"}} | ||
4 | |||
5 | {{ if create_example_recipe == "y": }} | ||
6 | {{ input type:"edit" name:"example_recipe_name" prio:"20" msg:"Please enter the name you'd like to use for your example recipe:" default:"example"}} | ||
7 | |||
8 | {{ input type:"boolean" name:"create_example_bbappend" prio:"20" msg:"Would you like to have an example bbappend file created? (y/n)" default:"n"}} | ||
9 | |||
10 | {{ if create_example_bbappend == "y": }} | ||
11 | {{ input type:"edit" name:"example_bbappend_name" prio:"20" msg:"Please enter the name you'd like to use for your bbappend file:" default:"example"}} | ||
12 | |||
13 | {{ if create_example_bbappend == "y": }} | ||
14 | {{ input type:"edit" name:"example_bbappend_version" prio:"20" msg:"Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to):" default:"0.1"}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall new file mode 100644 index 0000000000..3594e6583c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if create_example_bbappend == "y": }} recipes-example-bbappend | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend new file mode 100644 index 0000000000..353133080a --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | # yocto-bsp-filename {{=example_bbappend_name}}_{{=example_bbappend_version}}.bbappend | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" | ||
3 | |||
4 | # | ||
5 | # This .bbappend doesn't yet do anything - replace this text with | ||
6 | # modifications to the example_0.1.bb recipe, or whatever recipe it is | ||
7 | # that you want to modify with this .bbappend (make sure you change | ||
8 | # the recipe name (PN) and version (PV) to match). | ||
9 | # | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall new file mode 100644 index 0000000000..46df8a8e04 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=example_bbappend_name}}-{{=example_bbappend_version}} | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch new file mode 100644 index 0000000000..2000a34da5 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example-bbappend/example-bbappend/example-bbappend-version/example.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | # | ||
2 | # This is a non-functional placeholder file, here for example purposes | ||
3 | # only. | ||
4 | # | ||
5 | # If you had a patch for your recipe, you'd put it in this directory | ||
6 | # and reference it from your recipe's SRC_URI: | ||
7 | # | ||
8 | # SRC_URI += "file://example.patch" | ||
9 | # | ||
10 | # Note that you could also rename the directory containing this patch | ||
11 | # to remove the version number or simply rename it 'files'. Doing so | ||
12 | # allows you to use the same directory for multiple recipes. | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall new file mode 100644 index 0000000000..b0069b1a5a --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if create_example_recipe == "y": }} recipes-example | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb new file mode 100644 index 0000000000..ba1ccb16c6 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | # yocto-bsp-filename {{=example_recipe_name}}_0.1.bb | ||
2 | # | ||
3 | # This file was derived from the 'Hello World!' example recipe in the | ||
4 | # Yocto Project Development Manual. | ||
5 | # | ||
6 | |||
7 | DESCRIPTION = "Simple helloworld application" | ||
8 | SECTION = "examples" | ||
9 | LICENSE = "MIT" | ||
10 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
11 | PR = "r0" | ||
12 | |||
13 | SRC_URI = "file://helloworld.c" | ||
14 | |||
15 | S = "${WORKDIR}" | ||
16 | |||
17 | do_compile() { | ||
18 | ${CC} helloworld.c -o helloworld | ||
19 | } | ||
20 | |||
21 | do_install() { | ||
22 | install -d ${D}${bindir} | ||
23 | install -m 0755 helloworld ${D}${bindir} | ||
24 | } | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall new file mode 100644 index 0000000000..c319c19c57 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=example_recipe_name}}-0.1 | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch new file mode 100644 index 0000000000..2000a34da5 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/example.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | # | ||
2 | # This is a non-functional placeholder file, here for example purposes | ||
3 | # only. | ||
4 | # | ||
5 | # If you had a patch for your recipe, you'd put it in this directory | ||
6 | # and reference it from your recipe's SRC_URI: | ||
7 | # | ||
8 | # SRC_URI += "file://example.patch" | ||
9 | # | ||
10 | # Note that you could also rename the directory containing this patch | ||
11 | # to remove the version number or simply rename it 'files'. Doing so | ||
12 | # allows you to use the same directory for multiple recipes. | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c new file mode 100644 index 0000000000..71f2e46b4e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/layer/recipes-example/example/example-recipe-0.1/helloworld.c | |||
@@ -0,0 +1,8 @@ | |||
1 | #include <stdio.h> | ||
2 | |||
3 | int main(int argc, char **argv) | ||
4 | { | ||
5 | printf("Hello World!\n"); | ||
6 | |||
7 | return 0; | ||
8 | } | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/.gitignore b/scripts/lib/bsp/substrate/target/arch/mips/.gitignore new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/.gitignore | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf b/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf new file mode 100644 index 0000000000..b319d626f4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/conf/machine/machine.conf | |||
@@ -0,0 +1,39 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.conf | ||
2 | #@TYPE: Machine | ||
3 | #@NAME: {{=machine}} | ||
4 | |||
5 | #@DESCRIPTION: Machine configuration for {{=machine}} systems | ||
6 | |||
7 | require conf/machine/include/tune-mips32.inc | ||
8 | |||
9 | MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial" | ||
10 | |||
11 | KERNEL_IMAGETYPE = "vmlinux" | ||
12 | KERNEL_ALT_IMAGETYPE = "vmlinux.bin" | ||
13 | KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment" | ||
14 | |||
15 | {{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }} | ||
16 | {{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }} | ||
17 | {{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }} | ||
18 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
19 | |||
20 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }} | ||
21 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }} | ||
22 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }} | ||
23 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
24 | PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%" | ||
25 | |||
26 | {{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }} | ||
27 | {{ if xserver == "y": }} | ||
28 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" | ||
29 | XSERVER ?= "xserver-xorg \ | ||
30 | xf86-input-evdev \ | ||
31 | xf86-video-fbdev" | ||
32 | |||
33 | SERIAL_CONSOLE = "115200 ttyS0" | ||
34 | USE_VT ?= "0" | ||
35 | |||
36 | MACHINE_EXTRA_RRECOMMENDS = " kernel-modules" | ||
37 | |||
38 | IMAGE_FSTYPES ?= "jffs2 tar.bz2" | ||
39 | JFFS2_ERASEBLOCK = "0x10000" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall new file mode 100644 index 0000000000..1e0d92c55c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc new file mode 100644 index 0000000000..176190cd2e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-preempt-rt.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-preempt-rt.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE preempt-rt | ||
4 | define KARCH mips | ||
5 | |||
6 | include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc new file mode 100644 index 0000000000..f05dd851d2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-standard.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-standard.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE standard | ||
4 | define KARCH mips | ||
5 | |||
6 | include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc new file mode 100644 index 0000000000..f71c775397 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-tiny.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-tiny.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE tiny | ||
4 | define KARCH mips | ||
5 | |||
6 | include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg new file mode 100644 index 0000000000..47489e44e9 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-config.cfg | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-config.cfg | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc new file mode 100644 index 0000000000..85be26de97 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-features.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-features.scc \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc new file mode 100644 index 0000000000..97f747fa07 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine-user-patches.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-patches.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg new file mode 100644 index 0000000000..2fe476691c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.cfg | ||
2 | CONFIG_MIPS=y | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc new file mode 100644 index 0000000000..f39dc3edf1 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/files/machine.scc | |||
@@ -0,0 +1,8 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.scc | ||
2 | kconf hardware {{=machine}}.cfg | ||
3 | |||
4 | include cfg/usb-mass-storage.scc | ||
5 | include cfg/fs/vfat.scc | ||
6 | |||
7 | kconf hardware {{=machine}}-user-config.cfg | ||
8 | include {{=machine}}-user-patches.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall new file mode 100644 index 0000000000..a04e6c7852 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall | |||
@@ -0,0 +1,5 @@ | |||
1 | {{ if kernel_choice != "custom": }} | ||
2 | {{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}} | ||
3 | |||
4 | {{ if kernel_choice != "custom" and use_default_kernel == "n": }} | ||
5 | {{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_3.14"}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 0000000000..2fa6231cbf --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -0,0 +1,26 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "n": }} | ||
16 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
17 | |||
18 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
19 | {{ if smp == "y": }} | ||
20 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
21 | |||
22 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
23 | file://{{=machine}}-user-config.cfg \ | ||
24 | file://{{=machine}}-user-patches.scc \ | ||
25 | file://{{=machine}}-user-features.scc \ | ||
26 | " | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend new file mode 100644 index 0000000000..35b0958582 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-preempt-rt.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb" | ||
32 | #SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend new file mode 100644 index 0000000000..f04dd0cce4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend new file mode 100644 index 0000000000..c7e7989821 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000000..badb3aa239 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "19f7e43b54aef08d58135ed2a897d77b624b320a" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "459165c1dd61c4e843c36e6a1abeb30949a20ba7" | ||
33 | #LINUX_VERSION = "3.10.9" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.14.bbappend new file mode 100644 index 0000000000..1e1cc51315 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore b/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/.gitignore | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf b/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf new file mode 100644 index 0000000000..bee0ec3772 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf | |||
@@ -0,0 +1,75 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.conf | ||
2 | #@TYPE: Machine | ||
3 | #@NAME: {{=machine}} | ||
4 | |||
5 | #@DESCRIPTION: Machine configuration for {{=machine}} systems | ||
6 | |||
7 | TARGET_FPU = "" | ||
8 | |||
9 | {{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_ppce300c3" }} | ||
10 | {{ input type:"choice" val:"tune_ppc476" msg:"ppc476 tuning optimizations" }} | ||
11 | {{ input type:"choice" val:"tune_ppc603e" msg:"ppc603e tuning optimizations" }} | ||
12 | {{ input type:"choice" val:"tune_ppc7400" msg:"ppc7400 tuning optimizations" }} | ||
13 | {{ input type:"choice" val:"tune_ppce300c2" msg:"ppce300c2 tuning optimizations" }} | ||
14 | {{ input type:"choice" val:"tune_ppce300c3" msg:"ppce300c3 tuning optimizations" }} | ||
15 | {{ input type:"choice" val:"tune_ppce500" msg:"ppce500 tuning optimizations" }} | ||
16 | {{ input type:"choice" val:"tune_ppce500mc" msg:"ppce500mc tuning optimizations" }} | ||
17 | {{ input type:"choice" val:"tune_ppce500v2" msg:"ppce500v2 tuning optimizations" }} | ||
18 | {{ input type:"choice" val:"tune_ppce5500" msg:"ppce5500 tuning optimizations" }} | ||
19 | {{ input type:"choice" val:"tune_ppce6500" msg:"ppce6500 tuning optimizations" }} | ||
20 | {{ if tunefile == "tune_ppc476": }} | ||
21 | include conf/machine/include/tune-ppc476.inc | ||
22 | {{ if tunefile == "tune_ppc603e": }} | ||
23 | include conf/machine/include/tune-ppc603e.inc | ||
24 | {{ if tunefile == "tune_ppc7400": }} | ||
25 | include conf/machine/include/tune-ppc7400.inc | ||
26 | {{ if tunefile == "tune_ppce300c2": }} | ||
27 | include conf/machine/include/tune-ppce300c2.inc | ||
28 | {{ if tunefile == "tune_ppce300c3": }} | ||
29 | include conf/machine/include/tune-ppce300c3.inc | ||
30 | {{ if tunefile == "tune_ppce500": }} | ||
31 | include conf/machine/include/tune-ppce500.inc | ||
32 | {{ if tunefile == "tune_ppce500mc": }} | ||
33 | include conf/machine/include/tune-ppce500mc.inc | ||
34 | {{ if tunefile == "tune_ppce500v2": }} | ||
35 | include conf/machine/include/tune-ppce500v2.inc | ||
36 | {{ if tunefile == "tune_ppce5500": }} | ||
37 | include conf/machine/include/tune-ppce5500.inc | ||
38 | {{ if tunefile == "tune_ppce6500": }} | ||
39 | include conf/machine/include/tune-ppce6500.inc | ||
40 | |||
41 | KERNEL_IMAGETYPE = "uImage" | ||
42 | |||
43 | EXTRA_IMAGEDEPENDS += "u-boot" | ||
44 | UBOOT_MACHINE_{{=machine}} = "MPC8315ERDB_config" | ||
45 | |||
46 | SERIAL_CONSOLE = "115200 ttyS0" | ||
47 | |||
48 | MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" | ||
49 | |||
50 | {{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }} | ||
51 | {{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }} | ||
52 | {{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }} | ||
53 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
54 | |||
55 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }} | ||
56 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }} | ||
57 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }} | ||
58 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
59 | PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%" | ||
60 | |||
61 | {{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }} | ||
62 | {{ if xserver == "y": }} | ||
63 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" | ||
64 | XSERVER ?= "xserver-xorg \ | ||
65 | xf86-input-evdev \ | ||
66 | xf86-video-fbdev" | ||
67 | |||
68 | PREFERRED_VERSION_u-boot ?= "v2013.07%" | ||
69 | {{ input type:"edit" name:"uboot_entrypoint" prio:"40" msg:"Please specify a value for UBOOT_ENTRYPOINT:" default:"0x00000000" }} | ||
70 | UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}" | ||
71 | |||
72 | {{ input type:"edit" name:"kernel_devicetree" prio:"40" msg:"Please specify a [arch/powerpc/boot/dts/xxx] value for KERNEL_DEVICETREE:" default:"mpc8315erdb.dts" }} | ||
73 | KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/{{=kernel_devicetree}}" | ||
74 | |||
75 | MACHINE_EXTRA_RRECOMMENDS = " kernel-modules" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall new file mode 100644 index 0000000000..1e0d92c55c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc new file mode 100644 index 0000000000..40c9267831 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-preempt-rt.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-preempt-rt.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE preempt-rt | ||
4 | define KARCH powerpc | ||
5 | |||
6 | include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc new file mode 100644 index 0000000000..7a1d35be1e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-standard.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-standard.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE standard | ||
4 | define KARCH powerpc | ||
5 | |||
6 | include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc new file mode 100644 index 0000000000..1bf94b2d05 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-tiny.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-tiny.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE tiny | ||
4 | define KARCH powerpc | ||
5 | |||
6 | include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg new file mode 100644 index 0000000000..47489e44e9 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-config.cfg | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-config.cfg | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc new file mode 100644 index 0000000000..582759e612 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-features.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-features.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc new file mode 100644 index 0000000000..97f747fa07 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine-user-patches.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-patches.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg new file mode 100644 index 0000000000..5bfe1fe4b0 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.cfg | |||
@@ -0,0 +1,164 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.cfg | ||
2 | .......................................................................... | ||
3 | . WARNING | ||
4 | . | ||
5 | . This file is a kernel configuration fragment, and not a full kernel | ||
6 | . configuration file. The final kernel configuration is made up of | ||
7 | . an assembly of processed fragments, each of which is designed to | ||
8 | . capture a specific part of the final configuration (e.g. platform | ||
9 | . configuration, feature configuration, and board specific hardware | ||
10 | . configuration). For more information on kernel configuration, please | ||
11 | . consult the product documentation. | ||
12 | . | ||
13 | .......................................................................... | ||
14 | CONFIG_PPC32=y | ||
15 | CONFIG_PPC_OF=y | ||
16 | CONFIG_PPC_UDBG_16550=y | ||
17 | |||
18 | # | ||
19 | # Processor support | ||
20 | # | ||
21 | CONFIG_PPC_83xx=y | ||
22 | |||
23 | # | ||
24 | # Platform support | ||
25 | # | ||
26 | CONFIG_MPC831x_RDB=y | ||
27 | # CONFIG_PPC_CHRP is not set | ||
28 | # CONFIG_PPC_PMAC is not set | ||
29 | |||
30 | # | ||
31 | # Bus options | ||
32 | # | ||
33 | CONFIG_PCI=y | ||
34 | |||
35 | # | ||
36 | # Memory Technology Devices (MTD) | ||
37 | # | ||
38 | CONFIG_MTD=y | ||
39 | CONFIG_MTD_PARTITIONS=y | ||
40 | CONFIG_MTD_CMDLINE_PARTS=y | ||
41 | CONFIG_MTD_OF_PARTS=y | ||
42 | |||
43 | # | ||
44 | # User Modules And Translation Layers | ||
45 | # | ||
46 | CONFIG_MTD_CHAR=y | ||
47 | CONFIG_MTD_BLOCK=y | ||
48 | |||
49 | # | ||
50 | # RAM/ROM/Flash chip drivers | ||
51 | # | ||
52 | CONFIG_MTD_CFI=y | ||
53 | CONFIG_MTD_CFI_AMDSTD=y | ||
54 | |||
55 | # | ||
56 | # Mapping drivers for chip access | ||
57 | # | ||
58 | CONFIG_MTD_PHYSMAP_OF=y | ||
59 | |||
60 | # | ||
61 | # NAND Flash Device Drivers | ||
62 | # | ||
63 | CONFIG_MTD_NAND=y | ||
64 | |||
65 | # | ||
66 | # Ethernet (1000 Mbit) | ||
67 | # | ||
68 | CONFIG_GIANFAR=y | ||
69 | |||
70 | # | ||
71 | # Serial drivers | ||
72 | # | ||
73 | CONFIG_SERIAL_8250=y | ||
74 | CONFIG_SERIAL_8250_CONSOLE=y | ||
75 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
76 | |||
77 | # | ||
78 | # Watchdog Device Drivers | ||
79 | # | ||
80 | CONFIG_8xxx_WDT=y | ||
81 | |||
82 | # | ||
83 | # I2C support | ||
84 | # | ||
85 | CONFIG_I2C=y | ||
86 | CONFIG_I2C_CHARDEV=y | ||
87 | |||
88 | # | ||
89 | # I2C Hardware Bus support | ||
90 | # | ||
91 | CONFIG_I2C_MPC=y | ||
92 | |||
93 | CONFIG_SENSORS_LM75=y | ||
94 | |||
95 | CONFIG_MISC_DEVICES=y | ||
96 | |||
97 | # | ||
98 | # Miscellaneous I2C Chip support | ||
99 | # | ||
100 | CONFIG_EEPROM_AT24=y | ||
101 | |||
102 | # | ||
103 | # SPI support | ||
104 | # | ||
105 | CONFIG_SPI=y | ||
106 | # CONFIG_SPI_DEBUG is not set | ||
107 | CONFIG_SPI_MASTER=y | ||
108 | |||
109 | # | ||
110 | # SPI Master Controller Drivers | ||
111 | # | ||
112 | CONFIG_SPI_MPC8xxx=y | ||
113 | |||
114 | # | ||
115 | # SPI Protocol Masters | ||
116 | # | ||
117 | CONFIG_HWMON=y | ||
118 | |||
119 | # | ||
120 | # SCSI device support | ||
121 | # | ||
122 | CONFIG_SCSI=y | ||
123 | CONFIG_BLK_DEV_SD=y | ||
124 | CONFIG_CHR_DEV_SG=y | ||
125 | CONFIG_SCSI_LOGGING=y | ||
126 | |||
127 | CONFIG_ATA=y | ||
128 | CONFIG_ATA_VERBOSE_ERROR=y | ||
129 | CONFIG_SATA_FSL=y | ||
130 | CONFIG_ATA_SFF=y | ||
131 | |||
132 | # | ||
133 | # USB support | ||
134 | # | ||
135 | CONFIG_USB=m | ||
136 | CONFIG_USB_DEVICEFS=y | ||
137 | |||
138 | # | ||
139 | # USB Host Controller Drivers | ||
140 | # | ||
141 | CONFIG_USB_EHCI_HCD=m | ||
142 | CONFIG_USB_EHCI_FSL=y | ||
143 | CONFIG_USB_STORAGE=m | ||
144 | |||
145 | # | ||
146 | # Real Time Clock | ||
147 | # | ||
148 | CONFIG_RTC_CLASS=y | ||
149 | |||
150 | # | ||
151 | # I2C RTC drivers | ||
152 | # | ||
153 | CONFIG_RTC_DRV_DS1307=y | ||
154 | |||
155 | CONFIG_KGDB_8250=m | ||
156 | |||
157 | CONFIG_CRYPTO_DEV_TALITOS=m | ||
158 | |||
159 | CONFIG_FSL_DMA=y | ||
160 | |||
161 | CONFIG_MMC=y | ||
162 | CONFIG_MMC_SPI=m | ||
163 | |||
164 | CONFIG_USB_FSL_MPH_DR_OF=y | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc new file mode 100644 index 0000000000..7aac8b0801 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/files/machine.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.scc | ||
2 | kconf hardware {{=machine}}.cfg | ||
3 | |||
4 | include cfg/usb-mass-storage.scc | ||
5 | include cfg/fs/vfat.scc | ||
6 | |||
7 | include cfg/dmaengine.scc | ||
8 | |||
9 | kconf hardware {{=machine}}-user-config.cfg | ||
10 | include {{=machine}}-user-patches.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall new file mode 100644 index 0000000000..a04e6c7852 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall | |||
@@ -0,0 +1,5 @@ | |||
1 | {{ if kernel_choice != "custom": }} | ||
2 | {{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}} | ||
3 | |||
4 | {{ if kernel_choice != "custom" and use_default_kernel == "n": }} | ||
5 | {{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_3.14"}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 0000000000..2fa6231cbf --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -0,0 +1,26 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "n": }} | ||
16 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
17 | |||
18 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
19 | {{ if smp == "y": }} | ||
20 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
21 | |||
22 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
23 | file://{{=machine}}-user-config.cfg \ | ||
24 | file://{{=machine}}-user-patches.scc \ | ||
25 | file://{{=machine}}-user-features.scc \ | ||
26 | " | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend new file mode 100644 index 0000000000..7a2544617f --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-preempt-rt.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb" | ||
32 | #SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f" | ||
33 | #LINUX_VERSION = "3.14" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend new file mode 100644 index 0000000000..f04dd0cce4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend new file mode 100644 index 0000000000..471ccbcc3e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000000..15b4b973c9 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "19f7e43b54aef08d58135ed2a897d77b624b320a" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "459165c1dd61c4e843c36e6a1abeb30949a20ba7" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend new file mode 100644 index 0000000000..e688384020 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf b/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf new file mode 100644 index 0000000000..52f1866b5b --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/machine.conf | |||
@@ -0,0 +1,70 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.conf | ||
2 | #@TYPE: Machine | ||
3 | #@NAME: {{=machine}} | ||
4 | |||
5 | #@DESCRIPTION: Machine configuration for {{=machine}} systems | ||
6 | |||
7 | {{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }} | ||
8 | {{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }} | ||
9 | {{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }} | ||
10 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
11 | |||
12 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }} | ||
13 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }} | ||
14 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }} | ||
15 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
16 | PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%" | ||
17 | |||
18 | {{ if qemuarch == "i386" or qemuarch == "x86_64": }} | ||
19 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" | ||
20 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | ||
21 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" | ||
22 | PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" | ||
23 | |||
24 | {{ input type:"choicelist" name:"qemuarch" prio:"5" msg:"Which qemu architecture would you like to use?" default:"i386" }} | ||
25 | {{ input type:"choice" val:"i386" msg:"i386 (32-bit)" }} | ||
26 | {{ input type:"choice" val:"x86_64" msg:"x86_64 (64-bit)" }} | ||
27 | {{ input type:"choice" val:"arm" msg:"ARM (32-bit)" }} | ||
28 | {{ input type:"choice" val:"powerpc" msg:"PowerPC (32-bit)" }} | ||
29 | {{ input type:"choice" val:"mips" msg:"MIPS (32-bit)" }} | ||
30 | {{ if qemuarch == "i386": }} | ||
31 | require conf/machine/include/qemu.inc | ||
32 | require conf/machine/include/tune-i586.inc | ||
33 | {{ if qemuarch == "x86_64": }} | ||
34 | require conf/machine/include/qemu.inc | ||
35 | DEFAULTTUNE ?= "core2-64" | ||
36 | require conf/machine/include/tune-core2.inc | ||
37 | {{ if qemuarch == "arm": }} | ||
38 | require conf/machine/include/qemu.inc | ||
39 | require conf/machine/include/tune-arm926ejs.inc | ||
40 | {{ if qemuarch == "powerpc": }} | ||
41 | require conf/machine/include/qemu.inc | ||
42 | require conf/machine/include/tune-ppc7400.inc | ||
43 | {{ if qemuarch == "mips": }} | ||
44 | require conf/machine/include/qemu.inc | ||
45 | require conf/machine/include/tune-mips32.inc | ||
46 | |||
47 | {{ if qemuarch == "i386" or qemuarch == "x86_64": }} | ||
48 | MACHINE_FEATURES += "x86" | ||
49 | KERNEL_IMAGETYPE = "bzImage" | ||
50 | SERIAL_CONSOLE = "115200 ttyS0" | ||
51 | XSERVER = "xserver-xorg \ | ||
52 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '', d)} \ | ||
53 | xf86-input-vmmouse \ | ||
54 | xf86-input-keyboard \ | ||
55 | xf86-input-evdev \ | ||
56 | xf86-video-vmware" | ||
57 | |||
58 | {{ if qemuarch == "arm": }} | ||
59 | KERNEL_IMAGETYPE = "zImage" | ||
60 | SERIAL_CONSOLE = "115200 ttyAMA0" | ||
61 | |||
62 | {{ if qemuarch == "powerpc": }} | ||
63 | KERNEL_IMAGETYPE = "vmlinux" | ||
64 | SERIAL_CONSOLE = "115200 ttyS0" | ||
65 | |||
66 | {{ if qemuarch == "mips": }} | ||
67 | KERNEL_IMAGETYPE = "vmlinux" | ||
68 | KERNEL_ALT_IMAGETYPE = "vmlinux.bin" | ||
69 | SERIAL_CONSOLE = "115200 ttyS0" | ||
70 | MACHINE_EXTRA_RRECOMMENDS = " kernel-modules" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall new file mode 100644 index 0000000000..b442d02d57 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=machine}} | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces new file mode 100644 index 0000000000..16967763e5 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown/machine/interfaces | |||
@@ -0,0 +1,5 @@ | |||
1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
2 | |||
3 | # The loopback interface | ||
4 | auto lo | ||
5 | iface lo inet loopback | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend new file mode 100644 index 0000000000..72d991c7e5 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend | |||
@@ -0,0 +1 @@ | |||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall new file mode 100644 index 0000000000..b442d02d57 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=machine}} | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf new file mode 100644 index 0000000000..13519804bc --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf | |||
@@ -0,0 +1,77 @@ | |||
1 | |||
2 | Section "Files" | ||
3 | EndSection | ||
4 | |||
5 | Section "InputDevice" | ||
6 | Identifier "Generic Keyboard" | ||
7 | Driver "evdev" | ||
8 | Option "CoreKeyboard" | ||
9 | Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" | ||
10 | Option "XkbRules" "xorg" | ||
11 | Option "XkbModel" "evdev" | ||
12 | Option "XkbLayout" "us" | ||
13 | EndSection | ||
14 | |||
15 | Section "InputDevice" | ||
16 | Identifier "Configured Mouse" | ||
17 | {{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips": }} | ||
18 | Driver "mouse" | ||
19 | {{ if qemuarch == "i386" or qemuarch == "x86_64": }} | ||
20 | Driver "vmmouse" | ||
21 | |||
22 | Option "CorePointer" | ||
23 | Option "Device" "/dev/input/mice" | ||
24 | Option "Protocol" "ImPS/2" | ||
25 | Option "ZAxisMapping" "4 5" | ||
26 | Option "Emulate3Buttons" "true" | ||
27 | EndSection | ||
28 | |||
29 | Section "InputDevice" | ||
30 | Identifier "Qemu Tablet" | ||
31 | Driver "evdev" | ||
32 | Option "CorePointer" | ||
33 | Option "Device" "/dev/input/touchscreen0" | ||
34 | Option "USB" "on" | ||
35 | EndSection | ||
36 | |||
37 | Section "Device" | ||
38 | Identifier "Graphics Controller" | ||
39 | {{ if qemuarch == "arm" or qemuarch == "powerpc" or qemuarch == "mips": }} | ||
40 | Driver "fbdev" | ||
41 | {{ if qemuarch == "i386" or qemuarch == "x86_64": }} | ||
42 | Driver "vmware" | ||
43 | |||
44 | EndSection | ||
45 | |||
46 | Section "Monitor" | ||
47 | Identifier "Generic Monitor" | ||
48 | Option "DPMS" | ||
49 | # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz | ||
50 | Modeline "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync | ||
51 | # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz | ||
52 | ModeLine "640x480" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync | ||
53 | # 640x480 @ 72Hz (VESA) hsync: 37.9kHz | ||
54 | ModeLine "640x480" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync | ||
55 | # 640x480 @ 75Hz (VESA) hsync: 37.5kHz | ||
56 | ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync | ||
57 | # 640x480 @ 85Hz (VESA) hsync: 43.3kHz | ||
58 | ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync | ||
59 | EndSection | ||
60 | |||
61 | Section "Screen" | ||
62 | Identifier "Default Screen" | ||
63 | Device "Graphics Controller" | ||
64 | Monitor "Generic Monitor" | ||
65 | SubSection "Display" | ||
66 | Modes "640x480" | ||
67 | EndSubSection | ||
68 | EndSection | ||
69 | |||
70 | Section "ServerLayout" | ||
71 | Identifier "Default Layout" | ||
72 | Screen "Default Screen" | ||
73 | InputDevice "Generic Keyboard" | ||
74 | # InputDevice "Configured Mouse" | ||
75 | InputDevice "QEMU Tablet" | ||
76 | Option "AllowEmptyInput" "no" | ||
77 | EndSection | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend new file mode 100644 index 0000000000..72d991c7e5 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | |||
@@ -0,0 +1 @@ | |||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall new file mode 100644 index 0000000000..0fb5283a8d --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc new file mode 100644 index 0000000000..6aaffb8184 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-preempt-rt.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-preempt-rt.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE preempt-rt | ||
4 | define KARCH {{=qemuarch}} | ||
5 | |||
6 | include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc new file mode 100644 index 0000000000..695f488064 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-standard.scc | |||
@@ -0,0 +1,17 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-standard.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE standard | ||
4 | define KARCH {{=qemuarch}} | ||
5 | |||
6 | {{ if qemuarch == "i386" or qemuarch == "x86_64": }} | ||
7 | include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
8 | {{ if qemuarch == "arm": }} | ||
9 | include bsp/arm-versatile-926ejs/arm-versatile-926ejs-standard | ||
10 | {{ if qemuarch == "powerpc": }} | ||
11 | include bsp/qemu-ppc32/qemu-ppc32-standard | ||
12 | {{ if qemuarch == "mips": }} | ||
13 | include bsp/mti-malta32/mti-malta32-be-standard | ||
14 | {{ if need_new_kbranch == "y": }} | ||
15 | branch {{=machine}} | ||
16 | |||
17 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc new file mode 100644 index 0000000000..6c098fed21 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-tiny.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-tiny.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE tiny | ||
4 | define KARCH {{=qemuarch}} | ||
5 | |||
6 | include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg new file mode 100644 index 0000000000..69efdcc759 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-config.cfg | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-config.cfg \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc new file mode 100644 index 0000000000..582759e612 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-features.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-features.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc new file mode 100644 index 0000000000..4c59daac46 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine-user-patches.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-patches.scc \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg new file mode 100644 index 0000000000..d560784b56 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.cfg | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}.cfg \ No newline at end of file | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc new file mode 100644 index 0000000000..8301e05f7d --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/files/machine.scc | |||
@@ -0,0 +1,5 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.scc | ||
2 | kconf hardware {{=machine}}.cfg | ||
3 | |||
4 | kconf hardware {{=machine}}-user-config.cfg | ||
5 | include {{=machine}}-user-patches.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall new file mode 100644 index 0000000000..a04e6c7852 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall | |||
@@ -0,0 +1,5 @@ | |||
1 | {{ if kernel_choice != "custom": }} | ||
2 | {{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}} | ||
3 | |||
4 | {{ if kernel_choice != "custom" and use_default_kernel == "n": }} | ||
5 | {{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_3.14"}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 0000000000..a2b86d2568 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -0,0 +1,50 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y" and qemuarch == "arm": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n" and qemuarch == "arm": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "y" and qemuarch == "powerpc": }} | ||
16 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
17 | |||
18 | {{ if need_new_kbranch == "n" and qemuarch == "powerpc": }} | ||
19 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }} | ||
20 | |||
21 | {{ if need_new_kbranch == "y" and qemuarch == "i386": }} | ||
22 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc/base" }} | ||
23 | |||
24 | {{ if need_new_kbranch == "n" and qemuarch == "i386": }} | ||
25 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc/base" }} | ||
26 | |||
27 | {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }} | ||
28 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
29 | |||
30 | {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }} | ||
31 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
32 | |||
33 | {{ if need_new_kbranch == "y" and qemuarch == "mips": }} | ||
34 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
35 | |||
36 | {{ if need_new_kbranch == "n" and qemuarch == "mips": }} | ||
37 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }} | ||
38 | |||
39 | {{ if need_new_kbranch == "n": }} | ||
40 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
41 | |||
42 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
43 | {{ if smp == "y": }} | ||
44 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
45 | |||
46 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
47 | file://{{=machine}}-user-config.cfg \ | ||
48 | file://{{=machine}}-user-patches.scc \ | ||
49 | file://{{=machine}}-user-features.scc \ | ||
50 | " | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend new file mode 100644 index 0000000000..aa87c28ff8 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend | |||
@@ -0,0 +1,56 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y" and qemuarch == "arm": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n" and qemuarch == "arm": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "y" and qemuarch == "powerpc": }} | ||
16 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
17 | |||
18 | {{ if need_new_kbranch == "n" and qemuarch == "powerpc": }} | ||
19 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/qemuppc" }} | ||
20 | |||
21 | {{ if need_new_kbranch == "y" and qemuarch == "i386": }} | ||
22 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
23 | |||
24 | {{ if need_new_kbranch == "n" and qemuarch == "i386": }} | ||
25 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
26 | |||
27 | {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }} | ||
28 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
29 | |||
30 | {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }} | ||
31 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
32 | |||
33 | {{ if need_new_kbranch == "y" and qemuarch == "mips": }} | ||
34 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
35 | |||
36 | {{ if need_new_kbranch == "n" and qemuarch == "mips": }} | ||
37 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
38 | |||
39 | {{ if need_new_kbranch == "n": }} | ||
40 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
41 | |||
42 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
43 | {{ if smp == "y": }} | ||
44 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
45 | |||
46 | SRC_URI += "file://{{=machine}}-preempt-rt.scc \ | ||
47 | file://{{=machine}}-user-config.cfg \ | ||
48 | file://{{=machine}}-user-patches.scc \ | ||
49 | file://{{=machine}}-user-features.scc \ | ||
50 | " | ||
51 | |||
52 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
53 | # the appropriate changes committed to the upstream linux-yocto repo | ||
54 | #SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb" | ||
55 | #SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f" | ||
56 | #LINUX_VERSION = "3.10.35" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend new file mode 100644 index 0000000000..001317ac92 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend | |||
@@ -0,0 +1,56 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y" and qemuarch == "arm": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n" and qemuarch == "arm": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "y" and qemuarch == "powerpc": }} | ||
16 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
17 | |||
18 | {{ if need_new_kbranch == "n" and qemuarch == "powerpc": }} | ||
19 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
20 | |||
21 | {{ if need_new_kbranch == "y" and qemuarch == "i386": }} | ||
22 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
23 | |||
24 | {{ if need_new_kbranch == "n" and qemuarch == "i386": }} | ||
25 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }} | ||
26 | |||
27 | {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }} | ||
28 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
29 | |||
30 | {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }} | ||
31 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
32 | |||
33 | {{ if need_new_kbranch == "y" and qemuarch == "mips": }} | ||
34 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
35 | |||
36 | {{ if need_new_kbranch == "n" and qemuarch == "mips": }} | ||
37 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
38 | |||
39 | {{ if need_new_kbranch == "n": }} | ||
40 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
41 | |||
42 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
43 | {{ if smp == "y": }} | ||
44 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
45 | |||
46 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
47 | file://{{=machine}}-user-config.cfg \ | ||
48 | file://{{=machine}}-user-patches.scc \ | ||
49 | file://{{=machine}}-user-features.scc \ | ||
50 | " | ||
51 | |||
52 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
53 | # the appropriate changes committed to the upstream linux-yocto repo | ||
54 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
55 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
56 | #LINUX_VERSION = "3.10.35" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.4.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.4.bbappend new file mode 100644 index 0000000000..32c96c9df8 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.4.bbappend | |||
@@ -0,0 +1,56 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.4": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y" and qemuarch == "arm": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n" and qemuarch == "arm": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "y" and qemuarch == "powerpc": }} | ||
16 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
17 | |||
18 | {{ if need_new_kbranch == "n" and qemuarch == "powerpc": }} | ||
19 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
20 | |||
21 | {{ if need_new_kbranch == "y" and qemuarch == "i386": }} | ||
22 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
23 | |||
24 | {{ if need_new_kbranch == "n" and qemuarch == "i386": }} | ||
25 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }} | ||
26 | |||
27 | {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }} | ||
28 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
29 | |||
30 | {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }} | ||
31 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
32 | |||
33 | {{ if need_new_kbranch == "y" and qemuarch == "mips": }} | ||
34 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
35 | |||
36 | {{ if need_new_kbranch == "n" and qemuarch == "mips": }} | ||
37 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
38 | |||
39 | {{ if need_new_kbranch == "n": }} | ||
40 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
41 | |||
42 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
43 | {{ if smp == "y": }} | ||
44 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
45 | |||
46 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
47 | file://{{=machine}}-user-config.cfg \ | ||
48 | file://{{=machine}}-user-patches.scc \ | ||
49 | file://{{=machine}}-user-features.scc \ | ||
50 | " | ||
51 | |||
52 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
53 | # the appropriate changes committed to the upstream linux-yocto repo | ||
54 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0" | ||
55 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "8f55bee2403176a50cc0dd41811aa60fcf07243c" | ||
56 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000000..9e3b7fb683 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.10.bbappend | |||
@@ -0,0 +1,56 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y" and qemuarch == "arm": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n" and qemuarch == "arm": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "y" and qemuarch == "powerpc": }} | ||
16 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
17 | |||
18 | {{ if need_new_kbranch == "n" and qemuarch == "powerpc": }} | ||
19 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }} | ||
20 | |||
21 | {{ if need_new_kbranch == "y" and qemuarch == "i386": }} | ||
22 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc/base" }} | ||
23 | |||
24 | {{ if need_new_kbranch == "n" and qemuarch == "i386": }} | ||
25 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc/base" }} | ||
26 | |||
27 | {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }} | ||
28 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
29 | |||
30 | {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }} | ||
31 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
32 | |||
33 | {{ if need_new_kbranch == "y" and qemuarch == "mips": }} | ||
34 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
35 | |||
36 | {{ if need_new_kbranch == "n" and qemuarch == "mips": }} | ||
37 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }} | ||
38 | |||
39 | {{ if need_new_kbranch == "n": }} | ||
40 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
41 | |||
42 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
43 | {{ if smp == "y": }} | ||
44 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
45 | |||
46 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
47 | file://{{=machine}}-user-config.cfg \ | ||
48 | file://{{=machine}}-user-patches.scc \ | ||
49 | file://{{=machine}}-user-features.scc \ | ||
50 | " | ||
51 | |||
52 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
53 | # the appropriate changes committed to the upstream linux-yocto repo | ||
54 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "b170394a475b96ecc92cbc9e4b002bed0a9f69c5" | ||
55 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "c2ed0f16fdec628242a682897d5d86df4547cf24" | ||
56 | #LINUX_VERSION = "3.10.35" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend new file mode 100644 index 0000000000..e63c897f60 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend | |||
@@ -0,0 +1,56 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y" and qemuarch == "arm": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n" and qemuarch == "arm": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "y" and qemuarch == "powerpc": }} | ||
16 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
17 | |||
18 | {{ if need_new_kbranch == "n" and qemuarch == "powerpc": }} | ||
19 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }} | ||
20 | |||
21 | {{ if need_new_kbranch == "y" and qemuarch == "i386": }} | ||
22 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc/base" }} | ||
23 | |||
24 | {{ if need_new_kbranch == "n" and qemuarch == "i386": }} | ||
25 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc/base" }} | ||
26 | |||
27 | {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }} | ||
28 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
29 | |||
30 | {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }} | ||
31 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
32 | |||
33 | {{ if need_new_kbranch == "y" and qemuarch == "mips": }} | ||
34 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
35 | |||
36 | {{ if need_new_kbranch == "n" and qemuarch == "mips": }} | ||
37 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }} | ||
38 | |||
39 | {{ if need_new_kbranch == "n": }} | ||
40 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
41 | |||
42 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
43 | {{ if smp == "y": }} | ||
44 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
45 | |||
46 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
47 | file://{{=machine}}-user-config.cfg \ | ||
48 | file://{{=machine}}-user-patches.scc \ | ||
49 | file://{{=machine}}-user-features.scc \ | ||
50 | " | ||
51 | |||
52 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
53 | # the appropriate changes committed to the upstream linux-yocto repo | ||
54 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0" | ||
55 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "8f55bee2403176a50cc0dd41811aa60fcf07243c" | ||
56 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore b/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/.gitignore | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf b/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf new file mode 100644 index 0000000000..79b38e6b35 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/conf/machine/machine.conf | |||
@@ -0,0 +1,57 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.conf | ||
2 | #@TYPE: Machine | ||
3 | #@NAME: {{=machine}} | ||
4 | |||
5 | #@DESCRIPTION: Machine configuration for {{=machine}} systems | ||
6 | |||
7 | {{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }} | ||
8 | {{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }} | ||
9 | {{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }} | ||
10 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
11 | |||
12 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }} | ||
13 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }} | ||
14 | {{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }} | ||
15 | PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}" | ||
16 | PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%" | ||
17 | |||
18 | {{ input type:"choicelist" name:"tunefile" prio:"40" msg:"Which machine tuning would you like to use?" default:"tune_core2" }} | ||
19 | {{ input type:"choice" val:"tune_core2" msg:"Core2 tuning optimizations" }} | ||
20 | {{ input type:"choice" val:"tune_corei7" msg:"Corei7 tuning optimizations" }} | ||
21 | {{ if tunefile == "tune_core2": }} | ||
22 | DEFAULTTUNE ?= "core2-64" | ||
23 | require conf/machine/include/tune-core2.inc | ||
24 | {{ if tunefile == "tune_corei7": }} | ||
25 | DEFAULTTUNE ?= "corei7-64" | ||
26 | require conf/machine/include/tune-corei7.inc | ||
27 | |||
28 | require conf/machine/include/x86-base.inc | ||
29 | |||
30 | MACHINE_FEATURES += "wifi efi pcbios" | ||
31 | |||
32 | {{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }} | ||
33 | |||
34 | {{ if xserver == "y": }} | ||
35 | {{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }} | ||
36 | |||
37 | {{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }} | ||
38 | {{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }} | ||
39 | {{ input type:"choice" val:"xserver_i965" msg:"i965 xserver support" }} | ||
40 | {{ if xserver == "y": }} | ||
41 | XSERVER ?= "${XSERVER_X86_BASE} \ | ||
42 | ${XSERVER_X86_EXT} \ | ||
43 | {{ if xserver == "y" and xserver_choice == "xserver_vesa": }} | ||
44 | ${XSERVER_X86_VESA} \ | ||
45 | {{ if xserver == "y" and xserver_choice == "xserver_i915": }} | ||
46 | ${XSERVER_X86_I915} \ | ||
47 | {{ if xserver == "y" and xserver_choice == "xserver_i965": }} | ||
48 | ${XSERVER_X86_I965} \ | ||
49 | {{ if xserver == "y": }} | ||
50 | " | ||
51 | |||
52 | MACHINE_EXTRA_RRECOMMENDS += "linux-firmware v86d" | ||
53 | |||
54 | EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi" | ||
55 | |||
56 | {{ if xserver == "y" and xserver_choice == "xserver_vesa": }} | ||
57 | APPEND += "video=vesafb vga=0x318" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall new file mode 100644 index 0000000000..b442d02d57 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{=machine}} | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf new file mode 100644 index 0000000000..ac9a0f1bb0 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config/machine/xorg.conf | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{ if xserver == "y": }} this | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend new file mode 100644 index 0000000000..30830031ed --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # yocto-bsp-filename {{ if xserver == "y": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall new file mode 100644 index 0000000000..1e0d92c55c --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files.noinstall | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-dirname {{ if kernel_choice != "custom": }} files | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc new file mode 100644 index 0000000000..fd5320ba1e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-preempt-rt.scc | |||
@@ -0,0 +1,16 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-preempt-rt.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE preempt-rt | ||
4 | define KARCH x86_64 | ||
5 | |||
6 | include {{=map_preempt_rt_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
11 | |||
12 | # default policy for preempt-rt kernels | ||
13 | include cfg/usb-mass-storage.scc | ||
14 | include cfg/boot-live.scc | ||
15 | include features/latencytop/latencytop.scc | ||
16 | include features/profiling/profiling.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc new file mode 100644 index 0000000000..569f967c6a --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-standard.scc | |||
@@ -0,0 +1,16 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-standard.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE standard | ||
4 | define KARCH x86_64 | ||
5 | |||
6 | include {{=map_standard_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
11 | |||
12 | # default policy for standard kernels | ||
13 | include cfg/usb-mass-storage.scc | ||
14 | include cfg/boot-live.scc | ||
15 | include features/latencytop/latencytop.scc | ||
16 | include features/profiling/profiling.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc new file mode 100644 index 0000000000..fb21432a4f --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-tiny.scc | |||
@@ -0,0 +1,10 @@ | |||
1 | # yocto-bsp-filename {{=machine}}-tiny.scc | ||
2 | define KMACHINE {{=machine}} | ||
3 | define KTYPE tiny | ||
4 | define KARCH x86_64 | ||
5 | |||
6 | include {{=map_tiny_kbranch(need_new_kbranch, new_kbranch, existing_kbranch)}} | ||
7 | {{ if need_new_kbranch == "y": }} | ||
8 | branch {{=machine}} | ||
9 | |||
10 | include {{=machine}}.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg new file mode 100644 index 0000000000..47489e44e9 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-config.cfg | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-config.cfg | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc new file mode 100644 index 0000000000..582759e612 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-features.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-features.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc new file mode 100644 index 0000000000..97f747fa07 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine-user-patches.scc | |||
@@ -0,0 +1 @@ | |||
# yocto-bsp-filename {{=machine}}-user-patches.scc | |||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg new file mode 100644 index 0000000000..3290ddefe7 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.cfg | |||
@@ -0,0 +1,48 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.cfg | ||
2 | CONFIG_PRINTK=y | ||
3 | |||
4 | # Basic hardware support for the box - network, USB, PCI, sound | ||
5 | CONFIG_NETDEVICES=y | ||
6 | CONFIG_ATA=y | ||
7 | CONFIG_ATA_GENERIC=y | ||
8 | CONFIG_ATA_SFF=y | ||
9 | CONFIG_PCI=y | ||
10 | CONFIG_MMC=y | ||
11 | CONFIG_MMC_SDHCI=y | ||
12 | CONFIG_USB_SUPPORT=y | ||
13 | CONFIG_USB=y | ||
14 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
15 | CONFIG_R8169=y | ||
16 | CONFIG_PATA_SCH=y | ||
17 | CONFIG_MMC_SDHCI_PCI=y | ||
18 | CONFIG_USB_EHCI_HCD=y | ||
19 | CONFIG_PCIEPORTBUS=y | ||
20 | CONFIG_NET=y | ||
21 | CONFIG_USB_UHCI_HCD=y | ||
22 | CONFIG_BLK_DEV_SD=y | ||
23 | CONFIG_CHR_DEV_SG=y | ||
24 | CONFIG_SOUND=y | ||
25 | CONFIG_SND=y | ||
26 | CONFIG_SND_HDA_INTEL=y | ||
27 | |||
28 | # Make sure these are on, otherwise the bootup won't be fun | ||
29 | CONFIG_EXT3_FS=y | ||
30 | CONFIG_UNIX=y | ||
31 | CONFIG_INET=y | ||
32 | CONFIG_MODULES=y | ||
33 | CONFIG_SHMEM=y | ||
34 | CONFIG_TMPFS=y | ||
35 | CONFIG_PACKET=y | ||
36 | |||
37 | CONFIG_I2C=y | ||
38 | CONFIG_AGP=y | ||
39 | CONFIG_PM=y | ||
40 | CONFIG_ACPI=y | ||
41 | CONFIG_INPUT=y | ||
42 | |||
43 | # Needed for booting (and using) USB memory sticks | ||
44 | CONFIG_BLK_DEV_LOOP=y | ||
45 | CONFIG_NLS_CODEPAGE_437=y | ||
46 | CONFIG_NLS_ISO8859_1=y | ||
47 | |||
48 | CONFIG_RD_GZIP=y | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc new file mode 100644 index 0000000000..9b7c291a8f --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/files/machine.scc | |||
@@ -0,0 +1,14 @@ | |||
1 | # yocto-bsp-filename {{=machine}}.scc | ||
2 | kconf hardware {{=machine}}.cfg | ||
3 | |||
4 | include features/serial/8250.scc | ||
5 | {{ if xserver == "y" and xserver_choice == "xserver_vesa": }} | ||
6 | include cfg/vesafb.scc | ||
7 | {{ if xserver == "y" and xserver_choice == "xserver_i915" or xserver_choice == "xserver_i965": }} | ||
8 | include features/i915/i915.scc | ||
9 | |||
10 | include cfg/usb-mass-storage.scc | ||
11 | include features/power/intel.scc | ||
12 | |||
13 | kconf hardware {{=machine}}-user-config.cfg | ||
14 | include {{=machine}}-user-patches.scc | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall new file mode 100644 index 0000000000..a04e6c7852 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall | |||
@@ -0,0 +1,5 @@ | |||
1 | {{ if kernel_choice != "custom": }} | ||
2 | {{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (3.14) kernel? (y/n)" default:"y"}} | ||
3 | |||
4 | {{ if kernel_choice != "custom" and use_default_kernel == "n": }} | ||
5 | {{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_3.14"}} | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 0000000000..2fa6231cbf --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -0,0 +1,26 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-dev": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
8 | |||
9 | {{ if need_new_kbranch == "y": }} | ||
10 | {{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
11 | |||
12 | {{ if need_new_kbranch == "n": }} | ||
13 | {{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }} | ||
14 | |||
15 | {{ if need_new_kbranch == "n": }} | ||
16 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
17 | |||
18 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}} | ||
19 | {{ if smp == "y": }} | ||
20 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
21 | |||
22 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
23 | file://{{=machine}}-user-config.cfg \ | ||
24 | file://{{=machine}}-user-patches.scc \ | ||
25 | file://{{=machine}}-user-features.scc \ | ||
26 | " | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend new file mode 100644 index 0000000000..39bc72d9c4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-preempt-rt.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "f35992f80c81dc5fa1a97165dfd5cbb84661f7cb" | ||
32 | #SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "1b534b2f8bbe9b8a773268cfa30a4850346f6f5f" | ||
33 | #LINUX_VERSION = "3.10.9" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend new file mode 100644 index 0000000000..f04dd0cce4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.10.9" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend new file mode 100644 index 0000000000..471ccbcc3e --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-tiny.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.10.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000000..e21a333fa4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.10.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.10": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "b170394a475b96ecc92cbc9e4b002bed0a9f69c5" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "c2ed0f16fdec628242a682897d5d86df4547cf24" | ||
33 | #LINUX_VERSION = "3.10.9" \ No newline at end of file | ||
diff --git a/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend new file mode 100644 index 0000000000..ca0b497ff4 --- /dev/null +++ b/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend | |||
@@ -0,0 +1,33 @@ | |||
1 | # yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this | ||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
3 | |||
4 | PR := "${PR}.1" | ||
5 | |||
6 | COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}" | ||
7 | |||
8 | {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }} | ||
9 | |||
10 | {{ if need_new_kbranch == "y": }} | ||
11 | {{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
12 | |||
13 | {{ if need_new_kbranch == "n": }} | ||
14 | {{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }} | ||
15 | |||
16 | {{ if need_new_kbranch == "n": }} | ||
17 | KBRANCH_{{=machine}} = "{{=existing_kbranch}}" | ||
18 | |||
19 | {{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}} | ||
20 | {{ if smp == "y": }} | ||
21 | KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" | ||
22 | |||
23 | SRC_URI += "file://{{=machine}}-standard.scc \ | ||
24 | file://{{=machine}}-user-config.cfg \ | ||
25 | file://{{=machine}}-user-patches.scc \ | ||
26 | file://{{=machine}}-user-features.scc \ | ||
27 | " | ||
28 | |||
29 | # uncomment and replace these SRCREVs with the real commit ids once you've had | ||
30 | # the appropriate changes committed to the upstream linux-yocto repo | ||
31 | #SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "840bb8c059418c4753415df56c9aff1c0d5354c8" | ||
32 | #SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "4fd76cc4f33e0afd8f906b1e8f231b6d13b6c993" | ||
33 | #LINUX_VERSION = "3.14" | ||
diff --git a/scripts/lib/bsp/tags.py b/scripts/lib/bsp/tags.py new file mode 100644 index 0000000000..3719427884 --- /dev/null +++ b/scripts/lib/bsp/tags.py | |||
@@ -0,0 +1,49 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2012, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module provides a place to define common constants for the | ||
22 | # Yocto BSP Tools. | ||
23 | # | ||
24 | # AUTHORS | ||
25 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
26 | # | ||
27 | |||
28 | OPEN_TAG = "{{" | ||
29 | CLOSE_TAG = "}}" | ||
30 | ASSIGN_TAG = "{{=" | ||
31 | INPUT_TAG = "input" | ||
32 | IF_TAG = "if" | ||
33 | FILENAME_TAG = "yocto-bsp-filename" | ||
34 | DIRNAME_TAG = "yocto-bsp-dirname" | ||
35 | |||
36 | INDENT_STR = " " | ||
37 | |||
38 | BLANKLINE_STR = "of.write(\"\\n\")" | ||
39 | NORMAL_START = "of.write" | ||
40 | OPEN_START = "current_file =" | ||
41 | |||
42 | INPUT_TYPE_PROPERTY = "type" | ||
43 | |||
44 | SRC_URI_FILE = "file://" | ||
45 | |||
46 | GIT_CHECK_URI = "git://git.yoctoproject.org/linux-yocto-dev.git" | ||
47 | |||
48 | |||
49 | |||
diff --git a/scripts/lib/image/__init__.py b/scripts/lib/image/__init__.py new file mode 100644 index 0000000000..1ff814e761 --- /dev/null +++ b/scripts/lib/image/__init__.py | |||
@@ -0,0 +1,22 @@ | |||
1 | # | ||
2 | # OpenEmbedded Image tools library | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # AUTHORS | ||
21 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
22 | # | ||
diff --git a/scripts/lib/image/canned-wks/directdisk.wks b/scripts/lib/image/canned-wks/directdisk.wks new file mode 100644 index 0000000000..62dcab15ce --- /dev/null +++ b/scripts/lib/image/canned-wks/directdisk.wks | |||
@@ -0,0 +1,10 @@ | |||
1 | # short-description: Create a 'pcbios' direct disk image | ||
2 | # long-description: Creates a partitioned legacy BIOS disk image that the user | ||
3 | # can directly dd to boot media. | ||
4 | |||
5 | |||
6 | part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 | ||
7 | part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 | ||
8 | |||
9 | bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0" | ||
10 | |||
diff --git a/scripts/lib/image/canned-wks/mkefidisk.wks b/scripts/lib/image/canned-wks/mkefidisk.wks new file mode 100644 index 0000000000..58d42e61eb --- /dev/null +++ b/scripts/lib/image/canned-wks/mkefidisk.wks | |||
@@ -0,0 +1,11 @@ | |||
1 | # short-description: Create an EFI disk image | ||
2 | # long-description: Creates a partitioned EFI disk image that the user | ||
3 | # can directly dd to boot media. | ||
4 | |||
5 | part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024 | ||
6 | |||
7 | part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 | ||
8 | |||
9 | part swap --ondisk sda --size 44 --label swap1 --fstype=swap | ||
10 | |||
11 | bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0" | ||
diff --git a/scripts/lib/image/canned-wks/mkgummidisk.wks b/scripts/lib/image/canned-wks/mkgummidisk.wks new file mode 100644 index 0000000000..f81cbdfb84 --- /dev/null +++ b/scripts/lib/image/canned-wks/mkgummidisk.wks | |||
@@ -0,0 +1,11 @@ | |||
1 | # short-description: Create an EFI disk image | ||
2 | # long-description: Creates a partitioned EFI disk image that the user | ||
3 | # can directly dd to boot media. | ||
4 | |||
5 | part /boot --source bootimg-efi --sourceparams="loader=gummiboot" --ondisk sda --label msdos --active --align 1024 | ||
6 | |||
7 | part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 | ||
8 | |||
9 | part swap --ondisk sda --size 44 --label swap1 --fstype=swap | ||
10 | |||
11 | bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda-intel.enable_msi=0" | ||
diff --git a/scripts/lib/image/canned-wks/sdimage-bootpart.wks b/scripts/lib/image/canned-wks/sdimage-bootpart.wks new file mode 100644 index 0000000000..7ffd632f4a --- /dev/null +++ b/scripts/lib/image/canned-wks/sdimage-bootpart.wks | |||
@@ -0,0 +1,6 @@ | |||
1 | # short-description: Create SD card image with a boot partition | ||
2 | # long-description: Creates a partitioned SD card image. Boot files | ||
3 | # are located in the first vfat partition. | ||
4 | |||
5 | part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16 | ||
6 | part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4 | ||
diff --git a/scripts/lib/image/canned-wks/uboot.wks b/scripts/lib/image/canned-wks/uboot.wks new file mode 100644 index 0000000000..7de0572d0f --- /dev/null +++ b/scripts/lib/image/canned-wks/uboot.wks | |||
@@ -0,0 +1,17 @@ | |||
1 | # short-description: . Create a ramdisk image for U-Boot | ||
2 | # long-description: Creates a ramdisk image for U-Boot that user | ||
3 | # can directly load it into ram through tftp | ||
4 | # | ||
5 | # part - is a wic command that drive the process of generating a valid file system | ||
6 | # - --source=uboot : wic plugin that generates a ramdisk image for U-Boot | ||
7 | # - --fstype=ext2 : file system type( ext2 / ext3 / ext 4) | ||
8 | # | ||
9 | # %packages %end - option to provide a list of packages that will be installed | ||
10 | # into rootfs. All packages dependencies will be installed by | ||
11 | # package manager(default opkg). | ||
12 | |||
13 | |||
14 | part / --source=uboot --fstype=ext2 --label imageName --align 1024 | ||
15 | |||
16 | %packages | ||
17 | %end | ||
diff --git a/scripts/lib/image/config/wic.conf b/scripts/lib/image/config/wic.conf new file mode 100644 index 0000000000..2de8fa91f7 --- /dev/null +++ b/scripts/lib/image/config/wic.conf | |||
@@ -0,0 +1,10 @@ | |||
1 | [common] | ||
2 | ; general settings | ||
3 | distro_name = OpenEmbedded | ||
4 | |||
5 | [create] | ||
6 | ; settings for create subcommand | ||
7 | ; repourl=http://linux.com/ipk/all http://linux.com/ipk/target http://linux.com/ipk/arch | ||
8 | arch=powerpc | ||
9 | pkgmgr=opkg | ||
10 | install_pkgs=source | ||
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py new file mode 100644 index 0000000000..e794545e94 --- /dev/null +++ b/scripts/lib/image/engine.py | |||
@@ -0,0 +1,279 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | |||
22 | # This module implements the image creation engine used by 'wic' to | ||
23 | # create images. The engine parses through the OpenEmbedded kickstart | ||
24 | # (wks) file specified and generates images that can then be directly | ||
25 | # written onto media. | ||
26 | # | ||
27 | # AUTHORS | ||
28 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
29 | # | ||
30 | |||
31 | import os | ||
32 | import sys | ||
33 | from abc import ABCMeta, abstractmethod | ||
34 | import shlex | ||
35 | import json | ||
36 | import subprocess | ||
37 | import shutil | ||
38 | |||
39 | import os, sys, errno | ||
40 | from wic import msger, creator | ||
41 | from wic.utils import cmdln, misc, errors | ||
42 | from wic.conf import configmgr | ||
43 | from wic.plugin import pluginmgr | ||
44 | from wic.__version__ import VERSION | ||
45 | from wic.utils.oe.misc import * | ||
46 | |||
47 | |||
48 | def verify_build_env(): | ||
49 | """ | ||
50 | Verify that the build environment is sane. | ||
51 | |||
52 | Returns True if it is, false otherwise | ||
53 | """ | ||
54 | try: | ||
55 | builddir = os.environ["BUILDDIR"] | ||
56 | except KeyError: | ||
57 | print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" | ||
58 | sys.exit(1) | ||
59 | |||
60 | return True | ||
61 | |||
62 | |||
63 | def find_artifacts(image_name): | ||
64 | """ | ||
65 | Gather the build artifacts for the current image (the image_name | ||
66 | e.g. core-image-minimal) for the current MACHINE set in local.conf | ||
67 | """ | ||
68 | bitbake_env_lines = get_bitbake_env_lines() | ||
69 | |||
70 | rootfs_dir = kernel_dir = bootimg_dir = native_sysroot = "" | ||
71 | |||
72 | for line in bitbake_env_lines.split('\n'): | ||
73 | if (get_line_val(line, "IMAGE_ROOTFS")): | ||
74 | rootfs_dir = get_line_val(line, "IMAGE_ROOTFS") | ||
75 | continue | ||
76 | if (get_line_val(line, "STAGING_KERNEL_DIR")): | ||
77 | kernel_dir = get_line_val(line, "STAGING_KERNEL_DIR") | ||
78 | continue | ||
79 | if (get_line_val(line, "STAGING_DIR_NATIVE")): | ||
80 | native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE") | ||
81 | continue | ||
82 | |||
83 | return (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot) | ||
84 | |||
85 | |||
86 | CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts | ||
87 | SCRIPTS_CANNED_IMAGE_DIR = "scripts/" + CANNED_IMAGE_DIR | ||
88 | |||
89 | def build_canned_image_list(dl): | ||
90 | layers_path = get_bitbake_var("BBLAYERS") | ||
91 | canned_wks_layer_dirs = [] | ||
92 | |||
93 | if layers_path is not None: | ||
94 | for layer_path in layers_path.split(): | ||
95 | path = os.path.join(layer_path, SCRIPTS_CANNED_IMAGE_DIR) | ||
96 | canned_wks_layer_dirs.append(path) | ||
97 | |||
98 | path = os.path.join(dl, CANNED_IMAGE_DIR) | ||
99 | canned_wks_layer_dirs.append(path) | ||
100 | |||
101 | return canned_wks_layer_dirs | ||
102 | |||
103 | def find_canned_image(scripts_path, wks_file): | ||
104 | """ | ||
105 | Find a .wks file with the given name in the canned files dir. | ||
106 | |||
107 | Return False if not found | ||
108 | """ | ||
109 | layers_canned_wks_dir = build_canned_image_list(scripts_path) | ||
110 | |||
111 | for canned_wks_dir in layers_canned_wks_dir: | ||
112 | for root, dirs, files in os.walk(canned_wks_dir): | ||
113 | for file in files: | ||
114 | if file.endswith("~") or file.endswith("#"): | ||
115 | continue | ||
116 | if file.endswith(".wks") and wks_file + ".wks" == file: | ||
117 | fullpath = os.path.join(canned_wks_dir, file) | ||
118 | return fullpath | ||
119 | return None | ||
120 | |||
121 | |||
122 | def list_canned_images(scripts_path): | ||
123 | """ | ||
124 | List the .wks files in the canned image dir, minus the extension. | ||
125 | """ | ||
126 | layers_canned_wks_dir = build_canned_image_list(scripts_path) | ||
127 | |||
128 | for canned_wks_dir in layers_canned_wks_dir: | ||
129 | for root, dirs, files in os.walk(canned_wks_dir): | ||
130 | for file in files: | ||
131 | if file.endswith("~") or file.endswith("#"): | ||
132 | continue | ||
133 | if file.endswith(".wks"): | ||
134 | fullpath = os.path.join(canned_wks_dir, file) | ||
135 | f = open(fullpath, "r") | ||
136 | lines = f.readlines() | ||
137 | for line in lines: | ||
138 | desc = "" | ||
139 | idx = line.find("short-description:") | ||
140 | if idx != -1: | ||
141 | desc = line[idx + len("short-description:"):].strip() | ||
142 | break | ||
143 | basename = os.path.splitext(file)[0] | ||
144 | print " %s\t\t%s" % (basename.ljust(30), desc) | ||
145 | |||
146 | |||
147 | def list_canned_image_help(scripts_path, fullpath): | ||
148 | """ | ||
149 | List the help and params in the specified canned image. | ||
150 | """ | ||
151 | f = open(fullpath, "r") | ||
152 | lines = f.readlines() | ||
153 | found = False | ||
154 | for line in lines: | ||
155 | if not found: | ||
156 | idx = line.find("long-description:") | ||
157 | if idx != -1: | ||
158 | |||
159 | print line[idx + len("long-description:"):].strip() | ||
160 | found = True | ||
161 | continue | ||
162 | if not line.strip(): | ||
163 | break | ||
164 | idx = line.find("#") | ||
165 | if idx != -1: | ||
166 | print line[idx + len("#:"):].rstrip() | ||
167 | else: | ||
168 | break | ||
169 | |||
170 | |||
171 | def list_source_plugins(): | ||
172 | """ | ||
173 | List the available source plugins i.e. plugins available for --source. | ||
174 | """ | ||
175 | plugins = pluginmgr.get_source_plugins() | ||
176 | |||
177 | for plugin in plugins: | ||
178 | print " %s" % plugin | ||
179 | |||
180 | |||
181 | def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | ||
182 | native_sysroot, scripts_path, image_output_dir, debug, | ||
183 | properties_file, properties=None): | ||
184 | """Create image | ||
185 | |||
186 | wks_file - user-defined OE kickstart file | ||
187 | rootfs_dir - absolute path to the build's /rootfs dir | ||
188 | bootimg_dir - absolute path to the build's boot artifacts directory | ||
189 | kernel_dir - absolute path to the build's kernel directory | ||
190 | native_sysroot - absolute path to the build's native sysroots dir | ||
191 | scripts_path - absolute path to /scripts dir | ||
192 | image_output_dir - dirname to create for image | ||
193 | properties_file - use values from this file if nonempty i.e no prompting | ||
194 | properties - use values from this string if nonempty i.e no prompting | ||
195 | |||
196 | Normally, the values for the build artifacts values are determined | ||
197 | by 'wic -e' from the output of the 'bitbake -e' command given an | ||
198 | image name e.g. 'core-image-minimal' and a given machine set in | ||
199 | local.conf. If that's the case, the variables get the following | ||
200 | values from the output of 'bitbake -e': | ||
201 | |||
202 | rootfs_dir: IMAGE_ROOTFS | ||
203 | kernel_dir: STAGING_KERNEL_DIR | ||
204 | native_sysroot: STAGING_DIR_NATIVE | ||
205 | |||
206 | In the above case, bootimg_dir remains unset and the | ||
207 | plugin-specific image creation code is responsible for finding the | ||
208 | bootimg artifacts. | ||
209 | |||
210 | In the case where the values are passed in explicitly i.e 'wic -e' | ||
211 | is not used but rather the individual 'wic' options are used to | ||
212 | explicitly specify these values. | ||
213 | """ | ||
214 | try: | ||
215 | oe_builddir = os.environ["BUILDDIR"] | ||
216 | except KeyError: | ||
217 | print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" | ||
218 | sys.exit(1) | ||
219 | |||
220 | direct_args = list() | ||
221 | direct_args.insert(0, oe_builddir) | ||
222 | direct_args.insert(0, image_output_dir) | ||
223 | direct_args.insert(0, wks_file) | ||
224 | direct_args.insert(0, rootfs_dir) | ||
225 | direct_args.insert(0, bootimg_dir) | ||
226 | direct_args.insert(0, kernel_dir) | ||
227 | direct_args.insert(0, native_sysroot) | ||
228 | direct_args.insert(0, "direct") | ||
229 | |||
230 | if debug: | ||
231 | msger.set_loglevel('debug') | ||
232 | |||
233 | cr = creator.Creator() | ||
234 | |||
235 | cr.main(direct_args) | ||
236 | |||
237 | print "\nThe image(s) were created using OE kickstart file:\n %s" % wks_file | ||
238 | |||
239 | |||
240 | def wic_list(args, scripts_path, properties_file): | ||
241 | """ | ||
242 | Print the complete list of properties defined by the image, or the | ||
243 | possible values for a particular image property. | ||
244 | """ | ||
245 | if len(args) < 1: | ||
246 | return False | ||
247 | |||
248 | if len(args) == 1: | ||
249 | if args[0] == "images": | ||
250 | list_canned_images(scripts_path) | ||
251 | return True | ||
252 | elif args[0] == "source-plugins": | ||
253 | list_source_plugins() | ||
254 | return True | ||
255 | elif args[0] == "properties": | ||
256 | return True | ||
257 | else: | ||
258 | return False | ||
259 | |||
260 | if len(args) == 2: | ||
261 | if args[0] == "properties": | ||
262 | wks_file = args[1] | ||
263 | print "print properties contained in wks file: %s" % wks_file | ||
264 | return True | ||
265 | elif args[0] == "property": | ||
266 | print "print property values for property: %s" % args[1] | ||
267 | return True | ||
268 | elif args[1] == "help": | ||
269 | wks_file = args[0] | ||
270 | fullpath = find_canned_image(scripts_path, wks_file) | ||
271 | if not fullpath: | ||
272 | print "No image named %s found, exiting. (Use 'wic list images' to list available images, or specify a fully-qualified OE kickstart (.wks) filename)\n" % wks_file | ||
273 | sys.exit(1) | ||
274 | list_canned_image_help(scripts_path, fullpath) | ||
275 | return True | ||
276 | else: | ||
277 | return False | ||
278 | |||
279 | return False | ||
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py new file mode 100644 index 0000000000..6b74f57662 --- /dev/null +++ b/scripts/lib/image/help.py | |||
@@ -0,0 +1,756 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module implements some basic help invocation functions along | ||
22 | # with the bulk of the help topic text for the OE Core Image Tools. | ||
23 | # | ||
24 | # AUTHORS | ||
25 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
26 | # | ||
27 | |||
28 | import subprocess | ||
29 | import logging | ||
30 | |||
31 | |||
32 | def subcommand_error(args): | ||
33 | logging.info("invalid subcommand %s" % args[0]) | ||
34 | |||
35 | |||
36 | def display_help(subcommand, subcommands): | ||
37 | """ | ||
38 | Display help for subcommand. | ||
39 | """ | ||
40 | if subcommand not in subcommands: | ||
41 | return False | ||
42 | |||
43 | help = subcommands.get(subcommand, subcommand_error)[2] | ||
44 | pager = subprocess.Popen('less', stdin=subprocess.PIPE) | ||
45 | pager.communicate(help) | ||
46 | |||
47 | return True | ||
48 | |||
49 | |||
50 | def wic_help(args, usage_str, subcommands): | ||
51 | """ | ||
52 | Subcommand help dispatcher. | ||
53 | """ | ||
54 | if len(args) == 1 or not display_help(args[1], subcommands): | ||
55 | print(usage_str) | ||
56 | |||
57 | |||
58 | def invoke_subcommand(args, parser, main_command_usage, subcommands): | ||
59 | """ | ||
60 | Dispatch to subcommand handler borrowed from combo-layer. | ||
61 | Should use argparse, but has to work in 2.6. | ||
62 | """ | ||
63 | if not args: | ||
64 | logging.error("No subcommand specified, exiting") | ||
65 | parser.print_help() | ||
66 | elif args[0] == "help": | ||
67 | wic_help(args, main_command_usage, subcommands) | ||
68 | elif args[0] not in subcommands: | ||
69 | logging.error("Unsupported subcommand %s, exiting\n" % (args[0])) | ||
70 | parser.print_help() | ||
71 | else: | ||
72 | usage = subcommands.get(args[0], subcommand_error)[1] | ||
73 | subcommands.get(args[0], subcommand_error)[0](args[1:], usage) | ||
74 | |||
75 | |||
76 | ## | ||
77 | # wic help and usage strings | ||
78 | ## | ||
79 | |||
80 | wic_usage = """ | ||
81 | |||
82 | Create a customized OpenEmbedded image | ||
83 | |||
84 | usage: wic [--version] [--help] COMMAND [ARGS] | ||
85 | |||
86 | Current 'wic' commands are: | ||
87 | create Create a new OpenEmbedded image | ||
88 | list List available values for options and image properties | ||
89 | |||
90 | Help topics: | ||
91 | overview wic overview - General overview of wic | ||
92 | plugins wic plugins - Overview and API | ||
93 | kickstart wic kickstart - wic kickstart reference | ||
94 | |||
95 | See 'wic help <COMMAND or HELP TOPIC>' for more information on a specific | ||
96 | command or help topic. | ||
97 | """ | ||
98 | |||
99 | wic_help_usage = """ | ||
100 | |||
101 | usage: wic help <subcommand> | ||
102 | |||
103 | This command displays detailed help for the specified subcommand. | ||
104 | """ | ||
105 | |||
106 | wic_create_usage = """ | ||
107 | |||
108 | Create a new OpenEmbedded image | ||
109 | |||
110 | usage: wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>] | ||
111 | [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>] | ||
112 | [-e | --image-name] [-s, --skip-build-check] [-D, --debug] | ||
113 | [-r, --rootfs-dir] [-b, --bootimg-dir] | ||
114 | [-k, --kernel-dir] [-n, --native-sysroot] | ||
115 | |||
116 | This command creates an OpenEmbedded image based on the 'OE kickstart | ||
117 | commands' found in the <wks file>. | ||
118 | |||
119 | The -o option can be used to place the image in a directory with a | ||
120 | different name and location. | ||
121 | |||
122 | See 'wic help create' for more detailed instructions. | ||
123 | """ | ||
124 | |||
125 | wic_create_help = """ | ||
126 | |||
127 | NAME | ||
128 | wic create - Create a new OpenEmbedded image | ||
129 | |||
130 | SYNOPSIS | ||
131 | wic create <wks file or image name> [-o <DIRNAME> | --outdir <DIRNAME>] | ||
132 | [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>] | ||
133 | [-e | --image-name] [-s, --skip-build-check] [-D, --debug] | ||
134 | [-r, --rootfs-dir] [-b, --bootimg-dir] | ||
135 | [-k, --kernel-dir] [-n, --native-sysroot] | ||
136 | |||
137 | DESCRIPTION | ||
138 | This command creates an OpenEmbedded image based on the 'OE | ||
139 | kickstart commands' found in the <wks file>. | ||
140 | |||
141 | In order to do this, wic needs to know the locations of the | ||
142 | various build artifacts required to build the image. | ||
143 | |||
144 | Users can explicitly specify the build artifact locations using | ||
145 | the -r, -b, -k, and -n options. See below for details on where | ||
146 | the corresponding artifacts are typically found in a normal | ||
147 | OpenEmbedded build. | ||
148 | |||
149 | Alternatively, users can use the -e option to have 'wic' determine | ||
150 | those locations for a given image. If the -e option is used, the | ||
151 | user needs to have set the appropriate MACHINE variable in | ||
152 | local.conf, and have sourced the build environment. | ||
153 | |||
154 | The -e option is used to specify the name of the image to use the | ||
155 | artifacts from e.g. core-image-sato. | ||
156 | |||
157 | The -r option is used to specify the path to the /rootfs dir to | ||
158 | use as the .wks rootfs source. | ||
159 | |||
160 | The -b option is used to specify the path to the dir containing | ||
161 | the boot artifacts (e.g. /EFI or /syslinux dirs) to use as the | ||
162 | .wks bootimg source. | ||
163 | |||
164 | The -k option is used to specify the path to the dir containing | ||
165 | the kernel to use in the .wks bootimg. | ||
166 | |||
167 | The -n option is used to specify the path to the native sysroot | ||
168 | containing the tools to use to build the image. | ||
169 | |||
170 | The -s option is used to skip the build check. The build check is | ||
171 | a simple sanity check used to determine whether the user has | ||
172 | sourced the build environment so that the -e option can operate | ||
173 | correctly. If the user has specified the build artifact locations | ||
174 | explicitly, 'wic' assumes the user knows what he or she is doing | ||
175 | and skips the build check. | ||
176 | |||
177 | The -D option is used to display debug information detailing | ||
178 | exactly what happens behind the scenes when a create request is | ||
179 | fulfilled (or not, as the case may be). It enumerates and | ||
180 | displays the command sequence used, and should be included in any | ||
181 | bug report describing unexpected results. | ||
182 | |||
183 | When 'wic -e' is used, the locations for the build artifacts | ||
184 | values are determined by 'wic -e' from the output of the 'bitbake | ||
185 | -e' command given an image name e.g. 'core-image-minimal' and a | ||
186 | given machine set in local.conf. In that case, the image is | ||
187 | created as if the following 'bitbake -e' variables were used: | ||
188 | |||
189 | -r: IMAGE_ROOTFS | ||
190 | -k: STAGING_KERNEL_DIR | ||
191 | -n: STAGING_DIR_NATIVE | ||
192 | -b: empty (plugin-specific handlers must determine this) | ||
193 | |||
194 | If 'wic -e' is not used, the user needs to select the appropriate | ||
195 | value for -b (as well as -r, -k, and -n). | ||
196 | |||
197 | The -o option can be used to place the image in a directory with a | ||
198 | different name and location. | ||
199 | |||
200 | As an alternative to the wks file, the image-specific properties | ||
201 | that define the values that will be used to generate a particular | ||
202 | image can be specified on the command-line using the -i option and | ||
203 | supplying a JSON object consisting of the set of name:value pairs | ||
204 | needed by image creation. | ||
205 | |||
206 | The set of properties available for a given image type can be | ||
207 | listed using the 'wic list' command. | ||
208 | """ | ||
209 | |||
210 | wic_list_usage = """ | ||
211 | |||
212 | List available OpenEmbedded image properties and values | ||
213 | |||
214 | usage: wic list images | ||
215 | wic list <image> help | ||
216 | wic list source-plugins | ||
217 | wic list properties | ||
218 | wic list properties <wks file> | ||
219 | wic list property <property> | ||
220 | [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>] | ||
221 | |||
222 | This command enumerates the set of available canned images as well as | ||
223 | help for those images. It also can be used to enumerate the complete | ||
224 | set of possible values for a specified option or property needed by | ||
225 | the image creation process. | ||
226 | |||
227 | The first form enumerates all the available 'canned' images. | ||
228 | |||
229 | The second form lists the detailed help information for a specific | ||
230 | 'canned' image. | ||
231 | |||
232 | The third form enumerates all the available --sources (source | ||
233 | plugins). | ||
234 | |||
235 | The fourth form enumerates all the possible values that exist and can | ||
236 | be specified in an OE kickstart (wks) file. | ||
237 | |||
238 | The fifth form enumerates all the possible options that exist for the | ||
239 | set of properties specified in a given OE kickstart (ks) file. | ||
240 | |||
241 | The final form enumerates all the possible values that exist and can | ||
242 | be specified for any given OE kickstart (wks) property. | ||
243 | |||
244 | See 'wic help list' for more details. | ||
245 | """ | ||
246 | |||
247 | wic_list_help = """ | ||
248 | |||
249 | NAME | ||
250 | wic list - List available OpenEmbedded image properties and values | ||
251 | |||
252 | SYNOPSIS | ||
253 | wic list images | ||
254 | wic list <image> help | ||
255 | wic list source-plugins | ||
256 | wic list properties | ||
257 | wic list properties <wks file> | ||
258 | wic list property <property> | ||
259 | [-o <JSON PROPERTY FILE> | --outfile <JSON PROPERTY_FILE>] | ||
260 | |||
261 | DESCRIPTION | ||
262 | This command enumerates the complete set of possible values for a | ||
263 | specified option or property needed by the image creation process. | ||
264 | |||
265 | This command enumerates the set of available canned images as well | ||
266 | as help for those images. It also can be used to enumerate the | ||
267 | complete set of possible values for a specified option or property | ||
268 | needed by the image creation process. | ||
269 | |||
270 | The first form enumerates all the available 'canned' images. | ||
271 | These are actually just the set of .wks files that have been moved | ||
272 | into the /scripts/lib/image/canned-wks directory). | ||
273 | |||
274 | The second form lists the detailed help information for a specific | ||
275 | 'canned' image. | ||
276 | |||
277 | The third form enumerates all the available --sources (source | ||
278 | plugins). The contents of a given partition are driven by code | ||
279 | defined in 'source plugins'. Users specify a specific plugin via | ||
280 | the --source parameter of the partition .wks command. Normally | ||
281 | this is the 'rootfs' plugin but can be any of the more specialized | ||
282 | sources listed by the 'list source-plugins' command. Users can | ||
283 | also add their own source plugins - see 'wic help plugins' for | ||
284 | details. | ||
285 | |||
286 | The third form enumerates all the possible values that exist and | ||
287 | can be specified in a OE kickstart (wks) file. The output of this | ||
288 | can be used by the third form to print the description and | ||
289 | possible values of a specific property. | ||
290 | |||
291 | The fourth form enumerates all the possible options that exist for | ||
292 | the set of properties specified in a given OE kickstart (wks) | ||
293 | file. If the -o option is specified, the list of properties, in | ||
294 | addition to being displayed, will be written to the specified file | ||
295 | as a JSON object. In this case, the object will consist of the | ||
296 | set of name:value pairs corresponding to the (possibly nested) | ||
297 | dictionary of properties defined by the input statements used by | ||
298 | the image. Some example output for the 'list <wks file>' command: | ||
299 | |||
300 | $ wic list test.ks | ||
301 | "part" : { | ||
302 | "mountpoint" : "/" | ||
303 | "fstype" : "ext3" | ||
304 | } | ||
305 | "part" : { | ||
306 | "mountpoint" : "/home" | ||
307 | "fstype" : "ext3" | ||
308 | "offset" : "10000" | ||
309 | } | ||
310 | "bootloader" : { | ||
311 | "type" : "efi" | ||
312 | } | ||
313 | . | ||
314 | . | ||
315 | . | ||
316 | |||
317 | Each entry in the output consists of the name of the input element | ||
318 | e.g. "part", followed by the properties defined for that | ||
319 | element enclosed in braces. This information should provide | ||
320 | sufficient information to create a complete user interface with. | ||
321 | |||
322 | The final form enumerates all the possible values that exist and | ||
323 | can be specified for any given OE kickstart (wks) property. If | ||
324 | the -o option is specified, the list of values for the given | ||
325 | property, in addition to being displayed, will be written to the | ||
326 | specified file as a JSON object. In this case, the object will | ||
327 | consist of the set of name:value pairs corresponding to the array | ||
328 | of property values associated with the property. | ||
329 | |||
330 | $ wic list property part | ||
331 | ["mountpoint", "where the partition should be mounted"] | ||
332 | ["fstype", "filesytem type of the partition"] | ||
333 | ["ext3"] | ||
334 | ["ext4"] | ||
335 | ["btrfs"] | ||
336 | ["swap"] | ||
337 | ["offset", "offset of the partition within the image"] | ||
338 | |||
339 | """ | ||
340 | |||
341 | wic_plugins_help = """ | ||
342 | |||
343 | NAME | ||
344 | wic plugins - Overview and API | ||
345 | |||
346 | DESCRIPTION | ||
347 | plugins allow wic functionality to be extended and specialized by | ||
348 | users. This section documents the plugin interface, which is | ||
349 | currently restricted to 'source' plugins. | ||
350 | |||
351 | 'Source' plugins provide a mechanism to customize various aspects | ||
352 | of the image generation process in wic, mainly the contents of | ||
353 | partitions. | ||
354 | |||
355 | Source plugins provide a mechanism for mapping values specified in | ||
356 | .wks files using the --source keyword to a particular plugin | ||
357 | implementation that populates a corresponding partition. | ||
358 | |||
359 | A source plugin is created as a subclass of SourcePlugin (see | ||
360 | scripts/lib/wic/pluginbase.py) and the plugin file containing it | ||
361 | is added to scripts/lib/wic/plugins/source/ to make the plugin | ||
362 | implementation available to the wic implementation. | ||
363 | |||
364 | Source plugins can also be implemented and added by external | ||
365 | layers - any plugins found in a scripts/lib/wic/plugins/source/ | ||
366 | directory in an external layer will also be made available. | ||
367 | |||
368 | When the wic implementation needs to invoke a partition-specific | ||
369 | implementation, it looks for the plugin that has the same name as | ||
370 | the --source param given to that partition. For example, if the | ||
371 | partition is set up like this: | ||
372 | |||
373 | part /boot --source bootimg-pcbios ... | ||
374 | |||
375 | then the methods defined as class members of the plugin having the | ||
376 | matching bootimg-pcbios .name class member would be used. | ||
377 | |||
378 | To be more concrete, here's the plugin definition that would match | ||
379 | a '--source bootimg-pcbios' usage, along with an example method | ||
380 | that would be called by the wic implementation when it needed to | ||
381 | invoke an implementation-specific partition-preparation function: | ||
382 | |||
383 | class BootimgPcbiosPlugin(SourcePlugin): | ||
384 | name = 'bootimg-pcbios' | ||
385 | |||
386 | @classmethod | ||
387 | def do_prepare_partition(self, part, ...) | ||
388 | |||
389 | If the subclass itself doesn't implement a function, a 'default' | ||
390 | version in a superclass will be located and used, which is why all | ||
391 | plugins must be derived from SourcePlugin. | ||
392 | |||
393 | The SourcePlugin class defines the following methods, which is the | ||
394 | current set of methods that can be implemented/overridden by | ||
395 | --source plugins. Any methods not implemented by a SourcePlugin | ||
396 | subclass inherit the implementations present in the SourcePlugin | ||
397 | class (see the SourcePlugin source for details): | ||
398 | |||
399 | do_prepare_partition() | ||
400 | Called to do the actual content population for a | ||
401 | partition. In other words, it 'prepares' the final partition | ||
402 | image which will be incorporated into the disk image. | ||
403 | |||
404 | do_configure_partition() | ||
405 | Called before do_prepare_partition(), typically used to | ||
406 | create custom configuration files for a partition, for | ||
407 | example syslinux or grub config files. | ||
408 | |||
409 | do_install_disk() | ||
410 | Called after all partitions have been prepared and assembled | ||
411 | into a disk image. This provides a hook to allow | ||
412 | finalization of a disk image, for example to write an MBR to | ||
413 | it. | ||
414 | |||
415 | do_stage_partition() | ||
416 | Special content-staging hook called before | ||
417 | do_prepare_partition(), normally empty. | ||
418 | |||
419 | Typically, a partition will just use the passed-in | ||
420 | parameters, for example the unmodified value of bootimg_dir. | ||
421 | In some cases however, things may need to be more tailored. | ||
422 | As an example, certain files may additionally need to be | ||
423 | take from bootimg_dir + /boot. This hook allows those files | ||
424 | to be staged in a customized fashion. Note that | ||
425 | get_bitbake_var() allows you to access non-standard | ||
426 | variables that you might want to use for these types of | ||
427 | situations. | ||
428 | |||
429 | This scheme is extensible - adding more hooks is a simple matter | ||
430 | of adding more plugin methods to SourcePlugin and derived classes. | ||
431 | The code that then needs to call the plugin methods uses | ||
432 | plugin.get_source_plugin_methods() to find the method(s) needed by | ||
433 | the call; this is done by filling up a dict with keys containing | ||
434 | the method names of interest - on success, these will be filled in | ||
435 | with the actual methods. Please see the implementation for | ||
436 | examples and details. | ||
437 | """ | ||
438 | |||
439 | wic_overview_help = """ | ||
440 | |||
441 | NAME | ||
442 | wic overview - General overview of wic | ||
443 | |||
444 | DESCRIPTION | ||
445 | The 'wic' command generates partitioned images from existing | ||
446 | OpenEmbedded build artifacts. Image generation is driven by | ||
447 | partitioning commands contained in an 'Openembedded kickstart' | ||
448 | (.wks) file (see 'wic help kickstart') specified either directly | ||
449 | on the command-line or as one of a selection of canned .wks files | ||
450 | (see 'wic list images'). When applied to a given set of build | ||
451 | artifacts, the result is an image or set of images that can be | ||
452 | directly written onto media and used on a particular system. | ||
453 | |||
454 | The 'wic' command and the infrastructure it's based on is by | ||
455 | definition incomplete - its purpose is to allow the generation of | ||
456 | customized images, and as such was designed to be completely | ||
457 | extensible via a plugin interface (see 'wic help plugins'). | ||
458 | |||
459 | Background and Motivation | ||
460 | |||
461 | wic is meant to be a completely independent standalone utility | ||
462 | that initially provides easier-to-use and more flexible | ||
463 | replacements for a couple bits of existing functionality in | ||
464 | oe-core: directdisk.bbclass and mkefidisk.sh. The difference | ||
465 | between wic and those examples is that with wic the functionality | ||
466 | of those scripts is implemented by a general-purpose partitioning | ||
467 | 'language' based on Redhat kickstart syntax). | ||
468 | |||
469 | The initial motivation and design considerations that lead to the | ||
470 | current tool are described exhaustively in Yocto Bug #3847 | ||
471 | (https://bugzilla.yoctoproject.org/show_bug.cgi?id=3847). | ||
472 | |||
473 | Implementation and Examples | ||
474 | |||
475 | wic can be used in two different modes, depending on how much | ||
476 | control the user needs in specifying the Openembedded build | ||
477 | artifacts that will be used in creating the image: 'raw' and | ||
478 | 'cooked'. | ||
479 | |||
480 | If used in 'raw' mode, artifacts are explicitly specified via | ||
481 | command-line arguments (see example below). | ||
482 | |||
483 | The more easily usable 'cooked' mode uses the current MACHINE | ||
484 | setting and a specified image name to automatically locate the | ||
485 | artifacts used to create the image. | ||
486 | |||
487 | OE kickstart files (.wks) can of course be specified directly on | ||
488 | the command-line, but the user can also choose from a set of | ||
489 | 'canned' .wks files available via the 'wic list images' command | ||
490 | (example below). | ||
491 | |||
492 | In any case, the prerequisite for generating any image is to have | ||
493 | the build artifacts already available. The below examples assume | ||
494 | the user has already build a 'core-image-minimal' for a specific | ||
495 | machine (future versions won't require this redundant step, but | ||
496 | for now that's typically how build artifacts get generated). | ||
497 | |||
498 | The other prerequisite is to source the build environment: | ||
499 | |||
500 | $ source oe-init-build-env | ||
501 | |||
502 | To start out with, we'll generate an image from one of the canned | ||
503 | .wks files. The following generates a list of availailable | ||
504 | images: | ||
505 | |||
506 | $ wic list images | ||
507 | mkefidisk Create an EFI disk image | ||
508 | directdisk Create a 'pcbios' direct disk image | ||
509 | |||
510 | You can get more information about any of the available images by | ||
511 | typing 'wic list xxx help', where 'xxx' is one of the image names: | ||
512 | |||
513 | $ wic list mkefidisk help | ||
514 | |||
515 | Creates a partitioned EFI disk image that the user can directly dd | ||
516 | to boot media. | ||
517 | |||
518 | At any time, you can get help on the 'wic' command or any | ||
519 | subcommand (currently 'list' and 'create'). For instance, to get | ||
520 | the description of 'wic create' command and its parameters: | ||
521 | |||
522 | $ wic create | ||
523 | |||
524 | Usage: | ||
525 | |||
526 | Create a new OpenEmbedded image | ||
527 | |||
528 | usage: wic create <wks file or image name> [-o <DIRNAME> | ...] | ||
529 | [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>] | ||
530 | [-e | --image-name] [-s, --skip-build-check] [-D, --debug] | ||
531 | [-r, --rootfs-dir] [-b, --bootimg-dir] | ||
532 | [-k, --kernel-dir] [-n, --native-sysroot] | ||
533 | |||
534 | This command creates an OpenEmbedded image based on the 'OE | ||
535 | kickstart commands' found in the <wks file>. | ||
536 | |||
537 | The -o option can be used to place the image in a directory | ||
538 | with a different name and location. | ||
539 | |||
540 | See 'wic help create' for more detailed instructions. | ||
541 | ... | ||
542 | |||
543 | As mentioned in the command, you can get even more detailed | ||
544 | information by adding 'help' to the above: | ||
545 | |||
546 | $ wic help create | ||
547 | |||
548 | So, the easiest way to create an image is to use the -e option | ||
549 | with a canned .wks file. To use the -e option, you need to | ||
550 | specify the image used to generate the artifacts and you actually | ||
551 | need to have the MACHINE used to build them specified in your | ||
552 | local.conf (these requirements aren't necessary if you aren't | ||
553 | using the -e options.) Below, we generate a directdisk image, | ||
554 | pointing the process at the core-image-minimal artifacts for the | ||
555 | current MACHINE: | ||
556 | |||
557 | $ wic create directdisk -e core-image-minimal | ||
558 | |||
559 | Checking basic build environment... | ||
560 | Done. | ||
561 | |||
562 | Creating image(s)... | ||
563 | |||
564 | Info: The new image(s) can be found here: | ||
565 | /var/tmp/wic/build/directdisk-201309252350-sda.direct | ||
566 | |||
567 | The following build artifacts were used to create the image(s): | ||
568 | |||
569 | ROOTFS_DIR: ... | ||
570 | BOOTIMG_DIR: ... | ||
571 | KERNEL_DIR: ... | ||
572 | NATIVE_SYSROOT: ... | ||
573 | |||
574 | The image(s) were created using OE kickstart file: | ||
575 | .../scripts/lib/image/canned-wks/directdisk.wks | ||
576 | |||
577 | The output shows the name and location of the image created, and | ||
578 | so that you know exactly what was used to generate the image, each | ||
579 | of the artifacts and the kickstart file used. | ||
580 | |||
581 | Similarly, you can create a 'mkefidisk' image in the same way | ||
582 | (notice that this example uses a different machine - because it's | ||
583 | using the -e option, you need to change the MACHINE in your | ||
584 | local.conf): | ||
585 | |||
586 | $ wic create mkefidisk -e core-image-minimal | ||
587 | Checking basic build environment... | ||
588 | Done. | ||
589 | |||
590 | Creating image(s)... | ||
591 | |||
592 | Info: The new image(s) can be found here: | ||
593 | /var/tmp/wic/build/mkefidisk-201309260027-sda.direct | ||
594 | |||
595 | ... | ||
596 | |||
597 | Here's an example that doesn't take the easy way out and manually | ||
598 | specifies each build artifact, along with a non-canned .wks file, | ||
599 | and also uses the -o option to have wic create the output | ||
600 | somewhere other than the default /var/tmp/wic: | ||
601 | |||
602 | $ wic create ~/test.wks -o /home/trz/testwic --rootfs-dir | ||
603 | /home/trz/yocto/build/tmp/work/crownbay/core-image-minimal/1.0-r0/rootfs | ||
604 | --bootimg-dir /home/trz/yocto/build/tmp/sysroots/crownbay/usr/share | ||
605 | --kernel-dir /home/trz/yocto/build/tmp/sysroots/crownbay/usr/src/kernel | ||
606 | --native-sysroot /home/trz/yocto/build/tmp/sysroots/x86_64-linux | ||
607 | |||
608 | Creating image(s)... | ||
609 | |||
610 | Info: The new image(s) can be found here: | ||
611 | /home/trz/testwic/build/test-201309260032-sda.direct | ||
612 | |||
613 | ... | ||
614 | |||
615 | Finally, here's an example of the actual partition language | ||
616 | commands used to generate the mkefidisk image i.e. these are the | ||
617 | contents of the mkefidisk.wks OE kickstart file: | ||
618 | |||
619 | # short-description: Create an EFI disk image | ||
620 | # long-description: Creates a partitioned EFI disk image that the user | ||
621 | # can directly dd to boot media. | ||
622 | |||
623 | part /boot --source bootimg-efi --ondisk sda --fstype=efi --active | ||
624 | |||
625 | part / --source rootfs --ondisk sda --fstype=ext3 --label platform | ||
626 | |||
627 | part swap --ondisk sda --size 44 --label swap1 --fstype=swap | ||
628 | |||
629 | bootloader --timeout=10 --append="rootwait console=ttyPCH0,115200" | ||
630 | |||
631 | You can get a complete listing and description of all the | ||
632 | kickstart commands available for use in .wks files from 'wic help | ||
633 | kickstart'. | ||
634 | """ | ||
635 | |||
636 | wic_kickstart_help = """ | ||
637 | |||
638 | NAME | ||
639 | wic kickstart - wic kickstart reference | ||
640 | |||
641 | DESCRIPTION | ||
642 | This section provides the definitive reference to the wic | ||
643 | kickstart language. It also provides documentation on the list of | ||
644 | --source plugins available for use from the 'part' command (see | ||
645 | the 'Platform-specific Plugins' section below). | ||
646 | |||
647 | The current wic implementation supports only the basic kickstart | ||
648 | partitioning commands: partition (or part for short) and | ||
649 | bootloader. | ||
650 | |||
651 | The following is a listing of the commands, their syntax, and | ||
652 | meanings. The commands are based on the Fedora kickstart | ||
653 | documentation but with modifications to reflect wic capabilities. | ||
654 | |||
655 | http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition | ||
656 | http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader | ||
657 | |||
658 | Commands | ||
659 | |||
660 | * 'part' or 'partition' | ||
661 | |||
662 | This command creates a partition on the system and uses the | ||
663 | following syntax: | ||
664 | |||
665 | part <mountpoint> | ||
666 | |||
667 | The <mountpoint> is where the partition will be mounted and | ||
668 | must take of one of the following forms: | ||
669 | |||
670 | /<path>: For example: /, /usr, or /home | ||
671 | |||
672 | swap: The partition will be used as swap space. | ||
673 | |||
674 | The following are supported 'part' options: | ||
675 | |||
676 | --size: The minimum partition size in MBytes. Specify an | ||
677 | integer value such as 500. Do not append the number | ||
678 | with "MB". You do not need this option if you use | ||
679 | --source. | ||
680 | |||
681 | --source: This option is a wic-specific option that names the | ||
682 | source of the data that will populate the | ||
683 | partition. The most common value for this option | ||
684 | is 'rootfs', but can be any value which maps to a | ||
685 | valid 'source plugin' (see 'wic help plugins'). | ||
686 | |||
687 | If '--source rootfs' is used, it tells the wic | ||
688 | command to create a partition as large as needed | ||
689 | and to fill it with the contents of the root | ||
690 | filesystem pointed to by the '-r' wic command-line | ||
691 | option (or the equivalent rootfs derived from the | ||
692 | '-e' command-line option). The filesystem type | ||
693 | that will be used to create the partition is driven | ||
694 | by the value of the --fstype option specified for | ||
695 | the partition (see --fstype below). | ||
696 | |||
697 | If --source <plugin-name>' is used, it tells the | ||
698 | wic command to create a partition as large as | ||
699 | needed and to fill with the contents of the | ||
700 | partition that will be generated by the specified | ||
701 | plugin name using the data pointed to by the '-r' | ||
702 | wic command-line option (or the equivalent rootfs | ||
703 | derived from the '-e' command-line option). | ||
704 | Exactly what those contents and filesystem type end | ||
705 | up being are dependent on the given plugin | ||
706 | implementation. | ||
707 | |||
708 | --ondisk or --ondrive: Forces the partition to be created on | ||
709 | a particular disk. | ||
710 | |||
711 | --fstype: Sets the file system type for the partition. These | ||
712 | apply to partitions created using '--source rootfs' (see | ||
713 | --source above). Valid values are: | ||
714 | |||
715 | ext2 | ||
716 | ext3 | ||
717 | ext4 | ||
718 | btrfs | ||
719 | squashfs | ||
720 | swap | ||
721 | |||
722 | --fsoptions: Specifies a free-form string of options to be | ||
723 | used when mounting the filesystem. This string | ||
724 | will be copied into the /etc/fstab file of the | ||
725 | installed system and should be enclosed in | ||
726 | quotes. If not specified, the default string is | ||
727 | "defaults". | ||
728 | |||
729 | --label label: Specifies the label to give to the filesystem | ||
730 | to be made on the partition. If the given | ||
731 | label is already in use by another filesystem, | ||
732 | a new label is created for the partition. | ||
733 | |||
734 | --active: Marks the partition as active. | ||
735 | |||
736 | --align (in KBytes): This option is specific to wic and says | ||
737 | to start a partition on an x KBytes | ||
738 | boundary. | ||
739 | |||
740 | * bootloader | ||
741 | |||
742 | This command allows the user to specify various bootloader | ||
743 | options. The following are supported 'bootloader' options: | ||
744 | |||
745 | --timeout: Specifies the number of seconds before the | ||
746 | bootloader times out and boots the default option. | ||
747 | |||
748 | --append: Specifies kernel parameters. These will be added to | ||
749 | bootloader command-line - for example, the syslinux | ||
750 | APPEND or grub kernel command line. | ||
751 | |||
752 | Note that bootloader functionality and boot partitions are | ||
753 | implemented by the various --source plugins that implement | ||
754 | bootloader functionality; the bootloader command essentially | ||
755 | provides a means of modifying bootloader configuration. | ||
756 | """ | ||
diff --git a/scripts/lib/scriptpath.py b/scripts/lib/scriptpath.py new file mode 100644 index 0000000000..d00317e18d --- /dev/null +++ b/scripts/lib/scriptpath.py | |||
@@ -0,0 +1,42 @@ | |||
1 | # Path utility functions for OE python scripts | ||
2 | # | ||
3 | # Copyright (C) 2012-2014 Intel Corporation | ||
4 | # Copyright (C) 2011 Mentor Graphics Corporation | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License version 2 as | ||
8 | # published by the Free Software Foundation. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along | ||
16 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | |||
19 | import sys | ||
20 | import os | ||
21 | import os.path | ||
22 | |||
23 | def add_oe_lib_path(): | ||
24 | basepath = os.path.abspath(os.path.dirname(__file__) + '/../..') | ||
25 | newpath = basepath + '/meta/lib' | ||
26 | sys.path.insert(0, newpath) | ||
27 | |||
28 | def add_bitbake_lib_path(): | ||
29 | basepath = os.path.abspath(os.path.dirname(__file__) + '/../..') | ||
30 | bitbakepath = None | ||
31 | if os.path.exists(basepath + '/bitbake/lib/bb'): | ||
32 | bitbakepath = basepath + '/bitbake' | ||
33 | else: | ||
34 | # look for bitbake/bin dir in PATH | ||
35 | for pth in os.environ['PATH'].split(':'): | ||
36 | if os.path.exists(os.path.join(pth, '../lib/bb')): | ||
37 | bitbakepath = os.path.abspath(os.path.join(pth, '..')) | ||
38 | break | ||
39 | |||
40 | if bitbakepath: | ||
41 | sys.path.insert(0, bitbakepath + '/lib') | ||
42 | return bitbakepath | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/__init__.py b/scripts/lib/wic/3rdparty/pykickstart/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/__init__.py | |||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/base.py b/scripts/lib/wic/3rdparty/pykickstart/base.py new file mode 100644 index 0000000000..e6c8f56f9d --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/base.py | |||
@@ -0,0 +1,466 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2006, 2007, 2008 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | """ | ||
21 | Base classes for creating commands and syntax version object. | ||
22 | |||
23 | This module exports several important base classes: | ||
24 | |||
25 | BaseData - The base abstract class for all data objects. Data objects | ||
26 | are contained within a BaseHandler object. | ||
27 | |||
28 | BaseHandler - The base abstract class from which versioned kickstart | ||
29 | handler are derived. Subclasses of BaseHandler hold | ||
30 | BaseData and KickstartCommand objects. | ||
31 | |||
32 | DeprecatedCommand - An abstract subclass of KickstartCommand that should | ||
33 | be further subclassed by users of this module. When | ||
34 | a subclass is used, a warning message will be | ||
35 | printed. | ||
36 | |||
37 | KickstartCommand - The base abstract class for all kickstart commands. | ||
38 | Command objects are contained within a BaseHandler | ||
39 | object. | ||
40 | """ | ||
41 | import gettext | ||
42 | gettext.textdomain("pykickstart") | ||
43 | _ = lambda x: gettext.ldgettext("pykickstart", x) | ||
44 | |||
45 | import types | ||
46 | import warnings | ||
47 | from pykickstart.errors import * | ||
48 | from pykickstart.ko import * | ||
49 | from pykickstart.parser import Packages | ||
50 | from pykickstart.version import versionToString | ||
51 | |||
52 | ### | ||
53 | ### COMMANDS | ||
54 | ### | ||
55 | class KickstartCommand(KickstartObject): | ||
56 | """The base class for all kickstart commands. This is an abstract class.""" | ||
57 | removedKeywords = [] | ||
58 | removedAttrs = [] | ||
59 | |||
60 | def __init__(self, writePriority=0, *args, **kwargs): | ||
61 | """Create a new KickstartCommand instance. This method must be | ||
62 | provided by all subclasses, but subclasses must call | ||
63 | KickstartCommand.__init__ first. Instance attributes: | ||
64 | |||
65 | currentCmd -- The name of the command in the input file that | ||
66 | caused this handler to be run. | ||
67 | currentLine -- The current unprocessed line from the input file | ||
68 | that caused this handler to be run. | ||
69 | handler -- A reference to the BaseHandler subclass this | ||
70 | command is contained withing. This is needed to | ||
71 | allow referencing of Data objects. | ||
72 | lineno -- The current line number in the input file. | ||
73 | writePriority -- An integer specifying when this command should be | ||
74 | printed when iterating over all commands' __str__ | ||
75 | methods. The higher the number, the later this | ||
76 | command will be written. All commands with the | ||
77 | same priority will be written alphabetically. | ||
78 | """ | ||
79 | |||
80 | # We don't want people using this class by itself. | ||
81 | if self.__class__ is KickstartCommand: | ||
82 | raise TypeError, "KickstartCommand is an abstract class." | ||
83 | |||
84 | KickstartObject.__init__(self, *args, **kwargs) | ||
85 | |||
86 | self.writePriority = writePriority | ||
87 | |||
88 | # These will be set by the dispatcher. | ||
89 | self.currentCmd = "" | ||
90 | self.currentLine = "" | ||
91 | self.handler = None | ||
92 | self.lineno = 0 | ||
93 | |||
94 | # If a subclass provides a removedKeywords list, remove all the | ||
95 | # members from the kwargs list before we start processing it. This | ||
96 | # ensures that subclasses don't continue to recognize arguments that | ||
97 | # were removed. | ||
98 | for arg in filter(kwargs.has_key, self.removedKeywords): | ||
99 | kwargs.pop(arg) | ||
100 | |||
101 | def __call__(self, *args, **kwargs): | ||
102 | """Set multiple attributes on a subclass of KickstartCommand at once | ||
103 | via keyword arguments. Valid attributes are anything specified in | ||
104 | a subclass, but unknown attributes will be ignored. | ||
105 | """ | ||
106 | for (key, val) in kwargs.items(): | ||
107 | # Ignore setting attributes that were removed in a subclass, as | ||
108 | # if they were unknown attributes. | ||
109 | if key in self.removedAttrs: | ||
110 | continue | ||
111 | |||
112 | if hasattr(self, key): | ||
113 | setattr(self, key, val) | ||
114 | |||
115 | def __str__(self): | ||
116 | """Return a string formatted for output to a kickstart file. This | ||
117 | method must be provided by all subclasses. | ||
118 | """ | ||
119 | return KickstartObject.__str__(self) | ||
120 | |||
121 | def parse(self, args): | ||
122 | """Parse the list of args and set data on the KickstartCommand object. | ||
123 | This method must be provided by all subclasses. | ||
124 | """ | ||
125 | raise TypeError, "parse() not implemented for KickstartCommand" | ||
126 | |||
127 | def apply(self, instroot="/"): | ||
128 | """Write out the configuration related to the KickstartCommand object. | ||
129 | Subclasses which do not provide this method will not have their | ||
130 | configuration written out. | ||
131 | """ | ||
132 | return | ||
133 | |||
134 | def dataList(self): | ||
135 | """For commands that can occur multiple times in a single kickstart | ||
136 | file (like network, part, etc.), return the list that we should | ||
137 | append more data objects to. | ||
138 | """ | ||
139 | return None | ||
140 | |||
141 | def deleteRemovedAttrs(self): | ||
142 | """Remove all attributes from self that are given in the removedAttrs | ||
143 | list. This method should be called from __init__ in a subclass, | ||
144 | but only after the superclass's __init__ method has been called. | ||
145 | """ | ||
146 | for attr in filter(lambda k: hasattr(self, k), self.removedAttrs): | ||
147 | delattr(self, attr) | ||
148 | |||
149 | # Set the contents of the opts object (an instance of optparse.Values | ||
150 | # returned by parse_args) as attributes on the KickstartCommand object. | ||
151 | # It's useful to call this from KickstartCommand subclasses after parsing | ||
152 | # the arguments. | ||
153 | def _setToSelf(self, optParser, opts): | ||
154 | self._setToObj(optParser, opts, self) | ||
155 | |||
156 | # Sets the contents of the opts object (an instance of optparse.Values | ||
157 | # returned by parse_args) as attributes on the provided object obj. It's | ||
158 | # useful to call this from KickstartCommand subclasses that handle lists | ||
159 | # of objects (like partitions, network devices, etc.) and need to populate | ||
160 | # a Data object. | ||
161 | def _setToObj(self, optParser, opts, obj): | ||
162 | for key in filter (lambda k: getattr(opts, k) != None, optParser.keys()): | ||
163 | setattr(obj, key, getattr(opts, key)) | ||
164 | |||
165 | class DeprecatedCommand(KickstartCommand): | ||
166 | """Specify that a command is deprecated and no longer has any function. | ||
167 | Any command that is deprecated should be subclassed from this class, | ||
168 | only specifying an __init__ method that calls the superclass's __init__. | ||
169 | This is an abstract class. | ||
170 | """ | ||
171 | def __init__(self, writePriority=None, *args, **kwargs): | ||
172 | # We don't want people using this class by itself. | ||
173 | if self.__class__ is KickstartCommand: | ||
174 | raise TypeError, "DeprecatedCommand is an abstract class." | ||
175 | |||
176 | # Create a new DeprecatedCommand instance. | ||
177 | KickstartCommand.__init__(self, writePriority, *args, **kwargs) | ||
178 | |||
179 | def __str__(self): | ||
180 | """Placeholder since DeprecatedCommands don't work anymore.""" | ||
181 | return "" | ||
182 | |||
183 | def parse(self, args): | ||
184 | """Print a warning message if the command is seen in the input file.""" | ||
185 | mapping = {"lineno": self.lineno, "cmd": self.currentCmd} | ||
186 | warnings.warn(_("Ignoring deprecated command on line %(lineno)s: The %(cmd)s command has been deprecated and no longer has any effect. It may be removed from future releases, which will result in a fatal error from kickstart. Please modify your kickstart file to remove this command.") % mapping, DeprecationWarning) | ||
187 | |||
188 | |||
189 | ### | ||
190 | ### HANDLERS | ||
191 | ### | ||
192 | class BaseHandler(KickstartObject): | ||
193 | """Each version of kickstart syntax is provided by a subclass of this | ||
194 | class. These subclasses are what users will interact with for parsing, | ||
195 | extracting data, and writing out kickstart files. This is an abstract | ||
196 | class. | ||
197 | |||
198 | version -- The version this syntax handler supports. This is set by | ||
199 | a class attribute of a BaseHandler subclass and is used to | ||
200 | set up the command dict. It is for read-only use. | ||
201 | """ | ||
202 | version = None | ||
203 | |||
204 | def __init__(self, mapping=None, dataMapping=None, commandUpdates=None, | ||
205 | dataUpdates=None, *args, **kwargs): | ||
206 | """Create a new BaseHandler instance. This method must be provided by | ||
207 | all subclasses, but subclasses must call BaseHandler.__init__ first. | ||
208 | |||
209 | mapping -- A custom map from command strings to classes, | ||
210 | useful when creating your own handler with | ||
211 | special command objects. It is otherwise unused | ||
212 | and rarely needed. If you give this argument, | ||
213 | the mapping takes the place of the default one | ||
214 | and so must include all commands you want | ||
215 | recognized. | ||
216 | dataMapping -- This is the same as mapping, but for data | ||
217 | objects. All the same comments apply. | ||
218 | commandUpdates -- This is similar to mapping, but does not take | ||
219 | the place of the defaults entirely. Instead, | ||
220 | this mapping is applied after the defaults and | ||
221 | updates it with just the commands you want to | ||
222 | modify. | ||
223 | dataUpdates -- This is the same as commandUpdates, but for | ||
224 | data objects. | ||
225 | |||
226 | |||
227 | Instance attributes: | ||
228 | |||
229 | commands -- A mapping from a string command to a KickstartCommand | ||
230 | subclass object that handles it. Multiple strings can | ||
231 | map to the same object, but only one instance of the | ||
232 | command object should ever exist. Most users should | ||
233 | never have to deal with this directly, as it is | ||
234 | manipulated internally and called through dispatcher. | ||
235 | currentLine -- The current unprocessed line from the input file | ||
236 | that caused this handler to be run. | ||
237 | packages -- An instance of pykickstart.parser.Packages which | ||
238 | describes the packages section of the input file. | ||
239 | platform -- A string describing the hardware platform, which is | ||
240 | needed only by system-config-kickstart. | ||
241 | scripts -- A list of pykickstart.parser.Script instances, which is | ||
242 | populated by KickstartParser.addScript and describes the | ||
243 | %pre/%post/%traceback script section of the input file. | ||
244 | """ | ||
245 | |||
246 | # We don't want people using this class by itself. | ||
247 | if self.__class__ is BaseHandler: | ||
248 | raise TypeError, "BaseHandler is an abstract class." | ||
249 | |||
250 | KickstartObject.__init__(self, *args, **kwargs) | ||
251 | |||
252 | # This isn't really a good place for these, but it's better than | ||
253 | # everything else I can think of. | ||
254 | self.scripts = [] | ||
255 | self.packages = Packages() | ||
256 | self.platform = "" | ||
257 | |||
258 | # These will be set by the dispatcher. | ||
259 | self.commands = {} | ||
260 | self.currentLine = 0 | ||
261 | |||
262 | # A dict keyed by an integer priority number, with each value being a | ||
263 | # list of KickstartCommand subclasses. This dict is maintained by | ||
264 | # registerCommand and used in __str__. No one else should be touching | ||
265 | # it. | ||
266 | self._writeOrder = {} | ||
267 | |||
268 | self._registerCommands(mapping, dataMapping, commandUpdates, dataUpdates) | ||
269 | |||
270 | def __str__(self): | ||
271 | """Return a string formatted for output to a kickstart file.""" | ||
272 | retval = "" | ||
273 | |||
274 | if self.platform != "": | ||
275 | retval += "#platform=%s\n" % self.platform | ||
276 | |||
277 | retval += "#version=%s\n" % versionToString(self.version) | ||
278 | |||
279 | lst = self._writeOrder.keys() | ||
280 | lst.sort() | ||
281 | |||
282 | for prio in lst: | ||
283 | for obj in self._writeOrder[prio]: | ||
284 | retval += obj.__str__() | ||
285 | |||
286 | for script in self.scripts: | ||
287 | retval += script.__str__() | ||
288 | |||
289 | retval += self.packages.__str__() | ||
290 | |||
291 | return retval | ||
292 | |||
293 | def _insertSorted(self, lst, obj): | ||
294 | length = len(lst) | ||
295 | i = 0 | ||
296 | |||
297 | while i < length: | ||
298 | # If the two classes have the same name, it's because we are | ||
299 | # overriding an existing class with one from a later kickstart | ||
300 | # version, so remove the old one in favor of the new one. | ||
301 | if obj.__class__.__name__ > lst[i].__class__.__name__: | ||
302 | i += 1 | ||
303 | elif obj.__class__.__name__ == lst[i].__class__.__name__: | ||
304 | lst[i] = obj | ||
305 | return | ||
306 | elif obj.__class__.__name__ < lst[i].__class__.__name__: | ||
307 | break | ||
308 | |||
309 | if i >= length: | ||
310 | lst.append(obj) | ||
311 | else: | ||
312 | lst.insert(i, obj) | ||
313 | |||
314 | def _setCommand(self, cmdObj): | ||
315 | # Add an attribute on this version object. We need this to provide a | ||
316 | # way for clients to access the command objects. We also need to strip | ||
317 | # off the version part from the front of the name. | ||
318 | if cmdObj.__class__.__name__.find("_") != -1: | ||
319 | name = unicode(cmdObj.__class__.__name__.split("_", 1)[1]) | ||
320 | else: | ||
321 | name = unicode(cmdObj.__class__.__name__).lower() | ||
322 | |||
323 | setattr(self, name.lower(), cmdObj) | ||
324 | |||
325 | # Also, add the object into the _writeOrder dict in the right place. | ||
326 | if cmdObj.writePriority is not None: | ||
327 | if self._writeOrder.has_key(cmdObj.writePriority): | ||
328 | self._insertSorted(self._writeOrder[cmdObj.writePriority], cmdObj) | ||
329 | else: | ||
330 | self._writeOrder[cmdObj.writePriority] = [cmdObj] | ||
331 | |||
332 | def _registerCommands(self, mapping=None, dataMapping=None, commandUpdates=None, | ||
333 | dataUpdates=None): | ||
334 | if mapping == {} or mapping == None: | ||
335 | from pykickstart.handlers.control import commandMap | ||
336 | cMap = commandMap[self.version] | ||
337 | else: | ||
338 | cMap = mapping | ||
339 | |||
340 | if dataMapping == {} or dataMapping == None: | ||
341 | from pykickstart.handlers.control import dataMap | ||
342 | dMap = dataMap[self.version] | ||
343 | else: | ||
344 | dMap = dataMapping | ||
345 | |||
346 | if type(commandUpdates) == types.DictType: | ||
347 | cMap.update(commandUpdates) | ||
348 | |||
349 | if type(dataUpdates) == types.DictType: | ||
350 | dMap.update(dataUpdates) | ||
351 | |||
352 | for (cmdName, cmdClass) in cMap.iteritems(): | ||
353 | # First make sure we haven't instantiated this command handler | ||
354 | # already. If we have, we just need to make another mapping to | ||
355 | # it in self.commands. | ||
356 | cmdObj = None | ||
357 | |||
358 | for (key, val) in self.commands.iteritems(): | ||
359 | if val.__class__.__name__ == cmdClass.__name__: | ||
360 | cmdObj = val | ||
361 | break | ||
362 | |||
363 | # If we didn't find an instance in self.commands, create one now. | ||
364 | if cmdObj == None: | ||
365 | cmdObj = cmdClass() | ||
366 | self._setCommand(cmdObj) | ||
367 | |||
368 | # Finally, add the mapping to the commands dict. | ||
369 | self.commands[cmdName] = cmdObj | ||
370 | self.commands[cmdName].handler = self | ||
371 | |||
372 | # We also need to create attributes for the various data objects. | ||
373 | # No checks here because dMap is a bijection. At least, that's what | ||
374 | # the comment says. Hope no one screws that up. | ||
375 | for (dataName, dataClass) in dMap.iteritems(): | ||
376 | setattr(self, dataName, dataClass) | ||
377 | |||
378 | def dispatcher(self, args, lineno): | ||
379 | """Call the appropriate KickstartCommand handler for the current line | ||
380 | in the kickstart file. A handler for the current command should | ||
381 | be registered, though a handler of None is not an error. Returns | ||
382 | the data object returned by KickstartCommand.parse. | ||
383 | |||
384 | args -- A list of arguments to the current command | ||
385 | lineno -- The line number in the file, for error reporting | ||
386 | """ | ||
387 | cmd = args[0] | ||
388 | |||
389 | if not self.commands.has_key(cmd): | ||
390 | raise KickstartParseError, formatErrorMsg(lineno, msg=_("Unknown command: %s" % cmd)) | ||
391 | elif self.commands[cmd] != None: | ||
392 | self.commands[cmd].currentCmd = cmd | ||
393 | self.commands[cmd].currentLine = self.currentLine | ||
394 | self.commands[cmd].lineno = lineno | ||
395 | |||
396 | # The parser returns the data object that was modified. This could | ||
397 | # be a BaseData subclass that should be put into a list, or it | ||
398 | # could be the command handler object itself. | ||
399 | obj = self.commands[cmd].parse(args[1:]) | ||
400 | lst = self.commands[cmd].dataList() | ||
401 | if lst is not None: | ||
402 | lst.append(obj) | ||
403 | |||
404 | return obj | ||
405 | |||
406 | def maskAllExcept(self, lst): | ||
407 | """Set all entries in the commands dict to None, except the ones in | ||
408 | the lst. All other commands will not be processed. | ||
409 | """ | ||
410 | self._writeOrder = {} | ||
411 | |||
412 | for (key, val) in self.commands.iteritems(): | ||
413 | if not key in lst: | ||
414 | self.commands[key] = None | ||
415 | |||
416 | def hasCommand(self, cmd): | ||
417 | """Return true if there is a handler for the string cmd.""" | ||
418 | return hasattr(self, cmd) | ||
419 | |||
420 | |||
421 | ### | ||
422 | ### DATA | ||
423 | ### | ||
424 | class BaseData(KickstartObject): | ||
425 | """The base class for all data objects. This is an abstract class.""" | ||
426 | removedKeywords = [] | ||
427 | removedAttrs = [] | ||
428 | |||
429 | def __init__(self, *args, **kwargs): | ||
430 | """Create a new BaseData instance. | ||
431 | |||
432 | lineno -- Line number in the ks-file where this object was defined | ||
433 | """ | ||
434 | |||
435 | # We don't want people using this class by itself. | ||
436 | if self.__class__ is BaseData: | ||
437 | raise TypeError, "BaseData is an abstract class." | ||
438 | |||
439 | KickstartObject.__init__(self, *args, **kwargs) | ||
440 | self.lineno = 0 | ||
441 | |||
442 | def __str__(self): | ||
443 | """Return a string formatted for output to a kickstart file.""" | ||
444 | return "" | ||
445 | |||
446 | def __call__(self, *args, **kwargs): | ||
447 | """Set multiple attributes on a subclass of BaseData at once via | ||
448 | keyword arguments. Valid attributes are anything specified in a | ||
449 | subclass, but unknown attributes will be ignored. | ||
450 | """ | ||
451 | for (key, val) in kwargs.items(): | ||
452 | # Ignore setting attributes that were removed in a subclass, as | ||
453 | # if they were unknown attributes. | ||
454 | if key in self.removedAttrs: | ||
455 | continue | ||
456 | |||
457 | if hasattr(self, key): | ||
458 | setattr(self, key, val) | ||
459 | |||
460 | def deleteRemovedAttrs(self): | ||
461 | """Remove all attributes from self that are given in the removedAttrs | ||
462 | list. This method should be called from __init__ in a subclass, | ||
463 | but only after the superclass's __init__ method has been called. | ||
464 | """ | ||
465 | for attr in filter(lambda k: hasattr(self, k), self.removedAttrs): | ||
466 | delattr(self, attr) | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py b/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py new file mode 100644 index 0000000000..2d94550935 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py | |||
@@ -0,0 +1,20 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2009 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | import bootloader, partition | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py b/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py new file mode 100644 index 0000000000..c2b552f689 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py | |||
@@ -0,0 +1,216 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2007 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | from pykickstart.base import * | ||
21 | from pykickstart.options import * | ||
22 | |||
23 | class FC3_Bootloader(KickstartCommand): | ||
24 | removedKeywords = KickstartCommand.removedKeywords | ||
25 | removedAttrs = KickstartCommand.removedAttrs | ||
26 | |||
27 | def __init__(self, writePriority=10, *args, **kwargs): | ||
28 | KickstartCommand.__init__(self, writePriority, *args, **kwargs) | ||
29 | self.op = self._getParser() | ||
30 | |||
31 | self.driveorder = kwargs.get("driveorder", []) | ||
32 | self.appendLine = kwargs.get("appendLine", "") | ||
33 | self.forceLBA = kwargs.get("forceLBA", False) | ||
34 | self.linear = kwargs.get("linear", True) | ||
35 | self.location = kwargs.get("location", "") | ||
36 | self.md5pass = kwargs.get("md5pass", "") | ||
37 | self.password = kwargs.get("password", "") | ||
38 | self.upgrade = kwargs.get("upgrade", False) | ||
39 | self.useLilo = kwargs.get("useLilo", False) | ||
40 | |||
41 | self.deleteRemovedAttrs() | ||
42 | |||
43 | def _getArgsAsStr(self): | ||
44 | retval = "" | ||
45 | |||
46 | if self.appendLine != "": | ||
47 | retval += " --append=\"%s\"" % self.appendLine | ||
48 | if self.linear: | ||
49 | retval += " --linear" | ||
50 | if self.location: | ||
51 | retval += " --location=%s" % self.location | ||
52 | if hasattr(self, "forceLBA") and self.forceLBA: | ||
53 | retval += " --lba32" | ||
54 | if self.password != "": | ||
55 | retval += " --password=\"%s\"" % self.password | ||
56 | if self.md5pass != "": | ||
57 | retval += " --md5pass=\"%s\"" % self.md5pass | ||
58 | if self.upgrade: | ||
59 | retval += " --upgrade" | ||
60 | if self.useLilo: | ||
61 | retval += " --useLilo" | ||
62 | if len(self.driveorder) > 0: | ||
63 | retval += " --driveorder=\"%s\"" % ",".join(self.driveorder) | ||
64 | |||
65 | return retval | ||
66 | |||
67 | def __str__(self): | ||
68 | retval = KickstartCommand.__str__(self) | ||
69 | |||
70 | if self.location != "": | ||
71 | retval += "# System bootloader configuration\nbootloader" | ||
72 | retval += self._getArgsAsStr() + "\n" | ||
73 | |||
74 | return retval | ||
75 | |||
76 | def _getParser(self): | ||
77 | def driveorder_cb (option, opt_str, value, parser): | ||
78 | for d in value.split(','): | ||
79 | parser.values.ensure_value(option.dest, []).append(d) | ||
80 | |||
81 | op = KSOptionParser() | ||
82 | op.add_option("--append", dest="appendLine") | ||
83 | op.add_option("--linear", dest="linear", action="store_true", | ||
84 | default=True) | ||
85 | op.add_option("--nolinear", dest="linear", action="store_false") | ||
86 | op.add_option("--location", dest="location", type="choice", | ||
87 | default="mbr", | ||
88 | choices=["mbr", "partition", "none", "boot"]) | ||
89 | op.add_option("--lba32", dest="forceLBA", action="store_true", | ||
90 | default=False) | ||
91 | op.add_option("--password", dest="password", default="") | ||
92 | op.add_option("--md5pass", dest="md5pass", default="") | ||
93 | op.add_option("--upgrade", dest="upgrade", action="store_true", | ||
94 | default=False) | ||
95 | op.add_option("--useLilo", dest="useLilo", action="store_true", | ||
96 | default=False) | ||
97 | op.add_option("--driveorder", dest="driveorder", action="callback", | ||
98 | callback=driveorder_cb, nargs=1, type="string") | ||
99 | return op | ||
100 | |||
101 | def parse(self, args): | ||
102 | (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) | ||
103 | self._setToSelf(self.op, opts) | ||
104 | |||
105 | if self.currentCmd == "lilo": | ||
106 | self.useLilo = True | ||
107 | |||
108 | return self | ||
109 | |||
110 | class FC4_Bootloader(FC3_Bootloader): | ||
111 | removedKeywords = FC3_Bootloader.removedKeywords + ["linear", "useLilo"] | ||
112 | removedAttrs = FC3_Bootloader.removedAttrs + ["linear", "useLilo"] | ||
113 | |||
114 | def __init__(self, writePriority=10, *args, **kwargs): | ||
115 | FC3_Bootloader.__init__(self, writePriority, *args, **kwargs) | ||
116 | |||
117 | def _getArgsAsStr(self): | ||
118 | retval = "" | ||
119 | if self.appendLine != "": | ||
120 | retval += " --append=\"%s\"" % self.appendLine | ||
121 | if self.location: | ||
122 | retval += " --location=%s" % self.location | ||
123 | if hasattr(self, "forceLBA") and self.forceLBA: | ||
124 | retval += " --lba32" | ||
125 | if self.password != "": | ||
126 | retval += " --password=\"%s\"" % self.password | ||
127 | if self.md5pass != "": | ||
128 | retval += " --md5pass=\"%s\"" % self.md5pass | ||
129 | if self.upgrade: | ||
130 | retval += " --upgrade" | ||
131 | if len(self.driveorder) > 0: | ||
132 | retval += " --driveorder=\"%s\"" % ",".join(self.driveorder) | ||
133 | return retval | ||
134 | |||
135 | def _getParser(self): | ||
136 | op = FC3_Bootloader._getParser(self) | ||
137 | op.remove_option("--linear") | ||
138 | op.remove_option("--nolinear") | ||
139 | op.remove_option("--useLilo") | ||
140 | return op | ||
141 | |||
142 | def parse(self, args): | ||
143 | (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) | ||
144 | self._setToSelf(self.op, opts) | ||
145 | return self | ||
146 | |||
147 | class F8_Bootloader(FC4_Bootloader): | ||
148 | removedKeywords = FC4_Bootloader.removedKeywords | ||
149 | removedAttrs = FC4_Bootloader.removedAttrs | ||
150 | |||
151 | def __init__(self, writePriority=10, *args, **kwargs): | ||
152 | FC4_Bootloader.__init__(self, writePriority, *args, **kwargs) | ||
153 | |||
154 | self.timeout = kwargs.get("timeout", None) | ||
155 | self.default = kwargs.get("default", "") | ||
156 | |||
157 | def _getArgsAsStr(self): | ||
158 | ret = FC4_Bootloader._getArgsAsStr(self) | ||
159 | |||
160 | if self.timeout is not None: | ||
161 | ret += " --timeout=%d" %(self.timeout,) | ||
162 | if self.default: | ||
163 | ret += " --default=%s" %(self.default,) | ||
164 | |||
165 | return ret | ||
166 | |||
167 | def _getParser(self): | ||
168 | op = FC4_Bootloader._getParser(self) | ||
169 | op.add_option("--timeout", dest="timeout", type="int") | ||
170 | op.add_option("--default", dest="default") | ||
171 | return op | ||
172 | |||
173 | class F12_Bootloader(F8_Bootloader): | ||
174 | removedKeywords = F8_Bootloader.removedKeywords | ||
175 | removedAttrs = F8_Bootloader.removedAttrs | ||
176 | |||
177 | def _getParser(self): | ||
178 | op = F8_Bootloader._getParser(self) | ||
179 | op.add_option("--lba32", dest="forceLBA", deprecated=1, action="store_true") | ||
180 | return op | ||
181 | |||
182 | class F14_Bootloader(F12_Bootloader): | ||
183 | removedKeywords = F12_Bootloader.removedKeywords + ["forceLBA"] | ||
184 | removedAttrs = F12_Bootloader.removedKeywords + ["forceLBA"] | ||
185 | |||
186 | def _getParser(self): | ||
187 | op = F12_Bootloader._getParser(self) | ||
188 | op.remove_option("--lba32") | ||
189 | return op | ||
190 | |||
191 | class F15_Bootloader(F14_Bootloader): | ||
192 | removedKeywords = F14_Bootloader.removedKeywords | ||
193 | removedAttrs = F14_Bootloader.removedAttrs | ||
194 | |||
195 | def __init__(self, writePriority=10, *args, **kwargs): | ||
196 | F14_Bootloader.__init__(self, writePriority, *args, **kwargs) | ||
197 | |||
198 | self.isCrypted = kwargs.get("isCrypted", False) | ||
199 | |||
200 | def _getArgsAsStr(self): | ||
201 | ret = F14_Bootloader._getArgsAsStr(self) | ||
202 | |||
203 | if self.isCrypted: | ||
204 | ret += " --iscrypted" | ||
205 | |||
206 | return ret | ||
207 | |||
208 | def _getParser(self): | ||
209 | def password_cb(option, opt_str, value, parser): | ||
210 | parser.values.isCrypted = True | ||
211 | parser.values.password = value | ||
212 | |||
213 | op = F14_Bootloader._getParser(self) | ||
214 | op.add_option("--iscrypted", dest="isCrypted", action="store_true", default=False) | ||
215 | op.add_option("--md5pass", action="callback", callback=password_cb, nargs=1, type="string") | ||
216 | return op | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py b/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py new file mode 100644 index 0000000000..56b91aa9d9 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py | |||
@@ -0,0 +1,314 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2005, 2006, 2007, 2008 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | from pykickstart.base import * | ||
21 | from pykickstart.errors import * | ||
22 | from pykickstart.options import * | ||
23 | |||
24 | import gettext | ||
25 | import warnings | ||
26 | _ = lambda x: gettext.ldgettext("pykickstart", x) | ||
27 | |||
28 | class FC3_PartData(BaseData): | ||
29 | removedKeywords = BaseData.removedKeywords | ||
30 | removedAttrs = BaseData.removedAttrs | ||
31 | |||
32 | def __init__(self, *args, **kwargs): | ||
33 | BaseData.__init__(self, *args, **kwargs) | ||
34 | self.active = kwargs.get("active", False) | ||
35 | self.primOnly = kwargs.get("primOnly", False) | ||
36 | self.end = kwargs.get("end", 0) | ||
37 | self.fstype = kwargs.get("fstype", "") | ||
38 | self.grow = kwargs.get("grow", False) | ||
39 | self.maxSizeMB = kwargs.get("maxSizeMB", 0) | ||
40 | self.format = kwargs.get("format", True) | ||
41 | self.onbiosdisk = kwargs.get("onbiosdisk", "") | ||
42 | self.disk = kwargs.get("disk", "") | ||
43 | self.onPart = kwargs.get("onPart", "") | ||
44 | self.recommended = kwargs.get("recommended", False) | ||
45 | self.size = kwargs.get("size", None) | ||
46 | self.start = kwargs.get("start", 0) | ||
47 | self.mountpoint = kwargs.get("mountpoint", "") | ||
48 | |||
49 | def __eq__(self, y): | ||
50 | if self.mountpoint: | ||
51 | return self.mountpoint == y.mountpoint | ||
52 | else: | ||
53 | return False | ||
54 | |||
55 | def _getArgsAsStr(self): | ||
56 | retval = "" | ||
57 | |||
58 | if self.active: | ||
59 | retval += " --active" | ||
60 | if self.primOnly: | ||
61 | retval += " --asprimary" | ||
62 | if hasattr(self, "end") and self.end != 0: | ||
63 | retval += " --end=%s" % self.end | ||
64 | if self.fstype != "": | ||
65 | retval += " --fstype=\"%s\"" % self.fstype | ||
66 | if self.grow: | ||
67 | retval += " --grow" | ||
68 | if self.maxSizeMB > 0: | ||
69 | retval += " --maxsize=%d" % self.maxSizeMB | ||
70 | if not self.format: | ||
71 | retval += " --noformat" | ||
72 | if self.onbiosdisk != "": | ||
73 | retval += " --onbiosdisk=%s" % self.onbiosdisk | ||
74 | if self.disk != "": | ||
75 | retval += " --ondisk=%s" % self.disk | ||
76 | if self.onPart != "": | ||
77 | retval += " --onpart=%s" % self.onPart | ||
78 | if self.recommended: | ||
79 | retval += " --recommended" | ||
80 | if self.size and self.size != 0: | ||
81 | retval += " --size=%s" % self.size | ||
82 | if hasattr(self, "start") and self.start != 0: | ||
83 | retval += " --start=%s" % self.start | ||
84 | |||
85 | return retval | ||
86 | |||
87 | def __str__(self): | ||
88 | retval = BaseData.__str__(self) | ||
89 | if self.mountpoint: | ||
90 | mountpoint_str = "%s" % self.mountpoint | ||
91 | else: | ||
92 | mountpoint_str = "(No mount point)" | ||
93 | retval += "part %s%s\n" % (mountpoint_str, self._getArgsAsStr()) | ||
94 | return retval | ||
95 | |||
96 | class FC4_PartData(FC3_PartData): | ||
97 | removedKeywords = FC3_PartData.removedKeywords | ||
98 | removedAttrs = FC3_PartData.removedAttrs | ||
99 | |||
100 | def __init__(self, *args, **kwargs): | ||
101 | FC3_PartData.__init__(self, *args, **kwargs) | ||
102 | self.bytesPerInode = kwargs.get("bytesPerInode", 4096) | ||
103 | self.fsopts = kwargs.get("fsopts", "") | ||
104 | self.label = kwargs.get("label", "") | ||
105 | |||
106 | def _getArgsAsStr(self): | ||
107 | retval = FC3_PartData._getArgsAsStr(self) | ||
108 | |||
109 | if hasattr(self, "bytesPerInode") and self.bytesPerInode != 0: | ||
110 | retval += " --bytes-per-inode=%d" % self.bytesPerInode | ||
111 | if self.fsopts != "": | ||
112 | retval += " --fsoptions=\"%s\"" % self.fsopts | ||
113 | if self.label != "": | ||
114 | retval += " --label=%s" % self.label | ||
115 | |||
116 | return retval | ||
117 | |||
118 | class F9_PartData(FC4_PartData): | ||
119 | removedKeywords = FC4_PartData.removedKeywords + ["bytesPerInode"] | ||
120 | removedAttrs = FC4_PartData.removedAttrs + ["bytesPerInode"] | ||
121 | |||
122 | def __init__(self, *args, **kwargs): | ||
123 | FC4_PartData.__init__(self, *args, **kwargs) | ||
124 | self.deleteRemovedAttrs() | ||
125 | |||
126 | self.fsopts = kwargs.get("fsopts", "") | ||
127 | self.label = kwargs.get("label", "") | ||
128 | self.fsprofile = kwargs.get("fsprofile", "") | ||
129 | self.encrypted = kwargs.get("encrypted", False) | ||
130 | self.passphrase = kwargs.get("passphrase", "") | ||
131 | |||
132 | def _getArgsAsStr(self): | ||
133 | retval = FC4_PartData._getArgsAsStr(self) | ||
134 | |||
135 | if self.fsprofile != "": | ||
136 | retval += " --fsprofile=\"%s\"" % self.fsprofile | ||
137 | if self.encrypted: | ||
138 | retval += " --encrypted" | ||
139 | |||
140 | if self.passphrase != "": | ||
141 | retval += " --passphrase=\"%s\"" % self.passphrase | ||
142 | |||
143 | return retval | ||
144 | |||
145 | class F11_PartData(F9_PartData): | ||
146 | removedKeywords = F9_PartData.removedKeywords + ["start", "end"] | ||
147 | removedAttrs = F9_PartData.removedAttrs + ["start", "end"] | ||
148 | |||
149 | class F12_PartData(F11_PartData): | ||
150 | removedKeywords = F11_PartData.removedKeywords | ||
151 | removedAttrs = F11_PartData.removedAttrs | ||
152 | |||
153 | def __init__(self, *args, **kwargs): | ||
154 | F11_PartData.__init__(self, *args, **kwargs) | ||
155 | |||
156 | self.escrowcert = kwargs.get("escrowcert", "") | ||
157 | self.backuppassphrase = kwargs.get("backuppassphrase", False) | ||
158 | |||
159 | def _getArgsAsStr(self): | ||
160 | retval = F11_PartData._getArgsAsStr(self) | ||
161 | |||
162 | if self.encrypted and self.escrowcert != "": | ||
163 | retval += " --escrowcert=\"%s\"" % self.escrowcert | ||
164 | |||
165 | if self.backuppassphrase: | ||
166 | retval += " --backuppassphrase" | ||
167 | |||
168 | return retval | ||
169 | |||
170 | F14_PartData = F12_PartData | ||
171 | |||
172 | class FC3_Partition(KickstartCommand): | ||
173 | removedKeywords = KickstartCommand.removedKeywords | ||
174 | removedAttrs = KickstartCommand.removedAttrs | ||
175 | |||
176 | def __init__(self, writePriority=130, *args, **kwargs): | ||
177 | KickstartCommand.__init__(self, writePriority, *args, **kwargs) | ||
178 | self.op = self._getParser() | ||
179 | |||
180 | self.partitions = kwargs.get("partitions", []) | ||
181 | |||
182 | def __str__(self): | ||
183 | retval = "" | ||
184 | |||
185 | for part in self.partitions: | ||
186 | retval += part.__str__() | ||
187 | |||
188 | if retval != "": | ||
189 | return "# Disk partitioning information\n" + retval | ||
190 | else: | ||
191 | return "" | ||
192 | |||
193 | def _getParser(self): | ||
194 | def part_cb (option, opt_str, value, parser): | ||
195 | if value.startswith("/dev/"): | ||
196 | parser.values.ensure_value(option.dest, value[5:]) | ||
197 | else: | ||
198 | parser.values.ensure_value(option.dest, value) | ||
199 | |||
200 | op = KSOptionParser() | ||
201 | op.add_option("--active", dest="active", action="store_true", | ||
202 | default=False) | ||
203 | op.add_option("--asprimary", dest="primOnly", action="store_true", | ||
204 | default=False) | ||
205 | op.add_option("--end", dest="end", action="store", type="int", | ||
206 | nargs=1) | ||
207 | op.add_option("--fstype", "--type", dest="fstype") | ||
208 | op.add_option("--grow", dest="grow", action="store_true", default=False) | ||
209 | op.add_option("--maxsize", dest="maxSizeMB", action="store", type="int", | ||
210 | nargs=1) | ||
211 | op.add_option("--noformat", dest="format", action="store_false", | ||
212 | default=True) | ||
213 | op.add_option("--onbiosdisk", dest="onbiosdisk") | ||
214 | op.add_option("--ondisk", "--ondrive", dest="disk") | ||
215 | op.add_option("--onpart", "--usepart", dest="onPart", action="callback", | ||
216 | callback=part_cb, nargs=1, type="string") | ||
217 | op.add_option("--recommended", dest="recommended", action="store_true", | ||
218 | default=False) | ||
219 | op.add_option("--size", dest="size", action="store", type="int", | ||
220 | nargs=1) | ||
221 | op.add_option("--start", dest="start", action="store", type="int", | ||
222 | nargs=1) | ||
223 | return op | ||
224 | |||
225 | def parse(self, args): | ||
226 | (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno) | ||
227 | |||
228 | pd = self.handler.PartData() | ||
229 | self._setToObj(self.op, opts, pd) | ||
230 | pd.lineno = self.lineno | ||
231 | if extra: | ||
232 | pd.mountpoint = extra[0] | ||
233 | if pd in self.dataList(): | ||
234 | warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint) | ||
235 | else: | ||
236 | pd.mountpoint = None | ||
237 | |||
238 | return pd | ||
239 | |||
240 | def dataList(self): | ||
241 | return self.partitions | ||
242 | |||
243 | class FC4_Partition(FC3_Partition): | ||
244 | removedKeywords = FC3_Partition.removedKeywords | ||
245 | removedAttrs = FC3_Partition.removedAttrs | ||
246 | |||
247 | def __init__(self, writePriority=130, *args, **kwargs): | ||
248 | FC3_Partition.__init__(self, writePriority, *args, **kwargs) | ||
249 | |||
250 | def part_cb (option, opt_str, value, parser): | ||
251 | if value.startswith("/dev/"): | ||
252 | parser.values.ensure_value(option.dest, value[5:]) | ||
253 | else: | ||
254 | parser.values.ensure_value(option.dest, value) | ||
255 | |||
256 | def _getParser(self): | ||
257 | op = FC3_Partition._getParser(self) | ||
258 | op.add_option("--bytes-per-inode", dest="bytesPerInode", action="store", | ||
259 | type="int", nargs=1) | ||
260 | op.add_option("--fsoptions", dest="fsopts") | ||
261 | op.add_option("--label", dest="label") | ||
262 | return op | ||
263 | |||
264 | class F9_Partition(FC4_Partition): | ||
265 | removedKeywords = FC4_Partition.removedKeywords | ||
266 | removedAttrs = FC4_Partition.removedAttrs | ||
267 | |||
268 | def __init__(self, writePriority=130, *args, **kwargs): | ||
269 | FC4_Partition.__init__(self, writePriority, *args, **kwargs) | ||
270 | |||
271 | def part_cb (option, opt_str, value, parser): | ||
272 | if value.startswith("/dev/"): | ||
273 | parser.values.ensure_value(option.dest, value[5:]) | ||
274 | else: | ||
275 | parser.values.ensure_value(option.dest, value) | ||
276 | |||
277 | def _getParser(self): | ||
278 | op = FC4_Partition._getParser(self) | ||
279 | op.add_option("--bytes-per-inode", deprecated=1) | ||
280 | op.add_option("--fsprofile") | ||
281 | op.add_option("--encrypted", action="store_true", default=False) | ||
282 | op.add_option("--passphrase") | ||
283 | return op | ||
284 | |||
285 | class F11_Partition(F9_Partition): | ||
286 | removedKeywords = F9_Partition.removedKeywords | ||
287 | removedAttrs = F9_Partition.removedAttrs | ||
288 | |||
289 | def _getParser(self): | ||
290 | op = F9_Partition._getParser(self) | ||
291 | op.add_option("--start", deprecated=1) | ||
292 | op.add_option("--end", deprecated=1) | ||
293 | return op | ||
294 | |||
295 | class F12_Partition(F11_Partition): | ||
296 | removedKeywords = F11_Partition.removedKeywords | ||
297 | removedAttrs = F11_Partition.removedAttrs | ||
298 | |||
299 | def _getParser(self): | ||
300 | op = F11_Partition._getParser(self) | ||
301 | op.add_option("--escrowcert") | ||
302 | op.add_option("--backuppassphrase", action="store_true", default=False) | ||
303 | return op | ||
304 | |||
305 | class F14_Partition(F12_Partition): | ||
306 | removedKeywords = F12_Partition.removedKeywords | ||
307 | removedAttrs = F12_Partition.removedAttrs | ||
308 | |||
309 | def _getParser(self): | ||
310 | op = F12_Partition._getParser(self) | ||
311 | op.remove_option("--bytes-per-inode") | ||
312 | op.remove_option("--start") | ||
313 | op.remove_option("--end") | ||
314 | return op | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/constants.py b/scripts/lib/wic/3rdparty/pykickstart/constants.py new file mode 100644 index 0000000000..5e12fc80ec --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/constants.py | |||
@@ -0,0 +1,57 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2005-2007 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | CLEARPART_TYPE_LINUX = 0 | ||
21 | CLEARPART_TYPE_ALL = 1 | ||
22 | CLEARPART_TYPE_NONE = 2 | ||
23 | |||
24 | DISPLAY_MODE_CMDLINE = 0 | ||
25 | DISPLAY_MODE_GRAPHICAL = 1 | ||
26 | DISPLAY_MODE_TEXT = 2 | ||
27 | |||
28 | FIRSTBOOT_DEFAULT = 0 | ||
29 | FIRSTBOOT_SKIP = 1 | ||
30 | FIRSTBOOT_RECONFIG = 2 | ||
31 | |||
32 | KS_MISSING_PROMPT = 0 | ||
33 | KS_MISSING_IGNORE = 1 | ||
34 | |||
35 | SELINUX_DISABLED = 0 | ||
36 | SELINUX_ENFORCING = 1 | ||
37 | SELINUX_PERMISSIVE = 2 | ||
38 | |||
39 | KS_SCRIPT_PRE = 0 | ||
40 | KS_SCRIPT_POST = 1 | ||
41 | KS_SCRIPT_TRACEBACK = 2 | ||
42 | |||
43 | KS_WAIT = 0 | ||
44 | KS_REBOOT = 1 | ||
45 | KS_SHUTDOWN = 2 | ||
46 | |||
47 | KS_INSTKEY_SKIP = -99 | ||
48 | |||
49 | BOOTPROTO_DHCP = "dhcp" | ||
50 | BOOTPROTO_BOOTP = "bootp" | ||
51 | BOOTPROTO_STATIC = "static" | ||
52 | BOOTPROTO_QUERY = "query" | ||
53 | BOOTPROTO_IBFT = "ibft" | ||
54 | |||
55 | GROUP_REQUIRED = 0 | ||
56 | GROUP_DEFAULT = 1 | ||
57 | GROUP_ALL = 2 | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/errors.py b/scripts/lib/wic/3rdparty/pykickstart/errors.py new file mode 100644 index 0000000000..a234d99d43 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/errors.py | |||
@@ -0,0 +1,103 @@ | |||
1 | # | ||
2 | # errors.py: Kickstart error handling. | ||
3 | # | ||
4 | # Chris Lumens <clumens@redhat.com> | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | """ | ||
21 | Error handling classes and functions. | ||
22 | |||
23 | This module exports a single function: | ||
24 | |||
25 | formatErrorMsg - Properly formats an error message. | ||
26 | |||
27 | It also exports several exception classes: | ||
28 | |||
29 | KickstartError - A generic exception class. | ||
30 | |||
31 | KickstartParseError - An exception for errors relating to parsing. | ||
32 | |||
33 | KickstartValueError - An exception for errors relating to option | ||
34 | processing. | ||
35 | |||
36 | KickstartVersionError - An exception for errors relating to unsupported | ||
37 | syntax versions. | ||
38 | """ | ||
39 | import gettext | ||
40 | _ = lambda x: gettext.ldgettext("pykickstart", x) | ||
41 | |||
42 | def formatErrorMsg(lineno, msg=""): | ||
43 | """Properly format the error message msg for inclusion in an exception.""" | ||
44 | if msg != "": | ||
45 | mapping = {"lineno": lineno, "msg": msg} | ||
46 | return _("The following problem occurred on line %(lineno)s of the kickstart file:\n\n%(msg)s\n") % mapping | ||
47 | else: | ||
48 | return _("There was a problem reading from line %s of the kickstart file") % lineno | ||
49 | |||
50 | class KickstartError(Exception): | ||
51 | """A generic exception class for unspecific error conditions.""" | ||
52 | def __init__(self, val = ""): | ||
53 | """Create a new KickstartError exception instance with the descriptive | ||
54 | message val. val should be the return value of formatErrorMsg. | ||
55 | """ | ||
56 | Exception.__init__(self) | ||
57 | self.value = val | ||
58 | |||
59 | def __str__ (self): | ||
60 | return self.value | ||
61 | |||
62 | class KickstartParseError(KickstartError): | ||
63 | """An exception class for errors when processing the input file, such as | ||
64 | unknown options, commands, or sections. | ||
65 | """ | ||
66 | def __init__(self, msg): | ||
67 | """Create a new KickstartParseError exception instance with the | ||
68 | descriptive message val. val should be the return value of | ||
69 | formatErrorMsg. | ||
70 | """ | ||
71 | KickstartError.__init__(self, msg) | ||
72 | |||
73 | def __str__(self): | ||
74 | return self.value | ||
75 | |||
76 | class KickstartValueError(KickstartError): | ||
77 | """An exception class for errors when processing arguments to commands, | ||
78 | such as too many arguments, too few arguments, or missing required | ||
79 | arguments. | ||
80 | """ | ||
81 | def __init__(self, msg): | ||
82 | """Create a new KickstartValueError exception instance with the | ||
83 | descriptive message val. val should be the return value of | ||
84 | formatErrorMsg. | ||
85 | """ | ||
86 | KickstartError.__init__(self, msg) | ||
87 | |||
88 | def __str__ (self): | ||
89 | return self.value | ||
90 | |||
91 | class KickstartVersionError(KickstartError): | ||
92 | """An exception class for errors related to using an incorrect version of | ||
93 | kickstart syntax. | ||
94 | """ | ||
95 | def __init__(self, msg): | ||
96 | """Create a new KickstartVersionError exception instance with the | ||
97 | descriptive message val. val should be the return value of | ||
98 | formatErrorMsg. | ||
99 | """ | ||
100 | KickstartError.__init__(self, msg) | ||
101 | |||
102 | def __str__ (self): | ||
103 | return self.value | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py b/scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py | |||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/handlers/control.py b/scripts/lib/wic/3rdparty/pykickstart/handlers/control.py new file mode 100644 index 0000000000..8dc80d1ebe --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/handlers/control.py | |||
@@ -0,0 +1,46 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | from pykickstart.version import * | ||
21 | from pykickstart.commands import * | ||
22 | |||
23 | # This map is keyed on kickstart syntax version as provided by | ||
24 | # pykickstart.version. Within each sub-dict is a mapping from command name | ||
25 | # to the class that handles it. This is an onto mapping - that is, multiple | ||
26 | # command names can map to the same class. However, the Handler will ensure | ||
27 | # that only one instance of each class ever exists. | ||
28 | commandMap = { | ||
29 | # based on f15 | ||
30 | F16: { | ||
31 | "bootloader": bootloader.F15_Bootloader, | ||
32 | "part": partition.F14_Partition, | ||
33 | "partition": partition.F14_Partition, | ||
34 | }, | ||
35 | } | ||
36 | |||
37 | # This map is keyed on kickstart syntax version as provided by | ||
38 | # pykickstart.version. Within each sub-dict is a mapping from a data object | ||
39 | # name to the class that provides it. This is a bijective mapping - that is, | ||
40 | # each name maps to exactly one data class and all data classes have a name. | ||
41 | # More than one instance of each class is allowed to exist, however. | ||
42 | dataMap = { | ||
43 | F16: { | ||
44 | "PartData": partition.F14_PartData, | ||
45 | }, | ||
46 | } | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py b/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py new file mode 100644 index 0000000000..3c52f8d754 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py | |||
@@ -0,0 +1,24 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2011 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | from pykickstart.base import * | ||
21 | from pykickstart.version import * | ||
22 | |||
23 | class F16Handler(BaseHandler): | ||
24 | version = F16 | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/ko.py b/scripts/lib/wic/3rdparty/pykickstart/ko.py new file mode 100644 index 0000000000..1350d19c70 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/ko.py | |||
@@ -0,0 +1,37 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2009 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | """ | ||
21 | Base classes for internal pykickstart use. | ||
22 | |||
23 | The module exports the following important classes: | ||
24 | |||
25 | KickstartObject - The base class for all classes in pykickstart | ||
26 | """ | ||
27 | |||
28 | class KickstartObject(object): | ||
29 | """The base class for all other classes in pykickstart.""" | ||
30 | def __init__(self, *args, **kwargs): | ||
31 | """Create a new KickstartObject instance. All other classes in | ||
32 | pykickstart should be derived from this one. Instance attributes: | ||
33 | """ | ||
34 | pass | ||
35 | |||
36 | def __str__(self): | ||
37 | return "" | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/options.py b/scripts/lib/wic/3rdparty/pykickstart/options.py new file mode 100644 index 0000000000..341c5d7298 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/options.py | |||
@@ -0,0 +1,204 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2005, 2006, 2007 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | """ | ||
21 | Specialized option handling. | ||
22 | |||
23 | This module exports two classes: | ||
24 | |||
25 | KSOptionParser - A specialized subclass of OptionParser to be used | ||
26 | in BaseHandler subclasses. | ||
27 | |||
28 | KSOption - A specialized subclass of Option. | ||
29 | """ | ||
30 | import warnings | ||
31 | from copy import copy | ||
32 | from optparse import * | ||
33 | |||
34 | from constants import * | ||
35 | from errors import * | ||
36 | from version import * | ||
37 | |||
38 | import gettext | ||
39 | _ = lambda x: gettext.ldgettext("pykickstart", x) | ||
40 | |||
41 | class KSOptionParser(OptionParser): | ||
42 | """A specialized subclass of optparse.OptionParser to handle extra option | ||
43 | attribute checking, work error reporting into the KickstartParseError | ||
44 | framework, and to turn off the default help. | ||
45 | """ | ||
46 | def exit(self, status=0, msg=None): | ||
47 | pass | ||
48 | |||
49 | def error(self, msg): | ||
50 | if self.lineno != None: | ||
51 | raise KickstartParseError, formatErrorMsg(self.lineno, msg=msg) | ||
52 | else: | ||
53 | raise KickstartParseError, msg | ||
54 | |||
55 | def keys(self): | ||
56 | retval = [] | ||
57 | |||
58 | for opt in self.option_list: | ||
59 | if opt not in retval: | ||
60 | retval.append(opt.dest) | ||
61 | |||
62 | return retval | ||
63 | |||
64 | def _init_parsing_state (self): | ||
65 | OptionParser._init_parsing_state(self) | ||
66 | self.option_seen = {} | ||
67 | |||
68 | def check_values (self, values, args): | ||
69 | def seen(self, option): | ||
70 | return self.option_seen.has_key(option) | ||
71 | |||
72 | def usedTooNew(self, option): | ||
73 | return option.introduced and option.introduced > self.version | ||
74 | |||
75 | def usedDeprecated(self, option): | ||
76 | return option.deprecated | ||
77 | |||
78 | def usedRemoved(self, option): | ||
79 | return option.removed and option.removed <= self.version | ||
80 | |||
81 | for option in filter(lambda o: isinstance(o, Option), self.option_list): | ||
82 | if option.required and not seen(self, option): | ||
83 | raise KickstartValueError, formatErrorMsg(self.lineno, _("Option %s is required") % option) | ||
84 | elif seen(self, option) and usedTooNew(self, option): | ||
85 | mapping = {"option": option, "intro": versionToString(option.introduced), | ||
86 | "version": versionToString(self.version)} | ||
87 | self.error(_("The %(option)s option was introduced in version %(intro)s, but you are using kickstart syntax version %(version)s.") % mapping) | ||
88 | elif seen(self, option) and usedRemoved(self, option): | ||
89 | mapping = {"option": option, "removed": versionToString(option.removed), | ||
90 | "version": versionToString(self.version)} | ||
91 | |||
92 | if option.removed == self.version: | ||
93 | self.error(_("The %(option)s option is no longer supported.") % mapping) | ||
94 | else: | ||
95 | self.error(_("The %(option)s option was removed in version %(removed)s, but you are using kickstart syntax version %(version)s.") % mapping) | ||
96 | elif seen(self, option) and usedDeprecated(self, option): | ||
97 | mapping = {"lineno": self.lineno, "option": option} | ||
98 | warnings.warn(_("Ignoring deprecated option on line %(lineno)s: The %(option)s option has been deprecated and no longer has any effect. It may be removed from future releases, which will result in a fatal error from kickstart. Please modify your kickstart file to remove this option.") % mapping, DeprecationWarning) | ||
99 | |||
100 | return (values, args) | ||
101 | |||
102 | def parse_args(self, *args, **kwargs): | ||
103 | if kwargs.has_key("lineno"): | ||
104 | self.lineno = kwargs.pop("lineno") | ||
105 | |||
106 | return OptionParser.parse_args(self, **kwargs) | ||
107 | |||
108 | def __init__(self, mapping=None, version=None): | ||
109 | """Create a new KSOptionParser instance. Each KickstartCommand | ||
110 | subclass should create one instance of KSOptionParser, providing | ||
111 | at least the lineno attribute. mapping and version are not required. | ||
112 | Instance attributes: | ||
113 | |||
114 | mapping -- A mapping from option strings to different values. | ||
115 | version -- The version of the kickstart syntax we are checking | ||
116 | against. | ||
117 | """ | ||
118 | OptionParser.__init__(self, option_class=KSOption, | ||
119 | add_help_option=False, | ||
120 | conflict_handler="resolve") | ||
121 | if mapping is None: | ||
122 | self.map = {} | ||
123 | else: | ||
124 | self.map = mapping | ||
125 | |||
126 | self.lineno = None | ||
127 | self.option_seen = {} | ||
128 | self.version = version | ||
129 | |||
130 | def _check_ksboolean(option, opt, value): | ||
131 | if value.lower() in ("on", "yes", "true", "1"): | ||
132 | return True | ||
133 | elif value.lower() in ("off", "no", "false", "0"): | ||
134 | return False | ||
135 | else: | ||
136 | mapping = {"opt": opt, "value": value} | ||
137 | raise OptionValueError(_("Option %(opt)s: invalid boolean value: %(value)r") % mapping) | ||
138 | |||
139 | def _check_string(option, opt, value): | ||
140 | if len(value) > 2 and value.startswith("--"): | ||
141 | mapping = {"opt": opt, "value": value} | ||
142 | raise OptionValueError(_("Option %(opt)s: invalid string value: %(value)r") % mapping) | ||
143 | else: | ||
144 | return value | ||
145 | |||
146 | # Creates a new Option class that supports several new attributes: | ||
147 | # - required: any option with this attribute must be supplied or an exception | ||
148 | # is thrown | ||
149 | # - introduced: the kickstart syntax version that this option first appeared | ||
150 | # in - an exception will be raised if the option is used and | ||
151 | # the specified syntax version is less than the value of this | ||
152 | # attribute | ||
153 | # - deprecated: the kickstart syntax version that this option was deprecated | ||
154 | # in - a DeprecationWarning will be thrown if the option is | ||
155 | # used and the specified syntax version is greater than the | ||
156 | # value of this attribute | ||
157 | # - removed: the kickstart syntax version that this option was removed in - an | ||
158 | # exception will be raised if the option is used and the specified | ||
159 | # syntax version is greated than the value of this attribute | ||
160 | # Also creates a new type: | ||
161 | # - ksboolean: support various kinds of boolean values on an option | ||
162 | # And two new actions: | ||
163 | # - map : allows you to define an opt -> val mapping such that dest gets val | ||
164 | # when opt is seen | ||
165 | # - map_extend: allows you to define an opt -> [val1, ... valn] mapping such | ||
166 | # that dest gets a list of vals built up when opt is seen | ||
167 | class KSOption (Option): | ||
168 | ATTRS = Option.ATTRS + ['introduced', 'deprecated', 'removed', 'required'] | ||
169 | ACTIONS = Option.ACTIONS + ("map", "map_extend",) | ||
170 | STORE_ACTIONS = Option.STORE_ACTIONS + ("map", "map_extend",) | ||
171 | |||
172 | TYPES = Option.TYPES + ("ksboolean", "string") | ||
173 | TYPE_CHECKER = copy(Option.TYPE_CHECKER) | ||
174 | TYPE_CHECKER["ksboolean"] = _check_ksboolean | ||
175 | TYPE_CHECKER["string"] = _check_string | ||
176 | |||
177 | def _check_required(self): | ||
178 | if self.required and not self.takes_value(): | ||
179 | raise OptionError(_("Required flag set for option that doesn't take a value"), self) | ||
180 | |||
181 | # Make sure _check_required() is called from the constructor! | ||
182 | CHECK_METHODS = Option.CHECK_METHODS + [_check_required] | ||
183 | |||
184 | def process (self, opt, value, values, parser): | ||
185 | Option.process(self, opt, value, values, parser) | ||
186 | parser.option_seen[self] = 1 | ||
187 | |||
188 | # Override default take_action method to handle our custom actions. | ||
189 | def take_action(self, action, dest, opt, value, values, parser): | ||
190 | if action == "map": | ||
191 | values.ensure_value(dest, parser.map[opt.lstrip('-')]) | ||
192 | elif action == "map_extend": | ||
193 | values.ensure_value(dest, []).extend(parser.map[opt.lstrip('-')]) | ||
194 | else: | ||
195 | Option.take_action(self, action, dest, opt, value, values, parser) | ||
196 | |||
197 | def takes_value(self): | ||
198 | # Deprecated options don't take a value. | ||
199 | return Option.takes_value(self) and not self.deprecated | ||
200 | |||
201 | def __init__(self, *args, **kwargs): | ||
202 | self.deprecated = False | ||
203 | self.required = False | ||
204 | Option.__init__(self, *args, **kwargs) | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/parser.py b/scripts/lib/wic/3rdparty/pykickstart/parser.py new file mode 100644 index 0000000000..9c9674bf73 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/parser.py | |||
@@ -0,0 +1,619 @@ | |||
1 | # | ||
2 | # parser.py: Kickstart file parser. | ||
3 | # | ||
4 | # Chris Lumens <clumens@redhat.com> | ||
5 | # | ||
6 | # Copyright 2005, 2006, 2007, 2008, 2011 Red Hat, Inc. | ||
7 | # | ||
8 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
9 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
10 | # General Public License v.2. This program is distributed in the hope that it | ||
11 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
12 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | # See the GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along with | ||
16 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
17 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
18 | # trademarks that are incorporated in the source code or documentation are not | ||
19 | # subject to the GNU General Public License and may only be used or replicated | ||
20 | # with the express permission of Red Hat, Inc. | ||
21 | # | ||
22 | """ | ||
23 | Main kickstart file processing module. | ||
24 | |||
25 | This module exports several important classes: | ||
26 | |||
27 | Script - Representation of a single %pre, %post, or %traceback script. | ||
28 | |||
29 | Packages - Representation of the %packages section. | ||
30 | |||
31 | KickstartParser - The kickstart file parser state machine. | ||
32 | """ | ||
33 | |||
34 | from collections import Iterator | ||
35 | import os | ||
36 | import shlex | ||
37 | import sys | ||
38 | import tempfile | ||
39 | from copy import copy | ||
40 | from optparse import * | ||
41 | |||
42 | import constants | ||
43 | from errors import KickstartError, KickstartParseError, KickstartValueError, formatErrorMsg | ||
44 | from ko import KickstartObject | ||
45 | from sections import * | ||
46 | import version | ||
47 | |||
48 | import gettext | ||
49 | _ = lambda x: gettext.ldgettext("pykickstart", x) | ||
50 | |||
51 | STATE_END = "end" | ||
52 | STATE_COMMANDS = "commands" | ||
53 | |||
54 | ver = version.DEVEL | ||
55 | |||
56 | |||
57 | class PutBackIterator(Iterator): | ||
58 | def __init__(self, iterable): | ||
59 | self._iterable = iter(iterable) | ||
60 | self._buf = None | ||
61 | |||
62 | def __iter__(self): | ||
63 | return self | ||
64 | |||
65 | def put(self, s): | ||
66 | self._buf = s | ||
67 | |||
68 | def next(self): | ||
69 | if self._buf: | ||
70 | retval = self._buf | ||
71 | self._buf = None | ||
72 | return retval | ||
73 | else: | ||
74 | return self._iterable.next() | ||
75 | |||
76 | ### | ||
77 | ### SCRIPT HANDLING | ||
78 | ### | ||
79 | class Script(KickstartObject): | ||
80 | """A class representing a single kickstart script. If functionality beyond | ||
81 | just a data representation is needed (for example, a run method in | ||
82 | anaconda), Script may be subclassed. Although a run method is not | ||
83 | provided, most of the attributes of Script have to do with running the | ||
84 | script. Instances of Script are held in a list by the Version object. | ||
85 | """ | ||
86 | def __init__(self, script, *args , **kwargs): | ||
87 | """Create a new Script instance. Instance attributes: | ||
88 | |||
89 | errorOnFail -- If execution of the script fails, should anaconda | ||
90 | stop, display an error, and then reboot without | ||
91 | running any other scripts? | ||
92 | inChroot -- Does the script execute in anaconda's chroot | ||
93 | environment or not? | ||
94 | interp -- The program that should be used to interpret this | ||
95 | script. | ||
96 | lineno -- The line number this script starts on. | ||
97 | logfile -- Where all messages from the script should be logged. | ||
98 | script -- A string containing all the lines of the script. | ||
99 | type -- The type of the script, which can be KS_SCRIPT_* from | ||
100 | pykickstart.constants. | ||
101 | """ | ||
102 | KickstartObject.__init__(self, *args, **kwargs) | ||
103 | self.script = "".join(script) | ||
104 | |||
105 | self.interp = kwargs.get("interp", "/bin/sh") | ||
106 | self.inChroot = kwargs.get("inChroot", False) | ||
107 | self.lineno = kwargs.get("lineno", None) | ||
108 | self.logfile = kwargs.get("logfile", None) | ||
109 | self.errorOnFail = kwargs.get("errorOnFail", False) | ||
110 | self.type = kwargs.get("type", constants.KS_SCRIPT_PRE) | ||
111 | |||
112 | def __str__(self): | ||
113 | """Return a string formatted for output to a kickstart file.""" | ||
114 | retval = "" | ||
115 | |||
116 | if self.type == constants.KS_SCRIPT_PRE: | ||
117 | retval += '\n%pre' | ||
118 | elif self.type == constants.KS_SCRIPT_POST: | ||
119 | retval += '\n%post' | ||
120 | elif self.type == constants.KS_SCRIPT_TRACEBACK: | ||
121 | retval += '\n%traceback' | ||
122 | |||
123 | if self.interp != "/bin/sh" and self.interp != "": | ||
124 | retval += " --interpreter=%s" % self.interp | ||
125 | if self.type == constants.KS_SCRIPT_POST and not self.inChroot: | ||
126 | retval += " --nochroot" | ||
127 | if self.logfile != None: | ||
128 | retval += " --logfile %s" % self.logfile | ||
129 | if self.errorOnFail: | ||
130 | retval += " --erroronfail" | ||
131 | |||
132 | if self.script.endswith("\n"): | ||
133 | if ver >= version.F8: | ||
134 | return retval + "\n%s%%end\n" % self.script | ||
135 | else: | ||
136 | return retval + "\n%s\n" % self.script | ||
137 | else: | ||
138 | if ver >= version.F8: | ||
139 | return retval + "\n%s\n%%end\n" % self.script | ||
140 | else: | ||
141 | return retval + "\n%s\n" % self.script | ||
142 | |||
143 | |||
144 | ## | ||
145 | ## PACKAGE HANDLING | ||
146 | ## | ||
147 | class Group: | ||
148 | """A class representing a single group in the %packages section.""" | ||
149 | def __init__(self, name="", include=constants.GROUP_DEFAULT): | ||
150 | """Create a new Group instance. Instance attributes: | ||
151 | |||
152 | name -- The group's identifier | ||
153 | include -- The level of how much of the group should be included. | ||
154 | Values can be GROUP_* from pykickstart.constants. | ||
155 | """ | ||
156 | self.name = name | ||
157 | self.include = include | ||
158 | |||
159 | def __str__(self): | ||
160 | """Return a string formatted for output to a kickstart file.""" | ||
161 | if self.include == constants.GROUP_REQUIRED: | ||
162 | return "@%s --nodefaults" % self.name | ||
163 | elif self.include == constants.GROUP_ALL: | ||
164 | return "@%s --optional" % self.name | ||
165 | else: | ||
166 | return "@%s" % self.name | ||
167 | |||
168 | def __cmp__(self, other): | ||
169 | if self.name < other.name: | ||
170 | return -1 | ||
171 | elif self.name > other.name: | ||
172 | return 1 | ||
173 | return 0 | ||
174 | |||
175 | class Packages(KickstartObject): | ||
176 | """A class representing the %packages section of the kickstart file.""" | ||
177 | def __init__(self, *args, **kwargs): | ||
178 | """Create a new Packages instance. Instance attributes: | ||
179 | |||
180 | addBase -- Should the Base group be installed even if it is | ||
181 | not specified? | ||
182 | default -- Should the default package set be selected? | ||
183 | excludedList -- A list of all the packages marked for exclusion in | ||
184 | the %packages section, without the leading minus | ||
185 | symbol. | ||
186 | excludeDocs -- Should documentation in each package be excluded? | ||
187 | groupList -- A list of Group objects representing all the groups | ||
188 | specified in the %packages section. Names will be | ||
189 | stripped of the leading @ symbol. | ||
190 | excludedGroupList -- A list of Group objects representing all the | ||
191 | groups specified for removal in the %packages | ||
192 | section. Names will be stripped of the leading | ||
193 | -@ symbols. | ||
194 | handleMissing -- If unknown packages are specified in the %packages | ||
195 | section, should it be ignored or not? Values can | ||
196 | be KS_MISSING_* from pykickstart.constants. | ||
197 | packageList -- A list of all the packages specified in the | ||
198 | %packages section. | ||
199 | instLangs -- A list of languages to install. | ||
200 | """ | ||
201 | KickstartObject.__init__(self, *args, **kwargs) | ||
202 | |||
203 | self.addBase = True | ||
204 | self.default = False | ||
205 | self.excludedList = [] | ||
206 | self.excludedGroupList = [] | ||
207 | self.excludeDocs = False | ||
208 | self.groupList = [] | ||
209 | self.handleMissing = constants.KS_MISSING_PROMPT | ||
210 | self.packageList = [] | ||
211 | self.instLangs = None | ||
212 | |||
213 | def __str__(self): | ||
214 | """Return a string formatted for output to a kickstart file.""" | ||
215 | pkgs = "" | ||
216 | |||
217 | if not self.default: | ||
218 | grps = self.groupList | ||
219 | grps.sort() | ||
220 | for grp in grps: | ||
221 | pkgs += "%s\n" % grp.__str__() | ||
222 | |||
223 | p = self.packageList | ||
224 | p.sort() | ||
225 | for pkg in p: | ||
226 | pkgs += "%s\n" % pkg | ||
227 | |||
228 | grps = self.excludedGroupList | ||
229 | grps.sort() | ||
230 | for grp in grps: | ||
231 | pkgs += "-%s\n" % grp.__str__() | ||
232 | |||
233 | p = self.excludedList | ||
234 | p.sort() | ||
235 | for pkg in p: | ||
236 | pkgs += "-%s\n" % pkg | ||
237 | |||
238 | if pkgs == "": | ||
239 | return "" | ||
240 | |||
241 | retval = "\n%packages" | ||
242 | |||
243 | if self.default: | ||
244 | retval += " --default" | ||
245 | if self.excludeDocs: | ||
246 | retval += " --excludedocs" | ||
247 | if not self.addBase: | ||
248 | retval += " --nobase" | ||
249 | if self.handleMissing == constants.KS_MISSING_IGNORE: | ||
250 | retval += " --ignoremissing" | ||
251 | if self.instLangs: | ||
252 | retval += " --instLangs=%s" % self.instLangs | ||
253 | |||
254 | if ver >= version.F8: | ||
255 | return retval + "\n" + pkgs + "\n%end\n" | ||
256 | else: | ||
257 | return retval + "\n" + pkgs + "\n" | ||
258 | |||
259 | def _processGroup (self, line): | ||
260 | op = OptionParser() | ||
261 | op.add_option("--nodefaults", action="store_true", default=False) | ||
262 | op.add_option("--optional", action="store_true", default=False) | ||
263 | |||
264 | (opts, extra) = op.parse_args(args=line.split()) | ||
265 | |||
266 | if opts.nodefaults and opts.optional: | ||
267 | raise KickstartValueError, _("Group cannot specify both --nodefaults and --optional") | ||
268 | |||
269 | # If the group name has spaces in it, we have to put it back together | ||
270 | # now. | ||
271 | grp = " ".join(extra) | ||
272 | |||
273 | if opts.nodefaults: | ||
274 | self.groupList.append(Group(name=grp, include=constants.GROUP_REQUIRED)) | ||
275 | elif opts.optional: | ||
276 | self.groupList.append(Group(name=grp, include=constants.GROUP_ALL)) | ||
277 | else: | ||
278 | self.groupList.append(Group(name=grp, include=constants.GROUP_DEFAULT)) | ||
279 | |||
280 | def add (self, pkgList): | ||
281 | """Given a list of lines from the input file, strip off any leading | ||
282 | symbols and add the result to the appropriate list. | ||
283 | """ | ||
284 | existingExcludedSet = set(self.excludedList) | ||
285 | existingPackageSet = set(self.packageList) | ||
286 | newExcludedSet = set() | ||
287 | newPackageSet = set() | ||
288 | |||
289 | excludedGroupList = [] | ||
290 | |||
291 | for pkg in pkgList: | ||
292 | stripped = pkg.strip() | ||
293 | |||
294 | if stripped[0] == "@": | ||
295 | self._processGroup(stripped[1:]) | ||
296 | elif stripped[0] == "-": | ||
297 | if stripped[1] == "@": | ||
298 | excludedGroupList.append(Group(name=stripped[2:])) | ||
299 | else: | ||
300 | newExcludedSet.add(stripped[1:]) | ||
301 | else: | ||
302 | newPackageSet.add(stripped) | ||
303 | |||
304 | # Groups have to be excluded in two different ways (note: can't use | ||
305 | # sets here because we have to store objects): | ||
306 | excludedGroupNames = map(lambda g: g.name, excludedGroupList) | ||
307 | |||
308 | # First, an excluded group may be cancelling out a previously given | ||
309 | # one. This is often the case when using %include. So there we should | ||
310 | # just remove the group from the list. | ||
311 | self.groupList = filter(lambda g: g.name not in excludedGroupNames, self.groupList) | ||
312 | |||
313 | # Second, the package list could have included globs which are not | ||
314 | # processed by pykickstart. In that case we need to preserve a list of | ||
315 | # excluded groups so whatever tool doing package/group installation can | ||
316 | # take appropriate action. | ||
317 | self.excludedGroupList.extend(excludedGroupList) | ||
318 | |||
319 | existingPackageSet = (existingPackageSet - newExcludedSet) | newPackageSet | ||
320 | existingExcludedSet = (existingExcludedSet - existingPackageSet) | newExcludedSet | ||
321 | |||
322 | self.packageList = list(existingPackageSet) | ||
323 | self.excludedList = list(existingExcludedSet) | ||
324 | |||
325 | |||
326 | ### | ||
327 | ### PARSER | ||
328 | ### | ||
329 | class KickstartParser: | ||
330 | """The kickstart file parser class as represented by a basic state | ||
331 | machine. To create a specialized parser, make a subclass and override | ||
332 | any of the methods you care about. Methods that don't need to do | ||
333 | anything may just pass. However, _stateMachine should never be | ||
334 | overridden. | ||
335 | """ | ||
336 | def __init__ (self, handler, followIncludes=True, errorsAreFatal=True, | ||
337 | missingIncludeIsFatal=True): | ||
338 | """Create a new KickstartParser instance. Instance attributes: | ||
339 | |||
340 | errorsAreFatal -- Should errors cause processing to halt, or | ||
341 | just print a message to the screen? This | ||
342 | is most useful for writing syntax checkers | ||
343 | that may want to continue after an error is | ||
344 | encountered. | ||
345 | followIncludes -- If %include is seen, should the included | ||
346 | file be checked as well or skipped? | ||
347 | handler -- An instance of a BaseHandler subclass. If | ||
348 | None, the input file will still be parsed | ||
349 | but no data will be saved and no commands | ||
350 | will be executed. | ||
351 | missingIncludeIsFatal -- Should missing include files be fatal, even | ||
352 | if errorsAreFatal is False? | ||
353 | """ | ||
354 | self.errorsAreFatal = errorsAreFatal | ||
355 | self.followIncludes = followIncludes | ||
356 | self.handler = handler | ||
357 | self.currentdir = {} | ||
358 | self.missingIncludeIsFatal = missingIncludeIsFatal | ||
359 | |||
360 | self._state = STATE_COMMANDS | ||
361 | self._includeDepth = 0 | ||
362 | self._line = "" | ||
363 | |||
364 | self.version = self.handler.version | ||
365 | |||
366 | global ver | ||
367 | ver = self.version | ||
368 | |||
369 | self._sections = {} | ||
370 | self.setupSections() | ||
371 | |||
372 | def _reset(self): | ||
373 | """Reset the internal variables of the state machine for a new kickstart file.""" | ||
374 | self._state = STATE_COMMANDS | ||
375 | self._includeDepth = 0 | ||
376 | |||
377 | def getSection(self, s): | ||
378 | """Return a reference to the requested section (s must start with '%'s), | ||
379 | or raise KeyError if not found. | ||
380 | """ | ||
381 | return self._sections[s] | ||
382 | |||
383 | def handleCommand (self, lineno, args): | ||
384 | """Given the list of command and arguments, call the Version's | ||
385 | dispatcher method to handle the command. Returns the command or | ||
386 | data object returned by the dispatcher. This method may be | ||
387 | overridden in a subclass if necessary. | ||
388 | """ | ||
389 | if self.handler: | ||
390 | self.handler.currentCmd = args[0] | ||
391 | self.handler.currentLine = self._line | ||
392 | retval = self.handler.dispatcher(args, lineno) | ||
393 | |||
394 | return retval | ||
395 | |||
396 | def registerSection(self, obj): | ||
397 | """Given an instance of a Section subclass, register the new section | ||
398 | with the parser. Calling this method means the parser will | ||
399 | recognize your new section and dispatch into the given object to | ||
400 | handle it. | ||
401 | """ | ||
402 | if not obj.sectionOpen: | ||
403 | raise TypeError, "no sectionOpen given for section %s" % obj | ||
404 | |||
405 | if not obj.sectionOpen.startswith("%"): | ||
406 | raise TypeError, "section %s tag does not start with a %%" % obj.sectionOpen | ||
407 | |||
408 | self._sections[obj.sectionOpen] = obj | ||
409 | |||
410 | def _finalize(self, obj): | ||
411 | """Called at the close of a kickstart section to take any required | ||
412 | actions. Internally, this is used to add scripts once we have the | ||
413 | whole body read. | ||
414 | """ | ||
415 | obj.finalize() | ||
416 | self._state = STATE_COMMANDS | ||
417 | |||
418 | def _handleSpecialComments(self, line): | ||
419 | """Kickstart recognizes a couple special comments.""" | ||
420 | if self._state != STATE_COMMANDS: | ||
421 | return | ||
422 | |||
423 | # Save the platform for s-c-kickstart. | ||
424 | if line[:10] == "#platform=": | ||
425 | self.handler.platform = self._line[11:] | ||
426 | |||
427 | def _readSection(self, lineIter, lineno): | ||
428 | obj = self._sections[self._state] | ||
429 | |||
430 | while True: | ||
431 | try: | ||
432 | line = lineIter.next() | ||
433 | if line == "": | ||
434 | # This section ends at the end of the file. | ||
435 | if self.version >= version.F8: | ||
436 | raise KickstartParseError, formatErrorMsg(lineno, msg=_("Section does not end with %%end.")) | ||
437 | |||
438 | self._finalize(obj) | ||
439 | except StopIteration: | ||
440 | break | ||
441 | |||
442 | lineno += 1 | ||
443 | |||
444 | # Throw away blank lines and comments, unless the section wants all | ||
445 | # lines. | ||
446 | if self._isBlankOrComment(line) and not obj.allLines: | ||
447 | continue | ||
448 | |||
449 | if line.startswith("%"): | ||
450 | args = shlex.split(line) | ||
451 | |||
452 | if args and args[0] == "%end": | ||
453 | # This is a properly terminated section. | ||
454 | self._finalize(obj) | ||
455 | break | ||
456 | elif args and args[0] == "%ksappend": | ||
457 | continue | ||
458 | elif args and (self._validState(args[0]) or args[0] in ["%include", "%ksappend"]): | ||
459 | # This is an unterminated section. | ||
460 | if self.version >= version.F8: | ||
461 | raise KickstartParseError, formatErrorMsg(lineno, msg=_("Section does not end with %%end.")) | ||
462 | |||
463 | # Finish up. We do not process the header here because | ||
464 | # kicking back out to STATE_COMMANDS will ensure that happens. | ||
465 | lineIter.put(line) | ||
466 | lineno -= 1 | ||
467 | self._finalize(obj) | ||
468 | break | ||
469 | else: | ||
470 | # This is just a line within a section. Pass it off to whatever | ||
471 | # section handles it. | ||
472 | obj.handleLine(line) | ||
473 | |||
474 | return lineno | ||
475 | |||
476 | def _validState(self, st): | ||
477 | """Is the given section tag one that has been registered with the parser?""" | ||
478 | return st in self._sections.keys() | ||
479 | |||
480 | def _tryFunc(self, fn): | ||
481 | """Call the provided function (which doesn't take any arguments) and | ||
482 | do the appropriate error handling. If errorsAreFatal is False, this | ||
483 | function will just print the exception and keep going. | ||
484 | """ | ||
485 | try: | ||
486 | fn() | ||
487 | except Exception, msg: | ||
488 | if self.errorsAreFatal: | ||
489 | raise | ||
490 | else: | ||
491 | print msg | ||
492 | |||
493 | def _isBlankOrComment(self, line): | ||
494 | return line.isspace() or line == "" or line.lstrip()[0] == '#' | ||
495 | |||
496 | def _stateMachine(self, lineIter): | ||
497 | # For error reporting. | ||
498 | lineno = 0 | ||
499 | |||
500 | while True: | ||
501 | # Get the next line out of the file, quitting if this is the last line. | ||
502 | try: | ||
503 | self._line = lineIter.next() | ||
504 | if self._line == "": | ||
505 | break | ||
506 | except StopIteration: | ||
507 | break | ||
508 | |||
509 | lineno += 1 | ||
510 | |||
511 | # Eliminate blank lines, whitespace-only lines, and comments. | ||
512 | if self._isBlankOrComment(self._line): | ||
513 | self._handleSpecialComments(self._line) | ||
514 | continue | ||
515 | |||
516 | # Remove any end-of-line comments. | ||
517 | sanitized = self._line.split("#")[0] | ||
518 | |||
519 | # Then split the line. | ||
520 | args = shlex.split(sanitized.rstrip()) | ||
521 | |||
522 | if args[0] == "%include": | ||
523 | # This case comes up primarily in ksvalidator. | ||
524 | if not self.followIncludes: | ||
525 | continue | ||
526 | |||
527 | if len(args) == 1 or not args[1]: | ||
528 | raise KickstartParseError, formatErrorMsg(lineno) | ||
529 | |||
530 | self._includeDepth += 1 | ||
531 | |||
532 | try: | ||
533 | self.readKickstart(args[1], reset=False) | ||
534 | except KickstartError: | ||
535 | # Handle the include file being provided over the | ||
536 | # network in a %pre script. This case comes up in the | ||
537 | # early parsing in anaconda. | ||
538 | if self.missingIncludeIsFatal: | ||
539 | raise | ||
540 | |||
541 | self._includeDepth -= 1 | ||
542 | continue | ||
543 | |||
544 | # Now on to the main event. | ||
545 | if self._state == STATE_COMMANDS: | ||
546 | if args[0] == "%ksappend": | ||
547 | # This is handled by the preprocess* functions, so continue. | ||
548 | continue | ||
549 | elif args[0][0] == '%': | ||
550 | # This is the beginning of a new section. Handle its header | ||
551 | # here. | ||
552 | newSection = args[0] | ||
553 | if not self._validState(newSection): | ||
554 | raise KickstartParseError, formatErrorMsg(lineno, msg=_("Unknown kickstart section: %s" % newSection)) | ||
555 | |||
556 | self._state = newSection | ||
557 | obj = self._sections[self._state] | ||
558 | self._tryFunc(lambda: obj.handleHeader(lineno, args)) | ||
559 | |||
560 | # This will handle all section processing, kicking us back | ||
561 | # out to STATE_COMMANDS at the end with the current line | ||
562 | # being the next section header, etc. | ||
563 | lineno = self._readSection(lineIter, lineno) | ||
564 | else: | ||
565 | # This is a command in the command section. Dispatch to it. | ||
566 | self._tryFunc(lambda: self.handleCommand(lineno, args)) | ||
567 | elif self._state == STATE_END: | ||
568 | break | ||
569 | |||
570 | def readKickstartFromString (self, s, reset=True): | ||
571 | """Process a kickstart file, provided as the string str.""" | ||
572 | if reset: | ||
573 | self._reset() | ||
574 | |||
575 | # Add a "" to the end of the list so the string reader acts like the | ||
576 | # file reader and we only get StopIteration when we're after the final | ||
577 | # line of input. | ||
578 | i = PutBackIterator(s.splitlines(True) + [""]) | ||
579 | self._stateMachine (i) | ||
580 | |||
581 | def readKickstart(self, f, reset=True): | ||
582 | """Process a kickstart file, given by the filename f.""" | ||
583 | if reset: | ||
584 | self._reset() | ||
585 | |||
586 | # an %include might not specify a full path. if we don't try to figure | ||
587 | # out what the path should have been, then we're unable to find it | ||
588 | # requiring full path specification, though, sucks. so let's make | ||
589 | # the reading "smart" by keeping track of what the path is at each | ||
590 | # include depth. | ||
591 | if not os.path.exists(f): | ||
592 | if self.currentdir.has_key(self._includeDepth - 1): | ||
593 | if os.path.exists(os.path.join(self.currentdir[self._includeDepth - 1], f)): | ||
594 | f = os.path.join(self.currentdir[self._includeDepth - 1], f) | ||
595 | |||
596 | cd = os.path.dirname(f) | ||
597 | if not cd.startswith("/"): | ||
598 | cd = os.path.abspath(cd) | ||
599 | self.currentdir[self._includeDepth] = cd | ||
600 | |||
601 | try: | ||
602 | s = file(f).read() | ||
603 | except IOError, e: | ||
604 | raise KickstartError, formatErrorMsg(0, msg=_("Unable to open input kickstart file: %s") % e.strerror) | ||
605 | |||
606 | self.readKickstartFromString(s, reset=False) | ||
607 | |||
608 | def setupSections(self): | ||
609 | """Install the sections all kickstart files support. You may override | ||
610 | this method in a subclass, but should avoid doing so unless you know | ||
611 | what you're doing. | ||
612 | """ | ||
613 | self._sections = {} | ||
614 | |||
615 | # Install the sections all kickstart files support. | ||
616 | self.registerSection(PreScriptSection(self.handler, dataObj=Script)) | ||
617 | self.registerSection(PostScriptSection(self.handler, dataObj=Script)) | ||
618 | self.registerSection(TracebackScriptSection(self.handler, dataObj=Script)) | ||
619 | self.registerSection(PackageSection(self.handler)) | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/sections.py b/scripts/lib/wic/3rdparty/pykickstart/sections.py new file mode 100644 index 0000000000..44df856b8d --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/sections.py | |||
@@ -0,0 +1,244 @@ | |||
1 | # | ||
2 | # sections.py: Kickstart file sections. | ||
3 | # | ||
4 | # Chris Lumens <clumens@redhat.com> | ||
5 | # | ||
6 | # Copyright 2011 Red Hat, Inc. | ||
7 | # | ||
8 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
9 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
10 | # General Public License v.2. This program is distributed in the hope that it | ||
11 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
12 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | # See the GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along with | ||
16 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
17 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
18 | # trademarks that are incorporated in the source code or documentation are not | ||
19 | # subject to the GNU General Public License and may only be used or replicated | ||
20 | # with the express permission of Red Hat, Inc. | ||
21 | # | ||
22 | """ | ||
23 | This module exports the classes that define a section of a kickstart file. A | ||
24 | section is a chunk of the file starting with a %tag and ending with a %end. | ||
25 | Examples of sections include %packages, %pre, and %post. | ||
26 | |||
27 | You may use this module to define your own custom sections which will be | ||
28 | treated just the same as a predefined one by the kickstart parser. All that | ||
29 | is necessary is to create a new subclass of Section and call | ||
30 | parser.registerSection with an instance of your new class. | ||
31 | """ | ||
32 | from constants import * | ||
33 | from options import KSOptionParser | ||
34 | from version import * | ||
35 | |||
36 | class Section(object): | ||
37 | """The base class for defining kickstart sections. You are free to | ||
38 | subclass this as appropriate. | ||
39 | |||
40 | Class attributes: | ||
41 | |||
42 | allLines -- Does this section require the parser to call handleLine | ||
43 | for every line in the section, even blanks and comments? | ||
44 | sectionOpen -- The string that denotes the start of this section. You | ||
45 | must start your tag with a percent sign. | ||
46 | timesSeen -- This attribute is for informational purposes only. It is | ||
47 | incremented every time handleHeader is called to keep | ||
48 | track of the number of times a section of this type is | ||
49 | seen. | ||
50 | """ | ||
51 | allLines = False | ||
52 | sectionOpen = "" | ||
53 | timesSeen = 0 | ||
54 | |||
55 | def __init__(self, handler, **kwargs): | ||
56 | """Create a new Script instance. At the least, you must pass in an | ||
57 | instance of a baseHandler subclass. | ||
58 | |||
59 | Valid kwargs: | ||
60 | |||
61 | dataObj -- | ||
62 | """ | ||
63 | self.handler = handler | ||
64 | |||
65 | self.version = self.handler.version | ||
66 | |||
67 | self.dataObj = kwargs.get("dataObj", None) | ||
68 | |||
69 | def finalize(self): | ||
70 | """This method is called when the %end tag for a section is seen. It | ||
71 | is not required to be provided. | ||
72 | """ | ||
73 | pass | ||
74 | |||
75 | def handleLine(self, line): | ||
76 | """This method is called for every line of a section. Take whatever | ||
77 | action is appropriate. While this method is not required to be | ||
78 | provided, not providing it does not make a whole lot of sense. | ||
79 | |||
80 | Arguments: | ||
81 | |||
82 | line -- The complete line, with any trailing newline. | ||
83 | """ | ||
84 | pass | ||
85 | |||
86 | def handleHeader(self, lineno, args): | ||
87 | """This method is called when the opening tag for a section is seen. | ||
88 | Not all sections will need this method, though all provided with | ||
89 | kickstart include one. | ||
90 | |||
91 | Arguments: | ||
92 | |||
93 | args -- A list of all strings passed as arguments to the section | ||
94 | opening tag. | ||
95 | """ | ||
96 | self.timesSeen += 1 | ||
97 | |||
98 | class NullSection(Section): | ||
99 | """This defines a section that pykickstart will recognize but do nothing | ||
100 | with. If the parser runs across a %section that has no object registered, | ||
101 | it will raise an error. Sometimes, you may want to simply ignore those | ||
102 | sections instead. This class is useful for that purpose. | ||
103 | """ | ||
104 | def __init__(self, *args, **kwargs): | ||
105 | """Create a new NullSection instance. You must pass a sectionOpen | ||
106 | parameter (including a leading '%') for the section you wish to | ||
107 | ignore. | ||
108 | """ | ||
109 | Section.__init__(self, *args, **kwargs) | ||
110 | self.sectionOpen = kwargs.get("sectionOpen") | ||
111 | |||
112 | class ScriptSection(Section): | ||
113 | allLines = True | ||
114 | |||
115 | def __init__(self, *args, **kwargs): | ||
116 | Section.__init__(self, *args, **kwargs) | ||
117 | self._script = {} | ||
118 | self._resetScript() | ||
119 | |||
120 | def _getParser(self): | ||
121 | op = KSOptionParser(self.version) | ||
122 | op.add_option("--erroronfail", dest="errorOnFail", action="store_true", | ||
123 | default=False) | ||
124 | op.add_option("--interpreter", dest="interpreter", default="/bin/sh") | ||
125 | op.add_option("--log", "--logfile", dest="log") | ||
126 | return op | ||
127 | |||
128 | def _resetScript(self): | ||
129 | self._script = {"interp": "/bin/sh", "log": None, "errorOnFail": False, | ||
130 | "lineno": None, "chroot": False, "body": []} | ||
131 | |||
132 | def handleLine(self, line): | ||
133 | self._script["body"].append(line) | ||
134 | |||
135 | def finalize(self): | ||
136 | if " ".join(self._script["body"]).strip() == "": | ||
137 | return | ||
138 | |||
139 | kwargs = {"interp": self._script["interp"], | ||
140 | "inChroot": self._script["chroot"], | ||
141 | "lineno": self._script["lineno"], | ||
142 | "logfile": self._script["log"], | ||
143 | "errorOnFail": self._script["errorOnFail"], | ||
144 | "type": self._script["type"]} | ||
145 | |||
146 | s = self.dataObj (self._script["body"], **kwargs) | ||
147 | self._resetScript() | ||
148 | |||
149 | if self.handler: | ||
150 | self.handler.scripts.append(s) | ||
151 | |||
152 | def handleHeader(self, lineno, args): | ||
153 | """Process the arguments to a %pre/%post/%traceback header for later | ||
154 | setting on a Script instance once the end of the script is found. | ||
155 | This method may be overridden in a subclass if necessary. | ||
156 | """ | ||
157 | Section.handleHeader(self, lineno, args) | ||
158 | op = self._getParser() | ||
159 | |||
160 | (opts, extra) = op.parse_args(args=args[1:], lineno=lineno) | ||
161 | |||
162 | self._script["interp"] = opts.interpreter | ||
163 | self._script["lineno"] = lineno | ||
164 | self._script["log"] = opts.log | ||
165 | self._script["errorOnFail"] = opts.errorOnFail | ||
166 | if hasattr(opts, "nochroot"): | ||
167 | self._script["chroot"] = not opts.nochroot | ||
168 | |||
169 | class PreScriptSection(ScriptSection): | ||
170 | sectionOpen = "%pre" | ||
171 | |||
172 | def _resetScript(self): | ||
173 | ScriptSection._resetScript(self) | ||
174 | self._script["type"] = KS_SCRIPT_PRE | ||
175 | |||
176 | class PostScriptSection(ScriptSection): | ||
177 | sectionOpen = "%post" | ||
178 | |||
179 | def _getParser(self): | ||
180 | op = ScriptSection._getParser(self) | ||
181 | op.add_option("--nochroot", dest="nochroot", action="store_true", | ||
182 | default=False) | ||
183 | return op | ||
184 | |||
185 | def _resetScript(self): | ||
186 | ScriptSection._resetScript(self) | ||
187 | self._script["chroot"] = True | ||
188 | self._script["type"] = KS_SCRIPT_POST | ||
189 | |||
190 | class TracebackScriptSection(ScriptSection): | ||
191 | sectionOpen = "%traceback" | ||
192 | |||
193 | def _resetScript(self): | ||
194 | ScriptSection._resetScript(self) | ||
195 | self._script["type"] = KS_SCRIPT_TRACEBACK | ||
196 | |||
197 | class PackageSection(Section): | ||
198 | sectionOpen = "%packages" | ||
199 | |||
200 | def handleLine(self, line): | ||
201 | if not self.handler: | ||
202 | return | ||
203 | |||
204 | (h, s, t) = line.partition('#') | ||
205 | line = h.rstrip() | ||
206 | |||
207 | self.handler.packages.add([line]) | ||
208 | |||
209 | def handleHeader(self, lineno, args): | ||
210 | """Process the arguments to the %packages header and set attributes | ||
211 | on the Version's Packages instance appropriate. This method may be | ||
212 | overridden in a subclass if necessary. | ||
213 | """ | ||
214 | Section.handleHeader(self, lineno, args) | ||
215 | op = KSOptionParser(version=self.version) | ||
216 | op.add_option("--excludedocs", dest="excludedocs", action="store_true", | ||
217 | default=False) | ||
218 | op.add_option("--ignoremissing", dest="ignoremissing", | ||
219 | action="store_true", default=False) | ||
220 | op.add_option("--nobase", dest="nobase", action="store_true", | ||
221 | default=False) | ||
222 | op.add_option("--ignoredeps", dest="resolveDeps", action="store_false", | ||
223 | deprecated=FC4, removed=F9) | ||
224 | op.add_option("--resolvedeps", dest="resolveDeps", action="store_true", | ||
225 | deprecated=FC4, removed=F9) | ||
226 | op.add_option("--default", dest="defaultPackages", action="store_true", | ||
227 | default=False, introduced=F7) | ||
228 | op.add_option("--instLangs", dest="instLangs", type="string", | ||
229 | default="", introduced=F9) | ||
230 | |||
231 | (opts, extra) = op.parse_args(args=args[1:], lineno=lineno) | ||
232 | |||
233 | self.handler.packages.excludeDocs = opts.excludedocs | ||
234 | self.handler.packages.addBase = not opts.nobase | ||
235 | if opts.ignoremissing: | ||
236 | self.handler.packages.handleMissing = KS_MISSING_IGNORE | ||
237 | else: | ||
238 | self.handler.packages.handleMissing = KS_MISSING_PROMPT | ||
239 | |||
240 | if opts.defaultPackages: | ||
241 | self.handler.packages.default = True | ||
242 | |||
243 | if opts.instLangs: | ||
244 | self.handler.packages.instLangs = opts.instLangs | ||
diff --git a/scripts/lib/wic/3rdparty/pykickstart/version.py b/scripts/lib/wic/3rdparty/pykickstart/version.py new file mode 100644 index 0000000000..8a8e6aad22 --- /dev/null +++ b/scripts/lib/wic/3rdparty/pykickstart/version.py | |||
@@ -0,0 +1,168 @@ | |||
1 | # | ||
2 | # Chris Lumens <clumens@redhat.com> | ||
3 | # | ||
4 | # Copyright 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. | ||
5 | # | ||
6 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
7 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
8 | # General Public License v.2. This program is distributed in the hope that it | ||
9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
11 | # See the GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along with | ||
14 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
15 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat | ||
16 | # trademarks that are incorporated in the source code or documentation are not | ||
17 | # subject to the GNU General Public License and may only be used or replicated | ||
18 | # with the express permission of Red Hat, Inc. | ||
19 | # | ||
20 | """ | ||
21 | Methods for working with kickstart versions. | ||
22 | |||
23 | This module defines several symbolic constants that specify kickstart syntax | ||
24 | versions. Each version corresponds roughly to one release of Red Hat Linux, | ||
25 | Red Hat Enterprise Linux, or Fedora Core as these are where most syntax | ||
26 | changes take place. | ||
27 | |||
28 | This module also exports several functions: | ||
29 | |||
30 | makeVersion - Given a version number, return an instance of the | ||
31 | matching handler class. | ||
32 | |||
33 | returnClassForVersion - Given a version number, return the matching | ||
34 | handler class. This does not return an | ||
35 | instance of that class, however. | ||
36 | |||
37 | stringToVersion - Convert a string representation of a version number | ||
38 | into the symbolic constant. | ||
39 | |||
40 | versionToString - Perform the reverse mapping. | ||
41 | |||
42 | versionFromFile - Read a kickstart file and determine the version of | ||
43 | syntax it uses. This requires the kickstart file to | ||
44 | have a version= comment in it. | ||
45 | """ | ||
46 | import imputil, re, sys | ||
47 | |||
48 | import gettext | ||
49 | _ = lambda x: gettext.ldgettext("pykickstart", x) | ||
50 | |||
51 | from pykickstart.errors import KickstartVersionError | ||
52 | |||
53 | # Symbolic names for internal version numbers. | ||
54 | RHEL3 = 900 | ||
55 | FC3 = 1000 | ||
56 | RHEL4 = 1100 | ||
57 | FC4 = 2000 | ||
58 | FC5 = 3000 | ||
59 | FC6 = 4000 | ||
60 | RHEL5 = 4100 | ||
61 | F7 = 5000 | ||
62 | F8 = 6000 | ||
63 | F9 = 7000 | ||
64 | F10 = 8000 | ||
65 | F11 = 9000 | ||
66 | F12 = 10000 | ||
67 | F13 = 11000 | ||
68 | RHEL6 = 11100 | ||
69 | F14 = 12000 | ||
70 | F15 = 13000 | ||
71 | F16 = 14000 | ||
72 | |||
73 | # This always points at the latest version and is the default. | ||
74 | DEVEL = F16 | ||
75 | |||
76 | # A one-to-one mapping from string representations to version numbers. | ||
77 | versionMap = { | ||
78 | "DEVEL": DEVEL, | ||
79 | "FC3": FC3, "FC4": FC4, "FC5": FC5, "FC6": FC6, "F7": F7, "F8": F8, | ||
80 | "F9": F9, "F10": F10, "F11": F11, "F12": F12, "F13": F13, | ||
81 | "F14": F14, "F15": F15, "F16": F16, | ||
82 | "RHEL3": RHEL3, "RHEL4": RHEL4, "RHEL5": RHEL5, "RHEL6": RHEL6 | ||
83 | } | ||
84 | |||
85 | def stringToVersion(s): | ||
86 | """Convert string into one of the provided version constants. Raises | ||
87 | KickstartVersionError if string does not match anything. | ||
88 | """ | ||
89 | # First try these short forms. | ||
90 | try: | ||
91 | return versionMap[s.upper()] | ||
92 | except KeyError: | ||
93 | pass | ||
94 | |||
95 | # Now try the Fedora versions. | ||
96 | m = re.match("^fedora.* (\d+)$", s, re.I) | ||
97 | |||
98 | if m and m.group(1): | ||
99 | if versionMap.has_key("FC" + m.group(1)): | ||
100 | return versionMap["FC" + m.group(1)] | ||
101 | elif versionMap.has_key("F" + m.group(1)): | ||
102 | return versionMap["F" + m.group(1)] | ||
103 | else: | ||
104 | raise KickstartVersionError(_("Unsupported version specified: %s") % s) | ||
105 | |||
106 | # Now try the RHEL versions. | ||
107 | m = re.match("^red hat enterprise linux.* (\d+)([\.\d]*)$", s, re.I) | ||
108 | |||
109 | if m and m.group(1): | ||
110 | if versionMap.has_key("RHEL" + m.group(1)): | ||
111 | return versionMap["RHEL" + m.group(1)] | ||
112 | else: | ||
113 | raise KickstartVersionError(_("Unsupported version specified: %s") % s) | ||
114 | |||
115 | # If nothing else worked, we're out of options. | ||
116 | raise KickstartVersionError(_("Unsupported version specified: %s") % s) | ||
117 | |||
118 | def versionToString(version, skipDevel=False): | ||
119 | """Convert version into a string representation of the version number. | ||
120 | This is the reverse operation of stringToVersion. Raises | ||
121 | KickstartVersionError if version does not match anything. | ||
122 | """ | ||
123 | if not skipDevel and version == versionMap["DEVEL"]: | ||
124 | return "DEVEL" | ||
125 | |||
126 | for (key, val) in versionMap.iteritems(): | ||
127 | if key == "DEVEL": | ||
128 | continue | ||
129 | elif val == version: | ||
130 | return key | ||
131 | |||
132 | raise KickstartVersionError(_("Unsupported version specified: %s") % version) | ||
133 | |||
134 | def returnClassForVersion(version=DEVEL): | ||
135 | """Return the class of the syntax handler for version. version can be | ||
136 | either a string or the matching constant. Raises KickstartValueError | ||
137 | if version does not match anything. | ||
138 | """ | ||
139 | try: | ||
140 | version = int(version) | ||
141 | module = "%s" % versionToString(version, skipDevel=True) | ||
142 | except ValueError: | ||
143 | module = "%s" % version | ||
144 | version = stringToVersion(version) | ||
145 | |||
146 | module = module.lower() | ||
147 | |||
148 | try: | ||
149 | import pykickstart.handlers | ||
150 | sys.path.extend(pykickstart.handlers.__path__) | ||
151 | found = imputil.imp.find_module(module) | ||
152 | loaded = imputil.imp.load_module(module, found[0], found[1], found[2]) | ||
153 | |||
154 | for (k, v) in loaded.__dict__.iteritems(): | ||
155 | if k.lower().endswith("%shandler" % module): | ||
156 | return v | ||
157 | except: | ||
158 | raise KickstartVersionError(_("Unsupported version specified: %s") % version) | ||
159 | |||
160 | def makeVersion(version=DEVEL): | ||
161 | """Return a new instance of the syntax handler for version. version can be | ||
162 | either a string or the matching constant. This function is useful for | ||
163 | standalone programs which just need to handle a specific version of | ||
164 | kickstart syntax (as provided by a command line argument, for example) | ||
165 | and need to instantiate the correct object. | ||
166 | """ | ||
167 | cl = returnClassForVersion(version) | ||
168 | return cl() | ||
diff --git a/scripts/lib/wic/__init__.py b/scripts/lib/wic/__init__.py new file mode 100644 index 0000000000..63c1d9c846 --- /dev/null +++ b/scripts/lib/wic/__init__.py | |||
@@ -0,0 +1,4 @@ | |||
1 | import os, sys | ||
2 | |||
3 | cur_path = os.path.dirname(__file__) or '.' | ||
4 | sys.path.insert(0, cur_path + '/3rdparty') | ||
diff --git a/scripts/lib/wic/__version__.py b/scripts/lib/wic/__version__.py new file mode 100644 index 0000000000..5452a46712 --- /dev/null +++ b/scripts/lib/wic/__version__.py | |||
@@ -0,0 +1 @@ | |||
VERSION = "2.00" | |||
diff --git a/scripts/lib/wic/conf.py b/scripts/lib/wic/conf.py new file mode 100644 index 0000000000..be34355ce4 --- /dev/null +++ b/scripts/lib/wic/conf.py | |||
@@ -0,0 +1,102 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2011 Intel, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU General Public License as published by the Free | ||
7 | # Software Foundation; version 2 of the License | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | # for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
16 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | |||
18 | import os, sys, re | ||
19 | import ConfigParser | ||
20 | |||
21 | from wic import msger | ||
22 | from wic import kickstart | ||
23 | from wic.utils import misc, runner, errors | ||
24 | |||
25 | |||
26 | def get_siteconf(): | ||
27 | wic_path = os.path.dirname(__file__) | ||
28 | eos = wic_path.find('scripts') + len('scripts') | ||
29 | scripts_path = wic_path[:eos] | ||
30 | |||
31 | return scripts_path + "/lib/image/config/wic.conf" | ||
32 | |||
33 | class ConfigMgr(object): | ||
34 | DEFAULTS = {'common': { | ||
35 | "distro_name": "Default Distribution", | ||
36 | "plugin_dir": "/usr/lib/wic/plugins", # TODO use prefix also? | ||
37 | }, | ||
38 | 'create': { | ||
39 | "tmpdir": '/var/tmp/wic', | ||
40 | "outdir": './wic-output', | ||
41 | |||
42 | "release": None, | ||
43 | "logfile": None, | ||
44 | "name_prefix": None, | ||
45 | "name_suffix": None, | ||
46 | }, | ||
47 | } | ||
48 | |||
49 | # make the manager class as singleton | ||
50 | _instance = None | ||
51 | def __new__(cls, *args, **kwargs): | ||
52 | if not cls._instance: | ||
53 | cls._instance = super(ConfigMgr, cls).__new__(cls, *args, **kwargs) | ||
54 | |||
55 | return cls._instance | ||
56 | |||
57 | def __init__(self, ksconf=None, siteconf=None): | ||
58 | # reset config options | ||
59 | self.reset() | ||
60 | |||
61 | if not siteconf: | ||
62 | siteconf = get_siteconf() | ||
63 | |||
64 | # initial options from siteconf | ||
65 | self._siteconf = siteconf | ||
66 | |||
67 | if ksconf: | ||
68 | self._ksconf = ksconf | ||
69 | |||
70 | def reset(self): | ||
71 | self.__ksconf = None | ||
72 | self.__siteconf = None | ||
73 | |||
74 | # initialize the values with defaults | ||
75 | for sec, vals in self.DEFAULTS.iteritems(): | ||
76 | setattr(self, sec, vals) | ||
77 | |||
78 | def __set_ksconf(self, ksconf): | ||
79 | if not os.path.isfile(ksconf): | ||
80 | msger.error('Cannot find ks file: %s' % ksconf) | ||
81 | |||
82 | self.__ksconf = ksconf | ||
83 | self._parse_kickstart(ksconf) | ||
84 | def __get_ksconf(self): | ||
85 | return self.__ksconf | ||
86 | _ksconf = property(__get_ksconf, __set_ksconf) | ||
87 | |||
88 | def _parse_kickstart(self, ksconf=None): | ||
89 | if not ksconf: | ||
90 | return | ||
91 | |||
92 | ks = kickstart.read_kickstart(ksconf) | ||
93 | |||
94 | self.create['ks'] = ks | ||
95 | self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0] | ||
96 | |||
97 | self.create['name'] = misc.build_name(ksconf, | ||
98 | self.create['release'], | ||
99 | self.create['name_prefix'], | ||
100 | self.create['name_suffix']) | ||
101 | |||
102 | configmgr = ConfigMgr() | ||
diff --git a/scripts/lib/wic/creator.py b/scripts/lib/wic/creator.py new file mode 100644 index 0000000000..2219377b38 --- /dev/null +++ b/scripts/lib/wic/creator.py | |||
@@ -0,0 +1,187 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2011 Intel, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU General Public License as published by the Free | ||
7 | # Software Foundation; version 2 of the License | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | # for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
16 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | |||
18 | import os, sys, re | ||
19 | from optparse import SUPPRESS_HELP | ||
20 | |||
21 | from wic import msger | ||
22 | from wic.utils import cmdln, errors | ||
23 | from wic.conf import configmgr | ||
24 | from wic.plugin import pluginmgr | ||
25 | |||
26 | |||
27 | class Creator(cmdln.Cmdln): | ||
28 | """${name}: create an image | ||
29 | |||
30 | Usage: | ||
31 | ${name} SUBCOMMAND <ksfile> [OPTS] | ||
32 | |||
33 | ${command_list} | ||
34 | ${option_list} | ||
35 | """ | ||
36 | |||
37 | name = 'wic create(cr)' | ||
38 | |||
39 | def __init__(self, *args, **kwargs): | ||
40 | cmdln.Cmdln.__init__(self, *args, **kwargs) | ||
41 | self._subcmds = [] | ||
42 | |||
43 | # get cmds from pluginmgr | ||
44 | # mix-in do_subcmd interface | ||
45 | for subcmd, klass in pluginmgr.get_plugins('imager').iteritems(): | ||
46 | if not hasattr(klass, 'do_create'): | ||
47 | msger.warning("Unsupported subcmd: %s" % subcmd) | ||
48 | continue | ||
49 | |||
50 | func = getattr(klass, 'do_create') | ||
51 | setattr(self.__class__, "do_"+subcmd, func) | ||
52 | self._subcmds.append(subcmd) | ||
53 | |||
54 | def get_optparser(self): | ||
55 | optparser = cmdln.CmdlnOptionParser(self) | ||
56 | optparser.add_option('-d', '--debug', action='store_true', | ||
57 | dest='debug', | ||
58 | help=SUPPRESS_HELP) | ||
59 | optparser.add_option('-v', '--verbose', action='store_true', | ||
60 | dest='verbose', | ||
61 | help=SUPPRESS_HELP) | ||
62 | optparser.add_option('', '--logfile', type='string', dest='logfile', | ||
63 | default=None, | ||
64 | help='Path of logfile') | ||
65 | optparser.add_option('-c', '--config', type='string', dest='config', | ||
66 | default=None, | ||
67 | help='Specify config file for wic') | ||
68 | optparser.add_option('-o', '--outdir', type='string', action='store', | ||
69 | dest='outdir', default=None, | ||
70 | help='Output directory') | ||
71 | optparser.add_option('', '--tmpfs', action='store_true', dest='enabletmpfs', | ||
72 | help='Setup tmpdir as tmpfs to accelerate, experimental' | ||
73 | ' feature, use it if you have more than 4G memory') | ||
74 | return optparser | ||
75 | |||
76 | def preoptparse(self, argv): | ||
77 | optparser = self.get_optparser() | ||
78 | |||
79 | largs = [] | ||
80 | rargs = [] | ||
81 | while argv: | ||
82 | arg = argv.pop(0) | ||
83 | |||
84 | if arg in ('-h', '--help'): | ||
85 | rargs.append(arg) | ||
86 | |||
87 | elif optparser.has_option(arg): | ||
88 | largs.append(arg) | ||
89 | |||
90 | if optparser.get_option(arg).takes_value(): | ||
91 | try: | ||
92 | largs.append(argv.pop(0)) | ||
93 | except IndexError: | ||
94 | raise errors.Usage("option %s requires arguments" % arg) | ||
95 | |||
96 | else: | ||
97 | if arg.startswith("--"): | ||
98 | if "=" in arg: | ||
99 | opt = arg.split("=")[0] | ||
100 | else: | ||
101 | opt = None | ||
102 | elif arg.startswith("-") and len(arg) > 2: | ||
103 | opt = arg[0:2] | ||
104 | else: | ||
105 | opt = None | ||
106 | |||
107 | if opt and optparser.has_option(opt): | ||
108 | largs.append(arg) | ||
109 | else: | ||
110 | rargs.append(arg) | ||
111 | |||
112 | return largs + rargs | ||
113 | |||
114 | def postoptparse(self): | ||
115 | abspath = lambda pth: os.path.abspath(os.path.expanduser(pth)) | ||
116 | |||
117 | if self.options.verbose: | ||
118 | msger.set_loglevel('verbose') | ||
119 | if self.options.debug: | ||
120 | msger.set_loglevel('debug') | ||
121 | |||
122 | if self.options.logfile: | ||
123 | logfile_abs_path = abspath(self.options.logfile) | ||
124 | if os.path.isdir(logfile_abs_path): | ||
125 | raise errors.Usage("logfile's path %s should be file" | ||
126 | % self.options.logfile) | ||
127 | if not os.path.exists(os.path.dirname(logfile_abs_path)): | ||
128 | os.makedirs(os.path.dirname(logfile_abs_path)) | ||
129 | msger.set_interactive(False) | ||
130 | msger.set_logfile(logfile_abs_path) | ||
131 | configmgr.create['logfile'] = self.options.logfile | ||
132 | |||
133 | if self.options.config: | ||
134 | configmgr.reset() | ||
135 | configmgr._siteconf = self.options.config | ||
136 | |||
137 | if self.options.outdir is not None: | ||
138 | configmgr.create['outdir'] = abspath(self.options.outdir) | ||
139 | |||
140 | cdir = 'outdir' | ||
141 | if os.path.exists(configmgr.create[cdir]) \ | ||
142 | and not os.path.isdir(configmgr.create[cdir]): | ||
143 | msger.error('Invalid directory specified: %s' \ | ||
144 | % configmgr.create[cdir]) | ||
145 | |||
146 | if self.options.enabletmpfs: | ||
147 | configmgr.create['enabletmpfs'] = self.options.enabletmpfs | ||
148 | |||
149 | def main(self, argv=None): | ||
150 | if argv is None: | ||
151 | argv = sys.argv | ||
152 | else: | ||
153 | argv = argv[:] # don't modify caller's list | ||
154 | |||
155 | self.optparser = self.get_optparser() | ||
156 | if self.optparser: | ||
157 | try: | ||
158 | argv = self.preoptparse(argv) | ||
159 | self.options, args = self.optparser.parse_args(argv) | ||
160 | |||
161 | except cmdln.CmdlnUserError, ex: | ||
162 | msg = "%s: %s\nTry '%s help' for info.\n"\ | ||
163 | % (self.name, ex, self.name) | ||
164 | msger.error(msg) | ||
165 | |||
166 | except cmdln.StopOptionProcessing, ex: | ||
167 | return 0 | ||
168 | else: | ||
169 | # optparser=None means no process for opts | ||
170 | self.options, args = None, argv[1:] | ||
171 | |||
172 | if not args: | ||
173 | return self.emptyline() | ||
174 | |||
175 | self.postoptparse() | ||
176 | |||
177 | return self.cmd(args) | ||
178 | |||
179 | def precmd(self, argv): # check help before cmd | ||
180 | |||
181 | if '-h' in argv or '?' in argv or '--help' in argv or 'help' in argv: | ||
182 | return argv | ||
183 | |||
184 | if len(argv) == 1: | ||
185 | return ['help', argv[0]] | ||
186 | |||
187 | return argv | ||
diff --git a/scripts/lib/wic/imager/__init__.py b/scripts/lib/wic/imager/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/wic/imager/__init__.py | |||
diff --git a/scripts/lib/wic/imager/baseimager.py b/scripts/lib/wic/imager/baseimager.py new file mode 100644 index 0000000000..e8305272a2 --- /dev/null +++ b/scripts/lib/wic/imager/baseimager.py | |||
@@ -0,0 +1,193 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2007 Red Hat Inc. | ||
4 | # Copyright (c) 2009, 2010, 2011 Intel, Inc. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify it | ||
7 | # under the terms of the GNU General Public License as published by the Free | ||
8 | # Software Foundation; version 2 of the License | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | # for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along | ||
16 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
17 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | from __future__ import with_statement | ||
20 | import os, sys | ||
21 | import tempfile | ||
22 | import shutil | ||
23 | |||
24 | from wic import kickstart | ||
25 | from wic import msger | ||
26 | from wic.utils.errors import CreatorError | ||
27 | from wic.utils import misc, runner, fs_related as fs | ||
28 | |||
29 | class BaseImageCreator(object): | ||
30 | """Base class for image creation. | ||
31 | |||
32 | BaseImageCreator is the simplest creator class available; it will | ||
33 | create a system image according to the supplied kickstart file. | ||
34 | |||
35 | e.g. | ||
36 | |||
37 | import wic.imgcreate as imgcreate | ||
38 | ks = imgcreate.read_kickstart("foo.ks") | ||
39 | imgcreate.ImageCreator(ks, "foo").create() | ||
40 | """ | ||
41 | |||
42 | def __del__(self): | ||
43 | self.cleanup() | ||
44 | |||
45 | def __init__(self, createopts = None): | ||
46 | """Initialize an ImageCreator instance. | ||
47 | |||
48 | ks -- a pykickstart.KickstartParser instance; this instance will be | ||
49 | used to drive the install by e.g. providing the list of packages | ||
50 | to be installed, the system configuration and %post scripts | ||
51 | |||
52 | name -- a name for the image; used for e.g. image filenames or | ||
53 | filesystem labels | ||
54 | """ | ||
55 | |||
56 | self.__builddir = None | ||
57 | |||
58 | self.ks = None | ||
59 | self.name = "target" | ||
60 | self.tmpdir = "/var/tmp/wic" | ||
61 | self.workdir = "/var/tmp/wic/build" | ||
62 | |||
63 | # setup tmpfs tmpdir when enabletmpfs is True | ||
64 | self.enabletmpfs = False | ||
65 | |||
66 | if createopts: | ||
67 | # Mapping table for variables that have different names. | ||
68 | optmap = {"outdir" : "destdir", | ||
69 | } | ||
70 | |||
71 | # update setting from createopts | ||
72 | for key in createopts.keys(): | ||
73 | if key in optmap: | ||
74 | option = optmap[key] | ||
75 | else: | ||
76 | option = key | ||
77 | setattr(self, option, createopts[key]) | ||
78 | |||
79 | self.destdir = os.path.abspath(os.path.expanduser(self.destdir)) | ||
80 | |||
81 | self._dep_checks = ["ls", "bash", "cp", "echo"] | ||
82 | |||
83 | # Output image file names | ||
84 | self.outimage = [] | ||
85 | |||
86 | # No ks provided when called by convertor, so skip the dependency check | ||
87 | if self.ks: | ||
88 | # If we have btrfs partition we need to check necessary tools | ||
89 | for part in self.ks.handler.partition.partitions: | ||
90 | if part.fstype and part.fstype == "btrfs": | ||
91 | self._dep_checks.append("mkfs.btrfs") | ||
92 | break | ||
93 | |||
94 | # make sure the specified tmpdir and cachedir exist | ||
95 | if not os.path.exists(self.tmpdir): | ||
96 | os.makedirs(self.tmpdir) | ||
97 | |||
98 | |||
99 | # | ||
100 | # Hooks for subclasses | ||
101 | # | ||
102 | def _create(self): | ||
103 | """Create partitions for the disk image(s) | ||
104 | |||
105 | This is the hook where subclasses may create the partitions | ||
106 | that will be assembled into disk image(s). | ||
107 | |||
108 | There is no default implementation. | ||
109 | """ | ||
110 | pass | ||
111 | |||
112 | def _cleanup(self): | ||
113 | """Undo anything performed in _create(). | ||
114 | |||
115 | This is the hook where subclasses must undo anything which was | ||
116 | done in _create(). | ||
117 | |||
118 | There is no default implementation. | ||
119 | |||
120 | """ | ||
121 | pass | ||
122 | |||
123 | # | ||
124 | # Actual implementation | ||
125 | # | ||
126 | def __ensure_builddir(self): | ||
127 | if not self.__builddir is None: | ||
128 | return | ||
129 | |||
130 | try: | ||
131 | self.workdir = os.path.join(self.tmpdir, "build") | ||
132 | if not os.path.exists(self.workdir): | ||
133 | os.makedirs(self.workdir) | ||
134 | self.__builddir = tempfile.mkdtemp(dir = self.workdir, | ||
135 | prefix = "imgcreate-") | ||
136 | except OSError, (err, msg): | ||
137 | raise CreatorError("Failed create build directory in %s: %s" % | ||
138 | (self.tmpdir, msg)) | ||
139 | |||
140 | def __setup_tmpdir(self): | ||
141 | if not self.enabletmpfs: | ||
142 | return | ||
143 | |||
144 | runner.show('mount -t tmpfs -o size=4G tmpfs %s' % self.workdir) | ||
145 | |||
146 | def __clean_tmpdir(self): | ||
147 | if not self.enabletmpfs: | ||
148 | return | ||
149 | |||
150 | runner.show('umount -l %s' % self.workdir) | ||
151 | |||
152 | def create(self): | ||
153 | """Create partitions for the disk image(s) | ||
154 | |||
155 | Create the partitions that will be assembled into disk | ||
156 | image(s). | ||
157 | """ | ||
158 | self.__setup_tmpdir() | ||
159 | self.__ensure_builddir() | ||
160 | |||
161 | self._create() | ||
162 | |||
163 | def cleanup(self): | ||
164 | """Undo anything performed in create(). | ||
165 | |||
166 | Note, make sure to call this method once finished with the creator | ||
167 | instance in order to ensure no stale files are left on the host e.g.: | ||
168 | |||
169 | creator = ImageCreator(ks, name) | ||
170 | try: | ||
171 | creator.create() | ||
172 | finally: | ||
173 | creator.cleanup() | ||
174 | |||
175 | """ | ||
176 | if not self.__builddir: | ||
177 | return | ||
178 | |||
179 | self._cleanup() | ||
180 | |||
181 | shutil.rmtree(self.__builddir, ignore_errors = True) | ||
182 | self.__builddir = None | ||
183 | |||
184 | self.__clean_tmpdir() | ||
185 | |||
186 | |||
187 | def print_outimage_info(self): | ||
188 | msg = "The new image can be found here:\n" | ||
189 | self.outimage.sort() | ||
190 | for file in self.outimage: | ||
191 | msg += ' %s\n' % os.path.abspath(file) | ||
192 | |||
193 | msger.info(msg) | ||
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py new file mode 100644 index 0000000000..d0ae504daf --- /dev/null +++ b/scripts/lib/wic/imager/direct.py | |||
@@ -0,0 +1,363 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This implements the 'direct' image creator class for 'wic' | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
25 | # | ||
26 | |||
27 | import os | ||
28 | import stat | ||
29 | import shutil | ||
30 | |||
31 | from wic import kickstart, msger | ||
32 | from wic.utils import fs_related, runner, misc | ||
33 | from wic.utils.partitionedfs import Image | ||
34 | from wic.utils.errors import CreatorError, ImageError | ||
35 | from wic.imager.baseimager import BaseImageCreator | ||
36 | from wic.utils.oe.misc import * | ||
37 | from wic.plugin import pluginmgr | ||
38 | |||
39 | disk_methods = { | ||
40 | "do_install_disk":None, | ||
41 | } | ||
42 | |||
43 | class DirectImageCreator(BaseImageCreator): | ||
44 | """ | ||
45 | Installs a system into a file containing a partitioned disk image. | ||
46 | |||
47 | DirectImageCreator is an advanced ImageCreator subclass; an image | ||
48 | file is formatted with a partition table, each partition created | ||
49 | from a rootfs or other OpenEmbedded build artifact and dd'ed into | ||
50 | the virtual disk. The disk image can subsequently be dd'ed onto | ||
51 | media and used on actual hardware. | ||
52 | """ | ||
53 | |||
54 | def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir, | ||
55 | kernel_dir, native_sysroot, creatoropts=None): | ||
56 | """ | ||
57 | Initialize a DirectImageCreator instance. | ||
58 | |||
59 | This method takes the same arguments as ImageCreator.__init__() | ||
60 | """ | ||
61 | BaseImageCreator.__init__(self, creatoropts) | ||
62 | |||
63 | self.__image = None | ||
64 | self.__disks = {} | ||
65 | self.__disk_format = "direct" | ||
66 | self._disk_names = [] | ||
67 | self._ptable_format = self.ks.handler.bootloader.ptable | ||
68 | |||
69 | self.oe_builddir = oe_builddir | ||
70 | if image_output_dir: | ||
71 | self.tmpdir = image_output_dir | ||
72 | self.rootfs_dir = rootfs_dir | ||
73 | self.bootimg_dir = bootimg_dir | ||
74 | self.kernel_dir = kernel_dir | ||
75 | self.native_sysroot = native_sysroot | ||
76 | |||
77 | def __write_fstab(self, image_rootfs): | ||
78 | """overriden to generate fstab (temporarily) in rootfs. This is called | ||
79 | from _create, make sure it doesn't get called from | ||
80 | BaseImage.create() | ||
81 | """ | ||
82 | if image_rootfs is None: | ||
83 | return None | ||
84 | |||
85 | fstab = image_rootfs + "/etc/fstab" | ||
86 | if not os.path.isfile(fstab): | ||
87 | return None | ||
88 | |||
89 | parts = self._get_parts() | ||
90 | |||
91 | self._save_fstab(fstab) | ||
92 | fstab_lines = self._get_fstab(fstab, parts) | ||
93 | self._update_fstab(fstab_lines, parts) | ||
94 | self._write_fstab(fstab, fstab_lines) | ||
95 | |||
96 | return fstab | ||
97 | |||
98 | def _update_fstab(self, fstab_lines, parts): | ||
99 | """Assume partition order same as in wks""" | ||
100 | for num, p in enumerate(parts, 1): | ||
101 | if not p.mountpoint or p.mountpoint == "/" or p.mountpoint == "/boot": | ||
102 | continue | ||
103 | if self._ptable_format == 'msdos' and num > 3: | ||
104 | device_name = "/dev/" + p.disk + str(num + 1) | ||
105 | else: | ||
106 | device_name = "/dev/" + p.disk + str(num) | ||
107 | |||
108 | opts = "defaults" | ||
109 | if p.fsopts: | ||
110 | opts = p.fsopts | ||
111 | |||
112 | fstab_entry = device_name + "\t" + \ | ||
113 | p.mountpoint + "\t" + \ | ||
114 | p.fstype + "\t" + \ | ||
115 | opts + "\t0\t0\n" | ||
116 | fstab_lines.append(fstab_entry) | ||
117 | |||
118 | def _write_fstab(self, fstab, fstab_lines): | ||
119 | fstab = open(fstab, "w") | ||
120 | for line in fstab_lines: | ||
121 | fstab.write(line) | ||
122 | fstab.close() | ||
123 | |||
124 | def _save_fstab(self, fstab): | ||
125 | """Save the current fstab in rootfs""" | ||
126 | shutil.copyfile(fstab, fstab + ".orig") | ||
127 | |||
128 | def _restore_fstab(self, fstab): | ||
129 | """Restore the saved fstab in rootfs""" | ||
130 | if fstab is None: | ||
131 | return | ||
132 | shutil.move(fstab + ".orig", fstab) | ||
133 | |||
134 | def _get_fstab(self, fstab, parts): | ||
135 | """Return the desired contents of /etc/fstab.""" | ||
136 | f = open(fstab, "r") | ||
137 | fstab_contents = f.readlines() | ||
138 | f.close() | ||
139 | |||
140 | return fstab_contents | ||
141 | |||
142 | def set_bootimg_dir(self, bootimg_dir): | ||
143 | """ | ||
144 | Accessor for bootimg_dir, the actual location used for the source | ||
145 | of the bootimg. Should be set by source plugins (only if they | ||
146 | change the default bootimg source) so the correct info gets | ||
147 | displayed for print_outimage_info(). | ||
148 | """ | ||
149 | self.bootimg_dir = bootimg_dir | ||
150 | |||
151 | def _get_parts(self): | ||
152 | if not self.ks: | ||
153 | raise CreatorError("Failed to get partition info, " | ||
154 | "please check your kickstart setting.") | ||
155 | |||
156 | # Set a default partition if no partition is given out | ||
157 | if not self.ks.handler.partition.partitions: | ||
158 | partstr = "part / --size 1900 --ondisk sda --fstype=ext3" | ||
159 | args = partstr.split() | ||
160 | pd = self.ks.handler.partition.parse(args[1:]) | ||
161 | if pd not in self.ks.handler.partition.partitions: | ||
162 | self.ks.handler.partition.partitions.append(pd) | ||
163 | |||
164 | # partitions list from kickstart file | ||
165 | return kickstart.get_partitions(self.ks) | ||
166 | |||
167 | def get_disk_names(self): | ||
168 | """ Returns a list of physical target disk names (e.g., 'sdb') which | ||
169 | will be created. """ | ||
170 | |||
171 | if self._disk_names: | ||
172 | return self._disk_names | ||
173 | |||
174 | #get partition info from ks handler | ||
175 | parts = self._get_parts() | ||
176 | |||
177 | for i in range(len(parts)): | ||
178 | if parts[i].disk: | ||
179 | disk_name = parts[i].disk | ||
180 | else: | ||
181 | raise CreatorError("Failed to create disks, no --ondisk " | ||
182 | "specified in partition line of ks file") | ||
183 | |||
184 | if parts[i].mountpoint and not parts[i].fstype: | ||
185 | raise CreatorError("Failed to create disks, no --fstype " | ||
186 | "specified for partition with mountpoint " | ||
187 | "'%s' in the ks file") | ||
188 | |||
189 | self._disk_names.append(disk_name) | ||
190 | |||
191 | return self._disk_names | ||
192 | |||
193 | def _full_name(self, name, extention): | ||
194 | """ Construct full file name for a file we generate. """ | ||
195 | return "%s-%s.%s" % (self.name, name, extention) | ||
196 | |||
197 | def _full_path(self, path, name, extention): | ||
198 | """ Construct full file path to a file we generate. """ | ||
199 | return os.path.join(path, self._full_name(name, extention)) | ||
200 | |||
201 | def get_default_source_plugin(self): | ||
202 | """ | ||
203 | The default source plugin i.e. the plugin that's consulted for | ||
204 | overall image generation tasks outside of any particular | ||
205 | partition. For convenience, we just hang it off the | ||
206 | bootloader handler since it's the one non-partition object in | ||
207 | any setup. By default the default plugin is set to the same | ||
208 | plugin as the /boot partition; since we hang it off the | ||
209 | bootloader object, the default can be explicitly set using the | ||
210 | --source bootloader param. | ||
211 | """ | ||
212 | return self.ks.handler.bootloader.source | ||
213 | |||
214 | # | ||
215 | # Actual implemention | ||
216 | # | ||
217 | def _create(self): | ||
218 | """ | ||
219 | For 'wic', we already have our build artifacts - we just create | ||
220 | filesystems from the artifacts directly and combine them into | ||
221 | a partitioned image. | ||
222 | """ | ||
223 | parts = self._get_parts() | ||
224 | |||
225 | self.__image = Image() | ||
226 | |||
227 | for p in parts: | ||
228 | # as a convenience, set source to the boot partition source | ||
229 | # instead of forcing it to be set via bootloader --source | ||
230 | if not self.ks.handler.bootloader.source and p.mountpoint == "/boot": | ||
231 | self.ks.handler.bootloader.source = p.source | ||
232 | |||
233 | for p in parts: | ||
234 | # need to create the filesystems in order to get their | ||
235 | # sizes before we can add them and do the layout. | ||
236 | # Image.create() actually calls __format_disks() to create | ||
237 | # the disk images and carve out the partitions, then | ||
238 | # self.assemble() calls Image.assemble() which calls | ||
239 | # __write_partitition() for each partition to dd the fs | ||
240 | # into the partitions. | ||
241 | |||
242 | p.install_pkgs(self, self.workdir, self.oe_builddir, self.rootfs_dir, | ||
243 | self.bootimg_dir, self.kernel_dir, self.native_sysroot) | ||
244 | |||
245 | fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | ||
246 | |||
247 | p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir, | ||
248 | self.bootimg_dir, self.kernel_dir, self.native_sysroot) | ||
249 | |||
250 | self._restore_fstab(fstab) | ||
251 | |||
252 | self.__image.add_partition(int(p.size), | ||
253 | p.disk, | ||
254 | p.mountpoint, | ||
255 | p.source_file, | ||
256 | p.fstype, | ||
257 | p.label, | ||
258 | fsopts = p.fsopts, | ||
259 | boot = p.active, | ||
260 | align = p.align, | ||
261 | part_type = p.part_type) | ||
262 | |||
263 | self.__image.layout_partitions(self._ptable_format) | ||
264 | |||
265 | self.__imgdir = self.workdir | ||
266 | for disk_name, disk in self.__image.disks.items(): | ||
267 | full_path = self._full_path(self.__imgdir, disk_name, "direct") | ||
268 | msger.debug("Adding disk %s as %s with size %s bytes" \ | ||
269 | % (disk_name, full_path, disk['min_size'])) | ||
270 | disk_obj = fs_related.DiskImage(full_path, disk['min_size']) | ||
271 | self.__disks[disk_name] = disk_obj | ||
272 | self.__image.add_disk(disk_name, disk_obj) | ||
273 | |||
274 | self.__image.create() | ||
275 | |||
276 | def assemble(self): | ||
277 | """ | ||
278 | Assemble partitions into disk image(s) | ||
279 | """ | ||
280 | for disk_name, disk in self.__image.disks.items(): | ||
281 | full_path = self._full_path(self.__imgdir, disk_name, "direct") | ||
282 | msger.debug("Assembling disk %s as %s with size %s bytes" \ | ||
283 | % (disk_name, full_path, disk['min_size'])) | ||
284 | self.__image.assemble(full_path) | ||
285 | |||
286 | def finalize(self): | ||
287 | """ | ||
288 | Finalize the disk image. | ||
289 | |||
290 | For example, prepare the image to be bootable by e.g. | ||
291 | creating and installing a bootloader configuration. | ||
292 | |||
293 | """ | ||
294 | source_plugin = self.get_default_source_plugin() | ||
295 | if source_plugin: | ||
296 | self._source_methods = pluginmgr.get_source_plugin_methods(source_plugin, disk_methods) | ||
297 | for disk_name, disk in self.__image.disks.items(): | ||
298 | self._source_methods["do_install_disk"](disk, disk_name, self, | ||
299 | self.workdir, | ||
300 | self.oe_builddir, | ||
301 | self.bootimg_dir, | ||
302 | self.kernel_dir, | ||
303 | self.native_sysroot) | ||
304 | |||
305 | def print_outimage_info(self): | ||
306 | """ | ||
307 | Print the image(s) and artifacts used, for the user. | ||
308 | """ | ||
309 | msg = "The new image(s) can be found here:\n" | ||
310 | |||
311 | parts = self._get_parts() | ||
312 | |||
313 | for disk_name, disk in self.__image.disks.items(): | ||
314 | full_path = self._full_path(self.__imgdir, disk_name, "direct") | ||
315 | msg += ' %s\n\n' % full_path | ||
316 | |||
317 | msg += 'The following build artifacts were used to create the image(s):\n' | ||
318 | for p in parts: | ||
319 | if p.get_rootfs() is None: | ||
320 | continue | ||
321 | if p.mountpoint == '/': | ||
322 | str = ':' | ||
323 | else: | ||
324 | str = '["%s"]:' % p.label | ||
325 | msg += ' ROOTFS_DIR%s%s\n' % (str.ljust(20), p.get_rootfs()) | ||
326 | |||
327 | msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir | ||
328 | msg += ' KERNEL_DIR: %s\n' % self.kernel_dir | ||
329 | msg += ' NATIVE_SYSROOT: %s\n' % self.native_sysroot | ||
330 | |||
331 | msger.info(msg) | ||
332 | |||
333 | def _get_boot_config(self): | ||
334 | """ | ||
335 | Return the rootdev/root_part_uuid (if specified by | ||
336 | --part-type) | ||
337 | |||
338 | Assume partition order same as in wks | ||
339 | """ | ||
340 | rootdev = None | ||
341 | root_part_uuid = None | ||
342 | parts = self._get_parts() | ||
343 | for num, p in enumerate(parts, 1): | ||
344 | if p.mountpoint == "/": | ||
345 | part = '' | ||
346 | if p.disk.startswith('mmcblk'): | ||
347 | part = 'p' | ||
348 | |||
349 | if self._ptable_format == 'msdos' and num > 3: | ||
350 | rootdev = "/dev/%s%s%-d" % (p.disk, part, num + 1) | ||
351 | else: | ||
352 | rootdev = "/dev/%s%s%-d" % (p.disk, part, num) | ||
353 | root_part_uuid = p.part_type | ||
354 | |||
355 | return (rootdev, root_part_uuid) | ||
356 | |||
357 | def _cleanup(self): | ||
358 | if not self.__image is None: | ||
359 | try: | ||
360 | self.__image.cleanup() | ||
361 | except ImageError, err: | ||
362 | msger.warning("%s" % err) | ||
363 | |||
diff --git a/scripts/lib/wic/kickstart/__init__.py b/scripts/lib/wic/kickstart/__init__.py new file mode 100644 index 0000000000..600098293a --- /dev/null +++ b/scripts/lib/wic/kickstart/__init__.py | |||
@@ -0,0 +1,125 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2007 Red Hat, Inc. | ||
4 | # Copyright (c) 2009, 2010, 2011 Intel, Inc. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify it | ||
7 | # under the terms of the GNU General Public License as published by the Free | ||
8 | # Software Foundation; version 2 of the License | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | # for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along | ||
16 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
17 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | import os, sys, re | ||
20 | import shutil | ||
21 | import subprocess | ||
22 | import string | ||
23 | |||
24 | import pykickstart.sections as kssections | ||
25 | import pykickstart.commands as kscommands | ||
26 | import pykickstart.constants as ksconstants | ||
27 | import pykickstart.errors as kserrors | ||
28 | import pykickstart.parser as ksparser | ||
29 | import pykickstart.version as ksversion | ||
30 | from pykickstart.handlers.control import commandMap | ||
31 | from pykickstart.handlers.control import dataMap | ||
32 | |||
33 | from wic import msger | ||
34 | from wic.utils import errors, misc, runner, fs_related as fs | ||
35 | from custom_commands import wicboot, partition | ||
36 | |||
37 | def read_kickstart(path): | ||
38 | """Parse a kickstart file and return a KickstartParser instance. | ||
39 | |||
40 | This is a simple utility function which takes a path to a kickstart file, | ||
41 | parses it and returns a pykickstart KickstartParser instance which can | ||
42 | be then passed to an ImageCreator constructor. | ||
43 | |||
44 | If an error occurs, a CreatorError exception is thrown. | ||
45 | """ | ||
46 | |||
47 | #version = ksversion.makeVersion() | ||
48 | #ks = ksparser.KickstartParser(version) | ||
49 | |||
50 | using_version = ksversion.DEVEL | ||
51 | commandMap[using_version]["bootloader"] = wicboot.Wic_Bootloader | ||
52 | commandMap[using_version]["part"] = partition.Wic_Partition | ||
53 | commandMap[using_version]["partition"] = partition.Wic_Partition | ||
54 | dataMap[using_version]["PartData"] = partition.Wic_PartData | ||
55 | superclass = ksversion.returnClassForVersion(version=using_version) | ||
56 | |||
57 | class KSHandlers(superclass): | ||
58 | def __init__(self): | ||
59 | superclass.__init__(self, mapping=commandMap[using_version]) | ||
60 | |||
61 | ks = ksparser.KickstartParser(KSHandlers(), errorsAreFatal=False) | ||
62 | |||
63 | try: | ||
64 | ks.readKickstart(path) | ||
65 | except (kserrors.KickstartParseError, kserrors.KickstartError), err: | ||
66 | if msger.ask("Errors occured on kickstart file, skip and continue?"): | ||
67 | msger.warning("%s" % err) | ||
68 | pass | ||
69 | else: | ||
70 | raise errors.KsError("%s" % err) | ||
71 | |||
72 | return ks | ||
73 | |||
74 | def get_image_size(ks, default = None): | ||
75 | __size = 0 | ||
76 | for p in ks.handler.partition.partitions: | ||
77 | if p.mountpoint == "/" and p.size: | ||
78 | __size = p.size | ||
79 | if __size > 0: | ||
80 | return int(__size) * 1024L * 1024L | ||
81 | else: | ||
82 | return default | ||
83 | |||
84 | def get_image_fstype(ks, default = None): | ||
85 | for p in ks.handler.partition.partitions: | ||
86 | if p.mountpoint == "/" and p.fstype: | ||
87 | return p.fstype | ||
88 | return default | ||
89 | |||
90 | def get_image_fsopts(ks, default = None): | ||
91 | for p in ks.handler.partition.partitions: | ||
92 | if p.mountpoint == "/" and p.fsopts: | ||
93 | return p.fsopts | ||
94 | return default | ||
95 | |||
96 | def get_timeout(ks, default = None): | ||
97 | if not hasattr(ks.handler.bootloader, "timeout"): | ||
98 | return default | ||
99 | if ks.handler.bootloader.timeout is None: | ||
100 | return default | ||
101 | return int(ks.handler.bootloader.timeout) | ||
102 | |||
103 | def get_kernel_args(ks, default = "ro rd.live.image"): | ||
104 | if not hasattr(ks.handler.bootloader, "appendLine"): | ||
105 | return default | ||
106 | if ks.handler.bootloader.appendLine is None: | ||
107 | return default | ||
108 | return "%s %s" %(default, ks.handler.bootloader.appendLine) | ||
109 | |||
110 | def get_menu_args(ks, default = ""): | ||
111 | if not hasattr(ks.handler.bootloader, "menus"): | ||
112 | return default | ||
113 | if ks.handler.bootloader.menus in (None, ""): | ||
114 | return default | ||
115 | return "%s" % ks.handler.bootloader.menus | ||
116 | |||
117 | def get_default_kernel(ks, default = None): | ||
118 | if not hasattr(ks.handler.bootloader, "default"): | ||
119 | return default | ||
120 | if not ks.handler.bootloader.default: | ||
121 | return default | ||
122 | return ks.handler.bootloader.default | ||
123 | |||
124 | def get_partitions(ks): | ||
125 | return ks.handler.partition.partitions | ||
diff --git a/scripts/lib/wic/kickstart/custom_commands/__init__.py b/scripts/lib/wic/kickstart/custom_commands/__init__.py new file mode 100644 index 0000000000..f84c6d9e00 --- /dev/null +++ b/scripts/lib/wic/kickstart/custom_commands/__init__.py | |||
@@ -0,0 +1,10 @@ | |||
1 | from micpartition import Mic_Partition | ||
2 | from micpartition import Mic_PartData | ||
3 | from partition import Wic_Partition | ||
4 | |||
5 | __all__ = ( | ||
6 | "Mic_Partition", | ||
7 | "Mic_PartData", | ||
8 | "Wic_Partition", | ||
9 | "Wic_PartData", | ||
10 | ) | ||
diff --git a/scripts/lib/wic/kickstart/custom_commands/micboot.py b/scripts/lib/wic/kickstart/custom_commands/micboot.py new file mode 100644 index 0000000000..d162142506 --- /dev/null +++ b/scripts/lib/wic/kickstart/custom_commands/micboot.py | |||
@@ -0,0 +1,49 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2008, 2009, 2010 Intel, Inc. | ||
4 | # | ||
5 | # Anas Nashif | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify it | ||
8 | # under the terms of the GNU General Public License as published by the Free | ||
9 | # Software Foundation; version 2 of the License | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, but | ||
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
13 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
14 | # for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
18 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | |||
20 | from pykickstart.base import * | ||
21 | from pykickstart.errors import * | ||
22 | from pykickstart.options import * | ||
23 | from pykickstart.commands.bootloader import * | ||
24 | |||
25 | class Mic_Bootloader(F8_Bootloader): | ||
26 | def __init__(self, writePriority=10, appendLine="", driveorder=None, | ||
27 | forceLBA=False, location="", md5pass="", password="", | ||
28 | upgrade=False, menus=""): | ||
29 | F8_Bootloader.__init__(self, writePriority, appendLine, driveorder, | ||
30 | forceLBA, location, md5pass, password, upgrade) | ||
31 | |||
32 | self.menus = "" | ||
33 | self.ptable = "msdos" | ||
34 | |||
35 | def _getArgsAsStr(self): | ||
36 | ret = F8_Bootloader._getArgsAsStr(self) | ||
37 | |||
38 | if self.menus == "": | ||
39 | ret += " --menus=%s" %(self.menus,) | ||
40 | if self.ptable: | ||
41 | ret += " --ptable=\"%s\"" %(self.ptable,) | ||
42 | return ret | ||
43 | |||
44 | def _getParser(self): | ||
45 | op = F8_Bootloader._getParser(self) | ||
46 | op.add_option("--menus", dest="menus") | ||
47 | op.add_option("--ptable", dest="ptable", type="string") | ||
48 | return op | ||
49 | |||
diff --git a/scripts/lib/wic/kickstart/custom_commands/micpartition.py b/scripts/lib/wic/kickstart/custom_commands/micpartition.py new file mode 100644 index 0000000000..43d04f1294 --- /dev/null +++ b/scripts/lib/wic/kickstart/custom_commands/micpartition.py | |||
@@ -0,0 +1,57 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Marko Saukko <marko.saukko@cybercom.com> | ||
4 | # | ||
5 | # Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). | ||
6 | # | ||
7 | # This copyrighted material is made available to anyone wishing to use, modify, | ||
8 | # copy, or redistribute it subject to the terms and conditions of the GNU | ||
9 | # General Public License v.2. This program is distributed in the hope that it | ||
10 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the | ||
11 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | # See the GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along with | ||
15 | # this program; if not, write to the Free Software Foundation, Inc., 51 | ||
16 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | |||
18 | from pykickstart.commands.partition import * | ||
19 | |||
20 | class Mic_PartData(FC4_PartData): | ||
21 | removedKeywords = FC4_PartData.removedKeywords | ||
22 | removedAttrs = FC4_PartData.removedAttrs | ||
23 | |||
24 | def __init__(self, *args, **kwargs): | ||
25 | FC4_PartData.__init__(self, *args, **kwargs) | ||
26 | self.deleteRemovedAttrs() | ||
27 | self.align = kwargs.get("align", None) | ||
28 | self.extopts = kwargs.get("extopts", None) | ||
29 | self.part_type = kwargs.get("part_type", None) | ||
30 | |||
31 | def _getArgsAsStr(self): | ||
32 | retval = FC4_PartData._getArgsAsStr(self) | ||
33 | |||
34 | if self.align: | ||
35 | retval += " --align" | ||
36 | if self.extopts: | ||
37 | retval += " --extoptions=%s" % self.extopts | ||
38 | if self.part_type: | ||
39 | retval += " --part-type=%s" % self.part_type | ||
40 | |||
41 | return retval | ||
42 | |||
43 | class Mic_Partition(FC4_Partition): | ||
44 | removedKeywords = FC4_Partition.removedKeywords | ||
45 | removedAttrs = FC4_Partition.removedAttrs | ||
46 | |||
47 | def _getParser(self): | ||
48 | op = FC4_Partition._getParser(self) | ||
49 | # The alignment value is given in kBytes. e.g., value 8 means that | ||
50 | # the partition is aligned to start from 8096 byte boundary. | ||
51 | op.add_option("--align", type="int", action="store", dest="align", | ||
52 | default=None) | ||
53 | op.add_option("--extoptions", type="string", action="store", dest="extopts", | ||
54 | default=None) | ||
55 | op.add_option("--part-type", type="string", action="store", dest="part_type", | ||
56 | default=None) | ||
57 | return op | ||
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py new file mode 100644 index 0000000000..03332194df --- /dev/null +++ b/scripts/lib/wic/kickstart/custom_commands/partition.py | |||
@@ -0,0 +1,652 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module provides the OpenEmbedded partition object definitions. | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
25 | # | ||
26 | |||
27 | import shutil | ||
28 | import os | ||
29 | import tempfile | ||
30 | |||
31 | from pykickstart.commands.partition import * | ||
32 | from wic.utils.oe.misc import * | ||
33 | from wic.kickstart.custom_commands import * | ||
34 | from wic.plugin import pluginmgr | ||
35 | |||
36 | import os | ||
37 | from mic.utils.oe.package_manager import * | ||
38 | |||
39 | partition_methods = { | ||
40 | "do_install_pkgs":None, | ||
41 | "do_stage_partition":None, | ||
42 | "do_prepare_partition":None, | ||
43 | "do_configure_partition":None, | ||
44 | } | ||
45 | |||
46 | class Wic_PartData(Mic_PartData): | ||
47 | removedKeywords = Mic_PartData.removedKeywords | ||
48 | removedAttrs = Mic_PartData.removedAttrs | ||
49 | |||
50 | def __init__(self, *args, **kwargs): | ||
51 | Mic_PartData.__init__(self, *args, **kwargs) | ||
52 | self.deleteRemovedAttrs() | ||
53 | self.source = kwargs.get("source", None) | ||
54 | self.sourceparams = kwargs.get("sourceparams", None) | ||
55 | self.rootfs = kwargs.get("rootfs-dir", None) | ||
56 | self.source_file = "" | ||
57 | self.size = 0 | ||
58 | |||
59 | def _getArgsAsStr(self): | ||
60 | retval = Mic_PartData._getArgsAsStr(self) | ||
61 | |||
62 | if self.source: | ||
63 | retval += " --source=%s" % self.source | ||
64 | if self.sourceparams: | ||
65 | retval += " --sourceparams=%s" % self.sourceparams | ||
66 | if self.rootfs: | ||
67 | retval += " --rootfs-dir=%s" % self.rootfs | ||
68 | |||
69 | return retval | ||
70 | |||
71 | def get_rootfs(self): | ||
72 | """ | ||
73 | Acessor for rootfs dir | ||
74 | """ | ||
75 | return self.rootfs | ||
76 | |||
77 | def set_rootfs(self, rootfs): | ||
78 | """ | ||
79 | Acessor for actual rootfs dir, which must be set by source | ||
80 | plugins. | ||
81 | """ | ||
82 | self.rootfs = rootfs | ||
83 | |||
84 | def get_size(self): | ||
85 | """ | ||
86 | Accessor for partition size, 0 or --size before set_size(). | ||
87 | """ | ||
88 | return self.size | ||
89 | |||
90 | def set_size(self, size): | ||
91 | """ | ||
92 | Accessor for actual partition size, which must be set by source | ||
93 | plugins. | ||
94 | """ | ||
95 | self.size = size | ||
96 | |||
97 | def set_source_file(self, source_file): | ||
98 | """ | ||
99 | Accessor for source_file, the location of the generated partition | ||
100 | image, which must be set by source plugins. | ||
101 | """ | ||
102 | self.source_file = source_file | ||
103 | |||
104 | def get_extra_block_count(self, current_blocks): | ||
105 | """ | ||
106 | The --size param is reflected in self.size (in MB), and we already | ||
107 | have current_blocks (1k) blocks, calculate and return the | ||
108 | number of (1k) blocks we need to add to get to --size, 0 if | ||
109 | we're already there or beyond. | ||
110 | """ | ||
111 | msger.debug("Requested partition size for %s: %d" % \ | ||
112 | (self.mountpoint, self.size)) | ||
113 | |||
114 | if not self.size: | ||
115 | return 0 | ||
116 | |||
117 | requested_blocks = self.size * 1024 | ||
118 | |||
119 | msger.debug("Requested blocks %d, current_blocks %d" % \ | ||
120 | (requested_blocks, current_blocks)) | ||
121 | |||
122 | if requested_blocks > current_blocks: | ||
123 | return requested_blocks - current_blocks | ||
124 | else: | ||
125 | return 0 | ||
126 | |||
127 | def install_pkgs(self, creator, cr_workdir, oe_builddir, rootfs_dir, | ||
128 | bootimg_dir, kernel_dir, native_sysroot): | ||
129 | """ | ||
130 | Prepare content for individual partitions, installing packages. | ||
131 | """ | ||
132 | |||
133 | if not self.source: | ||
134 | return | ||
135 | |||
136 | self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods) | ||
137 | self._source_methods["do_install_pkgs"](self, creator, | ||
138 | cr_workdir, | ||
139 | oe_builddir, | ||
140 | rootfs_dir, | ||
141 | bootimg_dir, | ||
142 | kernel_dir, | ||
143 | native_sysroot) | ||
144 | |||
145 | def install_pkgs_ipk(self, cr_workdir, oe_builddir, rootfs_dir, | ||
146 | native_sysroot, packages, repourl): | ||
147 | """ | ||
148 | Install packages specified into wks file using opkg package manager. | ||
149 | This method is dependend on bb module. | ||
150 | """ | ||
151 | |||
152 | gVar = {} | ||
153 | gVar["DEPLOY_DIR_IPK"] = os.path.join(oe_builddir, "tmp/deploy/ipk") | ||
154 | |||
155 | # Run postinstall scripts even in offline mode | ||
156 | # Use the arch priority package rather than higher version one if more than one candidate is found. | ||
157 | #d.setVar("OPKG_ARGS", "--force_postinstall --prefer-arch-to-version") | ||
158 | gVar["OPKG_ARGS"] = "--force_postinstall" | ||
159 | |||
160 | # OPKG path relative to /output_path | ||
161 | gVar["OPKGLIBDIR"] = "var/lib" | ||
162 | |||
163 | source_url = repourl.split() | ||
164 | |||
165 | # Generate feed uri's names, it doesn't seem to matter what name they have | ||
166 | feed_uris = "" | ||
167 | cnt = 0 | ||
168 | archs = "" | ||
169 | for url in source_url: | ||
170 | feed_uris += "cl_def_feed%d##%s\n" % (cnt, url) | ||
171 | cnt += 1 | ||
172 | head, tail = os.path.split(url) | ||
173 | archs += " " + tail | ||
174 | |||
175 | # IPK_FEED_URIS with special formating defines the URI's used as source for packages | ||
176 | gVar['IPK_FEED_URIS'] = feed_uris | ||
177 | |||
178 | gVar['BUILD_IMAGES_FROM_FEEDS'] = "1" | ||
179 | |||
180 | # We need to provide sysroot for utilities | ||
181 | gVar['STAGING_DIR_NATIVE'] = native_sysroot | ||
182 | |||
183 | # Set WORKDIR for output | ||
184 | gVar['WORKDIR'] = cr_workdir | ||
185 | |||
186 | # Set TMPDIR for output | ||
187 | gVar['TMPDIR'] = os.path.join(cr_workdir, "tmp") | ||
188 | |||
189 | if 'ROOTFS_DIR' in rootfs_dir: | ||
190 | target_dir = rootfs_dir['ROOTFS_DIR'] | ||
191 | elif os.path.isdir(rootfs_dir): | ||
192 | target_dir = rootfs_dir | ||
193 | else: | ||
194 | msg = "Couldn't find --rootfs-dir=%s connection" | ||
195 | msg += " or it is not a valid path, exiting" | ||
196 | msger.error(msg % rootfs_dir) | ||
197 | |||
198 | # Need native sysroot /usr/bin/ for opkg-cl | ||
199 | # chnage PATH var to avoid issues with host tools | ||
200 | defpath = os.environ['PATH'] | ||
201 | os.environ['PATH'] = native_sysroot + "/usr/bin/" + ":/bin:/usr/bin:" | ||
202 | |||
203 | pseudo = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot | ||
204 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % target_dir | ||
205 | pseudo += "export PSEUDO_PASSWD=%s;" % target_dir | ||
206 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" | ||
207 | pseudo += "%s/usr/bin/pseudo " % native_sysroot | ||
208 | |||
209 | pm = WicOpkgPM(gVar, | ||
210 | target_dir, | ||
211 | 'opkg.conf', | ||
212 | archs, | ||
213 | pseudo, | ||
214 | native_sysroot) | ||
215 | |||
216 | pm.update() | ||
217 | |||
218 | pm.install(packages) | ||
219 | |||
220 | os.environ['PATH'] += defpath + ":" + native_sysroot + "/usr/bin/" | ||
221 | |||
222 | |||
223 | def prepare(self, cr, cr_workdir, oe_builddir, rootfs_dir, bootimg_dir, | ||
224 | kernel_dir, native_sysroot): | ||
225 | """ | ||
226 | Prepare content for individual partitions, depending on | ||
227 | partition command parameters. | ||
228 | """ | ||
229 | self.sourceparams_dict = {} | ||
230 | |||
231 | if self.sourceparams: | ||
232 | self.sourceparams_dict = parse_sourceparams(self.sourceparams) | ||
233 | |||
234 | if not self.source: | ||
235 | if not self.size: | ||
236 | msger.error("The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint) | ||
237 | if self.fstype and self.fstype == "swap": | ||
238 | self.prepare_swap_partition(cr_workdir, oe_builddir, | ||
239 | native_sysroot) | ||
240 | elif self.fstype: | ||
241 | self.prepare_empty_partition(cr_workdir, oe_builddir, | ||
242 | native_sysroot) | ||
243 | return | ||
244 | |||
245 | plugins = pluginmgr.get_source_plugins() | ||
246 | |||
247 | if self.source not in plugins: | ||
248 | msger.error("The '%s' --source specified for %s doesn't exist.\n\tSee 'wic list source-plugins' for a list of available --sources.\n\tSee 'wic help source-plugins' for details on adding a new source plugin." % (self.source, self.mountpoint)) | ||
249 | |||
250 | self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods) | ||
251 | self._source_methods["do_configure_partition"](self, self.sourceparams_dict, | ||
252 | cr, cr_workdir, | ||
253 | oe_builddir, | ||
254 | bootimg_dir, | ||
255 | kernel_dir, | ||
256 | native_sysroot) | ||
257 | self._source_methods["do_stage_partition"](self, self.sourceparams_dict, | ||
258 | cr, cr_workdir, | ||
259 | oe_builddir, | ||
260 | bootimg_dir, kernel_dir, | ||
261 | native_sysroot) | ||
262 | self._source_methods["do_prepare_partition"](self, self.sourceparams_dict, | ||
263 | cr, cr_workdir, | ||
264 | oe_builddir, | ||
265 | bootimg_dir, kernel_dir, rootfs_dir, | ||
266 | native_sysroot) | ||
267 | |||
268 | def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir, | ||
269 | rootfs_dir): | ||
270 | """ | ||
271 | Handle an already-created partition e.g. xxx.ext3 | ||
272 | """ | ||
273 | rootfs = oe_builddir | ||
274 | du_cmd = "du -Lbms %s" % rootfs | ||
275 | out = exec_cmd(du_cmd) | ||
276 | rootfs_size = out.split()[0] | ||
277 | |||
278 | self.size = rootfs_size | ||
279 | self.source_file = rootfs | ||
280 | |||
281 | def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir, | ||
282 | native_sysroot): | ||
283 | """ | ||
284 | Prepare content for a rootfs partition i.e. create a partition | ||
285 | and fill it from a /rootfs dir. | ||
286 | |||
287 | Currently handles ext2/3/4, btrfs and vfat. | ||
288 | """ | ||
289 | pseudo = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot | ||
290 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir | ||
291 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir | ||
292 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" | ||
293 | pseudo += "%s/usr/bin/pseudo " % native_sysroot | ||
294 | |||
295 | if self.fstype.startswith("ext"): | ||
296 | return self.prepare_rootfs_ext(cr_workdir, oe_builddir, | ||
297 | rootfs_dir, native_sysroot, | ||
298 | pseudo) | ||
299 | elif self.fstype.startswith("btrfs"): | ||
300 | return self.prepare_rootfs_btrfs(cr_workdir, oe_builddir, | ||
301 | rootfs_dir, native_sysroot, | ||
302 | pseudo) | ||
303 | |||
304 | elif self.fstype.startswith("vfat"): | ||
305 | return self.prepare_rootfs_vfat(cr_workdir, oe_builddir, | ||
306 | rootfs_dir, native_sysroot, | ||
307 | pseudo) | ||
308 | elif self.fstype.startswith("squashfs"): | ||
309 | return self.prepare_rootfs_squashfs(cr_workdir, oe_builddir, | ||
310 | rootfs_dir, native_sysroot, | ||
311 | pseudo) | ||
312 | |||
313 | def prepare_rootfs_ext(self, cr_workdir, oe_builddir, rootfs_dir, | ||
314 | native_sysroot, pseudo): | ||
315 | """ | ||
316 | Prepare content for an ext2/3/4 rootfs partition. | ||
317 | """ | ||
318 | |||
319 | image_rootfs = rootfs_dir | ||
320 | rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype) | ||
321 | |||
322 | du_cmd = "du -ks %s" % image_rootfs | ||
323 | out = exec_cmd(du_cmd) | ||
324 | actual_rootfs_size = int(out.split()[0]) | ||
325 | |||
326 | extra_blocks = self.get_extra_block_count(actual_rootfs_size) | ||
327 | |||
328 | if extra_blocks < IMAGE_EXTRA_SPACE: | ||
329 | extra_blocks = IMAGE_EXTRA_SPACE | ||
330 | |||
331 | rootfs_size = actual_rootfs_size + extra_blocks | ||
332 | rootfs_size *= IMAGE_OVERHEAD_FACTOR | ||
333 | |||
334 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
335 | (extra_blocks, self.mountpoint, rootfs_size)) | ||
336 | |||
337 | dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \ | ||
338 | (rootfs, rootfs_size) | ||
339 | exec_cmd(dd_cmd) | ||
340 | |||
341 | extra_imagecmd = "-i 8192" | ||
342 | |||
343 | mkfs_cmd = "mkfs.%s -F %s %s -d %s" % \ | ||
344 | (self.fstype, extra_imagecmd, rootfs, image_rootfs) | ||
345 | (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot) | ||
346 | if rc: | ||
347 | print "rootfs_dir: %s" % rootfs_dir | ||
348 | msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details) when creating filesystem from rootfs directory: %s" % (self.fstype, rc, rootfs_dir)) | ||
349 | |||
350 | # get the rootfs size in the right units for kickstart (Mb) | ||
351 | du_cmd = "du -Lbms %s" % rootfs | ||
352 | out = exec_cmd(du_cmd) | ||
353 | rootfs_size = out.split()[0] | ||
354 | |||
355 | self.size = rootfs_size | ||
356 | self.source_file = rootfs | ||
357 | |||
358 | return 0 | ||
359 | |||
360 | def prepare_for_uboot(self, arch, cr_workdir, oe_builddir, rootfs_dir, | ||
361 | native_sysroot): | ||
362 | """ | ||
363 | Generates u-boot image from source_file( ext2/3/4 ) | ||
364 | |||
365 | """ | ||
366 | pseudo = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot | ||
367 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir | ||
368 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir | ||
369 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" | ||
370 | pseudo += "%s/usr/bin/pseudo " % native_sysroot | ||
371 | |||
372 | # 1) compress image | ||
373 | rootfs = self.source_file | ||
374 | rootfs_gzip = "%s.gz" % rootfs | ||
375 | gzip_cmd = "gzip -f -9 -c %s > %s" % (rootfs, rootfs_gzip) | ||
376 | rc, out = exec_native_cmd(pseudo + gzip_cmd, native_sysroot) | ||
377 | |||
378 | # 2) image for U-Boot | ||
379 | rootfs_uboot = "%s.u-boot" % rootfs_gzip | ||
380 | mkimage_cmd = "mkimage -A %s -O linux -T ramdisk -C gzip -n %s -d %s %s" % \ | ||
381 | (arch, self.label, rootfs_gzip, rootfs_uboot) | ||
382 | rc, out = exec_native_cmd(pseudo + mkimage_cmd, native_sysroot) | ||
383 | |||
384 | msger.info("\n\n\tThe new U-Boot ramdisk image can be found here:\n\t\t%s\n\n" % rootfs_uboot) | ||
385 | |||
386 | return 0 | ||
387 | |||
388 | def prepare_rootfs_btrfs(self, cr_workdir, oe_builddir, rootfs_dir, | ||
389 | native_sysroot, pseudo): | ||
390 | """ | ||
391 | Prepare content for a btrfs rootfs partition. | ||
392 | |||
393 | Currently handles ext2/3/4 and btrfs. | ||
394 | """ | ||
395 | image_rootfs = rootfs_dir | ||
396 | rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype) | ||
397 | |||
398 | du_cmd = "du -ks %s" % image_rootfs | ||
399 | out = exec_cmd(du_cmd) | ||
400 | actual_rootfs_size = int(out.split()[0]) | ||
401 | |||
402 | extra_blocks = self.get_extra_block_count(actual_rootfs_size) | ||
403 | |||
404 | if extra_blocks < IMAGE_EXTRA_SPACE: | ||
405 | extra_blocks = IMAGE_EXTRA_SPACE | ||
406 | |||
407 | rootfs_size = actual_rootfs_size + extra_blocks | ||
408 | rootfs_size *= IMAGE_OVERHEAD_FACTOR | ||
409 | |||
410 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
411 | (extra_blocks, self.mountpoint, rootfs_size)) | ||
412 | |||
413 | dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \ | ||
414 | (rootfs, rootfs_size) | ||
415 | exec_cmd(dd_cmd) | ||
416 | |||
417 | mkfs_cmd = "mkfs.%s -b %d -r %s %s" % \ | ||
418 | (self.fstype, rootfs_size * 1024, image_rootfs, rootfs) | ||
419 | (rc, out) = exec_native_cmd(pseudo + mkfs_cmd, native_sysroot) | ||
420 | if rc: | ||
421 | msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details) when creating filesystem from rootfs directory: %s" % (self.fstype, rc, rootfs_dir)) | ||
422 | |||
423 | # get the rootfs size in the right units for kickstart (Mb) | ||
424 | du_cmd = "du -Lbms %s" % rootfs | ||
425 | out = exec_cmd(du_cmd) | ||
426 | rootfs_size = out.split()[0] | ||
427 | |||
428 | self.size = rootfs_size | ||
429 | self.source_file = rootfs | ||
430 | |||
431 | def prepare_rootfs_vfat(self, cr_workdir, oe_builddir, rootfs_dir, | ||
432 | native_sysroot, pseudo): | ||
433 | """ | ||
434 | Prepare content for a vfat rootfs partition. | ||
435 | """ | ||
436 | image_rootfs = rootfs_dir | ||
437 | rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype) | ||
438 | |||
439 | du_cmd = "du -bks %s" % image_rootfs | ||
440 | out = exec_cmd(du_cmd) | ||
441 | blocks = int(out.split()[0]) | ||
442 | |||
443 | extra_blocks = self.get_extra_block_count(blocks) | ||
444 | |||
445 | if extra_blocks < IMAGE_EXTRA_SPACE: | ||
446 | extra_blocks = IMAGE_EXTRA_SPACE | ||
447 | |||
448 | blocks += extra_blocks | ||
449 | |||
450 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
451 | (extra_blocks, self.mountpoint, blocks)) | ||
452 | |||
453 | # Ensure total sectors is an integral number of sectors per | ||
454 | # track or mcopy will complain. Sectors are 512 bytes, and we | ||
455 | # generate images with 32 sectors per track. This calculation | ||
456 | # is done in blocks, thus the mod by 16 instead of 32. Apply | ||
457 | # sector count fix only when needed. | ||
458 | if blocks % 16 != 0: | ||
459 | blocks += (16 - (blocks % 16)) | ||
460 | |||
461 | dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (rootfs, blocks) | ||
462 | exec_native_cmd(dosfs_cmd, native_sysroot) | ||
463 | |||
464 | mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, image_rootfs) | ||
465 | rc, out = exec_native_cmd(mcopy_cmd, native_sysroot) | ||
466 | if rc: | ||
467 | msger.error("ERROR: mcopy returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % rc) | ||
468 | |||
469 | chmod_cmd = "chmod 644 %s" % rootfs | ||
470 | exec_cmd(chmod_cmd) | ||
471 | |||
472 | # get the rootfs size in the right units for kickstart (Mb) | ||
473 | du_cmd = "du -Lbms %s" % rootfs | ||
474 | out = exec_cmd(du_cmd) | ||
475 | rootfs_size = out.split()[0] | ||
476 | |||
477 | self.set_size(rootfs_size) | ||
478 | self.set_source_file(rootfs) | ||
479 | |||
480 | def prepare_rootfs_squashfs(self, cr_workdir, oe_builddir, rootfs_dir, | ||
481 | native_sysroot, pseudo): | ||
482 | """ | ||
483 | Prepare content for a squashfs rootfs partition. | ||
484 | """ | ||
485 | image_rootfs = rootfs_dir | ||
486 | rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype) | ||
487 | |||
488 | squashfs_cmd = "mksquashfs %s %s -noappend" % \ | ||
489 | (image_rootfs, rootfs) | ||
490 | exec_native_cmd(pseudo + squashfs_cmd, native_sysroot) | ||
491 | |||
492 | # get the rootfs size in the right units for kickstart (Mb) | ||
493 | du_cmd = "du -Lbms %s" % rootfs | ||
494 | out = exec_cmd(du_cmd) | ||
495 | rootfs_size = out.split()[0] | ||
496 | |||
497 | self.size = rootfs_size | ||
498 | self.source_file = rootfs | ||
499 | |||
500 | return 0 | ||
501 | |||
502 | def prepare_empty_partition(self, cr_workdir, oe_builddir, native_sysroot): | ||
503 | """ | ||
504 | Prepare an empty partition. | ||
505 | """ | ||
506 | if self.fstype.startswith("ext"): | ||
507 | return self.prepare_empty_partition_ext(cr_workdir, oe_builddir, | ||
508 | native_sysroot) | ||
509 | elif self.fstype.startswith("btrfs"): | ||
510 | return self.prepare_empty_partition_btrfs(cr_workdir, oe_builddir, | ||
511 | native_sysroot) | ||
512 | elif self.fstype.startswith("vfat"): | ||
513 | return self.prepare_empty_partition_vfat(cr_workdir, oe_builddir, | ||
514 | native_sysroot) | ||
515 | elif self.fstype.startswith("squashfs"): | ||
516 | return self.prepare_empty_partition_squashfs(cr_workdir, oe_builddir, | ||
517 | native_sysroot) | ||
518 | |||
519 | def prepare_empty_partition_ext(self, cr_workdir, oe_builddir, | ||
520 | native_sysroot): | ||
521 | """ | ||
522 | Prepare an empty ext2/3/4 partition. | ||
523 | """ | ||
524 | fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype) | ||
525 | |||
526 | dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \ | ||
527 | (fs, self.size) | ||
528 | exec_cmd(dd_cmd) | ||
529 | |||
530 | extra_imagecmd = "-i 8192" | ||
531 | |||
532 | mkfs_cmd = "mkfs.%s -F %s %s" % (self.fstype, extra_imagecmd, fs) | ||
533 | (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot) | ||
534 | if rc: | ||
535 | msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc)) | ||
536 | |||
537 | self.source_file = fs | ||
538 | |||
539 | return 0 | ||
540 | |||
541 | def prepare_empty_partition_btrfs(self, cr_workdir, oe_builddir, | ||
542 | native_sysroot): | ||
543 | """ | ||
544 | Prepare an empty btrfs partition. | ||
545 | """ | ||
546 | fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype) | ||
547 | |||
548 | dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \ | ||
549 | (fs, self.size) | ||
550 | exec_cmd(dd_cmd) | ||
551 | |||
552 | mkfs_cmd = "mkfs.%s -b %d %s" % (self.fstype, self.size * 1024, rootfs) | ||
553 | (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot) | ||
554 | if rc: | ||
555 | msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc)) | ||
556 | |||
557 | mkfs_cmd = "mkfs.%s -F %s %s" % (self.fstype, extra_imagecmd, fs) | ||
558 | (rc, out) = exec_native_cmd(mkfs_cmd, native_sysroot) | ||
559 | if rc: | ||
560 | msger.error("ERROR: mkfs.%s returned '%s' instead of 0 (which you probably don't want to ignore, use --debug for details)" % (self.fstype, rc)) | ||
561 | |||
562 | self.source_file = fs | ||
563 | |||
564 | return 0 | ||
565 | |||
566 | def prepare_empty_partition_vfat(self, cr_workdir, oe_builddir, | ||
567 | native_sysroot): | ||
568 | """ | ||
569 | Prepare an empty vfat partition. | ||
570 | """ | ||
571 | fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype) | ||
572 | |||
573 | blocks = self.size * 1024 | ||
574 | |||
575 | dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (fs, blocks) | ||
576 | exec_native_cmd(dosfs_cmd, native_sysroot) | ||
577 | |||
578 | chmod_cmd = "chmod 644 %s" % fs | ||
579 | exec_cmd(chmod_cmd) | ||
580 | |||
581 | self.source_file = fs | ||
582 | |||
583 | return 0 | ||
584 | |||
585 | def prepare_empty_partition_squashfs(self, cr_workdir, oe_builddir, | ||
586 | native_sysroot): | ||
587 | """ | ||
588 | Prepare an empty squashfs partition. | ||
589 | """ | ||
590 | msger.warning("Creating of an empty squashfs %s partition was attempted. " \ | ||
591 | "Proceeding as requested." % self.mountpoint) | ||
592 | |||
593 | fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype) | ||
594 | |||
595 | # it is not possible to create a squashfs without source data, | ||
596 | # thus prepare an empty temp dir that is used as source | ||
597 | tmpdir = tempfile.mkdtemp() | ||
598 | |||
599 | squashfs_cmd = "mksquashfs %s %s -noappend" % \ | ||
600 | (tmpdir, fs) | ||
601 | exec_native_cmd(squashfs_cmd, native_sysroot) | ||
602 | |||
603 | os.rmdir(tmpdir) | ||
604 | |||
605 | # get the rootfs size in the right units for kickstart (Mb) | ||
606 | du_cmd = "du -Lbms %s" % fs | ||
607 | out = exec_cmd(du_cmd) | ||
608 | fs_size = out.split()[0] | ||
609 | |||
610 | self.size = fs_size | ||
611 | self.source_file = fs | ||
612 | |||
613 | return 0 | ||
614 | |||
615 | def prepare_swap_partition(self, cr_workdir, oe_builddir, native_sysroot): | ||
616 | """ | ||
617 | Prepare a swap partition. | ||
618 | """ | ||
619 | fs = "%s/fs.%s" % (cr_workdir, self.fstype) | ||
620 | |||
621 | dd_cmd = "dd if=/dev/zero of=%s bs=1M seek=%d count=0" % \ | ||
622 | (fs, self.size) | ||
623 | exec_cmd(dd_cmd) | ||
624 | |||
625 | import uuid | ||
626 | label_str = "" | ||
627 | if self.label: | ||
628 | label_str = "-L %s" % self.label | ||
629 | mkswap_cmd = "mkswap %s -U %s %s" % (label_str, str(uuid.uuid1()), fs) | ||
630 | exec_native_cmd(mkswap_cmd, native_sysroot) | ||
631 | |||
632 | self.source_file = fs | ||
633 | |||
634 | return 0 | ||
635 | |||
636 | class Wic_Partition(Mic_Partition): | ||
637 | removedKeywords = Mic_Partition.removedKeywords | ||
638 | removedAttrs = Mic_Partition.removedAttrs | ||
639 | |||
640 | def _getParser(self): | ||
641 | op = Mic_Partition._getParser(self) | ||
642 | # use specified source file to fill the partition | ||
643 | # and calculate partition size | ||
644 | op.add_option("--source", type="string", action="store", | ||
645 | dest="source", default=None) | ||
646 | # comma-separated list of param=value pairs | ||
647 | op.add_option("--sourceparams", type="string", action="store", | ||
648 | dest="sourceparams", default=None) | ||
649 | # use specified rootfs path to fill the partition | ||
650 | op.add_option("--rootfs-dir", type="string", action="store", | ||
651 | dest="rootfs", default=None) | ||
652 | return op | ||
diff --git a/scripts/lib/wic/kickstart/custom_commands/wicboot.py b/scripts/lib/wic/kickstart/custom_commands/wicboot.py new file mode 100644 index 0000000000..f1914169d8 --- /dev/null +++ b/scripts/lib/wic/kickstart/custom_commands/wicboot.py | |||
@@ -0,0 +1,57 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2014, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module provides the OpenEmbedded bootloader object definitions. | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
25 | # | ||
26 | |||
27 | from pykickstart.base import * | ||
28 | from pykickstart.errors import * | ||
29 | from pykickstart.options import * | ||
30 | from pykickstart.commands.bootloader import * | ||
31 | |||
32 | from wic.kickstart.custom_commands.micboot import * | ||
33 | |||
34 | class Wic_Bootloader(Mic_Bootloader): | ||
35 | def __init__(self, writePriority=10, appendLine="", driveorder=None, | ||
36 | forceLBA=False, location="", md5pass="", password="", | ||
37 | upgrade=False, menus=""): | ||
38 | Mic_Bootloader.__init__(self, writePriority, appendLine, driveorder, | ||
39 | forceLBA, location, md5pass, password, upgrade) | ||
40 | |||
41 | self.source = "" | ||
42 | |||
43 | def _getArgsAsStr(self): | ||
44 | retval = Mic_Bootloader._getArgsAsStr(self) | ||
45 | |||
46 | if self.source: | ||
47 | retval += " --source=%s" % self.source | ||
48 | |||
49 | return retval | ||
50 | |||
51 | def _getParser(self): | ||
52 | op = Mic_Bootloader._getParser(self) | ||
53 | # use specified source plugin to implement bootloader-specific methods | ||
54 | op.add_option("--source", type="string", action="store", | ||
55 | dest="source", default=None) | ||
56 | return op | ||
57 | |||
diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py new file mode 100644 index 0000000000..9f557e7b9a --- /dev/null +++ b/scripts/lib/wic/msger.py | |||
@@ -0,0 +1,309 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # vim: ai ts=4 sts=4 et sw=4 | ||
3 | # | ||
4 | # Copyright (c) 2009, 2010, 2011 Intel, Inc. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify it | ||
7 | # under the terms of the GNU General Public License as published by the Free | ||
8 | # Software Foundation; version 2 of the License | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | # for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along | ||
16 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
17 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | import os,sys | ||
20 | import re | ||
21 | import time | ||
22 | |||
23 | __ALL__ = ['set_mode', | ||
24 | 'get_loglevel', | ||
25 | 'set_loglevel', | ||
26 | 'set_logfile', | ||
27 | 'raw', | ||
28 | 'debug', | ||
29 | 'verbose', | ||
30 | 'info', | ||
31 | 'warning', | ||
32 | 'error', | ||
33 | 'ask', | ||
34 | 'pause', | ||
35 | ] | ||
36 | |||
37 | # COLORs in ANSI | ||
38 | INFO_COLOR = 32 # green | ||
39 | WARN_COLOR = 33 # yellow | ||
40 | ERR_COLOR = 31 # red | ||
41 | ASK_COLOR = 34 # blue | ||
42 | NO_COLOR = 0 | ||
43 | |||
44 | PREFIX_RE = re.compile('^<(.*?)>\s*(.*)', re.S) | ||
45 | |||
46 | INTERACTIVE = True | ||
47 | |||
48 | LOG_LEVEL = 1 | ||
49 | LOG_LEVELS = { | ||
50 | 'quiet': 0, | ||
51 | 'normal': 1, | ||
52 | 'verbose': 2, | ||
53 | 'debug': 3, | ||
54 | 'never': 4, | ||
55 | } | ||
56 | |||
57 | LOG_FILE_FP = None | ||
58 | LOG_CONTENT = '' | ||
59 | CATCHERR_BUFFILE_FD = -1 | ||
60 | CATCHERR_BUFFILE_PATH = None | ||
61 | CATCHERR_SAVED_2 = -1 | ||
62 | |||
63 | def _general_print(head, color, msg = None, stream = None, level = 'normal'): | ||
64 | global LOG_CONTENT | ||
65 | if not stream: | ||
66 | stream = sys.stdout | ||
67 | |||
68 | if LOG_LEVELS[level] > LOG_LEVEL: | ||
69 | # skip | ||
70 | return | ||
71 | |||
72 | # encode raw 'unicode' str to utf8 encoded str | ||
73 | if msg and isinstance(msg, unicode): | ||
74 | msg = msg.encode('utf-8', 'ignore') | ||
75 | |||
76 | errormsg = '' | ||
77 | if CATCHERR_BUFFILE_FD > 0: | ||
78 | size = os.lseek(CATCHERR_BUFFILE_FD , 0, os.SEEK_END) | ||
79 | os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_SET) | ||
80 | errormsg = os.read(CATCHERR_BUFFILE_FD, size) | ||
81 | os.ftruncate(CATCHERR_BUFFILE_FD, 0) | ||
82 | |||
83 | # append error msg to LOG | ||
84 | if errormsg: | ||
85 | LOG_CONTENT += errormsg | ||
86 | |||
87 | # append normal msg to LOG | ||
88 | save_msg = msg.strip() if msg else None | ||
89 | if save_msg: | ||
90 | timestr = time.strftime("[%m/%d %H:%M:%S %Z] ", time.localtime()) | ||
91 | LOG_CONTENT += timestr + save_msg + '\n' | ||
92 | |||
93 | if errormsg: | ||
94 | _color_print('', NO_COLOR, errormsg, stream, level) | ||
95 | |||
96 | _color_print(head, color, msg, stream, level) | ||
97 | |||
98 | def _color_print(head, color, msg, stream, level): | ||
99 | colored = True | ||
100 | if color == NO_COLOR or \ | ||
101 | not stream.isatty() or \ | ||
102 | os.getenv('ANSI_COLORS_DISABLED') is not None: | ||
103 | colored = False | ||
104 | |||
105 | if head.startswith('\r'): | ||
106 | # need not \n at last | ||
107 | newline = False | ||
108 | else: | ||
109 | newline = True | ||
110 | |||
111 | if colored: | ||
112 | head = '\033[%dm%s:\033[0m ' %(color, head) | ||
113 | if not newline: | ||
114 | # ESC cmd to clear line | ||
115 | head = '\033[2K' + head | ||
116 | else: | ||
117 | if head: | ||
118 | head += ': ' | ||
119 | if head.startswith('\r'): | ||
120 | head = head.lstrip() | ||
121 | newline = True | ||
122 | |||
123 | if msg is not None: | ||
124 | if isinstance(msg, unicode): | ||
125 | msg = msg.encode('utf8', 'ignore') | ||
126 | |||
127 | stream.write('%s%s' % (head, msg)) | ||
128 | if newline: | ||
129 | stream.write('\n') | ||
130 | |||
131 | stream.flush() | ||
132 | |||
133 | def _color_perror(head, color, msg, level = 'normal'): | ||
134 | if CATCHERR_BUFFILE_FD > 0: | ||
135 | _general_print(head, color, msg, sys.stdout, level) | ||
136 | else: | ||
137 | _general_print(head, color, msg, sys.stderr, level) | ||
138 | |||
139 | def _split_msg(head, msg): | ||
140 | if isinstance(msg, list): | ||
141 | msg = '\n'.join(map(str, msg)) | ||
142 | |||
143 | if msg.startswith('\n'): | ||
144 | # means print \n at first | ||
145 | msg = msg.lstrip() | ||
146 | head = '\n' + head | ||
147 | |||
148 | elif msg.startswith('\r'): | ||
149 | # means print \r at first | ||
150 | msg = msg.lstrip() | ||
151 | head = '\r' + head | ||
152 | |||
153 | m = PREFIX_RE.match(msg) | ||
154 | if m: | ||
155 | head += ' <%s>' % m.group(1) | ||
156 | msg = m.group(2) | ||
157 | |||
158 | return head, msg | ||
159 | |||
160 | def get_loglevel(): | ||
161 | return (k for k,v in LOG_LEVELS.items() if v==LOG_LEVEL).next() | ||
162 | |||
163 | def set_loglevel(level): | ||
164 | global LOG_LEVEL | ||
165 | if level not in LOG_LEVELS: | ||
166 | # no effect | ||
167 | return | ||
168 | |||
169 | LOG_LEVEL = LOG_LEVELS[level] | ||
170 | |||
171 | def set_interactive(mode=True): | ||
172 | global INTERACTIVE | ||
173 | if mode: | ||
174 | INTERACTIVE = True | ||
175 | else: | ||
176 | INTERACTIVE = False | ||
177 | |||
178 | def log(msg=''): | ||
179 | # log msg to LOG_CONTENT then save to logfile | ||
180 | global LOG_CONTENT | ||
181 | if msg: | ||
182 | LOG_CONTENT += msg | ||
183 | |||
184 | def raw(msg=''): | ||
185 | _general_print('', NO_COLOR, msg) | ||
186 | |||
187 | def info(msg): | ||
188 | head, msg = _split_msg('Info', msg) | ||
189 | _general_print(head, INFO_COLOR, msg) | ||
190 | |||
191 | def verbose(msg): | ||
192 | head, msg = _split_msg('Verbose', msg) | ||
193 | _general_print(head, INFO_COLOR, msg, level = 'verbose') | ||
194 | |||
195 | def warning(msg): | ||
196 | head, msg = _split_msg('Warning', msg) | ||
197 | _color_perror(head, WARN_COLOR, msg) | ||
198 | |||
199 | def debug(msg): | ||
200 | head, msg = _split_msg('Debug', msg) | ||
201 | _color_perror(head, ERR_COLOR, msg, level = 'debug') | ||
202 | |||
203 | def error(msg): | ||
204 | head, msg = _split_msg('Error', msg) | ||
205 | _color_perror(head, ERR_COLOR, msg) | ||
206 | sys.exit(1) | ||
207 | |||
208 | def ask(msg, default=True): | ||
209 | _general_print('\rQ', ASK_COLOR, '') | ||
210 | try: | ||
211 | if default: | ||
212 | msg += '(Y/n) ' | ||
213 | else: | ||
214 | msg += '(y/N) ' | ||
215 | if INTERACTIVE: | ||
216 | while True: | ||
217 | repl = raw_input(msg) | ||
218 | if repl.lower() == 'y': | ||
219 | return True | ||
220 | elif repl.lower() == 'n': | ||
221 | return False | ||
222 | elif not repl.strip(): | ||
223 | # <Enter> | ||
224 | return default | ||
225 | |||
226 | # else loop | ||
227 | else: | ||
228 | if default: | ||
229 | msg += ' Y' | ||
230 | else: | ||
231 | msg += ' N' | ||
232 | _general_print('', NO_COLOR, msg) | ||
233 | |||
234 | return default | ||
235 | except KeyboardInterrupt: | ||
236 | sys.stdout.write('\n') | ||
237 | sys.exit(2) | ||
238 | |||
239 | def choice(msg, choices, default=0): | ||
240 | if default >= len(choices): | ||
241 | return None | ||
242 | _general_print('\rQ', ASK_COLOR, '') | ||
243 | try: | ||
244 | msg += " [%s] " % '/'.join(choices) | ||
245 | if INTERACTIVE: | ||
246 | while True: | ||
247 | repl = raw_input(msg) | ||
248 | if repl in choices: | ||
249 | return repl | ||
250 | elif not repl.strip(): | ||
251 | return choices[default] | ||
252 | else: | ||
253 | msg += choices[default] | ||
254 | _general_print('', NO_COLOR, msg) | ||
255 | |||
256 | return choices[default] | ||
257 | except KeyboardInterrupt: | ||
258 | sys.stdout.write('\n') | ||
259 | sys.exit(2) | ||
260 | |||
261 | def pause(msg=None): | ||
262 | if INTERACTIVE: | ||
263 | _general_print('\rQ', ASK_COLOR, '') | ||
264 | if msg is None: | ||
265 | msg = 'press <ENTER> to continue ...' | ||
266 | raw_input(msg) | ||
267 | |||
268 | def set_logfile(fpath): | ||
269 | global LOG_FILE_FP | ||
270 | |||
271 | def _savelogf(): | ||
272 | if LOG_FILE_FP: | ||
273 | fp = open(LOG_FILE_FP, 'w') | ||
274 | fp.write(LOG_CONTENT) | ||
275 | fp.close() | ||
276 | |||
277 | if LOG_FILE_FP is not None: | ||
278 | warning('duplicate log file configuration') | ||
279 | |||
280 | LOG_FILE_FP = fpath | ||
281 | |||
282 | import atexit | ||
283 | atexit.register(_savelogf) | ||
284 | |||
285 | def enable_logstderr(fpath): | ||
286 | global CATCHERR_BUFFILE_FD | ||
287 | global CATCHERR_BUFFILE_PATH | ||
288 | global CATCHERR_SAVED_2 | ||
289 | |||
290 | if os.path.exists(fpath): | ||
291 | os.remove(fpath) | ||
292 | CATCHERR_BUFFILE_PATH = fpath | ||
293 | CATCHERR_BUFFILE_FD = os.open(CATCHERR_BUFFILE_PATH, os.O_RDWR|os.O_CREAT) | ||
294 | CATCHERR_SAVED_2 = os.dup(2) | ||
295 | os.dup2(CATCHERR_BUFFILE_FD, 2) | ||
296 | |||
297 | def disable_logstderr(): | ||
298 | global CATCHERR_BUFFILE_FD | ||
299 | global CATCHERR_BUFFILE_PATH | ||
300 | global CATCHERR_SAVED_2 | ||
301 | |||
302 | raw(msg = None) # flush message buffer and print it. | ||
303 | os.dup2(CATCHERR_SAVED_2, 2) | ||
304 | os.close(CATCHERR_SAVED_2) | ||
305 | os.close(CATCHERR_BUFFILE_FD) | ||
306 | os.unlink(CATCHERR_BUFFILE_PATH) | ||
307 | CATCHERR_BUFFILE_FD = -1 | ||
308 | CATCHERR_BUFFILE_PATH = None | ||
309 | CATCHERR_SAVED_2 = -1 | ||
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py new file mode 100644 index 0000000000..41a80175ca --- /dev/null +++ b/scripts/lib/wic/plugin.py | |||
@@ -0,0 +1,156 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2011 Intel, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU General Public License as published by the Free | ||
7 | # Software Foundation; version 2 of the License | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | # for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
16 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | |||
18 | import os, sys | ||
19 | |||
20 | from wic import msger | ||
21 | from wic import pluginbase | ||
22 | from wic.utils import errors | ||
23 | from wic.utils.oe.misc import * | ||
24 | |||
25 | __ALL__ = ['PluginMgr', 'pluginmgr'] | ||
26 | |||
27 | PLUGIN_TYPES = ["imager", "source"] | ||
28 | |||
29 | PLUGIN_DIR = "/lib/wic/plugins" # relative to scripts | ||
30 | SCRIPTS_PLUGIN_DIR = "scripts" + PLUGIN_DIR | ||
31 | |||
32 | class PluginMgr(object): | ||
33 | plugin_dirs = {} | ||
34 | |||
35 | # make the manager class as singleton | ||
36 | _instance = None | ||
37 | def __new__(cls, *args, **kwargs): | ||
38 | if not cls._instance: | ||
39 | cls._instance = super(PluginMgr, cls).__new__(cls, *args, **kwargs) | ||
40 | |||
41 | return cls._instance | ||
42 | |||
43 | def __init__(self): | ||
44 | wic_path = os.path.dirname(__file__) | ||
45 | eos = wic_path.find('scripts') + len('scripts') | ||
46 | scripts_path = wic_path[:eos] | ||
47 | self.scripts_path = scripts_path | ||
48 | self.plugin_dir = scripts_path + PLUGIN_DIR | ||
49 | self.layers_path = None | ||
50 | |||
51 | def _build_plugin_dir_list(self, dl, ptype): | ||
52 | if self.layers_path is None: | ||
53 | self.layers_path = get_bitbake_var("BBLAYERS") | ||
54 | layer_dirs = [] | ||
55 | |||
56 | if self.layers_path is not None: | ||
57 | for layer_path in self.layers_path.split(): | ||
58 | path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR, ptype) | ||
59 | layer_dirs.append(path) | ||
60 | |||
61 | path = os.path.join(dl, ptype) | ||
62 | layer_dirs.append(path) | ||
63 | |||
64 | return layer_dirs | ||
65 | |||
66 | def append_dirs(self, dirs): | ||
67 | for path in dirs: | ||
68 | self._add_plugindir(path) | ||
69 | |||
70 | # load all the plugins AGAIN | ||
71 | self._load_all() | ||
72 | |||
73 | def _add_plugindir(self, path): | ||
74 | path = os.path.abspath(os.path.expanduser(path)) | ||
75 | |||
76 | if not os.path.isdir(path): | ||
77 | msger.debug("Plugin dir is not a directory or does not exist: %s"\ | ||
78 | % path) | ||
79 | return | ||
80 | |||
81 | if path not in self.plugin_dirs: | ||
82 | self.plugin_dirs[path] = False | ||
83 | # the value True/False means "loaded" | ||
84 | |||
85 | def _load_all(self): | ||
86 | for (pdir, loaded) in self.plugin_dirs.iteritems(): | ||
87 | if loaded: continue | ||
88 | |||
89 | sys.path.insert(0, pdir) | ||
90 | for mod in [x[:-3] for x in os.listdir(pdir) if x.endswith(".py")]: | ||
91 | if mod and mod != '__init__': | ||
92 | if mod in sys.modules: | ||
93 | #self.plugin_dirs[pdir] = True | ||
94 | msger.warning("Module %s already exists, skip" % mod) | ||
95 | else: | ||
96 | try: | ||
97 | pymod = __import__(mod) | ||
98 | self.plugin_dirs[pdir] = True | ||
99 | msger.debug("Plugin module %s:%s imported"\ | ||
100 | % (mod, pymod.__file__)) | ||
101 | except ImportError, err: | ||
102 | msg = 'Failed to load plugin %s/%s: %s' \ | ||
103 | % (os.path.basename(pdir), mod, err) | ||
104 | msger.warning(msg) | ||
105 | |||
106 | del(sys.path[0]) | ||
107 | |||
108 | def get_plugins(self, ptype): | ||
109 | """ the return value is dict of name:class pairs """ | ||
110 | |||
111 | if ptype not in PLUGIN_TYPES: | ||
112 | raise errors.CreatorError('%s is not valid plugin type' % ptype) | ||
113 | |||
114 | plugins_dir = self._build_plugin_dir_list(self.plugin_dir, ptype) | ||
115 | |||
116 | self.append_dirs(plugins_dir) | ||
117 | |||
118 | return pluginbase.get_plugins(ptype) | ||
119 | |||
120 | def get_source_plugins(self): | ||
121 | """ | ||
122 | Return list of available source plugins. | ||
123 | """ | ||
124 | plugins_dir = self._build_plugin_dir_list(self.plugin_dir, 'source') | ||
125 | |||
126 | self.append_dirs(plugins_dir) | ||
127 | |||
128 | plugins = [] | ||
129 | |||
130 | for _source_name, klass in self.get_plugins('source').iteritems(): | ||
131 | plugins.append(_source_name) | ||
132 | |||
133 | return plugins | ||
134 | |||
135 | |||
136 | def get_source_plugin_methods(self, source_name, methods): | ||
137 | """ | ||
138 | The methods param is a dict with the method names to find. On | ||
139 | return, the dict values will be filled in with pointers to the | ||
140 | corresponding methods. If one or more methods are not found, | ||
141 | None is returned. | ||
142 | """ | ||
143 | return_methods = None | ||
144 | for _source_name, klass in self.get_plugins('source').iteritems(): | ||
145 | if _source_name == source_name: | ||
146 | for _method_name in methods.keys(): | ||
147 | if not hasattr(klass, _method_name): | ||
148 | msger.warning("Unimplemented %s source interface for: %s"\ | ||
149 | % (_method_name, _source_name)) | ||
150 | return None | ||
151 | func = getattr(klass, _method_name) | ||
152 | methods[_method_name] = func | ||
153 | return_methods = methods | ||
154 | return return_methods | ||
155 | |||
156 | pluginmgr = PluginMgr() | ||
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py new file mode 100644 index 0000000000..d63e34e089 --- /dev/null +++ b/scripts/lib/wic/pluginbase.py | |||
@@ -0,0 +1,120 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2011 Intel, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU General Public License as published by the Free | ||
7 | # Software Foundation; version 2 of the License | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | # for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
16 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | |||
18 | import os | ||
19 | import shutil | ||
20 | from wic import msger | ||
21 | from wic.utils import errors | ||
22 | |||
23 | class _Plugin(object): | ||
24 | class __metaclass__(type): | ||
25 | def __init__(cls, name, bases, attrs): | ||
26 | if not hasattr(cls, 'plugins'): | ||
27 | cls.plugins = {} | ||
28 | |||
29 | elif 'wic_plugin_type' in attrs: | ||
30 | if attrs['wic_plugin_type'] not in cls.plugins: | ||
31 | cls.plugins[attrs['wic_plugin_type']] = {} | ||
32 | |||
33 | elif hasattr(cls, 'wic_plugin_type') and 'name' in attrs: | ||
34 | cls.plugins[cls.wic_plugin_type][attrs['name']] = cls | ||
35 | |||
36 | def show_plugins(cls): | ||
37 | for cls in cls.plugins[cls.wic_plugin_type]: | ||
38 | print cls | ||
39 | |||
40 | def get_plugins(cls): | ||
41 | return cls.plugins | ||
42 | |||
43 | |||
44 | class ImagerPlugin(_Plugin): | ||
45 | wic_plugin_type = "imager" | ||
46 | |||
47 | |||
48 | class SourcePlugin(_Plugin): | ||
49 | wic_plugin_type = "source" | ||
50 | """ | ||
51 | The methods that can be implemented by --source plugins. | ||
52 | |||
53 | Any methods not implemented in a subclass inherit these. | ||
54 | """ | ||
55 | |||
56 | @classmethod | ||
57 | def do_install_pkgs(self, part, creator, cr_workdir, oe_builddir, rootfs_dir, | ||
58 | bootimg_dir, kernel_dir, native_sysroot): | ||
59 | """ | ||
60 | Called before partitions have been prepared and assembled into a | ||
61 | disk image. Install packages into rootfs | ||
62 | """ | ||
63 | msger.debug("SourcePlugin: do_install_pkgs: part %s" % part) | ||
64 | |||
65 | @classmethod | ||
66 | def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir, | ||
67 | bootimg_dir, kernel_dir, native_sysroot): | ||
68 | """ | ||
69 | Called after all partitions have been prepared and assembled into a | ||
70 | disk image. This provides a hook to allow finalization of a | ||
71 | disk image e.g. to write an MBR to it. | ||
72 | """ | ||
73 | msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name) | ||
74 | |||
75 | @classmethod | ||
76 | def do_stage_partition(self, part, source_params, cr, cr_workdir, | ||
77 | oe_builddir, bootimg_dir, kernel_dir, | ||
78 | native_sysroot): | ||
79 | """ | ||
80 | Special content staging hook called before do_prepare_partition(), | ||
81 | normally empty. | ||
82 | |||
83 | Typically, a partition will just use the passed-in parame e.g | ||
84 | straight bootimg_dir, etc, but in some cases, things need to | ||
85 | be more tailored e.g. to use a deploy dir + /boot, etc. This | ||
86 | hook allows those files to be staged in a customized fashion. | ||
87 | Not that get_bitbake_var() allows you to acces non-standard | ||
88 | variables that you might want to use for this. | ||
89 | """ | ||
90 | msger.debug("SourcePlugin: do_stage_partition: part: %s" % part) | ||
91 | |||
92 | @classmethod | ||
93 | def do_configure_partition(self, part, source_params, cr, cr_workdir, | ||
94 | oe_builddir, bootimg_dir, kernel_dir, | ||
95 | native_sysroot): | ||
96 | """ | ||
97 | Called before do_prepare_partition(), typically used to create | ||
98 | custom configuration files for a partition, for example | ||
99 | syslinux or grub config files. | ||
100 | """ | ||
101 | msger.debug("SourcePlugin: do_configure_partition: part: %s" % part) | ||
102 | |||
103 | @classmethod | ||
104 | def do_prepare_partition(self, part, source_params, cr, cr_workdir, | ||
105 | oe_builddir, bootimg_dir, kernel_dir, rootfs_dir, | ||
106 | native_sysroot): | ||
107 | """ | ||
108 | Called to do the actual content population for a partition i.e. it | ||
109 | 'prepares' the partition to be incorporated into the image. | ||
110 | """ | ||
111 | msger.debug("SourcePlugin: do_prepare_partition: part: %s" % part) | ||
112 | |||
113 | def get_plugins(typen): | ||
114 | ps = ImagerPlugin.get_plugins() | ||
115 | if typen in ps: | ||
116 | return ps[typen] | ||
117 | else: | ||
118 | return None | ||
119 | |||
120 | __all__ = ['ImagerPlugin', 'SourcePlugin', 'get_plugins'] | ||
diff --git a/scripts/lib/wic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py new file mode 100644 index 0000000000..5601c3f1c9 --- /dev/null +++ b/scripts/lib/wic/plugins/imager/direct_plugin.py | |||
@@ -0,0 +1,98 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This implements the 'direct' imager plugin class for 'wic' | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
25 | # | ||
26 | |||
27 | import os | ||
28 | import shutil | ||
29 | import re | ||
30 | import tempfile | ||
31 | |||
32 | from wic import msger | ||
33 | from wic.utils import misc, fs_related, errors, runner, cmdln | ||
34 | from wic.conf import configmgr | ||
35 | from wic.plugin import pluginmgr | ||
36 | |||
37 | import wic.imager.direct as direct | ||
38 | from wic.pluginbase import ImagerPlugin | ||
39 | |||
40 | class DirectPlugin(ImagerPlugin): | ||
41 | name = 'direct' | ||
42 | |||
43 | @classmethod | ||
44 | def __rootfs_dir_to_dict(self, rootfs_dirs): | ||
45 | """ | ||
46 | Gets a string that contain 'connection=dir' splitted by | ||
47 | space and return a dict | ||
48 | """ | ||
49 | krootfs_dir = {} | ||
50 | for rootfs_dir in rootfs_dirs.split(' '): | ||
51 | k, v = rootfs_dir.split('=') | ||
52 | krootfs_dir[k] = v | ||
53 | |||
54 | return krootfs_dir | ||
55 | |||
56 | @classmethod | ||
57 | def do_create(self, subcmd, opts, *args): | ||
58 | """ | ||
59 | Create direct image, called from creator as 'direct' cmd | ||
60 | """ | ||
61 | if len(args) != 7: | ||
62 | raise errors.Usage("Extra arguments given") | ||
63 | |||
64 | native_sysroot = args[0] | ||
65 | kernel_dir = args[1] | ||
66 | bootimg_dir = args[2] | ||
67 | rootfs_dir = args[3] | ||
68 | |||
69 | creatoropts = configmgr.create | ||
70 | ksconf = args[4] | ||
71 | |||
72 | image_output_dir = args[5] | ||
73 | oe_builddir = args[6] | ||
74 | |||
75 | krootfs_dir = self.__rootfs_dir_to_dict(rootfs_dir) | ||
76 | |||
77 | configmgr._ksconf = ksconf | ||
78 | |||
79 | creator = direct.DirectImageCreator(oe_builddir, | ||
80 | image_output_dir, | ||
81 | krootfs_dir, | ||
82 | bootimg_dir, | ||
83 | kernel_dir, | ||
84 | native_sysroot, | ||
85 | creatoropts) | ||
86 | |||
87 | try: | ||
88 | creator.create() | ||
89 | creator.assemble() | ||
90 | creator.finalize() | ||
91 | creator.print_outimage_info() | ||
92 | |||
93 | except errors.CreatorError: | ||
94 | raise | ||
95 | finally: | ||
96 | creator.cleanup() | ||
97 | |||
98 | return 0 | ||
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py new file mode 100644 index 0000000000..e4067b6dbf --- /dev/null +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
@@ -0,0 +1,236 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2014, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This implements the 'bootimg-efi' source plugin class for 'wic' | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
25 | # | ||
26 | |||
27 | import os | ||
28 | import shutil | ||
29 | import re | ||
30 | import tempfile | ||
31 | |||
32 | from wic import kickstart, msger | ||
33 | from wic.utils import misc, fs_related, errors, runner, cmdln | ||
34 | from wic.conf import configmgr | ||
35 | from wic.plugin import pluginmgr | ||
36 | import wic.imager.direct as direct | ||
37 | from wic.pluginbase import SourcePlugin | ||
38 | from wic.utils.oe.misc import * | ||
39 | from wic.imager.direct import DirectImageCreator | ||
40 | |||
41 | class BootimgEFIPlugin(SourcePlugin): | ||
42 | name = 'bootimg-efi' | ||
43 | |||
44 | @classmethod | ||
45 | def do_configure_grubefi(self, hdddir, cr, cr_workdir): | ||
46 | """ | ||
47 | Create loader-specific (grub-efi) config | ||
48 | """ | ||
49 | splash = os.path.join(cr_workdir, "/EFI/boot/splash.jpg") | ||
50 | if os.path.exists(splash): | ||
51 | splashline = "menu background splash.jpg" | ||
52 | else: | ||
53 | splashline = "" | ||
54 | |||
55 | (rootdev, root_part_uuid) = cr._get_boot_config() | ||
56 | options = cr.ks.handler.bootloader.appendLine | ||
57 | |||
58 | grubefi_conf = "" | ||
59 | grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n" | ||
60 | grubefi_conf += "default=boot\n" | ||
61 | timeout = kickstart.get_timeout(cr.ks) | ||
62 | if not timeout: | ||
63 | timeout = 0 | ||
64 | grubefi_conf += "timeout=%s\n" % timeout | ||
65 | grubefi_conf += "menuentry 'boot'{\n" | ||
66 | |||
67 | kernel = "/bzImage" | ||
68 | |||
69 | if cr._ptable_format == 'msdos': | ||
70 | rootstr = rootdev | ||
71 | else: | ||
72 | raise ImageError("Unsupported partition table format found") | ||
73 | |||
74 | grubefi_conf += "linux %s root=%s rootwait %s\n" \ | ||
75 | % (kernel, rootstr, options) | ||
76 | grubefi_conf += "}\n" | ||
77 | if splashline: | ||
78 | syslinux_conf += "%s\n" % splashline | ||
79 | |||
80 | msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \ | ||
81 | % cr_workdir) | ||
82 | cfg = open("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, "w") | ||
83 | cfg.write(grubefi_conf) | ||
84 | cfg.close() | ||
85 | |||
86 | @classmethod | ||
87 | def do_configure_gummiboot(self, hdddir, cr, cr_workdir): | ||
88 | """ | ||
89 | Create loader-specific (gummiboot) config | ||
90 | """ | ||
91 | install_cmd = "install -d %s/loader" % hdddir | ||
92 | exec_cmd(install_cmd) | ||
93 | |||
94 | install_cmd = "install -d %s/loader/entries" % hdddir | ||
95 | exec_cmd(install_cmd) | ||
96 | |||
97 | (rootdev, root_part_uuid) = cr._get_boot_config() | ||
98 | options = cr.ks.handler.bootloader.appendLine | ||
99 | |||
100 | timeout = kickstart.get_timeout(cr.ks) | ||
101 | if not timeout: | ||
102 | timeout = 0 | ||
103 | |||
104 | loader_conf = "" | ||
105 | loader_conf += "default boot\n" | ||
106 | loader_conf += "timeout %d\n" % timeout | ||
107 | |||
108 | msger.debug("Writing gummiboot config %s/hdd/boot/loader/loader.conf" \ | ||
109 | % cr_workdir) | ||
110 | cfg = open("%s/hdd/boot/loader/loader.conf" % cr_workdir, "w") | ||
111 | cfg.write(loader_conf) | ||
112 | cfg.close() | ||
113 | |||
114 | kernel = "/bzImage" | ||
115 | |||
116 | if cr._ptable_format == 'msdos': | ||
117 | rootstr = rootdev | ||
118 | else: | ||
119 | raise ImageError("Unsupported partition table format found") | ||
120 | |||
121 | boot_conf = "" | ||
122 | boot_conf += "title boot\n" | ||
123 | boot_conf += "linux %s\n" % kernel | ||
124 | boot_conf += "options LABEL=Boot root=%s %s\n" \ | ||
125 | % (rootstr, options) | ||
126 | |||
127 | msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \ | ||
128 | % cr_workdir) | ||
129 | cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w") | ||
130 | cfg.write(boot_conf) | ||
131 | cfg.close() | ||
132 | |||
133 | |||
134 | @classmethod | ||
135 | def do_configure_partition(self, part, source_params, cr, cr_workdir, | ||
136 | oe_builddir, bootimg_dir, kernel_dir, | ||
137 | native_sysroot): | ||
138 | """ | ||
139 | Called before do_prepare_partition(), creates loader-specific config | ||
140 | """ | ||
141 | hdddir = "%s/hdd/boot" % cr_workdir | ||
142 | rm_cmd = "rm -rf %s" % cr_workdir | ||
143 | exec_cmd(rm_cmd) | ||
144 | |||
145 | install_cmd = "install -d %s/EFI/BOOT" % hdddir | ||
146 | exec_cmd(install_cmd) | ||
147 | |||
148 | try: | ||
149 | if source_params['loader'] == 'grub-efi': | ||
150 | self.do_configure_grubefi(hdddir, cr, cr_workdir) | ||
151 | elif source_params['loader'] == 'gummiboot': | ||
152 | self.do_configure_gummiboot(hdddir, cr, cr_workdir) | ||
153 | else: | ||
154 | msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader']) | ||
155 | except KeyError: | ||
156 | msger.error("bootimg-efi requires a loader, none specified") | ||
157 | |||
158 | |||
159 | @classmethod | ||
160 | def do_prepare_partition(self, part, source_params, cr, cr_workdir, | ||
161 | oe_builddir, bootimg_dir, kernel_dir, | ||
162 | rootfs_dir, native_sysroot): | ||
163 | """ | ||
164 | Called to do the actual content population for a partition i.e. it | ||
165 | 'prepares' the partition to be incorporated into the image. | ||
166 | In this case, prepare content for an EFI (grub) boot partition. | ||
167 | """ | ||
168 | if not bootimg_dir: | ||
169 | bootimg_dir = get_bitbake_var("HDDDIR") | ||
170 | if not bootimg_dir: | ||
171 | msger.error("Couldn't find HDDDIR, exiting\n") | ||
172 | # just so the result notes display it | ||
173 | cr.set_bootimg_dir(bootimg_dir) | ||
174 | |||
175 | staging_kernel_dir = kernel_dir | ||
176 | |||
177 | hdddir = "%s/hdd/boot" % cr_workdir | ||
178 | |||
179 | install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \ | ||
180 | (staging_kernel_dir, hdddir) | ||
181 | exec_cmd(install_cmd) | ||
182 | |||
183 | try: | ||
184 | if source_params['loader'] == 'grub-efi': | ||
185 | shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, | ||
186 | "%s/grub.cfg" % cr_workdir) | ||
187 | cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir) | ||
188 | exec_cmd(cp_cmd, True) | ||
189 | shutil.move("%s/grub.cfg" % cr_workdir, | ||
190 | "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir) | ||
191 | elif source_params['loader'] == 'gummiboot': | ||
192 | cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir) | ||
193 | exec_cmd(cp_cmd, True) | ||
194 | else: | ||
195 | msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader']) | ||
196 | except KeyError: | ||
197 | msger.error("bootimg-efi requires a loader, none specified") | ||
198 | |||
199 | du_cmd = "du -bks %s" % hdddir | ||
200 | out = exec_cmd(du_cmd) | ||
201 | blocks = int(out.split()[0]) | ||
202 | |||
203 | extra_blocks = part.get_extra_block_count(blocks) | ||
204 | |||
205 | if extra_blocks < BOOTDD_EXTRA_SPACE: | ||
206 | extra_blocks = BOOTDD_EXTRA_SPACE | ||
207 | |||
208 | blocks += extra_blocks | ||
209 | |||
210 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
211 | (extra_blocks, part.mountpoint, blocks)) | ||
212 | |||
213 | # Ensure total sectors is an integral number of sectors per | ||
214 | # track or mcopy will complain. Sectors are 512 bytes, and we | ||
215 | # generate images with 32 sectors per track. This calculation is | ||
216 | # done in blocks, thus the mod by 16 instead of 32. | ||
217 | blocks += (16 - (blocks % 16)) | ||
218 | |||
219 | # dosfs image, created by mkdosfs | ||
220 | bootimg = "%s/boot.img" % cr_workdir | ||
221 | |||
222 | dosfs_cmd = "mkdosfs -n efi -C %s %d" % (bootimg, blocks) | ||
223 | exec_native_cmd(dosfs_cmd, native_sysroot) | ||
224 | |||
225 | mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir) | ||
226 | exec_native_cmd(mcopy_cmd, native_sysroot) | ||
227 | |||
228 | chmod_cmd = "chmod 644 %s" % bootimg | ||
229 | exec_cmd(chmod_cmd) | ||
230 | |||
231 | du_cmd = "du -Lbms %s" % bootimg | ||
232 | out = exec_cmd(du_cmd) | ||
233 | bootimg_size = out.split()[0] | ||
234 | |||
235 | part.set_size(bootimg_size) | ||
236 | part.set_source_file(bootimg) | ||
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py new file mode 100644 index 0000000000..564118ad8b --- /dev/null +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py | |||
@@ -0,0 +1,115 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or modify | ||
5 | # it under the terms of the GNU General Public License version 2 as | ||
6 | # published by the Free Software Foundation. | ||
7 | # | ||
8 | # This program is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | # | ||
13 | # You should have received a copy of the GNU General Public License along | ||
14 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | # | ||
17 | # DESCRIPTION | ||
18 | # This implements the 'bootimg-partition' source plugin class for | ||
19 | # 'wic'. The plugin creates an image of boot partition, copying over | ||
20 | # files listed in IMAGE_BOOT_FILES bitbake variable. | ||
21 | # | ||
22 | # AUTHORS | ||
23 | # Maciej Borzecki <maciej.borzecki (at] open-rnd.pl> | ||
24 | # | ||
25 | |||
26 | import os | ||
27 | import re | ||
28 | |||
29 | from wic import msger | ||
30 | from wic.pluginbase import SourcePlugin | ||
31 | from wic.utils.oe.misc import * | ||
32 | |||
33 | class BootimgPartitionPlugin(SourcePlugin): | ||
34 | name = 'bootimg-partition' | ||
35 | |||
36 | @classmethod | ||
37 | def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir, | ||
38 | bootimg_dir, kernel_dir, native_sysroot): | ||
39 | """ | ||
40 | Called after all partitions have been prepared and assembled into a | ||
41 | disk image. Do nothing. | ||
42 | """ | ||
43 | pass | ||
44 | |||
45 | @classmethod | ||
46 | def do_configure_partition(self, part, source_params, cr, cr_workdir, | ||
47 | oe_builddir, bootimg_dir, kernel_dir, | ||
48 | native_sysroot): | ||
49 | """ | ||
50 | Called before do_prepare_partition(). Possibly prepare | ||
51 | configuration files of some sort. | ||
52 | |||
53 | """ | ||
54 | pass | ||
55 | |||
56 | @classmethod | ||
57 | def do_prepare_partition(self, part, source_params, cr, cr_workdir, | ||
58 | oe_builddir, bootimg_dir, kernel_dir, | ||
59 | rootfs_dir, native_sysroot): | ||
60 | """ | ||
61 | Called to do the actual content population for a partition i.e. it | ||
62 | 'prepares' the partition to be incorporated into the image. | ||
63 | In this case, does the following: | ||
64 | - sets up a vfat partition | ||
65 | - copies all files listed in IMAGE_BOOT_FILES variable | ||
66 | """ | ||
67 | hdddir = "%s/boot" % cr_workdir | ||
68 | rm_cmd = "rm -rf %s" % cr_workdir | ||
69 | exec_cmd(rm_cmd) | ||
70 | |||
71 | install_cmd = "install -d %s" % hdddir | ||
72 | exec_cmd(install_cmd) | ||
73 | |||
74 | if not bootimg_dir: | ||
75 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | ||
76 | if not bootimg_dir: | ||
77 | msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") | ||
78 | |||
79 | msger.debug('Bootimg dir: %s' % bootimg_dir) | ||
80 | |||
81 | boot_files = get_bitbake_var("IMAGE_BOOT_FILES") | ||
82 | |||
83 | if not boot_files: | ||
84 | msger.error('No boot files defined, IMAGE_BOOT_FILES unset') | ||
85 | |||
86 | msger.debug('Boot files: %s' % boot_files) | ||
87 | |||
88 | # list of tuples (src_name, dst_name) | ||
89 | deploy_files = [] | ||
90 | for src_entry in re.findall(r'[\w;\-\./]+', boot_files): | ||
91 | if ';' in src_entry: | ||
92 | dst_entry = tuple(src_entry.split(';')) | ||
93 | if not dst_entry[0] or not dst_entry[1]: | ||
94 | msger.error('Malformed boot file entry: %s' % (src_entry)) | ||
95 | else: | ||
96 | dst_entry = (src_entry, src_entry) | ||
97 | |||
98 | msger.debug('Destination entry: %r' % (dst_entry,)) | ||
99 | deploy_files.append(dst_entry) | ||
100 | |||
101 | for deploy_entry in deploy_files: | ||
102 | src, dst = deploy_entry | ||
103 | src_path = os.path.join(bootimg_dir, src) | ||
104 | dst_path = os.path.join(hdddir, dst) | ||
105 | |||
106 | msger.debug('Install %s as %s' % (os.path.basename(src_path), | ||
107 | dst_path)) | ||
108 | install_cmd = "install -m 0644 -D %s %s" \ | ||
109 | % (src_path, dst_path) | ||
110 | exec_cmd(install_cmd) | ||
111 | |||
112 | msger.debug('Prepare boot partition using rootfs in %s' % (hdddir)) | ||
113 | part.prepare_rootfs(cr_workdir, oe_builddir, hdddir, | ||
114 | native_sysroot) | ||
115 | |||
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py new file mode 100644 index 0000000000..8a1aca1ad1 --- /dev/null +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py | |||
@@ -0,0 +1,200 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2014, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This implements the 'bootimg-pcbios' source plugin class for 'wic' | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
25 | # | ||
26 | |||
27 | import os | ||
28 | import shutil | ||
29 | import re | ||
30 | import tempfile | ||
31 | |||
32 | from wic import kickstart, msger | ||
33 | from wic.utils import misc, fs_related, errors, runner, cmdln | ||
34 | from wic.conf import configmgr | ||
35 | from wic.plugin import pluginmgr | ||
36 | import wic.imager.direct as direct | ||
37 | from wic.pluginbase import SourcePlugin | ||
38 | from wic.utils.oe.misc import * | ||
39 | from wic.imager.direct import DirectImageCreator | ||
40 | |||
41 | class BootimgPcbiosPlugin(SourcePlugin): | ||
42 | name = 'bootimg-pcbios' | ||
43 | |||
44 | @classmethod | ||
45 | def do_install_disk(self, disk, disk_name, cr, workdir, oe_builddir, | ||
46 | bootimg_dir, kernel_dir, native_sysroot): | ||
47 | """ | ||
48 | Called after all partitions have been prepared and assembled into a | ||
49 | disk image. In this case, we install the MBR. | ||
50 | """ | ||
51 | mbrfile = "%s/syslinux/" % bootimg_dir | ||
52 | if cr._ptable_format == 'msdos': | ||
53 | mbrfile += "mbr.bin" | ||
54 | |||
55 | if not os.path.exists(mbrfile): | ||
56 | msger.error("Couldn't find %s. If using the -e option, do you have the right MACHINE set in local.conf? If not, is the bootimg_dir path correct?" % mbrfile) | ||
57 | |||
58 | full_path = cr._full_path(workdir, disk_name, "direct") | ||
59 | msger.debug("Installing MBR on disk %s as %s with size %s bytes" \ | ||
60 | % (disk_name, full_path, disk['min_size'])) | ||
61 | |||
62 | rc = runner.show(['dd', 'if=%s' % mbrfile, | ||
63 | 'of=%s' % full_path, 'conv=notrunc']) | ||
64 | if rc != 0: | ||
65 | raise ImageError("Unable to set MBR to %s" % full_path) | ||
66 | |||
67 | @classmethod | ||
68 | def do_configure_partition(self, part, source_params, cr, cr_workdir, | ||
69 | oe_builddir, bootimg_dir, kernel_dir, | ||
70 | native_sysroot): | ||
71 | """ | ||
72 | Called before do_prepare_partition(), creates syslinux config | ||
73 | """ | ||
74 | hdddir = "%s/hdd/boot" % cr_workdir | ||
75 | rm_cmd = "rm -rf " + cr_workdir | ||
76 | exec_cmd(rm_cmd) | ||
77 | |||
78 | install_cmd = "install -d %s" % hdddir | ||
79 | exec_cmd(install_cmd) | ||
80 | |||
81 | splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg") | ||
82 | if os.path.exists(splash): | ||
83 | splashline = "menu background splash.jpg" | ||
84 | else: | ||
85 | splashline = "" | ||
86 | |||
87 | (rootdev, root_part_uuid) = cr._get_boot_config() | ||
88 | options = cr.ks.handler.bootloader.appendLine | ||
89 | |||
90 | syslinux_conf = "" | ||
91 | syslinux_conf += "PROMPT 0\n" | ||
92 | timeout = kickstart.get_timeout(cr.ks) | ||
93 | if not timeout: | ||
94 | timeout = 0 | ||
95 | syslinux_conf += "TIMEOUT " + str(timeout) + "\n" | ||
96 | syslinux_conf += "\n" | ||
97 | syslinux_conf += "ALLOWOPTIONS 1\n" | ||
98 | syslinux_conf += "SERIAL 0 115200\n" | ||
99 | syslinux_conf += "\n" | ||
100 | if splashline: | ||
101 | syslinux_conf += "%s\n" % splashline | ||
102 | syslinux_conf += "DEFAULT boot\n" | ||
103 | syslinux_conf += "LABEL boot\n" | ||
104 | |||
105 | kernel = "/vmlinuz" | ||
106 | syslinux_conf += "KERNEL " + kernel + "\n" | ||
107 | |||
108 | if cr._ptable_format == 'msdos': | ||
109 | rootstr = rootdev | ||
110 | else: | ||
111 | raise ImageError("Unsupported partition table format found") | ||
112 | |||
113 | syslinux_conf += "APPEND label=boot root=%s %s\n" % (rootstr, options) | ||
114 | |||
115 | msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \ | ||
116 | % cr_workdir) | ||
117 | cfg = open("%s/hdd/boot/syslinux.cfg" % cr_workdir, "w") | ||
118 | cfg.write(syslinux_conf) | ||
119 | cfg.close() | ||
120 | |||
121 | @classmethod | ||
122 | def do_prepare_partition(self, part, source_params, cr, cr_workdir, | ||
123 | oe_builddir, bootimg_dir, kernel_dir, | ||
124 | rootfs_dir, native_sysroot): | ||
125 | """ | ||
126 | Called to do the actual content population for a partition i.e. it | ||
127 | 'prepares' the partition to be incorporated into the image. | ||
128 | In this case, prepare content for legacy bios boot partition. | ||
129 | """ | ||
130 | def _has_syslinux(dir): | ||
131 | if dir: | ||
132 | syslinux = "%s/syslinux" % dir | ||
133 | if os.path.exists(syslinux): | ||
134 | return True | ||
135 | return False | ||
136 | |||
137 | if not _has_syslinux(bootimg_dir): | ||
138 | bootimg_dir = get_bitbake_var("STAGING_DATADIR") | ||
139 | if not bootimg_dir: | ||
140 | msger.error("Couldn't find STAGING_DATADIR, exiting\n") | ||
141 | if not _has_syslinux(bootimg_dir): | ||
142 | msger.error("Please build syslinux first\n") | ||
143 | # just so the result notes display it | ||
144 | cr.set_bootimg_dir(bootimg_dir) | ||
145 | |||
146 | staging_kernel_dir = kernel_dir | ||
147 | |||
148 | hdddir = "%s/hdd/boot" % cr_workdir | ||
149 | |||
150 | install_cmd = "install -m 0644 %s/bzImage %s/vmlinuz" \ | ||
151 | % (staging_kernel_dir, hdddir) | ||
152 | exec_cmd(install_cmd) | ||
153 | |||
154 | install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \ | ||
155 | % (bootimg_dir, hdddir) | ||
156 | exec_cmd(install_cmd) | ||
157 | |||
158 | du_cmd = "du -bks %s" % hdddir | ||
159 | out = exec_cmd(du_cmd) | ||
160 | blocks = int(out.split()[0]) | ||
161 | |||
162 | extra_blocks = part.get_extra_block_count(blocks) | ||
163 | |||
164 | if extra_blocks < BOOTDD_EXTRA_SPACE: | ||
165 | extra_blocks = BOOTDD_EXTRA_SPACE | ||
166 | |||
167 | blocks += extra_blocks | ||
168 | |||
169 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
170 | (extra_blocks, part.mountpoint, blocks)) | ||
171 | |||
172 | # Ensure total sectors is an integral number of sectors per | ||
173 | # track or mcopy will complain. Sectors are 512 bytes, and we | ||
174 | # generate images with 32 sectors per track. This calculation is | ||
175 | # done in blocks, thus the mod by 16 instead of 32. | ||
176 | blocks += (16 - (blocks % 16)) | ||
177 | |||
178 | # dosfs image, created by mkdosfs | ||
179 | bootimg = "%s/boot.img" % cr_workdir | ||
180 | |||
181 | dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, blocks) | ||
182 | exec_native_cmd(dosfs_cmd, native_sysroot) | ||
183 | |||
184 | mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir) | ||
185 | exec_native_cmd(mcopy_cmd, native_sysroot) | ||
186 | |||
187 | syslinux_cmd = "syslinux %s" % bootimg | ||
188 | exec_native_cmd(syslinux_cmd, native_sysroot) | ||
189 | |||
190 | chmod_cmd = "chmod 644 %s" % bootimg | ||
191 | exec_cmd(chmod_cmd) | ||
192 | |||
193 | du_cmd = "du -Lbms %s" % bootimg | ||
194 | out = exec_cmd(du_cmd) | ||
195 | bootimg_size = out.split()[0] | ||
196 | |||
197 | part.set_size(bootimg_size) | ||
198 | part.set_source_file(bootimg) | ||
199 | |||
200 | |||
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py new file mode 100644 index 0000000000..a432a18705 --- /dev/null +++ b/scripts/lib/wic/plugins/source/rootfs.py | |||
@@ -0,0 +1,92 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2014, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This implements the 'rootfs' source plugin class for 'wic' | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
25 | # Joao Henrique Ferreira de Freitas <joaohf (at] gmail.com> | ||
26 | # | ||
27 | |||
28 | import os | ||
29 | import shutil | ||
30 | import re | ||
31 | import tempfile | ||
32 | |||
33 | from wic import kickstart, msger | ||
34 | from wic.utils import misc, fs_related, errors, runner, cmdln | ||
35 | from wic.conf import configmgr | ||
36 | from wic.plugin import pluginmgr | ||
37 | import wic.imager.direct as direct | ||
38 | from wic.pluginbase import SourcePlugin | ||
39 | from wic.utils.oe.misc import * | ||
40 | from wic.imager.direct import DirectImageCreator | ||
41 | |||
42 | class RootfsPlugin(SourcePlugin): | ||
43 | name = 'rootfs' | ||
44 | |||
45 | @staticmethod | ||
46 | def __get_rootfs_dir(rootfs_dir): | ||
47 | if os.path.isdir(rootfs_dir): | ||
48 | return rootfs_dir | ||
49 | |||
50 | bitbake_env_lines = find_bitbake_env_lines(rootfs_dir) | ||
51 | if not bitbake_env_lines: | ||
52 | msg = "Couldn't get bitbake environment, exiting." | ||
53 | msger.error(msg) | ||
54 | |||
55 | image_rootfs_dir = find_artifact(bitbake_env_lines, "IMAGE_ROOTFS") | ||
56 | if not os.path.isdir(image_rootfs_dir): | ||
57 | msg = "No valid artifact IMAGE_ROOTFS from image named" | ||
58 | msg += " %s has been found at %s, exiting.\n" % \ | ||
59 | (rootfs_dir, image_rootfs_dir) | ||
60 | msger.error(msg) | ||
61 | |||
62 | return image_rootfs_dir | ||
63 | |||
64 | @classmethod | ||
65 | def do_prepare_partition(self, part, source_params, cr, cr_workdir, | ||
66 | oe_builddir, bootimg_dir, kernel_dir, | ||
67 | krootfs_dir, native_sysroot): | ||
68 | """ | ||
69 | Called to do the actual content population for a partition i.e. it | ||
70 | 'prepares' the partition to be incorporated into the image. | ||
71 | In this case, prepare content for legacy bios boot partition. | ||
72 | """ | ||
73 | if part.rootfs is None: | ||
74 | if not 'ROOTFS_DIR' in krootfs_dir: | ||
75 | msg = "Couldn't find --rootfs-dir, exiting" | ||
76 | msger.error(msg) | ||
77 | rootfs_dir = krootfs_dir['ROOTFS_DIR'] | ||
78 | else: | ||
79 | if part.rootfs in krootfs_dir: | ||
80 | rootfs_dir = krootfs_dir[part.rootfs] | ||
81 | elif part.rootfs: | ||
82 | rootfs_dir = part.rootfs | ||
83 | else: | ||
84 | msg = "Couldn't find --rootfs-dir=%s connection" | ||
85 | msg += " or it is not a valid path, exiting" | ||
86 | msger.error(msg % part.rootfs) | ||
87 | |||
88 | real_rootfs_dir = self.__get_rootfs_dir(rootfs_dir) | ||
89 | |||
90 | part.set_rootfs(real_rootfs_dir) | ||
91 | part.prepare_rootfs(cr_workdir, oe_builddir, real_rootfs_dir, native_sysroot) | ||
92 | |||
diff --git a/scripts/lib/wic/plugins/source/uboot.py b/scripts/lib/wic/plugins/source/uboot.py new file mode 100644 index 0000000000..57cb3cf8fe --- /dev/null +++ b/scripts/lib/wic/plugins/source/uboot.py | |||
@@ -0,0 +1,173 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2014, Enea AB. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This implements the 'uboot' source plugin class for 'wic' | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Adrian Calianu <adrian.calianu (at] enea.com> | ||
25 | # | ||
26 | |||
27 | import os | ||
28 | import shutil | ||
29 | import re | ||
30 | import tempfile | ||
31 | |||
32 | from mic import kickstart, chroot, msger | ||
33 | from mic.utils import misc, fs_related, errors, runner, cmdln | ||
34 | from mic.conf import configmgr | ||
35 | from mic.plugin import pluginmgr | ||
36 | from mic.utils.partitionedfs import PartitionedMount | ||
37 | import mic.imager.direct as direct | ||
38 | from mic.pluginbase import SourcePlugin | ||
39 | from mic.utils.oe.misc import * | ||
40 | from mic.imager.direct import DirectImageCreator | ||
41 | |||
42 | def create_local_rootfs(part, creator, cr_workdir, krootfs_dir, native_sysroot): | ||
43 | # In order to have a full control over rootfs we will make a local copy under workdir | ||
44 | # and change rootfs_dir to new location. | ||
45 | # In this way we can install more than one ROOTFS_DIRs and/or use | ||
46 | # an empty rootfs to install packages, so a rootfs could be generated only from pkgs | ||
47 | # TBD: create workdir/rootfs ; copy rootfs-> workdir/rootfs; set rootfs=workdir/rootfs | ||
48 | |||
49 | cr_workdir = os.path.abspath(cr_workdir) | ||
50 | new_rootfs_dir = "%s/rootfs_%s" % (cr_workdir, creator.name) | ||
51 | |||
52 | rootfs_exists = 1 | ||
53 | if part.rootfs is None: | ||
54 | if not 'ROOTFS_DIR' in krootfs_dir: | ||
55 | msg = "Couldn't find --rootfs-dir, exiting, " | ||
56 | msger.info(msg) | ||
57 | rootfs_exists = 0 | ||
58 | rootfs_dir = krootfs_dir['ROOTFS_DIR'] | ||
59 | creator.rootfs_dir['ROOTFS_DIR'] = new_rootfs_dir | ||
60 | else: | ||
61 | if part.rootfs in krootfs_dir: | ||
62 | rootfs_dir = krootfs_dir[part.rootfs] | ||
63 | creator.rootfs_dir[part.rootfs] = new_rootfs_dir | ||
64 | elif os.path.isdir(part.rootfs): | ||
65 | rootfs_dir = part.rootfs | ||
66 | part.rootfs = new_rootfs_dir | ||
67 | else: | ||
68 | msg = "Couldn't find --rootfs-dir=%s connection" | ||
69 | msg += " or it is not a valid path, exiting" | ||
70 | msger.info(msg % part.rootfs) | ||
71 | rootfs_exists = 0 | ||
72 | creator.rootfs_dir['ROOTFS_DIR'] = new_rootfs_dir | ||
73 | |||
74 | pseudox = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot | ||
75 | pseudox += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % new_rootfs_dir | ||
76 | pseudox += "export PSEUDO_PASSWD=%s;" % new_rootfs_dir | ||
77 | pseudox += "export PSEUDO_NOSYMLINKEXP=1;" | ||
78 | pseudox += "%s/usr/bin/pseudo " % native_sysroot | ||
79 | |||
80 | mkdir_cmd = "mkdir %s" % (new_rootfs_dir) | ||
81 | # rc, out = exec_native_cmd(pseudox + mkdir_cmd, native_sysroot) | ||
82 | rc, out = exec_cmd(mkdir_cmd, True) | ||
83 | |||
84 | if rootfs_exists == 1 and os.path.isdir(rootfs_dir): | ||
85 | defpath = os.environ['PATH'] | ||
86 | os.environ['PATH'] = native_sysroot + "/usr/bin/" + ":/bin:/usr/bin:" | ||
87 | |||
88 | rootfs_dir = os.path.abspath(rootfs_dir) | ||
89 | |||
90 | pseudoc = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot | ||
91 | pseudoc += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir | ||
92 | pseudoc += "export PSEUDO_PASSWD=%s;" % rootfs_dir | ||
93 | pseudoc += "export PSEUDO_NOSYMLINKEXP=1;" | ||
94 | pseudoc += "%s/usr/bin/pseudo " % native_sysroot | ||
95 | |||
96 | tarc_cmd = "tar cvpf %s/rootfs.tar -C %s ." % (cr_workdir, rootfs_dir) | ||
97 | rc, out = exec_native_cmd(pseudoc + tarc_cmd, native_sysroot) | ||
98 | |||
99 | tarx_cmd = "tar xpvf %s/rootfs.tar -C %s" % (cr_workdir, new_rootfs_dir) | ||
100 | rc, out = exec_native_cmd(pseudox + tarx_cmd, native_sysroot) | ||
101 | |||
102 | rm_cmd = "rm %s/rootfs.tar" % cr_workdir | ||
103 | rc, out = exec_cmd(rm_cmd, True) | ||
104 | |||
105 | os.environ['PATH'] += defpath + ":" + native_sysroot + "/usr/bin/" | ||
106 | |||
107 | return new_rootfs_dir | ||
108 | |||
109 | class UBootPlugin(SourcePlugin): | ||
110 | name = 'uboot' | ||
111 | |||
112 | @classmethod | ||
113 | def do_install_pkgs(self, part, creator, cr_workdir, oe_builddir, krootfs_dir, | ||
114 | bootimg_dir, kernel_dir, native_sysroot): | ||
115 | """ | ||
116 | Called before all partitions have been prepared and assembled into a | ||
117 | disk image. Intall packages based on wic configuration. | ||
118 | """ | ||
119 | |||
120 | # set new rootfs_dir | ||
121 | rootfs_dir = create_local_rootfs(part, creator, cr_workdir, krootfs_dir, native_sysroot) | ||
122 | |||
123 | # wks file parsing | ||
124 | packages = kickstart.get_packages(creator.ks) | ||
125 | |||
126 | # wic.conf file parsing = found under 'creator' | ||
127 | local_pkgs_path = creator._local_pkgs_path | ||
128 | repourl = creator.repourl | ||
129 | pkgmgr = creator.pkgmgr_name | ||
130 | |||
131 | # install packages | ||
132 | if packages and pkgmgr in ["opkg"]: | ||
133 | if len(repourl) > 0 : | ||
134 | part.install_pkgs_ipk(cr_workdir, oe_builddir, rootfs_dir, native_sysroot, | ||
135 | packages, repourl) | ||
136 | else: | ||
137 | msger.error("No packages repository provided in wic.conf") | ||
138 | |||
139 | @classmethod | ||
140 | def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir, | ||
141 | kernel_dir, krootfs_dir, native_sysroot): | ||
142 | """ | ||
143 | Called to do the actual content population for a partition i.e. it | ||
144 | 'prepares' the partition to be incorporated into the image. | ||
145 | In this case, prepare content for legacy bios boot partition. | ||
146 | """ | ||
147 | if part.rootfs is None: | ||
148 | if not 'ROOTFS_DIR' in krootfs_dir: | ||
149 | msg = "Couldn't find --rootfs-dir, exiting" | ||
150 | msger.error(msg) | ||
151 | rootfs_dir = krootfs_dir['ROOTFS_DIR'] | ||
152 | else: | ||
153 | if part.rootfs in krootfs_dir: | ||
154 | rootfs_dir = krootfs_dir[part.rootfs] | ||
155 | elif os.path.isdir(part.rootfs): | ||
156 | rootfs_dir = part.rootfs | ||
157 | else: | ||
158 | msg = "Couldn't find --rootfs-dir=%s connection" | ||
159 | msg += " or it is not a valid path, exiting" | ||
160 | msger.error(msg % part.rootfs) | ||
161 | |||
162 | part.set_rootfs(rootfs_dir) | ||
163 | |||
164 | # change partition label wich will reflect into the final rootfs image name | ||
165 | part.label = "%s_%s" % (part.label, cr.name) | ||
166 | |||
167 | defpath = os.environ['PATH'] | ||
168 | os.environ['PATH'] = native_sysroot + "/usr/bin/" + ":/bin:/usr/bin:" | ||
169 | |||
170 | part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, native_sysroot) | ||
171 | part.prepare_for_uboot(cr.target_arch,cr_workdir, oe_builddir, rootfs_dir, native_sysroot) | ||
172 | |||
173 | os.environ['PATH'] += defpath + ":" + native_sysroot + "/usr/bin/" | ||
diff --git a/scripts/lib/wic/test b/scripts/lib/wic/test new file mode 100644 index 0000000000..9daeafb986 --- /dev/null +++ b/scripts/lib/wic/test | |||
@@ -0,0 +1 @@ | |||
test | |||
diff --git a/scripts/lib/wic/utils/__init__.py b/scripts/lib/wic/utils/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/lib/wic/utils/__init__.py | |||
diff --git a/scripts/lib/wic/utils/cmdln.py b/scripts/lib/wic/utils/cmdln.py new file mode 100644 index 0000000000..b099473ee4 --- /dev/null +++ b/scripts/lib/wic/utils/cmdln.py | |||
@@ -0,0 +1,1586 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # Copyright (c) 2002-2007 ActiveState Software Inc. | ||
3 | # License: MIT (see LICENSE.txt for license details) | ||
4 | # Author: Trent Mick | ||
5 | # Home: http://trentm.com/projects/cmdln/ | ||
6 | |||
7 | """An improvement on Python's standard cmd.py module. | ||
8 | |||
9 | As with cmd.py, this module provides "a simple framework for writing | ||
10 | line-oriented command intepreters." This module provides a 'RawCmdln' | ||
11 | class that fixes some design flaws in cmd.Cmd, making it more scalable | ||
12 | and nicer to use for good 'cvs'- or 'svn'-style command line interfaces | ||
13 | or simple shells. And it provides a 'Cmdln' class that add | ||
14 | optparse-based option processing. Basically you use it like this: | ||
15 | |||
16 | import cmdln | ||
17 | |||
18 | class MySVN(cmdln.Cmdln): | ||
19 | name = "svn" | ||
20 | |||
21 | @cmdln.alias('stat', 'st') | ||
22 | @cmdln.option('-v', '--verbose', action='store_true' | ||
23 | help='print verbose information') | ||
24 | def do_status(self, subcmd, opts, *paths): | ||
25 | print "handle 'svn status' command" | ||
26 | |||
27 | #... | ||
28 | |||
29 | if __name__ == "__main__": | ||
30 | shell = MySVN() | ||
31 | retval = shell.main() | ||
32 | sys.exit(retval) | ||
33 | |||
34 | See the README.txt or <http://trentm.com/projects/cmdln/> for more | ||
35 | details. | ||
36 | """ | ||
37 | |||
38 | __version_info__ = (1, 1, 2) | ||
39 | __version__ = '.'.join(map(str, __version_info__)) | ||
40 | |||
41 | import os | ||
42 | import sys | ||
43 | import re | ||
44 | import cmd | ||
45 | import optparse | ||
46 | from pprint import pprint | ||
47 | import sys | ||
48 | |||
49 | |||
50 | |||
51 | |||
52 | #---- globals | ||
53 | |||
54 | LOOP_ALWAYS, LOOP_NEVER, LOOP_IF_EMPTY = range(3) | ||
55 | |||
56 | # An unspecified optional argument when None is a meaningful value. | ||
57 | _NOT_SPECIFIED = ("Not", "Specified") | ||
58 | |||
59 | # Pattern to match a TypeError message from a call that | ||
60 | # failed because of incorrect number of arguments (see | ||
61 | # Python/getargs.c). | ||
62 | _INCORRECT_NUM_ARGS_RE = re.compile( | ||
63 | r"(takes [\w ]+ )(\d+)( arguments? \()(\d+)( given\))") | ||
64 | |||
65 | |||
66 | |||
67 | #---- exceptions | ||
68 | |||
69 | class CmdlnError(Exception): | ||
70 | """A cmdln.py usage error.""" | ||
71 | def __init__(self, msg): | ||
72 | self.msg = msg | ||
73 | def __str__(self): | ||
74 | return self.msg | ||
75 | |||
76 | class CmdlnUserError(Exception): | ||
77 | """An error by a user of a cmdln-based tool/shell.""" | ||
78 | pass | ||
79 | |||
80 | |||
81 | |||
82 | #---- public methods and classes | ||
83 | |||
84 | def alias(*aliases): | ||
85 | """Decorator to add aliases for Cmdln.do_* command handlers. | ||
86 | |||
87 | Example: | ||
88 | class MyShell(cmdln.Cmdln): | ||
89 | @cmdln.alias("!", "sh") | ||
90 | def do_shell(self, argv): | ||
91 | #...implement 'shell' command | ||
92 | """ | ||
93 | def decorate(f): | ||
94 | if not hasattr(f, "aliases"): | ||
95 | f.aliases = [] | ||
96 | f.aliases += aliases | ||
97 | return f | ||
98 | return decorate | ||
99 | |||
100 | |||
101 | class RawCmdln(cmd.Cmd): | ||
102 | """An improved (on cmd.Cmd) framework for building multi-subcommand | ||
103 | scripts (think "svn" & "cvs") and simple shells (think "pdb" and | ||
104 | "gdb"). | ||
105 | |||
106 | A simple example: | ||
107 | |||
108 | import cmdln | ||
109 | |||
110 | class MySVN(cmdln.RawCmdln): | ||
111 | name = "svn" | ||
112 | |||
113 | @cmdln.aliases('stat', 'st') | ||
114 | def do_status(self, argv): | ||
115 | print "handle 'svn status' command" | ||
116 | |||
117 | if __name__ == "__main__": | ||
118 | shell = MySVN() | ||
119 | retval = shell.main() | ||
120 | sys.exit(retval) | ||
121 | |||
122 | See <http://trentm.com/projects/cmdln> for more information. | ||
123 | """ | ||
124 | name = None # if unset, defaults basename(sys.argv[0]) | ||
125 | prompt = None # if unset, defaults to self.name+"> " | ||
126 | version = None # if set, default top-level options include --version | ||
127 | |||
128 | # Default messages for some 'help' command error cases. | ||
129 | # They are interpolated with one arg: the command. | ||
130 | nohelp = "no help on '%s'" | ||
131 | unknowncmd = "unknown command: '%s'" | ||
132 | |||
133 | helpindent = '' # string with which to indent help output | ||
134 | |||
135 | def __init__(self, completekey='tab', | ||
136 | stdin=None, stdout=None, stderr=None): | ||
137 | """Cmdln(completekey='tab', stdin=None, stdout=None, stderr=None) | ||
138 | |||
139 | The optional argument 'completekey' is the readline name of a | ||
140 | completion key; it defaults to the Tab key. If completekey is | ||
141 | not None and the readline module is available, command completion | ||
142 | is done automatically. | ||
143 | |||
144 | The optional arguments 'stdin', 'stdout' and 'stderr' specify | ||
145 | alternate input, output and error output file objects; if not | ||
146 | specified, sys.* are used. | ||
147 | |||
148 | If 'stdout' but not 'stderr' is specified, stdout is used for | ||
149 | error output. This is to provide least surprise for users used | ||
150 | to only the 'stdin' and 'stdout' options with cmd.Cmd. | ||
151 | """ | ||
152 | import sys | ||
153 | if self.name is None: | ||
154 | self.name = os.path.basename(sys.argv[0]) | ||
155 | if self.prompt is None: | ||
156 | self.prompt = self.name+"> " | ||
157 | self._name_str = self._str(self.name) | ||
158 | self._prompt_str = self._str(self.prompt) | ||
159 | if stdin is not None: | ||
160 | self.stdin = stdin | ||
161 | else: | ||
162 | self.stdin = sys.stdin | ||
163 | if stdout is not None: | ||
164 | self.stdout = stdout | ||
165 | else: | ||
166 | self.stdout = sys.stdout | ||
167 | if stderr is not None: | ||
168 | self.stderr = stderr | ||
169 | elif stdout is not None: | ||
170 | self.stderr = stdout | ||
171 | else: | ||
172 | self.stderr = sys.stderr | ||
173 | self.cmdqueue = [] | ||
174 | self.completekey = completekey | ||
175 | self.cmdlooping = False | ||
176 | |||
177 | def get_optparser(self): | ||
178 | """Hook for subclasses to set the option parser for the | ||
179 | top-level command/shell. | ||
180 | |||
181 | This option parser is used retrieved and used by `.main()' to | ||
182 | handle top-level options. | ||
183 | |||
184 | The default implements a single '-h|--help' option. Sub-classes | ||
185 | can return None to have no options at the top-level. Typically | ||
186 | an instance of CmdlnOptionParser should be returned. | ||
187 | """ | ||
188 | version = (self.version is not None | ||
189 | and "%s %s" % (self._name_str, self.version) | ||
190 | or None) | ||
191 | return CmdlnOptionParser(self, version=version) | ||
192 | |||
193 | def postoptparse(self): | ||
194 | """Hook method executed just after `.main()' parses top-level | ||
195 | options. | ||
196 | |||
197 | When called `self.options' holds the results of the option parse. | ||
198 | """ | ||
199 | pass | ||
200 | |||
201 | def main(self, argv=None, loop=LOOP_NEVER): | ||
202 | """A possible mainline handler for a script, like so: | ||
203 | |||
204 | import cmdln | ||
205 | class MyCmd(cmdln.Cmdln): | ||
206 | name = "mycmd" | ||
207 | ... | ||
208 | |||
209 | if __name__ == "__main__": | ||
210 | MyCmd().main() | ||
211 | |||
212 | By default this will use sys.argv to issue a single command to | ||
213 | 'MyCmd', then exit. The 'loop' argument can be use to control | ||
214 | interactive shell behaviour. | ||
215 | |||
216 | Arguments: | ||
217 | "argv" (optional, default sys.argv) is the command to run. | ||
218 | It must be a sequence, where the first element is the | ||
219 | command name and subsequent elements the args for that | ||
220 | command. | ||
221 | "loop" (optional, default LOOP_NEVER) is a constant | ||
222 | indicating if a command loop should be started (i.e. an | ||
223 | interactive shell). Valid values (constants on this module): | ||
224 | LOOP_ALWAYS start loop and run "argv", if any | ||
225 | LOOP_NEVER run "argv" (or .emptyline()) and exit | ||
226 | LOOP_IF_EMPTY run "argv", if given, and exit; | ||
227 | otherwise, start loop | ||
228 | """ | ||
229 | if argv is None: | ||
230 | import sys | ||
231 | argv = sys.argv | ||
232 | else: | ||
233 | argv = argv[:] # don't modify caller's list | ||
234 | |||
235 | self.optparser = self.get_optparser() | ||
236 | if self.optparser: # i.e. optparser=None means don't process for opts | ||
237 | try: | ||
238 | self.options, args = self.optparser.parse_args(argv[1:]) | ||
239 | except CmdlnUserError, ex: | ||
240 | msg = "%s: %s\nTry '%s help' for info.\n"\ | ||
241 | % (self.name, ex, self.name) | ||
242 | self.stderr.write(self._str(msg)) | ||
243 | self.stderr.flush() | ||
244 | return 1 | ||
245 | except StopOptionProcessing, ex: | ||
246 | return 0 | ||
247 | else: | ||
248 | self.options, args = None, argv[1:] | ||
249 | self.postoptparse() | ||
250 | |||
251 | if loop == LOOP_ALWAYS: | ||
252 | if args: | ||
253 | self.cmdqueue.append(args) | ||
254 | return self.cmdloop() | ||
255 | elif loop == LOOP_NEVER: | ||
256 | if args: | ||
257 | return self.cmd(args) | ||
258 | else: | ||
259 | return self.emptyline() | ||
260 | elif loop == LOOP_IF_EMPTY: | ||
261 | if args: | ||
262 | return self.cmd(args) | ||
263 | else: | ||
264 | return self.cmdloop() | ||
265 | |||
266 | def cmd(self, argv): | ||
267 | """Run one command and exit. | ||
268 | |||
269 | "argv" is the arglist for the command to run. argv[0] is the | ||
270 | command to run. If argv is an empty list then the | ||
271 | 'emptyline' handler is run. | ||
272 | |||
273 | Returns the return value from the command handler. | ||
274 | """ | ||
275 | assert isinstance(argv, (list, tuple)), \ | ||
276 | "'argv' is not a sequence: %r" % argv | ||
277 | retval = None | ||
278 | try: | ||
279 | argv = self.precmd(argv) | ||
280 | retval = self.onecmd(argv) | ||
281 | self.postcmd(argv) | ||
282 | except: | ||
283 | if not self.cmdexc(argv): | ||
284 | raise | ||
285 | retval = 1 | ||
286 | return retval | ||
287 | |||
288 | def _str(self, s): | ||
289 | """Safely convert the given str/unicode to a string for printing.""" | ||
290 | try: | ||
291 | return str(s) | ||
292 | except UnicodeError: | ||
293 | #XXX What is the proper encoding to use here? 'utf-8' seems | ||
294 | # to work better than "getdefaultencoding" (usually | ||
295 | # 'ascii'), on OS X at least. | ||
296 | #import sys | ||
297 | #return s.encode(sys.getdefaultencoding(), "replace") | ||
298 | return s.encode("utf-8", "replace") | ||
299 | |||
300 | def cmdloop(self, intro=None): | ||
301 | """Repeatedly issue a prompt, accept input, parse into an argv, and | ||
302 | dispatch (via .precmd(), .onecmd() and .postcmd()), passing them | ||
303 | the argv. In other words, start a shell. | ||
304 | |||
305 | "intro" (optional) is a introductory message to print when | ||
306 | starting the command loop. This overrides the class | ||
307 | "intro" attribute, if any. | ||
308 | """ | ||
309 | self.cmdlooping = True | ||
310 | self.preloop() | ||
311 | if self.use_rawinput and self.completekey: | ||
312 | try: | ||
313 | import readline | ||
314 | self.old_completer = readline.get_completer() | ||
315 | readline.set_completer(self.complete) | ||
316 | readline.parse_and_bind(self.completekey+": complete") | ||
317 | except ImportError: | ||
318 | pass | ||
319 | try: | ||
320 | if intro is None: | ||
321 | intro = self.intro | ||
322 | if intro: | ||
323 | intro_str = self._str(intro) | ||
324 | self.stdout.write(intro_str+'\n') | ||
325 | self.stop = False | ||
326 | retval = None | ||
327 | while not self.stop: | ||
328 | if self.cmdqueue: | ||
329 | argv = self.cmdqueue.pop(0) | ||
330 | assert isinstance(argv, (list, tuple)), \ | ||
331 | "item on 'cmdqueue' is not a sequence: %r" % argv | ||
332 | else: | ||
333 | if self.use_rawinput: | ||
334 | try: | ||
335 | line = raw_input(self._prompt_str) | ||
336 | except EOFError: | ||
337 | line = 'EOF' | ||
338 | else: | ||
339 | self.stdout.write(self._prompt_str) | ||
340 | self.stdout.flush() | ||
341 | line = self.stdin.readline() | ||
342 | if not len(line): | ||
343 | line = 'EOF' | ||
344 | else: | ||
345 | line = line[:-1] # chop '\n' | ||
346 | argv = line2argv(line) | ||
347 | try: | ||
348 | argv = self.precmd(argv) | ||
349 | retval = self.onecmd(argv) | ||
350 | self.postcmd(argv) | ||
351 | except: | ||
352 | if not self.cmdexc(argv): | ||
353 | raise | ||
354 | retval = 1 | ||
355 | self.lastretval = retval | ||
356 | self.postloop() | ||
357 | finally: | ||
358 | if self.use_rawinput and self.completekey: | ||
359 | try: | ||
360 | import readline | ||
361 | readline.set_completer(self.old_completer) | ||
362 | except ImportError: | ||
363 | pass | ||
364 | self.cmdlooping = False | ||
365 | return retval | ||
366 | |||
367 | def precmd(self, argv): | ||
368 | """Hook method executed just before the command argv is | ||
369 | interpreted, but after the input prompt is generated and issued. | ||
370 | |||
371 | "argv" is the cmd to run. | ||
372 | |||
373 | Returns an argv to run (i.e. this method can modify the command | ||
374 | to run). | ||
375 | """ | ||
376 | return argv | ||
377 | |||
378 | def postcmd(self, argv): | ||
379 | """Hook method executed just after a command dispatch is finished. | ||
380 | |||
381 | "argv" is the command that was run. | ||
382 | """ | ||
383 | pass | ||
384 | |||
385 | def cmdexc(self, argv): | ||
386 | """Called if an exception is raised in any of precmd(), onecmd(), | ||
387 | or postcmd(). If True is returned, the exception is deemed to have | ||
388 | been dealt with. Otherwise, the exception is re-raised. | ||
389 | |||
390 | The default implementation handles CmdlnUserError's, which | ||
391 | typically correspond to user error in calling commands (as | ||
392 | opposed to programmer error in the design of the script using | ||
393 | cmdln.py). | ||
394 | """ | ||
395 | import sys | ||
396 | type, exc, traceback = sys.exc_info() | ||
397 | if isinstance(exc, CmdlnUserError): | ||
398 | msg = "%s %s: %s\nTry '%s help %s' for info.\n"\ | ||
399 | % (self.name, argv[0], exc, self.name, argv[0]) | ||
400 | self.stderr.write(self._str(msg)) | ||
401 | self.stderr.flush() | ||
402 | return True | ||
403 | |||
404 | def onecmd(self, argv): | ||
405 | if not argv: | ||
406 | return self.emptyline() | ||
407 | self.lastcmd = argv | ||
408 | cmdname = self._get_canonical_cmd_name(argv[0]) | ||
409 | if cmdname: | ||
410 | handler = self._get_cmd_handler(cmdname) | ||
411 | if handler: | ||
412 | return self._dispatch_cmd(handler, argv) | ||
413 | return self.default(argv) | ||
414 | |||
415 | def _dispatch_cmd(self, handler, argv): | ||
416 | return handler(argv) | ||
417 | |||
418 | def default(self, argv): | ||
419 | """Hook called to handle a command for which there is no handler. | ||
420 | |||
421 | "argv" is the command and arguments to run. | ||
422 | |||
423 | The default implementation writes and error message to stderr | ||
424 | and returns an error exit status. | ||
425 | |||
426 | Returns a numeric command exit status. | ||
427 | """ | ||
428 | errmsg = self._str(self.unknowncmd % (argv[0],)) | ||
429 | if self.cmdlooping: | ||
430 | self.stderr.write(errmsg+"\n") | ||
431 | else: | ||
432 | self.stderr.write("%s: %s\nTry '%s help' for info.\n" | ||
433 | % (self._name_str, errmsg, self._name_str)) | ||
434 | self.stderr.flush() | ||
435 | return 1 | ||
436 | |||
437 | def parseline(self, line): | ||
438 | # This is used by Cmd.complete (readline completer function) to | ||
439 | # massage the current line buffer before completion processing. | ||
440 | # We override to drop special '!' handling. | ||
441 | line = line.strip() | ||
442 | if not line: | ||
443 | return None, None, line | ||
444 | elif line[0] == '?': | ||
445 | line = 'help ' + line[1:] | ||
446 | i, n = 0, len(line) | ||
447 | while i < n and line[i] in self.identchars: i = i+1 | ||
448 | cmd, arg = line[:i], line[i:].strip() | ||
449 | return cmd, arg, line | ||
450 | |||
451 | def helpdefault(self, cmd, known): | ||
452 | """Hook called to handle help on a command for which there is no | ||
453 | help handler. | ||
454 | |||
455 | "cmd" is the command name on which help was requested. | ||
456 | "known" is a boolean indicating if this command is known | ||
457 | (i.e. if there is a handler for it). | ||
458 | |||
459 | Returns a return code. | ||
460 | """ | ||
461 | if known: | ||
462 | msg = self._str(self.nohelp % (cmd,)) | ||
463 | if self.cmdlooping: | ||
464 | self.stderr.write(msg + '\n') | ||
465 | else: | ||
466 | self.stderr.write("%s: %s\n" % (self.name, msg)) | ||
467 | else: | ||
468 | msg = self.unknowncmd % (cmd,) | ||
469 | if self.cmdlooping: | ||
470 | self.stderr.write(msg + '\n') | ||
471 | else: | ||
472 | self.stderr.write("%s: %s\n" | ||
473 | "Try '%s help' for info.\n" | ||
474 | % (self.name, msg, self.name)) | ||
475 | self.stderr.flush() | ||
476 | return 1 | ||
477 | |||
478 | def do_help(self, argv): | ||
479 | """${cmd_name}: give detailed help on a specific sub-command | ||
480 | |||
481 | Usage: | ||
482 | ${name} help [COMMAND] | ||
483 | """ | ||
484 | if len(argv) > 1: # asking for help on a particular command | ||
485 | doc = None | ||
486 | cmdname = self._get_canonical_cmd_name(argv[1]) or argv[1] | ||
487 | if not cmdname: | ||
488 | return self.helpdefault(argv[1], False) | ||
489 | else: | ||
490 | helpfunc = getattr(self, "help_"+cmdname, None) | ||
491 | if helpfunc: | ||
492 | doc = helpfunc() | ||
493 | else: | ||
494 | handler = self._get_cmd_handler(cmdname) | ||
495 | if handler: | ||
496 | doc = handler.__doc__ | ||
497 | if doc is None: | ||
498 | return self.helpdefault(argv[1], handler != None) | ||
499 | else: # bare "help" command | ||
500 | doc = self.__class__.__doc__ # try class docstring | ||
501 | if doc is None: | ||
502 | # Try to provide some reasonable useful default help. | ||
503 | if self.cmdlooping: prefix = "" | ||
504 | else: prefix = self.name+' ' | ||
505 | doc = """Usage: | ||
506 | %sCOMMAND [ARGS...] | ||
507 | %shelp [COMMAND] | ||
508 | |||
509 | ${option_list} | ||
510 | ${command_list} | ||
511 | ${help_list} | ||
512 | """ % (prefix, prefix) | ||
513 | cmdname = None | ||
514 | |||
515 | if doc: # *do* have help content, massage and print that | ||
516 | doc = self._help_reindent(doc) | ||
517 | doc = self._help_preprocess(doc, cmdname) | ||
518 | doc = doc.rstrip() + '\n' # trim down trailing space | ||
519 | self.stdout.write(self._str(doc)) | ||
520 | self.stdout.flush() | ||
521 | do_help.aliases = ["?"] | ||
522 | |||
523 | def _help_reindent(self, help, indent=None): | ||
524 | """Hook to re-indent help strings before writing to stdout. | ||
525 | |||
526 | "help" is the help content to re-indent | ||
527 | "indent" is a string with which to indent each line of the | ||
528 | help content after normalizing. If unspecified or None | ||
529 | then the default is use: the 'self.helpindent' class | ||
530 | attribute. By default this is the empty string, i.e. | ||
531 | no indentation. | ||
532 | |||
533 | By default, all common leading whitespace is removed and then | ||
534 | the lot is indented by 'self.helpindent'. When calculating the | ||
535 | common leading whitespace the first line is ignored -- hence | ||
536 | help content for Conan can be written as follows and have the | ||
537 | expected indentation: | ||
538 | |||
539 | def do_crush(self, ...): | ||
540 | '''${cmd_name}: crush your enemies, see them driven before you... | ||
541 | |||
542 | c.f. Conan the Barbarian''' | ||
543 | """ | ||
544 | if indent is None: | ||
545 | indent = self.helpindent | ||
546 | lines = help.splitlines(0) | ||
547 | _dedentlines(lines, skip_first_line=True) | ||
548 | lines = [(indent+line).rstrip() for line in lines] | ||
549 | return '\n'.join(lines) | ||
550 | |||
551 | def _help_preprocess(self, help, cmdname): | ||
552 | """Hook to preprocess a help string before writing to stdout. | ||
553 | |||
554 | "help" is the help string to process. | ||
555 | "cmdname" is the canonical sub-command name for which help | ||
556 | is being given, or None if the help is not specific to a | ||
557 | command. | ||
558 | |||
559 | By default the following template variables are interpolated in | ||
560 | help content. (Note: these are similar to Python 2.4's | ||
561 | string.Template interpolation but not quite.) | ||
562 | |||
563 | ${name} | ||
564 | The tool's/shell's name, i.e. 'self.name'. | ||
565 | ${option_list} | ||
566 | A formatted table of options for this shell/tool. | ||
567 | ${command_list} | ||
568 | A formatted table of available sub-commands. | ||
569 | ${help_list} | ||
570 | A formatted table of additional help topics (i.e. 'help_*' | ||
571 | methods with no matching 'do_*' method). | ||
572 | ${cmd_name} | ||
573 | The name (and aliases) for this sub-command formatted as: | ||
574 | "NAME (ALIAS1, ALIAS2, ...)". | ||
575 | ${cmd_usage} | ||
576 | A formatted usage block inferred from the command function | ||
577 | signature. | ||
578 | ${cmd_option_list} | ||
579 | A formatted table of options for this sub-command. (This is | ||
580 | only available for commands using the optparse integration, | ||
581 | i.e. using @cmdln.option decorators or manually setting the | ||
582 | 'optparser' attribute on the 'do_*' method.) | ||
583 | |||
584 | Returns the processed help. | ||
585 | """ | ||
586 | preprocessors = { | ||
587 | "${name}": self._help_preprocess_name, | ||
588 | "${option_list}": self._help_preprocess_option_list, | ||
589 | "${command_list}": self._help_preprocess_command_list, | ||
590 | "${help_list}": self._help_preprocess_help_list, | ||
591 | "${cmd_name}": self._help_preprocess_cmd_name, | ||
592 | "${cmd_usage}": self._help_preprocess_cmd_usage, | ||
593 | "${cmd_option_list}": self._help_preprocess_cmd_option_list, | ||
594 | } | ||
595 | |||
596 | for marker, preprocessor in preprocessors.items(): | ||
597 | if marker in help: | ||
598 | help = preprocessor(help, cmdname) | ||
599 | return help | ||
600 | |||
601 | def _help_preprocess_name(self, help, cmdname=None): | ||
602 | return help.replace("${name}", self.name) | ||
603 | |||
604 | def _help_preprocess_option_list(self, help, cmdname=None): | ||
605 | marker = "${option_list}" | ||
606 | indent, indent_width = _get_indent(marker, help) | ||
607 | suffix = _get_trailing_whitespace(marker, help) | ||
608 | |||
609 | if self.optparser: | ||
610 | # Setup formatting options and format. | ||
611 | # - Indentation of 4 is better than optparse default of 2. | ||
612 | # C.f. Damian Conway's discussion of this in Perl Best | ||
613 | # Practices. | ||
614 | self.optparser.formatter.indent_increment = 4 | ||
615 | self.optparser.formatter.current_indent = indent_width | ||
616 | block = self.optparser.format_option_help() + '\n' | ||
617 | else: | ||
618 | block = "" | ||
619 | |||
620 | help = help.replace(indent+marker+suffix, block, 1) | ||
621 | return help | ||
622 | |||
623 | |||
624 | def _help_preprocess_command_list(self, help, cmdname=None): | ||
625 | marker = "${command_list}" | ||
626 | indent, indent_width = _get_indent(marker, help) | ||
627 | suffix = _get_trailing_whitespace(marker, help) | ||
628 | |||
629 | # Find any aliases for commands. | ||
630 | token2canonical = self._get_canonical_map() | ||
631 | aliases = {} | ||
632 | for token, cmdname in token2canonical.items(): | ||
633 | if token == cmdname: continue | ||
634 | aliases.setdefault(cmdname, []).append(token) | ||
635 | |||
636 | # Get the list of (non-hidden) commands and their | ||
637 | # documentation, if any. | ||
638 | cmdnames = {} # use a dict to strip duplicates | ||
639 | for attr in self.get_names(): | ||
640 | if attr.startswith("do_"): | ||
641 | cmdnames[attr[3:]] = True | ||
642 | cmdnames = cmdnames.keys() | ||
643 | cmdnames.sort() | ||
644 | linedata = [] | ||
645 | for cmdname in cmdnames: | ||
646 | if aliases.get(cmdname): | ||
647 | a = aliases[cmdname] | ||
648 | a.sort() | ||
649 | cmdstr = "%s (%s)" % (cmdname, ", ".join(a)) | ||
650 | else: | ||
651 | cmdstr = cmdname | ||
652 | doc = None | ||
653 | try: | ||
654 | helpfunc = getattr(self, 'help_'+cmdname) | ||
655 | except AttributeError: | ||
656 | handler = self._get_cmd_handler(cmdname) | ||
657 | if handler: | ||
658 | doc = handler.__doc__ | ||
659 | else: | ||
660 | doc = helpfunc() | ||
661 | |||
662 | # Strip "${cmd_name}: " from the start of a command's doc. Best | ||
663 | # practice dictates that command help strings begin with this, but | ||
664 | # it isn't at all wanted for the command list. | ||
665 | to_strip = "${cmd_name}:" | ||
666 | if doc and doc.startswith(to_strip): | ||
667 | #log.debug("stripping %r from start of %s's help string", | ||
668 | # to_strip, cmdname) | ||
669 | doc = doc[len(to_strip):].lstrip() | ||
670 | linedata.append( (cmdstr, doc) ) | ||
671 | |||
672 | if linedata: | ||
673 | subindent = indent + ' '*4 | ||
674 | lines = _format_linedata(linedata, subindent, indent_width+4) | ||
675 | block = indent + "Commands:\n" \ | ||
676 | + '\n'.join(lines) + "\n\n" | ||
677 | help = help.replace(indent+marker+suffix, block, 1) | ||
678 | return help | ||
679 | |||
680 | def _gen_names_and_attrs(self): | ||
681 | # Inheritance says we have to look in class and | ||
682 | # base classes; order is not important. | ||
683 | names = [] | ||
684 | classes = [self.__class__] | ||
685 | while classes: | ||
686 | aclass = classes.pop(0) | ||
687 | if aclass.__bases__: | ||
688 | classes = classes + list(aclass.__bases__) | ||
689 | for name in dir(aclass): | ||
690 | yield (name, getattr(aclass, name)) | ||
691 | |||
692 | def _help_preprocess_help_list(self, help, cmdname=None): | ||
693 | marker = "${help_list}" | ||
694 | indent, indent_width = _get_indent(marker, help) | ||
695 | suffix = _get_trailing_whitespace(marker, help) | ||
696 | |||
697 | # Determine the additional help topics, if any. | ||
698 | helpnames = {} | ||
699 | token2cmdname = self._get_canonical_map() | ||
700 | for attrname, attr in self._gen_names_and_attrs(): | ||
701 | if not attrname.startswith("help_"): continue | ||
702 | helpname = attrname[5:] | ||
703 | if helpname not in token2cmdname: | ||
704 | helpnames[helpname] = attr | ||
705 | |||
706 | if helpnames: | ||
707 | linedata = [(n, a.__doc__ or "") for n, a in helpnames.items()] | ||
708 | linedata.sort() | ||
709 | |||
710 | subindent = indent + ' '*4 | ||
711 | lines = _format_linedata(linedata, subindent, indent_width+4) | ||
712 | block = (indent | ||
713 | + "Additional help topics (run `%s help TOPIC'):\n" % self.name | ||
714 | + '\n'.join(lines) | ||
715 | + "\n\n") | ||
716 | else: | ||
717 | block = '' | ||
718 | help = help.replace(indent+marker+suffix, block, 1) | ||
719 | return help | ||
720 | |||
721 | def _help_preprocess_cmd_name(self, help, cmdname=None): | ||
722 | marker = "${cmd_name}" | ||
723 | handler = self._get_cmd_handler(cmdname) | ||
724 | if not handler: | ||
725 | raise CmdlnError("cannot preprocess '%s' into help string: " | ||
726 | "could not find command handler for %r" | ||
727 | % (marker, cmdname)) | ||
728 | s = cmdname | ||
729 | if hasattr(handler, "aliases"): | ||
730 | s += " (%s)" % (", ".join(handler.aliases)) | ||
731 | help = help.replace(marker, s) | ||
732 | return help | ||
733 | |||
734 | #TODO: this only makes sense as part of the Cmdln class. | ||
735 | # Add hooks to add help preprocessing template vars and put | ||
736 | # this one on that class. | ||
737 | def _help_preprocess_cmd_usage(self, help, cmdname=None): | ||
738 | marker = "${cmd_usage}" | ||
739 | handler = self._get_cmd_handler(cmdname) | ||
740 | if not handler: | ||
741 | raise CmdlnError("cannot preprocess '%s' into help string: " | ||
742 | "could not find command handler for %r" | ||
743 | % (marker, cmdname)) | ||
744 | indent, indent_width = _get_indent(marker, help) | ||
745 | suffix = _get_trailing_whitespace(marker, help) | ||
746 | |||
747 | # Extract the introspection bits we need. | ||
748 | func = handler.im_func | ||
749 | if func.func_defaults: | ||
750 | func_defaults = list(func.func_defaults) | ||
751 | else: | ||
752 | func_defaults = [] | ||
753 | co_argcount = func.func_code.co_argcount | ||
754 | co_varnames = func.func_code.co_varnames | ||
755 | co_flags = func.func_code.co_flags | ||
756 | CO_FLAGS_ARGS = 4 | ||
757 | CO_FLAGS_KWARGS = 8 | ||
758 | |||
759 | # Adjust argcount for possible *args and **kwargs arguments. | ||
760 | argcount = co_argcount | ||
761 | if co_flags & CO_FLAGS_ARGS: argcount += 1 | ||
762 | if co_flags & CO_FLAGS_KWARGS: argcount += 1 | ||
763 | |||
764 | # Determine the usage string. | ||
765 | usage = "%s %s" % (self.name, cmdname) | ||
766 | if argcount <= 2: # handler ::= do_FOO(self, argv) | ||
767 | usage += " [ARGS...]" | ||
768 | elif argcount >= 3: # handler ::= do_FOO(self, subcmd, opts, ...) | ||
769 | argnames = list(co_varnames[3:argcount]) | ||
770 | tail = "" | ||
771 | if co_flags & CO_FLAGS_KWARGS: | ||
772 | name = argnames.pop(-1) | ||
773 | import warnings | ||
774 | # There is no generally accepted mechanism for passing | ||
775 | # keyword arguments from the command line. Could | ||
776 | # *perhaps* consider: arg=value arg2=value2 ... | ||
777 | warnings.warn("argument '**%s' on '%s.%s' command " | ||
778 | "handler will never get values" | ||
779 | % (name, self.__class__.__name__, | ||
780 | func.func_name)) | ||
781 | if co_flags & CO_FLAGS_ARGS: | ||
782 | name = argnames.pop(-1) | ||
783 | tail = "[%s...]" % name.upper() | ||
784 | while func_defaults: | ||
785 | func_defaults.pop(-1) | ||
786 | name = argnames.pop(-1) | ||
787 | tail = "[%s%s%s]" % (name.upper(), (tail and ' ' or ''), tail) | ||
788 | while argnames: | ||
789 | name = argnames.pop(-1) | ||
790 | tail = "%s %s" % (name.upper(), tail) | ||
791 | usage += ' ' + tail | ||
792 | |||
793 | block_lines = [ | ||
794 | self.helpindent + "Usage:", | ||
795 | self.helpindent + ' '*4 + usage | ||
796 | ] | ||
797 | block = '\n'.join(block_lines) + '\n\n' | ||
798 | |||
799 | help = help.replace(indent+marker+suffix, block, 1) | ||
800 | return help | ||
801 | |||
802 | #TODO: this only makes sense as part of the Cmdln class. | ||
803 | # Add hooks to add help preprocessing template vars and put | ||
804 | # this one on that class. | ||
805 | def _help_preprocess_cmd_option_list(self, help, cmdname=None): | ||
806 | marker = "${cmd_option_list}" | ||
807 | handler = self._get_cmd_handler(cmdname) | ||
808 | if not handler: | ||
809 | raise CmdlnError("cannot preprocess '%s' into help string: " | ||
810 | "could not find command handler for %r" | ||
811 | % (marker, cmdname)) | ||
812 | indent, indent_width = _get_indent(marker, help) | ||
813 | suffix = _get_trailing_whitespace(marker, help) | ||
814 | if hasattr(handler, "optparser"): | ||
815 | # Setup formatting options and format. | ||
816 | # - Indentation of 4 is better than optparse default of 2. | ||
817 | # C.f. Damian Conway's discussion of this in Perl Best | ||
818 | # Practices. | ||
819 | handler.optparser.formatter.indent_increment = 4 | ||
820 | handler.optparser.formatter.current_indent = indent_width | ||
821 | block = handler.optparser.format_option_help() + '\n' | ||
822 | else: | ||
823 | block = "" | ||
824 | |||
825 | help = help.replace(indent+marker+suffix, block, 1) | ||
826 | return help | ||
827 | |||
828 | def _get_canonical_cmd_name(self, token): | ||
829 | map = self._get_canonical_map() | ||
830 | return map.get(token, None) | ||
831 | |||
832 | def _get_canonical_map(self): | ||
833 | """Return a mapping of available command names and aliases to | ||
834 | their canonical command name. | ||
835 | """ | ||
836 | cacheattr = "_token2canonical" | ||
837 | if not hasattr(self, cacheattr): | ||
838 | # Get the list of commands and their aliases, if any. | ||
839 | token2canonical = {} | ||
840 | cmd2funcname = {} # use a dict to strip duplicates | ||
841 | for attr in self.get_names(): | ||
842 | if attr.startswith("do_"): cmdname = attr[3:] | ||
843 | elif attr.startswith("_do_"): cmdname = attr[4:] | ||
844 | else: | ||
845 | continue | ||
846 | cmd2funcname[cmdname] = attr | ||
847 | token2canonical[cmdname] = cmdname | ||
848 | for cmdname, funcname in cmd2funcname.items(): # add aliases | ||
849 | func = getattr(self, funcname) | ||
850 | aliases = getattr(func, "aliases", []) | ||
851 | for alias in aliases: | ||
852 | if alias in cmd2funcname: | ||
853 | import warnings | ||
854 | warnings.warn("'%s' alias for '%s' command conflicts " | ||
855 | "with '%s' handler" | ||
856 | % (alias, cmdname, cmd2funcname[alias])) | ||
857 | continue | ||
858 | token2canonical[alias] = cmdname | ||
859 | setattr(self, cacheattr, token2canonical) | ||
860 | return getattr(self, cacheattr) | ||
861 | |||
862 | def _get_cmd_handler(self, cmdname): | ||
863 | handler = None | ||
864 | try: | ||
865 | handler = getattr(self, 'do_' + cmdname) | ||
866 | except AttributeError: | ||
867 | try: | ||
868 | # Private command handlers begin with "_do_". | ||
869 | handler = getattr(self, '_do_' + cmdname) | ||
870 | except AttributeError: | ||
871 | pass | ||
872 | return handler | ||
873 | |||
874 | def _do_EOF(self, argv): | ||
875 | # Default EOF handler | ||
876 | # Note: an actual EOF is redirected to this command. | ||
877 | #TODO: separate name for this. Currently it is available from | ||
878 | # command-line. Is that okay? | ||
879 | self.stdout.write('\n') | ||
880 | self.stdout.flush() | ||
881 | self.stop = True | ||
882 | |||
883 | def emptyline(self): | ||
884 | # Different from cmd.Cmd: don't repeat the last command for an | ||
885 | # emptyline. | ||
886 | if self.cmdlooping: | ||
887 | pass | ||
888 | else: | ||
889 | return self.do_help(["help"]) | ||
890 | |||
891 | |||
892 | #---- optparse.py extension to fix (IMO) some deficiencies | ||
893 | # | ||
894 | # See the class _OptionParserEx docstring for details. | ||
895 | # | ||
896 | |||
897 | class StopOptionProcessing(Exception): | ||
898 | """Indicate that option *and argument* processing should stop | ||
899 | cleanly. This is not an error condition. It is similar in spirit to | ||
900 | StopIteration. This is raised by _OptionParserEx's default "help" | ||
901 | and "version" option actions and can be raised by custom option | ||
902 | callbacks too. | ||
903 | |||
904 | Hence the typical CmdlnOptionParser (a subclass of _OptionParserEx) | ||
905 | usage is: | ||
906 | |||
907 | parser = CmdlnOptionParser(mycmd) | ||
908 | parser.add_option("-f", "--force", dest="force") | ||
909 | ... | ||
910 | try: | ||
911 | opts, args = parser.parse_args() | ||
912 | except StopOptionProcessing: | ||
913 | # normal termination, "--help" was probably given | ||
914 | sys.exit(0) | ||
915 | """ | ||
916 | |||
917 | class _OptionParserEx(optparse.OptionParser): | ||
918 | """An optparse.OptionParser that uses exceptions instead of sys.exit. | ||
919 | |||
920 | This class is an extension of optparse.OptionParser that differs | ||
921 | as follows: | ||
922 | - Correct (IMO) the default OptionParser error handling to never | ||
923 | sys.exit(). Instead OptParseError exceptions are passed through. | ||
924 | - Add the StopOptionProcessing exception (a la StopIteration) to | ||
925 | indicate normal termination of option processing. | ||
926 | See StopOptionProcessing's docstring for details. | ||
927 | |||
928 | I'd also like to see the following in the core optparse.py, perhaps | ||
929 | as a RawOptionParser which would serve as a base class for the more | ||
930 | generally used OptionParser (that works as current): | ||
931 | - Remove the implicit addition of the -h|--help and --version | ||
932 | options. They can get in the way (e.g. if want '-?' and '-V' for | ||
933 | these as well) and it is not hard to do: | ||
934 | optparser.add_option("-h", "--help", action="help") | ||
935 | optparser.add_option("--version", action="version") | ||
936 | These are good practices, just not valid defaults if they can | ||
937 | get in the way. | ||
938 | """ | ||
939 | def error(self, msg): | ||
940 | raise optparse.OptParseError(msg) | ||
941 | |||
942 | def exit(self, status=0, msg=None): | ||
943 | if status == 0: | ||
944 | raise StopOptionProcessing(msg) | ||
945 | else: | ||
946 | #TODO: don't lose status info here | ||
947 | raise optparse.OptParseError(msg) | ||
948 | |||
949 | |||
950 | |||
951 | #---- optparse.py-based option processing support | ||
952 | |||
953 | class CmdlnOptionParser(_OptionParserEx): | ||
954 | """An optparse.OptionParser class more appropriate for top-level | ||
955 | Cmdln options. For parsing of sub-command options, see | ||
956 | SubCmdOptionParser. | ||
957 | |||
958 | Changes: | ||
959 | - disable_interspersed_args() by default, because a Cmdln instance | ||
960 | has sub-commands which may themselves have options. | ||
961 | - Redirect print_help() to the Cmdln.do_help() which is better | ||
962 | equiped to handle the "help" action. | ||
963 | - error() will raise a CmdlnUserError: OptionParse.error() is meant | ||
964 | to be called for user errors. Raising a well-known error here can | ||
965 | make error handling clearer. | ||
966 | - Also see the changes in _OptionParserEx. | ||
967 | """ | ||
968 | def __init__(self, cmdln, **kwargs): | ||
969 | self.cmdln = cmdln | ||
970 | kwargs["prog"] = self.cmdln.name | ||
971 | _OptionParserEx.__init__(self, **kwargs) | ||
972 | self.disable_interspersed_args() | ||
973 | |||
974 | def print_help(self, file=None): | ||
975 | self.cmdln.onecmd(["help"]) | ||
976 | |||
977 | def error(self, msg): | ||
978 | raise CmdlnUserError(msg) | ||
979 | |||
980 | |||
981 | class SubCmdOptionParser(_OptionParserEx): | ||
982 | def set_cmdln_info(self, cmdln, subcmd): | ||
983 | """Called by Cmdln to pass relevant info about itself needed | ||
984 | for print_help(). | ||
985 | """ | ||
986 | self.cmdln = cmdln | ||
987 | self.subcmd = subcmd | ||
988 | |||
989 | def print_help(self, file=None): | ||
990 | self.cmdln.onecmd(["help", self.subcmd]) | ||
991 | |||
992 | def error(self, msg): | ||
993 | raise CmdlnUserError(msg) | ||
994 | |||
995 | |||
996 | def option(*args, **kwargs): | ||
997 | """Decorator to add an option to the optparser argument of a Cmdln | ||
998 | subcommand. | ||
999 | |||
1000 | Example: | ||
1001 | class MyShell(cmdln.Cmdln): | ||
1002 | @cmdln.option("-f", "--force", help="force removal") | ||
1003 | def do_remove(self, subcmd, opts, *args): | ||
1004 | #... | ||
1005 | """ | ||
1006 | #XXX Is there a possible optimization for many options to not have a | ||
1007 | # large stack depth here? | ||
1008 | def decorate(f): | ||
1009 | if not hasattr(f, "optparser"): | ||
1010 | f.optparser = SubCmdOptionParser() | ||
1011 | f.optparser.add_option(*args, **kwargs) | ||
1012 | return f | ||
1013 | return decorate | ||
1014 | |||
1015 | |||
1016 | class Cmdln(RawCmdln): | ||
1017 | """An improved (on cmd.Cmd) framework for building multi-subcommand | ||
1018 | scripts (think "svn" & "cvs") and simple shells (think "pdb" and | ||
1019 | "gdb"). | ||
1020 | |||
1021 | A simple example: | ||
1022 | |||
1023 | import cmdln | ||
1024 | |||
1025 | class MySVN(cmdln.Cmdln): | ||
1026 | name = "svn" | ||
1027 | |||
1028 | @cmdln.aliases('stat', 'st') | ||
1029 | @cmdln.option('-v', '--verbose', action='store_true' | ||
1030 | help='print verbose information') | ||
1031 | def do_status(self, subcmd, opts, *paths): | ||
1032 | print "handle 'svn status' command" | ||
1033 | |||
1034 | #... | ||
1035 | |||
1036 | if __name__ == "__main__": | ||
1037 | shell = MySVN() | ||
1038 | retval = shell.main() | ||
1039 | sys.exit(retval) | ||
1040 | |||
1041 | 'Cmdln' extends 'RawCmdln' by providing optparse option processing | ||
1042 | integration. See this class' _dispatch_cmd() docstring and | ||
1043 | <http://trentm.com/projects/cmdln> for more information. | ||
1044 | """ | ||
1045 | def _dispatch_cmd(self, handler, argv): | ||
1046 | """Introspect sub-command handler signature to determine how to | ||
1047 | dispatch the command. The raw handler provided by the base | ||
1048 | 'RawCmdln' class is still supported: | ||
1049 | |||
1050 | def do_foo(self, argv): | ||
1051 | # 'argv' is the vector of command line args, argv[0] is | ||
1052 | # the command name itself (i.e. "foo" or an alias) | ||
1053 | pass | ||
1054 | |||
1055 | In addition, if the handler has more than 2 arguments option | ||
1056 | processing is automatically done (using optparse): | ||
1057 | |||
1058 | @cmdln.option('-v', '--verbose', action='store_true') | ||
1059 | def do_bar(self, subcmd, opts, *args): | ||
1060 | # subcmd = <"bar" or an alias> | ||
1061 | # opts = <an optparse.Values instance> | ||
1062 | if opts.verbose: | ||
1063 | print "lots of debugging output..." | ||
1064 | # args = <tuple of arguments> | ||
1065 | for arg in args: | ||
1066 | bar(arg) | ||
1067 | |||
1068 | TODO: explain that "*args" can be other signatures as well. | ||
1069 | |||
1070 | The `cmdln.option` decorator corresponds to an `add_option()` | ||
1071 | method call on an `optparse.OptionParser` instance. | ||
1072 | |||
1073 | You can declare a specific number of arguments: | ||
1074 | |||
1075 | @cmdln.option('-v', '--verbose', action='store_true') | ||
1076 | def do_bar2(self, subcmd, opts, bar_one, bar_two): | ||
1077 | #... | ||
1078 | |||
1079 | and an appropriate error message will be raised/printed if the | ||
1080 | command is called with a different number of args. | ||
1081 | """ | ||
1082 | co_argcount = handler.im_func.func_code.co_argcount | ||
1083 | if co_argcount == 2: # handler ::= do_foo(self, argv) | ||
1084 | return handler(argv) | ||
1085 | elif co_argcount >= 3: # handler ::= do_foo(self, subcmd, opts, ...) | ||
1086 | try: | ||
1087 | optparser = handler.optparser | ||
1088 | except AttributeError: | ||
1089 | optparser = handler.im_func.optparser = SubCmdOptionParser() | ||
1090 | assert isinstance(optparser, SubCmdOptionParser) | ||
1091 | optparser.set_cmdln_info(self, argv[0]) | ||
1092 | try: | ||
1093 | opts, args = optparser.parse_args(argv[1:]) | ||
1094 | except StopOptionProcessing: | ||
1095 | #TODO: this doesn't really fly for a replacement of | ||
1096 | # optparse.py behaviour, does it? | ||
1097 | return 0 # Normal command termination | ||
1098 | |||
1099 | try: | ||
1100 | return handler(argv[0], opts, *args) | ||
1101 | except TypeError, ex: | ||
1102 | # Some TypeError's are user errors: | ||
1103 | # do_foo() takes at least 4 arguments (3 given) | ||
1104 | # do_foo() takes at most 5 arguments (6 given) | ||
1105 | # do_foo() takes exactly 5 arguments (6 given) | ||
1106 | # Raise CmdlnUserError for these with a suitably | ||
1107 | # massaged error message. | ||
1108 | import sys | ||
1109 | tb = sys.exc_info()[2] # the traceback object | ||
1110 | if tb.tb_next is not None: | ||
1111 | # If the traceback is more than one level deep, then the | ||
1112 | # TypeError do *not* happen on the "handler(...)" call | ||
1113 | # above. In that we don't want to handle it specially | ||
1114 | # here: it would falsely mask deeper code errors. | ||
1115 | raise | ||
1116 | msg = ex.args[0] | ||
1117 | match = _INCORRECT_NUM_ARGS_RE.search(msg) | ||
1118 | if match: | ||
1119 | msg = list(match.groups()) | ||
1120 | msg[1] = int(msg[1]) - 3 | ||
1121 | if msg[1] == 1: | ||
1122 | msg[2] = msg[2].replace("arguments", "argument") | ||
1123 | msg[3] = int(msg[3]) - 3 | ||
1124 | msg = ''.join(map(str, msg)) | ||
1125 | raise CmdlnUserError(msg) | ||
1126 | else: | ||
1127 | raise | ||
1128 | else: | ||
1129 | raise CmdlnError("incorrect argcount for %s(): takes %d, must " | ||
1130 | "take 2 for 'argv' signature or 3+ for 'opts' " | ||
1131 | "signature" % (handler.__name__, co_argcount)) | ||
1132 | |||
1133 | |||
1134 | |||
1135 | #---- internal support functions | ||
1136 | |||
1137 | def _format_linedata(linedata, indent, indent_width): | ||
1138 | """Format specific linedata into a pleasant layout. | ||
1139 | |||
1140 | "linedata" is a list of 2-tuples of the form: | ||
1141 | (<item-display-string>, <item-docstring>) | ||
1142 | "indent" is a string to use for one level of indentation | ||
1143 | "indent_width" is a number of columns by which the | ||
1144 | formatted data will be indented when printed. | ||
1145 | |||
1146 | The <item-display-string> column is held to 15 columns. | ||
1147 | """ | ||
1148 | lines = [] | ||
1149 | WIDTH = 78 - indent_width | ||
1150 | SPACING = 2 | ||
1151 | NAME_WIDTH_LOWER_BOUND = 13 | ||
1152 | NAME_WIDTH_UPPER_BOUND = 16 | ||
1153 | NAME_WIDTH = max([len(s) for s,d in linedata]) | ||
1154 | if NAME_WIDTH < NAME_WIDTH_LOWER_BOUND: | ||
1155 | NAME_WIDTH = NAME_WIDTH_LOWER_BOUND | ||
1156 | else: | ||
1157 | NAME_WIDTH = NAME_WIDTH_UPPER_BOUND | ||
1158 | |||
1159 | DOC_WIDTH = WIDTH - NAME_WIDTH - SPACING | ||
1160 | for namestr, doc in linedata: | ||
1161 | line = indent + namestr | ||
1162 | if len(namestr) <= NAME_WIDTH: | ||
1163 | line += ' ' * (NAME_WIDTH + SPACING - len(namestr)) | ||
1164 | else: | ||
1165 | lines.append(line) | ||
1166 | line = indent + ' ' * (NAME_WIDTH + SPACING) | ||
1167 | line += _summarize_doc(doc, DOC_WIDTH) | ||
1168 | lines.append(line.rstrip()) | ||
1169 | return lines | ||
1170 | |||
1171 | def _summarize_doc(doc, length=60): | ||
1172 | r"""Parse out a short one line summary from the given doclines. | ||
1173 | |||
1174 | "doc" is the doc string to summarize. | ||
1175 | "length" is the max length for the summary | ||
1176 | |||
1177 | >>> _summarize_doc("this function does this") | ||
1178 | 'this function does this' | ||
1179 | >>> _summarize_doc("this function does this", 10) | ||
1180 | 'this fu...' | ||
1181 | >>> _summarize_doc("this function does this\nand that") | ||
1182 | 'this function does this and that' | ||
1183 | >>> _summarize_doc("this function does this\n\nand that") | ||
1184 | 'this function does this' | ||
1185 | """ | ||
1186 | import re | ||
1187 | if doc is None: | ||
1188 | return "" | ||
1189 | assert length > 3, "length <= 3 is absurdly short for a doc summary" | ||
1190 | doclines = doc.strip().splitlines(0) | ||
1191 | if not doclines: | ||
1192 | return "" | ||
1193 | |||
1194 | summlines = [] | ||
1195 | for i, line in enumerate(doclines): | ||
1196 | stripped = line.strip() | ||
1197 | if not stripped: | ||
1198 | break | ||
1199 | summlines.append(stripped) | ||
1200 | if len(''.join(summlines)) >= length: | ||
1201 | break | ||
1202 | |||
1203 | summary = ' '.join(summlines) | ||
1204 | if len(summary) > length: | ||
1205 | summary = summary[:length-3] + "..." | ||
1206 | return summary | ||
1207 | |||
1208 | |||
1209 | def line2argv(line): | ||
1210 | r"""Parse the given line into an argument vector. | ||
1211 | |||
1212 | "line" is the line of input to parse. | ||
1213 | |||
1214 | This may get niggly when dealing with quoting and escaping. The | ||
1215 | current state of this parsing may not be completely thorough/correct | ||
1216 | in this respect. | ||
1217 | |||
1218 | >>> from cmdln import line2argv | ||
1219 | >>> line2argv("foo") | ||
1220 | ['foo'] | ||
1221 | >>> line2argv("foo bar") | ||
1222 | ['foo', 'bar'] | ||
1223 | >>> line2argv("foo bar ") | ||
1224 | ['foo', 'bar'] | ||
1225 | >>> line2argv(" foo bar") | ||
1226 | ['foo', 'bar'] | ||
1227 | |||
1228 | Quote handling: | ||
1229 | |||
1230 | >>> line2argv("'foo bar'") | ||
1231 | ['foo bar'] | ||
1232 | >>> line2argv('"foo bar"') | ||
1233 | ['foo bar'] | ||
1234 | >>> line2argv(r'"foo\"bar"') | ||
1235 | ['foo"bar'] | ||
1236 | >>> line2argv("'foo bar' spam") | ||
1237 | ['foo bar', 'spam'] | ||
1238 | >>> line2argv("'foo 'bar spam") | ||
1239 | ['foo bar', 'spam'] | ||
1240 | |||
1241 | >>> line2argv('some\tsimple\ttests') | ||
1242 | ['some', 'simple', 'tests'] | ||
1243 | >>> line2argv('a "more complex" test') | ||
1244 | ['a', 'more complex', 'test'] | ||
1245 | >>> line2argv('a more="complex test of " quotes') | ||
1246 | ['a', 'more=complex test of ', 'quotes'] | ||
1247 | >>> line2argv('a more" complex test of " quotes') | ||
1248 | ['a', 'more complex test of ', 'quotes'] | ||
1249 | >>> line2argv('an "embedded \\"quote\\""') | ||
1250 | ['an', 'embedded "quote"'] | ||
1251 | |||
1252 | # Komodo bug 48027 | ||
1253 | >>> line2argv('foo bar C:\\') | ||
1254 | ['foo', 'bar', 'C:\\'] | ||
1255 | |||
1256 | # Komodo change 127581 | ||
1257 | >>> line2argv(r'"\test\slash" "foo bar" "foo\"bar"') | ||
1258 | ['\\test\\slash', 'foo bar', 'foo"bar'] | ||
1259 | |||
1260 | # Komodo change 127629 | ||
1261 | >>> if sys.platform == "win32": | ||
1262 | ... line2argv(r'\foo\bar') == ['\\foo\\bar'] | ||
1263 | ... line2argv(r'\\foo\\bar') == ['\\\\foo\\\\bar'] | ||
1264 | ... line2argv('"foo') == ['foo'] | ||
1265 | ... else: | ||
1266 | ... line2argv(r'\foo\bar') == ['foobar'] | ||
1267 | ... line2argv(r'\\foo\\bar') == ['\\foo\\bar'] | ||
1268 | ... try: | ||
1269 | ... line2argv('"foo') | ||
1270 | ... except ValueError, ex: | ||
1271 | ... "not terminated" in str(ex) | ||
1272 | True | ||
1273 | True | ||
1274 | True | ||
1275 | """ | ||
1276 | import string | ||
1277 | line = line.strip() | ||
1278 | argv = [] | ||
1279 | state = "default" | ||
1280 | arg = None # the current argument being parsed | ||
1281 | i = -1 | ||
1282 | while 1: | ||
1283 | i += 1 | ||
1284 | if i >= len(line): break | ||
1285 | ch = line[i] | ||
1286 | |||
1287 | if ch == "\\" and i+1 < len(line): | ||
1288 | # escaped char always added to arg, regardless of state | ||
1289 | if arg is None: arg = "" | ||
1290 | if (sys.platform == "win32" | ||
1291 | or state in ("double-quoted", "single-quoted") | ||
1292 | ) and line[i+1] not in tuple('"\''): | ||
1293 | arg += ch | ||
1294 | i += 1 | ||
1295 | arg += line[i] | ||
1296 | continue | ||
1297 | |||
1298 | if state == "single-quoted": | ||
1299 | if ch == "'": | ||
1300 | state = "default" | ||
1301 | else: | ||
1302 | arg += ch | ||
1303 | elif state == "double-quoted": | ||
1304 | if ch == '"': | ||
1305 | state = "default" | ||
1306 | else: | ||
1307 | arg += ch | ||
1308 | elif state == "default": | ||
1309 | if ch == '"': | ||
1310 | if arg is None: arg = "" | ||
1311 | state = "double-quoted" | ||
1312 | elif ch == "'": | ||
1313 | if arg is None: arg = "" | ||
1314 | state = "single-quoted" | ||
1315 | elif ch in string.whitespace: | ||
1316 | if arg is not None: | ||
1317 | argv.append(arg) | ||
1318 | arg = None | ||
1319 | else: | ||
1320 | if arg is None: arg = "" | ||
1321 | arg += ch | ||
1322 | if arg is not None: | ||
1323 | argv.append(arg) | ||
1324 | if not sys.platform == "win32" and state != "default": | ||
1325 | raise ValueError("command line is not terminated: unfinished %s " | ||
1326 | "segment" % state) | ||
1327 | return argv | ||
1328 | |||
1329 | |||
1330 | def argv2line(argv): | ||
1331 | r"""Put together the given argument vector into a command line. | ||
1332 | |||
1333 | "argv" is the argument vector to process. | ||
1334 | |||
1335 | >>> from cmdln import argv2line | ||
1336 | >>> argv2line(['foo']) | ||
1337 | 'foo' | ||
1338 | >>> argv2line(['foo', 'bar']) | ||
1339 | 'foo bar' | ||
1340 | >>> argv2line(['foo', 'bar baz']) | ||
1341 | 'foo "bar baz"' | ||
1342 | >>> argv2line(['foo"bar']) | ||
1343 | 'foo"bar' | ||
1344 | >>> print argv2line(['foo" bar']) | ||
1345 | 'foo" bar' | ||
1346 | >>> print argv2line(["foo' bar"]) | ||
1347 | "foo' bar" | ||
1348 | >>> argv2line(["foo'bar"]) | ||
1349 | "foo'bar" | ||
1350 | """ | ||
1351 | escapedArgs = [] | ||
1352 | for arg in argv: | ||
1353 | if ' ' in arg and '"' not in arg: | ||
1354 | arg = '"'+arg+'"' | ||
1355 | elif ' ' in arg and "'" not in arg: | ||
1356 | arg = "'"+arg+"'" | ||
1357 | elif ' ' in arg: | ||
1358 | arg = arg.replace('"', r'\"') | ||
1359 | arg = '"'+arg+'"' | ||
1360 | escapedArgs.append(arg) | ||
1361 | return ' '.join(escapedArgs) | ||
1362 | |||
1363 | |||
1364 | # Recipe: dedent (0.1) in /Users/trentm/tm/recipes/cookbook | ||
1365 | def _dedentlines(lines, tabsize=8, skip_first_line=False): | ||
1366 | """_dedentlines(lines, tabsize=8, skip_first_line=False) -> dedented lines | ||
1367 | |||
1368 | "lines" is a list of lines to dedent. | ||
1369 | "tabsize" is the tab width to use for indent width calculations. | ||
1370 | "skip_first_line" is a boolean indicating if the first line should | ||
1371 | be skipped for calculating the indent width and for dedenting. | ||
1372 | This is sometimes useful for docstrings and similar. | ||
1373 | |||
1374 | Same as dedent() except operates on a sequence of lines. Note: the | ||
1375 | lines list is modified **in-place**. | ||
1376 | """ | ||
1377 | DEBUG = False | ||
1378 | if DEBUG: | ||
1379 | print "dedent: dedent(..., tabsize=%d, skip_first_line=%r)"\ | ||
1380 | % (tabsize, skip_first_line) | ||
1381 | indents = [] | ||
1382 | margin = None | ||
1383 | for i, line in enumerate(lines): | ||
1384 | if i == 0 and skip_first_line: continue | ||
1385 | indent = 0 | ||
1386 | for ch in line: | ||
1387 | if ch == ' ': | ||
1388 | indent += 1 | ||
1389 | elif ch == '\t': | ||
1390 | indent += tabsize - (indent % tabsize) | ||
1391 | elif ch in '\r\n': | ||
1392 | continue # skip all-whitespace lines | ||
1393 | else: | ||
1394 | break | ||
1395 | else: | ||
1396 | continue # skip all-whitespace lines | ||
1397 | if DEBUG: print "dedent: indent=%d: %r" % (indent, line) | ||
1398 | if margin is None: | ||
1399 | margin = indent | ||
1400 | else: | ||
1401 | margin = min(margin, indent) | ||
1402 | if DEBUG: print "dedent: margin=%r" % margin | ||
1403 | |||
1404 | if margin is not None and margin > 0: | ||
1405 | for i, line in enumerate(lines): | ||
1406 | if i == 0 and skip_first_line: continue | ||
1407 | removed = 0 | ||
1408 | for j, ch in enumerate(line): | ||
1409 | if ch == ' ': | ||
1410 | removed += 1 | ||
1411 | elif ch == '\t': | ||
1412 | removed += tabsize - (removed % tabsize) | ||
1413 | elif ch in '\r\n': | ||
1414 | if DEBUG: print "dedent: %r: EOL -> strip up to EOL" % line | ||
1415 | lines[i] = lines[i][j:] | ||
1416 | break | ||
1417 | else: | ||
1418 | raise ValueError("unexpected non-whitespace char %r in " | ||
1419 | "line %r while removing %d-space margin" | ||
1420 | % (ch, line, margin)) | ||
1421 | if DEBUG: | ||
1422 | print "dedent: %r: %r -> removed %d/%d"\ | ||
1423 | % (line, ch, removed, margin) | ||
1424 | if removed == margin: | ||
1425 | lines[i] = lines[i][j+1:] | ||
1426 | break | ||
1427 | elif removed > margin: | ||
1428 | lines[i] = ' '*(removed-margin) + lines[i][j+1:] | ||
1429 | break | ||
1430 | return lines | ||
1431 | |||
1432 | def _dedent(text, tabsize=8, skip_first_line=False): | ||
1433 | """_dedent(text, tabsize=8, skip_first_line=False) -> dedented text | ||
1434 | |||
1435 | "text" is the text to dedent. | ||
1436 | "tabsize" is the tab width to use for indent width calculations. | ||
1437 | "skip_first_line" is a boolean indicating if the first line should | ||
1438 | be skipped for calculating the indent width and for dedenting. | ||
1439 | This is sometimes useful for docstrings and similar. | ||
1440 | |||
1441 | textwrap.dedent(s), but don't expand tabs to spaces | ||
1442 | """ | ||
1443 | lines = text.splitlines(1) | ||
1444 | _dedentlines(lines, tabsize=tabsize, skip_first_line=skip_first_line) | ||
1445 | return ''.join(lines) | ||
1446 | |||
1447 | |||
1448 | def _get_indent(marker, s, tab_width=8): | ||
1449 | """_get_indent(marker, s, tab_width=8) -> | ||
1450 | (<indentation-of-'marker'>, <indentation-width>)""" | ||
1451 | # Figure out how much the marker is indented. | ||
1452 | INDENT_CHARS = tuple(' \t') | ||
1453 | start = s.index(marker) | ||
1454 | i = start | ||
1455 | while i > 0: | ||
1456 | if s[i-1] not in INDENT_CHARS: | ||
1457 | break | ||
1458 | i -= 1 | ||
1459 | indent = s[i:start] | ||
1460 | indent_width = 0 | ||
1461 | for ch in indent: | ||
1462 | if ch == ' ': | ||
1463 | indent_width += 1 | ||
1464 | elif ch == '\t': | ||
1465 | indent_width += tab_width - (indent_width % tab_width) | ||
1466 | return indent, indent_width | ||
1467 | |||
1468 | def _get_trailing_whitespace(marker, s): | ||
1469 | """Return the whitespace content trailing the given 'marker' in string 's', | ||
1470 | up to and including a newline. | ||
1471 | """ | ||
1472 | suffix = '' | ||
1473 | start = s.index(marker) + len(marker) | ||
1474 | i = start | ||
1475 | while i < len(s): | ||
1476 | if s[i] in ' \t': | ||
1477 | suffix += s[i] | ||
1478 | elif s[i] in '\r\n': | ||
1479 | suffix += s[i] | ||
1480 | if s[i] == '\r' and i+1 < len(s) and s[i+1] == '\n': | ||
1481 | suffix += s[i+1] | ||
1482 | break | ||
1483 | else: | ||
1484 | break | ||
1485 | i += 1 | ||
1486 | return suffix | ||
1487 | |||
1488 | |||
1489 | |||
1490 | #---- bash completion support | ||
1491 | # Note: This is still experimental. I expect to change this | ||
1492 | # significantly. | ||
1493 | # | ||
1494 | # To get Bash completion for a cmdln.Cmdln class, run the following | ||
1495 | # bash command: | ||
1496 | # $ complete -C 'python -m cmdln /path/to/script.py CmdlnClass' cmdname | ||
1497 | # For example: | ||
1498 | # $ complete -C 'python -m cmdln ~/bin/svn.py SVN' svn | ||
1499 | # | ||
1500 | #TODO: Simplify the above so don't have to given path to script (try to | ||
1501 | # find it on PATH, if possible). Could also make class name | ||
1502 | # optional if there is only one in the module (common case). | ||
1503 | |||
1504 | if __name__ == "__main__" and len(sys.argv) == 6: | ||
1505 | def _log(s): | ||
1506 | return # no-op, comment out for debugging | ||
1507 | from os.path import expanduser | ||
1508 | fout = open(expanduser("~/tmp/bashcpln.log"), 'a') | ||
1509 | fout.write(str(s) + '\n') | ||
1510 | fout.close() | ||
1511 | |||
1512 | # Recipe: module_from_path (1.0.1+) | ||
1513 | def _module_from_path(path): | ||
1514 | import imp, os, sys | ||
1515 | path = os.path.expanduser(path) | ||
1516 | dir = os.path.dirname(path) or os.curdir | ||
1517 | name = os.path.splitext(os.path.basename(path))[0] | ||
1518 | sys.path.insert(0, dir) | ||
1519 | try: | ||
1520 | iinfo = imp.find_module(name, [dir]) | ||
1521 | return imp.load_module(name, *iinfo) | ||
1522 | finally: | ||
1523 | sys.path.remove(dir) | ||
1524 | |||
1525 | def _get_bash_cplns(script_path, class_name, cmd_name, | ||
1526 | token, preceding_token): | ||
1527 | _log('--') | ||
1528 | _log('get_cplns(%r, %r, %r, %r, %r)' | ||
1529 | % (script_path, class_name, cmd_name, token, preceding_token)) | ||
1530 | comp_line = os.environ["COMP_LINE"] | ||
1531 | comp_point = int(os.environ["COMP_POINT"]) | ||
1532 | _log("COMP_LINE: %r" % comp_line) | ||
1533 | _log("COMP_POINT: %r" % comp_point) | ||
1534 | |||
1535 | try: | ||
1536 | script = _module_from_path(script_path) | ||
1537 | except ImportError, ex: | ||
1538 | _log("error importing `%s': %s" % (script_path, ex)) | ||
1539 | return [] | ||
1540 | shell = getattr(script, class_name)() | ||
1541 | cmd_map = shell._get_canonical_map() | ||
1542 | del cmd_map["EOF"] | ||
1543 | |||
1544 | # Determine if completing the sub-command name. | ||
1545 | parts = comp_line[:comp_point].split(None, 1) | ||
1546 | _log(parts) | ||
1547 | if len(parts) == 1 or not (' ' in parts[1] or '\t' in parts[1]): | ||
1548 | #TODO: if parts[1].startswith('-'): handle top-level opts | ||
1549 | _log("complete sub-command names") | ||
1550 | matches = {} | ||
1551 | for name, canon_name in cmd_map.items(): | ||
1552 | if name.startswith(token): | ||
1553 | matches[name] = canon_name | ||
1554 | if not matches: | ||
1555 | return [] | ||
1556 | elif len(matches) == 1: | ||
1557 | return matches.keys() | ||
1558 | elif len(set(matches.values())) == 1: | ||
1559 | return [matches.values()[0]] | ||
1560 | else: | ||
1561 | return matches.keys() | ||
1562 | |||
1563 | # Otherwise, complete options for the given sub-command. | ||
1564 | #TODO: refine this so it does the right thing with option args | ||
1565 | if token.startswith('-'): | ||
1566 | cmd_name = comp_line.split(None, 2)[1] | ||
1567 | try: | ||
1568 | cmd_canon_name = cmd_map[cmd_name] | ||
1569 | except KeyError: | ||
1570 | return [] | ||
1571 | handler = shell._get_cmd_handler(cmd_canon_name) | ||
1572 | optparser = getattr(handler, "optparser", None) | ||
1573 | if optparser is None: | ||
1574 | optparser = SubCmdOptionParser() | ||
1575 | opt_strs = [] | ||
1576 | for option in optparser.option_list: | ||
1577 | for opt_str in option._short_opts + option._long_opts: | ||
1578 | if opt_str.startswith(token): | ||
1579 | opt_strs.append(opt_str) | ||
1580 | return opt_strs | ||
1581 | |||
1582 | return [] | ||
1583 | |||
1584 | for cpln in _get_bash_cplns(*sys.argv[1:]): | ||
1585 | print cpln | ||
1586 | |||
diff --git a/scripts/lib/wic/utils/errors.py b/scripts/lib/wic/utils/errors.py new file mode 100644 index 0000000000..9410311875 --- /dev/null +++ b/scripts/lib/wic/utils/errors.py | |||
@@ -0,0 +1,47 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2007 Red Hat, Inc. | ||
4 | # Copyright (c) 2011 Intel, Inc. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify it | ||
7 | # under the terms of the GNU General Public License as published by the Free | ||
8 | # Software Foundation; version 2 of the License | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | # for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along | ||
16 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
17 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | class CreatorError(Exception): | ||
20 | """An exception base class for all imgcreate errors.""" | ||
21 | keyword = '<creator>' | ||
22 | |||
23 | def __init__(self, msg): | ||
24 | self.msg = msg | ||
25 | |||
26 | def __str__(self): | ||
27 | if isinstance(self.msg, unicode): | ||
28 | self.msg = self.msg.encode('utf-8', 'ignore') | ||
29 | else: | ||
30 | self.msg = str(self.msg) | ||
31 | return self.keyword + self.msg | ||
32 | |||
33 | class Usage(CreatorError): | ||
34 | keyword = '<usage>' | ||
35 | |||
36 | def __str__(self): | ||
37 | if isinstance(self.msg, unicode): | ||
38 | self.msg = self.msg.encode('utf-8', 'ignore') | ||
39 | else: | ||
40 | self.msg = str(self.msg) | ||
41 | return self.keyword + self.msg + ', please use "--help" for more info' | ||
42 | |||
43 | class KsError(CreatorError): | ||
44 | keyword = '<kickstart>' | ||
45 | |||
46 | class ImageError(CreatorError): | ||
47 | keyword = '<mount>' | ||
diff --git a/scripts/lib/wic/utils/fs_related.py b/scripts/lib/wic/utils/fs_related.py new file mode 100644 index 0000000000..ea9f85c60f --- /dev/null +++ b/scripts/lib/wic/utils/fs_related.py | |||
@@ -0,0 +1,111 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2007, Red Hat, Inc. | ||
4 | # Copyright (c) 2009, 2010, 2011 Intel, Inc. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify it | ||
7 | # under the terms of the GNU General Public License as published by the Free | ||
8 | # Software Foundation; version 2 of the License | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
12 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
13 | # for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License along | ||
16 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
17 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | |||
19 | from __future__ import with_statement | ||
20 | import os | ||
21 | import sys | ||
22 | import errno | ||
23 | import stat | ||
24 | import random | ||
25 | import string | ||
26 | import time | ||
27 | import uuid | ||
28 | |||
29 | from wic import msger | ||
30 | from wic.utils import runner | ||
31 | from wic.utils.errors import * | ||
32 | from wic.utils.oe.misc import * | ||
33 | |||
34 | def find_binary_path(binary): | ||
35 | if os.environ.has_key("PATH"): | ||
36 | paths = os.environ["PATH"].split(":") | ||
37 | else: | ||
38 | paths = [] | ||
39 | if os.environ.has_key("HOME"): | ||
40 | paths += [os.environ["HOME"] + "/bin"] | ||
41 | paths += ["/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin"] | ||
42 | |||
43 | for path in paths: | ||
44 | bin_path = "%s/%s" % (path, binary) | ||
45 | if os.path.exists(bin_path): | ||
46 | return bin_path | ||
47 | |||
48 | print "External command '%s' not found, exiting." % binary | ||
49 | print " (Please install '%s' on your host system)" % binary | ||
50 | sys.exit(1) | ||
51 | |||
52 | def makedirs(dirname): | ||
53 | """A version of os.makedirs() that doesn't throw an | ||
54 | exception if the leaf directory already exists. | ||
55 | """ | ||
56 | try: | ||
57 | os.makedirs(dirname) | ||
58 | except OSError, err: | ||
59 | if err.errno != errno.EEXIST: | ||
60 | raise | ||
61 | |||
62 | class Disk: | ||
63 | """ | ||
64 | Generic base object for a disk. | ||
65 | """ | ||
66 | def __init__(self, size, device = None): | ||
67 | self._device = device | ||
68 | self._size = size | ||
69 | |||
70 | def create(self): | ||
71 | pass | ||
72 | |||
73 | def cleanup(self): | ||
74 | pass | ||
75 | |||
76 | def get_device(self): | ||
77 | return self._device | ||
78 | def set_device(self, path): | ||
79 | self._device = path | ||
80 | device = property(get_device, set_device) | ||
81 | |||
82 | def get_size(self): | ||
83 | return self._size | ||
84 | size = property(get_size) | ||
85 | |||
86 | |||
87 | class DiskImage(Disk): | ||
88 | """ | ||
89 | A Disk backed by a file. | ||
90 | """ | ||
91 | def __init__(self, image_file, size): | ||
92 | Disk.__init__(self, size) | ||
93 | self.image_file = image_file | ||
94 | |||
95 | def exists(self): | ||
96 | return os.path.exists(self.image_file) | ||
97 | |||
98 | def create(self): | ||
99 | if self.device is not None: | ||
100 | return | ||
101 | |||
102 | blocks = self.size / 1024 | ||
103 | if self.size - blocks * 1024: | ||
104 | blocks += 1 | ||
105 | |||
106 | # create disk image | ||
107 | dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=1" % \ | ||
108 | (self.image_file, blocks) | ||
109 | exec_cmd(dd_cmd) | ||
110 | |||
111 | self.device = self.image_file | ||
diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py new file mode 100644 index 0000000000..6e56316608 --- /dev/null +++ b/scripts/lib/wic/utils/misc.py | |||
@@ -0,0 +1,59 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2010, 2011 Intel Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU General Public License as published by the Free | ||
7 | # Software Foundation; version 2 of the License | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | # for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
16 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | |||
18 | import os | ||
19 | import sys | ||
20 | import time | ||
21 | |||
22 | def build_name(kscfg, release=None, prefix = None, suffix = None): | ||
23 | """Construct and return an image name string. | ||
24 | |||
25 | This is a utility function to help create sensible name and fslabel | ||
26 | strings. The name is constructed using the sans-prefix-and-extension | ||
27 | kickstart filename and the supplied prefix and suffix. | ||
28 | |||
29 | kscfg -- a path to a kickstart file | ||
30 | release -- a replacement to suffix for image release | ||
31 | prefix -- a prefix to prepend to the name; defaults to None, which causes | ||
32 | no prefix to be used | ||
33 | suffix -- a suffix to append to the name; defaults to None, which causes | ||
34 | a YYYYMMDDHHMM suffix to be used | ||
35 | |||
36 | Note, if maxlen is less then the len(suffix), you get to keep both pieces. | ||
37 | |||
38 | """ | ||
39 | name = os.path.basename(kscfg) | ||
40 | idx = name.rfind('.') | ||
41 | if idx >= 0: | ||
42 | name = name[:idx] | ||
43 | |||
44 | if release is not None: | ||
45 | suffix = "" | ||
46 | if prefix is None: | ||
47 | prefix = "" | ||
48 | if suffix is None: | ||
49 | suffix = time.strftime("%Y%m%d%H%M") | ||
50 | |||
51 | if name.startswith(prefix): | ||
52 | name = name[len(prefix):] | ||
53 | |||
54 | prefix = "%s-" % prefix if prefix else "" | ||
55 | suffix = "-%s" % suffix if suffix else "" | ||
56 | |||
57 | ret = prefix + name + suffix | ||
58 | |||
59 | return ret | ||
diff --git a/scripts/lib/wic/utils/oe/__init__.py b/scripts/lib/wic/utils/oe/__init__.py new file mode 100644 index 0000000000..0a81575a74 --- /dev/null +++ b/scripts/lib/wic/utils/oe/__init__.py | |||
@@ -0,0 +1,22 @@ | |||
1 | # | ||
2 | # OpenEmbedded wic utils library | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # AUTHORS | ||
21 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
22 | # | ||
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py new file mode 100644 index 0000000000..b0b5baab73 --- /dev/null +++ b/scripts/lib/wic/utils/oe/misc.py | |||
@@ -0,0 +1,205 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2013, Intel Corporation. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This module provides a place to collect various wic-related utils | ||
22 | # for the OpenEmbedded Image Tools. | ||
23 | # | ||
24 | # AUTHORS | ||
25 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
26 | # | ||
27 | |||
28 | from wic import msger | ||
29 | from wic.utils import runner | ||
30 | |||
31 | def __exec_cmd(cmd_and_args, as_shell = False, catch = 3): | ||
32 | """ | ||
33 | Execute command, catching stderr, stdout | ||
34 | |||
35 | Need to execute as_shell if the command uses wildcards | ||
36 | """ | ||
37 | msger.debug("__exec_cmd: %s" % cmd_and_args) | ||
38 | args = cmd_and_args.split() | ||
39 | msger.debug(args) | ||
40 | |||
41 | if (as_shell): | ||
42 | rc, out = runner.runtool(cmd_and_args, catch) | ||
43 | else: | ||
44 | rc, out = runner.runtool(args, catch) | ||
45 | out = out.strip() | ||
46 | msger.debug("__exec_cmd: output for %s (rc = %d): %s" % \ | ||
47 | (cmd_and_args, rc, out)) | ||
48 | |||
49 | return (rc, out) | ||
50 | |||
51 | |||
52 | def exec_cmd(cmd_and_args, as_shell = False, catch = 3): | ||
53 | """ | ||
54 | Execute command, catching stderr, stdout | ||
55 | |||
56 | Exits if rc non-zero | ||
57 | """ | ||
58 | rc, out = __exec_cmd(cmd_and_args, as_shell, catch) | ||
59 | |||
60 | if rc != 0: | ||
61 | msger.error("exec_cmd: %s returned '%s' instead of 0" % (cmd_and_args, rc)) | ||
62 | |||
63 | return out | ||
64 | |||
65 | |||
66 | def exec_cmd_quiet(cmd_and_args, as_shell = False): | ||
67 | """ | ||
68 | Execute command, catching nothing in the output | ||
69 | |||
70 | Exits if rc non-zero | ||
71 | """ | ||
72 | return exec_cmd(cmd_and_args, as_shell, 0) | ||
73 | |||
74 | |||
75 | def exec_native_cmd(cmd_and_args, native_sysroot, catch = 3): | ||
76 | """ | ||
77 | Execute native command, catching stderr, stdout | ||
78 | |||
79 | Need to execute as_shell if the command uses wildcards | ||
80 | |||
81 | Always need to execute native commands as_shell | ||
82 | """ | ||
83 | native_paths = \ | ||
84 | "export PATH=%s/sbin:%s/usr/sbin:%s/usr/bin:$PATH" % \ | ||
85 | (native_sysroot, native_sysroot, native_sysroot) | ||
86 | native_cmd_and_args = "%s;%s" % (native_paths, cmd_and_args) | ||
87 | msger.debug("exec_native_cmd: %s" % cmd_and_args) | ||
88 | |||
89 | args = cmd_and_args.split() | ||
90 | msger.debug(args) | ||
91 | |||
92 | rc, out = __exec_cmd(native_cmd_and_args, True, catch) | ||
93 | |||
94 | if rc == 127: # shell command-not-found | ||
95 | msger.error("A native (host) program required to build the image " | ||
96 | "was not found (see details above). Please make sure " | ||
97 | "it's installed and try again.") | ||
98 | |||
99 | return (rc, out) | ||
100 | |||
101 | |||
102 | def exec_native_cmd_quiet(cmd_and_args, native_sysroot): | ||
103 | """ | ||
104 | Execute native command, catching nothing in the output | ||
105 | |||
106 | Need to execute as_shell if the command uses wildcards | ||
107 | |||
108 | Always need to execute native commands as_shell | ||
109 | """ | ||
110 | return exec_native_cmd(cmd_and_args, native_sysroot, 0) | ||
111 | |||
112 | |||
113 | # kickstart doesn't support variable substution in commands, so this | ||
114 | # is our current simplistic scheme for supporting that | ||
115 | |||
116 | wks_vars = dict() | ||
117 | |||
118 | def get_wks_var(key): | ||
119 | return wks_vars[key] | ||
120 | |||
121 | def add_wks_var(key, val): | ||
122 | wks_vars[key] = val | ||
123 | |||
124 | BOOTDD_EXTRA_SPACE = 16384 | ||
125 | IMAGE_EXTRA_SPACE = 10240 | ||
126 | IMAGE_OVERHEAD_FACTOR = 1.3 | ||
127 | |||
128 | __bitbake_env_lines = "" | ||
129 | |||
130 | def set_bitbake_env_lines(bitbake_env_lines): | ||
131 | global __bitbake_env_lines | ||
132 | __bitbake_env_lines = bitbake_env_lines | ||
133 | |||
134 | def get_bitbake_env_lines(): | ||
135 | return __bitbake_env_lines | ||
136 | |||
137 | def find_bitbake_env_lines(image_name): | ||
138 | """ | ||
139 | If image_name is empty, plugins might still be able to use the | ||
140 | environment, so set it regardless. | ||
141 | """ | ||
142 | if image_name: | ||
143 | bitbake_env_cmd = "bitbake -e %s" % image_name | ||
144 | else: | ||
145 | bitbake_env_cmd = "bitbake -e" | ||
146 | rc, bitbake_env_lines = __exec_cmd(bitbake_env_cmd) | ||
147 | if rc != 0: | ||
148 | print "Couldn't get '%s' output." % bitbake_env_cmd | ||
149 | return None | ||
150 | |||
151 | return bitbake_env_lines | ||
152 | |||
153 | def find_artifact(bitbake_env_lines, variable): | ||
154 | """ | ||
155 | Gather the build artifact for the current image (the image_name | ||
156 | e.g. core-image-minimal) for the current MACHINE set in local.conf | ||
157 | """ | ||
158 | retval = "" | ||
159 | |||
160 | for line in bitbake_env_lines.split('\n'): | ||
161 | if (get_line_val(line, variable)): | ||
162 | retval = get_line_val(line, variable) | ||
163 | break | ||
164 | |||
165 | return retval | ||
166 | |||
167 | def get_line_val(line, key): | ||
168 | """ | ||
169 | Extract the value from the VAR="val" string | ||
170 | """ | ||
171 | if line.startswith(key + "="): | ||
172 | stripped_line = line.split('=')[1] | ||
173 | stripped_line = stripped_line.replace('\"', '') | ||
174 | return stripped_line | ||
175 | return None | ||
176 | |||
177 | def get_bitbake_var(key): | ||
178 | for line in __bitbake_env_lines.split('\n'): | ||
179 | if (get_line_val(line, key)): | ||
180 | val = get_line_val(line, key) | ||
181 | return val | ||
182 | return None | ||
183 | |||
184 | def parse_sourceparams(sourceparams): | ||
185 | """ | ||
186 | Split sourceparams string of the form key1=val1[,key2=val2,...] | ||
187 | into a dict. Also accepts valueless keys i.e. without =. | ||
188 | |||
189 | Returns dict of param key/val pairs (note that val may be None). | ||
190 | """ | ||
191 | params_dict = {} | ||
192 | |||
193 | params = sourceparams.split(',') | ||
194 | if params: | ||
195 | for p in params: | ||
196 | if not p: | ||
197 | continue | ||
198 | if not '=' in p: | ||
199 | key = p | ||
200 | val = None | ||
201 | else: | ||
202 | key, val = p.split('=') | ||
203 | params_dict[key] = val | ||
204 | |||
205 | return params_dict | ||
diff --git a/scripts/lib/wic/utils/oe/package_manager.py b/scripts/lib/wic/utils/oe/package_manager.py new file mode 100644 index 0000000000..92ce98e2ce --- /dev/null +++ b/scripts/lib/wic/utils/oe/package_manager.py | |||
@@ -0,0 +1,810 @@ | |||
1 | # ex:ts=4:sw=4:sts=4:et | ||
2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
3 | # | ||
4 | # Copyright (c) 2014, Enea AB. | ||
5 | # All rights reserved. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | # | ||
20 | # DESCRIPTION | ||
21 | # This implements the opkg package manager wrapper as a combination of | ||
22 | # meta/lib/oe/package_manager.py and bitbake/lib/bb/utils.py files and | ||
23 | # adaptation of those files to 'wic'. | ||
24 | # | ||
25 | # AUTHORS | ||
26 | # Adrian Calianu <adrian.calianu (at] enea.com> | ||
27 | # | ||
28 | # This file incorporates work covered by the following copyright and | ||
29 | # permission notice: | ||
30 | # | ||
31 | # meta/COPYING.GPLv2 (GPLv2) | ||
32 | # meta/COPYING.MIT (MIT) | ||
33 | # | ||
34 | # Copyright (C) 2004 Michael Lauer | ||
35 | # | ||
36 | # Permission to use, copy, modify, and/or distribute this software | ||
37 | # for any purpose with or without fee is hereby granted, provided | ||
38 | # that the above copyright notice and this permission notice appear | ||
39 | # in all copies. | ||
40 | # | ||
41 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | ||
42 | # WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | ||
43 | # WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | ||
44 | # AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR | ||
45 | # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | ||
46 | # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | ||
47 | # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | ||
48 | # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
49 | |||
50 | |||
51 | from abc import ABCMeta, abstractmethod | ||
52 | import os | ||
53 | import glob | ||
54 | import subprocess | ||
55 | import shutil | ||
56 | import multiprocessing | ||
57 | import re | ||
58 | import errno | ||
59 | import fcntl | ||
60 | |||
61 | from mic.utils.oe.misc import * | ||
62 | from mic import msger | ||
63 | |||
64 | def mkdirhier(directory): | ||
65 | """Create a directory like 'mkdir -p', but does not complain if | ||
66 | directory already exists like os.makedirs | ||
67 | """ | ||
68 | |||
69 | try: | ||
70 | os.makedirs(directory) | ||
71 | except OSError as e: | ||
72 | if e.errno != errno.EEXIST: | ||
73 | raise e | ||
74 | |||
75 | def remove(path, recurse=False): | ||
76 | """Equivalent to rm -f or rm -rf""" | ||
77 | if not path: | ||
78 | return | ||
79 | if recurse: | ||
80 | # shutil.rmtree(name) would be ideal but its too slow | ||
81 | subprocess.call(['rm', '-rf'] + glob.glob(path)) | ||
82 | return | ||
83 | for name in glob.glob(path): | ||
84 | try: | ||
85 | os.unlink(name) | ||
86 | except OSError as exc: | ||
87 | if exc.errno != errno.ENOENT: | ||
88 | raise | ||
89 | |||
90 | def lockfile(name, shared=False, retry=True): | ||
91 | """ | ||
92 | Use the file fn as a lock file, return when the lock has been acquired. | ||
93 | Returns a variable to pass to unlockfile(). | ||
94 | """ | ||
95 | dirname = os.path.dirname(name) | ||
96 | mkdirhier(dirname) | ||
97 | |||
98 | if not os.access(dirname, os.W_OK): | ||
99 | logger.error("Unable to acquire lock '%s', directory is not writable", | ||
100 | name) | ||
101 | sys.exit(1) | ||
102 | |||
103 | op = fcntl.LOCK_EX | ||
104 | if shared: | ||
105 | op = fcntl.LOCK_SH | ||
106 | if not retry: | ||
107 | op = op | fcntl.LOCK_NB | ||
108 | |||
109 | while True: | ||
110 | # If we leave the lockfiles lying around there is no problem | ||
111 | # but we should clean up after ourselves. This gives potential | ||
112 | # for races though. To work around this, when we acquire the lock | ||
113 | # we check the file we locked was still the lock file on disk. | ||
114 | # by comparing inode numbers. If they don't match or the lockfile | ||
115 | # no longer exists, we start again. | ||
116 | |||
117 | # This implementation is unfair since the last person to request the | ||
118 | # lock is the most likely to win it. | ||
119 | |||
120 | try: | ||
121 | lf = open(name, 'a+') | ||
122 | fileno = lf.fileno() | ||
123 | fcntl.flock(fileno, op) | ||
124 | statinfo = os.fstat(fileno) | ||
125 | if os.path.exists(lf.name): | ||
126 | statinfo2 = os.stat(lf.name) | ||
127 | if statinfo.st_ino == statinfo2.st_ino: | ||
128 | return lf | ||
129 | lf.close() | ||
130 | except Exception: | ||
131 | try: | ||
132 | lf.close() | ||
133 | except Exception: | ||
134 | pass | ||
135 | pass | ||
136 | if not retry: | ||
137 | return None | ||
138 | |||
139 | def unlockfile(lf): | ||
140 | """ | ||
141 | Unlock a file locked using lockfile() | ||
142 | """ | ||
143 | try: | ||
144 | # If we had a shared lock, we need to promote to exclusive before | ||
145 | # removing the lockfile. Attempt this, ignore failures. | ||
146 | fcntl.flock(lf.fileno(), fcntl.LOCK_EX|fcntl.LOCK_NB) | ||
147 | os.unlink(lf.name) | ||
148 | except (IOError, OSError): | ||
149 | pass | ||
150 | fcntl.flock(lf.fileno(), fcntl.LOCK_UN) | ||
151 | lf.close() | ||
152 | |||
153 | def which(path, item, direction = 0, history = False): | ||
154 | """ | ||
155 | Locate a file in a PATH | ||
156 | """ | ||
157 | |||
158 | hist = [] | ||
159 | paths = (path or "").split(':') | ||
160 | if direction != 0: | ||
161 | paths.reverse() | ||
162 | |||
163 | for p in paths: | ||
164 | next = os.path.join(p, item) | ||
165 | hist.append(next) | ||
166 | if os.path.exists(next): | ||
167 | if not os.path.isabs(next): | ||
168 | next = os.path.abspath(next) | ||
169 | if history: | ||
170 | return next, hist | ||
171 | return next | ||
172 | |||
173 | if history: | ||
174 | return "", hist | ||
175 | return "" | ||
176 | |||
177 | |||
178 | |||
179 | # this can be used by all PM backends to create the index files in parallel | ||
180 | def wic_create_index(arg): | ||
181 | index_cmd = arg | ||
182 | |||
183 | try: | ||
184 | msger.info("Executing '%s' ..." % index_cmd) | ||
185 | subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True) | ||
186 | except subprocess.CalledProcessError as e: | ||
187 | return("Index creation command '%s' failed with return code %d:\n%s" % | ||
188 | (e.cmd, e.returncode, e.output)) | ||
189 | |||
190 | return None | ||
191 | |||
192 | |||
193 | class WicIndexer(object): | ||
194 | __metaclass__ = ABCMeta | ||
195 | |||
196 | def __init__(self, d, deploy_dir): | ||
197 | self.d = d | ||
198 | self.deploy_dir = deploy_dir | ||
199 | |||
200 | @abstractmethod | ||
201 | def write_index(self): | ||
202 | pass | ||
203 | |||
204 | class WicOpkgIndexer(WicIndexer): | ||
205 | def write_index(self): | ||
206 | arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS", | ||
207 | "SDK_PACKAGE_ARCHS", | ||
208 | "MULTILIB_ARCHS"] | ||
209 | |||
210 | opkg_index_cmd = which(os.getenv('PATH'), "opkg-make-index") | ||
211 | |||
212 | if not os.path.exists(os.path.join(self.deploy_dir, "Packages")): | ||
213 | open(os.path.join(self.deploy_dir, "Packages"), "w").close() | ||
214 | |||
215 | index_cmds = [] | ||
216 | for arch_var in arch_vars: | ||
217 | if self.d.has_key(arch_var): | ||
218 | archs = self.d[arch_var] | ||
219 | else: | ||
220 | archs = None | ||
221 | |||
222 | if archs is None: | ||
223 | continue | ||
224 | |||
225 | for arch in archs.split(): | ||
226 | pkgs_dir = os.path.join(self.deploy_dir, arch) | ||
227 | pkgs_file = os.path.join(pkgs_dir, "Packages") | ||
228 | |||
229 | if not os.path.isdir(pkgs_dir): | ||
230 | continue | ||
231 | |||
232 | if not os.path.exists(pkgs_file): | ||
233 | open(pkgs_file, "w").close() | ||
234 | |||
235 | index_cmds.append('%s -r %s -p %s -m %s' % | ||
236 | (opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir)) | ||
237 | |||
238 | if len(index_cmds) == 0: | ||
239 | msger.info("There are no packages in %s!" % self.deploy_dir) | ||
240 | return | ||
241 | |||
242 | nproc = multiprocessing.cpu_count() | ||
243 | pool = multiprocessing.Pool(nproc) | ||
244 | results = list(pool.imap(wic_create_index, index_cmds)) | ||
245 | pool.close() | ||
246 | pool.join() | ||
247 | |||
248 | for result in results: | ||
249 | if result is not None: | ||
250 | return(result) | ||
251 | |||
252 | class WicPkgsList(object): | ||
253 | __metaclass__ = ABCMeta | ||
254 | |||
255 | def __init__(self, d, rootfs_dir): | ||
256 | self.d = d | ||
257 | self.rootfs_dir = rootfs_dir | ||
258 | |||
259 | @abstractmethod | ||
260 | def list(self, format=None): | ||
261 | pass | ||
262 | |||
263 | |||
264 | class WicOpkgPkgsList(WicPkgsList): | ||
265 | def __init__(self, d, rootfs_dir, config_file): | ||
266 | super(WicOpkgPkgsList, self).__init__(d, rootfs_dir) | ||
267 | |||
268 | self.opkg_cmd = which(os.getenv('PATH'), "opkg-cl") | ||
269 | self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir) | ||
270 | if self.d.has_key("OPKG_ARGS"): | ||
271 | self.opkg_args += self.d["OPKG_ARGS"] | ||
272 | |||
273 | def list(self, format=None): | ||
274 | opkg_query_cmd = which(os.getenv('PATH'), "opkg-query-helper.py") | ||
275 | |||
276 | if format == "arch": | ||
277 | cmd = "%s %s status | %s -a" % \ | ||
278 | (self.opkg_cmd, self.opkg_args, opkg_query_cmd) | ||
279 | elif format == "file": | ||
280 | cmd = "%s %s status | %s -f" % \ | ||
281 | (self.opkg_cmd, self.opkg_args, opkg_query_cmd) | ||
282 | elif format == "ver": | ||
283 | cmd = "%s %s status | %s -v" % \ | ||
284 | (self.opkg_cmd, self.opkg_args, opkg_query_cmd) | ||
285 | elif format == "deps": | ||
286 | cmd = "%s %s status | %s" % \ | ||
287 | (self.opkg_cmd, self.opkg_args, opkg_query_cmd) | ||
288 | else: | ||
289 | cmd = "%s %s list_installed | cut -d' ' -f1" % \ | ||
290 | (self.opkg_cmd, self.opkg_args) | ||
291 | |||
292 | try: | ||
293 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip() | ||
294 | except subprocess.CalledProcessError as e: | ||
295 | msger.error("Cannot get the installed packages list. Command '%s' " | ||
296 | "returned %d:\n%s" % (cmd, e.returncode, e.output)) | ||
297 | |||
298 | if output and format == "file": | ||
299 | tmp_output = "" | ||
300 | for line in output.split('\n'): | ||
301 | pkg, pkg_file, pkg_arch = line.split() | ||
302 | full_path = os.path.join(self.rootfs_dir, pkg_arch, pkg_file) | ||
303 | if os.path.exists(full_path): | ||
304 | tmp_output += "%s %s %s\n" % (pkg, full_path, pkg_arch) | ||
305 | else: | ||
306 | tmp_output += "%s %s %s\n" % (pkg, pkg_file, pkg_arch) | ||
307 | |||
308 | output = tmp_output | ||
309 | |||
310 | return output | ||
311 | |||
312 | |||
313 | class WicPackageManager(object): | ||
314 | """ | ||
315 | This is an abstract class. Do not instantiate this directly. | ||
316 | """ | ||
317 | __metaclass__ = ABCMeta | ||
318 | |||
319 | def __init__(self, d, pseudo, native_sysroot): | ||
320 | self.d = d | ||
321 | self.deploy_dir = None | ||
322 | self.deploy_lock = None | ||
323 | if self.d.has_key('PACKAGE_FEED_URIS'): | ||
324 | self.feed_uris = self.d['PACKAGE_FEED_URIS'] | ||
325 | else: | ||
326 | self.feed_uris = "" | ||
327 | self.pseudo = pseudo | ||
328 | self.native_sysroot = native_sysroot | ||
329 | |||
330 | """ | ||
331 | Update the package manager package database. | ||
332 | """ | ||
333 | @abstractmethod | ||
334 | def update(self): | ||
335 | pass | ||
336 | |||
337 | """ | ||
338 | Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is | ||
339 | True, installation failures are ignored. | ||
340 | """ | ||
341 | @abstractmethod | ||
342 | def install(self, pkgs, attempt_only=False): | ||
343 | pass | ||
344 | |||
345 | """ | ||
346 | Remove a list of packages. 'pkgs' is a list object. If 'with_dependencies' | ||
347 | is False, the any dependencies are left in place. | ||
348 | """ | ||
349 | @abstractmethod | ||
350 | def remove(self, pkgs, with_dependencies=True): | ||
351 | pass | ||
352 | |||
353 | """ | ||
354 | This function creates the index files | ||
355 | """ | ||
356 | @abstractmethod | ||
357 | def write_index(self): | ||
358 | pass | ||
359 | |||
360 | @abstractmethod | ||
361 | def remove_packaging_data(self): | ||
362 | pass | ||
363 | |||
364 | @abstractmethod | ||
365 | def list_installed(self, format=None): | ||
366 | pass | ||
367 | |||
368 | @abstractmethod | ||
369 | def insert_feeds_uris(self): | ||
370 | pass | ||
371 | |||
372 | """ | ||
373 | Install complementary packages based upon the list of currently installed | ||
374 | packages e.g. locales, *-dev, *-dbg, etc. This will only attempt to install | ||
375 | these packages, if they don't exist then no error will occur. Note: every | ||
376 | backend needs to call this function explicitly after the normal package | ||
377 | installation | ||
378 | """ | ||
379 | def install_complementary(self, globs=None): | ||
380 | # we need to write the list of installed packages to a file because the | ||
381 | # oe-pkgdata-util reads it from a file | ||
382 | if self.d.has_key('WORKDIR'): | ||
383 | installed_pkgs_file = os.path.join(self.d['WORKDIR'], | ||
384 | "installed_pkgs.txt") | ||
385 | else: | ||
386 | msger.error("No WORKDIR provided!") | ||
387 | |||
388 | with open(installed_pkgs_file, "w+") as installed_pkgs: | ||
389 | installed_pkgs.write(self.list_installed("arch")) | ||
390 | |||
391 | if globs is None: | ||
392 | if self.d.has_key('IMAGE_INSTALL_COMPLEMENTARY'): | ||
393 | globs = self.d['IMAGE_INSTALL_COMPLEMENTARY'] | ||
394 | split_linguas = set() | ||
395 | |||
396 | if self.d.has_key('IMAGE_LINGUAS'): | ||
397 | for translation in self.d['IMAGE_LINGUAS'].split(): | ||
398 | split_linguas.add(translation) | ||
399 | split_linguas.add(translation.split('-')[0]) | ||
400 | |||
401 | split_linguas = sorted(split_linguas) | ||
402 | |||
403 | for lang in split_linguas: | ||
404 | globs += " *-locale-%s" % lang | ||
405 | |||
406 | if globs is None: | ||
407 | return | ||
408 | |||
409 | if not self.d.has_key('PKGDATA_DIR'): | ||
410 | msger.error("No PKGDATA_DIR provided!") | ||
411 | |||
412 | cmd = [which(os.getenv('PATH'), "oe-pkgdata-util"), | ||
413 | "glob", self.d['PKGDATA_DIR'], installed_pkgs_file, | ||
414 | globs] | ||
415 | |||
416 | rc, out = exec_native_cmd(self.pseudo + cmd, self.native_sysroot) | ||
417 | if rc != 0: | ||
418 | msger.error("Could not compute complementary packages list. Command " | ||
419 | "'%s' returned %d" % | ||
420 | (' '.join(cmd), rc)) | ||
421 | |||
422 | self.install(out.split(), attempt_only=True) | ||
423 | |||
424 | |||
425 | def deploy_dir_lock(self): | ||
426 | if self.deploy_dir is None: | ||
427 | raise RuntimeError("deploy_dir is not set!") | ||
428 | |||
429 | lock_file_name = os.path.join(self.deploy_dir, "deploy.lock") | ||
430 | |||
431 | self.deploy_lock = lockfile(lock_file_name) | ||
432 | |||
433 | def deploy_dir_unlock(self): | ||
434 | if self.deploy_lock is None: | ||
435 | return | ||
436 | |||
437 | unlockfile(self.deploy_lock) | ||
438 | |||
439 | self.deploy_lock = None | ||
440 | |||
441 | |||
442 | class WicOpkgPM(WicPackageManager): | ||
443 | def __init__(self, d, target_rootfs, config_file, archs, pseudo, native_sysroot, task_name='target'): | ||
444 | super(WicOpkgPM, self).__init__(d, pseudo, native_sysroot) | ||
445 | |||
446 | self.target_rootfs = target_rootfs | ||
447 | self.config_file = config_file | ||
448 | self.pkg_archs = archs | ||
449 | self.task_name = task_name | ||
450 | |||
451 | if self.d.has_key("DEPLOY_DIR_IPK"): | ||
452 | self.deploy_dir = self.d["DEPLOY_DIR_IPK"] | ||
453 | |||
454 | self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock") | ||
455 | self.opkg_cmd = which(os.getenv('PATH'), "opkg-cl") | ||
456 | self.opkg_args = "-f %s -o %s " % (self.config_file, target_rootfs) | ||
457 | if self.d.has_key("OPKG_ARGS"): | ||
458 | self.opkg_args += self.d["OPKG_ARGS"] | ||
459 | |||
460 | if self.d.has_key('OPKGLIBDIR'): | ||
461 | opkg_lib_dir = self.d['OPKGLIBDIR'] | ||
462 | else: | ||
463 | opkg_lib_dir = "" | ||
464 | |||
465 | if opkg_lib_dir[0] == "/": | ||
466 | opkg_lib_dir = opkg_lib_dir[1:] | ||
467 | |||
468 | self.opkg_dir = os.path.join(target_rootfs, opkg_lib_dir, "opkg") | ||
469 | |||
470 | mkdirhier(self.opkg_dir) | ||
471 | |||
472 | if self.d.has_key("TMPDIR"): | ||
473 | tmp_dir = self.d["TMPDIR"] | ||
474 | else: | ||
475 | tmp_dir = "" | ||
476 | |||
477 | self.saved_opkg_dir = '%s/saved/%s' % (tmp_dir, self.task_name) | ||
478 | if not os.path.exists('%s/saved' % tmp_dir): | ||
479 | mkdirhier('%s/saved' % tmp_dir) | ||
480 | |||
481 | if self.d.has_key('BUILD_IMAGES_FROM_FEEDS') and self.d['BUILD_IMAGES_FROM_FEEDS'] != "1": | ||
482 | self._create_config() | ||
483 | else: | ||
484 | self._create_custom_config() | ||
485 | |||
486 | self.indexer = WicOpkgIndexer(self.d, self.deploy_dir) | ||
487 | |||
488 | """ | ||
489 | This function will change a package's status in /var/lib/opkg/status file. | ||
490 | If 'packages' is None then the new_status will be applied to all | ||
491 | packages | ||
492 | """ | ||
493 | def mark_packages(self, status_tag, packages=None): | ||
494 | status_file = os.path.join(self.opkg_dir, "status") | ||
495 | |||
496 | with open(status_file, "r") as sf: | ||
497 | with open(status_file + ".tmp", "w+") as tmp_sf: | ||
498 | if packages is None: | ||
499 | tmp_sf.write(re.sub(r"Package: (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)", | ||
500 | r"Package: \1\n\2Status: \3%s" % status_tag, | ||
501 | sf.read())) | ||
502 | else: | ||
503 | if type(packages).__name__ != "list": | ||
504 | raise TypeError("'packages' should be a list object") | ||
505 | |||
506 | status = sf.read() | ||
507 | for pkg in packages: | ||
508 | status = re.sub(r"Package: %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg, | ||
509 | r"Package: %s\n\1Status: \2%s" % (pkg, status_tag), | ||
510 | status) | ||
511 | |||
512 | tmp_sf.write(status) | ||
513 | |||
514 | os.rename(status_file + ".tmp", status_file) | ||
515 | |||
516 | def _create_custom_config(self): | ||
517 | msger.info("Building from feeds activated!") | ||
518 | |||
519 | with open(self.config_file, "w+") as config_file: | ||
520 | priority = 1 | ||
521 | for arch in self.pkg_archs.split(): | ||
522 | config_file.write("arch %s %d\n" % (arch, priority)) | ||
523 | priority += 5 | ||
524 | |||
525 | if self.d.has_key('IPK_FEED_URIS'): | ||
526 | ipk_feed_uris = self.d['IPK_FEED_URIS'] | ||
527 | else: | ||
528 | ipk_feed_uris = "" | ||
529 | |||
530 | for line in ipk_feed_uris.split(): | ||
531 | feed_match = re.match("^[ \t]*(.*)##([^ \t]*)[ \t]*$", line) | ||
532 | |||
533 | if feed_match is not None: | ||
534 | feed_name = feed_match.group(1) | ||
535 | feed_uri = feed_match.group(2) | ||
536 | |||
537 | msger.info("Add %s feed with URL %s" % (feed_name, feed_uri)) | ||
538 | |||
539 | config_file.write("src/gz %s %s\n" % (feed_name, feed_uri)) | ||
540 | |||
541 | """ | ||
542 | Allow to use package deploy directory contents as quick devel-testing | ||
543 | feed. This creates individual feed configs for each arch subdir of those | ||
544 | specified as compatible for the current machine. | ||
545 | NOTE: Development-helper feature, NOT a full-fledged feed. | ||
546 | """ | ||
547 | if self.d.has_key('FEED_DEPLOYDIR_BASE_URI'): | ||
548 | feed_deploydir_base_dir = self.d['FEED_DEPLOYDIR_BASE_URI'] | ||
549 | else: | ||
550 | feed_deploydir_base_dir = "" | ||
551 | |||
552 | if feed_deploydir_base_dir != "": | ||
553 | for arch in self.pkg_archs.split(): | ||
554 | if self.d.has_key("sysconfdir"): | ||
555 | sysconfdir = self.d["sysconfdir"] | ||
556 | else: | ||
557 | sysconfdir = None | ||
558 | |||
559 | cfg_file_name = os.path.join(self.target_rootfs, | ||
560 | sysconfdir, | ||
561 | "opkg", | ||
562 | "local-%s-feed.conf" % arch) | ||
563 | |||
564 | with open(cfg_file_name, "w+") as cfg_file: | ||
565 | cfg_file.write("src/gz local-%s %s/%s" % | ||
566 | arch, | ||
567 | feed_deploydir_base_dir, | ||
568 | arch) | ||
569 | |||
570 | def _create_config(self): | ||
571 | with open(self.config_file, "w+") as config_file: | ||
572 | priority = 1 | ||
573 | for arch in self.pkg_archs.split(): | ||
574 | config_file.write("arch %s %d\n" % (arch, priority)) | ||
575 | priority += 5 | ||
576 | |||
577 | config_file.write("src oe file:%s\n" % self.deploy_dir) | ||
578 | |||
579 | for arch in self.pkg_archs.split(): | ||
580 | pkgs_dir = os.path.join(self.deploy_dir, arch) | ||
581 | if os.path.isdir(pkgs_dir): | ||
582 | config_file.write("src oe-%s file:%s\n" % | ||
583 | (arch, pkgs_dir)) | ||
584 | |||
585 | def insert_feeds_uris(self): | ||
586 | if self.feed_uris == "": | ||
587 | return | ||
588 | |||
589 | rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf' | ||
590 | % self.target_rootfs) | ||
591 | |||
592 | with open(rootfs_config, "w+") as config_file: | ||
593 | uri_iterator = 0 | ||
594 | for uri in self.feed_uris.split(): | ||
595 | config_file.write("src/gz url-%d %s/ipk\n" % | ||
596 | (uri_iterator, uri)) | ||
597 | |||
598 | for arch in self.pkg_archs.split(): | ||
599 | if not os.path.exists(os.path.join(self.deploy_dir, arch)): | ||
600 | continue | ||
601 | msger.info('Note: adding opkg channel url-%s-%d (%s)' % | ||
602 | (arch, uri_iterator, uri)) | ||
603 | |||
604 | config_file.write("src/gz uri-%s-%d %s/ipk/%s\n" % | ||
605 | (arch, uri_iterator, uri, arch)) | ||
606 | uri_iterator += 1 | ||
607 | |||
608 | def update(self): | ||
609 | self.deploy_dir_lock() | ||
610 | |||
611 | cmd = "%s %s update" % (self.opkg_cmd, self.opkg_args) | ||
612 | |||
613 | rc, out = exec_native_cmd(self.pseudo + cmd, self.native_sysroot) | ||
614 | if rc != 0: | ||
615 | self.deploy_dir_unlock() | ||
616 | msger.error("Unable to update the package index files. Command '%s' " | ||
617 | "returned %d" % (cmd, rc)) | ||
618 | |||
619 | self.deploy_dir_unlock() | ||
620 | |||
621 | def install(self, pkgs, attempt_only=False): | ||
622 | if attempt_only and len(pkgs) == 0: | ||
623 | return | ||
624 | |||
625 | cmd = "%s %s install %s" % (self.opkg_cmd, self.opkg_args, ' '.join(pkgs)) | ||
626 | |||
627 | os.environ['D'] = self.target_rootfs | ||
628 | os.environ['OFFLINE_ROOT'] = self.target_rootfs | ||
629 | os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs | ||
630 | os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs | ||
631 | if self.d.has_key('WORKDIR'): | ||
632 | os.environ['INTERCEPT_DIR'] = os.path.join(self.d['WORKDIR'], | ||
633 | "intercept_scripts") | ||
634 | else: | ||
635 | os.environ['INTERCEPT_DIR'] = "." | ||
636 | msger.warning("No WORKDIR provided!") | ||
637 | |||
638 | if self.d.has_key('STAGING_DIR_NATIVE'): | ||
639 | os.environ['NATIVE_ROOT'] = self.d['STAGING_DIR_NATIVE'] | ||
640 | else: | ||
641 | msger.error("No STAGING_DIR_NATIVE provided!") | ||
642 | |||
643 | rc, out = exec_native_cmd(self.pseudo + cmd, self.native_sysroot) | ||
644 | if rc != 0: | ||
645 | msger.error("Unable to install packages. " | ||
646 | "Command '%s' returned %d" % (cmd, rc)) | ||
647 | |||
648 | |||
649 | def remove(self, pkgs, with_dependencies=True): | ||
650 | if with_dependencies: | ||
651 | cmd = "%s %s --force-depends --force-remove --force-removal-of-dependent-packages remove %s" % \ | ||
652 | (self.opkg_cmd, self.opkg_args, ' '.join(pkgs)) | ||
653 | else: | ||
654 | cmd = "%s %s --force-depends remove %s" % \ | ||
655 | (self.opkg_cmd, self.opkg_args, ' '.join(pkgs)) | ||
656 | |||
657 | rc, out = exec_native_cmd(self.pseudo + cmd, self.native_sysroot) | ||
658 | if rc != 0: | ||
659 | msger.error("Unable to remove packages. Command '%s' " | ||
660 | "returned %d" % (cmd, rc)) | ||
661 | |||
662 | |||
663 | def write_index(self): | ||
664 | self.deploy_dir_lock() | ||
665 | |||
666 | result = self.indexer.write_index() | ||
667 | |||
668 | self.deploy_dir_unlock() | ||
669 | |||
670 | if result is not None: | ||
671 | msger.error(result) | ||
672 | |||
673 | def remove_packaging_data(self): | ||
674 | remove(self.opkg_dir, True) | ||
675 | # create the directory back, it's needed by PM lock | ||
676 | mkdirhier(self.opkg_dir) | ||
677 | |||
678 | def list_installed(self, format=None): | ||
679 | return WicOpkgPkgsList(self.d, self.target_rootfs, self.config_file).list(format) | ||
680 | |||
681 | def handle_bad_recommendations(self): | ||
682 | if self.d.has_key("BAD_RECOMMENDATIONS"): | ||
683 | bad_recommendations = self.d["BAD_RECOMMENDATIONS"] | ||
684 | else: | ||
685 | bad_recommendations = "" | ||
686 | |||
687 | if bad_recommendations.strip() == "": | ||
688 | return | ||
689 | |||
690 | status_file = os.path.join(self.opkg_dir, "status") | ||
691 | |||
692 | # If status file existed, it means the bad recommendations has already | ||
693 | # been handled | ||
694 | if os.path.exists(status_file): | ||
695 | return | ||
696 | |||
697 | cmd = "%s %s info " % (self.opkg_cmd, self.opkg_args) | ||
698 | |||
699 | with open(status_file, "w+") as status: | ||
700 | for pkg in bad_recommendations.split(): | ||
701 | pkg_info = cmd + pkg | ||
702 | |||
703 | try: | ||
704 | output = subprocess.check_output(pkg_info.split(), stderr=subprocess.STDOUT).strip() | ||
705 | except subprocess.CalledProcessError as e: | ||
706 | msger.error("Cannot get package info. Command '%s' " | ||
707 | "returned %d:\n%s" % (pkg_info, e.returncode, e.output)) | ||
708 | |||
709 | if output == "": | ||
710 | msger.info("Ignored bad recommendation: '%s' is " | ||
711 | "not a package" % pkg) | ||
712 | continue | ||
713 | |||
714 | for line in output.split('\n'): | ||
715 | if line.startswith("Status:"): | ||
716 | status.write("Status: deinstall hold not-installed\n") | ||
717 | else: | ||
718 | status.write(line + "\n") | ||
719 | |||
720 | ''' | ||
721 | The following function dummy installs pkgs and returns the log of output. | ||
722 | ''' | ||
723 | def dummy_install(self, pkgs): | ||
724 | if len(pkgs) == 0: | ||
725 | return | ||
726 | |||
727 | # Create an temp dir as opkg root for dummy installation | ||
728 | if self.d.has_key("TMPDIR"): | ||
729 | tmp_dir = self.d["TMPDIR"] | ||
730 | else: | ||
731 | tmp_dir = "." | ||
732 | msger.warning("No TMPDIR provided!") | ||
733 | |||
734 | temp_rootfs = '%s/opkg' % tmp_dir | ||
735 | temp_opkg_dir = os.path.join(temp_rootfs, 'var/lib/opkg') | ||
736 | mkdirhier(temp_opkg_dir) | ||
737 | |||
738 | opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs) | ||
739 | if self.d.has_key("OPKG_ARGS"): | ||
740 | opkg_args += self.d["OPKG_ARGS"] | ||
741 | |||
742 | cmd = "%s %s update" % (self.opkg_cmd, opkg_args) | ||
743 | try: | ||
744 | subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | ||
745 | except subprocess.CalledProcessError as e: | ||
746 | msger.error("Unable to update. Command '%s' " | ||
747 | "returned %d:\n%s" % (cmd, e.returncode, e.output)) | ||
748 | |||
749 | # Dummy installation | ||
750 | cmd = "%s %s --noaction install %s " % (self.opkg_cmd, | ||
751 | opkg_args, | ||
752 | ' '.join(pkgs)) | ||
753 | try: | ||
754 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | ||
755 | except subprocess.CalledProcessError as e: | ||
756 | msger.error("Unable to dummy install packages. Command '%s' " | ||
757 | "returned %d:\n%s" % (cmd, e.returncode, e.output)) | ||
758 | |||
759 | remove(temp_rootfs, True) | ||
760 | |||
761 | return output | ||
762 | |||
763 | def backup_packaging_data(self): | ||
764 | # Save the opkglib for increment ipk image generation | ||
765 | if os.path.exists(self.saved_opkg_dir): | ||
766 | remove(self.saved_opkg_dir, True) | ||
767 | shutil.copytree(self.opkg_dir, | ||
768 | self.saved_opkg_dir, | ||
769 | symlinks=True) | ||
770 | |||
771 | def recover_packaging_data(self): | ||
772 | # Move the opkglib back | ||
773 | if os.path.exists(self.saved_opkg_dir): | ||
774 | if os.path.exists(self.opkg_dir): | ||
775 | remove(self.opkg_dir, True) | ||
776 | |||
777 | msger.info('Recover packaging data') | ||
778 | shutil.copytree(self.saved_opkg_dir, | ||
779 | self.opkg_dir, | ||
780 | symlinks=True) | ||
781 | |||
782 | |||
783 | def wic_generate_index_files(d): | ||
784 | if d.has_key('PACKAGE_CLASSES'): | ||
785 | classes = d['PACKAGE_CLASSES'].replace("package_", "").split() | ||
786 | else: | ||
787 | classes = "" | ||
788 | msger.warning("No PACKAGE_CLASSES provided!") | ||
789 | |||
790 | if d.has_key('DEPLOY_DIR_IPK'): | ||
791 | deploy_dir_ipk = d['DEPLOY_DIR_IPK'] | ||
792 | else: | ||
793 | deploy_dir_ipk = None | ||
794 | msger.warning("No DEPLOY_DIR_IPK provided!") | ||
795 | |||
796 | indexer_map = { | ||
797 | "ipk": (WicOpkgIndexer, deploy_dir_ipk) | ||
798 | } | ||
799 | |||
800 | result = None | ||
801 | |||
802 | for pkg_class in classes: | ||
803 | if not pkg_class in indexer_map: | ||
804 | continue | ||
805 | |||
806 | if os.path.exists(indexer_map[pkg_class][1]): | ||
807 | result = indexer_map[pkg_class][0](d, indexer_map[pkg_class][1]).write_index() | ||
808 | |||
809 | if result is not None: | ||
810 | msger.error(result) | ||
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py new file mode 100644 index 0000000000..fb95cc790e --- /dev/null +++ b/scripts/lib/wic/utils/partitionedfs.py | |||
@@ -0,0 +1,360 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2009, 2010, 2011 Intel, Inc. | ||
4 | # Copyright (c) 2007, 2008 Red Hat, Inc. | ||
5 | # Copyright (c) 2008 Daniel P. Berrange | ||
6 | # Copyright (c) 2008 David P. Huff | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify it | ||
9 | # under the terms of the GNU General Public License as published by the Free | ||
10 | # Software Foundation; version 2 of the License | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, but | ||
13 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
14 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
15 | # for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
19 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
20 | |||
21 | import os | ||
22 | |||
23 | from wic import msger | ||
24 | from wic.utils import runner | ||
25 | from wic.utils.errors import ImageError | ||
26 | from wic.utils.fs_related import * | ||
27 | from wic.utils.oe.misc import * | ||
28 | |||
29 | # Overhead of the MBR partitioning scheme (just one sector) | ||
30 | MBR_OVERHEAD = 1 | ||
31 | |||
32 | # Size of a sector in bytes | ||
33 | SECTOR_SIZE = 512 | ||
34 | |||
35 | class Image: | ||
36 | """ | ||
37 | Generic base object for an image. | ||
38 | |||
39 | An Image is a container for a set of DiskImages and associated | ||
40 | partitions. | ||
41 | """ | ||
42 | def __init__(self): | ||
43 | self.disks = {} | ||
44 | self.partitions = [] | ||
45 | self.parted = find_binary_path("parted") | ||
46 | # Size of a sector used in calculations | ||
47 | self.sector_size = SECTOR_SIZE | ||
48 | self._partitions_layed_out = False | ||
49 | |||
50 | def __add_disk(self, disk_name): | ||
51 | """ Add a disk 'disk_name' to the internal list of disks. Note, | ||
52 | 'disk_name' is the name of the disk in the target system | ||
53 | (e.g., sdb). """ | ||
54 | |||
55 | if disk_name in self.disks: | ||
56 | # We already have this disk | ||
57 | return | ||
58 | |||
59 | assert not self._partitions_layed_out | ||
60 | |||
61 | self.disks[disk_name] = \ | ||
62 | { 'disk': None, # Disk object | ||
63 | 'numpart': 0, # Number of allocate partitions | ||
64 | 'partitions': [], # Indexes to self.partitions | ||
65 | 'offset': 0, # Offset of next partition (in sectors) | ||
66 | # Minimum required disk size to fit all partitions (in bytes) | ||
67 | 'min_size': 0, | ||
68 | 'ptable_format': "msdos" } # Partition table format | ||
69 | |||
70 | def add_disk(self, disk_name, disk_obj): | ||
71 | """ Add a disk object which have to be partitioned. More than one disk | ||
72 | can be added. In case of multiple disks, disk partitions have to be | ||
73 | added for each disk separately with 'add_partition()". """ | ||
74 | |||
75 | self.__add_disk(disk_name) | ||
76 | self.disks[disk_name]['disk'] = disk_obj | ||
77 | |||
78 | def __add_partition(self, part): | ||
79 | """ This is a helper function for 'add_partition()' which adds a | ||
80 | partition to the internal list of partitions. """ | ||
81 | |||
82 | assert not self._partitions_layed_out | ||
83 | |||
84 | self.partitions.append(part) | ||
85 | self.__add_disk(part['disk_name']) | ||
86 | |||
87 | def add_partition(self, size, disk_name, mountpoint, source_file = None, fstype = None, | ||
88 | label=None, fsopts = None, boot = False, align = None, | ||
89 | part_type = None): | ||
90 | """ Add the next partition. Prtitions have to be added in the | ||
91 | first-to-last order. """ | ||
92 | |||
93 | ks_pnum = len(self.partitions) | ||
94 | |||
95 | # Converting MB to sectors for parted | ||
96 | size = size * 1024 * 1024 / self.sector_size | ||
97 | |||
98 | # We still need partition for "/" or non-subvolume | ||
99 | if mountpoint == "/" or not fsopts: | ||
100 | part = { 'ks_pnum' : ks_pnum, # Partition number in the KS file | ||
101 | 'size': size, # In sectors | ||
102 | 'mountpoint': mountpoint, # Mount relative to chroot | ||
103 | 'source_file': source_file, # partition contents | ||
104 | 'fstype': fstype, # Filesystem type | ||
105 | 'fsopts': fsopts, # Filesystem mount options | ||
106 | 'label': label, # Partition label | ||
107 | 'disk_name': disk_name, # physical disk name holding partition | ||
108 | 'device': None, # kpartx device node for partition | ||
109 | 'num': None, # Partition number | ||
110 | 'boot': boot, # Bootable flag | ||
111 | 'align': align, # Partition alignment | ||
112 | 'part_type' : part_type } # Partition type | ||
113 | |||
114 | self.__add_partition(part) | ||
115 | |||
116 | def layout_partitions(self, ptable_format = "msdos"): | ||
117 | """ Layout the partitions, meaning calculate the position of every | ||
118 | partition on the disk. The 'ptable_format' parameter defines the | ||
119 | partition table format and may be "msdos". """ | ||
120 | |||
121 | msger.debug("Assigning %s partitions to disks" % ptable_format) | ||
122 | |||
123 | if ptable_format not in ('msdos'): | ||
124 | raise ImageError("Unknown partition table format '%s', supported " \ | ||
125 | "formats are: 'msdos'" % ptable_format) | ||
126 | |||
127 | if self._partitions_layed_out: | ||
128 | return | ||
129 | |||
130 | self._partitions_layed_out = True | ||
131 | |||
132 | # Go through partitions in the order they are added in .ks file | ||
133 | for n in range(len(self.partitions)): | ||
134 | p = self.partitions[n] | ||
135 | |||
136 | if not self.disks.has_key(p['disk_name']): | ||
137 | raise ImageError("No disk %s for partition %s" \ | ||
138 | % (p['disk_name'], p['mountpoint'])) | ||
139 | |||
140 | if p['part_type']: | ||
141 | # The --part-type can also be implemented for MBR partitions, | ||
142 | # in which case it would map to the 1-byte "partition type" | ||
143 | # filed at offset 3 of the partition entry. | ||
144 | raise ImageError("setting custom partition type is not " \ | ||
145 | "implemented for msdos partitions") | ||
146 | |||
147 | # Get the disk where the partition is located | ||
148 | d = self.disks[p['disk_name']] | ||
149 | d['numpart'] += 1 | ||
150 | d['ptable_format'] = ptable_format | ||
151 | |||
152 | if d['numpart'] == 1: | ||
153 | if ptable_format == "msdos": | ||
154 | overhead = MBR_OVERHEAD | ||
155 | |||
156 | # Skip one sector required for the partitioning scheme overhead | ||
157 | d['offset'] += overhead | ||
158 | |||
159 | if p['align']: | ||
160 | # If not first partition and we do have alignment set we need | ||
161 | # to align the partition. | ||
162 | # FIXME: This leaves a empty spaces to the disk. To fill the | ||
163 | # gaps we could enlargea the previous partition? | ||
164 | |||
165 | # Calc how much the alignment is off. | ||
166 | align_sectors = d['offset'] % (p['align'] * 1024 / self.sector_size) | ||
167 | |||
168 | if align_sectors: | ||
169 | # If partition is not aligned as required, we need | ||
170 | # to move forward to the next alignment point | ||
171 | align_sectors = (p['align'] * 1024 / self.sector_size) - align_sectors | ||
172 | |||
173 | msger.debug("Realignment for %s%s with %s sectors, original" | ||
174 | " offset %s, target alignment is %sK." % | ||
175 | (p['disk_name'], d['numpart'], align_sectors, | ||
176 | d['offset'], p['align'])) | ||
177 | |||
178 | # increase the offset so we actually start the partition on right alignment | ||
179 | d['offset'] += align_sectors | ||
180 | |||
181 | p['start'] = d['offset'] | ||
182 | d['offset'] += p['size'] | ||
183 | |||
184 | p['type'] = 'primary' | ||
185 | p['num'] = d['numpart'] | ||
186 | |||
187 | if d['ptable_format'] == "msdos": | ||
188 | if d['numpart'] > 2: | ||
189 | # Every logical partition requires an additional sector for | ||
190 | # the EBR, so steal the last sector from the end of each | ||
191 | # partition starting from the 3rd one for the EBR. This | ||
192 | # will make sure the logical partitions are aligned | ||
193 | # correctly. | ||
194 | p['size'] -= 1 | ||
195 | |||
196 | if d['numpart'] > 3: | ||
197 | p['type'] = 'logical' | ||
198 | p['num'] = d['numpart'] + 1 | ||
199 | |||
200 | d['partitions'].append(n) | ||
201 | msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d " | ||
202 | "sectors (%d bytes)." \ | ||
203 | % (p['mountpoint'], p['disk_name'], p['num'], | ||
204 | p['start'], p['start'] + p['size'] - 1, | ||
205 | p['size'], p['size'] * self.sector_size)) | ||
206 | |||
207 | # Once all the partitions have been layed out, we can calculate the | ||
208 | # minumim disk sizes. | ||
209 | for disk_name, d in self.disks.items(): | ||
210 | d['min_size'] = d['offset'] | ||
211 | |||
212 | d['min_size'] *= self.sector_size | ||
213 | |||
214 | def __run_parted(self, args): | ||
215 | """ Run parted with arguments specified in the 'args' list. """ | ||
216 | |||
217 | args.insert(0, self.parted) | ||
218 | msger.debug(args) | ||
219 | |||
220 | rc, out = runner.runtool(args, catch = 3) | ||
221 | out = out.strip() | ||
222 | if out: | ||
223 | msger.debug('"parted" output: %s' % out) | ||
224 | |||
225 | if rc != 0: | ||
226 | # We don't throw exception when return code is not 0, because | ||
227 | # parted always fails to reload part table with loop devices. This | ||
228 | # prevents us from distinguishing real errors based on return | ||
229 | # code. | ||
230 | msger.error("WARNING: parted returned '%s' instead of 0 (use --debug for details)" % rc) | ||
231 | |||
232 | def __create_partition(self, device, parttype, fstype, start, size): | ||
233 | """ Create a partition on an image described by the 'device' object. """ | ||
234 | |||
235 | # Start is included to the size so we need to substract one from the end. | ||
236 | end = start + size - 1 | ||
237 | msger.debug("Added '%s' partition, sectors %d-%d, size %d sectors" % | ||
238 | (parttype, start, end, size)) | ||
239 | |||
240 | args = ["-s", device, "unit", "s", "mkpart", parttype] | ||
241 | if fstype: | ||
242 | args.extend([fstype]) | ||
243 | args.extend(["%d" % start, "%d" % end]) | ||
244 | |||
245 | return self.__run_parted(args) | ||
246 | |||
247 | def __format_disks(self): | ||
248 | self.layout_partitions() | ||
249 | |||
250 | for dev in self.disks.keys(): | ||
251 | d = self.disks[dev] | ||
252 | msger.debug("Initializing partition table for %s" % \ | ||
253 | (d['disk'].device)) | ||
254 | self.__run_parted(["-s", d['disk'].device, "mklabel", | ||
255 | d['ptable_format']]) | ||
256 | |||
257 | msger.debug("Creating partitions") | ||
258 | |||
259 | for p in self.partitions: | ||
260 | d = self.disks[p['disk_name']] | ||
261 | if d['ptable_format'] == "msdos" and p['num'] == 5: | ||
262 | # The last sector of the 3rd partition was reserved for the EBR | ||
263 | # of the first _logical_ partition. This is why the extended | ||
264 | # partition should start one sector before the first logical | ||
265 | # partition. | ||
266 | self.__create_partition(d['disk'].device, "extended", | ||
267 | None, p['start'] - 1, | ||
268 | d['offset'] - p['start']) | ||
269 | |||
270 | if p['fstype'] == "swap": | ||
271 | parted_fs_type = "linux-swap" | ||
272 | elif p['fstype'] == "vfat": | ||
273 | parted_fs_type = "fat32" | ||
274 | elif p['fstype'] == "msdos": | ||
275 | parted_fs_type = "fat16" | ||
276 | else: | ||
277 | # Type for ext2/ext3/ext4/btrfs | ||
278 | parted_fs_type = "ext2" | ||
279 | |||
280 | # Boot ROM of OMAP boards require vfat boot partition to have an | ||
281 | # even number of sectors. | ||
282 | if p['mountpoint'] == "/boot" and p['fstype'] in ["vfat", "msdos"] \ | ||
283 | and p['size'] % 2: | ||
284 | msger.debug("Substracting one sector from '%s' partition to " \ | ||
285 | "get even number of sectors for the partition" % \ | ||
286 | p['mountpoint']) | ||
287 | p['size'] -= 1 | ||
288 | |||
289 | self.__create_partition(d['disk'].device, p['type'], | ||
290 | parted_fs_type, p['start'], p['size']) | ||
291 | |||
292 | if p['boot']: | ||
293 | flag_name = "boot" | ||
294 | msger.debug("Set '%s' flag for partition '%s' on disk '%s'" % \ | ||
295 | (flag_name, p['num'], d['disk'].device)) | ||
296 | self.__run_parted(["-s", d['disk'].device, "set", | ||
297 | "%d" % p['num'], flag_name, "on"]) | ||
298 | |||
299 | # Parted defaults to enabling the lba flag for fat16 partitions, | ||
300 | # which causes compatibility issues with some firmware (and really | ||
301 | # isn't necessary). | ||
302 | if parted_fs_type == "fat16": | ||
303 | if d['ptable_format'] == 'msdos': | ||
304 | msger.debug("Disable 'lba' flag for partition '%s' on disk '%s'" % \ | ||
305 | (p['num'], d['disk'].device)) | ||
306 | self.__run_parted(["-s", d['disk'].device, "set", | ||
307 | "%d" % p['num'], "lba", "off"]) | ||
308 | |||
309 | def cleanup(self): | ||
310 | if self.disks: | ||
311 | for dev in self.disks.keys(): | ||
312 | d = self.disks[dev] | ||
313 | try: | ||
314 | d['disk'].cleanup() | ||
315 | except: | ||
316 | pass | ||
317 | |||
318 | def __write_partition(self, num, source_file, start, size): | ||
319 | """ | ||
320 | Install source_file contents into a partition. | ||
321 | """ | ||
322 | if not source_file: # nothing to write | ||
323 | return | ||
324 | |||
325 | # Start is included in the size so need to substract one from the end. | ||
326 | end = start + size - 1 | ||
327 | msger.debug("Installed %s in partition %d, sectors %d-%d, size %d sectors" % (source_file, num, start, end, size)) | ||
328 | |||
329 | dd_cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc" % \ | ||
330 | (source_file, self.image_file, self.sector_size, start, size) | ||
331 | exec_cmd(dd_cmd) | ||
332 | |||
333 | |||
334 | def assemble(self, image_file): | ||
335 | msger.debug("Installing partitions") | ||
336 | |||
337 | self.image_file = image_file | ||
338 | |||
339 | for p in self.partitions: | ||
340 | d = self.disks[p['disk_name']] | ||
341 | if d['ptable_format'] == "msdos" and p['num'] == 5: | ||
342 | # The last sector of the 3rd partition was reserved for the EBR | ||
343 | # of the first _logical_ partition. This is why the extended | ||
344 | # partition should start one sector before the first logical | ||
345 | # partition. | ||
346 | self.__write_partition(p['num'], p['source_file'], | ||
347 | p['start'] - 1, | ||
348 | d['offset'] - p['start']) | ||
349 | |||
350 | self.__write_partition(p['num'], p['source_file'], | ||
351 | p['start'], p['size']) | ||
352 | |||
353 | def create(self): | ||
354 | for dev in self.disks.keys(): | ||
355 | d = self.disks[dev] | ||
356 | d['disk'].create() | ||
357 | |||
358 | self.__format_disks() | ||
359 | |||
360 | return | ||
diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py new file mode 100644 index 0000000000..2ae9f417c5 --- /dev/null +++ b/scripts/lib/wic/utils/runner.py | |||
@@ -0,0 +1,109 @@ | |||
1 | #!/usr/bin/env python -tt | ||
2 | # | ||
3 | # Copyright (c) 2011 Intel, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU General Public License as published by the Free | ||
7 | # Software Foundation; version 2 of the License | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | # for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | ||
16 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | |||
18 | import os | ||
19 | import subprocess | ||
20 | |||
21 | from wic import msger | ||
22 | |||
23 | def runtool(cmdln_or_args, catch=1): | ||
24 | """ wrapper for most of the subprocess calls | ||
25 | input: | ||
26 | cmdln_or_args: can be both args and cmdln str (shell=True) | ||
27 | catch: 0, quitely run | ||
28 | 1, only STDOUT | ||
29 | 2, only STDERR | ||
30 | 3, both STDOUT and STDERR | ||
31 | return: | ||
32 | (rc, output) | ||
33 | if catch==0: the output will always None | ||
34 | """ | ||
35 | |||
36 | if catch not in (0, 1, 2, 3): | ||
37 | # invalid catch selection, will cause exception, that's good | ||
38 | return None | ||
39 | |||
40 | if isinstance(cmdln_or_args, list): | ||
41 | cmd = cmdln_or_args[0] | ||
42 | shell = False | ||
43 | else: | ||
44 | import shlex | ||
45 | cmd = shlex.split(cmdln_or_args)[0] | ||
46 | shell = True | ||
47 | |||
48 | if catch != 3: | ||
49 | dev_null = os.open("/dev/null", os.O_WRONLY) | ||
50 | |||
51 | if catch == 0: | ||
52 | sout = dev_null | ||
53 | serr = dev_null | ||
54 | elif catch == 1: | ||
55 | sout = subprocess.PIPE | ||
56 | serr = dev_null | ||
57 | elif catch == 2: | ||
58 | sout = dev_null | ||
59 | serr = subprocess.PIPE | ||
60 | elif catch == 3: | ||
61 | sout = subprocess.PIPE | ||
62 | serr = subprocess.STDOUT | ||
63 | |||
64 | try: | ||
65 | p = subprocess.Popen(cmdln_or_args, stdout=sout, | ||
66 | stderr=serr, shell=shell) | ||
67 | (sout, serr) = p.communicate() | ||
68 | # combine stdout and stderr, filter None out | ||
69 | out = ''.join(filter(None, [sout, serr])) | ||
70 | except OSError, e: | ||
71 | if e.errno == 2: | ||
72 | # [Errno 2] No such file or directory | ||
73 | msger.error('Cannot run command: %s, lost dependency?' % cmd) | ||
74 | else: | ||
75 | raise # relay | ||
76 | finally: | ||
77 | if catch != 3: | ||
78 | os.close(dev_null) | ||
79 | |||
80 | return (p.returncode, out) | ||
81 | |||
82 | def show(cmdln_or_args): | ||
83 | # show all the message using msger.verbose | ||
84 | |||
85 | rc, out = runtool(cmdln_or_args, catch=3) | ||
86 | |||
87 | if isinstance(cmdln_or_args, list): | ||
88 | cmd = ' '.join(cmdln_or_args) | ||
89 | else: | ||
90 | cmd = cmdln_or_args | ||
91 | |||
92 | msg = 'running command: "%s"' % cmd | ||
93 | if out: out = out.strip() | ||
94 | if out: | ||
95 | msg += ', with output::' | ||
96 | msg += '\n +----------------' | ||
97 | for line in out.splitlines(): | ||
98 | msg += '\n | %s' % line | ||
99 | msg += '\n +----------------' | ||
100 | |||
101 | msger.verbose(msg) | ||
102 | return rc | ||
103 | |||
104 | def outs(cmdln_or_args, catch=1): | ||
105 | # get the outputs of tools | ||
106 | return runtool(cmdln_or_args, catch)[1].strip() | ||
107 | |||
108 | def quiet(cmdln_or_args): | ||
109 | return runtool(cmdln_or_args, catch=0)[0] | ||
diff --git a/scripts/lnr b/scripts/lnr new file mode 100755 index 0000000000..9dacebe095 --- /dev/null +++ b/scripts/lnr | |||
@@ -0,0 +1,21 @@ | |||
1 | #! /usr/bin/env python | ||
2 | |||
3 | # Create a *relative* symlink, just like ln --relative does but without needing | ||
4 | # coreutils 8.16. | ||
5 | |||
6 | import sys, os | ||
7 | |||
8 | if len(sys.argv) != 3: | ||
9 | print "$ lnr TARGET LINK_NAME" | ||
10 | sys.exit(1) | ||
11 | |||
12 | target = sys.argv[1] | ||
13 | linkname = sys.argv[2] | ||
14 | |||
15 | if os.path.isabs(target): | ||
16 | if not os.path.isabs(linkname): | ||
17 | linkname = os.path.abspath(linkname) | ||
18 | start = os.path.dirname(linkname) | ||
19 | target = os.path.relpath(target, start) | ||
20 | |||
21 | os.symlink(target, linkname) | ||
diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h new file mode 100644 index 0000000000..5a87540884 --- /dev/null +++ b/scripts/multilib_header_wrapper.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2005-2011 by Wind River Systems, Inc. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
5 | * of this software and associated documentation files (the "Software"), to deal | ||
6 | * in the Software without restriction, including without limitation the rights | ||
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
8 | * copies of the Software, and to permit persons to whom the Software is | ||
9 | * furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
20 | * THE SOFTWARE. | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #include <bits/wordsize.h> | ||
25 | |||
26 | #ifdef __WORDSIZE | ||
27 | |||
28 | #if __WORDSIZE == 32 | ||
29 | |||
30 | #ifdef _MIPS_SIM | ||
31 | |||
32 | #if _MIPS_SIM == _ABIO32 | ||
33 | #include <ENTER_HEADER_FILENAME_HERE-32.h> | ||
34 | #elif _MIPS_SIM == _ABIN32 | ||
35 | #include <ENTER_HEADER_FILENAME_HERE-n32.h> | ||
36 | #else | ||
37 | #error "Unknown _MIPS_SIM" | ||
38 | #endif | ||
39 | |||
40 | #else /* _MIPS_SIM is not defined */ | ||
41 | #include <ENTER_HEADER_FILENAME_HERE-32.h> | ||
42 | #endif | ||
43 | |||
44 | #elif __WORDSIZE == 64 | ||
45 | #include <ENTER_HEADER_FILENAME_HERE-64.h> | ||
46 | #else | ||
47 | #error "Unknown __WORDSIZE detected" | ||
48 | #endif /* matches #if __WORDSIZE == 32 */ | ||
49 | |||
50 | #else /* __WORDSIZE is not defined */ | ||
51 | |||
52 | #error "__WORDSIZE is not defined" | ||
53 | |||
54 | #endif | ||
55 | |||
diff --git a/scripts/native-intercept/chown b/scripts/native-intercept/chown new file mode 100755 index 0000000000..4f43271c2b --- /dev/null +++ b/scripts/native-intercept/chown | |||
@@ -0,0 +1,2 @@ | |||
1 | #! /bin/sh | ||
2 | echo "Intercept $0: $@ -- do nothing" | ||
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal new file mode 100755 index 0000000000..bba6f8fea3 --- /dev/null +++ b/scripts/oe-buildenv-internal | |||
@@ -0,0 +1,109 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # OE-Core Build Environment Setup Script | ||
4 | # | ||
5 | # Copyright (C) 2006-2011 Linux Foundation | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, write to the Free Software | ||
19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | |||
21 | # It is assumed OEROOT is already defined when this is called | ||
22 | if [ -z "$OEROOT" ]; then | ||
23 | echo >&2 "Error: OEROOT is not defined!" | ||
24 | return 1 | ||
25 | fi | ||
26 | |||
27 | if [ ! -z "$OECORE_SDK_VERSION" ]; then | ||
28 | echo >&2 "Error: The OE SDK/ADT was detected as already being present in this shell environment. Please use a clean shell when sourcing this environment script." | ||
29 | return 1 | ||
30 | fi | ||
31 | |||
32 | # Make sure we're not using python v3.x. This check can't go into | ||
33 | # sanity.bbclass because bitbake's source code doesn't even pass | ||
34 | # parsing stage when used with python v3, so we catch it here so we | ||
35 | # can offer a meaningful error message. | ||
36 | py_v3_check=`/usr/bin/env python --version 2>&1 | grep "Python 3"` | ||
37 | if [ "$py_v3_check" != "" ]; then | ||
38 | echo >&2 "Bitbake is not compatible with python v3" | ||
39 | echo >&2 "Please set up python v2 as your default python interpreter" | ||
40 | return 1 | ||
41 | fi | ||
42 | |||
43 | # Similarly, we now have code that doesn't parse correctly with older | ||
44 | # versions of Python, and rather than fixing that and being eternally | ||
45 | # vigilant for any other new feature use, just check the version here. | ||
46 | py_v26_check=`python -c 'import sys; print sys.version_info >= (2,7,3)'` | ||
47 | if [ "$py_v26_check" != "True" ]; then | ||
48 | echo >&2 "BitBake requires Python 2.7.3 or later" | ||
49 | return 1 | ||
50 | fi | ||
51 | |||
52 | if [ "x$BDIR" = "x" ]; then | ||
53 | if [ "x$1" = "x" ]; then | ||
54 | BDIR="build" | ||
55 | else | ||
56 | BDIR="$1" | ||
57 | if [ "$BDIR" = "/" ]; then | ||
58 | echo >&2 "Error: / is not supported as a build directory." | ||
59 | return 1 | ||
60 | fi | ||
61 | |||
62 | # Remove any possible trailing slashes. This is used to work around | ||
63 | # buggy readlink in Ubuntu 10.04 that doesn't ignore trailing slashes | ||
64 | # and hence "readlink -f new_dir_to_be_created/" returns empty. | ||
65 | BDIR=`echo $BDIR | sed -re 's|/+$||'` | ||
66 | |||
67 | BDIR=`readlink -f "$BDIR"` | ||
68 | if [ -z "$BDIR" ]; then | ||
69 | PARENTDIR=`dirname "$1"` | ||
70 | echo >&2 "Error: the directory $PARENTDIR does not exist?" | ||
71 | return 1 | ||
72 | fi | ||
73 | fi | ||
74 | if [ "x$2" != "x" ]; then | ||
75 | BITBAKEDIR="$2" | ||
76 | fi | ||
77 | fi | ||
78 | if expr "$BDIR" : '/.*' > /dev/null ; then | ||
79 | BUILDDIR="$BDIR" | ||
80 | else | ||
81 | BUILDDIR="`pwd`/$BDIR" | ||
82 | fi | ||
83 | unset BDIR | ||
84 | |||
85 | if [ "x$BITBAKEDIR" = "x" ]; then | ||
86 | BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/" | ||
87 | fi | ||
88 | |||
89 | BITBAKEDIR=`readlink -f "$BITBAKEDIR"` | ||
90 | BUILDDIR=`readlink -f "$BUILDDIR"` | ||
91 | |||
92 | if ! (test -d "$BITBAKEDIR"); then | ||
93 | echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location" | ||
94 | return 1 | ||
95 | fi | ||
96 | |||
97 | # Make sure our paths are at the beginning of $PATH | ||
98 | NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin:" | ||
99 | PATH=$NEWPATHS$(echo $PATH | sed -e "s|:$NEWPATHS|:|g" -e "s|^$NEWPATHS||") | ||
100 | unset BITBAKEDIR NEWPATHS | ||
101 | |||
102 | # Used by the runqemu script | ||
103 | export BUILDDIR | ||
104 | export PATH | ||
105 | export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ | ||
106 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ | ||
107 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ | ||
108 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ | ||
109 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR" | ||
diff --git a/scripts/oe-find-native-sysroot b/scripts/oe-find-native-sysroot new file mode 100755 index 0000000000..81d62b8882 --- /dev/null +++ b/scripts/oe-find-native-sysroot | |||
@@ -0,0 +1,81 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Find a native sysroot to use - either from an in-tree OE build or | ||
4 | # from a toolchain installation. It then ensures the variable | ||
5 | # $OECORE_NATIVE_SYSROOT is set to the sysroot's base directory, and sets | ||
6 | # $PSEUDO to the path of the pseudo binary. | ||
7 | # | ||
8 | # This script is intended to be run within other scripts by source'ing | ||
9 | # it, e.g: | ||
10 | # | ||
11 | # SYSROOT_SETUP_SCRIPT=`which oe-find-native-sysroot` | ||
12 | # . $SYSROOT_SETUP_SCRIPT | ||
13 | # | ||
14 | # This script will terminate execution of your calling program unless | ||
15 | # you set a variable $SKIP_STRICT_SYSROOT_CHECK to a non-empty string | ||
16 | # beforehand. | ||
17 | # | ||
18 | # Copyright (c) 2010 Linux Foundation | ||
19 | # | ||
20 | # This program is free software; you can redistribute it and/or modify | ||
21 | # it under the terms of the GNU General Public License version 2 as | ||
22 | # published by the Free Software Foundation. | ||
23 | # | ||
24 | # This program is distributed in the hope that it will be useful, | ||
25 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
26 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
27 | # GNU General Public License for more details. | ||
28 | # | ||
29 | # You should have received a copy of the GNU General Public License along | ||
30 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
31 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
32 | |||
33 | if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then | ||
34 | BITBAKE=`which bitbake 2> /dev/null` | ||
35 | if [ "x$BITBAKE" != "x" ]; then | ||
36 | if [ "$UID" = "0" ]; then | ||
37 | # Root cannot run bitbake unless sanity checking is disabled | ||
38 | if [ ! -d "./conf" ]; then | ||
39 | echo "Error: root cannot run bitbake by default, and I cannot find a ./conf directory to be able to disable sanity checking" | ||
40 | exit 1 | ||
41 | fi | ||
42 | touch conf/sanity.conf | ||
43 | OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '"' -f2` | ||
44 | rm -f conf/sanity.conf | ||
45 | else | ||
46 | OECORE_NATIVE_SYSROOT=`bitbake -e | grep ^STAGING_DIR_NATIVE | cut -d '"' -f2` | ||
47 | fi | ||
48 | else | ||
49 | echo "Error: Unable to locate bitbake command." | ||
50 | echo "Did you forget to source the build environment setup script?" | ||
51 | |||
52 | if [ -z "$SKIP_STRICT_SYSROOT_CHECK" ]; then | ||
53 | exit 1 | ||
54 | fi | ||
55 | fi | ||
56 | fi | ||
57 | |||
58 | if [ "x$OECORE_NATIVE_SYSROOT" = "x" ]; then | ||
59 | # This indicates that there was an error running bitbake -e that | ||
60 | # the user needs to be informed of | ||
61 | echo "There was an error running bitbake to determine STAGING_DIR_NATIVE" | ||
62 | echo "Here is the output from bitbake -e" | ||
63 | bitbake -e | ||
64 | exit 1 | ||
65 | fi | ||
66 | |||
67 | # Set up pseudo command | ||
68 | if [ ! -e "$OECORE_NATIVE_SYSROOT/usr/bin/pseudo" ]; then | ||
69 | echo "Error: Unable to find pseudo binary in $OECORE_NATIVE_SYSROOT/usr/bin/" | ||
70 | |||
71 | if [ "x$OECORE_DISTRO_VERSION" = "x" ]; then | ||
72 | echo "Have you run 'bitbake meta-ide-support'?" | ||
73 | else | ||
74 | echo "This shouldn't happen - something is wrong with your toolchain installation" | ||
75 | fi | ||
76 | |||
77 | if [ -z "$SKIP_STRICT_SYSROOT_CHECK" ]; then | ||
78 | exit 1 | ||
79 | fi | ||
80 | fi | ||
81 | PSEUDO="$OECORE_NATIVE_SYSROOT/usr/bin/pseudo" | ||
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy new file mode 100755 index 0000000000..0ce7ed090e --- /dev/null +++ b/scripts/oe-git-proxy | |||
@@ -0,0 +1,133 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # oe-git-proxy is a simple tool to be via GIT_PROXY_COMMAND. It uses socat | ||
4 | # to make SOCKS5 or HTTPS proxy connections. It uses ALL_PROXY to determine the | ||
5 | # proxy server, protocol, and port. It uses NO_PROXY to skip using the proxy for | ||
6 | # a comma delimited list of hosts, host globs (*.example.com), IPs, or CIDR | ||
7 | # masks (192.168.1.0/24). It is known to work with both bash and dash shells. | ||
8 | # | ||
9 | # Example ALL_PROXY values: | ||
10 | # ALL_PROXY=socks://socks.example.com:1080 | ||
11 | # ALL_PROXY=https://proxy.example.com:8080 | ||
12 | # | ||
13 | # Copyright (c) 2013, Intel Corporation. | ||
14 | # All rights reserved. | ||
15 | # | ||
16 | # AUTHORS | ||
17 | # Darren Hart <dvhart@linux.intel.com> | ||
18 | |||
19 | # Locate the netcat binary | ||
20 | SOCAT=$(which socat 2>/dev/null) | ||
21 | if [ $? -ne 0 ]; then | ||
22 | echo "ERROR: socat binary not in PATH" | ||
23 | exit 1 | ||
24 | fi | ||
25 | METHOD="" | ||
26 | |||
27 | # Test for a valid IPV4 quad with optional bitmask | ||
28 | valid_ipv4() { | ||
29 | echo $1 | egrep -q "^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}(/(3[0-2]|[1-2]?[0-9]))?$" | ||
30 | return $? | ||
31 | } | ||
32 | |||
33 | # Convert an IPV4 address into a 32bit integer | ||
34 | ipv4_val() { | ||
35 | IP="$1" | ||
36 | SHIFT=24 | ||
37 | VAL=0 | ||
38 | for B in ${IP//./ }; do | ||
39 | VAL=$(($VAL+$(($B<<$SHIFT)))) | ||
40 | SHIFT=$(($SHIFT-8)) | ||
41 | done | ||
42 | echo "$VAL" | ||
43 | } | ||
44 | |||
45 | # Determine if two IPs are equivalent, or if the CIDR contains the IP | ||
46 | match_ipv4() { | ||
47 | CIDR=$1 | ||
48 | IP=$2 | ||
49 | |||
50 | if [ -z "${IP%%$CIDR}" ]; then | ||
51 | return 0 | ||
52 | fi | ||
53 | |||
54 | # Determine the mask bitlength | ||
55 | BITS=${CIDR##*/} | ||
56 | if [ -z "$BITS" ]; then | ||
57 | return 1 | ||
58 | fi | ||
59 | |||
60 | IPVAL=$(ipv4_val $IP) | ||
61 | IP2VAL=$(ipv4_val ${CIDR%%/*}) | ||
62 | |||
63 | # OR in the unmasked bits | ||
64 | for i in $(seq 0 $((32-$BITS))); do | ||
65 | IP2VAL=$(($IP2VAL|$((1<<$i)))) | ||
66 | IPVAL=$(($IPVAL|$((1<<$i)))) | ||
67 | done | ||
68 | |||
69 | if [ $IPVAL -eq $IP2VAL ]; then | ||
70 | return 0 | ||
71 | fi | ||
72 | return 1 | ||
73 | } | ||
74 | |||
75 | # Test to see if GLOB matches HOST | ||
76 | match_host() { | ||
77 | HOST=$1 | ||
78 | GLOB=$2 | ||
79 | |||
80 | if [ -z "${HOST%%$GLOB}" ]; then | ||
81 | return 0 | ||
82 | fi | ||
83 | |||
84 | # Match by netmask | ||
85 | if valid_ipv4 $GLOB; then | ||
86 | HOST_IP=$(gethostip -d $HOST) | ||
87 | if valid_ipv4 $HOST_IP; then | ||
88 | match_ipv4 $GLOB $HOST_IP | ||
89 | if [ $? -eq 0 ]; then | ||
90 | return 0 | ||
91 | fi | ||
92 | fi | ||
93 | fi | ||
94 | |||
95 | return 1 | ||
96 | } | ||
97 | |||
98 | # If no proxy is set or needed, just connect directly | ||
99 | METHOD="TCP:$1:$2" | ||
100 | |||
101 | if [ -z "$ALL_PROXY" ]; then | ||
102 | exec $SOCAT STDIO $METHOD | ||
103 | fi | ||
104 | |||
105 | # Connect directly to hosts in NO_PROXY | ||
106 | for H in ${NO_PROXY//,/ }; do | ||
107 | if match_host $1 $H; then | ||
108 | exec $SOCAT STDIO $METHOD | ||
109 | fi | ||
110 | done | ||
111 | |||
112 | # Proxy is necessary, determine protocol, server, and port | ||
113 | PROTO=$(echo $ALL_PROXY | sed -e 's/\([^:]*\):\/\/.*/\1/') | ||
114 | PROXY=$(echo $ALL_PROXY | sed -e 's/.*:\/\/\([^:]*\).*/\1/') | ||
115 | PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\/?$/\1/') | ||
116 | if [ "$PORT" = "$ALL_PROXY" ]; then | ||
117 | PORT="" | ||
118 | fi | ||
119 | |||
120 | if [ "$PROTO" = "socks" ]; then | ||
121 | if [ -z "$PORT" ]; then | ||
122 | PORT="1080" | ||
123 | fi | ||
124 | METHOD="SOCKS4A:$PROXY:$1:$2,socksport=$PORT" | ||
125 | else | ||
126 | # Assume PROXY (http, https, etc) | ||
127 | if [ -z "$PORT" ]; then | ||
128 | PORT="8080" | ||
129 | fi | ||
130 | METHOD="PROXY:$PROXY:$1:$2,proxyport=$PORT" | ||
131 | fi | ||
132 | |||
133 | exec $SOCAT STDIO $METHOD | ||
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util new file mode 100755 index 0000000000..28a9f8362b --- /dev/null +++ b/scripts/oe-pkgdata-util | |||
@@ -0,0 +1,338 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # OpenEmbedded pkgdata utility | ||
4 | # | ||
5 | # Written by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
6 | # | ||
7 | # Copyright 2012-2013 Intel Corporation | ||
8 | # | ||
9 | # This program is free software; you can redistribute it and/or modify | ||
10 | # it under the terms of the GNU General Public License version 2 as | ||
11 | # published by the Free Software Foundation. | ||
12 | # | ||
13 | # This program is distributed in the hope that it will be useful, | ||
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | # GNU General Public License for more details. | ||
17 | # | ||
18 | # You should have received a copy of the GNU General Public License along | ||
19 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | # | ||
22 | |||
23 | import sys | ||
24 | import os | ||
25 | import os.path | ||
26 | import fnmatch | ||
27 | import re | ||
28 | import optparse | ||
29 | from collections import defaultdict | ||
30 | |||
31 | def glob(args, usage, debug=False, exclude=""): | ||
32 | if len(args) < 3: | ||
33 | usage() | ||
34 | sys.exit(1) | ||
35 | |||
36 | pkgdata_dir = args[0] | ||
37 | pkglist_file = args[1] | ||
38 | globs = args[2].split() | ||
39 | |||
40 | if not os.path.exists(pkgdata_dir): | ||
41 | print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir) | ||
42 | sys.exit(1) | ||
43 | |||
44 | if not os.path.exists(pkglist_file): | ||
45 | print('ERROR: Unable to find package list file %s' % pkglist_file) | ||
46 | sys.exit(1) | ||
47 | |||
48 | skipval = "-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-" | ||
49 | if exclude: | ||
50 | skipval += "|" + exclude | ||
51 | skipregex = re.compile(skipval) | ||
52 | |||
53 | mappedpkgs = set() | ||
54 | with open(pkglist_file, 'r') as f: | ||
55 | for line in f: | ||
56 | fields = line.rstrip().split() | ||
57 | if not fields: | ||
58 | continue | ||
59 | pkg = fields[0] | ||
60 | # We don't care about other args (used to need the package architecture but the | ||
61 | # new pkgdata structure avoids the need for that) | ||
62 | |||
63 | # Skip packages for which there is no point applying globs | ||
64 | if skipregex.search(pkg): | ||
65 | if debug: | ||
66 | print("%s -> !!" % pkg) | ||
67 | continue | ||
68 | |||
69 | # Skip packages that already match the globs, so if e.g. a dev package | ||
70 | # is already installed and thus in the list, we don't process it any further | ||
71 | # Most of these will be caught by skipregex already, but just in case... | ||
72 | already = False | ||
73 | for g in globs: | ||
74 | if fnmatch.fnmatchcase(pkg, g): | ||
75 | already = True | ||
76 | break | ||
77 | if already: | ||
78 | if debug: | ||
79 | print("%s -> !" % pkg) | ||
80 | continue | ||
81 | |||
82 | # Define some functions | ||
83 | def revpkgdata(pkgn): | ||
84 | return os.path.join(pkgdata_dir, "runtime-reverse", pkgn) | ||
85 | def fwdpkgdata(pkgn): | ||
86 | return os.path.join(pkgdata_dir, "runtime", pkgn) | ||
87 | def readpn(pkgdata_file): | ||
88 | pn = "" | ||
89 | with open(pkgdata_file, 'r') as f: | ||
90 | for line in f: | ||
91 | if line.startswith("PN:"): | ||
92 | pn = line.split(': ')[1].rstrip() | ||
93 | return pn | ||
94 | def readrenamed(pkgdata_file): | ||
95 | renamed = "" | ||
96 | pn = os.path.basename(pkgdata_file) | ||
97 | with open(pkgdata_file, 'r') as f: | ||
98 | for line in f: | ||
99 | if line.startswith("PKG_%s:" % pn): | ||
100 | renamed = line.split(': ')[1].rstrip() | ||
101 | return renamed | ||
102 | |||
103 | # Main processing loop | ||
104 | for g in globs: | ||
105 | mappedpkg = "" | ||
106 | # First just try substitution (i.e. packagename -> packagename-dev) | ||
107 | newpkg = g.replace("*", pkg) | ||
108 | revlink = revpkgdata(newpkg) | ||
109 | if os.path.exists(revlink): | ||
110 | mappedpkg = os.path.basename(os.readlink(revlink)) | ||
111 | fwdfile = fwdpkgdata(mappedpkg) | ||
112 | if os.path.exists(fwdfile): | ||
113 | mappedpkg = readrenamed(fwdfile) | ||
114 | if not os.path.exists(fwdfile + ".packaged"): | ||
115 | mappedpkg = "" | ||
116 | else: | ||
117 | revlink = revpkgdata(pkg) | ||
118 | if os.path.exists(revlink): | ||
119 | # Check if we can map after undoing the package renaming (by resolving the symlink) | ||
120 | origpkg = os.path.basename(os.readlink(revlink)) | ||
121 | newpkg = g.replace("*", origpkg) | ||
122 | fwdfile = fwdpkgdata(newpkg) | ||
123 | if os.path.exists(fwdfile): | ||
124 | mappedpkg = readrenamed(fwdfile) | ||
125 | else: | ||
126 | # That didn't work, so now get the PN, substitute that, then map in the other direction | ||
127 | pn = readpn(revlink) | ||
128 | newpkg = g.replace("*", pn) | ||
129 | fwdfile = fwdpkgdata(newpkg) | ||
130 | if os.path.exists(fwdfile): | ||
131 | mappedpkg = readrenamed(fwdfile) | ||
132 | if not os.path.exists(fwdfile + ".packaged"): | ||
133 | mappedpkg = "" | ||
134 | else: | ||
135 | # Package doesn't even exist... | ||
136 | if debug: | ||
137 | print "%s is not a valid package!" % (pkg) | ||
138 | break | ||
139 | |||
140 | if mappedpkg: | ||
141 | if debug: | ||
142 | print "%s (%s) -> %s" % (pkg, g, mappedpkg) | ||
143 | mappedpkgs.add(mappedpkg) | ||
144 | else: | ||
145 | if debug: | ||
146 | print "%s (%s) -> ?" % (pkg, g) | ||
147 | |||
148 | if debug: | ||
149 | print "------" | ||
150 | |||
151 | print("\n".join(mappedpkgs)) | ||
152 | |||
153 | def read_value(args, usage, debug=False): | ||
154 | if len(args) < 3: | ||
155 | usage() | ||
156 | sys.exit(1) | ||
157 | |||
158 | pkgdata_dir = args[0] | ||
159 | var = args[1] | ||
160 | packages = args[2].split() | ||
161 | |||
162 | if not os.path.exists(pkgdata_dir): | ||
163 | print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir) | ||
164 | sys.exit(1) | ||
165 | |||
166 | def readvar(pkgdata_file, var): | ||
167 | val = "" | ||
168 | with open(pkgdata_file, 'r') as f: | ||
169 | for line in f: | ||
170 | if line.startswith(var + ":"): | ||
171 | val = line.split(': ')[1].rstrip() | ||
172 | return val | ||
173 | |||
174 | if debug: | ||
175 | print "read-value('%s', '%s' '%s'" % (pkgdata_dir, var, packages) | ||
176 | for package in packages: | ||
177 | pkg_split = package.split('_') | ||
178 | pkg_name = pkg_split[0] | ||
179 | if debug: | ||
180 | print "package: '%s'" % pkg_name | ||
181 | revlink = os.path.join(pkgdata_dir, "runtime-reverse", pkg_name) | ||
182 | if debug: | ||
183 | print(revlink) | ||
184 | if os.path.exists(revlink): | ||
185 | mappedpkg = os.path.basename(os.readlink(revlink)) | ||
186 | qvar = var | ||
187 | if qvar == "PKGSIZE": | ||
188 | # append packagename | ||
189 | qvar = "%s_%s" % (var, mappedpkg) | ||
190 | # PKGSIZE is now in bytes, but we we want it in KB | ||
191 | pkgsize = (int(readvar(revlink, qvar)) + 1024 // 2) // 1024 | ||
192 | print("%d" % pkgsize) | ||
193 | else: | ||
194 | print(readvar(revlink, qvar)) | ||
195 | |||
196 | def lookup_pkg(args, usage, debug=False): | ||
197 | if len(args) < 2: | ||
198 | usage() | ||
199 | sys.exit(1) | ||
200 | |||
201 | pkgdata_dir = args[0] | ||
202 | pkgs = args[1].split() | ||
203 | |||
204 | if not os.path.exists(pkgdata_dir): | ||
205 | print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir) | ||
206 | sys.exit(1) | ||
207 | |||
208 | mappings = defaultdict(list) | ||
209 | for pkg in pkgs: | ||
210 | pkgfile = os.path.join(pkgdata_dir, 'runtime', pkg) | ||
211 | if os.path.exists(pkgfile): | ||
212 | with open(pkgfile, 'r') as f: | ||
213 | for line in f: | ||
214 | fields = line.rstrip().split(': ') | ||
215 | if fields[0] == 'PKG_%s' % pkg: | ||
216 | mappings[pkg].append(fields[1]) | ||
217 | break | ||
218 | if len(mappings) < len(pkgs): | ||
219 | missing = list(set(pkgs) - set(mappings.keys())) | ||
220 | sys.stderr.write("ERROR: the following packages could not be found: %s\n" % ', '.join(missing)) | ||
221 | sys.exit(1) | ||
222 | |||
223 | items = [] | ||
224 | for pkg in pkgs: | ||
225 | items.extend(mappings.get(pkg, [])) | ||
226 | print '\n'.join(items) | ||
227 | |||
228 | def lookup_recipe(args, usage, debug=False): | ||
229 | if len(args) < 2: | ||
230 | usage() | ||
231 | sys.exit(1) | ||
232 | |||
233 | pkgdata_dir = args[0] | ||
234 | pkgs = args[1].split() | ||
235 | |||
236 | if not os.path.exists(pkgdata_dir): | ||
237 | print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir) | ||
238 | sys.exit(1) | ||
239 | |||
240 | mappings = defaultdict(list) | ||
241 | for pkg in pkgs: | ||
242 | pkgfile = os.path.join(pkgdata_dir, 'runtime-reverse', pkg) | ||
243 | if os.path.exists(pkgfile): | ||
244 | with open(pkgfile, 'r') as f: | ||
245 | for line in f: | ||
246 | fields = line.rstrip().split(': ') | ||
247 | if fields[0] == 'PN': | ||
248 | mappings[pkg].append(fields[1]) | ||
249 | break | ||
250 | if len(mappings) < len(pkgs): | ||
251 | missing = list(set(pkgs) - set(mappings.keys())) | ||
252 | sys.stderr.write("ERROR: the following packages could not be found: %s\n" % ', '.join(missing)) | ||
253 | sys.exit(1) | ||
254 | |||
255 | items = [] | ||
256 | for pkg in pkgs: | ||
257 | items.extend(mappings.get(pkg, [])) | ||
258 | print '\n'.join(items) | ||
259 | |||
260 | def find_path(args, usage, debug=False): | ||
261 | if len(args) < 2: | ||
262 | usage() | ||
263 | sys.exit(1) | ||
264 | |||
265 | pkgdata_dir = args[0] | ||
266 | targetpath = args[1] | ||
267 | |||
268 | if not os.path.exists(pkgdata_dir): | ||
269 | print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir) | ||
270 | sys.exit(1) | ||
271 | |||
272 | import json | ||
273 | import fnmatch | ||
274 | |||
275 | for root, dirs, files in os.walk(os.path.join(pkgdata_dir, 'runtime')): | ||
276 | for fn in files: | ||
277 | with open(os.path.join(root,fn)) as f: | ||
278 | for line in f: | ||
279 | if line.startswith('FILES_INFO:'): | ||
280 | val = line.split(':', 1)[1].strip() | ||
281 | dictval = json.loads(val) | ||
282 | for fullpth in dictval.keys(): | ||
283 | if fnmatch.fnmatchcase(fullpth, targetpath): | ||
284 | print("%s: %s" % (fn, fullpth)) | ||
285 | break | ||
286 | |||
287 | |||
288 | def main(): | ||
289 | parser = optparse.OptionParser( | ||
290 | usage = '''%prog [options] <command> <arguments> | ||
291 | |||
292 | Available commands: | ||
293 | glob <pkgdatadir> <pkglistfile> "<globs>" | ||
294 | expand one or more glob expressions over the packages listed in | ||
295 | pkglistfile (one package per line) | ||
296 | lookup-pkg <pkgdatadir> "<recipe-pkgs>" | ||
297 | look up the specified recipe-space package name(s) to see what the | ||
298 | final runtime package name is (e.g. eglibc becomes libc6) | ||
299 | lookup-recipe <pkgdatadir> "<pkgs>" | ||
300 | look up the specified package(s) to see which recipe they were | ||
301 | produced by | ||
302 | find-path <pkgdatadir> <path> | ||
303 | find the package providing the specified path (wildcards * ? allowed) | ||
304 | read-value <pkgdatadir> <value-name> "<pkgs>" | ||
305 | read the named value from the pkgdata files for the specified | ||
306 | packages''') | ||
307 | |||
308 | parser.add_option("-d", "--debug", | ||
309 | help = "Enable debug output", | ||
310 | action="store_true", dest="debug", default=False) | ||
311 | parser.add_option("-x", "--exclude", | ||
312 | help = "Exclude packages matching specified regex from the glob operation", | ||
313 | action="store", type="string", dest="exclude", default="") | ||
314 | |||
315 | options, args = parser.parse_args(sys.argv) | ||
316 | args = args[1:] | ||
317 | |||
318 | if len(args) < 1: | ||
319 | parser.print_help() | ||
320 | sys.exit(1) | ||
321 | |||
322 | if args[0] == "glob": | ||
323 | glob(args[1:], parser.print_help, options.debug, options.exclude) | ||
324 | elif args[0] == "lookup-pkg": | ||
325 | lookup_pkg(args[1:], parser.print_help, options.debug) | ||
326 | elif args[0] == "lookup-recipe": | ||
327 | lookup_recipe(args[1:], parser.print_help, options.debug) | ||
328 | elif args[0] == "find-path": | ||
329 | find_path(args[1:], parser.print_help, options.debug) | ||
330 | elif args[0] == "read-value": | ||
331 | read_value(args[1:], parser.print_help, options.debug) | ||
332 | else: | ||
333 | parser.print_help() | ||
334 | sys.exit(1) | ||
335 | |||
336 | |||
337 | if __name__ == "__main__": | ||
338 | main() | ||
diff --git a/scripts/oe-selftest b/scripts/oe-selftest new file mode 100755 index 0000000000..2332b224ee --- /dev/null +++ b/scripts/oe-selftest | |||
@@ -0,0 +1,187 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # Copyright (c) 2013 Intel Corporation | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License version 2 as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | |||
18 | # DESCRIPTION | ||
19 | # This script runs tests defined in meta/lib/selftest/ | ||
20 | # It's purpose is to automate the testing of different bitbake tools. | ||
21 | # To use it you just need to source your build environment setup script and | ||
22 | # add the meta-selftest layer to your BBLAYERS. | ||
23 | # Call the script as: "oe-selftest" to run all the tests in in meta/lib/selftest/ | ||
24 | # Call the script as: "oe-selftest <module>.<Class>.<method>" to run just a single test | ||
25 | # E.g: "oe-selftest bboutput.BitbakeLayers" will run just the BitbakeLayers class from meta/lib/selftest/bboutput.py | ||
26 | |||
27 | |||
28 | import os | ||
29 | import sys | ||
30 | import unittest | ||
31 | import logging | ||
32 | import argparse | ||
33 | |||
34 | sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'meta/lib'))) | ||
35 | |||
36 | import oeqa.selftest | ||
37 | import oeqa.utils.ftools as ftools | ||
38 | from oeqa.utils.commands import runCmd, get_bb_var, get_test_layer | ||
39 | from oeqa.selftest.base import oeSelfTest | ||
40 | |||
41 | def logger_create(): | ||
42 | log = logging.getLogger("selftest") | ||
43 | log.setLevel(logging.DEBUG) | ||
44 | |||
45 | fh = logging.FileHandler(filename='oe-selftest.log', mode='w') | ||
46 | fh.setLevel(logging.DEBUG) | ||
47 | |||
48 | ch = logging.StreamHandler(sys.stdout) | ||
49 | ch.setLevel(logging.INFO) | ||
50 | |||
51 | formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | ||
52 | fh.setFormatter(formatter) | ||
53 | ch.setFormatter(formatter) | ||
54 | |||
55 | log.addHandler(fh) | ||
56 | log.addHandler(ch) | ||
57 | |||
58 | return log | ||
59 | |||
60 | log = logger_create() | ||
61 | |||
62 | def get_args_parser(): | ||
63 | description = "Script that runs unit tests agains bitbake and other Yocto related tools. The goal is to validate tools functionality and metadata integrity. Refer to https://wiki.yoctoproject.org/wiki/Oe-selftest for more information." | ||
64 | parser = argparse.ArgumentParser(description=description) | ||
65 | group = parser.add_mutually_exclusive_group(required=True) | ||
66 | group.add_argument('--run-tests', required=False, action='store', nargs='*', dest="run_tests", default=None, help='Select what tests to run (modules, classes or test methods). Format should be: <module>.<class>.<test_method>') | ||
67 | group.add_argument('--run-all-tests', required=False, action="store_true", dest="run_all_tests", default=False, help='Run all (unhidden) tests') | ||
68 | group.add_argument('--list-modules', required=False, action="store_true", dest="list_modules", default=False, help='List all available test modules.') | ||
69 | return parser | ||
70 | |||
71 | |||
72 | def preflight_check(): | ||
73 | |||
74 | log.info("Checking that everything is in order before running the tests") | ||
75 | |||
76 | if not os.environ.get("BUILDDIR"): | ||
77 | log.error("BUILDDIR isn't set. Did you forget to source your build environment setup script?") | ||
78 | return False | ||
79 | |||
80 | builddir = os.environ.get("BUILDDIR") | ||
81 | if os.getcwd() != builddir: | ||
82 | log.info("Changing cwd to %s" % builddir) | ||
83 | os.chdir(builddir) | ||
84 | |||
85 | if not "meta-selftest" in get_bb_var("BBLAYERS"): | ||
86 | log.error("You don't seem to have the meta-selftest layer in BBLAYERS") | ||
87 | return False | ||
88 | |||
89 | log.info("Running bitbake -p") | ||
90 | runCmd("bitbake -p") | ||
91 | |||
92 | return True | ||
93 | |||
94 | def add_include(): | ||
95 | builddir = os.environ.get("BUILDDIR") | ||
96 | if "#include added by oe-selftest.py" \ | ||
97 | not in ftools.read_file(os.path.join(builddir, "conf/local.conf")): | ||
98 | log.info("Adding: \"include selftest.inc\" in local.conf") | ||
99 | ftools.append_file(os.path.join(builddir, "conf/local.conf"), \ | ||
100 | "\n#include added by oe-selftest.py\ninclude selftest.inc") | ||
101 | |||
102 | |||
103 | def remove_include(): | ||
104 | builddir = os.environ.get("BUILDDIR") | ||
105 | if "#include added by oe-selftest.py" \ | ||
106 | in ftools.read_file(os.path.join(builddir, "conf/local.conf")): | ||
107 | log.info("Removing the include from local.conf") | ||
108 | ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \ | ||
109 | "#include added by oe-selftest.py\ninclude selftest.inc") | ||
110 | |||
111 | |||
112 | def remove_inc_files(): | ||
113 | try: | ||
114 | os.remove(os.path.join(os.environ.get("BUILDDIR"), "conf/selftest.inc")) | ||
115 | for root, _, files in os.walk(get_test_layer()): | ||
116 | for f in files: | ||
117 | if f == 'test_recipe.inc': | ||
118 | os.remove(os.path.join(root, f)) | ||
119 | except OSError as e: | ||
120 | pass | ||
121 | |||
122 | def get_tests(exclusive_modules=[], include_hidden=False): | ||
123 | testslist = [] | ||
124 | for x in exclusive_modules: | ||
125 | testslist.append('oeqa.selftest.' + x) | ||
126 | if not testslist: | ||
127 | testpath = os.path.abspath(os.path.dirname(oeqa.selftest.__file__)) | ||
128 | files = sorted([f for f in os.listdir(testpath) if f.endswith('.py') and not (f.startswith('_') and not include_hidden) and not f.startswith('__') and f != 'base.py']) | ||
129 | for f in files: | ||
130 | module = 'oeqa.selftest.' + f[:-3] | ||
131 | testslist.append(module) | ||
132 | |||
133 | return testslist | ||
134 | |||
135 | def main(): | ||
136 | parser = get_args_parser() | ||
137 | args = parser.parse_args() | ||
138 | |||
139 | if args.list_modules: | ||
140 | log.info('Listing all available test modules:') | ||
141 | testslist = get_tests(include_hidden=True) | ||
142 | for test in testslist: | ||
143 | module = test.split('.')[-1] | ||
144 | info = '' | ||
145 | if module.startswith('_'): | ||
146 | info = ' (hidden)' | ||
147 | print module + info | ||
148 | |||
149 | if args.run_tests or args.run_all_tests: | ||
150 | if not preflight_check(): | ||
151 | return 1 | ||
152 | |||
153 | testslist = get_tests(exclusive_modules=(args.run_tests or []), include_hidden=False) | ||
154 | suite = unittest.TestSuite() | ||
155 | loader = unittest.TestLoader() | ||
156 | loader.sortTestMethodsUsing = None | ||
157 | runner = unittest.TextTestRunner(verbosity=2) | ||
158 | # we need to do this here, otherwise just loading the tests | ||
159 | # will take 2 minutes (bitbake -e calls) | ||
160 | oeSelfTest.testlayer_path = get_test_layer() | ||
161 | for test in testslist: | ||
162 | log.info("Loading tests from: %s" % test) | ||
163 | try: | ||
164 | suite.addTests(loader.loadTestsFromName(test)) | ||
165 | except AttributeError as e: | ||
166 | log.error("Failed to import %s" % test) | ||
167 | log.error(e) | ||
168 | return 1 | ||
169 | add_include() | ||
170 | result = runner.run(suite) | ||
171 | log.info("Finished") | ||
172 | if result.wasSuccessful(): | ||
173 | return 0 | ||
174 | else: | ||
175 | return 1 | ||
176 | |||
177 | if __name__ == "__main__": | ||
178 | try: | ||
179 | ret = main() | ||
180 | except Exception: | ||
181 | ret = 1 | ||
182 | import traceback | ||
183 | traceback.print_exc(5) | ||
184 | finally: | ||
185 | remove_include() | ||
186 | remove_inc_files() | ||
187 | sys.exit(ret) | ||
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir new file mode 100755 index 0000000000..c91e079512 --- /dev/null +++ b/scripts/oe-setup-builddir | |||
@@ -0,0 +1,134 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # OE Build Environment Setup Script | ||
4 | # | ||
5 | # Copyright (C) 2006-2011 Linux Foundation | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, write to the Free Software | ||
19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | |||
21 | if [ -z "$BUILDDIR" ]; then | ||
22 | echo >&2 "Error: The build directory (BUILDDIR) must be set!" | ||
23 | exit 1 | ||
24 | fi | ||
25 | |||
26 | mkdir -p $BUILDDIR/conf | ||
27 | |||
28 | if [ ! -d "$BUILDDIR" ]; then | ||
29 | echo >&2 "Error: The builddir ($BUILDDIR) does not exist!" | ||
30 | exit 1 | ||
31 | fi | ||
32 | |||
33 | if [ ! -w "$BUILDDIR" ]; then | ||
34 | echo >&2 "Error: Cannot write to $BUILDDIR, perhaps try sourcing with a writable path? i.e. . oe-init-build-env ~/my-build" | ||
35 | exit 1 | ||
36 | fi | ||
37 | |||
38 | cd "$BUILDDIR" | ||
39 | |||
40 | if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then | ||
41 | TEMPLATECONF=$(cat $BUILDDIR/conf/templateconf.cfg) | ||
42 | fi | ||
43 | |||
44 | . $OEROOT/.templateconf | ||
45 | |||
46 | if [ ! -f "$BUILDDIR/conf/templateconf.cfg" ]; then | ||
47 | echo "$TEMPLATECONF" >$BUILDDIR/conf/templateconf.cfg | ||
48 | fi | ||
49 | |||
50 | # | ||
51 | # $TEMPLATECONF can point to a directory for the template local.conf & bblayers.conf | ||
52 | # | ||
53 | if [ -n "$TEMPLATECONF" ]; then | ||
54 | if [ ! -d "$TEMPLATECONF" ]; then | ||
55 | # Allow TEMPLATECONF=meta-xyz/conf as a shortcut | ||
56 | if [ -d "$OEROOT/$TEMPLATECONF" ]; then | ||
57 | TEMPLATECONF="$OEROOT/$TEMPLATECONF" | ||
58 | fi | ||
59 | if [ ! -d "$TEMPLATECONF" ]; then | ||
60 | echo >&2 "Error: '$TEMPLATECONF' must be a directory containing local.conf & bblayers.conf" | ||
61 | exit 1 | ||
62 | fi | ||
63 | fi | ||
64 | OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample" | ||
65 | OECORELOCALCONF="$TEMPLATECONF/local.conf.sample" | ||
66 | OECORENOTESCONF="$TEMPLATECONF/conf-notes.txt" | ||
67 | fi | ||
68 | |||
69 | if [ -z "$OECORELOCALCONF" ]; then | ||
70 | OECORELOCALCONF="$OEROOT/meta/conf/local.conf.sample" | ||
71 | fi | ||
72 | if [ ! -r "$BUILDDIR/conf/local.conf" ]; then | ||
73 | cat <<EOM | ||
74 | You had no conf/local.conf file. This configuration file has therefore been | ||
75 | created for you with some default values. You may wish to edit it to use a | ||
76 | different MACHINE (target hardware) or enable parallel build options to take | ||
77 | advantage of multiple cores for example. See the file for more information as | ||
78 | common configuration options are commented. | ||
79 | |||
80 | The Yocto Project has extensive documentation about OE including a reference manual | ||
81 | which can be found at: | ||
82 | http://yoctoproject.org/documentation | ||
83 | |||
84 | For more information about OpenEmbedded see their website: | ||
85 | http://www.openembedded.org/ | ||
86 | |||
87 | EOM | ||
88 | cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf | ||
89 | fi | ||
90 | |||
91 | if [ -z "$OECORELAYERCONF" ]; then | ||
92 | OECORELAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample" | ||
93 | fi | ||
94 | if [ ! -r "$BUILDDIR/conf/bblayers.conf" ]; then | ||
95 | cat <<EOM | ||
96 | You had no conf/bblayers.conf file. The configuration file has been created for | ||
97 | you with some default values. To add additional metadata layers into your | ||
98 | configuration please add entries to this file. | ||
99 | |||
100 | The Yocto Project has extensive documentation about OE including a reference manual | ||
101 | which can be found at: | ||
102 | http://yoctoproject.org/documentation | ||
103 | |||
104 | For more information about OpenEmbedded see their website: | ||
105 | http://www.openembedded.org/ | ||
106 | |||
107 | |||
108 | EOM | ||
109 | |||
110 | # Put the abosolute path to the layers in bblayers.conf so we can run | ||
111 | # bitbake without the init script after the first run | ||
112 | # ##COREBASE## is deprecated as it's meaning was inconsistent, but continue | ||
113 | # to replace it for compatibility. | ||
114 | sed -e "s|##OEROOT##|$OEROOT|g" \ | ||
115 | -e "s|##COREBASE##|$OEROOT|g" \ | ||
116 | $OECORELAYERCONF > $BUILDDIR/conf/bblayers.conf | ||
117 | fi | ||
118 | |||
119 | # Prevent disturbing a new GIT clone in same console | ||
120 | unset OECORELOCALCONF | ||
121 | unset OECORELAYERCONF | ||
122 | |||
123 | cat <<EOM | ||
124 | |||
125 | ### Shell environment set up for builds. ### | ||
126 | |||
127 | You can now run 'bitbake <target>' | ||
128 | |||
129 | EOM | ||
130 | if [ -z "$OECORENOTESCONF" ]; then | ||
131 | OECORENOTESCONF="$OEROOT/meta/conf/conf-notes.txt" | ||
132 | fi | ||
133 | [ ! -r "$OECORENOTESCONF" ] || cat $OECORENOTESCONF | ||
134 | unset OECORENOTESCONF | ||
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo new file mode 100755 index 0000000000..917b98b984 --- /dev/null +++ b/scripts/oe-setup-rpmrepo | |||
@@ -0,0 +1,97 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # This utility setup the necessary metadata for an rpm repo | ||
4 | # | ||
5 | # Copyright (c) 2011 Intel Corp. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
14 | # See the GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | |||
20 | |||
21 | # Don't use TMPDIR from the external environment, it may be a distro | ||
22 | # variable pointing to /tmp (e.g. within X on OpenSUSE) | ||
23 | # Instead, use OE_TMPDIR for passing this in externally. | ||
24 | TMPDIR="$OE_TMPDIR" | ||
25 | |||
26 | function usage() { | ||
27 | echo "Usage: $0 <rpm-dir>" | ||
28 | echo " <rpm-dir>: default is $TMPDIR/deploy/rpm" | ||
29 | } | ||
30 | |||
31 | if [ $# -gt 1 ]; then | ||
32 | usage | ||
33 | exit 1 | ||
34 | fi | ||
35 | |||
36 | setup_tmpdir() { | ||
37 | if [ -z "$TMPDIR" ]; then | ||
38 | # Try to get TMPDIR from bitbake | ||
39 | type -P bitbake &>/dev/null || { | ||
40 | echo "In order for this script to dynamically infer paths"; | ||
41 | echo "to kernels or filesystem images, you either need"; | ||
42 | echo "bitbake in your PATH or to source oe-init-build-env"; | ||
43 | echo "before running this script" >&2; | ||
44 | exit 1; } | ||
45 | |||
46 | # We have bitbake in PATH, get TMPDIR from bitbake | ||
47 | TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` | ||
48 | if [ -z "$TMPDIR" ]; then | ||
49 | echo "Error: this script needs to be run from your build directory," | ||
50 | echo "or you need to explicitly set TMPDIR in your environment" | ||
51 | exit 1 | ||
52 | fi | ||
53 | fi | ||
54 | } | ||
55 | |||
56 | setup_sysroot() { | ||
57 | # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their | ||
58 | # environment script. If that variable isn't set, we're | ||
59 | # either in an in-tree poky scenario or the environment | ||
60 | # script wasn't source'd. | ||
61 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then | ||
62 | setup_tmpdir | ||
63 | BUILD_ARCH=`uname -m` | ||
64 | BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` | ||
65 | BUILD_SYS="$BUILD_ARCH-$BUILD_OS" | ||
66 | |||
67 | OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS | ||
68 | fi | ||
69 | } | ||
70 | |||
71 | setup_tmpdir | ||
72 | setup_sysroot | ||
73 | |||
74 | |||
75 | if [ -n "$1" ]; then | ||
76 | RPM_DIR="$1" | ||
77 | else | ||
78 | RPM_DIR="$TMPDIR/deploy/rpm" | ||
79 | fi | ||
80 | |||
81 | if [ ! -d "$RPM_DIR" ]; then | ||
82 | echo "Error: rpm dir $RPM_DIR doesn't exist" | ||
83 | exit 1 | ||
84 | fi | ||
85 | |||
86 | CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo | ||
87 | if [ ! -e "$CREATEREPO" ]; then | ||
88 | echo "Error: can't find createrepo binary" | ||
89 | echo "please run bitbake createrepo-native first" | ||
90 | exit 1 | ||
91 | fi | ||
92 | |||
93 | export PATH=${PATH}:${OECORE_NATIVE_SYSROOT}/usr/bin | ||
94 | |||
95 | $CREATEREPO "$RPM_DIR" | ||
96 | |||
97 | exit 0 | ||
diff --git a/scripts/oe-trim-schemas b/scripts/oe-trim-schemas new file mode 100755 index 0000000000..29fb3a1b67 --- /dev/null +++ b/scripts/oe-trim-schemas | |||
@@ -0,0 +1,49 @@ | |||
1 | #! /usr/bin/env python | ||
2 | |||
3 | import sys | ||
4 | try: | ||
5 | import xml.etree.cElementTree as etree | ||
6 | except: | ||
7 | import xml.etree.ElementTree as etree | ||
8 | |||
9 | def child (elem, name): | ||
10 | for e in elem.getchildren(): | ||
11 | if e.tag == name: | ||
12 | return e | ||
13 | return None | ||
14 | |||
15 | def children (elem, name=None): | ||
16 | l = elem.getchildren() | ||
17 | if name: | ||
18 | l = [e for e in l if e.tag == name] | ||
19 | return l | ||
20 | |||
21 | xml = etree.parse(sys.argv[1]) | ||
22 | |||
23 | for schema in child(xml.getroot(), "schemalist").getchildren(): | ||
24 | e = child(schema, "short") | ||
25 | if e is not None: | ||
26 | schema.remove(e) | ||
27 | |||
28 | e = child(schema, "long") | ||
29 | if e is not None: | ||
30 | schema.remove(e) | ||
31 | |||
32 | for locale in children(schema, "locale"): | ||
33 | # One locale must exist so leave C locale... | ||
34 | a = locale.attrib.get("name") | ||
35 | if a == 'C': | ||
36 | continue | ||
37 | e = child(locale, "default") | ||
38 | if e is None: | ||
39 | schema.remove(locale) | ||
40 | else: | ||
41 | e = child(locale, "short") | ||
42 | if e is not None: | ||
43 | locale.remove(e) | ||
44 | e = child(locale, "long") | ||
45 | if e is not None: | ||
46 | locale.remove(e) | ||
47 | |||
48 | xml.write(sys.stdout, "UTF-8") | ||
49 | |||
diff --git a/scripts/oepydevshell-internal.py b/scripts/oepydevshell-internal.py new file mode 100755 index 0000000000..f7b2e4e0bf --- /dev/null +++ b/scripts/oepydevshell-internal.py | |||
@@ -0,0 +1,92 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | import os | ||
4 | import sys | ||
5 | import time | ||
6 | import select | ||
7 | import fcntl | ||
8 | import termios | ||
9 | import readline | ||
10 | import signal | ||
11 | |||
12 | def nonblockingfd(fd): | ||
13 | fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK) | ||
14 | |||
15 | def echonocbreak(fd): | ||
16 | old = termios.tcgetattr(fd) | ||
17 | old[3] = old[3] | termios.ECHO | termios.ICANON | ||
18 | termios.tcsetattr(fd, termios.TCSADRAIN, old) | ||
19 | |||
20 | def cbreaknoecho(fd): | ||
21 | old = termios.tcgetattr(fd) | ||
22 | old[3] = old[3] &~ termios.ECHO &~ termios.ICANON | ||
23 | termios.tcsetattr(fd, termios.TCSADRAIN, old) | ||
24 | |||
25 | if len(sys.argv) != 3: | ||
26 | print("Incorrect parameters") | ||
27 | sys.exit(1) | ||
28 | |||
29 | pty = open(sys.argv[1], "w+b", 0) | ||
30 | parent = int(sys.argv[2]) | ||
31 | |||
32 | # Don't buffer output by line endings | ||
33 | sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) | ||
34 | sys.stdin = os.fdopen(sys.stdin.fileno(), 'r', 0) | ||
35 | nonblockingfd(pty) | ||
36 | nonblockingfd(sys.stdin) | ||
37 | |||
38 | |||
39 | histfile = os.path.expanduser("~/.oedevpyshell-history") | ||
40 | readline.parse_and_bind("tab: complete") | ||
41 | try: | ||
42 | readline.read_history_file(histfile) | ||
43 | except IOError: | ||
44 | pass | ||
45 | |||
46 | try: | ||
47 | |||
48 | i = "" | ||
49 | o = "" | ||
50 | # Need cbreak/noecho whilst in select so we trigger on any keypress | ||
51 | cbreaknoecho(sys.stdin.fileno()) | ||
52 | # Send our PID to the other end so they can kill us. | ||
53 | pty.write(str(os.getpid()) + "\n") | ||
54 | while True: | ||
55 | try: | ||
56 | writers = [] | ||
57 | if i: | ||
58 | writers.append(sys.stdout) | ||
59 | (ready, _, _) = select.select([pty, sys.stdin], writers , [], 0) | ||
60 | try: | ||
61 | if pty in ready: | ||
62 | i = i + pty.read() | ||
63 | if i: | ||
64 | # Write a page at a time to avoid overflowing output | ||
65 | # d.keys() is a good way to do that | ||
66 | sys.stdout.write(i[:4096]) | ||
67 | i = i[4096:] | ||
68 | if sys.stdin in ready: | ||
69 | echonocbreak(sys.stdin.fileno()) | ||
70 | o = raw_input() | ||
71 | cbreaknoecho(sys.stdin.fileno()) | ||
72 | pty.write(o + "\n") | ||
73 | except (IOError, OSError) as e: | ||
74 | if e.errno == 11: | ||
75 | continue | ||
76 | if e.errno == 5: | ||
77 | sys.exit(0) | ||
78 | raise | ||
79 | except EOFError: | ||
80 | sys.exit(0) | ||
81 | except KeyboardInterrupt: | ||
82 | os.kill(parent, signal.SIGINT) | ||
83 | |||
84 | except SystemExit: | ||
85 | pass | ||
86 | except Exception as e: | ||
87 | import traceback | ||
88 | print("Exception in oepydehshell-internal: " + str(e)) | ||
89 | traceback.print_exc() | ||
90 | time.sleep(5) | ||
91 | finally: | ||
92 | readline.write_history_file(histfile) | ||
diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py new file mode 100755 index 0000000000..2fb1a78970 --- /dev/null +++ b/scripts/opkg-query-helper.py | |||
@@ -0,0 +1,85 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # OpenEmbedded opkg query helper utility | ||
4 | # | ||
5 | # Written by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
6 | # | ||
7 | # Copyright 2012 Intel Corporation | ||
8 | # | ||
9 | # This program is free software; you can redistribute it and/or modify | ||
10 | # it under the terms of the GNU General Public License version 2 as | ||
11 | # published by the Free Software Foundation. | ||
12 | # | ||
13 | # This program is distributed in the hope that it will be useful, | ||
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | # GNU General Public License for more details. | ||
17 | # | ||
18 | # You should have received a copy of the GNU General Public License along | ||
19 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | # | ||
22 | # | ||
23 | |||
24 | |||
25 | import sys | ||
26 | import fileinput | ||
27 | import re | ||
28 | |||
29 | archmode = False | ||
30 | filemode = False | ||
31 | vermode = False | ||
32 | |||
33 | args = [] | ||
34 | for arg in sys.argv[1:]: | ||
35 | if arg == '-a': | ||
36 | archmode = True | ||
37 | elif arg == '-f': | ||
38 | filemode = True | ||
39 | elif arg == '-v': | ||
40 | vermode = True | ||
41 | else: | ||
42 | args.append(arg) | ||
43 | |||
44 | # Regex for removing version specs after dependency items | ||
45 | verregex = re.compile(' \([=<>]* [^ )]*\)') | ||
46 | |||
47 | pkg = "" | ||
48 | ver = "" | ||
49 | for line in fileinput.input(args): | ||
50 | line = line.rstrip() | ||
51 | if ': ' in line: | ||
52 | if line.startswith("Package:"): | ||
53 | pkg = line.split(": ")[1] | ||
54 | ver = "" | ||
55 | else: | ||
56 | if archmode: | ||
57 | if line.startswith("Architecture:"): | ||
58 | arch = line.split(": ")[1] | ||
59 | print("%s %s" % (pkg,arch)) | ||
60 | elif filemode: | ||
61 | if line.startswith("Version:"): | ||
62 | ver = line.split(": ")[1] | ||
63 | elif line.startswith("Architecture:"): | ||
64 | arch = line.split(": ")[1] | ||
65 | print("%s %s_%s_%s.ipk %s" % (pkg,pkg,ver,arch,arch)) | ||
66 | elif vermode: | ||
67 | if line.startswith("Version:"): | ||
68 | ver = line.split(": ")[1] | ||
69 | elif line.startswith("Architecture:"): | ||
70 | arch = line.split(": ")[1] | ||
71 | print("%s %s %s" % (pkg,arch,ver)) | ||
72 | else: | ||
73 | if line.startswith("Depends:"): | ||
74 | depval = line.split(": ")[1] | ||
75 | deps = depval.split(", ") | ||
76 | for dep in deps: | ||
77 | dep = verregex.sub('', dep) | ||
78 | print("%s|%s" % (pkg,dep)) | ||
79 | elif line.startswith("Recommends:"): | ||
80 | recval = line.split(": ")[1] | ||
81 | recs = recval.split(", ") | ||
82 | for rec in recs: | ||
83 | rec = verregex.sub('', rec) | ||
84 | print("%s|%s [REC]" % (pkg, rec)) | ||
85 | |||
diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept new file mode 100755 index 0000000000..27c256834c --- /dev/null +++ b/scripts/postinst-intercepts/postinst_intercept | |||
@@ -0,0 +1,56 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # This script is called from inside postinstall scriptlets at do_rootfs time. It | ||
4 | # actually adds, at the end, the list of packages for which the intercept script | ||
5 | # is valid. Also, if one wants to pass any variables to the intercept script from | ||
6 | # the postinstall itself, they will be added immediately after the shebang line. | ||
7 | # | ||
8 | # Usage: postinst_intercept <intercept_script_name> <package_name> <mlprefix=...> <var1=...> ... <varN=...> | ||
9 | # * intercept_script_name - the name of the intercept script we want to change; | ||
10 | # * package_name - add the package_name to list of packages the intercept script | ||
11 | # is used for; | ||
12 | # * mlprefix=... - this one is needed in order to have separate hooks for multilib. | ||
13 | # * var1=... - var1 will have the value we provide in the intercept script. This | ||
14 | # is useful when we want to pass on variables like ${libdir} to | ||
15 | # the intercept script; | ||
16 | # | ||
17 | [ $# -lt 3 ] && exit 1 | ||
18 | |||
19 | intercept_script=$INTERCEPT_DIR/$1 && shift | ||
20 | package_name=$1 && shift | ||
21 | mlprefix=$(echo $1 |sed -ne "s/^mlprefix=\(.*\)-/\1/p") && shift | ||
22 | |||
23 | # if the hook we want to install does not exist, then there's nothing we can do | ||
24 | [ -f "$intercept_script" ] || exit 1 | ||
25 | |||
26 | # if the postinstall wanting to install the hook belongs to a multilib package, | ||
27 | # then we'd better have a separate hook for this because the default ${libdir} and | ||
28 | # ${base_libdir} will point to the wrong locations | ||
29 | if [ -n "$mlprefix" ]; then | ||
30 | ml_intercept_script=$intercept_script-$mlprefix | ||
31 | # if the multilib hook does not exist, create it from the default one | ||
32 | if [ ! -f "$ml_intercept_script" ]; then | ||
33 | cp $intercept_script $ml_intercept_script | ||
34 | |||
35 | # clear the ##PKGS: line and the already set variables | ||
36 | [ -x "$ml_intercept_script" ] && sed -i -e "2,$(($#+1)) {/.*/d}" -e "/^##PKGS: .*/d" $ml_intercept_script | ||
37 | fi | ||
38 | |||
39 | intercept_script=$ml_intercept_script | ||
40 | fi | ||
41 | |||
42 | chmod +x "$intercept_script" | ||
43 | |||
44 | pkgs_line="$(cat $intercept_script|grep "##PKGS:")" | ||
45 | if [ -n "$pkgs_line" ]; then | ||
46 | # line exists, add this package to the list only if it's not already there | ||
47 | if [ -z "$(echo "$pkgs_line" | grep " $package_name ")" ]; then | ||
48 | sed -i -e "s/##PKGS:.*/\0${package_name} /" $intercept_script | ||
49 | fi | ||
50 | else | ||
51 | for var in $@; do | ||
52 | sed -i -e "\%^#\!/bin/.*sh%a $var" $intercept_script | ||
53 | done | ||
54 | echo "##PKGS: ${package_name} " >> $intercept_script | ||
55 | fi | ||
56 | |||
diff --git a/scripts/postinst-intercepts/update_font_cache b/scripts/postinst-intercepts/update_font_cache new file mode 100644 index 0000000000..c8c6018f27 --- /dev/null +++ b/scripts/postinst-intercepts/update_font_cache | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\ | ||
4 | $D${bindir}/fc-cache --sysroot=$D | ||
5 | chown -R root:root $D${fontconfigcachedir} | ||
diff --git a/scripts/postinst-intercepts/update_icon_cache b/scripts/postinst-intercepts/update_icon_cache new file mode 100644 index 0000000000..8e17a6ac0c --- /dev/null +++ b/scripts/postinst-intercepts/update_icon_cache | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | # update native pixbuf loaders | ||
5 | gdk-pixbuf-query-loaders --update-cache | ||
6 | |||
7 | for icondir in $D/usr/share/icons/*/ ; do | ||
8 | if [ -d $icondir ] ; then | ||
9 | gtk-update-icon-cache -fqt $icondir | ||
10 | fi | ||
11 | done | ||
12 | |||
diff --git a/scripts/postinst-intercepts/update_pixbuf_cache b/scripts/postinst-intercepts/update_pixbuf_cache new file mode 100644 index 0000000000..95bf4f90a3 --- /dev/null +++ b/scripts/postinst-intercepts/update_pixbuf_cache | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | export GDK_PIXBUF_MODULEDIR=$D${libdir}/gdk-pixbuf-2.0/2.10.0/loaders | ||
4 | export GDK_PIXBUF_FATAL_LOADER=1 | ||
5 | |||
6 | PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\ | ||
7 | $D${bindir}/gdk-pixbuf-query-loaders \ | ||
8 | >$GDK_PIXBUF_MODULEDIR/../loaders.cache && \ | ||
9 | sed -i -e "s:$D::g" $GDK_PIXBUF_MODULEDIR/../loaders.cache | ||
10 | |||
11 | |||
diff --git a/scripts/pybootchartgui/AUTHORS b/scripts/pybootchartgui/AUTHORS new file mode 100644 index 0000000000..672b7e9520 --- /dev/null +++ b/scripts/pybootchartgui/AUTHORS | |||
@@ -0,0 +1,11 @@ | |||
1 | Michael Meeks <michael.meeks@novell.com> | ||
2 | Anders Norgaard <anders.norgaard@gmail.com> | ||
3 | Scott James Remnant <scott@ubuntu.com> | ||
4 | Henning Niss <henningniss@gmail.com> | ||
5 | Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> | ||
6 | |||
7 | Contributors: | ||
8 | Brian Ewins | ||
9 | |||
10 | Based on work by: | ||
11 | Ziga Mahkovec | ||
diff --git a/scripts/pybootchartgui/COPYING b/scripts/pybootchartgui/COPYING new file mode 100644 index 0000000000..ed87acf948 --- /dev/null +++ b/scripts/pybootchartgui/COPYING | |||
@@ -0,0 +1,340 @@ | |||
1 | GNU GENERAL PUBLIC LICENSE | ||
2 | Version 2, June 1991 | ||
3 | |||
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | ||
5 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
6 | Everyone is permitted to copy and distribute verbatim copies | ||
7 | of this license document, but changing it is not allowed. | ||
8 | |||
9 | Preamble | ||
10 | |||
11 | The licenses for most software are designed to take away your | ||
12 | freedom to share and change it. By contrast, the GNU General Public | ||
13 | License is intended to guarantee your freedom to share and change free | ||
14 | software--to make sure the software is free for all its users. This | ||
15 | General Public License applies to most of the Free Software | ||
16 | Foundation's software and to any other program whose authors commit to | ||
17 | using it. (Some other Free Software Foundation software is covered by | ||
18 | the GNU Library General Public License instead.) You can apply it to | ||
19 | your programs, too. | ||
20 | |||
21 | When we speak of free software, we are referring to freedom, not | ||
22 | price. Our General Public Licenses are designed to make sure that you | ||
23 | have the freedom to distribute copies of free software (and charge for | ||
24 | this service if you wish), that you receive source code or can get it | ||
25 | if you want it, that you can change the software or use pieces of it | ||
26 | in new free programs; and that you know you can do these things. | ||
27 | |||
28 | To protect your rights, we need to make restrictions that forbid | ||
29 | anyone to deny you these rights or to ask you to surrender the rights. | ||
30 | These restrictions translate to certain responsibilities for you if you | ||
31 | distribute copies of the software, or if you modify it. | ||
32 | |||
33 | For example, if you distribute copies of such a program, whether | ||
34 | gratis or for a fee, you must give the recipients all the rights that | ||
35 | you have. You must make sure that they, too, receive or can get the | ||
36 | source code. And you must show them these terms so they know their | ||
37 | rights. | ||
38 | |||
39 | We protect your rights with two steps: (1) copyright the software, and | ||
40 | (2) offer you this license which gives you legal permission to copy, | ||
41 | distribute and/or modify the software. | ||
42 | |||
43 | Also, for each author's protection and ours, we want to make certain | ||
44 | that everyone understands that there is no warranty for this free | ||
45 | software. If the software is modified by someone else and passed on, we | ||
46 | want its recipients to know that what they have is not the original, so | ||
47 | that any problems introduced by others will not reflect on the original | ||
48 | authors' reputations. | ||
49 | |||
50 | Finally, any free program is threatened constantly by software | ||
51 | patents. We wish to avoid the danger that redistributors of a free | ||
52 | program will individually obtain patent licenses, in effect making the | ||
53 | program proprietary. To prevent this, we have made it clear that any | ||
54 | patent must be licensed for everyone's free use or not licensed at all. | ||
55 | |||
56 | The precise terms and conditions for copying, distribution and | ||
57 | modification follow. | ||
58 | |||
59 | GNU GENERAL PUBLIC LICENSE | ||
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
61 | |||
62 | 0. This License applies to any program or other work which contains | ||
63 | a notice placed by the copyright holder saying it may be distributed | ||
64 | under the terms of this General Public License. The "Program", below, | ||
65 | refers to any such program or work, and a "work based on the Program" | ||
66 | means either the Program or any derivative work under copyright law: | ||
67 | that is to say, a work containing the Program or a portion of it, | ||
68 | either verbatim or with modifications and/or translated into another | ||
69 | language. (Hereinafter, translation is included without limitation in | ||
70 | the term "modification".) Each licensee is addressed as "you". | ||
71 | |||
72 | Activities other than copying, distribution and modification are not | ||
73 | covered by this License; they are outside its scope. The act of | ||
74 | running the Program is not restricted, and the output from the Program | ||
75 | is covered only if its contents constitute a work based on the | ||
76 | Program (independent of having been made by running the Program). | ||
77 | Whether that is true depends on what the Program does. | ||
78 | |||
79 | 1. You may copy and distribute verbatim copies of the Program's | ||
80 | source code as you receive it, in any medium, provided that you | ||
81 | conspicuously and appropriately publish on each copy an appropriate | ||
82 | copyright notice and disclaimer of warranty; keep intact all the | ||
83 | notices that refer to this License and to the absence of any warranty; | ||
84 | and give any other recipients of the Program a copy of this License | ||
85 | along with the Program. | ||
86 | |||
87 | You may charge a fee for the physical act of transferring a copy, and | ||
88 | you may at your option offer warranty protection in exchange for a fee. | ||
89 | |||
90 | 2. You may modify your copy or copies of the Program or any portion | ||
91 | of it, thus forming a work based on the Program, and copy and | ||
92 | distribute such modifications or work under the terms of Section 1 | ||
93 | above, provided that you also meet all of these conditions: | ||
94 | |||
95 | a) You must cause the modified files to carry prominent notices | ||
96 | stating that you changed the files and the date of any change. | ||
97 | |||
98 | b) You must cause any work that you distribute or publish, that in | ||
99 | whole or in part contains or is derived from the Program or any | ||
100 | part thereof, to be licensed as a whole at no charge to all third | ||
101 | parties under the terms of this License. | ||
102 | |||
103 | c) If the modified program normally reads commands interactively | ||
104 | when run, you must cause it, when started running for such | ||
105 | interactive use in the most ordinary way, to print or display an | ||
106 | announcement including an appropriate copyright notice and a | ||
107 | notice that there is no warranty (or else, saying that you provide | ||
108 | a warranty) and that users may redistribute the program under | ||
109 | these conditions, and telling the user how to view a copy of this | ||
110 | License. (Exception: if the Program itself is interactive but | ||
111 | does not normally print such an announcement, your work based on | ||
112 | the Program is not required to print an announcement.) | ||
113 | |||
114 | These requirements apply to the modified work as a whole. If | ||
115 | identifiable sections of that work are not derived from the Program, | ||
116 | and can be reasonably considered independent and separate works in | ||
117 | themselves, then this License, and its terms, do not apply to those | ||
118 | sections when you distribute them as separate works. But when you | ||
119 | distribute the same sections as part of a whole which is a work based | ||
120 | on the Program, the distribution of the whole must be on the terms of | ||
121 | this License, whose permissions for other licensees extend to the | ||
122 | entire whole, and thus to each and every part regardless of who wrote it. | ||
123 | |||
124 | Thus, it is not the intent of this section to claim rights or contest | ||
125 | your rights to work written entirely by you; rather, the intent is to | ||
126 | exercise the right to control the distribution of derivative or | ||
127 | collective works based on the Program. | ||
128 | |||
129 | In addition, mere aggregation of another work not based on the Program | ||
130 | with the Program (or with a work based on the Program) on a volume of | ||
131 | a storage or distribution medium does not bring the other work under | ||
132 | the scope of this License. | ||
133 | |||
134 | 3. You may copy and distribute the Program (or a work based on it, | ||
135 | under Section 2) in object code or executable form under the terms of | ||
136 | Sections 1 and 2 above provided that you also do one of the following: | ||
137 | |||
138 | a) Accompany it with the complete corresponding machine-readable | ||
139 | source code, which must be distributed under the terms of Sections | ||
140 | 1 and 2 above on a medium customarily used for software interchange; or, | ||
141 | |||
142 | b) Accompany it with a written offer, valid for at least three | ||
143 | years, to give any third party, for a charge no more than your | ||
144 | cost of physically performing source distribution, a complete | ||
145 | machine-readable copy of the corresponding source code, to be | ||
146 | distributed under the terms of Sections 1 and 2 above on a medium | ||
147 | customarily used for software interchange; or, | ||
148 | |||
149 | c) Accompany it with the information you received as to the offer | ||
150 | to distribute corresponding source code. (This alternative is | ||
151 | allowed only for noncommercial distribution and only if you | ||
152 | received the program in object code or executable form with such | ||
153 | an offer, in accord with Subsection b above.) | ||
154 | |||
155 | The source code for a work means the preferred form of the work for | ||
156 | making modifications to it. For an executable work, complete source | ||
157 | code means all the source code for all modules it contains, plus any | ||
158 | associated interface definition files, plus the scripts used to | ||
159 | control compilation and installation of the executable. However, as a | ||
160 | special exception, the source code distributed need not include | ||
161 | anything that is normally distributed (in either source or binary | ||
162 | form) with the major components (compiler, kernel, and so on) of the | ||
163 | operating system on which the executable runs, unless that component | ||
164 | itself accompanies the executable. | ||
165 | |||
166 | If distribution of executable or object code is made by offering | ||
167 | access to copy from a designated place, then offering equivalent | ||
168 | access to copy the source code from the same place counts as | ||
169 | distribution of the source code, even though third parties are not | ||
170 | compelled to copy the source along with the object code. | ||
171 | |||
172 | 4. You may not copy, modify, sublicense, or distribute the Program | ||
173 | except as expressly provided under this License. Any attempt | ||
174 | otherwise to copy, modify, sublicense or distribute the Program is | ||
175 | void, and will automatically terminate your rights under this License. | ||
176 | However, parties who have received copies, or rights, from you under | ||
177 | this License will not have their licenses terminated so long as such | ||
178 | parties remain in full compliance. | ||
179 | |||
180 | 5. You are not required to accept this License, since you have not | ||
181 | signed it. However, nothing else grants you permission to modify or | ||
182 | distribute the Program or its derivative works. These actions are | ||
183 | prohibited by law if you do not accept this License. Therefore, by | ||
184 | modifying or distributing the Program (or any work based on the | ||
185 | Program), you indicate your acceptance of this License to do so, and | ||
186 | all its terms and conditions for copying, distributing or modifying | ||
187 | the Program or works based on it. | ||
188 | |||
189 | 6. Each time you redistribute the Program (or any work based on the | ||
190 | Program), the recipient automatically receives a license from the | ||
191 | original licensor to copy, distribute or modify the Program subject to | ||
192 | these terms and conditions. You may not impose any further | ||
193 | restrictions on the recipients' exercise of the rights granted herein. | ||
194 | You are not responsible for enforcing compliance by third parties to | ||
195 | this License. | ||
196 | |||
197 | 7. If, as a consequence of a court judgment or allegation of patent | ||
198 | infringement or for any other reason (not limited to patent issues), | ||
199 | conditions are imposed on you (whether by court order, agreement or | ||
200 | otherwise) that contradict the conditions of this License, they do not | ||
201 | excuse you from the conditions of this License. If you cannot | ||
202 | distribute so as to satisfy simultaneously your obligations under this | ||
203 | License and any other pertinent obligations, then as a consequence you | ||
204 | may not distribute the Program at all. For example, if a patent | ||
205 | license would not permit royalty-free redistribution of the Program by | ||
206 | all those who receive copies directly or indirectly through you, then | ||
207 | the only way you could satisfy both it and this License would be to | ||
208 | refrain entirely from distribution of the Program. | ||
209 | |||
210 | If any portion of this section is held invalid or unenforceable under | ||
211 | any particular circumstance, the balance of the section is intended to | ||
212 | apply and the section as a whole is intended to apply in other | ||
213 | circumstances. | ||
214 | |||
215 | It is not the purpose of this section to induce you to infringe any | ||
216 | patents or other property right claims or to contest validity of any | ||
217 | such claims; this section has the sole purpose of protecting the | ||
218 | integrity of the free software distribution system, which is | ||
219 | implemented by public license practices. Many people have made | ||
220 | generous contributions to the wide range of software distributed | ||
221 | through that system in reliance on consistent application of that | ||
222 | system; it is up to the author/donor to decide if he or she is willing | ||
223 | to distribute software through any other system and a licensee cannot | ||
224 | impose that choice. | ||
225 | |||
226 | This section is intended to make thoroughly clear what is believed to | ||
227 | be a consequence of the rest of this License. | ||
228 | |||
229 | 8. If the distribution and/or use of the Program is restricted in | ||
230 | certain countries either by patents or by copyrighted interfaces, the | ||
231 | original copyright holder who places the Program under this License | ||
232 | may add an explicit geographical distribution limitation excluding | ||
233 | those countries, so that distribution is permitted only in or among | ||
234 | countries not thus excluded. In such case, this License incorporates | ||
235 | the limitation as if written in the body of this License. | ||
236 | |||
237 | 9. The Free Software Foundation may publish revised and/or new versions | ||
238 | of the General Public License from time to time. Such new versions will | ||
239 | be similar in spirit to the present version, but may differ in detail to | ||
240 | address new problems or concerns. | ||
241 | |||
242 | Each version is given a distinguishing version number. If the Program | ||
243 | specifies a version number of this License which applies to it and "any | ||
244 | later version", you have the option of following the terms and conditions | ||
245 | either of that version or of any later version published by the Free | ||
246 | Software Foundation. If the Program does not specify a version number of | ||
247 | this License, you may choose any version ever published by the Free Software | ||
248 | Foundation. | ||
249 | |||
250 | 10. If you wish to incorporate parts of the Program into other free | ||
251 | programs whose distribution conditions are different, write to the author | ||
252 | to ask for permission. For software which is copyrighted by the Free | ||
253 | Software Foundation, write to the Free Software Foundation; we sometimes | ||
254 | make exceptions for this. Our decision will be guided by the two goals | ||
255 | of preserving the free status of all derivatives of our free software and | ||
256 | of promoting the sharing and reuse of software generally. | ||
257 | |||
258 | NO WARRANTY | ||
259 | |||
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | ||
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | ||
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | ||
268 | REPAIR OR CORRECTION. | ||
269 | |||
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | ||
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | ||
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | ||
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | ||
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | ||
278 | POSSIBILITY OF SUCH DAMAGES. | ||
279 | |||
280 | END OF TERMS AND CONDITIONS | ||
281 | |||
282 | How to Apply These Terms to Your New Programs | ||
283 | |||
284 | If you develop a new program, and you want it to be of the greatest | ||
285 | possible use to the public, the best way to achieve this is to make it | ||
286 | free software which everyone can redistribute and change under these terms. | ||
287 | |||
288 | To do so, attach the following notices to the program. It is safest | ||
289 | to attach them to the start of each source file to most effectively | ||
290 | convey the exclusion of warranty; and each file should have at least | ||
291 | the "copyright" line and a pointer to where the full notice is found. | ||
292 | |||
293 | <one line to give the program's name and a brief idea of what it does.> | ||
294 | Copyright (C) <year> <name of author> | ||
295 | |||
296 | This program is free software; you can redistribute it and/or modify | ||
297 | it under the terms of the GNU General Public License as published by | ||
298 | the Free Software Foundation; either version 2 of the License, or | ||
299 | (at your option) any later version. | ||
300 | |||
301 | This program is distributed in the hope that it will be useful, | ||
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
304 | GNU General Public License for more details. | ||
305 | |||
306 | You should have received a copy of the GNU General Public License | ||
307 | along with this program; if not, write to the Free Software | ||
308 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
309 | |||
310 | |||
311 | Also add information on how to contact you by electronic and paper mail. | ||
312 | |||
313 | If the program is interactive, make it output a short notice like this | ||
314 | when it starts in an interactive mode: | ||
315 | |||
316 | Gnomovision version 69, Copyright (C) year name of author | ||
317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
318 | This is free software, and you are welcome to redistribute it | ||
319 | under certain conditions; type `show c' for details. | ||
320 | |||
321 | The hypothetical commands `show w' and `show c' should show the appropriate | ||
322 | parts of the General Public License. Of course, the commands you use may | ||
323 | be called something other than `show w' and `show c'; they could even be | ||
324 | mouse-clicks or menu items--whatever suits your program. | ||
325 | |||
326 | You should also get your employer (if you work as a programmer) or your | ||
327 | school, if any, to sign a "copyright disclaimer" for the program, if | ||
328 | necessary. Here is a sample; alter the names: | ||
329 | |||
330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program | ||
331 | `Gnomovision' (which makes passes at compilers) written by James Hacker. | ||
332 | |||
333 | <signature of Ty Coon>, 1 April 1989 | ||
334 | Ty Coon, President of Vice | ||
335 | |||
336 | This General Public License does not permit incorporating your program into | ||
337 | proprietary programs. If your program is a subroutine library, you may | ||
338 | consider it more useful to permit linking proprietary applications with the | ||
339 | library. If this is what you want to do, use the GNU Library General | ||
340 | Public License instead of this License. | ||
diff --git a/scripts/pybootchartgui/MAINTAINERS b/scripts/pybootchartgui/MAINTAINERS new file mode 100644 index 0000000000..c65e1315f1 --- /dev/null +++ b/scripts/pybootchartgui/MAINTAINERS | |||
@@ -0,0 +1,3 @@ | |||
1 | Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> | ||
2 | Michael Meeks <michael.meeks@novell.com> | ||
3 | Harald Hoyer <harald@redhat.com> | ||
diff --git a/scripts/pybootchartgui/NEWS b/scripts/pybootchartgui/NEWS new file mode 100644 index 0000000000..7c5b2fc3a1 --- /dev/null +++ b/scripts/pybootchartgui/NEWS | |||
@@ -0,0 +1,204 @@ | |||
1 | bootchart2 0.14.5: | ||
2 | + pybootchartgui (Riccardo) | ||
3 | + Fix tests with python3 | ||
4 | + Fix parsing of files with non-ascii bytes | ||
5 | + Robustness fixes to taskstats and meminfo parsing | ||
6 | + More python3 fixes | ||
7 | |||
8 | bootchart2 0.14.4: | ||
9 | + bootchartd | ||
10 | + Add relevant EXIT_PROC for GNOME3, XFCE4, openbox | ||
11 | (Justin Lecher, Ben Eills) | ||
12 | + pybootchartgui (Riccardo) | ||
13 | + Fix some issues in --crop-after and --annotate | ||
14 | + Fix pybootchartgui process_tree tests | ||
15 | + More python3 fixes | ||
16 | |||
17 | bootchart2 0.14.2: | ||
18 | + pybootchartgui | ||
19 | + Fix some crashes in parsing.py (Jakub Czaplicki, Riccardo) | ||
20 | + speedup a bit meminfo parsing (Riccardo) | ||
21 | + Fix indentation for python3.2 (Riccardo) | ||
22 | |||
23 | bootchart2 0.14.1: | ||
24 | + bootchartd | ||
25 | + Expect dmesg only if started as init (Henry Yei) | ||
26 | + look for bootchart_init in the environment (Henry Gebhardt) | ||
27 | + pybootchartgui | ||
28 | + Fixup some tests (Riccardo) | ||
29 | + Support hp smart arrays block devices (Anders Norgaard, | ||
30 | Brian Murray) | ||
31 | + Fixes for -t, -o and -f options (Mladen Kuntner, Harald, Riccardo) | ||
32 | |||
33 | bootchart2 0.14.0: | ||
34 | + bootchartd | ||
35 | + Add ability to define custom commands | ||
36 | (Lucian Muresan, Peter Hjalmarsson) | ||
37 | + collector | ||
38 | + fix tmpfs mount leakage (Peter Hjalmarsson) | ||
39 | + pybootchartgui | ||
40 | + render cumulative I/O time chart (Sankar P) | ||
41 | + python3 compatibility fixes (Riccardo) | ||
42 | + Misc (Michael) | ||
43 | + remove confusing, obsolete setup.py | ||
44 | + install docs to /usr/share/ | ||
45 | + lot of fixes for easier packaging (Peter Hjalmarsson) | ||
46 | + add bootchart2, bootchartd and pybootchartgui manpages | ||
47 | (Francesca Ciceri, David Paleino) | ||
48 | |||
49 | bootchart2 0.12.6: | ||
50 | + bootchartd | ||
51 | + better check for initrd (Riccardo Magliocchetti) | ||
52 | + code cleanup (Riccardo) | ||
53 | + make the list of processes we are waiting for editable | ||
54 | in config file by EXIT_PROC (Riccardo) | ||
55 | + fix parsing of cmdline for alternative init system (Riccardo) | ||
56 | + fixed calling init in initramfs (Harald) | ||
57 | + exit 0 for start, if the collector is already running (Harald) | ||
58 | + collector | ||
59 | + try harder with taskstats (Michael) | ||
60 | + plug some small leaks (Riccardo) | ||
61 | + fix missing PROC_EVENTS detection (Harald) | ||
62 | + pybootchartgui (Michael) | ||
63 | + add kernel bootchart tab to interactive gui | ||
64 | + report bootchart version in cli interface | ||
65 | + improve rendering performance | ||
66 | + GUI improvements | ||
67 | + lot of cleanups | ||
68 | + Makefile | ||
69 | + do not python compile if NO_PYTHON_COMPILE is set (Harald) | ||
70 | + systemd service files | ||
71 | + added them and install (Harald, Wulf C. Krueger) | ||
72 | |||
73 | bootchart2 0.12.5: | ||
74 | + administrative snafu version; pull before pushing... | ||
75 | |||
76 | bootchart2 0.12.4: | ||
77 | + bootchartd | ||
78 | + reduce overhead caused by pidof (Riccardo Magliocchetti) | ||
79 | + collector | ||
80 | + attempt to retry ptrace to avoid bogus ENOSYS (Michael) | ||
81 | + add meminfo polling (Dave Martin) | ||
82 | + pybootchartgui | ||
83 | + handle dmesg timestamps with big delta (Riccardo) | ||
84 | + avoid divide by zero when rendering I/O utilization (Riccardo) | ||
85 | + add process grouping in the cumulative chart (Riccardo) | ||
86 | + fix cpu time calculation in cumulative chart (Riccardo) | ||
87 | + get i/o statistics for flash based devices (Riccardo) | ||
88 | + prettier coloring for the cumulative graphs (Michael) | ||
89 | + fix interactive CPU rendering (Michael) | ||
90 | + render memory usage graph (Dave Martin) | ||
91 | |||
92 | bootchart2 0.12.3 | ||
93 | + collector | ||
94 | + pclose after popen (Riccardo Magliocchetti (xrmx)) | ||
95 | + fix buffer overflow (xrmx) | ||
96 | + count 'processor:' in /proc/cpuinfo for ARM (Michael) | ||
97 | + get model name from that line too for ARM (xrmx) | ||
98 | + store /proc/cpuinfo in the boot-chart archive (xrmx) | ||
99 | + try harder to detect missing TASKSTATS (Michael) | ||
100 | + sanity-check invalid domain names (Michael) | ||
101 | + detect missing PROC_EVENTS more reliably (Michael) | ||
102 | + README fixes (xrmx, Michael) | ||
103 | + pybootchartgui | ||
104 | + make num_cpu parsing robust (Michael) | ||
105 | |||
106 | bootchart2 0.12.2 | ||
107 | + fix pthread compile / linking bug | ||
108 | |||
109 | bootchart2 0.12.1 | ||
110 | + pybootchartgui | ||
111 | + pylint cleanup | ||
112 | + handle empty traces more elegantly | ||
113 | + add '-t' / '--boot-time' argument (Matthew Bauer) | ||
114 | + collector | ||
115 | + now GPLv2 | ||
116 | + add rdinit support for very early initrd tracing | ||
117 | + cleanup / re-factor code into separate modules | ||
118 | + re-factor arg parsing, and parse remote process args | ||
119 | + handle missing bootchartd.conf cleanly | ||
120 | + move much of bootchartd from shell -> C | ||
121 | + drop dmesg and uname usage | ||
122 | + avoid rpm/dpkg with native version reporting | ||
123 | |||
124 | bootchart2 0.12.0 (Michael Meeks) | ||
125 | + collector | ||
126 | + use netlink PROC_EVENTS to generate parentage data | ||
127 | + finally kills any need for 'acct' et. al. | ||
128 | + also removes need to poll /proc => faster | ||
129 | + cleanup code to K&R, 8 stop tabs. | ||
130 | + pybootchartgui | ||
131 | + consume thread parentage data | ||
132 | |||
133 | bootchart2 0.11.4 (Michael Meeks) | ||
134 | + collector | ||
135 | + if run inside an initrd detect when /dev is writable | ||
136 | and remount ourselves into that. | ||
137 | + overflow buffers more elegantly in extremis | ||
138 | + dump full process path and command-line args | ||
139 | + calm down debugging output | ||
140 | + pybootchartgui | ||
141 | + can render logs in a directory again | ||
142 | + has a 'show more' option to show command-lines | ||
143 | |||
144 | bootchart2 0.11.3 (Michael Meeks) | ||
145 | + add $$ display to the bootchart header | ||
146 | + process command-line bits | ||
147 | + fix collection code, and rename stream to match | ||
148 | + enable parsing, add check button to UI, and --show-all | ||
149 | command-line option | ||
150 | + fix parsing of directories full of files. | ||
151 | |||
152 | bootchart2 0.11.2 (Michael Meeks) | ||
153 | + fix initrd sanity check to use the right proc path | ||
154 | + don't return a bogus error value when dumping state | ||
155 | + add -c to aid manual console debugging | ||
156 | |||
157 | bootchart2 0.11.1 (Michael Meeks) | ||
158 | + even simpler initrd setup | ||
159 | + create a single directory: /lib/bootchart/tmpfs | ||
160 | |||
161 | bootchart2 0.11 (Michael Meeks) | ||
162 | + bootchartd | ||
163 | + far, far simpler, less shell, more robustness etc. | ||
164 | + bootchart-collector | ||
165 | + remove the -p argument - we always mount proc | ||
166 | + requires /lib/bootchart (make install-chroot) to | ||
167 | be present (also in the initrd) [ with a kmsg | ||
168 | node included ] | ||
169 | + add a --probe-running mode | ||
170 | + ptrace re-write | ||
171 | + gives -much- better early-boot-time resolution | ||
172 | + unconditional chroot /lib/bootchart/chroot | ||
173 | + we mount proc there ourselves | ||
174 | + log extraction requires no common file-system view | ||
175 | |||
176 | |||
177 | bootchart2 0.10.1 (Kel Modderman) | ||
178 | + collector arg -m should mount /proc | ||
179 | + remove bogus vcsid code | ||
180 | + split collector install in Makefile | ||
181 | + remove bogus debug code | ||
182 | + accept process names containing spaces | ||
183 | |||
184 | bootchart2 0.10.0 | ||
185 | + rendering (Anders Norgaard) | ||
186 | + fix for unknown exceptions | ||
187 | + interactive UI (Michael) | ||
188 | + much faster rendering by manual clipping | ||
189 | + horizontal scaling | ||
190 | + remove annoying page-up/down bindings | ||
191 | + initrd portability & fixes (Federic Crozat) | ||
192 | + port to Mandriva | ||
193 | + improved process waiting | ||
194 | + inittab commenting fix | ||
195 | + improved initrd detection / jail tagging | ||
196 | + fix for un-detectable accton behaviour change | ||
197 | + implement a built-in usleep to help initrd deps (Michael) | ||
198 | |||
199 | bootchart2 0.0.9 | ||
200 | + fix initrd bug | ||
201 | |||
202 | bootchart2 0.0.8 | ||
203 | + add a filename string to the window title in interactive mode | ||
204 | + add a NEWS file | ||
diff --git a/scripts/pybootchartgui/README.pybootchart b/scripts/pybootchartgui/README.pybootchart new file mode 100644 index 0000000000..8642e64679 --- /dev/null +++ b/scripts/pybootchartgui/README.pybootchart | |||
@@ -0,0 +1,37 @@ | |||
1 | PYBOOTCHARTGUI | ||
2 | ---------------- | ||
3 | |||
4 | pybootchartgui is a tool (now included as part of bootchart2) for | ||
5 | visualization and analysis of the GNU/Linux boot process. It renders | ||
6 | the output of the boot-logger tool bootchart (see | ||
7 | http://www.bootchart.org/) to either the screen or files of various | ||
8 | formats. Bootchart collects information about the processes, their | ||
9 | dependencies, and resource consumption during boot of a GNU/Linux | ||
10 | system. The pybootchartgui tools visualizes the process tree and | ||
11 | overall resource utilization. | ||
12 | |||
13 | pybootchartgui is a port of the visualization part of bootchart from | ||
14 | Java to Python and Cairo. | ||
15 | |||
16 | Adapted from the bootchart-documentation: | ||
17 | |||
18 | The CPU and disk statistics are used to render stacked area and line | ||
19 | charts. The process information is used to create a Gantt chart | ||
20 | showing process dependency, states and CPU usage. | ||
21 | |||
22 | A typical boot sequence consists of several hundred processes. Since | ||
23 | it is difficult to visualize such amount of data in a comprehensible | ||
24 | way, tree pruning is utilized. Idle background processes and | ||
25 | short-lived processes are removed. Similar processes running in | ||
26 | parallel are also merged together. | ||
27 | |||
28 | Finally, the performance and dependency charts are rendered as a | ||
29 | single image to either the screen or in PNG, PDF or SVG format. | ||
30 | |||
31 | |||
32 | To get help for pybootchartgui, run | ||
33 | |||
34 | $ pybootchartgui --help | ||
35 | |||
36 | This code was originally hosted at: | ||
37 | http://code.google.com/p/pybootchartgui/ | ||
diff --git a/scripts/pybootchartgui/pybootchartgui.py b/scripts/pybootchartgui/pybootchartgui.py new file mode 100755 index 0000000000..7ce1a5be40 --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui.py | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # This file is part of pybootchartgui. | ||
4 | |||
5 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation, either version 3 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | |||
10 | # pybootchartgui is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | |||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | |||
19 | import sys | ||
20 | from pybootchartgui.main import main | ||
21 | |||
22 | if __name__ == '__main__': | ||
23 | sys.exit(main()) | ||
diff --git a/scripts/pybootchartgui/pybootchartgui/__init__.py b/scripts/pybootchartgui/pybootchartgui/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/__init__.py | |||
diff --git a/scripts/pybootchartgui/pybootchartgui/batch.py b/scripts/pybootchartgui/pybootchartgui/batch.py new file mode 100644 index 0000000000..05c714e95e --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/batch.py | |||
@@ -0,0 +1,46 @@ | |||
1 | # This file is part of pybootchartgui. | ||
2 | |||
3 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation, either version 3 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | |||
8 | # pybootchartgui is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
15 | |||
16 | import cairo | ||
17 | from . import draw | ||
18 | from .draw import RenderOptions | ||
19 | |||
20 | def render(writer, trace, app_options, filename): | ||
21 | handlers = { | ||
22 | "png": (lambda w, h: cairo.ImageSurface(cairo.FORMAT_ARGB32, w, h), \ | ||
23 | lambda sfc: sfc.write_to_png(filename)), | ||
24 | "pdf": (lambda w, h: cairo.PDFSurface(filename, w, h), lambda sfc: 0), | ||
25 | "svg": (lambda w, h: cairo.SVGSurface(filename, w, h), lambda sfc: 0) | ||
26 | } | ||
27 | |||
28 | if app_options.format is None: | ||
29 | fmt = filename.rsplit('.', 1)[1] | ||
30 | else: | ||
31 | fmt = app_options.format | ||
32 | |||
33 | if not (fmt in handlers): | ||
34 | writer.error ("Unknown format '%s'." % fmt) | ||
35 | return 10 | ||
36 | |||
37 | make_surface, write_surface = handlers[fmt] | ||
38 | options = RenderOptions (app_options) | ||
39 | (w, h) = draw.extents (options, 1.0, trace) | ||
40 | w = max (w, draw.MIN_IMG_W) | ||
41 | surface = make_surface (w, h) | ||
42 | ctx = cairo.Context (surface) | ||
43 | draw.render (ctx, options, 1.0, trace) | ||
44 | write_surface (surface) | ||
45 | writer.status ("bootchart written to '%s'" % filename) | ||
46 | |||
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py new file mode 100644 index 0000000000..8c574be50c --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/draw.py | |||
@@ -0,0 +1,894 @@ | |||
1 | # This file is part of pybootchartgui. | ||
2 | |||
3 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation, either version 3 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | |||
8 | # pybootchartgui is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
15 | |||
16 | |||
17 | import cairo | ||
18 | import math | ||
19 | import re | ||
20 | import random | ||
21 | import colorsys | ||
22 | from operator import itemgetter | ||
23 | |||
24 | class RenderOptions: | ||
25 | |||
26 | def __init__(self, app_options): | ||
27 | # should we render a cumulative CPU time chart | ||
28 | self.cumulative = True | ||
29 | self.charts = True | ||
30 | self.kernel_only = False | ||
31 | self.app_options = app_options | ||
32 | |||
33 | def proc_tree (self, trace): | ||
34 | if self.kernel_only: | ||
35 | return trace.kernel_tree | ||
36 | else: | ||
37 | return trace.proc_tree | ||
38 | |||
39 | # Process tree background color. | ||
40 | BACK_COLOR = (1.0, 1.0, 1.0, 1.0) | ||
41 | |||
42 | WHITE = (1.0, 1.0, 1.0, 1.0) | ||
43 | # Process tree border color. | ||
44 | BORDER_COLOR = (0.63, 0.63, 0.63, 1.0) | ||
45 | # Second tick line color. | ||
46 | TICK_COLOR = (0.92, 0.92, 0.92, 1.0) | ||
47 | # 5-second tick line color. | ||
48 | TICK_COLOR_BOLD = (0.86, 0.86, 0.86, 1.0) | ||
49 | # Annotation colour | ||
50 | ANNOTATION_COLOR = (0.63, 0.0, 0.0, 0.5) | ||
51 | # Text color. | ||
52 | TEXT_COLOR = (0.0, 0.0, 0.0, 1.0) | ||
53 | |||
54 | # Font family | ||
55 | FONT_NAME = "Bitstream Vera Sans" | ||
56 | # Title text font. | ||
57 | TITLE_FONT_SIZE = 18 | ||
58 | # Default text font. | ||
59 | TEXT_FONT_SIZE = 12 | ||
60 | # Axis label font. | ||
61 | AXIS_FONT_SIZE = 11 | ||
62 | # Legend font. | ||
63 | LEGEND_FONT_SIZE = 12 | ||
64 | |||
65 | # CPU load chart color. | ||
66 | CPU_COLOR = (0.40, 0.55, 0.70, 1.0) | ||
67 | # IO wait chart color. | ||
68 | IO_COLOR = (0.76, 0.48, 0.48, 0.5) | ||
69 | # Disk throughput color. | ||
70 | DISK_TPUT_COLOR = (0.20, 0.71, 0.20, 1.0) | ||
71 | # CPU load chart color. | ||
72 | FILE_OPEN_COLOR = (0.20, 0.71, 0.71, 1.0) | ||
73 | # Mem cached color | ||
74 | MEM_CACHED_COLOR = CPU_COLOR | ||
75 | # Mem used color | ||
76 | MEM_USED_COLOR = IO_COLOR | ||
77 | # Buffers color | ||
78 | MEM_BUFFERS_COLOR = (0.4, 0.4, 0.4, 0.3) | ||
79 | # Swap color | ||
80 | MEM_SWAP_COLOR = DISK_TPUT_COLOR | ||
81 | |||
82 | # Process border color. | ||
83 | PROC_BORDER_COLOR = (0.71, 0.71, 0.71, 1.0) | ||
84 | # Waiting process color. | ||
85 | PROC_COLOR_D = (0.76, 0.48, 0.48, 0.5) | ||
86 | # Running process color. | ||
87 | PROC_COLOR_R = CPU_COLOR | ||
88 | # Sleeping process color. | ||
89 | PROC_COLOR_S = (0.94, 0.94, 0.94, 1.0) | ||
90 | # Stopped process color. | ||
91 | PROC_COLOR_T = (0.94, 0.50, 0.50, 1.0) | ||
92 | # Zombie process color. | ||
93 | PROC_COLOR_Z = (0.71, 0.71, 0.71, 1.0) | ||
94 | # Dead process color. | ||
95 | PROC_COLOR_X = (0.71, 0.71, 0.71, 0.125) | ||
96 | # Paging process color. | ||
97 | PROC_COLOR_W = (0.71, 0.71, 0.71, 0.125) | ||
98 | |||
99 | # Process label color. | ||
100 | PROC_TEXT_COLOR = (0.19, 0.19, 0.19, 1.0) | ||
101 | # Process label font. | ||
102 | PROC_TEXT_FONT_SIZE = 12 | ||
103 | |||
104 | # Signature color. | ||
105 | SIG_COLOR = (0.0, 0.0, 0.0, 0.3125) | ||
106 | # Signature font. | ||
107 | SIG_FONT_SIZE = 14 | ||
108 | # Signature text. | ||
109 | SIGNATURE = "http://github.com/mmeeks/bootchart" | ||
110 | |||
111 | # Process dependency line color. | ||
112 | DEP_COLOR = (0.75, 0.75, 0.75, 1.0) | ||
113 | # Process dependency line stroke. | ||
114 | DEP_STROKE = 1.0 | ||
115 | |||
116 | # Process description date format. | ||
117 | DESC_TIME_FORMAT = "mm:ss.SSS" | ||
118 | |||
119 | # Cumulative coloring bits | ||
120 | HSV_MAX_MOD = 31 | ||
121 | HSV_STEP = 7 | ||
122 | |||
123 | # Configure task color | ||
124 | TASK_COLOR_CONFIGURE = (1.0, 1.0, 0.00, 1.0) | ||
125 | # Compile task color. | ||
126 | TASK_COLOR_COMPILE = (0.0, 1.00, 0.00, 1.0) | ||
127 | # Install task color | ||
128 | TASK_COLOR_INSTALL = (1.0, 0.00, 1.00, 1.0) | ||
129 | # Sysroot task color | ||
130 | TASK_COLOR_SYSROOT = (0.0, 0.00, 1.00, 1.0) | ||
131 | # Package task color | ||
132 | TASK_COLOR_PACKAGE = (0.0, 1.00, 1.00, 1.0) | ||
133 | # Package Write RPM/DEB/IPK task color | ||
134 | TASK_COLOR_PACKAGE_WRITE = (0.0, 0.50, 0.50, 1.0) | ||
135 | |||
136 | # Process states | ||
137 | STATE_UNDEFINED = 0 | ||
138 | STATE_RUNNING = 1 | ||
139 | STATE_SLEEPING = 2 | ||
140 | STATE_WAITING = 3 | ||
141 | STATE_STOPPED = 4 | ||
142 | STATE_ZOMBIE = 5 | ||
143 | |||
144 | STATE_COLORS = [(0, 0, 0, 0), PROC_COLOR_R, PROC_COLOR_S, PROC_COLOR_D, \ | ||
145 | PROC_COLOR_T, PROC_COLOR_Z, PROC_COLOR_X, PROC_COLOR_W] | ||
146 | |||
147 | # CumulativeStats Types | ||
148 | STAT_TYPE_CPU = 0 | ||
149 | STAT_TYPE_IO = 1 | ||
150 | |||
151 | # Convert ps process state to an int | ||
152 | def get_proc_state(flag): | ||
153 | return "RSDTZXW".find(flag) + 1 | ||
154 | |||
155 | def draw_text(ctx, text, color, x, y): | ||
156 | ctx.set_source_rgba(*color) | ||
157 | ctx.move_to(x, y) | ||
158 | ctx.show_text(text) | ||
159 | |||
160 | def draw_fill_rect(ctx, color, rect): | ||
161 | ctx.set_source_rgba(*color) | ||
162 | ctx.rectangle(*rect) | ||
163 | ctx.fill() | ||
164 | |||
165 | def draw_rect(ctx, color, rect): | ||
166 | ctx.set_source_rgba(*color) | ||
167 | ctx.rectangle(*rect) | ||
168 | ctx.stroke() | ||
169 | |||
170 | def draw_legend_box(ctx, label, fill_color, x, y, s): | ||
171 | draw_fill_rect(ctx, fill_color, (x, y - s, s, s)) | ||
172 | draw_rect(ctx, PROC_BORDER_COLOR, (x, y - s, s, s)) | ||
173 | draw_text(ctx, label, TEXT_COLOR, x + s + 5, y) | ||
174 | |||
175 | def draw_legend_line(ctx, label, fill_color, x, y, s): | ||
176 | draw_fill_rect(ctx, fill_color, (x, y - s/2, s + 1, 3)) | ||
177 | ctx.arc(x + (s + 1)/2.0, y - (s - 3)/2.0, 2.5, 0, 2.0 * math.pi) | ||
178 | ctx.fill() | ||
179 | draw_text(ctx, label, TEXT_COLOR, x + s + 5, y) | ||
180 | |||
181 | def draw_label_in_box(ctx, color, label, x, y, w, maxx): | ||
182 | label_w = ctx.text_extents(label)[2] | ||
183 | label_x = x + w / 2 - label_w / 2 | ||
184 | if label_w + 10 > w: | ||
185 | label_x = x + w + 5 | ||
186 | if label_x + label_w > maxx: | ||
187 | label_x = x - label_w - 5 | ||
188 | draw_text(ctx, label, color, label_x, y) | ||
189 | |||
190 | def draw_sec_labels(ctx, options, rect, sec_w, nsecs): | ||
191 | ctx.set_font_size(AXIS_FONT_SIZE) | ||
192 | prev_x = 0 | ||
193 | for i in range(0, rect[2] + 1, sec_w): | ||
194 | if ((i / sec_w) % nsecs == 0) : | ||
195 | if options.app_options.as_minutes : | ||
196 | label = "%.1f" % (i / sec_w / 60.0) | ||
197 | else : | ||
198 | label = "%d" % (i / sec_w) | ||
199 | label_w = ctx.text_extents(label)[2] | ||
200 | x = rect[0] + i - label_w/2 | ||
201 | if x >= prev_x: | ||
202 | draw_text(ctx, label, TEXT_COLOR, x, rect[1] - 2) | ||
203 | prev_x = x + label_w | ||
204 | |||
205 | def draw_box_ticks(ctx, rect, sec_w): | ||
206 | draw_rect(ctx, BORDER_COLOR, tuple(rect)) | ||
207 | |||
208 | ctx.set_line_cap(cairo.LINE_CAP_SQUARE) | ||
209 | |||
210 | for i in range(sec_w, rect[2] + 1, sec_w): | ||
211 | if ((i / sec_w) % 10 == 0) : | ||
212 | ctx.set_line_width(1.5) | ||
213 | elif sec_w < 5 : | ||
214 | continue | ||
215 | else : | ||
216 | ctx.set_line_width(1.0) | ||
217 | if ((i / sec_w) % 30 == 0) : | ||
218 | ctx.set_source_rgba(*TICK_COLOR_BOLD) | ||
219 | else : | ||
220 | ctx.set_source_rgba(*TICK_COLOR) | ||
221 | ctx.move_to(rect[0] + i, rect[1] + 1) | ||
222 | ctx.line_to(rect[0] + i, rect[1] + rect[3] - 1) | ||
223 | ctx.stroke() | ||
224 | ctx.set_line_width(1.0) | ||
225 | |||
226 | ctx.set_line_cap(cairo.LINE_CAP_BUTT) | ||
227 | |||
228 | def draw_annotations(ctx, proc_tree, times, rect): | ||
229 | ctx.set_line_cap(cairo.LINE_CAP_SQUARE) | ||
230 | ctx.set_source_rgba(*ANNOTATION_COLOR) | ||
231 | ctx.set_dash([4, 4]) | ||
232 | |||
233 | for time in times: | ||
234 | if time is not None: | ||
235 | x = ((time - proc_tree.start_time) * rect[2] / proc_tree.duration) | ||
236 | |||
237 | ctx.move_to(rect[0] + x, rect[1] + 1) | ||
238 | ctx.line_to(rect[0] + x, rect[1] + rect[3] - 1) | ||
239 | ctx.stroke() | ||
240 | |||
241 | ctx.set_line_cap(cairo.LINE_CAP_BUTT) | ||
242 | ctx.set_dash([]) | ||
243 | |||
244 | def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range): | ||
245 | ctx.set_line_width(0.5) | ||
246 | x_shift = proc_tree.start_time | ||
247 | |||
248 | def transform_point_coords(point, x_base, y_base, \ | ||
249 | xscale, yscale, x_trans, y_trans): | ||
250 | x = (point[0] - x_base) * xscale + x_trans | ||
251 | y = (point[1] - y_base) * -yscale + y_trans + chart_bounds[3] | ||
252 | return x, y | ||
253 | |||
254 | max_x = max (x for (x, y) in data) | ||
255 | max_y = max (y for (x, y) in data) | ||
256 | # avoid divide by zero | ||
257 | if max_y == 0: | ||
258 | max_y = 1.0 | ||
259 | xscale = float (chart_bounds[2]) / max_x | ||
260 | # If data_range is given, scale the chart so that the value range in | ||
261 | # data_range matches the chart bounds exactly. | ||
262 | # Otherwise, scale so that the actual data matches the chart bounds. | ||
263 | if data_range: | ||
264 | yscale = float(chart_bounds[3]) / (data_range[1] - data_range[0]) | ||
265 | ybase = data_range[0] | ||
266 | else: | ||
267 | yscale = float(chart_bounds[3]) / max_y | ||
268 | ybase = 0 | ||
269 | |||
270 | first = transform_point_coords (data[0], x_shift, ybase, xscale, yscale, \ | ||
271 | chart_bounds[0], chart_bounds[1]) | ||
272 | last = transform_point_coords (data[-1], x_shift, ybase, xscale, yscale, \ | ||
273 | chart_bounds[0], chart_bounds[1]) | ||
274 | |||
275 | ctx.set_source_rgba(*color) | ||
276 | ctx.move_to(*first) | ||
277 | for point in data: | ||
278 | x, y = transform_point_coords (point, x_shift, ybase, xscale, yscale, \ | ||
279 | chart_bounds[0], chart_bounds[1]) | ||
280 | ctx.line_to(x, y) | ||
281 | if fill: | ||
282 | ctx.stroke_preserve() | ||
283 | ctx.line_to(last[0], chart_bounds[1]+chart_bounds[3]) | ||
284 | ctx.line_to(first[0], chart_bounds[1]+chart_bounds[3]) | ||
285 | ctx.line_to(first[0], first[1]) | ||
286 | ctx.fill() | ||
287 | else: | ||
288 | ctx.stroke() | ||
289 | ctx.set_line_width(1.0) | ||
290 | |||
291 | bar_h = 55 | ||
292 | meminfo_bar_h = 2 * bar_h | ||
293 | header_h = 60 | ||
294 | # offsets | ||
295 | off_x, off_y = 220, 10 | ||
296 | sec_w_base = 1 # the width of a second | ||
297 | proc_h = 16 # the height of a process | ||
298 | leg_s = 10 | ||
299 | MIN_IMG_W = 800 | ||
300 | CUML_HEIGHT = 2000 # Increased value to accomodate CPU and I/O Graphs | ||
301 | OPTIONS = None | ||
302 | |||
303 | def extents(options, xscale, trace): | ||
304 | start = min(trace.start.keys()) | ||
305 | end = start | ||
306 | |||
307 | processes = 0 | ||
308 | for proc in trace.processes: | ||
309 | if not options.app_options.show_all and \ | ||
310 | trace.processes[proc][1] - trace.processes[proc][0] < options.app_options.mintime: | ||
311 | continue | ||
312 | |||
313 | if trace.processes[proc][1] > end: | ||
314 | end = trace.processes[proc][1] | ||
315 | processes += 1 | ||
316 | |||
317 | if trace.min is not None and trace.max is not None: | ||
318 | start = trace.min | ||
319 | end = trace.max | ||
320 | |||
321 | w = int ((end - start) * sec_w_base * xscale) + 2 * off_x | ||
322 | h = proc_h * processes + header_h + 2 * off_y | ||
323 | |||
324 | return (w, h) | ||
325 | |||
326 | def clip_visible(clip, rect): | ||
327 | xmax = max (clip[0], rect[0]) | ||
328 | ymax = max (clip[1], rect[1]) | ||
329 | xmin = min (clip[0] + clip[2], rect[0] + rect[2]) | ||
330 | ymin = min (clip[1] + clip[3], rect[1] + rect[3]) | ||
331 | return (xmin > xmax and ymin > ymax) | ||
332 | |||
333 | def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w): | ||
334 | proc_tree = options.proc_tree(trace) | ||
335 | |||
336 | # render bar legend | ||
337 | ctx.set_font_size(LEGEND_FONT_SIZE) | ||
338 | |||
339 | draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s) | ||
340 | draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s) | ||
341 | |||
342 | # render I/O wait | ||
343 | chart_rect = (off_x, curr_y+30, w, bar_h) | ||
344 | if clip_visible (clip, chart_rect): | ||
345 | draw_box_ticks (ctx, chart_rect, sec_w) | ||
346 | draw_annotations (ctx, proc_tree, trace.times, chart_rect) | ||
347 | draw_chart (ctx, IO_COLOR, True, chart_rect, \ | ||
348 | [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \ | ||
349 | proc_tree, None) | ||
350 | # render CPU load | ||
351 | draw_chart (ctx, CPU_COLOR, True, chart_rect, \ | ||
352 | [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \ | ||
353 | proc_tree, None) | ||
354 | |||
355 | curr_y = curr_y + 30 + bar_h | ||
356 | |||
357 | # render second chart | ||
358 | draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, curr_y+20, leg_s) | ||
359 | draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, curr_y+20, leg_s) | ||
360 | |||
361 | # render I/O utilization | ||
362 | chart_rect = (off_x, curr_y+30, w, bar_h) | ||
363 | if clip_visible (clip, chart_rect): | ||
364 | draw_box_ticks (ctx, chart_rect, sec_w) | ||
365 | draw_annotations (ctx, proc_tree, trace.times, chart_rect) | ||
366 | draw_chart (ctx, IO_COLOR, True, chart_rect, \ | ||
367 | [(sample.time, sample.util) for sample in trace.disk_stats], \ | ||
368 | proc_tree, None) | ||
369 | |||
370 | # render disk throughput | ||
371 | max_sample = max (trace.disk_stats, key = lambda s: s.tput) | ||
372 | if clip_visible (clip, chart_rect): | ||
373 | draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \ | ||
374 | [(sample.time, sample.tput) for sample in trace.disk_stats], \ | ||
375 | proc_tree, None) | ||
376 | |||
377 | pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / proc_tree.duration) | ||
378 | |||
379 | shift_x, shift_y = -20, 20 | ||
380 | if (pos_x < off_x + 245): | ||
381 | shift_x, shift_y = 5, 40 | ||
382 | |||
383 | label = "%dMB/s" % round ((max_sample.tput) / 1024.0) | ||
384 | draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y) | ||
385 | |||
386 | curr_y = curr_y + 30 + bar_h | ||
387 | |||
388 | # render mem usage | ||
389 | chart_rect = (off_x, curr_y+30, w, meminfo_bar_h) | ||
390 | mem_stats = trace.mem_stats | ||
391 | if mem_stats and clip_visible (clip, chart_rect): | ||
392 | mem_scale = max(sample.records['MemTotal'] - sample.records['MemFree'] for sample in mem_stats) | ||
393 | draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s) | ||
394 | draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s) | ||
395 | draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y+20, leg_s) | ||
396 | draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.records['SwapTotal'] - sample.records['SwapFree'])/1024 for sample in mem_stats]), \ | ||
397 | MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s) | ||
398 | draw_box_ticks(ctx, chart_rect, sec_w) | ||
399 | draw_annotations(ctx, proc_tree, trace.times, chart_rect) | ||
400 | draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect, \ | ||
401 | [(sample.time, sample.records['MemTotal'] - sample.records['MemFree']) for sample in trace.mem_stats], \ | ||
402 | proc_tree, [0, mem_scale]) | ||
403 | draw_chart(ctx, MEM_USED_COLOR, True, chart_rect, \ | ||
404 | [(sample.time, sample.records['MemTotal'] - sample.records['MemFree'] - sample.records['Buffers']) for sample in mem_stats], \ | ||
405 | proc_tree, [0, mem_scale]) | ||
406 | draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect, \ | ||
407 | [(sample.time, sample.records['Cached']) for sample in mem_stats], \ | ||
408 | proc_tree, [0, mem_scale]) | ||
409 | draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect, \ | ||
410 | [(sample.time, float(sample.records['SwapTotal'] - sample.records['SwapFree'])) for sample in mem_stats], \ | ||
411 | proc_tree, None) | ||
412 | |||
413 | curr_y = curr_y + meminfo_bar_h | ||
414 | |||
415 | return curr_y | ||
416 | |||
417 | def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): | ||
418 | chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - (curr_y+header_h) + proc_h] | ||
419 | |||
420 | draw_legend_box (ctx, "Configure", \ | ||
421 | TASK_COLOR_CONFIGURE, off_x , curr_y + 45, leg_s) | ||
422 | draw_legend_box (ctx, "Compile", \ | ||
423 | TASK_COLOR_COMPILE, off_x+120, curr_y + 45, leg_s) | ||
424 | draw_legend_box (ctx, "Install", \ | ||
425 | TASK_COLOR_INSTALL, off_x+240, curr_y + 45, leg_s) | ||
426 | draw_legend_box (ctx, "Populate Sysroot", \ | ||
427 | TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s) | ||
428 | draw_legend_box (ctx, "Package", \ | ||
429 | TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s) | ||
430 | draw_legend_box (ctx, "Package Write", | ||
431 | TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s) | ||
432 | |||
433 | ctx.set_font_size(PROC_TEXT_FONT_SIZE) | ||
434 | |||
435 | draw_box_ticks(ctx, chart_rect, sec_w) | ||
436 | draw_sec_labels(ctx, options, chart_rect, sec_w, 30) | ||
437 | |||
438 | y = curr_y+header_h | ||
439 | |||
440 | offset = trace.min or min(trace.start.keys()) | ||
441 | for s in sorted(trace.start.keys()): | ||
442 | for val in sorted(trace.start[s]): | ||
443 | if not options.app_options.show_all and \ | ||
444 | trace.processes[val][1] - s < options.app_options.mintime: | ||
445 | continue | ||
446 | task = val.split(":")[1] | ||
447 | #print val | ||
448 | #print trace.processes[val][1] | ||
449 | #print s | ||
450 | x = chart_rect[0] + (s - offset) * sec_w | ||
451 | w = ((trace.processes[val][1] - s) * sec_w) | ||
452 | |||
453 | #print "proc at %s %s %s %s" % (x, y, w, proc_h) | ||
454 | col = None | ||
455 | if task == "do_compile": | ||
456 | col = TASK_COLOR_COMPILE | ||
457 | elif task == "do_configure": | ||
458 | col = TASK_COLOR_CONFIGURE | ||
459 | elif task == "do_install": | ||
460 | col = TASK_COLOR_INSTALL | ||
461 | elif task == "do_populate_sysroot": | ||
462 | col = TASK_COLOR_SYSROOT | ||
463 | elif task == "do_package": | ||
464 | col = TASK_COLOR_PACKAGE | ||
465 | elif task == "do_package_write_rpm" or \ | ||
466 | task == "do_package_write_deb" or \ | ||
467 | task == "do_package_write_ipk": | ||
468 | col = TASK_COLOR_PACKAGE_WRITE | ||
469 | else: | ||
470 | col = WHITE | ||
471 | |||
472 | if col: | ||
473 | draw_fill_rect(ctx, col, (x, y, w, proc_h)) | ||
474 | draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) | ||
475 | |||
476 | draw_label_in_box(ctx, PROC_TEXT_COLOR, val, x, y + proc_h - 4, w, proc_h) | ||
477 | y = y + proc_h | ||
478 | |||
479 | return curr_y | ||
480 | |||
481 | # | ||
482 | # Render the chart. | ||
483 | # | ||
484 | def render(ctx, options, xscale, trace): | ||
485 | (w, h) = extents (options, xscale, trace) | ||
486 | global OPTIONS | ||
487 | OPTIONS = options.app_options | ||
488 | |||
489 | # x, y, w, h | ||
490 | clip = ctx.clip_extents() | ||
491 | |||
492 | sec_w = int (xscale * sec_w_base) | ||
493 | ctx.set_line_width(1.0) | ||
494 | ctx.select_font_face(FONT_NAME) | ||
495 | draw_fill_rect(ctx, WHITE, (0, 0, max(w, MIN_IMG_W), h)) | ||
496 | w -= 2*off_x | ||
497 | curr_y = off_y; | ||
498 | |||
499 | curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w) | ||
500 | |||
501 | return | ||
502 | |||
503 | proc_tree = options.proc_tree (trace) | ||
504 | |||
505 | # draw the title and headers | ||
506 | if proc_tree.idle: | ||
507 | duration = proc_tree.idle | ||
508 | else: | ||
509 | duration = proc_tree.duration | ||
510 | |||
511 | if not options.kernel_only: | ||
512 | curr_y = draw_header (ctx, trace.headers, duration) | ||
513 | else: | ||
514 | curr_y = off_y; | ||
515 | |||
516 | if options.charts: | ||
517 | curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w) | ||
518 | |||
519 | # draw process boxes | ||
520 | proc_height = h | ||
521 | if proc_tree.taskstats and options.cumulative: | ||
522 | proc_height -= CUML_HEIGHT | ||
523 | |||
524 | draw_process_bar_chart(ctx, clip, options, proc_tree, trace.times, | ||
525 | curr_y, w, proc_height, sec_w) | ||
526 | |||
527 | curr_y = proc_height | ||
528 | ctx.set_font_size(SIG_FONT_SIZE) | ||
529 | draw_text(ctx, SIGNATURE, SIG_COLOR, off_x + 5, proc_height - 8) | ||
530 | |||
531 | # draw a cumulative CPU-time-per-process graph | ||
532 | if proc_tree.taskstats and options.cumulative: | ||
533 | cuml_rect = (off_x, curr_y + off_y, w, CUML_HEIGHT/2 - off_y * 2) | ||
534 | if clip_visible (clip, cuml_rect): | ||
535 | draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_CPU) | ||
536 | |||
537 | # draw a cumulative I/O-time-per-process graph | ||
538 | if proc_tree.taskstats and options.cumulative: | ||
539 | cuml_rect = (off_x, curr_y + off_y * 100, w, CUML_HEIGHT/2 - off_y * 2) | ||
540 | if clip_visible (clip, cuml_rect): | ||
541 | draw_cuml_graph(ctx, proc_tree, cuml_rect, duration, sec_w, STAT_TYPE_IO) | ||
542 | |||
543 | def draw_process_bar_chart(ctx, clip, options, proc_tree, times, curr_y, w, h, sec_w): | ||
544 | header_size = 0 | ||
545 | if not options.kernel_only: | ||
546 | draw_legend_box (ctx, "Running (%cpu)", | ||
547 | PROC_COLOR_R, off_x , curr_y + 45, leg_s) | ||
548 | draw_legend_box (ctx, "Unint.sleep (I/O)", | ||
549 | PROC_COLOR_D, off_x+120, curr_y + 45, leg_s) | ||
550 | draw_legend_box (ctx, "Sleeping", | ||
551 | PROC_COLOR_S, off_x+240, curr_y + 45, leg_s) | ||
552 | draw_legend_box (ctx, "Zombie", | ||
553 | PROC_COLOR_Z, off_x+360, curr_y + 45, leg_s) | ||
554 | header_size = 45 | ||
555 | |||
556 | chart_rect = [off_x, curr_y + header_size + 15, | ||
557 | w, h - 2 * off_y - (curr_y + header_size + 15) + proc_h] | ||
558 | ctx.set_font_size (PROC_TEXT_FONT_SIZE) | ||
559 | |||
560 | draw_box_ticks (ctx, chart_rect, sec_w) | ||
561 | if sec_w > 100: | ||
562 | nsec = 1 | ||
563 | else: | ||
564 | nsec = 5 | ||
565 | draw_sec_labels (ctx, options, chart_rect, sec_w, nsec) | ||
566 | draw_annotations (ctx, proc_tree, times, chart_rect) | ||
567 | |||
568 | y = curr_y + 60 | ||
569 | for root in proc_tree.process_tree: | ||
570 | draw_processes_recursively(ctx, root, proc_tree, y, proc_h, chart_rect, clip) | ||
571 | y = y + proc_h * proc_tree.num_nodes([root]) | ||
572 | |||
573 | |||
574 | def draw_header (ctx, headers, duration): | ||
575 | toshow = [ | ||
576 | ('system.uname', 'uname', lambda s: s), | ||
577 | ('system.release', 'release', lambda s: s), | ||
578 | ('system.cpu', 'CPU', lambda s: re.sub('model name\s*:\s*', '', s, 1)), | ||
579 | ('system.kernel.options', 'kernel options', lambda s: s), | ||
580 | ] | ||
581 | |||
582 | header_y = ctx.font_extents()[2] + 10 | ||
583 | ctx.set_font_size(TITLE_FONT_SIZE) | ||
584 | draw_text(ctx, headers['title'], TEXT_COLOR, off_x, header_y) | ||
585 | ctx.set_font_size(TEXT_FONT_SIZE) | ||
586 | |||
587 | for (headerkey, headertitle, mangle) in toshow: | ||
588 | header_y += ctx.font_extents()[2] | ||
589 | if headerkey in headers: | ||
590 | value = headers.get(headerkey) | ||
591 | else: | ||
592 | value = "" | ||
593 | txt = headertitle + ': ' + mangle(value) | ||
594 | draw_text(ctx, txt, TEXT_COLOR, off_x, header_y) | ||
595 | |||
596 | dur = duration / 100.0 | ||
597 | txt = 'time : %02d:%05.2f' % (math.floor(dur/60), dur - 60 * math.floor(dur/60)) | ||
598 | if headers.get('system.maxpid') is not None: | ||
599 | txt = txt + ' max pid: %s' % (headers.get('system.maxpid')) | ||
600 | |||
601 | header_y += ctx.font_extents()[2] | ||
602 | draw_text (ctx, txt, TEXT_COLOR, off_x, header_y) | ||
603 | |||
604 | return header_y | ||
605 | |||
606 | def draw_processes_recursively(ctx, proc, proc_tree, y, proc_h, rect, clip) : | ||
607 | x = rect[0] + ((proc.start_time - proc_tree.start_time) * rect[2] / proc_tree.duration) | ||
608 | w = ((proc.duration) * rect[2] / proc_tree.duration) | ||
609 | |||
610 | draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, clip) | ||
611 | draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) | ||
612 | ipid = int(proc.pid) | ||
613 | if not OPTIONS.show_all: | ||
614 | cmdString = proc.cmd | ||
615 | else: | ||
616 | cmdString = '' | ||
617 | if (OPTIONS.show_pid or OPTIONS.show_all) and ipid is not 0: | ||
618 | cmdString = cmdString + " [" + str(ipid // 1000) + "]" | ||
619 | if OPTIONS.show_all: | ||
620 | if proc.args: | ||
621 | cmdString = cmdString + " '" + "' '".join(proc.args) + "'" | ||
622 | else: | ||
623 | cmdString = cmdString + " " + proc.exe | ||
624 | |||
625 | draw_label_in_box(ctx, PROC_TEXT_COLOR, cmdString, x, y + proc_h - 4, w, rect[0] + rect[2]) | ||
626 | |||
627 | next_y = y + proc_h | ||
628 | for child in proc.child_list: | ||
629 | if next_y > clip[1] + clip[3]: | ||
630 | break | ||
631 | child_x, child_y = draw_processes_recursively(ctx, child, proc_tree, next_y, proc_h, rect, clip) | ||
632 | draw_process_connecting_lines(ctx, x, y, child_x, child_y, proc_h) | ||
633 | next_y = next_y + proc_h * proc_tree.num_nodes([child]) | ||
634 | |||
635 | return x, y | ||
636 | |||
637 | |||
638 | def draw_process_activity_colors(ctx, proc, proc_tree, x, y, w, proc_h, rect, clip): | ||
639 | |||
640 | if y > clip[1] + clip[3] or y + proc_h + 2 < clip[1]: | ||
641 | return | ||
642 | |||
643 | draw_fill_rect(ctx, PROC_COLOR_S, (x, y, w, proc_h)) | ||
644 | |||
645 | last_tx = -1 | ||
646 | for sample in proc.samples : | ||
647 | tx = rect[0] + round(((sample.time - proc_tree.start_time) * rect[2] / proc_tree.duration)) | ||
648 | |||
649 | # samples are sorted chronologically | ||
650 | if tx < clip[0]: | ||
651 | continue | ||
652 | if tx > clip[0] + clip[2]: | ||
653 | break | ||
654 | |||
655 | tw = round(proc_tree.sample_period * rect[2] / float(proc_tree.duration)) | ||
656 | if last_tx != -1 and abs(last_tx - tx) <= tw: | ||
657 | tw -= last_tx - tx | ||
658 | tx = last_tx | ||
659 | tw = max (tw, 1) # nice to see at least something | ||
660 | |||
661 | last_tx = tx + tw | ||
662 | state = get_proc_state( sample.state ) | ||
663 | |||
664 | color = STATE_COLORS[state] | ||
665 | if state == STATE_RUNNING: | ||
666 | alpha = min (sample.cpu_sample.user + sample.cpu_sample.sys, 1.0) | ||
667 | color = tuple(list(PROC_COLOR_R[0:3]) + [alpha]) | ||
668 | # print "render time %d [ tx %d tw %d ], sample state %s color %s alpha %g" % (sample.time, tx, tw, state, color, alpha) | ||
669 | elif state == STATE_SLEEPING: | ||
670 | continue | ||
671 | |||
672 | draw_fill_rect(ctx, color, (tx, y, tw, proc_h)) | ||
673 | |||
674 | def draw_process_connecting_lines(ctx, px, py, x, y, proc_h): | ||
675 | ctx.set_source_rgba(*DEP_COLOR) | ||
676 | ctx.set_dash([2, 2]) | ||
677 | if abs(px - x) < 3: | ||
678 | dep_off_x = 3 | ||
679 | dep_off_y = proc_h / 4 | ||
680 | ctx.move_to(x, y + proc_h / 2) | ||
681 | ctx.line_to(px - dep_off_x, y + proc_h / 2) | ||
682 | ctx.line_to(px - dep_off_x, py - dep_off_y) | ||
683 | ctx.line_to(px, py - dep_off_y) | ||
684 | else: | ||
685 | ctx.move_to(x, y + proc_h / 2) | ||
686 | ctx.line_to(px, y + proc_h / 2) | ||
687 | ctx.line_to(px, py) | ||
688 | ctx.stroke() | ||
689 | ctx.set_dash([]) | ||
690 | |||
691 | # elide the bootchart collector - it is quite distorting | ||
692 | def elide_bootchart(proc): | ||
693 | return proc.cmd == 'bootchartd' or proc.cmd == 'bootchart-colle' | ||
694 | |||
695 | class CumlSample: | ||
696 | def __init__(self, proc): | ||
697 | self.cmd = proc.cmd | ||
698 | self.samples = [] | ||
699 | self.merge_samples (proc) | ||
700 | self.color = None | ||
701 | |||
702 | def merge_samples(self, proc): | ||
703 | self.samples.extend (proc.samples) | ||
704 | self.samples.sort (key = lambda p: p.time) | ||
705 | |||
706 | def next(self): | ||
707 | global palette_idx | ||
708 | palette_idx += HSV_STEP | ||
709 | return palette_idx | ||
710 | |||
711 | def get_color(self): | ||
712 | if self.color is None: | ||
713 | i = self.next() % HSV_MAX_MOD | ||
714 | h = 0.0 | ||
715 | if i is not 0: | ||
716 | h = (1.0 * i) / HSV_MAX_MOD | ||
717 | s = 0.5 | ||
718 | v = 1.0 | ||
719 | c = colorsys.hsv_to_rgb (h, s, v) | ||
720 | self.color = (c[0], c[1], c[2], 1.0) | ||
721 | return self.color | ||
722 | |||
723 | |||
724 | def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w, stat_type): | ||
725 | global palette_idx | ||
726 | palette_idx = 0 | ||
727 | |||
728 | time_hash = {} | ||
729 | total_time = 0.0 | ||
730 | m_proc_list = {} | ||
731 | |||
732 | if stat_type is STAT_TYPE_CPU: | ||
733 | sample_value = 'cpu' | ||
734 | else: | ||
735 | sample_value = 'io' | ||
736 | for proc in proc_tree.process_list: | ||
737 | if elide_bootchart(proc): | ||
738 | continue | ||
739 | |||
740 | for sample in proc.samples: | ||
741 | total_time += getattr(sample.cpu_sample, sample_value) | ||
742 | if not sample.time in time_hash: | ||
743 | time_hash[sample.time] = 1 | ||
744 | |||
745 | # merge pids with the same cmd | ||
746 | if not proc.cmd in m_proc_list: | ||
747 | m_proc_list[proc.cmd] = CumlSample (proc) | ||
748 | continue | ||
749 | s = m_proc_list[proc.cmd] | ||
750 | s.merge_samples (proc) | ||
751 | |||
752 | # all the sample times | ||
753 | times = sorted(time_hash) | ||
754 | if len (times) < 2: | ||
755 | print("degenerate boot chart") | ||
756 | return | ||
757 | |||
758 | pix_per_ns = chart_bounds[3] / total_time | ||
759 | # print "total time: %g pix-per-ns %g" % (total_time, pix_per_ns) | ||
760 | |||
761 | # FIXME: we have duplicates in the process list too [!] - why !? | ||
762 | |||
763 | # Render bottom up, left to right | ||
764 | below = {} | ||
765 | for time in times: | ||
766 | below[time] = chart_bounds[1] + chart_bounds[3] | ||
767 | |||
768 | # same colors each time we render | ||
769 | random.seed (0) | ||
770 | |||
771 | ctx.set_line_width(1) | ||
772 | |||
773 | legends = [] | ||
774 | labels = [] | ||
775 | |||
776 | # render each pid in order | ||
777 | for cs in m_proc_list.values(): | ||
778 | row = {} | ||
779 | cuml = 0.0 | ||
780 | |||
781 | # print "pid : %s -> %g samples %d" % (proc.cmd, cuml, len (cs.samples)) | ||
782 | for sample in cs.samples: | ||
783 | cuml += getattr(sample.cpu_sample, sample_value) | ||
784 | row[sample.time] = cuml | ||
785 | |||
786 | process_total_time = cuml | ||
787 | |||
788 | # hide really tiny processes | ||
789 | if cuml * pix_per_ns <= 2: | ||
790 | continue | ||
791 | |||
792 | last_time = times[0] | ||
793 | y = last_below = below[last_time] | ||
794 | last_cuml = cuml = 0.0 | ||
795 | |||
796 | ctx.set_source_rgba(*cs.get_color()) | ||
797 | for time in times: | ||
798 | render_seg = False | ||
799 | |||
800 | # did the underlying trend increase ? | ||
801 | if below[time] != last_below: | ||
802 | last_below = below[last_time] | ||
803 | last_cuml = cuml | ||
804 | render_seg = True | ||
805 | |||
806 | # did we move up a pixel increase ? | ||
807 | if time in row: | ||
808 | nc = round (row[time] * pix_per_ns) | ||
809 | if nc != cuml: | ||
810 | last_cuml = cuml | ||
811 | cuml = nc | ||
812 | render_seg = True | ||
813 | |||
814 | # if last_cuml > cuml: | ||
815 | # assert fail ... - un-sorted process samples | ||
816 | |||
817 | # draw the trailing rectangle from the last time to | ||
818 | # before now, at the height of the last segment. | ||
819 | if render_seg: | ||
820 | w = math.ceil ((time - last_time) * chart_bounds[2] / proc_tree.duration) + 1 | ||
821 | x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration) | ||
822 | ctx.rectangle (x, below[last_time] - last_cuml, w, last_cuml) | ||
823 | ctx.fill() | ||
824 | # ctx.stroke() | ||
825 | last_time = time | ||
826 | y = below [time] - cuml | ||
827 | |||
828 | row[time] = y | ||
829 | |||
830 | # render the last segment | ||
831 | x = chart_bounds[0] + round((last_time - proc_tree.start_time) * chart_bounds[2] / proc_tree.duration) | ||
832 | y = below[last_time] - cuml | ||
833 | ctx.rectangle (x, y, chart_bounds[2] - x, cuml) | ||
834 | ctx.fill() | ||
835 | # ctx.stroke() | ||
836 | |||
837 | # render legend if it will fit | ||
838 | if cuml > 8: | ||
839 | label = cs.cmd | ||
840 | extnts = ctx.text_extents(label) | ||
841 | label_w = extnts[2] | ||
842 | label_h = extnts[3] | ||
843 | # print "Text extents %g by %g" % (label_w, label_h) | ||
844 | labels.append((label, | ||
845 | chart_bounds[0] + chart_bounds[2] - label_w - off_x * 2, | ||
846 | y + (cuml + label_h) / 2)) | ||
847 | if cs in legends: | ||
848 | print("ARGH - duplicate process in list !") | ||
849 | |||
850 | legends.append ((cs, process_total_time)) | ||
851 | |||
852 | below = row | ||
853 | |||
854 | # render grid-lines over the top | ||
855 | draw_box_ticks(ctx, chart_bounds, sec_w) | ||
856 | |||
857 | # render labels | ||
858 | for l in labels: | ||
859 | draw_text(ctx, l[0], TEXT_COLOR, l[1], l[2]) | ||
860 | |||
861 | # Render legends | ||
862 | font_height = 20 | ||
863 | label_width = 300 | ||
864 | LEGENDS_PER_COL = 15 | ||
865 | LEGENDS_TOTAL = 45 | ||
866 | ctx.set_font_size (TITLE_FONT_SIZE) | ||
867 | dur_secs = duration / 100 | ||
868 | cpu_secs = total_time / 1000000000 | ||
869 | |||
870 | # misleading - with multiple CPUs ... | ||
871 | # idle = ((dur_secs - cpu_secs) / dur_secs) * 100.0 | ||
872 | if stat_type is STAT_TYPE_CPU: | ||
873 | label = "Cumulative CPU usage, by process; total CPU: " \ | ||
874 | " %.5g(s) time: %.3g(s)" % (cpu_secs, dur_secs) | ||
875 | else: | ||
876 | label = "Cumulative I/O usage, by process; total I/O: " \ | ||
877 | " %.5g(s) time: %.3g(s)" % (cpu_secs, dur_secs) | ||
878 | |||
879 | draw_text(ctx, label, TEXT_COLOR, chart_bounds[0] + off_x, | ||
880 | chart_bounds[1] + font_height) | ||
881 | |||
882 | i = 0 | ||
883 | legends = sorted(legends, key=itemgetter(1), reverse=True) | ||
884 | ctx.set_font_size(TEXT_FONT_SIZE) | ||
885 | for t in legends: | ||
886 | cs = t[0] | ||
887 | time = t[1] | ||
888 | x = chart_bounds[0] + off_x + int (i/LEGENDS_PER_COL) * label_width | ||
889 | y = chart_bounds[1] + font_height * ((i % LEGENDS_PER_COL) + 2) | ||
890 | str = "%s - %.0f(ms) (%2.2f%%)" % (cs.cmd, time/1000000, (time/total_time) * 100.0) | ||
891 | draw_legend_box(ctx, str, cs.color, x, y, leg_s) | ||
892 | i = i + 1 | ||
893 | if i >= LEGENDS_TOTAL: | ||
894 | break | ||
diff --git a/scripts/pybootchartgui/pybootchartgui/gui.py b/scripts/pybootchartgui/pybootchartgui/gui.py new file mode 100644 index 0000000000..7fedd232df --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/gui.py | |||
@@ -0,0 +1,350 @@ | |||
1 | # This file is part of pybootchartgui. | ||
2 | |||
3 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation, either version 3 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | |||
8 | # pybootchartgui is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
15 | |||
16 | import gobject | ||
17 | import gtk | ||
18 | import gtk.gdk | ||
19 | import gtk.keysyms | ||
20 | from . import draw | ||
21 | from .draw import RenderOptions | ||
22 | |||
23 | class PyBootchartWidget(gtk.DrawingArea): | ||
24 | __gsignals__ = { | ||
25 | 'expose-event': 'override', | ||
26 | 'clicked' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING, gtk.gdk.Event)), | ||
27 | 'position-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_INT, gobject.TYPE_INT)), | ||
28 | 'set-scroll-adjustments' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gtk.Adjustment, gtk.Adjustment)) | ||
29 | } | ||
30 | |||
31 | def __init__(self, trace, options, xscale): | ||
32 | gtk.DrawingArea.__init__(self) | ||
33 | |||
34 | self.trace = trace | ||
35 | self.options = options | ||
36 | |||
37 | self.set_flags(gtk.CAN_FOCUS) | ||
38 | |||
39 | self.add_events(gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK) | ||
40 | self.connect("button-press-event", self.on_area_button_press) | ||
41 | self.connect("button-release-event", self.on_area_button_release) | ||
42 | self.add_events(gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.POINTER_MOTION_HINT_MASK | gtk.gdk.BUTTON_RELEASE_MASK) | ||
43 | self.connect("motion-notify-event", self.on_area_motion_notify) | ||
44 | self.connect("scroll-event", self.on_area_scroll_event) | ||
45 | self.connect('key-press-event', self.on_key_press_event) | ||
46 | |||
47 | self.connect('set-scroll-adjustments', self.on_set_scroll_adjustments) | ||
48 | self.connect("size-allocate", self.on_allocation_size_changed) | ||
49 | self.connect("position-changed", self.on_position_changed) | ||
50 | |||
51 | self.zoom_ratio = 1.0 | ||
52 | self.xscale = xscale | ||
53 | self.x, self.y = 0.0, 0.0 | ||
54 | |||
55 | self.chart_width, self.chart_height = draw.extents(self.options, self.xscale, self.trace) | ||
56 | self.hadj = None | ||
57 | self.vadj = None | ||
58 | self.hadj_changed_signal_id = None | ||
59 | self.vadj_changed_signal_id = None | ||
60 | |||
61 | def do_expose_event(self, event): | ||
62 | cr = self.window.cairo_create() | ||
63 | |||
64 | # set a clip region for the expose event | ||
65 | cr.rectangle( | ||
66 | event.area.x, event.area.y, | ||
67 | event.area.width, event.area.height | ||
68 | ) | ||
69 | cr.clip() | ||
70 | self.draw(cr, self.get_allocation()) | ||
71 | return False | ||
72 | |||
73 | def draw(self, cr, rect): | ||
74 | cr.set_source_rgba(1.0, 1.0, 1.0, 1.0) | ||
75 | cr.paint() | ||
76 | cr.scale(self.zoom_ratio, self.zoom_ratio) | ||
77 | cr.translate(-self.x, -self.y) | ||
78 | draw.render(cr, self.options, self.xscale, self.trace) | ||
79 | |||
80 | def position_changed(self): | ||
81 | self.emit("position-changed", self.x, self.y) | ||
82 | |||
83 | ZOOM_INCREMENT = 1.25 | ||
84 | |||
85 | def zoom_image (self, zoom_ratio): | ||
86 | self.zoom_ratio = zoom_ratio | ||
87 | self._set_scroll_adjustments (self.hadj, self.vadj) | ||
88 | self.queue_draw() | ||
89 | |||
90 | def zoom_to_rect (self, rect): | ||
91 | zoom_ratio = float(rect.width)/float(self.chart_width) | ||
92 | self.zoom_image(zoom_ratio) | ||
93 | self.x = 0 | ||
94 | self.position_changed() | ||
95 | |||
96 | def set_xscale(self, xscale): | ||
97 | old_mid_x = self.x + self.hadj.page_size / 2 | ||
98 | self.xscale = xscale | ||
99 | self.chart_width, self.chart_height = draw.extents(self.options, self.xscale, self.trace) | ||
100 | new_x = old_mid_x | ||
101 | self.zoom_image (self.zoom_ratio) | ||
102 | |||
103 | def on_expand(self, action): | ||
104 | self.set_xscale (int(self.xscale * 1.5 + 0.5)) | ||
105 | |||
106 | def on_contract(self, action): | ||
107 | self.set_xscale (max(int(self.xscale / 1.5), 1)) | ||
108 | |||
109 | def on_zoom_in(self, action): | ||
110 | self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT) | ||
111 | |||
112 | def on_zoom_out(self, action): | ||
113 | self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT) | ||
114 | |||
115 | def on_zoom_fit(self, action): | ||
116 | self.zoom_to_rect(self.get_allocation()) | ||
117 | |||
118 | def on_zoom_100(self, action): | ||
119 | self.zoom_image(1.0) | ||
120 | self.set_xscale(1.0) | ||
121 | |||
122 | def show_toggled(self, button): | ||
123 | self.options.app_options.show_all = button.get_property ('active') | ||
124 | self.chart_width, self.chart_height = draw.extents(self.options, self.xscale, self.trace) | ||
125 | self._set_scroll_adjustments(self.hadj, self.vadj) | ||
126 | self.queue_draw() | ||
127 | |||
128 | POS_INCREMENT = 100 | ||
129 | |||
130 | def on_key_press_event(self, widget, event): | ||
131 | if event.keyval == gtk.keysyms.Left: | ||
132 | self.x -= self.POS_INCREMENT/self.zoom_ratio | ||
133 | elif event.keyval == gtk.keysyms.Right: | ||
134 | self.x += self.POS_INCREMENT/self.zoom_ratio | ||
135 | elif event.keyval == gtk.keysyms.Up: | ||
136 | self.y -= self.POS_INCREMENT/self.zoom_ratio | ||
137 | elif event.keyval == gtk.keysyms.Down: | ||
138 | self.y += self.POS_INCREMENT/self.zoom_ratio | ||
139 | else: | ||
140 | return False | ||
141 | self.queue_draw() | ||
142 | self.position_changed() | ||
143 | return True | ||
144 | |||
145 | def on_area_button_press(self, area, event): | ||
146 | if event.button == 2 or event.button == 1: | ||
147 | area.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR)) | ||
148 | self.prevmousex = event.x | ||
149 | self.prevmousey = event.y | ||
150 | if event.type not in (gtk.gdk.BUTTON_PRESS, gtk.gdk.BUTTON_RELEASE): | ||
151 | return False | ||
152 | return False | ||
153 | |||
154 | def on_area_button_release(self, area, event): | ||
155 | if event.button == 2 or event.button == 1: | ||
156 | area.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.ARROW)) | ||
157 | self.prevmousex = None | ||
158 | self.prevmousey = None | ||
159 | return True | ||
160 | return False | ||
161 | |||
162 | def on_area_scroll_event(self, area, event): | ||
163 | if event.state & gtk.gdk.CONTROL_MASK: | ||
164 | if event.direction == gtk.gdk.SCROLL_UP: | ||
165 | self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT) | ||
166 | return True | ||
167 | if event.direction == gtk.gdk.SCROLL_DOWN: | ||
168 | self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT) | ||
169 | return True | ||
170 | return False | ||
171 | |||
172 | def on_area_motion_notify(self, area, event): | ||
173 | state = event.state | ||
174 | if state & gtk.gdk.BUTTON2_MASK or state & gtk.gdk.BUTTON1_MASK: | ||
175 | x, y = int(event.x), int(event.y) | ||
176 | # pan the image | ||
177 | self.x += (self.prevmousex - x)/self.zoom_ratio | ||
178 | self.y += (self.prevmousey - y)/self.zoom_ratio | ||
179 | self.queue_draw() | ||
180 | self.prevmousex = x | ||
181 | self.prevmousey = y | ||
182 | self.position_changed() | ||
183 | return True | ||
184 | |||
185 | def on_set_scroll_adjustments(self, area, hadj, vadj): | ||
186 | self._set_scroll_adjustments (hadj, vadj) | ||
187 | |||
188 | def on_allocation_size_changed(self, widget, allocation): | ||
189 | self.hadj.page_size = allocation.width | ||
190 | self.hadj.page_increment = allocation.width * 0.9 | ||
191 | self.vadj.page_size = allocation.height | ||
192 | self.vadj.page_increment = allocation.height * 0.9 | ||
193 | |||
194 | def _set_adj_upper(self, adj, upper): | ||
195 | changed = False | ||
196 | value_changed = False | ||
197 | |||
198 | if adj.upper != upper: | ||
199 | adj.upper = upper | ||
200 | changed = True | ||
201 | |||
202 | max_value = max(0.0, upper - adj.page_size) | ||
203 | if adj.value > max_value: | ||
204 | adj.value = max_value | ||
205 | value_changed = True | ||
206 | |||
207 | if changed: | ||
208 | adj.changed() | ||
209 | if value_changed: | ||
210 | adj.value_changed() | ||
211 | |||
212 | def _set_scroll_adjustments(self, hadj, vadj): | ||
213 | if hadj == None: | ||
214 | hadj = gtk.Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) | ||
215 | if vadj == None: | ||
216 | vadj = gtk.Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) | ||
217 | |||
218 | if self.hadj_changed_signal_id != None and \ | ||
219 | self.hadj != None and hadj != self.hadj: | ||
220 | self.hadj.disconnect (self.hadj_changed_signal_id) | ||
221 | if self.vadj_changed_signal_id != None and \ | ||
222 | self.vadj != None and vadj != self.vadj: | ||
223 | self.vadj.disconnect (self.vadj_changed_signal_id) | ||
224 | |||
225 | if hadj != None: | ||
226 | self.hadj = hadj | ||
227 | self._set_adj_upper (self.hadj, self.zoom_ratio * self.chart_width) | ||
228 | self.hadj_changed_signal_id = self.hadj.connect('value-changed', self.on_adjustments_changed) | ||
229 | |||
230 | if vadj != None: | ||
231 | self.vadj = vadj | ||
232 | self._set_adj_upper (self.vadj, self.zoom_ratio * self.chart_height) | ||
233 | self.vadj_changed_signal_id = self.vadj.connect('value-changed', self.on_adjustments_changed) | ||
234 | |||
235 | def on_adjustments_changed(self, adj): | ||
236 | self.x = self.hadj.value / self.zoom_ratio | ||
237 | self.y = self.vadj.value / self.zoom_ratio | ||
238 | self.queue_draw() | ||
239 | |||
240 | def on_position_changed(self, widget, x, y): | ||
241 | self.hadj.value = x * self.zoom_ratio | ||
242 | self.vadj.value = y * self.zoom_ratio | ||
243 | |||
244 | PyBootchartWidget.set_set_scroll_adjustments_signal('set-scroll-adjustments') | ||
245 | |||
246 | class PyBootchartShell(gtk.VBox): | ||
247 | ui = ''' | ||
248 | <ui> | ||
249 | <toolbar name="ToolBar"> | ||
250 | <toolitem action="Expand"/> | ||
251 | <toolitem action="Contract"/> | ||
252 | <separator/> | ||
253 | <toolitem action="ZoomIn"/> | ||
254 | <toolitem action="ZoomOut"/> | ||
255 | <toolitem action="ZoomFit"/> | ||
256 | <toolitem action="Zoom100"/> | ||
257 | </toolbar> | ||
258 | </ui> | ||
259 | ''' | ||
260 | def __init__(self, window, trace, options, xscale): | ||
261 | gtk.VBox.__init__(self) | ||
262 | |||
263 | self.widget = PyBootchartWidget(trace, options, xscale) | ||
264 | |||
265 | # Create a UIManager instance | ||
266 | uimanager = self.uimanager = gtk.UIManager() | ||
267 | |||
268 | # Add the accelerator group to the toplevel window | ||
269 | accelgroup = uimanager.get_accel_group() | ||
270 | window.add_accel_group(accelgroup) | ||
271 | |||
272 | # Create an ActionGroup | ||
273 | actiongroup = gtk.ActionGroup('Actions') | ||
274 | self.actiongroup = actiongroup | ||
275 | |||
276 | # Create actions | ||
277 | actiongroup.add_actions(( | ||
278 | ('Expand', gtk.STOCK_ADD, None, None, None, self.widget.on_expand), | ||
279 | ('Contract', gtk.STOCK_REMOVE, None, None, None, self.widget.on_contract), | ||
280 | ('ZoomIn', gtk.STOCK_ZOOM_IN, None, None, None, self.widget.on_zoom_in), | ||
281 | ('ZoomOut', gtk.STOCK_ZOOM_OUT, None, None, None, self.widget.on_zoom_out), | ||
282 | ('ZoomFit', gtk.STOCK_ZOOM_FIT, 'Fit Width', None, None, self.widget.on_zoom_fit), | ||
283 | ('Zoom100', gtk.STOCK_ZOOM_100, None, None, None, self.widget.on_zoom_100), | ||
284 | )) | ||
285 | |||
286 | # Add the actiongroup to the uimanager | ||
287 | uimanager.insert_action_group(actiongroup, 0) | ||
288 | |||
289 | # Add a UI description | ||
290 | uimanager.add_ui_from_string(self.ui) | ||
291 | |||
292 | # Scrolled window | ||
293 | scrolled = gtk.ScrolledWindow() | ||
294 | scrolled.add(self.widget) | ||
295 | |||
296 | # toolbar / h-box | ||
297 | hbox = gtk.HBox(False, 8) | ||
298 | |||
299 | # Create a Toolbar | ||
300 | toolbar = uimanager.get_widget('/ToolBar') | ||
301 | hbox.pack_start(toolbar, True, True) | ||
302 | |||
303 | if not options.kernel_only: | ||
304 | # Misc. options | ||
305 | button = gtk.CheckButton("Show more") | ||
306 | button.connect ('toggled', self.widget.show_toggled) | ||
307 | button.set_active(options.app_options.show_all) | ||
308 | hbox.pack_start (button, False, True) | ||
309 | |||
310 | self.pack_start(hbox, False) | ||
311 | self.pack_start(scrolled) | ||
312 | self.show_all() | ||
313 | |||
314 | def grab_focus(self, window): | ||
315 | window.set_focus(self.widget) | ||
316 | |||
317 | |||
318 | class PyBootchartWindow(gtk.Window): | ||
319 | |||
320 | def __init__(self, trace, app_options): | ||
321 | gtk.Window.__init__(self) | ||
322 | |||
323 | window = self | ||
324 | window.set_title("Bootchart %s" % trace.filename) | ||
325 | window.set_default_size(750, 550) | ||
326 | |||
327 | tab_page = gtk.Notebook() | ||
328 | tab_page.show() | ||
329 | window.add(tab_page) | ||
330 | |||
331 | full_opts = RenderOptions(app_options) | ||
332 | full_tree = PyBootchartShell(window, trace, full_opts, 1.0) | ||
333 | tab_page.append_page (full_tree, gtk.Label("Full tree")) | ||
334 | |||
335 | if trace.kernel is not None and len (trace.kernel) > 2: | ||
336 | kernel_opts = RenderOptions(app_options) | ||
337 | kernel_opts.cumulative = False | ||
338 | kernel_opts.charts = False | ||
339 | kernel_opts.kernel_only = True | ||
340 | kernel_tree = PyBootchartShell(window, trace, kernel_opts, 5.0) | ||
341 | tab_page.append_page (kernel_tree, gtk.Label("Kernel boot")) | ||
342 | |||
343 | full_tree.grab_focus(self) | ||
344 | self.show() | ||
345 | |||
346 | |||
347 | def show(trace, options): | ||
348 | win = PyBootchartWindow(trace, options) | ||
349 | win.connect('destroy', gtk.main_quit) | ||
350 | gtk.main() | ||
diff --git a/scripts/pybootchartgui/pybootchartgui/main.py b/scripts/pybootchartgui/pybootchartgui/main.py new file mode 120000 index 0000000000..b45ae0a3d2 --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/main.py | |||
@@ -0,0 +1 @@ | |||
main.py.in \ No newline at end of file | |||
diff --git a/scripts/pybootchartgui/pybootchartgui/main.py.in b/scripts/pybootchartgui/pybootchartgui/main.py.in new file mode 100644 index 0000000000..21bb0be3a7 --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/main.py.in | |||
@@ -0,0 +1,187 @@ | |||
1 | # | ||
2 | # *********************************************************************** | ||
3 | # Warning: This file is auto-generated from main.py.in - edit it there. | ||
4 | # *********************************************************************** | ||
5 | # | ||
6 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation, either version 3 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | |||
11 | # pybootchartgui is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | |||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
18 | |||
19 | from __future__ import print_function | ||
20 | |||
21 | import sys | ||
22 | import os | ||
23 | import optparse | ||
24 | |||
25 | from . import parsing | ||
26 | from . import batch | ||
27 | |||
28 | def _mk_options_parser(): | ||
29 | """Make an options parser.""" | ||
30 | usage = "%prog [options] /path/to/tmp/buildstats/<recipe-machine>/<BUILDNAME>/" | ||
31 | version = "%prog v1.0.0" | ||
32 | parser = optparse.OptionParser(usage, version=version) | ||
33 | parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False, | ||
34 | help="start in active mode") | ||
35 | parser.add_option("-f", "--format", dest="format", default="png", choices=["png", "svg", "pdf"], | ||
36 | help="image format (png, svg, pdf); default format png") | ||
37 | parser.add_option("-o", "--output", dest="output", metavar="PATH", default=None, | ||
38 | help="output path (file or directory) where charts are stored") | ||
39 | parser.add_option("-s", "--split", dest="num", type=int, default=1, | ||
40 | help="split the output chart into <NUM> charts, only works with \"-o PATH\"") | ||
41 | parser.add_option("-m", "--mintime", dest="mintime", type=int, default=8, | ||
42 | help="only tasks longer than this time will be displayed") | ||
43 | parser.add_option("-M", "--minutes", action="store_true", dest="as_minutes", default=False, | ||
44 | help="display time in minutes instead of seconds") | ||
45 | # parser.add_option("-n", "--no-prune", action="store_false", dest="prune", default=True, | ||
46 | # help="do not prune the process tree") | ||
47 | parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False, | ||
48 | help="suppress informational messages") | ||
49 | # parser.add_option("-t", "--boot-time", action="store_true", dest="boottime", default=False, | ||
50 | # help="only display the boot time of the boot in text format (stdout)") | ||
51 | parser.add_option("--very-quiet", action="store_true", dest="veryquiet", default=False, | ||
52 | help="suppress all messages except errors") | ||
53 | parser.add_option("--verbose", action="store_true", dest="verbose", default=False, | ||
54 | help="print all messages") | ||
55 | # parser.add_option("--profile", action="store_true", dest="profile", default=False, | ||
56 | # help="profile rendering of chart (only useful when in batch mode indicated by -f)") | ||
57 | # parser.add_option("--show-pid", action="store_true", dest="show_pid", default=False, | ||
58 | # help="show process ids in the bootchart as 'processname [pid]'") | ||
59 | parser.add_option("--show-all", action="store_true", dest="show_all", default=False, | ||
60 | help="show all processes in the chart") | ||
61 | # parser.add_option("--crop-after", dest="crop_after", metavar="PROCESS", default=None, | ||
62 | # help="crop chart when idle after PROCESS is started") | ||
63 | # parser.add_option("--annotate", action="append", dest="annotate", metavar="PROCESS", default=None, | ||
64 | # help="annotate position where PROCESS is started; can be specified multiple times. " + | ||
65 | # "To create a single annotation when any one of a set of processes is started, use commas to separate the names") | ||
66 | # parser.add_option("--annotate-file", dest="annotate_file", metavar="FILENAME", default=None, | ||
67 | # help="filename to write annotation points to") | ||
68 | parser.add_option("-T", "--full-time", action="store_true", dest="full_time", default=False, | ||
69 | help="display the full time regardless of which processes are currently shown") | ||
70 | return parser | ||
71 | |||
72 | class Writer: | ||
73 | def __init__(self, write, options): | ||
74 | self.write = write | ||
75 | self.options = options | ||
76 | |||
77 | def error(self, msg): | ||
78 | self.write(msg) | ||
79 | |||
80 | def warn(self, msg): | ||
81 | if not self.options.quiet: | ||
82 | self.write(msg) | ||
83 | |||
84 | def info(self, msg): | ||
85 | if self.options.verbose: | ||
86 | self.write(msg) | ||
87 | |||
88 | def status(self, msg): | ||
89 | if not self.options.quiet: | ||
90 | self.write(msg) | ||
91 | |||
92 | def _mk_writer(options): | ||
93 | def write(s): | ||
94 | print(s) | ||
95 | return Writer(write, options) | ||
96 | |||
97 | def _get_filename(path): | ||
98 | """Construct a usable filename for outputs""" | ||
99 | dname = "." | ||
100 | fname = "bootchart" | ||
101 | if path != None: | ||
102 | if os.path.isdir(path): | ||
103 | dname = path | ||
104 | else: | ||
105 | fname = path | ||
106 | return os.path.join(dname, fname) | ||
107 | |||
108 | def main(argv=None): | ||
109 | try: | ||
110 | if argv is None: | ||
111 | argv = sys.argv[1:] | ||
112 | |||
113 | parser = _mk_options_parser() | ||
114 | options, args = parser.parse_args(argv) | ||
115 | |||
116 | # Default values for disabled options | ||
117 | options.prune = True | ||
118 | options.boottime = False | ||
119 | options.profile = False | ||
120 | options.show_pid = False | ||
121 | options.crop_after = None | ||
122 | options.annotate = None | ||
123 | options.annotate_file = None | ||
124 | |||
125 | writer = _mk_writer(options) | ||
126 | |||
127 | if len(args) == 0: | ||
128 | print("No path given, trying /var/log/bootchart.tgz") | ||
129 | args = [ "/var/log/bootchart.tgz" ] | ||
130 | |||
131 | res = parsing.Trace(writer, args, options) | ||
132 | |||
133 | if options.interactive or options.output == None: | ||
134 | from . import gui | ||
135 | gui.show(res, options) | ||
136 | elif options.boottime: | ||
137 | import math | ||
138 | proc_tree = res.proc_tree | ||
139 | if proc_tree.idle: | ||
140 | duration = proc_tree.idle | ||
141 | else: | ||
142 | duration = proc_tree.duration | ||
143 | dur = duration / 100.0 | ||
144 | print('%02d:%05.2f' % (math.floor(dur/60), dur - 60 * math.floor(dur/60))) | ||
145 | else: | ||
146 | if options.annotate_file: | ||
147 | f = open (options.annotate_file, "w") | ||
148 | try: | ||
149 | for time in res[4]: | ||
150 | if time is not None: | ||
151 | # output as ms | ||
152 | print(time * 10, file=f) | ||
153 | else: | ||
154 | print(file=f) | ||
155 | finally: | ||
156 | f.close() | ||
157 | filename = _get_filename(options.output) | ||
158 | res_list = parsing.split_res(res, options) | ||
159 | n = 1 | ||
160 | width = len(str(len(res_list))) | ||
161 | s = "_%%0%dd." % width | ||
162 | for r in res_list: | ||
163 | if len(res_list) == 1: | ||
164 | f = filename + "." + options.format | ||
165 | else: | ||
166 | f = filename + s % n + options.format | ||
167 | n = n + 1 | ||
168 | def render(): | ||
169 | batch.render(writer, r, options, f) | ||
170 | if options.profile: | ||
171 | import cProfile | ||
172 | import pstats | ||
173 | profile = '%s.prof' % os.path.splitext(filename)[0] | ||
174 | cProfile.runctx('render()', globals(), locals(), profile) | ||
175 | p = pstats.Stats(profile) | ||
176 | p.strip_dirs().sort_stats('time').print_stats(20) | ||
177 | else: | ||
178 | render() | ||
179 | |||
180 | return 0 | ||
181 | except parsing.ParseError as ex: | ||
182 | print(("Parse error: %s" % ex)) | ||
183 | return 2 | ||
184 | |||
185 | |||
186 | if __name__ == '__main__': | ||
187 | sys.exit(main()) | ||
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py new file mode 100644 index 0000000000..d423b9f77c --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/parsing.py | |||
@@ -0,0 +1,740 @@ | |||
1 | # This file is part of pybootchartgui. | ||
2 | |||
3 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation, either version 3 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | |||
8 | # pybootchartgui is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
15 | |||
16 | |||
17 | from __future__ import with_statement | ||
18 | |||
19 | import os | ||
20 | import string | ||
21 | import re | ||
22 | import sys | ||
23 | import tarfile | ||
24 | from time import clock | ||
25 | from collections import defaultdict | ||
26 | from functools import reduce | ||
27 | |||
28 | from .samples import * | ||
29 | from .process_tree import ProcessTree | ||
30 | |||
31 | if sys.version_info >= (3, 0): | ||
32 | long = int | ||
33 | |||
34 | # Parsing produces as its end result a 'Trace' | ||
35 | |||
36 | class Trace: | ||
37 | def __init__(self, writer, paths, options): | ||
38 | self.processes = {} | ||
39 | self.start = {} | ||
40 | self.end = {} | ||
41 | self.min = None | ||
42 | self.max = None | ||
43 | self.headers = None | ||
44 | self.disk_stats = None | ||
45 | self.ps_stats = None | ||
46 | self.taskstats = None | ||
47 | self.cpu_stats = None | ||
48 | self.cmdline = None | ||
49 | self.kernel = None | ||
50 | self.kernel_tree = None | ||
51 | self.filename = None | ||
52 | self.parent_map = None | ||
53 | self.mem_stats = None | ||
54 | |||
55 | if len(paths): | ||
56 | parse_paths (writer, self, paths) | ||
57 | if not self.valid(): | ||
58 | raise ParseError("empty state: '%s' does not contain a valid bootchart" % ", ".join(paths)) | ||
59 | |||
60 | if options.full_time: | ||
61 | self.min = min(self.start.keys()) | ||
62 | self.max = max(self.end.keys()) | ||
63 | |||
64 | return | ||
65 | |||
66 | # Turn that parsed information into something more useful | ||
67 | # link processes into a tree of pointers, calculate statistics | ||
68 | self.compile(writer) | ||
69 | |||
70 | # Crop the chart to the end of the first idle period after the given | ||
71 | # process | ||
72 | if options.crop_after: | ||
73 | idle = self.crop (writer, options.crop_after) | ||
74 | else: | ||
75 | idle = None | ||
76 | |||
77 | # Annotate other times as the first start point of given process lists | ||
78 | self.times = [ idle ] | ||
79 | if options.annotate: | ||
80 | for procnames in options.annotate: | ||
81 | names = [x[:15] for x in procnames.split(",")] | ||
82 | for proc in self.ps_stats.process_map.values(): | ||
83 | if proc.cmd in names: | ||
84 | self.times.append(proc.start_time) | ||
85 | break | ||
86 | else: | ||
87 | self.times.append(None) | ||
88 | |||
89 | self.proc_tree = ProcessTree(writer, self.kernel, self.ps_stats, | ||
90 | self.ps_stats.sample_period, | ||
91 | self.headers.get("profile.process"), | ||
92 | options.prune, idle, self.taskstats, | ||
93 | self.parent_map is not None) | ||
94 | |||
95 | if self.kernel is not None: | ||
96 | self.kernel_tree = ProcessTree(writer, self.kernel, None, 0, | ||
97 | self.headers.get("profile.process"), | ||
98 | False, None, None, True) | ||
99 | |||
100 | def valid(self): | ||
101 | return len(self.processes) != 0 | ||
102 | return self.headers != None and self.disk_stats != None and \ | ||
103 | self.ps_stats != None and self.cpu_stats != None | ||
104 | |||
105 | def add_process(self, process, start, end): | ||
106 | self.processes[process] = [start, end] | ||
107 | if start not in self.start: | ||
108 | self.start[start] = [] | ||
109 | if process not in self.start[start]: | ||
110 | self.start[start].append(process) | ||
111 | if end not in self.end: | ||
112 | self.end[end] = [] | ||
113 | if process not in self.end[end]: | ||
114 | self.end[end].append(process) | ||
115 | |||
116 | def compile(self, writer): | ||
117 | |||
118 | def find_parent_id_for(pid): | ||
119 | if pid is 0: | ||
120 | return 0 | ||
121 | ppid = self.parent_map.get(pid) | ||
122 | if ppid: | ||
123 | # many of these double forks are so short lived | ||
124 | # that we have no samples, or process info for them | ||
125 | # so climb the parent hierarcy to find one | ||
126 | if int (ppid * 1000) not in self.ps_stats.process_map: | ||
127 | # print "Pid '%d' short lived with no process" % ppid | ||
128 | ppid = find_parent_id_for (ppid) | ||
129 | # else: | ||
130 | # print "Pid '%d' has an entry" % ppid | ||
131 | else: | ||
132 | # print "Pid '%d' missing from pid map" % pid | ||
133 | return 0 | ||
134 | return ppid | ||
135 | |||
136 | # merge in the cmdline data | ||
137 | if self.cmdline is not None: | ||
138 | for proc in self.ps_stats.process_map.values(): | ||
139 | rpid = int (proc.pid // 1000) | ||
140 | if rpid in self.cmdline: | ||
141 | cmd = self.cmdline[rpid] | ||
142 | proc.exe = cmd['exe'] | ||
143 | proc.args = cmd['args'] | ||
144 | # else: | ||
145 | # print "proc %d '%s' not in cmdline" % (rpid, proc.exe) | ||
146 | |||
147 | # re-parent any stray orphans if we can | ||
148 | if self.parent_map is not None: | ||
149 | for process in self.ps_stats.process_map.values(): | ||
150 | ppid = find_parent_id_for (int(process.pid // 1000)) | ||
151 | if ppid: | ||
152 | process.ppid = ppid * 1000 | ||
153 | |||
154 | # stitch the tree together with pointers | ||
155 | for process in self.ps_stats.process_map.values(): | ||
156 | process.set_parent (self.ps_stats.process_map) | ||
157 | |||
158 | # count on fingers variously | ||
159 | for process in self.ps_stats.process_map.values(): | ||
160 | process.calc_stats (self.ps_stats.sample_period) | ||
161 | |||
162 | def crop(self, writer, crop_after): | ||
163 | |||
164 | def is_idle_at(util, start, j): | ||
165 | k = j + 1 | ||
166 | while k < len(util) and util[k][0] < start + 300: | ||
167 | k += 1 | ||
168 | k = min(k, len(util)-1) | ||
169 | |||
170 | if util[j][1] >= 0.25: | ||
171 | return False | ||
172 | |||
173 | avgload = sum(u[1] for u in util[j:k+1]) / (k-j+1) | ||
174 | if avgload < 0.25: | ||
175 | return True | ||
176 | else: | ||
177 | return False | ||
178 | def is_idle(util, start): | ||
179 | for j in range(0, len(util)): | ||
180 | if util[j][0] < start: | ||
181 | continue | ||
182 | return is_idle_at(util, start, j) | ||
183 | else: | ||
184 | return False | ||
185 | |||
186 | names = [x[:15] for x in crop_after.split(",")] | ||
187 | for proc in self.ps_stats.process_map.values(): | ||
188 | if proc.cmd in names or proc.exe in names: | ||
189 | writer.info("selected proc '%s' from list (start %d)" | ||
190 | % (proc.cmd, proc.start_time)) | ||
191 | break | ||
192 | if proc is None: | ||
193 | writer.warn("no selected crop proc '%s' in list" % crop_after) | ||
194 | |||
195 | |||
196 | cpu_util = [(sample.time, sample.user + sample.sys + sample.io) for sample in self.cpu_stats] | ||
197 | disk_util = [(sample.time, sample.util) for sample in self.disk_stats] | ||
198 | |||
199 | idle = None | ||
200 | for i in range(0, len(cpu_util)): | ||
201 | if cpu_util[i][0] < proc.start_time: | ||
202 | continue | ||
203 | if is_idle_at(cpu_util, cpu_util[i][0], i) \ | ||
204 | and is_idle(disk_util, cpu_util[i][0]): | ||
205 | idle = cpu_util[i][0] | ||
206 | break | ||
207 | |||
208 | if idle is None: | ||
209 | writer.warn ("not idle after proc '%s'" % crop_after) | ||
210 | return None | ||
211 | |||
212 | crop_at = idle + 300 | ||
213 | writer.info ("cropping at time %d" % crop_at) | ||
214 | while len (self.cpu_stats) \ | ||
215 | and self.cpu_stats[-1].time > crop_at: | ||
216 | self.cpu_stats.pop() | ||
217 | while len (self.disk_stats) \ | ||
218 | and self.disk_stats[-1].time > crop_at: | ||
219 | self.disk_stats.pop() | ||
220 | |||
221 | self.ps_stats.end_time = crop_at | ||
222 | |||
223 | cropped_map = {} | ||
224 | for key, value in self.ps_stats.process_map.items(): | ||
225 | if (value.start_time <= crop_at): | ||
226 | cropped_map[key] = value | ||
227 | |||
228 | for proc in cropped_map.values(): | ||
229 | proc.duration = min (proc.duration, crop_at - proc.start_time) | ||
230 | while len (proc.samples) \ | ||
231 | and proc.samples[-1].time > crop_at: | ||
232 | proc.samples.pop() | ||
233 | |||
234 | self.ps_stats.process_map = cropped_map | ||
235 | |||
236 | return idle | ||
237 | |||
238 | |||
239 | |||
240 | class ParseError(Exception): | ||
241 | """Represents errors during parse of the bootchart.""" | ||
242 | def __init__(self, value): | ||
243 | self.value = value | ||
244 | |||
245 | def __str__(self): | ||
246 | return self.value | ||
247 | |||
248 | def _parse_headers(file): | ||
249 | """Parses the headers of the bootchart.""" | ||
250 | def parse(acc, line): | ||
251 | (headers, last) = acc | ||
252 | if '=' in line: | ||
253 | last, value = map (lambda x: x.strip(), line.split('=', 1)) | ||
254 | else: | ||
255 | value = line.strip() | ||
256 | headers[last] += value | ||
257 | return headers, last | ||
258 | return reduce(parse, file.read().decode('utf-8').split('\n'), (defaultdict(str),''))[0] | ||
259 | |||
260 | def _parse_timed_blocks(file): | ||
261 | """Parses (ie., splits) a file into so-called timed-blocks. A | ||
262 | timed-block consists of a timestamp on a line by itself followed | ||
263 | by zero or more lines of data for that point in time.""" | ||
264 | def parse(block): | ||
265 | lines = block.split('\n') | ||
266 | if not lines: | ||
267 | raise ParseError('expected a timed-block consisting a timestamp followed by data lines') | ||
268 | try: | ||
269 | return (int(lines[0]), lines[1:]) | ||
270 | except ValueError: | ||
271 | raise ParseError("expected a timed-block, but timestamp '%s' is not an integer" % lines[0]) | ||
272 | blocks = file.read().decode('utf-8').split('\n\n') | ||
273 | return [parse(block) for block in blocks if block.strip() and not block.endswith(' not running\n')] | ||
274 | |||
275 | def _parse_proc_ps_log(writer, file): | ||
276 | """ | ||
277 | * See proc(5) for details. | ||
278 | * | ||
279 | * {pid, comm, state, ppid, pgrp, session, tty_nr, tpgid, flags, minflt, cminflt, majflt, cmajflt, utime, stime, | ||
280 | * cutime, cstime, priority, nice, 0, itrealvalue, starttime, vsize, rss, rlim, startcode, endcode, startstack, | ||
281 | * kstkesp, kstkeip} | ||
282 | """ | ||
283 | processMap = {} | ||
284 | ltime = 0 | ||
285 | timed_blocks = _parse_timed_blocks(file) | ||
286 | for time, lines in timed_blocks: | ||
287 | for line in lines: | ||
288 | if not line: continue | ||
289 | tokens = line.split(' ') | ||
290 | if len(tokens) < 21: | ||
291 | continue | ||
292 | |||
293 | offset = [index for index, token in enumerate(tokens[1:]) if token[-1] == ')'][0] | ||
294 | pid, cmd, state, ppid = int(tokens[0]), ' '.join(tokens[1:2+offset]), tokens[2+offset], int(tokens[3+offset]) | ||
295 | userCpu, sysCpu, stime = int(tokens[13+offset]), int(tokens[14+offset]), int(tokens[21+offset]) | ||
296 | |||
297 | # magic fixed point-ness ... | ||
298 | pid *= 1000 | ||
299 | ppid *= 1000 | ||
300 | if pid in processMap: | ||
301 | process = processMap[pid] | ||
302 | process.cmd = cmd.strip('()') # why rename after latest name?? | ||
303 | else: | ||
304 | process = Process(writer, pid, cmd.strip('()'), ppid, min(time, stime)) | ||
305 | processMap[pid] = process | ||
306 | |||
307 | if process.last_user_cpu_time is not None and process.last_sys_cpu_time is not None and ltime is not None: | ||
308 | userCpuLoad, sysCpuLoad = process.calc_load(userCpu, sysCpu, max(1, time - ltime)) | ||
309 | cpuSample = CPUSample('null', userCpuLoad, sysCpuLoad, 0.0) | ||
310 | process.samples.append(ProcessSample(time, state, cpuSample)) | ||
311 | |||
312 | process.last_user_cpu_time = userCpu | ||
313 | process.last_sys_cpu_time = sysCpu | ||
314 | ltime = time | ||
315 | |||
316 | if len (timed_blocks) < 2: | ||
317 | return None | ||
318 | |||
319 | startTime = timed_blocks[0][0] | ||
320 | avgSampleLength = (ltime - startTime)/(len (timed_blocks) - 1) | ||
321 | |||
322 | return ProcessStats (writer, processMap, len (timed_blocks), avgSampleLength, startTime, ltime) | ||
323 | |||
324 | def _parse_taskstats_log(writer, file): | ||
325 | """ | ||
326 | * See bootchart-collector.c for details. | ||
327 | * | ||
328 | * { pid, ppid, comm, cpu_run_real_total, blkio_delay_total, swapin_delay_total } | ||
329 | * | ||
330 | """ | ||
331 | processMap = {} | ||
332 | pidRewrites = {} | ||
333 | ltime = None | ||
334 | timed_blocks = _parse_timed_blocks(file) | ||
335 | for time, lines in timed_blocks: | ||
336 | # we have no 'stime' from taskstats, so prep 'init' | ||
337 | if ltime is None: | ||
338 | process = Process(writer, 1, '[init]', 0, 0) | ||
339 | processMap[1000] = process | ||
340 | ltime = time | ||
341 | # continue | ||
342 | for line in lines: | ||
343 | if not line: continue | ||
344 | tokens = line.split(' ') | ||
345 | if len(tokens) != 6: | ||
346 | continue | ||
347 | |||
348 | opid, ppid, cmd = int(tokens[0]), int(tokens[1]), tokens[2] | ||
349 | cpu_ns, blkio_delay_ns, swapin_delay_ns = long(tokens[-3]), long(tokens[-2]), long(tokens[-1]), | ||
350 | |||
351 | # make space for trees of pids | ||
352 | opid *= 1000 | ||
353 | ppid *= 1000 | ||
354 | |||
355 | # when the process name changes, we re-write the pid. | ||
356 | if opid in pidRewrites: | ||
357 | pid = pidRewrites[opid] | ||
358 | else: | ||
359 | pid = opid | ||
360 | |||
361 | cmd = cmd.strip('(').strip(')') | ||
362 | if pid in processMap: | ||
363 | process = processMap[pid] | ||
364 | if process.cmd != cmd: | ||
365 | pid += 1 | ||
366 | pidRewrites[opid] = pid | ||
367 | # print "process mutation ! '%s' vs '%s' pid %s -> pid %s\n" % (process.cmd, cmd, opid, pid) | ||
368 | process = process.split (writer, pid, cmd, ppid, time) | ||
369 | processMap[pid] = process | ||
370 | else: | ||
371 | process.cmd = cmd; | ||
372 | else: | ||
373 | process = Process(writer, pid, cmd, ppid, time) | ||
374 | processMap[pid] = process | ||
375 | |||
376 | delta_cpu_ns = (float) (cpu_ns - process.last_cpu_ns) | ||
377 | delta_blkio_delay_ns = (float) (blkio_delay_ns - process.last_blkio_delay_ns) | ||
378 | delta_swapin_delay_ns = (float) (swapin_delay_ns - process.last_swapin_delay_ns) | ||
379 | |||
380 | # make up some state data ... | ||
381 | if delta_cpu_ns > 0: | ||
382 | state = "R" | ||
383 | elif delta_blkio_delay_ns + delta_swapin_delay_ns > 0: | ||
384 | state = "D" | ||
385 | else: | ||
386 | state = "S" | ||
387 | |||
388 | # retain the ns timing information into a CPUSample - that tries | ||
389 | # with the old-style to be a %age of CPU used in this time-slice. | ||
390 | if delta_cpu_ns + delta_blkio_delay_ns + delta_swapin_delay_ns > 0: | ||
391 | # print "proc %s cpu_ns %g delta_cpu %g" % (cmd, cpu_ns, delta_cpu_ns) | ||
392 | cpuSample = CPUSample('null', delta_cpu_ns, 0.0, | ||
393 | delta_blkio_delay_ns, | ||
394 | delta_swapin_delay_ns) | ||
395 | process.samples.append(ProcessSample(time, state, cpuSample)) | ||
396 | |||
397 | process.last_cpu_ns = cpu_ns | ||
398 | process.last_blkio_delay_ns = blkio_delay_ns | ||
399 | process.last_swapin_delay_ns = swapin_delay_ns | ||
400 | ltime = time | ||
401 | |||
402 | if len (timed_blocks) < 2: | ||
403 | return None | ||
404 | |||
405 | startTime = timed_blocks[0][0] | ||
406 | avgSampleLength = (ltime - startTime)/(len(timed_blocks)-1) | ||
407 | |||
408 | return ProcessStats (writer, processMap, len (timed_blocks), avgSampleLength, startTime, ltime) | ||
409 | |||
410 | def _parse_proc_stat_log(file): | ||
411 | samples = [] | ||
412 | ltimes = None | ||
413 | for time, lines in _parse_timed_blocks(file): | ||
414 | # skip emtpy lines | ||
415 | if not lines: | ||
416 | continue | ||
417 | # CPU times {user, nice, system, idle, io_wait, irq, softirq} | ||
418 | tokens = lines[0].split() | ||
419 | times = [ int(token) for token in tokens[1:] ] | ||
420 | if ltimes: | ||
421 | user = float((times[0] + times[1]) - (ltimes[0] + ltimes[1])) | ||
422 | system = float((times[2] + times[5] + times[6]) - (ltimes[2] + ltimes[5] + ltimes[6])) | ||
423 | idle = float(times[3] - ltimes[3]) | ||
424 | iowait = float(times[4] - ltimes[4]) | ||
425 | |||
426 | aSum = max(user + system + idle + iowait, 1) | ||
427 | samples.append( CPUSample(time, user/aSum, system/aSum, iowait/aSum) ) | ||
428 | |||
429 | ltimes = times | ||
430 | # skip the rest of statistics lines | ||
431 | return samples | ||
432 | |||
433 | def _parse_proc_disk_stat_log(file, numCpu): | ||
434 | """ | ||
435 | Parse file for disk stats, but only look at the whole device, eg. sda, | ||
436 | not sda1, sda2 etc. The format of relevant lines should be: | ||
437 | {major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq} | ||
438 | """ | ||
439 | disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$') | ||
440 | |||
441 | # this gets called an awful lot. | ||
442 | def is_relevant_line(linetokens): | ||
443 | if len(linetokens) != 14: | ||
444 | return False | ||
445 | disk = linetokens[2] | ||
446 | return disk_regex_re.match(disk) | ||
447 | |||
448 | disk_stat_samples = [] | ||
449 | |||
450 | for time, lines in _parse_timed_blocks(file): | ||
451 | sample = DiskStatSample(time) | ||
452 | relevant_tokens = [linetokens for linetokens in map (lambda x: x.split(),lines) if is_relevant_line(linetokens)] | ||
453 | |||
454 | for tokens in relevant_tokens: | ||
455 | disk, rsect, wsect, use = tokens[2], int(tokens[5]), int(tokens[9]), int(tokens[12]) | ||
456 | sample.add_diskdata([rsect, wsect, use]) | ||
457 | |||
458 | disk_stat_samples.append(sample) | ||
459 | |||
460 | disk_stats = [] | ||
461 | for sample1, sample2 in zip(disk_stat_samples[:-1], disk_stat_samples[1:]): | ||
462 | interval = sample1.time - sample2.time | ||
463 | if interval == 0: | ||
464 | interval = 1 | ||
465 | sums = [ a - b for a, b in zip(sample1.diskdata, sample2.diskdata) ] | ||
466 | readTput = sums[0] / 2.0 * 100.0 / interval | ||
467 | writeTput = sums[1] / 2.0 * 100.0 / interval | ||
468 | util = float( sums[2] ) / 10 / interval / numCpu | ||
469 | util = max(0.0, min(1.0, util)) | ||
470 | disk_stats.append(DiskSample(sample2.time, readTput, writeTput, util)) | ||
471 | |||
472 | return disk_stats | ||
473 | |||
474 | def _parse_proc_meminfo_log(file): | ||
475 | """ | ||
476 | Parse file for global memory statistics. | ||
477 | The format of relevant lines should be: ^key: value( unit)? | ||
478 | """ | ||
479 | used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',) | ||
480 | |||
481 | mem_stats = [] | ||
482 | meminfo_re = re.compile(r'([^ \t:]+):\s*(\d+).*') | ||
483 | |||
484 | for time, lines in _parse_timed_blocks(file): | ||
485 | sample = MemSample(time) | ||
486 | |||
487 | for line in lines: | ||
488 | match = meminfo_re.match(line) | ||
489 | if not match: | ||
490 | raise ParseError("Invalid meminfo line \"%s\"" % match.groups(0)) | ||
491 | sample.add_value(match.group(1), int(match.group(2))) | ||
492 | |||
493 | if sample.valid(): | ||
494 | mem_stats.append(sample) | ||
495 | |||
496 | return mem_stats | ||
497 | |||
498 | # if we boot the kernel with: initcall_debug printk.time=1 we can | ||
499 | # get all manner of interesting data from the dmesg output | ||
500 | # We turn this into a pseudo-process tree: each event is | ||
501 | # characterised by a | ||
502 | # we don't try to detect a "kernel finished" state - since the kernel | ||
503 | # continues to do interesting things after init is called. | ||
504 | # | ||
505 | # sample input: | ||
506 | # [ 0.000000] ACPI: FACP 3f4fc000 000F4 (v04 INTEL Napa 00000001 MSFT 01000013) | ||
507 | # ... | ||
508 | # [ 0.039993] calling migration_init+0x0/0x6b @ 1 | ||
509 | # [ 0.039993] initcall migration_init+0x0/0x6b returned 1 after 0 usecs | ||
510 | def _parse_dmesg(writer, file): | ||
511 | timestamp_re = re.compile ("^\[\s*(\d+\.\d+)\s*]\s+(.*)$") | ||
512 | split_re = re.compile ("^(\S+)\s+([\S\+_-]+) (.*)$") | ||
513 | processMap = {} | ||
514 | idx = 0 | ||
515 | inc = 1.0 / 1000000 | ||
516 | kernel = Process(writer, idx, "k-boot", 0, 0.1) | ||
517 | processMap['k-boot'] = kernel | ||
518 | base_ts = False | ||
519 | max_ts = 0 | ||
520 | for line in file.read().decode('utf-8').split('\n'): | ||
521 | t = timestamp_re.match (line) | ||
522 | if t is None: | ||
523 | # print "duff timestamp " + line | ||
524 | continue | ||
525 | |||
526 | time_ms = float (t.group(1)) * 1000 | ||
527 | # looks like we may have a huge diff after the clock | ||
528 | # has been set up. This could lead to huge graph: | ||
529 | # so huge we will be killed by the OOM. | ||
530 | # So instead of using the plain timestamp we will | ||
531 | # use a delta to first one and skip the first one | ||
532 | # for convenience | ||
533 | if max_ts == 0 and not base_ts and time_ms > 1000: | ||
534 | base_ts = time_ms | ||
535 | continue | ||
536 | max_ts = max(time_ms, max_ts) | ||
537 | if base_ts: | ||
538 | # print "fscked clock: used %f instead of %f" % (time_ms - base_ts, time_ms) | ||
539 | time_ms -= base_ts | ||
540 | m = split_re.match (t.group(2)) | ||
541 | |||
542 | if m is None: | ||
543 | continue | ||
544 | # print "match: '%s'" % (m.group(1)) | ||
545 | type = m.group(1) | ||
546 | func = m.group(2) | ||
547 | rest = m.group(3) | ||
548 | |||
549 | if t.group(2).startswith ('Write protecting the') or \ | ||
550 | t.group(2).startswith ('Freeing unused kernel memory'): | ||
551 | kernel.duration = time_ms / 10 | ||
552 | continue | ||
553 | |||
554 | # print "foo: '%s' '%s' '%s'" % (type, func, rest) | ||
555 | if type == "calling": | ||
556 | ppid = kernel.pid | ||
557 | p = re.match ("\@ (\d+)", rest) | ||
558 | if p is not None: | ||
559 | ppid = float (p.group(1)) // 1000 | ||
560 | # print "match: '%s' ('%g') at '%s'" % (func, ppid, time_ms) | ||
561 | name = func.split ('+', 1) [0] | ||
562 | idx += inc | ||
563 | processMap[func] = Process(writer, ppid + idx, name, ppid, time_ms / 10) | ||
564 | elif type == "initcall": | ||
565 | # print "finished: '%s' at '%s'" % (func, time_ms) | ||
566 | if func in processMap: | ||
567 | process = processMap[func] | ||
568 | process.duration = (time_ms / 10) - process.start_time | ||
569 | else: | ||
570 | print("corrupted init call for %s" % (func)) | ||
571 | |||
572 | elif type == "async_waiting" or type == "async_continuing": | ||
573 | continue # ignore | ||
574 | |||
575 | return processMap.values() | ||
576 | |||
577 | # | ||
578 | # Parse binary pacct accounting file output if we have one | ||
579 | # cf. /usr/include/linux/acct.h | ||
580 | # | ||
581 | def _parse_pacct(writer, file): | ||
582 | # read LE int32 | ||
583 | def _read_le_int32(file): | ||
584 | byts = file.read(4) | ||
585 | return (ord(byts[0])) | (ord(byts[1]) << 8) | \ | ||
586 | (ord(byts[2]) << 16) | (ord(byts[3]) << 24) | ||
587 | |||
588 | parent_map = {} | ||
589 | parent_map[0] = 0 | ||
590 | while file.read(1) != "": # ignore flags | ||
591 | ver = file.read(1) | ||
592 | if ord(ver) < 3: | ||
593 | print("Invalid version 0x%x" % (ord(ver))) | ||
594 | return None | ||
595 | |||
596 | file.seek (14, 1) # user, group etc. | ||
597 | pid = _read_le_int32 (file) | ||
598 | ppid = _read_le_int32 (file) | ||
599 | # print "Parent of %d is %d" % (pid, ppid) | ||
600 | parent_map[pid] = ppid | ||
601 | file.seek (4 + 4 + 16, 1) # timings | ||
602 | file.seek (16, 1) # acct_comm | ||
603 | return parent_map | ||
604 | |||
605 | def _parse_paternity_log(writer, file): | ||
606 | parent_map = {} | ||
607 | parent_map[0] = 0 | ||
608 | for line in file.read().decode('utf-8').split('\n'): | ||
609 | if not line: | ||
610 | continue | ||
611 | elems = line.split(' ') # <Child> <Parent> | ||
612 | if len (elems) >= 2: | ||
613 | # print "paternity of %d is %d" % (int(elems[0]), int(elems[1])) | ||
614 | parent_map[int(elems[0])] = int(elems[1]) | ||
615 | else: | ||
616 | print("Odd paternity line '%s'" % (line)) | ||
617 | return parent_map | ||
618 | |||
619 | def _parse_cmdline_log(writer, file): | ||
620 | cmdLines = {} | ||
621 | for block in file.read().decode('utf-8').split('\n\n'): | ||
622 | lines = block.split('\n') | ||
623 | if len (lines) >= 3: | ||
624 | # print "Lines '%s'" % (lines[0]) | ||
625 | pid = int (lines[0]) | ||
626 | values = {} | ||
627 | values['exe'] = lines[1].lstrip(':') | ||
628 | args = lines[2].lstrip(':').split('\0') | ||
629 | args.pop() | ||
630 | values['args'] = args | ||
631 | cmdLines[pid] = values | ||
632 | return cmdLines | ||
633 | |||
634 | def get_num_cpus(headers): | ||
635 | """Get the number of CPUs from the system.cpu header property. As the | ||
636 | CPU utilization graphs are relative, the number of CPUs currently makes | ||
637 | no difference.""" | ||
638 | if headers is None: | ||
639 | return 1 | ||
640 | if headers.get("system.cpu.num"): | ||
641 | return max (int (headers.get("system.cpu.num")), 1) | ||
642 | cpu_model = headers.get("system.cpu") | ||
643 | if cpu_model is None: | ||
644 | return 1 | ||
645 | mat = re.match(".*\\((\\d+)\\)", cpu_model) | ||
646 | if mat is None: | ||
647 | return 1 | ||
648 | return max (int(mat.group(1)), 1) | ||
649 | |||
650 | def _do_parse(writer, state, filename, file): | ||
651 | writer.info("parsing '%s'" % filename) | ||
652 | t1 = clock() | ||
653 | paths = filename.split("/") | ||
654 | task = paths[-1] | ||
655 | pn = paths[-2] | ||
656 | start = None | ||
657 | end = None | ||
658 | for line in file: | ||
659 | if line.startswith("Started:"): | ||
660 | start = int(float(line.split()[-1])) | ||
661 | elif line.startswith("Ended:"): | ||
662 | end = int(float(line.split()[-1])) | ||
663 | if start and end: | ||
664 | state.add_process(pn + ":" + task, start, end) | ||
665 | t2 = clock() | ||
666 | writer.info(" %s seconds" % str(t2-t1)) | ||
667 | return state | ||
668 | |||
669 | def parse_file(writer, state, filename): | ||
670 | if state.filename is None: | ||
671 | state.filename = filename | ||
672 | basename = os.path.basename(filename) | ||
673 | with open(filename, "rb") as file: | ||
674 | return _do_parse(writer, state, filename, file) | ||
675 | |||
676 | def parse_paths(writer, state, paths): | ||
677 | for path in paths: | ||
678 | if state.filename is None: | ||
679 | state.filename = path | ||
680 | root, extension = os.path.splitext(path) | ||
681 | if not(os.path.exists(path)): | ||
682 | writer.warn("warning: path '%s' does not exist, ignoring." % path) | ||
683 | continue | ||
684 | #state.filename = path | ||
685 | if os.path.isdir(path): | ||
686 | files = sorted([os.path.join(path, f) for f in os.listdir(path)]) | ||
687 | state = parse_paths(writer, state, files) | ||
688 | elif extension in [".tar", ".tgz", ".gz"]: | ||
689 | if extension == ".gz": | ||
690 | root, extension = os.path.splitext(root) | ||
691 | if extension != ".tar": | ||
692 | writer.warn("warning: can only handle zipped tar files, not zipped '%s'-files; ignoring" % extension) | ||
693 | continue | ||
694 | tf = None | ||
695 | try: | ||
696 | writer.status("parsing '%s'" % path) | ||
697 | tf = tarfile.open(path, 'r:*') | ||
698 | for name in tf.getnames(): | ||
699 | state = _do_parse(writer, state, name, tf.extractfile(name)) | ||
700 | except tarfile.ReadError as error: | ||
701 | raise ParseError("error: could not read tarfile '%s': %s." % (path, error)) | ||
702 | finally: | ||
703 | if tf != None: | ||
704 | tf.close() | ||
705 | else: | ||
706 | state = parse_file(writer, state, path) | ||
707 | return state | ||
708 | |||
709 | def split_res(res, options): | ||
710 | """ Split the res into n pieces """ | ||
711 | res_list = [] | ||
712 | if options.num > 1: | ||
713 | s_list = sorted(res.start.keys()) | ||
714 | frag_size = len(s_list) / float(options.num) | ||
715 | # Need the top value | ||
716 | if frag_size > int(frag_size): | ||
717 | frag_size = int(frag_size + 1) | ||
718 | else: | ||
719 | frag_size = int(frag_size) | ||
720 | |||
721 | start = 0 | ||
722 | end = frag_size | ||
723 | while start < end: | ||
724 | state = Trace(None, [], None) | ||
725 | if options.full_time: | ||
726 | state.min = min(res.start.keys()) | ||
727 | state.max = max(res.end.keys()) | ||
728 | for i in range(start, end): | ||
729 | # Add this line for reference | ||
730 | #state.add_process(pn + ":" + task, start, end) | ||
731 | for p in res.start[s_list[i]]: | ||
732 | state.add_process(p, s_list[i], res.processes[p][1]) | ||
733 | start = end | ||
734 | end = end + frag_size | ||
735 | if end > len(s_list): | ||
736 | end = len(s_list) | ||
737 | res_list.append(state) | ||
738 | else: | ||
739 | res_list.append(res) | ||
740 | return res_list | ||
diff --git a/scripts/pybootchartgui/pybootchartgui/process_tree.py b/scripts/pybootchartgui/pybootchartgui/process_tree.py new file mode 100644 index 0000000000..cf88110b1c --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/process_tree.py | |||
@@ -0,0 +1,292 @@ | |||
1 | # This file is part of pybootchartgui. | ||
2 | |||
3 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation, either version 3 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | |||
8 | # pybootchartgui is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
15 | |||
16 | class ProcessTree: | ||
17 | """ProcessTree encapsulates a process tree. The tree is built from log files | ||
18 | retrieved during the boot process. When building the process tree, it is | ||
19 | pruned and merged in order to be able to visualize it in a comprehensible | ||
20 | manner. | ||
21 | |||
22 | The following pruning techniques are used: | ||
23 | |||
24 | * idle processes that keep running during the last process sample | ||
25 | (which is a heuristic for a background processes) are removed, | ||
26 | * short-lived processes (i.e. processes that only live for the | ||
27 | duration of two samples or less) are removed, | ||
28 | * the processes used by the boot logger are removed, | ||
29 | * exploders (i.e. processes that are known to spawn huge meaningless | ||
30 | process subtrees) have their subtrees merged together, | ||
31 | * siblings (i.e. processes with the same command line living | ||
32 | concurrently -- thread heuristic) are merged together, | ||
33 | * process runs (unary trees with processes sharing the command line) | ||
34 | are merged together. | ||
35 | |||
36 | """ | ||
37 | LOGGER_PROC = 'bootchart-colle' | ||
38 | EXPLODER_PROCESSES = set(['hwup']) | ||
39 | |||
40 | def __init__(self, writer, kernel, psstats, sample_period, | ||
41 | monitoredApp, prune, idle, taskstats, | ||
42 | accurate_parentage, for_testing = False): | ||
43 | self.writer = writer | ||
44 | self.process_tree = [] | ||
45 | self.taskstats = taskstats | ||
46 | if psstats is None: | ||
47 | process_list = kernel | ||
48 | elif kernel is None: | ||
49 | process_list = psstats.process_map.values() | ||
50 | else: | ||
51 | process_list = list(kernel) + list(psstats.process_map.values()) | ||
52 | self.process_list = sorted(process_list, key = lambda p: p.pid) | ||
53 | self.sample_period = sample_period | ||
54 | |||
55 | self.build() | ||
56 | if not accurate_parentage: | ||
57 | self.update_ppids_for_daemons(self.process_list) | ||
58 | |||
59 | self.start_time = self.get_start_time(self.process_tree) | ||
60 | self.end_time = self.get_end_time(self.process_tree) | ||
61 | self.duration = self.end_time - self.start_time | ||
62 | self.idle = idle | ||
63 | |||
64 | if for_testing: | ||
65 | return | ||
66 | |||
67 | removed = self.merge_logger(self.process_tree, self.LOGGER_PROC, monitoredApp, False) | ||
68 | writer.status("merged %i logger processes" % removed) | ||
69 | |||
70 | if prune: | ||
71 | p_processes = self.prune(self.process_tree, None) | ||
72 | p_exploders = self.merge_exploders(self.process_tree, self.EXPLODER_PROCESSES) | ||
73 | p_threads = self.merge_siblings(self.process_tree) | ||
74 | p_runs = self.merge_runs(self.process_tree) | ||
75 | writer.status("pruned %i process, %i exploders, %i threads, and %i runs" % (p_processes, p_exploders, p_threads, p_runs)) | ||
76 | |||
77 | self.sort(self.process_tree) | ||
78 | |||
79 | self.start_time = self.get_start_time(self.process_tree) | ||
80 | self.end_time = self.get_end_time(self.process_tree) | ||
81 | self.duration = self.end_time - self.start_time | ||
82 | |||
83 | self.num_proc = self.num_nodes(self.process_tree) | ||
84 | |||
85 | def build(self): | ||
86 | """Build the process tree from the list of top samples.""" | ||
87 | self.process_tree = [] | ||
88 | for proc in self.process_list: | ||
89 | if not proc.parent: | ||
90 | self.process_tree.append(proc) | ||
91 | else: | ||
92 | proc.parent.child_list.append(proc) | ||
93 | |||
94 | def sort(self, process_subtree): | ||
95 | """Sort process tree.""" | ||
96 | for p in process_subtree: | ||
97 | p.child_list.sort(key = lambda p: p.pid) | ||
98 | self.sort(p.child_list) | ||
99 | |||
100 | def num_nodes(self, process_list): | ||
101 | "Counts the number of nodes in the specified process tree.""" | ||
102 | nodes = 0 | ||
103 | for proc in process_list: | ||
104 | nodes = nodes + self.num_nodes(proc.child_list) | ||
105 | return nodes + len(process_list) | ||
106 | |||
107 | def get_start_time(self, process_subtree): | ||
108 | """Returns the start time of the process subtree. This is the start | ||
109 | time of the earliest process. | ||
110 | |||
111 | """ | ||
112 | if not process_subtree: | ||
113 | return 100000000 | ||
114 | return min( [min(proc.start_time, self.get_start_time(proc.child_list)) for proc in process_subtree] ) | ||
115 | |||
116 | def get_end_time(self, process_subtree): | ||
117 | """Returns the end time of the process subtree. This is the end time | ||
118 | of the last collected sample. | ||
119 | |||
120 | """ | ||
121 | if not process_subtree: | ||
122 | return -100000000 | ||
123 | return max( [max(proc.start_time + proc.duration, self.get_end_time(proc.child_list)) for proc in process_subtree] ) | ||
124 | |||
125 | def get_max_pid(self, process_subtree): | ||
126 | """Returns the max PID found in the process tree.""" | ||
127 | if not process_subtree: | ||
128 | return -100000000 | ||
129 | return max( [max(proc.pid, self.get_max_pid(proc.child_list)) for proc in process_subtree] ) | ||
130 | |||
131 | def update_ppids_for_daemons(self, process_list): | ||
132 | """Fedora hack: when loading the system services from rc, runuser(1) | ||
133 | is used. This sets the PPID of all daemons to 1, skewing | ||
134 | the process tree. Try to detect this and set the PPID of | ||
135 | these processes the PID of rc. | ||
136 | |||
137 | """ | ||
138 | rcstartpid = -1 | ||
139 | rcendpid = -1 | ||
140 | rcproc = None | ||
141 | for p in process_list: | ||
142 | if p.cmd == "rc" and p.ppid // 1000 == 1: | ||
143 | rcproc = p | ||
144 | rcstartpid = p.pid | ||
145 | rcendpid = self.get_max_pid(p.child_list) | ||
146 | if rcstartpid != -1 and rcendpid != -1: | ||
147 | for p in process_list: | ||
148 | if p.pid > rcstartpid and p.pid < rcendpid and p.ppid // 1000 == 1: | ||
149 | p.ppid = rcstartpid | ||
150 | p.parent = rcproc | ||
151 | for p in process_list: | ||
152 | p.child_list = [] | ||
153 | self.build() | ||
154 | |||
155 | def prune(self, process_subtree, parent): | ||
156 | """Prunes the process tree by removing idle processes and processes | ||
157 | that only live for the duration of a single top sample. Sibling | ||
158 | processes with the same command line (i.e. threads) are merged | ||
159 | together. This filters out sleepy background processes, short-lived | ||
160 | processes and bootcharts' analysis tools. | ||
161 | """ | ||
162 | def is_idle_background_process_without_children(p): | ||
163 | process_end = p.start_time + p.duration | ||
164 | return not p.active and \ | ||
165 | process_end >= self.start_time + self.duration and \ | ||
166 | p.start_time > self.start_time and \ | ||
167 | p.duration > 0.9 * self.duration and \ | ||
168 | self.num_nodes(p.child_list) == 0 | ||
169 | |||
170 | num_removed = 0 | ||
171 | idx = 0 | ||
172 | while idx < len(process_subtree): | ||
173 | p = process_subtree[idx] | ||
174 | if parent != None or len(p.child_list) == 0: | ||
175 | |||
176 | prune = False | ||
177 | if is_idle_background_process_without_children(p): | ||
178 | prune = True | ||
179 | elif p.duration <= 2 * self.sample_period: | ||
180 | # short-lived process | ||
181 | prune = True | ||
182 | |||
183 | if prune: | ||
184 | process_subtree.pop(idx) | ||
185 | for c in p.child_list: | ||
186 | process_subtree.insert(idx, c) | ||
187 | num_removed += 1 | ||
188 | continue | ||
189 | else: | ||
190 | num_removed += self.prune(p.child_list, p) | ||
191 | else: | ||
192 | num_removed += self.prune(p.child_list, p) | ||
193 | idx += 1 | ||
194 | |||
195 | return num_removed | ||
196 | |||
197 | def merge_logger(self, process_subtree, logger_proc, monitored_app, app_tree): | ||
198 | """Merges the logger's process subtree. The logger will typically | ||
199 | spawn lots of sleep and cat processes, thus polluting the | ||
200 | process tree. | ||
201 | |||
202 | """ | ||
203 | num_removed = 0 | ||
204 | for p in process_subtree: | ||
205 | is_app_tree = app_tree | ||
206 | if logger_proc == p.cmd and not app_tree: | ||
207 | is_app_tree = True | ||
208 | num_removed += self.merge_logger(p.child_list, logger_proc, monitored_app, is_app_tree) | ||
209 | # don't remove the logger itself | ||
210 | continue | ||
211 | |||
212 | if app_tree and monitored_app != None and monitored_app == p.cmd: | ||
213 | is_app_tree = False | ||
214 | |||
215 | if is_app_tree: | ||
216 | for child in p.child_list: | ||
217 | self.merge_processes(p, child) | ||
218 | num_removed += 1 | ||
219 | p.child_list = [] | ||
220 | else: | ||
221 | num_removed += self.merge_logger(p.child_list, logger_proc, monitored_app, is_app_tree) | ||
222 | return num_removed | ||
223 | |||
224 | def merge_exploders(self, process_subtree, processes): | ||
225 | """Merges specific process subtrees (used for processes which usually | ||
226 | spawn huge meaningless process trees). | ||
227 | |||
228 | """ | ||
229 | num_removed = 0 | ||
230 | for p in process_subtree: | ||
231 | if processes in processes and len(p.child_list) > 0: | ||
232 | subtreemap = self.getProcessMap(p.child_list) | ||
233 | for child in subtreemap.values(): | ||
234 | self.merge_processes(p, child) | ||
235 | num_removed += len(subtreemap) | ||
236 | p.child_list = [] | ||
237 | p.cmd += " (+)" | ||
238 | else: | ||
239 | num_removed += self.merge_exploders(p.child_list, processes) | ||
240 | return num_removed | ||
241 | |||
242 | def merge_siblings(self, process_subtree): | ||
243 | """Merges thread processes. Sibling processes with the same command | ||
244 | line are merged together. | ||
245 | |||
246 | """ | ||
247 | num_removed = 0 | ||
248 | idx = 0 | ||
249 | while idx < len(process_subtree)-1: | ||
250 | p = process_subtree[idx] | ||
251 | nextp = process_subtree[idx+1] | ||
252 | if nextp.cmd == p.cmd: | ||
253 | process_subtree.pop(idx+1) | ||
254 | idx -= 1 | ||
255 | num_removed += 1 | ||
256 | p.child_list.extend(nextp.child_list) | ||
257 | self.merge_processes(p, nextp) | ||
258 | num_removed += self.merge_siblings(p.child_list) | ||
259 | idx += 1 | ||
260 | if len(process_subtree) > 0: | ||
261 | p = process_subtree[-1] | ||
262 | num_removed += self.merge_siblings(p.child_list) | ||
263 | return num_removed | ||
264 | |||
265 | def merge_runs(self, process_subtree): | ||
266 | """Merges process runs. Single child processes which share the same | ||
267 | command line with the parent are merged. | ||
268 | |||
269 | """ | ||
270 | num_removed = 0 | ||
271 | idx = 0 | ||
272 | while idx < len(process_subtree): | ||
273 | p = process_subtree[idx] | ||
274 | if len(p.child_list) == 1 and p.child_list[0].cmd == p.cmd: | ||
275 | child = p.child_list[0] | ||
276 | p.child_list = list(child.child_list) | ||
277 | self.merge_processes(p, child) | ||
278 | num_removed += 1 | ||
279 | continue | ||
280 | num_removed += self.merge_runs(p.child_list) | ||
281 | idx += 1 | ||
282 | return num_removed | ||
283 | |||
284 | def merge_processes(self, p1, p2): | ||
285 | """Merges two process' samples.""" | ||
286 | p1.samples.extend(p2.samples) | ||
287 | p1.samples.sort( key = lambda p: p.time ) | ||
288 | p1time = p1.start_time | ||
289 | p2time = p2.start_time | ||
290 | p1.start_time = min(p1time, p2time) | ||
291 | pendtime = max(p1time + p1.duration, p2time + p2.duration) | ||
292 | p1.duration = pendtime - p1.start_time | ||
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py new file mode 100644 index 0000000000..015d743aa0 --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/samples.py | |||
@@ -0,0 +1,151 @@ | |||
1 | # This file is part of pybootchartgui. | ||
2 | |||
3 | # pybootchartgui is free software: you can redistribute it and/or modify | ||
4 | # it under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation, either version 3 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | |||
8 | # pybootchartgui is distributed in the hope that it will be useful, | ||
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | # GNU General Public License for more details. | ||
12 | |||
13 | # You should have received a copy of the GNU General Public License | ||
14 | # along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>. | ||
15 | |||
16 | |||
17 | class DiskStatSample: | ||
18 | def __init__(self, time): | ||
19 | self.time = time | ||
20 | self.diskdata = [0, 0, 0] | ||
21 | def add_diskdata(self, new_diskdata): | ||
22 | self.diskdata = [ a + b for a, b in zip(self.diskdata, new_diskdata) ] | ||
23 | |||
24 | class CPUSample: | ||
25 | def __init__(self, time, user, sys, io = 0.0, swap = 0.0): | ||
26 | self.time = time | ||
27 | self.user = user | ||
28 | self.sys = sys | ||
29 | self.io = io | ||
30 | self.swap = swap | ||
31 | |||
32 | @property | ||
33 | def cpu(self): | ||
34 | return self.user + self.sys | ||
35 | |||
36 | def __str__(self): | ||
37 | return str(self.time) + "\t" + str(self.user) + "\t" + \ | ||
38 | str(self.sys) + "\t" + str(self.io) + "\t" + str (self.swap) | ||
39 | |||
40 | class MemSample: | ||
41 | used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',) | ||
42 | |||
43 | def __init__(self, time): | ||
44 | self.time = time | ||
45 | self.records = {} | ||
46 | |||
47 | def add_value(self, name, value): | ||
48 | if name in MemSample.used_values: | ||
49 | self.records[name] = value | ||
50 | |||
51 | def valid(self): | ||
52 | keys = self.records.keys() | ||
53 | # discard incomplete samples | ||
54 | return [v for v in MemSample.used_values if v not in keys] == [] | ||
55 | |||
56 | class ProcessSample: | ||
57 | def __init__(self, time, state, cpu_sample): | ||
58 | self.time = time | ||
59 | self.state = state | ||
60 | self.cpu_sample = cpu_sample | ||
61 | |||
62 | def __str__(self): | ||
63 | return str(self.time) + "\t" + str(self.state) + "\t" + str(self.cpu_sample) | ||
64 | |||
65 | class ProcessStats: | ||
66 | def __init__(self, writer, process_map, sample_count, sample_period, start_time, end_time): | ||
67 | self.process_map = process_map | ||
68 | self.sample_count = sample_count | ||
69 | self.sample_period = sample_period | ||
70 | self.start_time = start_time | ||
71 | self.end_time = end_time | ||
72 | writer.info ("%d samples, avg. sample length %f" % (self.sample_count, self.sample_period)) | ||
73 | writer.info ("process list size: %d" % len (self.process_map.values())) | ||
74 | |||
75 | class Process: | ||
76 | def __init__(self, writer, pid, cmd, ppid, start_time): | ||
77 | self.writer = writer | ||
78 | self.pid = pid | ||
79 | self.cmd = cmd | ||
80 | self.exe = cmd | ||
81 | self.args = [] | ||
82 | self.ppid = ppid | ||
83 | self.start_time = start_time | ||
84 | self.duration = 0 | ||
85 | self.samples = [] | ||
86 | self.parent = None | ||
87 | self.child_list = [] | ||
88 | |||
89 | self.active = None | ||
90 | self.last_user_cpu_time = None | ||
91 | self.last_sys_cpu_time = None | ||
92 | |||
93 | self.last_cpu_ns = 0 | ||
94 | self.last_blkio_delay_ns = 0 | ||
95 | self.last_swapin_delay_ns = 0 | ||
96 | |||
97 | # split this process' run - triggered by a name change | ||
98 | def split(self, writer, pid, cmd, ppid, start_time): | ||
99 | split = Process (writer, pid, cmd, ppid, start_time) | ||
100 | |||
101 | split.last_cpu_ns = self.last_cpu_ns | ||
102 | split.last_blkio_delay_ns = self.last_blkio_delay_ns | ||
103 | split.last_swapin_delay_ns = self.last_swapin_delay_ns | ||
104 | |||
105 | return split | ||
106 | |||
107 | def __str__(self): | ||
108 | return " ".join([str(self.pid), self.cmd, str(self.ppid), '[ ' + str(len(self.samples)) + ' samples ]' ]) | ||
109 | |||
110 | def calc_stats(self, samplePeriod): | ||
111 | if self.samples: | ||
112 | firstSample = self.samples[0] | ||
113 | lastSample = self.samples[-1] | ||
114 | self.start_time = min(firstSample.time, self.start_time) | ||
115 | self.duration = lastSample.time - self.start_time + samplePeriod | ||
116 | |||
117 | activeCount = sum( [1 for sample in self.samples if sample.cpu_sample and sample.cpu_sample.sys + sample.cpu_sample.user + sample.cpu_sample.io > 0.0] ) | ||
118 | activeCount = activeCount + sum( [1 for sample in self.samples if sample.state == 'D'] ) | ||
119 | self.active = (activeCount>2) | ||
120 | |||
121 | def calc_load(self, userCpu, sysCpu, interval): | ||
122 | userCpuLoad = float(userCpu - self.last_user_cpu_time) / interval | ||
123 | sysCpuLoad = float(sysCpu - self.last_sys_cpu_time) / interval | ||
124 | cpuLoad = userCpuLoad + sysCpuLoad | ||
125 | # normalize | ||
126 | if cpuLoad > 1.0: | ||
127 | userCpuLoad = userCpuLoad / cpuLoad | ||
128 | sysCpuLoad = sysCpuLoad / cpuLoad | ||
129 | return (userCpuLoad, sysCpuLoad) | ||
130 | |||
131 | def set_parent(self, processMap): | ||
132 | if self.ppid != None: | ||
133 | self.parent = processMap.get (self.ppid) | ||
134 | if self.parent == None and self.pid // 1000 > 1 and \ | ||
135 | not (self.ppid == 2000 or self.pid == 2000): # kernel threads: ppid=2 | ||
136 | self.writer.warn("Missing CONFIG_PROC_EVENTS: no parent for pid '%i' ('%s') with ppid '%i'" \ | ||
137 | % (self.pid,self.cmd,self.ppid)) | ||
138 | |||
139 | def get_end_time(self): | ||
140 | return self.start_time + self.duration | ||
141 | |||
142 | class DiskSample: | ||
143 | def __init__(self, time, read, write, util): | ||
144 | self.time = time | ||
145 | self.read = read | ||
146 | self.write = write | ||
147 | self.util = util | ||
148 | self.tput = read + write | ||
149 | |||
150 | def __str__(self): | ||
151 | return "\t".join([str(self.time), str(self.read), str(self.write), str(self.util)]) | ||
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py new file mode 100644 index 0000000000..00fb3bf797 --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/tests/parser_test.py | |||
@@ -0,0 +1,105 @@ | |||
1 | import sys, os, re, struct, operator, math | ||
2 | from collections import defaultdict | ||
3 | import unittest | ||
4 | |||
5 | sys.path.insert(0, os.getcwd()) | ||
6 | |||
7 | import pybootchartgui.parsing as parsing | ||
8 | import pybootchartgui.main as main | ||
9 | |||
10 | debug = False | ||
11 | |||
12 | def floatEq(f1, f2): | ||
13 | return math.fabs(f1-f2) < 0.00001 | ||
14 | |||
15 | bootchart_dir = os.path.join(os.path.dirname(sys.argv[0]), '../../examples/1/') | ||
16 | parser = main._mk_options_parser() | ||
17 | options, args = parser.parse_args(['--q', bootchart_dir]) | ||
18 | writer = main._mk_writer(options) | ||
19 | |||
20 | class TestBCParser(unittest.TestCase): | ||
21 | |||
22 | def setUp(self): | ||
23 | self.name = "My first unittest" | ||
24 | self.rootdir = bootchart_dir | ||
25 | |||
26 | def mk_fname(self,f): | ||
27 | return os.path.join(self.rootdir, f) | ||
28 | |||
29 | def testParseHeader(self): | ||
30 | trace = parsing.Trace(writer, args, options) | ||
31 | state = parsing.parse_file(writer, trace, self.mk_fname('header')) | ||
32 | self.assertEqual(6, len(state.headers)) | ||
33 | self.assertEqual(2, parsing.get_num_cpus(state.headers)) | ||
34 | |||
35 | def test_parseTimedBlocks(self): | ||
36 | trace = parsing.Trace(writer, args, options) | ||
37 | state = parsing.parse_file(writer, trace, self.mk_fname('proc_diskstats.log')) | ||
38 | self.assertEqual(141, len(state.disk_stats)) | ||
39 | |||
40 | def testParseProcPsLog(self): | ||
41 | trace = parsing.Trace(writer, args, options) | ||
42 | state = parsing.parse_file(writer, trace, self.mk_fname('proc_ps.log')) | ||
43 | samples = state.ps_stats | ||
44 | processes = samples.process_map | ||
45 | sorted_processes = [processes[k] for k in sorted(processes.keys())] | ||
46 | |||
47 | ps_data = open(self.mk_fname('extract2.proc_ps.log')) | ||
48 | for index, line in enumerate(ps_data): | ||
49 | tokens = line.split(); | ||
50 | process = sorted_processes[index] | ||
51 | if debug: | ||
52 | print(tokens[0:4]) | ||
53 | print(process.pid / 1000, process.cmd, process.ppid, len(process.samples)) | ||
54 | print('-------------------') | ||
55 | |||
56 | self.assertEqual(tokens[0], str(process.pid // 1000)) | ||
57 | self.assertEqual(tokens[1], str(process.cmd)) | ||
58 | self.assertEqual(tokens[2], str(process.ppid // 1000)) | ||
59 | self.assertEqual(tokens[3], str(len(process.samples))) | ||
60 | ps_data.close() | ||
61 | |||
62 | def testparseProcDiskStatLog(self): | ||
63 | trace = parsing.Trace(writer, args, options) | ||
64 | state_with_headers = parsing.parse_file(writer, trace, self.mk_fname('header')) | ||
65 | state_with_headers.headers['system.cpu'] = 'xxx (2)' | ||
66 | samples = parsing.parse_file(writer, state_with_headers, self.mk_fname('proc_diskstats.log')).disk_stats | ||
67 | self.assertEqual(141, len(samples)) | ||
68 | |||
69 | diskstats_data = open(self.mk_fname('extract.proc_diskstats.log')) | ||
70 | for index, line in enumerate(diskstats_data): | ||
71 | tokens = line.split('\t') | ||
72 | sample = samples[index] | ||
73 | if debug: | ||
74 | print(line.rstrip()) | ||
75 | print(sample) | ||
76 | print('-------------------') | ||
77 | |||
78 | self.assertEqual(tokens[0], str(sample.time)) | ||
79 | self.assert_(floatEq(float(tokens[1]), sample.read)) | ||
80 | self.assert_(floatEq(float(tokens[2]), sample.write)) | ||
81 | self.assert_(floatEq(float(tokens[3]), sample.util)) | ||
82 | diskstats_data.close() | ||
83 | |||
84 | def testparseProcStatLog(self): | ||
85 | trace = parsing.Trace(writer, args, options) | ||
86 | samples = parsing.parse_file(writer, trace, self.mk_fname('proc_stat.log')).cpu_stats | ||
87 | self.assertEqual(141, len(samples)) | ||
88 | |||
89 | stat_data = open(self.mk_fname('extract.proc_stat.log')) | ||
90 | for index, line in enumerate(stat_data): | ||
91 | tokens = line.split('\t') | ||
92 | sample = samples[index] | ||
93 | if debug: | ||
94 | print(line.rstrip()) | ||
95 | print(sample) | ||
96 | print('-------------------') | ||
97 | self.assert_(floatEq(float(tokens[0]), sample.time)) | ||
98 | self.assert_(floatEq(float(tokens[1]), sample.user)) | ||
99 | self.assert_(floatEq(float(tokens[2]), sample.sys)) | ||
100 | self.assert_(floatEq(float(tokens[3]), sample.io)) | ||
101 | stat_data.close() | ||
102 | |||
103 | if __name__ == '__main__': | ||
104 | unittest.main() | ||
105 | |||
diff --git a/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py new file mode 100644 index 0000000000..6f46a1c03d --- /dev/null +++ b/scripts/pybootchartgui/pybootchartgui/tests/process_tree_test.py | |||
@@ -0,0 +1,92 @@ | |||
1 | import sys | ||
2 | import os | ||
3 | import unittest | ||
4 | |||
5 | sys.path.insert(0, os.getcwd()) | ||
6 | |||
7 | import pybootchartgui.parsing as parsing | ||
8 | import pybootchartgui.process_tree as process_tree | ||
9 | import pybootchartgui.main as main | ||
10 | |||
11 | if sys.version_info >= (3, 0): | ||
12 | long = int | ||
13 | |||
14 | class TestProcessTree(unittest.TestCase): | ||
15 | |||
16 | def setUp(self): | ||
17 | self.name = "Process tree unittest" | ||
18 | self.rootdir = os.path.join(os.path.dirname(sys.argv[0]), '../../examples/1/') | ||
19 | |||
20 | parser = main._mk_options_parser() | ||
21 | options, args = parser.parse_args(['--q', self.rootdir]) | ||
22 | writer = main._mk_writer(options) | ||
23 | trace = parsing.Trace(writer, args, options) | ||
24 | |||
25 | parsing.parse_file(writer, trace, self.mk_fname('proc_ps.log')) | ||
26 | trace.compile(writer) | ||
27 | self.processtree = process_tree.ProcessTree(writer, None, trace.ps_stats, \ | ||
28 | trace.ps_stats.sample_period, None, options.prune, None, None, False, for_testing = True) | ||
29 | |||
30 | def mk_fname(self,f): | ||
31 | return os.path.join(self.rootdir, f) | ||
32 | |||
33 | def flatten(self, process_tree): | ||
34 | flattened = [] | ||
35 | for p in process_tree: | ||
36 | flattened.append(p) | ||
37 | flattened.extend(self.flatten(p.child_list)) | ||
38 | return flattened | ||
39 | |||
40 | def checkAgainstJavaExtract(self, filename, process_tree): | ||
41 | test_data = open(filename) | ||
42 | for expected, actual in zip(test_data, self.flatten(process_tree)): | ||
43 | tokens = expected.split('\t') | ||
44 | self.assertEqual(int(tokens[0]), actual.pid // 1000) | ||
45 | self.assertEqual(tokens[1], actual.cmd) | ||
46 | self.assertEqual(long(tokens[2]), 10 * actual.start_time) | ||
47 | self.assert_(long(tokens[3]) - 10 * actual.duration < 5, "duration") | ||
48 | self.assertEqual(int(tokens[4]), len(actual.child_list)) | ||
49 | self.assertEqual(int(tokens[5]), len(actual.samples)) | ||
50 | test_data.close() | ||
51 | |||
52 | def testBuild(self): | ||
53 | process_tree = self.processtree.process_tree | ||
54 | self.checkAgainstJavaExtract(self.mk_fname('extract.processtree.1.log'), process_tree) | ||
55 | |||
56 | def testMergeLogger(self): | ||
57 | self.processtree.merge_logger(self.processtree.process_tree, 'bootchartd', None, False) | ||
58 | process_tree = self.processtree.process_tree | ||
59 | self.checkAgainstJavaExtract(self.mk_fname('extract.processtree.2.log'), process_tree) | ||
60 | |||
61 | def testPrune(self): | ||
62 | self.processtree.merge_logger(self.processtree.process_tree, 'bootchartd', None, False) | ||
63 | self.processtree.prune(self.processtree.process_tree, None) | ||
64 | process_tree = self.processtree.process_tree | ||
65 | self.checkAgainstJavaExtract(self.mk_fname('extract.processtree.3b.log'), process_tree) | ||
66 | |||
67 | def testMergeExploders(self): | ||
68 | self.processtree.merge_logger(self.processtree.process_tree, 'bootchartd', None, False) | ||
69 | self.processtree.prune(self.processtree.process_tree, None) | ||
70 | self.processtree.merge_exploders(self.processtree.process_tree, set(['hwup'])) | ||
71 | process_tree = self.processtree.process_tree | ||
72 | self.checkAgainstJavaExtract(self.mk_fname('extract.processtree.3c.log'), process_tree) | ||
73 | |||
74 | def testMergeSiblings(self): | ||
75 | self.processtree.merge_logger(self.processtree.process_tree, 'bootchartd', None, False) | ||
76 | self.processtree.prune(self.processtree.process_tree, None) | ||
77 | self.processtree.merge_exploders(self.processtree.process_tree, set(['hwup'])) | ||
78 | self.processtree.merge_siblings(self.processtree.process_tree) | ||
79 | process_tree = self.processtree.process_tree | ||
80 | self.checkAgainstJavaExtract(self.mk_fname('extract.processtree.3d.log'), process_tree) | ||
81 | |||
82 | def testMergeRuns(self): | ||
83 | self.processtree.merge_logger(self.processtree.process_tree, 'bootchartd', None, False) | ||
84 | self.processtree.prune(self.processtree.process_tree, None) | ||
85 | self.processtree.merge_exploders(self.processtree.process_tree, set(['hwup'])) | ||
86 | self.processtree.merge_siblings(self.processtree.process_tree) | ||
87 | self.processtree.merge_runs(self.processtree.process_tree) | ||
88 | process_tree = self.processtree.process_tree | ||
89 | self.checkAgainstJavaExtract(self.mk_fname('extract.processtree.3e.log'), process_tree) | ||
90 | |||
91 | if __name__ == '__main__': | ||
92 | unittest.main() | ||
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py new file mode 100755 index 0000000000..b2dd258c34 --- /dev/null +++ b/scripts/relocate_sdk.py | |||
@@ -0,0 +1,243 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # Copyright (c) 2012 Intel Corporation | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License version 2 as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | # See the GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with this program; if not, write to the Free Software | ||
16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | # | ||
18 | # DESCRIPTION | ||
19 | # This script is called by the SDK installer script. It replaces the dynamic | ||
20 | # loader path in all binaries and also fixes the SYSDIR paths/lengths and the | ||
21 | # location of ld.so.cache in the dynamic loader binary | ||
22 | # | ||
23 | # AUTHORS | ||
24 | # Laurentiu Palcu <laurentiu.palcu@intel.com> | ||
25 | # | ||
26 | |||
27 | import struct | ||
28 | import sys | ||
29 | import stat | ||
30 | import os | ||
31 | import re | ||
32 | import errno | ||
33 | |||
34 | if sys.version < '3': | ||
35 | def b(x): | ||
36 | return x | ||
37 | else: | ||
38 | def b(x): | ||
39 | return x.encode(sys.getfilesystemencoding()) | ||
40 | |||
41 | old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##")) | ||
42 | |||
43 | def get_arch(): | ||
44 | f.seek(0) | ||
45 | e_ident =f.read(16) | ||
46 | ei_mag0,ei_mag1_3,ei_class = struct.unpack("<B3sB11x", e_ident) | ||
47 | |||
48 | if (ei_mag0 != 0x7f and ei_mag1_3 != "ELF") or ei_class == 0: | ||
49 | return 0 | ||
50 | |||
51 | if ei_class == 1: | ||
52 | return 32 | ||
53 | elif ei_class == 2: | ||
54 | return 64 | ||
55 | |||
56 | def parse_elf_header(): | ||
57 | global e_type, e_machine, e_version, e_entry, e_phoff, e_shoff, e_flags,\ | ||
58 | e_ehsize, e_phentsize, e_phnum, e_shentsize, e_shnum, e_shstrndx | ||
59 | |||
60 | f.seek(0) | ||
61 | elf_header = f.read(64) | ||
62 | |||
63 | if arch == 32: | ||
64 | # 32bit | ||
65 | hdr_fmt = "<HHILLLIHHHHHH" | ||
66 | hdr_size = 52 | ||
67 | else: | ||
68 | # 64bit | ||
69 | hdr_fmt = "<HHIQQQIHHHHHH" | ||
70 | hdr_size = 64 | ||
71 | |||
72 | e_type, e_machine, e_version, e_entry, e_phoff, e_shoff, e_flags,\ | ||
73 | e_ehsize, e_phentsize, e_phnum, e_shentsize, e_shnum, e_shstrndx =\ | ||
74 | struct.unpack(hdr_fmt, elf_header[16:hdr_size]) | ||
75 | |||
76 | def change_interpreter(elf_file_name): | ||
77 | if arch == 32: | ||
78 | ph_fmt = "<IIIIIIII" | ||
79 | else: | ||
80 | ph_fmt = "<IIQQQQQQ" | ||
81 | |||
82 | """ look for PT_INTERP section """ | ||
83 | for i in range(0,e_phnum): | ||
84 | f.seek(e_phoff + i * e_phentsize) | ||
85 | ph_hdr = f.read(e_phentsize) | ||
86 | if arch == 32: | ||
87 | # 32bit | ||
88 | p_type, p_offset, p_vaddr, p_paddr, p_filesz,\ | ||
89 | p_memsz, p_flags, p_align = struct.unpack(ph_fmt, ph_hdr) | ||
90 | else: | ||
91 | # 64bit | ||
92 | p_type, p_flags, p_offset, p_vaddr, p_paddr, \ | ||
93 | p_filesz, p_memsz, p_align = struct.unpack(ph_fmt, ph_hdr) | ||
94 | |||
95 | """ change interpreter """ | ||
96 | if p_type == 3: | ||
97 | # PT_INTERP section | ||
98 | f.seek(p_offset) | ||
99 | # External SDKs with mixed pre-compiled binaries should not get | ||
100 | # relocated so look for some variant of /lib | ||
101 | fname = f.read(11) | ||
102 | if fname.startswith(b("/lib/")) or fname.startswith(b("/lib64/")) or \ | ||
103 | fname.startswith(b("/lib32/")) or fname.startswith(b("/usr/lib32/")) or \ | ||
104 | fname.startswith(b("/usr/lib32/")) or fname.startswith(b("/usr/lib64/")): | ||
105 | break | ||
106 | if (len(new_dl_path) >= p_filesz): | ||
107 | print("ERROR: could not relocate %s, interp size = %i and %i is needed." \ | ||
108 | % (elf_file_name, p_memsz, len(new_dl_path) + 1)) | ||
109 | break | ||
110 | dl_path = new_dl_path + b("\0") * (p_filesz - len(new_dl_path)) | ||
111 | f.seek(p_offset) | ||
112 | f.write(dl_path) | ||
113 | break | ||
114 | |||
115 | def change_dl_sysdirs(): | ||
116 | if arch == 32: | ||
117 | sh_fmt = "<IIIIIIIIII" | ||
118 | else: | ||
119 | sh_fmt = "<IIQQQQIIQQ" | ||
120 | |||
121 | """ read section string table """ | ||
122 | f.seek(e_shoff + e_shstrndx * e_shentsize) | ||
123 | sh_hdr = f.read(e_shentsize) | ||
124 | if arch == 32: | ||
125 | sh_offset, sh_size = struct.unpack("<16xII16x", sh_hdr) | ||
126 | else: | ||
127 | sh_offset, sh_size = struct.unpack("<24xQQ24x", sh_hdr) | ||
128 | |||
129 | f.seek(sh_offset) | ||
130 | sh_strtab = f.read(sh_size) | ||
131 | |||
132 | sysdirs = sysdirs_len = "" | ||
133 | |||
134 | """ change ld.so.cache path and default libs path for dynamic loader """ | ||
135 | for i in range(0,e_shnum): | ||
136 | f.seek(e_shoff + i * e_shentsize) | ||
137 | sh_hdr = f.read(e_shentsize) | ||
138 | |||
139 | sh_name, sh_type, sh_flags, sh_addr, sh_offset, sh_size, sh_link,\ | ||
140 | sh_info, sh_addralign, sh_entsize = struct.unpack(sh_fmt, sh_hdr) | ||
141 | |||
142 | name = sh_strtab[sh_name:sh_strtab.find(b("\0"), sh_name)] | ||
143 | |||
144 | """ look only into SHT_PROGBITS sections """ | ||
145 | if sh_type == 1: | ||
146 | f.seek(sh_offset) | ||
147 | """ default library paths cannot be changed on the fly because """ | ||
148 | """ the string lengths have to be changed too. """ | ||
149 | if name == b(".sysdirs"): | ||
150 | sysdirs = f.read(sh_size) | ||
151 | sysdirs_off = sh_offset | ||
152 | sysdirs_sect_size = sh_size | ||
153 | elif name == b(".sysdirslen"): | ||
154 | sysdirslen = f.read(sh_size) | ||
155 | sysdirslen_off = sh_offset | ||
156 | elif name == b(".ldsocache"): | ||
157 | ldsocache_path = f.read(sh_size) | ||
158 | new_ldsocache_path = old_prefix.sub(new_prefix, ldsocache_path) | ||
159 | # pad with zeros | ||
160 | new_ldsocache_path += b("\0") * (sh_size - len(new_ldsocache_path)) | ||
161 | # write it back | ||
162 | f.seek(sh_offset) | ||
163 | f.write(new_ldsocache_path) | ||
164 | |||
165 | if sysdirs != "" and sysdirslen != "": | ||
166 | paths = sysdirs.split(b("\0")) | ||
167 | sysdirs = b("") | ||
168 | sysdirslen = b("") | ||
169 | for path in paths: | ||
170 | """ exit the loop when we encounter first empty string """ | ||
171 | if path == b(""): | ||
172 | break | ||
173 | |||
174 | new_path = old_prefix.sub(new_prefix, path) | ||
175 | sysdirs += new_path + b("\0") | ||
176 | |||
177 | if arch == 32: | ||
178 | sysdirslen += struct.pack("<L", len(new_path)) | ||
179 | else: | ||
180 | sysdirslen += struct.pack("<Q", len(new_path)) | ||
181 | |||
182 | """ pad with zeros """ | ||
183 | sysdirs += b("\0") * (sysdirs_sect_size - len(sysdirs)) | ||
184 | |||
185 | """ write the sections back """ | ||
186 | f.seek(sysdirs_off) | ||
187 | f.write(sysdirs) | ||
188 | f.seek(sysdirslen_off) | ||
189 | f.write(sysdirslen) | ||
190 | |||
191 | # MAIN | ||
192 | if len(sys.argv) < 4: | ||
193 | sys.exit(-1) | ||
194 | |||
195 | # In python > 3, strings may also contain Unicode characters. So, convert | ||
196 | # them to bytes | ||
197 | if sys.version_info < (3,): | ||
198 | new_prefix = sys.argv[1] | ||
199 | new_dl_path = sys.argv[2] | ||
200 | else: | ||
201 | new_prefix = sys.argv[1].encode() | ||
202 | new_dl_path = sys.argv[2].encode() | ||
203 | |||
204 | executables_list = sys.argv[3:] | ||
205 | |||
206 | for e in executables_list: | ||
207 | perms = os.stat(e)[stat.ST_MODE] | ||
208 | if os.access(e, os.W_OK|os.R_OK): | ||
209 | perms = None | ||
210 | else: | ||
211 | os.chmod(e, perms|stat.S_IRWXU) | ||
212 | |||
213 | try: | ||
214 | f = open(e, "r+b") | ||
215 | except IOError: | ||
216 | exctype, ioex = sys.exc_info()[:2] | ||
217 | if ioex.errno == errno.ETXTBSY: | ||
218 | print("Could not open %s. File used by another process.\nPlease "\ | ||
219 | "make sure you exit all processes that might use any SDK "\ | ||
220 | "binaries." % e) | ||
221 | else: | ||
222 | print("Could not open %s: %s(%d)" % (e, ioex.strerror, ioex.errno)) | ||
223 | sys.exit(-1) | ||
224 | |||
225 | # Save old size and do a size check at the end. Just a safety measure. | ||
226 | old_size = os.path.getsize(e) | ||
227 | if old_size >= 64: | ||
228 | arch = get_arch() | ||
229 | if arch: | ||
230 | parse_elf_header() | ||
231 | change_interpreter(e) | ||
232 | change_dl_sysdirs() | ||
233 | |||
234 | """ change permissions back """ | ||
235 | if perms: | ||
236 | os.chmod(e, perms) | ||
237 | |||
238 | f.close() | ||
239 | |||
240 | if old_size != os.path.getsize(e): | ||
241 | print("New file size for %s is different. Looks like a relocation error!", e) | ||
242 | sys.exit(-1) | ||
243 | |||
diff --git a/scripts/rootfs_rpm-extract-postinst.awk b/scripts/rootfs_rpm-extract-postinst.awk new file mode 100644 index 0000000000..8f2836b32c --- /dev/null +++ b/scripts/rootfs_rpm-extract-postinst.awk | |||
@@ -0,0 +1,11 @@ | |||
1 | /Name:.*/ { | ||
2 | package = substr($0, 7) | ||
3 | next | ||
4 | } | ||
5 | /postinstall.*scriptlet .*/ { | ||
6 | next | ||
7 | } | ||
8 | { | ||
9 | print $0 >> ENVIRON["D"] "/etc/rpm-postinsts/" package ".sh" | ||
10 | } | ||
11 | |||
diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh new file mode 100755 index 0000000000..5df8c0f705 --- /dev/null +++ b/scripts/rpm2cpio.sh | |||
@@ -0,0 +1,53 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # This comes from the RPM5 5.4.0 distribution. | ||
4 | |||
5 | pkg=$1 | ||
6 | if [ "$pkg" = "" -o ! -e "$pkg" ]; then | ||
7 | echo "no package supplied" 1>&2 | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | leadsize=96 | ||
12 | o=`expr $leadsize + 8` | ||
13 | set `od -j $o -N 8 -t u1 $pkg` | ||
14 | il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` | ||
15 | dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` | ||
16 | # echo "sig il: $il dl: $dl" | ||
17 | |||
18 | sigsize=`expr 8 + 16 \* $il + $dl` | ||
19 | o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8` | ||
20 | set `od -j $o -N 8 -t u1 $pkg` | ||
21 | il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` | ||
22 | dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` | ||
23 | # echo "hdr il: $il dl: $dl" | ||
24 | |||
25 | hdrsize=`expr 8 + 16 \* $il + $dl` | ||
26 | o=`expr $o + $hdrsize` | ||
27 | EXTRACTOR="dd if=$pkg ibs=$o skip=1" | ||
28 | |||
29 | COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null` | ||
30 | if echo $COMPRESSION |grep -iq gzip; then | ||
31 | DECOMPRESSOR=gunzip | ||
32 | elif echo $COMPRESSION |grep -iq bzip2; then | ||
33 | DECOMPRESSOR=bunzip2 | ||
34 | elif echo $COMPRESSION |grep -iq xz; then | ||
35 | DECOMPRESSOR=unxz | ||
36 | elif echo $COMPRESSION |grep -iq cpio; then | ||
37 | DECOMPRESSOR=cat | ||
38 | else | ||
39 | # Most versions of file don't support LZMA, therefore we assume | ||
40 | # anything not detected is LZMA | ||
41 | DECOMPRESSOR=`which unlzma 2>/dev/null` | ||
42 | case "$DECOMPRESSOR" in | ||
43 | /* ) ;; | ||
44 | * ) DECOMPRESSOR=`which lzmash 2>/dev/null` | ||
45 | case "$DECOMPRESSOR" in | ||
46 | /* ) DECOMPRESSOR="lzmash -d -c" ;; | ||
47 | * ) DECOMPRESSOR=cat ;; | ||
48 | esac | ||
49 | ;; | ||
50 | esac | ||
51 | fi | ||
52 | |||
53 | $EXTRACTOR 2>/dev/null | $DECOMPRESSOR | ||
diff --git a/scripts/runqemu b/scripts/runqemu new file mode 100755 index 0000000000..ff64a1d4c2 --- /dev/null +++ b/scripts/runqemu | |||
@@ -0,0 +1,507 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Handle running OE images standalone with QEMU | ||
4 | # | ||
5 | # Copyright (C) 2006-2011 Linux Foundation | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | |||
20 | usage() { | ||
21 | MYNAME=`basename $0` | ||
22 | echo "" | ||
23 | echo "Usage: you can run this script with any valid combination" | ||
24 | echo "of the following options (in any order):" | ||
25 | echo " QEMUARCH - the qemu machine architecture to use" | ||
26 | echo " KERNEL - the kernel image file to use" | ||
27 | echo " ROOTFS - the rootfs image file or nfsroot directory to use" | ||
28 | echo " MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)" | ||
29 | echo " RAMFS - boot a ramfs-based image" | ||
30 | echo " ISO - boot an ISO image" | ||
31 | echo " VM - boot a vmdk image" | ||
32 | echo " Simplified QEMU command-line options can be passed with:" | ||
33 | echo " nographic - disables video console" | ||
34 | echo " serial - enables a serial console on /dev/ttyS0" | ||
35 | echo " kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)" | ||
36 | echo " publicvnc - enable a VNC server open to all hosts" | ||
37 | echo " qemuparams=\"xyz\" - specify custom parameters to QEMU" | ||
38 | echo " bootparams=\"xyz\" - specify custom kernel parameters during boot" | ||
39 | echo "" | ||
40 | echo "Examples:" | ||
41 | echo " $MYNAME qemuarm" | ||
42 | echo " $MYNAME qemux86-64 core-image-sato ext3" | ||
43 | echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" | ||
44 | echo " $MYNAME qemux86 ramfs" | ||
45 | echo " $MYNAME qemux86 iso" | ||
46 | echo " $MYNAME qemux86 qemuparams=\"-m 256\"" | ||
47 | echo " $MYNAME qemux86 bootparams=\"psplash=false\"" | ||
48 | echo " $MYNAME path/to/<image>-<machine>.vmdk" | ||
49 | exit 1 | ||
50 | } | ||
51 | |||
52 | if [ "x$1" = "x" ]; then | ||
53 | usage | ||
54 | fi | ||
55 | |||
56 | error() { | ||
57 | echo "Error: "$* | ||
58 | usage | ||
59 | } | ||
60 | |||
61 | MACHINE=${MACHINE:=""} | ||
62 | KERNEL=${KERNEL:=""} | ||
63 | ROOTFS=${ROOTFS:=""} | ||
64 | VM=${VM:=""} | ||
65 | FSTYPE="" | ||
66 | LAZY_ROOTFS="" | ||
67 | SCRIPT_QEMU_OPT="" | ||
68 | SCRIPT_QEMU_EXTRA_OPT="" | ||
69 | SCRIPT_KERNEL_OPT="" | ||
70 | SERIALSTDIO="" | ||
71 | KVM_ENABLED="no" | ||
72 | KVM_ACTIVE="no" | ||
73 | |||
74 | # Determine whether the file is a kernel or QEMU image, and set the | ||
75 | # appropriate variables | ||
76 | process_filename() { | ||
77 | filename=$1 | ||
78 | |||
79 | # Extract the filename extension | ||
80 | EXT=`echo $filename | awk -F . '{ print \$NF }'` | ||
81 | case /$EXT/ in | ||
82 | /bin/) | ||
83 | # A file ending in .bin is a kernel | ||
84 | [ -z "$KERNEL" ] && KERNEL=$filename || \ | ||
85 | error "conflicting KERNEL args [$KERNEL] and [$filename]" | ||
86 | ;; | ||
87 | /ext[234]/|/jffs2/|/btrfs/) | ||
88 | # A file ending in a supportted fs type is a rootfs image | ||
89 | if [ -z "$FSTYPE" -o "$FSTYPE" = "$EXT" ]; then | ||
90 | FSTYPE=$EXT | ||
91 | ROOTFS=$filename | ||
92 | else | ||
93 | error "conflicting FSTYPE types [$FSTYPE] and [$EXT]" | ||
94 | fi | ||
95 | ;; | ||
96 | /vmdk/) | ||
97 | FSTYPE=$EXT | ||
98 | VM=$filename | ||
99 | ;; | ||
100 | *) | ||
101 | error "unknown file arg [$filename]" | ||
102 | ;; | ||
103 | esac | ||
104 | } | ||
105 | |||
106 | # Parse command line args without requiring specific ordering. It's a | ||
107 | # bit more complex, but offers a great user experience. | ||
108 | while true; do | ||
109 | arg=${1} | ||
110 | case "$arg" in | ||
111 | "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \ | ||
112 | "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") | ||
113 | [ -z "$MACHINE" ] && MACHINE=$arg || \ | ||
114 | error "conflicting MACHINE types [$MACHINE] and [$arg]" | ||
115 | ;; | ||
116 | "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs") | ||
117 | [ -z "$FSTYPE" -o "$FSTYPE" = "$arg" ] && FSTYPE=$arg || \ | ||
118 | error "conflicting FSTYPE types [$FSTYPE] and [$arg]" | ||
119 | ;; | ||
120 | *-image*) | ||
121 | [ -z "$ROOTFS" ] || \ | ||
122 | error "conflicting ROOTFS args [$ROOTFS] and [$arg]" | ||
123 | if [ -f "$arg" ]; then | ||
124 | process_filename $arg | ||
125 | elif [ -d "$arg" ]; then | ||
126 | # Handle the case where the nfsroot dir has -image- | ||
127 | # in the pathname | ||
128 | echo "Assuming $arg is an nfs rootfs" | ||
129 | FSTYPE=nfs | ||
130 | ROOTFS=$arg | ||
131 | else | ||
132 | ROOTFS=$arg | ||
133 | LAZY_ROOTFS="true" | ||
134 | fi | ||
135 | ;; | ||
136 | "ramfs") | ||
137 | FSTYPE=cpio.gz | ||
138 | RAMFS=true | ||
139 | ;; | ||
140 | "iso") | ||
141 | FSTYPE=iso | ||
142 | ISOFS=true | ||
143 | ;; | ||
144 | "nographic") | ||
145 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic" | ||
146 | SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" | ||
147 | ;; | ||
148 | "serial") | ||
149 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio" | ||
150 | SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" | ||
151 | SERIALSTDIO="1" | ||
152 | ;; | ||
153 | "biosdir="*) | ||
154 | CUSTOMBIOSDIR="${arg##biosdir=}" | ||
155 | ;; | ||
156 | "qemuparams="*) | ||
157 | SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}" | ||
158 | |||
159 | # Warn user if they try to specify serial or kvm options | ||
160 | # to use simplified options instead | ||
161 | serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial\)'` | ||
162 | kvm_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-enable-kvm\)'` | ||
163 | vga_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-vga\)'` | ||
164 | [ ! -z "$serial_option" -o ! -z "$kvm_option" ] && \ | ||
165 | echo "Please use simplified serial or kvm options instead" | ||
166 | ;; | ||
167 | "bootparams="*) | ||
168 | SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}" | ||
169 | ;; | ||
170 | "audio") | ||
171 | if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then | ||
172 | echo "Enabling audio in qemu." | ||
173 | echo "Please install snd_intel8x0 or snd_ens1370 driver in linux guest." | ||
174 | QEMU_AUDIO_DRV="alsa" | ||
175 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -soundhw ac97,es1370" | ||
176 | fi | ||
177 | ;; | ||
178 | "kvm") | ||
179 | KVM_ENABLED="yes" | ||
180 | KVM_CAPABLE=`grep -q 'vmx\|svm' /proc/cpuinfo && echo 1` | ||
181 | ;; | ||
182 | "slirp") | ||
183 | SLIRP_ENABLED="yes" | ||
184 | ;; | ||
185 | "publicvnc") | ||
186 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc 0.0.0.0:0" | ||
187 | ;; | ||
188 | "") break ;; | ||
189 | *) | ||
190 | # A directory name is an nfs rootfs | ||
191 | if [ -d "$arg" ]; then | ||
192 | echo "Assuming $arg is an nfs rootfs" | ||
193 | if [ -z "$FSTYPE" -o "$FSTYPE" = "nfs" ]; then | ||
194 | FSTYPE=nfs | ||
195 | else | ||
196 | error "conflicting FSTYPE types [$arg] and nfs" | ||
197 | fi | ||
198 | |||
199 | if [ -z "$ROOTFS" ]; then | ||
200 | ROOTFS=$arg | ||
201 | else | ||
202 | error "conflicting ROOTFS args [$ROOTFS] and [$arg]" | ||
203 | fi | ||
204 | elif [ -f "$arg" ]; then | ||
205 | process_filename $arg | ||
206 | else | ||
207 | error "unable to classify arg [$arg]" | ||
208 | fi | ||
209 | ;; | ||
210 | esac | ||
211 | shift | ||
212 | done | ||
213 | |||
214 | if [ ! -c /dev/net/tun ] ; then | ||
215 | echo "TUN control device /dev/net/tun is unavailable; you may need to enable TUN (e.g. sudo modprobe tun)" | ||
216 | exit 1 | ||
217 | elif [ ! -w /dev/net/tun ] ; then | ||
218 | echo "TUN control device /dev/net/tun is not writable, please fix (e.g. sudo chmod 666 /dev/net/tun)" | ||
219 | exit 1 | ||
220 | fi | ||
221 | |||
222 | # Report errors for missing combinations of options | ||
223 | if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" ]; then | ||
224 | error "you must specify at least a MACHINE, VM, or KERNEL argument" | ||
225 | fi | ||
226 | if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then | ||
227 | error "NFS booting without an explicit ROOTFS path is not yet supported" | ||
228 | fi | ||
229 | |||
230 | if [ -z "$MACHINE" ]; then | ||
231 | if [ "x$FSTYPE" = "xvmdk" ]; then | ||
232 | MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'` | ||
233 | if [ -z "$MACHINE" ]; then | ||
234 | error "Unable to set MACHINE from vmdk filename [$VM]" | ||
235 | fi | ||
236 | echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]" | ||
237 | else | ||
238 | MACHINE=`basename $KERNEL | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'` | ||
239 | if [ -z "$MACHINE" ]; then | ||
240 | error "Unable to set MACHINE from kernel filename [$KERNEL]" | ||
241 | fi | ||
242 | echo "Set MACHINE to [$MACHINE] based on kernel [$KERNEL]" | ||
243 | fi | ||
244 | fi | ||
245 | |||
246 | YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu" | ||
247 | YOCTO_PARAVIRT_KVM_WIKI="https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM" | ||
248 | # Detect KVM configuration | ||
249 | if [ "x$KVM_ENABLED" = "xyes" ]; then | ||
250 | if [ -z "$KVM_CAPABLE" ]; then | ||
251 | echo "You are trying to enable KVM on a cpu without VT support." | ||
252 | echo "Remove kvm from the command-line, or refer" | ||
253 | echo "$YOCTO_KVM_WIKI"; | ||
254 | exit 1; | ||
255 | fi | ||
256 | if [ "x$MACHINE" != "xqemux86" -a "x$MACHINE" != "xqemux86-64" ]; then | ||
257 | echo "KVM only support x86 & x86-64. Remove kvm from the command-line"; | ||
258 | exit 1; | ||
259 | fi | ||
260 | if [ ! -e /dev/kvm ]; then | ||
261 | echo "Missing KVM device. Have you inserted kvm modules?" | ||
262 | echo "For further help see:" | ||
263 | echo "$YOCTO_KVM_WIKI"; | ||
264 | exit 1; | ||
265 | fi | ||
266 | if [ ! -e /dev/vhost-net ]; then | ||
267 | echo "Missing virtio net device. Have you inserted vhost-net module?" | ||
268 | echo "For further help see:" | ||
269 | echo "$YOCTO_PARAVIRT_KVM_WIKI"; | ||
270 | exit 1; | ||
271 | fi | ||
272 | if [ -w /dev/kvm -a -r /dev/kvm ]; then | ||
273 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm" | ||
274 | KVM_ACTIVE="yes" | ||
275 | else | ||
276 | echo "You have no rights on /dev/kvm." | ||
277 | echo "Please change the ownership of this file as described at:" | ||
278 | echo "$YOCTO_KVM_WIKI"; | ||
279 | exit 1; | ||
280 | fi | ||
281 | if [ ! -w /dev/vhost-net -o ! -r /dev/vhost-net ]; then | ||
282 | if [ "$SLIRP_ENABLED" != "yes" ] ; then | ||
283 | echo "You have no rights on /dev/vhost-net." | ||
284 | echo "Please change the ownership of this file as described at:" | ||
285 | echo "$YOCTO_PARAVIRT_KVM_WIKI"; | ||
286 | exit 1; | ||
287 | fi | ||
288 | fi | ||
289 | fi | ||
290 | |||
291 | machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'` | ||
292 | # MACHINE is now set for all cases | ||
293 | |||
294 | # Defaults used when these vars need to be inferred | ||
295 | QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin | ||
296 | QEMUX86_DEFAULT_FSTYPE=ext3 | ||
297 | |||
298 | QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin | ||
299 | QEMUX86_64_DEFAULT_FSTYPE=ext3 | ||
300 | |||
301 | QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin | ||
302 | QEMUARM_DEFAULT_FSTYPE=ext3 | ||
303 | |||
304 | QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin | ||
305 | QEMUMIPS_DEFAULT_FSTYPE=ext3 | ||
306 | |||
307 | QEMUMIPSEL_DEFAULT_KERNEL=vmlinux-qemumipsel.bin | ||
308 | QEMUMIPSEL_DEFAULT_FSTYPE=ext3 | ||
309 | |||
310 | QEMUMIPS64_DEFAULT_KERNEL=vmlinux-qemumips64.bin | ||
311 | QEMUMIPS64_DEFAULT_FSTYPE=ext3 | ||
312 | |||
313 | QEMUSH4_DEFAULT_KERNEL=vmlinux-qemumips.bin | ||
314 | QEMUSH4_DEFAULT_FSTYPE=ext3 | ||
315 | |||
316 | QEMUPPC_DEFAULT_KERNEL=vmlinux-qemuppc.bin | ||
317 | QEMUPPC_DEFAULT_FSTYPE=ext3 | ||
318 | |||
319 | QEMUMICROBLAZE_DEFAULT_KERNEL=linux.bin.ub | ||
320 | QEMUMICROBLAZE_DEFAULT_FSTYPE=cpio | ||
321 | |||
322 | QEMUZYNQ_DEFAULT_KERNEL=uImage | ||
323 | QEMUZYNQ_DEFAULT_FSTYPE=cpio | ||
324 | |||
325 | AKITA_DEFAULT_KERNEL=zImage-akita.bin | ||
326 | AKITA_DEFAULT_FSTYPE=jffs2 | ||
327 | |||
328 | SPITZ_DEFAULT_KERNEL=zImage-spitz.bin | ||
329 | SPITZ_DEFAULT_FSTYPE=ext3 | ||
330 | |||
331 | setup_path_vars() { | ||
332 | if [ -z "$OE_TMPDIR" ] ; then | ||
333 | PATHS_REQUIRED=true | ||
334 | elif [ "$1" = "1" -a -z "$DEPLOY_DIR_IMAGE" ] ; then | ||
335 | PATHS_REQUIRED=true | ||
336 | else | ||
337 | PATHS_REQUIRED=false | ||
338 | fi | ||
339 | |||
340 | if [ "$PATHS_REQUIRED" = "true" ]; then | ||
341 | # Try to get the variable values from bitbake | ||
342 | type -P bitbake &>/dev/null || { | ||
343 | echo "In order for this script to dynamically infer paths"; | ||
344 | echo "to kernels or filesystem images, you either need"; | ||
345 | echo "bitbake in your PATH or to source oe-init-build-env"; | ||
346 | echo "before running this script" >&2; | ||
347 | exit 1; } | ||
348 | |||
349 | # We have bitbake in PATH, get the variable values from bitbake | ||
350 | BITBAKE_ENV_TMPFILE=`mktemp --tmpdir runqemu.XXXXXXXXXX` | ||
351 | if [ "$?" != "0" ] ; then | ||
352 | echo "Error: mktemp failed for bitbake environment output" | ||
353 | exit 1 | ||
354 | fi | ||
355 | |||
356 | MACHINE=$MACHINE bitbake -e > $BITBAKE_ENV_TMPFILE | ||
357 | if [ -z "$OE_TMPDIR" ] ; then | ||
358 | OE_TMPDIR=`sed -n 's/^TMPDIR=\"\(.*\)\"/\1/p' $BITBAKE_ENV_TMPFILE` | ||
359 | fi | ||
360 | if [ -z "$DEPLOY_DIR_IMAGE" ] ; then | ||
361 | DEPLOY_DIR_IMAGE=`sed -n 's/^DEPLOY_DIR_IMAGE=\"\(.*\)\"/\1/p' $BITBAKE_ENV_TMPFILE` | ||
362 | fi | ||
363 | if [ -z "$OE_TMPDIR" ]; then | ||
364 | # Check for errors from bitbake that the user needs to know about | ||
365 | BITBAKE_OUTPUT=`cat $BITBAKE_ENV_TMPFILE | wc -l` | ||
366 | if [ "$BITBAKE_OUTPUT" -eq "0" ]; then | ||
367 | echo "Error: this script needs to be run from your build directory, or you need" | ||
368 | echo "to explicitly set OE_TMPDIR and DEPLOY_DIR_IMAGE in your environment" | ||
369 | else | ||
370 | echo "There was an error running bitbake to determine TMPDIR" | ||
371 | echo "Here is the output from 'bitbake -e':" | ||
372 | cat $BITBAKE_ENV_TMPFILE | ||
373 | fi | ||
374 | rm $BITBAKE_ENV_TMPFILE | ||
375 | exit 1 | ||
376 | fi | ||
377 | rm $BITBAKE_ENV_TMPFILE | ||
378 | fi | ||
379 | } | ||
380 | |||
381 | setup_sysroot() { | ||
382 | # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their | ||
383 | # environment script. If that variable isn't set, we're | ||
384 | # either in an in-tree build scenario or the environment | ||
385 | # script wasn't source'd. | ||
386 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then | ||
387 | setup_path_vars | ||
388 | BUILD_ARCH=`uname -m` | ||
389 | BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` | ||
390 | BUILD_SYS="$BUILD_ARCH-$BUILD_OS" | ||
391 | |||
392 | OECORE_NATIVE_SYSROOT=$OE_TMPDIR/sysroots/$BUILD_SYS | ||
393 | fi | ||
394 | } | ||
395 | |||
396 | # Locate a rootfs image to boot which matches our expected | ||
397 | # machine and fstype. | ||
398 | findimage() { | ||
399 | where=$1 | ||
400 | machine=$2 | ||
401 | extension=$3 | ||
402 | |||
403 | # Sort rootfs candidates by modification time - the most | ||
404 | # recently created one is the one we most likely want to boot. | ||
405 | filename=`ls -t1 $where/*-image*$machine.$extension 2>/dev/null | head -n1` | ||
406 | if [ "x$filename" != "x" ]; then | ||
407 | ROOTFS=$filename | ||
408 | return | ||
409 | fi | ||
410 | |||
411 | echo "Couldn't find a $machine rootfs image in $where." | ||
412 | exit 1 | ||
413 | } | ||
414 | |||
415 | if [ -e "$ROOTFS" -a -z "$FSTYPE" ]; then | ||
416 | # Extract the filename extension | ||
417 | EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'` | ||
418 | if [ "x$EXT" = "xext2" -o "x$EXT" = "xext3" -o \ | ||
419 | "x$EXT" = "xjffs2" -o "x$EXT" = "xbtrfs" -o \ | ||
420 | "x$EXT" = "xext4" ]; then | ||
421 | FSTYPE=$EXT | ||
422 | else | ||
423 | echo "Note: Unable to determine filesystem extension for $ROOTFS" | ||
424 | echo "We will use the default FSTYPE for $MACHINE" | ||
425 | # ...which is done further below... | ||
426 | fi | ||
427 | fi | ||
428 | |||
429 | if [ -z "$KERNEL" -a "x$FSTYPE" != "xvmdk" ]; then | ||
430 | setup_path_vars 1 | ||
431 | eval kernel_file=\$${machine2}_DEFAULT_KERNEL | ||
432 | KERNEL=$DEPLOY_DIR_IMAGE/$kernel_file | ||
433 | |||
434 | if [ -z "$KERNEL" ]; then | ||
435 | error "Unable to determine default kernel for MACHINE [$MACHINE]" | ||
436 | fi | ||
437 | fi | ||
438 | # KERNEL is now set for all cases | ||
439 | |||
440 | if [ -z "$FSTYPE" ]; then | ||
441 | eval FSTYPE=\$${machine2}_DEFAULT_FSTYPE | ||
442 | |||
443 | if [ -z "$FSTYPE" ]; then | ||
444 | error "Unable to determine default fstype for MACHINE [$MACHINE]" | ||
445 | fi | ||
446 | fi | ||
447 | |||
448 | # FSTYPE is now set for all cases | ||
449 | |||
450 | # Handle cases where a ROOTFS type is given instead of a filename, e.g. | ||
451 | # core-image-sato | ||
452 | if [ "$LAZY_ROOTFS" = "true" ]; then | ||
453 | setup_path_vars 1 | ||
454 | echo "Assuming $ROOTFS really means $DEPLOY_DIR_IMAGE/$ROOTFS-$MACHINE.$FSTYPE" | ||
455 | ROOTFS=$DEPLOY_DIR_IMAGE/$ROOTFS-$MACHINE.$FSTYPE | ||
456 | fi | ||
457 | |||
458 | if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then | ||
459 | setup_path_vars 1 | ||
460 | T=$DEPLOY_DIR_IMAGE | ||
461 | eval rootfs_list=\$${machine2}_DEFAULT_ROOTFS | ||
462 | findimage $T $MACHINE $FSTYPE | ||
463 | |||
464 | if [ -z "$ROOTFS" ]; then | ||
465 | error "Unable to determine default rootfs for MACHINE [$MACHINE]" | ||
466 | fi | ||
467 | fi | ||
468 | # ROOTFS is now set for all cases, now expand it to be an absolute path, it should exist at this point | ||
469 | |||
470 | ROOTFS=`readlink -f $ROOTFS` | ||
471 | |||
472 | echo "" | ||
473 | echo "Continuing with the following parameters:" | ||
474 | if [ "x$FSTYPE" != "xvmdk" ]; then | ||
475 | echo "KERNEL: [$KERNEL]" | ||
476 | echo "ROOTFS: [$ROOTFS]" | ||
477 | else | ||
478 | echo "VMDK: [$VM]" | ||
479 | fi | ||
480 | echo "FSTYPE: [$FSTYPE]" | ||
481 | |||
482 | setup_sysroot | ||
483 | # OECORE_NATIVE_SYSROOT is now set for all cases | ||
484 | |||
485 | INTERNAL_SCRIPT="$0-internal" | ||
486 | if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then | ||
487 | INTERNAL_SCRIPT=`which runqemu-internal` | ||
488 | fi | ||
489 | |||
490 | # Specify directory for BIOS, VGA BIOS and keymaps | ||
491 | if [ ! -z "$CUSTOMBIOSDIR" ]; then | ||
492 | if [ -d "$OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" ]; then | ||
493 | echo "Assuming biosdir is $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" | ||
494 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" | ||
495 | else | ||
496 | if [ ! -d "$CUSTOMBIOSDIR" ]; then | ||
497 | echo "Custom BIOS directory not found. Tried: $CUSTOMBIOSDIR" | ||
498 | echo "and $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" | ||
499 | exit 1; | ||
500 | fi | ||
501 | echo "Assuming biosdir is $CUSTOMBIOSDIR" | ||
502 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $CUSTOMBIOSDIR" | ||
503 | fi | ||
504 | fi | ||
505 | |||
506 | . $INTERNAL_SCRIPT | ||
507 | exit $? | ||
diff --git a/scripts/runqemu-addptable2image b/scripts/runqemu-addptable2image new file mode 100755 index 0000000000..f0195ad8a3 --- /dev/null +++ b/scripts/runqemu-addptable2image | |||
@@ -0,0 +1,51 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Add a partion table to an ext2 image file | ||
4 | # | ||
5 | # Copyright (C) 2006-2007 OpenedHand Ltd. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, write to the Free Software | ||
19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | |||
21 | |||
22 | IMAGE=$1 | ||
23 | IMAGEOUT=$2 | ||
24 | |||
25 | echo $IMAGE | ||
26 | echo $IMAGEOUT | ||
27 | |||
28 | size=`ls -l $IMAGE | awk '{ print $5}'` | ||
29 | size2=`expr $size / 512 / 16 / 63` | ||
30 | |||
31 | echo $size | ||
32 | echo $size2 | ||
33 | |||
34 | # MBR Size = 512 * 63 bytes | ||
35 | dd if=/dev/zero of=$IMAGEOUT count=63 | ||
36 | |||
37 | echo "x" > /tmp/fdisk.cmds | ||
38 | echo "c" >> /tmp/fdisk.cmds | ||
39 | echo "1024" >> /tmp/fdisk.cmds | ||
40 | echo "h" >> /tmp/fdisk.cmds | ||
41 | echo "16" >> /tmp/fdisk.cmds | ||
42 | echo "r" >> /tmp/fdisk.cmds | ||
43 | echo "n" >> /tmp/fdisk.cmds | ||
44 | echo "p" >> /tmp/fdisk.cmds | ||
45 | echo "1" >> /tmp/fdisk.cmds | ||
46 | echo "1" >> /tmp/fdisk.cmds | ||
47 | echo "$size2" >> /tmp/fdisk.cmds | ||
48 | echo "w" >> /tmp/fdisk.cmds | ||
49 | |||
50 | /sbin/fdisk $IMAGEOUT < /tmp/fdisk.cmds | ||
51 | cat $IMAGE >> $IMAGEOUT | ||
diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs new file mode 100755 index 0000000000..40ab20143f --- /dev/null +++ b/scripts/runqemu-export-rootfs | |||
@@ -0,0 +1,163 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Copyright (c) 2005-2009 Wind River Systems, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License version 2 as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | # See the GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with this program; if not, write to the Free Software | ||
16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | |||
18 | usage() { | ||
19 | echo "Usage: $0 {start|stop|restart} <nfs-export-dir>" | ||
20 | } | ||
21 | |||
22 | if [ $# != 2 ]; then | ||
23 | usage | ||
24 | exit 1 | ||
25 | fi | ||
26 | |||
27 | if [[ "$1" != "start" && "$1" != "stop" && "$1" != "restart" ]]; then | ||
28 | echo "Unknown command '$1'" | ||
29 | usage | ||
30 | exit 1 | ||
31 | fi | ||
32 | |||
33 | if [ ! -d "$2" ]; then | ||
34 | echo "Error: '$2' does not exist" | ||
35 | usage | ||
36 | exit 1 | ||
37 | fi | ||
38 | # Ensure the nfs-export-dir is an absolute path | ||
39 | NFS_EXPORT_DIR=$(cd "$2" && pwd) | ||
40 | |||
41 | SYSROOT_SETUP_SCRIPT=`which oe-find-native-sysroot 2> /dev/null` | ||
42 | if [ -z "$SYSROOT_SETUP_SCRIPT" ]; then | ||
43 | echo "Error: Unable to find the oe-find-native-sysroot script" | ||
44 | echo "Did you forget to source your build environment setup script?" | ||
45 | exit 1 | ||
46 | fi | ||
47 | . $SYSROOT_SETUP_SCRIPT | ||
48 | |||
49 | if [ ! -e "$OECORE_NATIVE_SYSROOT/usr/sbin/unfsd" ]; then | ||
50 | echo "Error: Unable to find unfsd binary in $OECORE_NATIVE_SYSROOT/usr/sbin/" | ||
51 | |||
52 | if [ "x$OECORE_DISTRO_VERSION" = "x" ]; then | ||
53 | echo "Have you run 'bitbake meta-ide-support'?" | ||
54 | else | ||
55 | echo "This shouldn't happen - something is missing from your toolchain installation" | ||
56 | fi | ||
57 | exit 1 | ||
58 | fi | ||
59 | |||
60 | if [ ! -d ~/.runqemu-sdk ]; then | ||
61 | mkdir -p ~/.runqemu-sdk | ||
62 | fi | ||
63 | |||
64 | NFS_INSTANCE=${NFS_INSTANCE:=0} | ||
65 | EXPORTS=~/.runqemu-sdk/exports$NFS_INSTANCE | ||
66 | RMTAB=~/.runqemu-sdk/rmtab$NFS_INSTANCE | ||
67 | NFSPID=~/.runqemu-sdk/nfs$NFS_INSTANCE.pid | ||
68 | MOUNTPID=~/.runqemu-sdk/mount$NFS_INSTANCE.pid | ||
69 | |||
70 | PSEUDO_OPTS="-P $OECORE_NATIVE_SYSROOT/usr" | ||
71 | PSEUDO_LOCALSTATEDIR="$NFS_EXPORT_DIR/../$(basename $NFS_EXPORT_DIR).pseudo_state" | ||
72 | export PSEUDO_LOCALSTATEDIR | ||
73 | |||
74 | if [ ! -d "$PSEUDO_LOCALSTATEDIR" ]; then | ||
75 | echo "Error: $PSEUDO_LOCALSTATEDIR does not exist." | ||
76 | echo "Did you create the export directory using runqemu-extract-sdk?" | ||
77 | exit 1 | ||
78 | fi | ||
79 | |||
80 | # rpc.mountd RPC port | ||
81 | NFS_MOUNTPROG=$[ 21111 + $NFS_INSTANCE ] | ||
82 | # rpc.nfsd RPC port | ||
83 | NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ] | ||
84 | # NFS port number | ||
85 | NFS_PORT=$[ 3049 + 2 * $NFS_INSTANCE ] | ||
86 | # mountd port number | ||
87 | MOUNT_PORT=$[ 3048 + 2 * $NFS_INSTANCE ] | ||
88 | |||
89 | ## For debugging you would additionally add | ||
90 | ## --debug all | ||
91 | UNFSD_OPTS="-p -N -i $NFSPID -e $EXPORTS -x $NFS_NFSPROG -n $NFS_PORT -y $NFS_MOUNTPROG -m $MOUNT_PORT" | ||
92 | |||
93 | # Setup the exports file | ||
94 | if [ "$1" = "start" ]; then | ||
95 | echo "Creating exports file..." | ||
96 | echo "$NFS_EXPORT_DIR (rw,async,no_root_squash,no_all_squash,insecure)" > $EXPORTS | ||
97 | fi | ||
98 | |||
99 | # See how we were called. | ||
100 | case "$1" in | ||
101 | start) | ||
102 | PORTMAP_RUNNING=`ps -ef | grep portmap | grep -v grep` | ||
103 | RPCBIND_RUNNING=`ps -ef | grep rpcbind | grep -v grep` | ||
104 | if [[ "x$PORTMAP_RUNNING" = "x" && "x$RPCBIND_RUNNING" = "x" ]]; then | ||
105 | echo "=======================================================" | ||
106 | echo "Error: neither rpcbind nor portmap appear to be running" | ||
107 | echo "Please install and start one of these services first" | ||
108 | echo "=======================================================" | ||
109 | echo "Tip: for recent Ubuntu hosts, run:" | ||
110 | echo " sudo apt-get install rpcbind" | ||
111 | echo "Then add OPTIONS=\"-i -w\" to /etc/default/rpcbind and run" | ||
112 | echo " sudo service portmap restart" | ||
113 | |||
114 | exit 1 | ||
115 | fi | ||
116 | |||
117 | echo "Starting User Mode nfsd" | ||
118 | echo " $PSEUDO $PSEUDO_OPTS $OECORE_NATIVE_SYSROOT/usr/sbin/unfsd $UNFSD_OPTS" | ||
119 | $PSEUDO $PSEUDO_OPTS $OECORE_NATIVE_SYSROOT/usr/sbin/unfsd $UNFSD_OPTS | ||
120 | if [ ! $? = 0 ]; then | ||
121 | echo "Error starting nfsd" | ||
122 | exit 1 | ||
123 | fi | ||
124 | # Check to make sure everything started ok. | ||
125 | if [ ! -f $NFSPID ]; then | ||
126 | echo "rpc.nfsd did not start correctly" | ||
127 | exit 1 | ||
128 | fi | ||
129 | ps -fp `cat $NFSPID` > /dev/null 2> /dev/null | ||
130 | if [ ! $? = 0 ]; then | ||
131 | echo "rpc.nfsd did not start correctly" | ||
132 | exit 1 | ||
133 | fi | ||
134 | echo " " | ||
135 | echo "On your target please remember to add the following options for NFS" | ||
136 | echo "nfsroot=IP_ADDRESS:$NFS_EXPORT_DIR,nfsvers=3,port=$NFSD_PORT,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,mountport=$MOUNTD_PORT" | ||
137 | ;; | ||
138 | stop) | ||
139 | if [ -f "$NFSPID" ]; then | ||
140 | echo "Stopping rpc.nfsd" | ||
141 | kill `cat $NFSPID` | ||
142 | rm -f $NFSPID | ||
143 | else | ||
144 | echo "No PID file, not stopping rpc.nfsd" | ||
145 | fi | ||
146 | if [ -f "$EXPORTS" ]; then | ||
147 | echo "Removing exports file" | ||
148 | rm -f $EXPORTS | ||
149 | fi | ||
150 | ;; | ||
151 | restart) | ||
152 | $0 stop $NFS_EXPORT_DIR | ||
153 | $0 start $NFS_EXPORT_DIR | ||
154 | if [ ! $? = 0 ]; then | ||
155 | exit 1 | ||
156 | fi | ||
157 | ;; | ||
158 | *) | ||
159 | echo "$0 {start|stop|restart} <nfs-export-dir>" | ||
160 | ;; | ||
161 | esac | ||
162 | |||
163 | exit 0 | ||
diff --git a/scripts/runqemu-extract-sdk b/scripts/runqemu-extract-sdk new file mode 100755 index 0000000000..32ddd485b6 --- /dev/null +++ b/scripts/runqemu-extract-sdk | |||
@@ -0,0 +1,104 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # This utility extracts an SDK image tarball using pseudo, and stores | ||
4 | # the pseudo database in var/pseudo within the rootfs. If you want to | ||
5 | # boot QEMU using an nfsroot, you *must* use this script to create the | ||
6 | # rootfs to ensure it is done correctly with pseudo. | ||
7 | # | ||
8 | # Copyright (c) 2010 Intel Corp. | ||
9 | # | ||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License version 2 as | ||
12 | # published by the Free Software Foundation. | ||
13 | # | ||
14 | # This program is distributed in the hope that it will be useful, | ||
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | # See the GNU General Public License for more details. | ||
18 | # | ||
19 | # You should have received a copy of the GNU General Public License | ||
20 | # along with this program; if not, write to the Free Software | ||
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | |||
23 | function usage() { | ||
24 | echo "Usage: $0 <image-tarball> <extract-dir>" | ||
25 | } | ||
26 | |||
27 | if [ $# -ne 2 ]; then | ||
28 | usage | ||
29 | exit 1 | ||
30 | fi | ||
31 | |||
32 | SYSROOT_SETUP_SCRIPT=`which oe-find-native-sysroot 2> /dev/null` | ||
33 | if [ -z "$SYSROOT_SETUP_SCRIPT" ]; then | ||
34 | echo "Error: Unable to find the oe-find-native-sysroot script" | ||
35 | echo "Did you forget to source your build system environment setup script?" | ||
36 | exit 1 | ||
37 | fi | ||
38 | . $SYSROOT_SETUP_SCRIPT | ||
39 | PSEUDO_OPTS="-P $OECORE_NATIVE_SYSROOT/usr" | ||
40 | |||
41 | ROOTFS_TARBALL=$1 | ||
42 | SDK_ROOTFS_DIR=$2 | ||
43 | |||
44 | if [ ! -e "$ROOTFS_TARBALL" ]; then | ||
45 | echo "Error: sdk tarball '$ROOTFS_TARBALL' does not exist" | ||
46 | usage | ||
47 | exit 1 | ||
48 | fi | ||
49 | |||
50 | # Convert SDK_ROOTFS_DIR to a full pathname | ||
51 | if [[ ${SDK_ROOTFS_DIR:0:1} != "/" ]]; then | ||
52 | SDK_ROOTFS_DIR=$(readlink -f $(pwd)/$SDK_ROOTFS_DIR) | ||
53 | fi | ||
54 | |||
55 | TAR_OPTS="" | ||
56 | if [[ "$ROOTFS_TARBALL" =~ tar\.bz2$ ]]; then | ||
57 | TAR_OPTS="--numeric-owner -xjf" | ||
58 | fi | ||
59 | if [[ "$ROOTFS_TARBALL" =~ tar\.gz$ ]]; then | ||
60 | TAR_OPTS="--numeric-owner -xzf" | ||
61 | fi | ||
62 | if [[ "$ROOTFS_TARBALL" =~ \.tar$ ]]; then | ||
63 | TAR_OPTS="--numeric-owner -xf" | ||
64 | fi | ||
65 | if [ -z "$TAR_OPTS" ]; then | ||
66 | echo "Error: Unable to determine sdk tarball format" | ||
67 | echo "Accepted types: .tar / .tar.gz / .tar.bz2" | ||
68 | exit 1 | ||
69 | fi | ||
70 | |||
71 | if [ ! -d "$SDK_ROOTFS_DIR" ]; then | ||
72 | echo "Creating directory $SDK_ROOTFS_DIR" | ||
73 | mkdir -p "$SDK_ROOTFS_DIR" | ||
74 | fi | ||
75 | |||
76 | pseudo_state_dir="$SDK_ROOTFS_DIR/../$(basename "$SDK_ROOTFS_DIR").pseudo_state" | ||
77 | pseudo_state_dir="$(readlink -f $pseudo_state_dir)" | ||
78 | |||
79 | if [ -e "$pseudo_state_dir" ]; then | ||
80 | echo "Error: $pseudo_state_dir already exists!" | ||
81 | echo "Please delete the rootfs tree and pseudo directory manually" | ||
82 | echo "if this is really what you want." | ||
83 | exit 1 | ||
84 | fi | ||
85 | |||
86 | mkdir -p "$pseudo_state_dir" | ||
87 | touch "$pseudo_state_dir/pseudo.pid" | ||
88 | PSEUDO_LOCALSTATEDIR="$pseudo_state_dir" | ||
89 | export PSEUDO_LOCALSTATEDIR | ||
90 | |||
91 | echo "Extracting rootfs tarball using pseudo..." | ||
92 | echo "$PSEUDO $PSEUDO_OPTS tar -C \"$SDK_ROOTFS_DIR\" $TAR_OPTS \"$ROOTFS_TARBALL\"" | ||
93 | $PSEUDO $PSEUDO_OPTS tar -C "$SDK_ROOTFS_DIR" $TAR_OPTS "$ROOTFS_TARBALL" | ||
94 | |||
95 | DIRCHECK=`ls -l "$SDK_ROOTFS_DIR" | wc -l` | ||
96 | if [ "$DIRCHECK" -lt 5 ]; then | ||
97 | echo "Warning: I don't see many files in $SDK_ROOTFS_DIR" | ||
98 | echo "Please double-check the extraction worked as intended" | ||
99 | exit 0 | ||
100 | fi | ||
101 | |||
102 | echo "SDK image successfully extracted to $SDK_ROOTFS_DIR" | ||
103 | |||
104 | exit 0 | ||
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs new file mode 100755 index 0000000000..d3b27be291 --- /dev/null +++ b/scripts/runqemu-gen-tapdevs | |||
@@ -0,0 +1,91 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Create a "bank" of tap network devices that can be used by the | ||
4 | # runqemu script. This script needs to be run as root, and will | ||
5 | # use the tunctl binary from the build system sysroot. Note: many Linux | ||
6 | # distros these days still use an older version of tunctl which does not | ||
7 | # support the group permissions option, hence the need to use the build | ||
8 | # system provided version. | ||
9 | # | ||
10 | # Copyright (C) 2010 Intel Corp. | ||
11 | # | ||
12 | # This program is free software; you can redistribute it and/or modify | ||
13 | # it under the terms of the GNU General Public License version 2 as | ||
14 | # published by the Free Software Foundation. | ||
15 | # | ||
16 | # This program is distributed in the hope that it will be useful, | ||
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | # GNU General Public License for more details. | ||
20 | # | ||
21 | # You should have received a copy of the GNU General Public License along | ||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
24 | |||
25 | usage() { | ||
26 | echo "Usage: sudo $0 <uid> <gid> <num> <native-sysroot-basedir>" | ||
27 | echo "Where <uid> is the numeric user id the tap devices will be owned by" | ||
28 | echo "Where <gid> is the numeric group id the tap devices will be owned by" | ||
29 | echo "<num> is the number of tap devices to create (0 to remove all)" | ||
30 | echo "<native-sysroot-basedir> is the path to the build system's native sysroot" | ||
31 | exit 1 | ||
32 | } | ||
33 | |||
34 | if [ $EUID -ne 0 ]; then | ||
35 | echo "Error: This script must be run with root privileges" | ||
36 | exit | ||
37 | fi | ||
38 | |||
39 | if [ $# -ne 4 ]; then | ||
40 | echo "Error: Incorrect number of arguments" | ||
41 | usage | ||
42 | fi | ||
43 | |||
44 | TUID=$1 | ||
45 | GID=$2 | ||
46 | COUNT=$3 | ||
47 | SYSROOT=$4 | ||
48 | |||
49 | TUNCTL=$SYSROOT/usr/bin/tunctl | ||
50 | if [[ ! -x "$TUNCTL" || -d "$TUNCTL" ]]; then | ||
51 | echo "Error: $TUNCTL is not an executable" | ||
52 | usage | ||
53 | fi | ||
54 | |||
55 | SCRIPT_DIR=`dirname $0` | ||
56 | RUNQEMU_IFUP="$SCRIPT_DIR/runqemu-ifup" | ||
57 | if [ ! -x "$RUNQEMU_IFUP" ]; then | ||
58 | echo "Error: Unable to find the runqemu-ifup script in $SCRIPT_DIR" | ||
59 | exit 1 | ||
60 | fi | ||
61 | |||
62 | IFCONFIG=`which ip 2> /dev/null` | ||
63 | if [ -z "$IFCONFIG" ]; then | ||
64 | # Is it ever anywhere else? | ||
65 | IFCONFIG=/sbin/ip | ||
66 | fi | ||
67 | if [ ! -x "$IFCONFIG" ]; then | ||
68 | echo "$IFCONFIG cannot be executed" | ||
69 | exit 1 | ||
70 | fi | ||
71 | |||
72 | # Ensure we start with a clean slate | ||
73 | for tap in `$IFCONFIG link | grep tap | awk '{ print \$2 }' | sed s/://`; do | ||
74 | echo "Note: Destroying pre-existing tap interface $tap..." | ||
75 | $TUNCTL -d $tap | ||
76 | done | ||
77 | |||
78 | echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..." | ||
79 | for ((index=0; index < $COUNT; index++)); do | ||
80 | echo "Creating tap$index" | ||
81 | ifup=`$RUNQEMU_IFUP $TUID $GID $SYSROOT 2>&1` | ||
82 | if [ $? -ne 0 ]; then | ||
83 | echo "Error running tunctl: $ifup" | ||
84 | exit 1 | ||
85 | fi | ||
86 | done | ||
87 | |||
88 | # The runqemu script will check for this file, and if it exists, | ||
89 | # will use the existing bank of tap devices without creating | ||
90 | # additional ones via sudo. | ||
91 | touch /etc/runqemu-nosudo | ||
diff --git a/scripts/runqemu-ifdown b/scripts/runqemu-ifdown new file mode 100755 index 0000000000..8f66cfa2a9 --- /dev/null +++ b/scripts/runqemu-ifdown | |||
@@ -0,0 +1,66 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # QEMU network configuration script to bring down tap devices. This | ||
4 | # utility needs to be run as root, and will use the tunctl binary | ||
5 | # from the native sysroot. | ||
6 | # | ||
7 | # If you find yourself calling this script a lot, you can add the | ||
8 | # the following to your /etc/sudoers file to be able to run this | ||
9 | # command without entering your password each time: | ||
10 | # | ||
11 | # <my-username> ALL=NOPASSWD: /path/to/runqemu-ifup | ||
12 | # <my-username> ALL=NOPASSWD: /path/to/runqemu-ifdown | ||
13 | # | ||
14 | # Copyright (c) 2006-2011 Linux Foundation | ||
15 | # | ||
16 | # This program is free software; you can redistribute it and/or modify | ||
17 | # it under the terms of the GNU General Public License version 2 as | ||
18 | # published by the Free Software Foundation. | ||
19 | # | ||
20 | # This program is distributed in the hope that it will be useful, | ||
21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
23 | # GNU General Public License for more details. | ||
24 | # | ||
25 | # You should have received a copy of the GNU General Public License along | ||
26 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
27 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
28 | |||
29 | usage() { | ||
30 | echo "sudo $(basename $0) <tap-dev> <native-sysroot-basedir>" | ||
31 | } | ||
32 | |||
33 | if [ $EUID -ne 0 ]; then | ||
34 | echo "Error: This script (runqemu-ifdown) must be run with root privileges" | ||
35 | exit 1 | ||
36 | fi | ||
37 | |||
38 | if [ $# -ne 2 ]; then | ||
39 | usage | ||
40 | exit 1 | ||
41 | fi | ||
42 | |||
43 | TAP=$1 | ||
44 | NATIVE_SYSROOT_DIR=$2 | ||
45 | |||
46 | TUNCTL=$NATIVE_SYSROOT_DIR/usr/bin/tunctl | ||
47 | if [ ! -e "$TUNCTL" ]; then | ||
48 | echo "Error: Unable to find tunctl binary in '$NATIVE_SYSROOT_DIR/usr/bin', please bitbake qemu-helper-native" | ||
49 | exit 1 | ||
50 | fi | ||
51 | |||
52 | $TUNCTL -d $TAP | ||
53 | |||
54 | # cleanup the remaining iptables rules | ||
55 | IPTABLES=`which iptables 2> /dev/null` | ||
56 | if [ "x$IPTABLES" = "x" ]; then | ||
57 | IPTABLES=/sbin/iptables | ||
58 | fi | ||
59 | if [ ! -x "$IPTABLES" ]; then | ||
60 | echo "$IPTABLES cannot be executed" | ||
61 | exit 1 | ||
62 | fi | ||
63 | n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] | ||
64 | dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] | ||
65 | $IPTABLES -D POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32 | ||
66 | $IPTABLES -D POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$dest/32 | ||
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup new file mode 100755 index 0000000000..b5a3db964b --- /dev/null +++ b/scripts/runqemu-ifup | |||
@@ -0,0 +1,106 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # QEMU network interface configuration script. This utility needs to | ||
4 | # be run as root, and will use the tunctl binary from a native sysroot. | ||
5 | # Note: many Linux distros these days still use an older version of | ||
6 | # tunctl which does not support the group permissions option, hence | ||
7 | # the need to use build system's version. | ||
8 | # | ||
9 | # If you find yourself calling this script a lot, you can add the | ||
10 | # the following to your /etc/sudoers file to be able to run this | ||
11 | # command without entering your password each time: | ||
12 | # | ||
13 | # <my-username> ALL=NOPASSWD: /path/to/runqemu-ifup | ||
14 | # <my-username> ALL=NOPASSWD: /path/to/runqemu-ifdown | ||
15 | # | ||
16 | # If you'd like to create a bank of tap devices at once, you should use | ||
17 | # the runqemu-gen-tapdevs script instead. If tap devices are set up using | ||
18 | # that script, the runqemu script will never end up calling this | ||
19 | # script. | ||
20 | # | ||
21 | # Copyright (c) 2006-2011 Linux Foundation | ||
22 | # | ||
23 | # This program is free software; you can redistribute it and/or modify | ||
24 | # it under the terms of the GNU General Public License version 2 as | ||
25 | # published by the Free Software Foundation. | ||
26 | # | ||
27 | # This program is distributed in the hope that it will be useful, | ||
28 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
30 | # GNU General Public License for more details. | ||
31 | # | ||
32 | # You should have received a copy of the GNU General Public License along | ||
33 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
34 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
35 | |||
36 | usage() { | ||
37 | echo "sudo $(basename $0) <uid> <gid> <native-sysroot-basedir>" | ||
38 | } | ||
39 | |||
40 | if [ $EUID -ne 0 ]; then | ||
41 | echo "Error: This script (runqemu-ifup) must be run with root privileges" | ||
42 | exit 1 | ||
43 | fi | ||
44 | |||
45 | if [ $# -ne 3 ]; then | ||
46 | usage | ||
47 | exit 1 | ||
48 | fi | ||
49 | |||
50 | USERID="-u $1" | ||
51 | GROUP="-g $2" | ||
52 | NATIVE_SYSROOT_DIR=$3 | ||
53 | |||
54 | TUNCTL=$NATIVE_SYSROOT_DIR/usr/bin/tunctl | ||
55 | if [ ! -x "$TUNCTL" ]; then | ||
56 | echo "Error: Unable to find tunctl binary in '$NATIVE_SYSROOT_DIR/usr/bin', please bitbake qemu-helper-native" | ||
57 | exit 1 | ||
58 | fi | ||
59 | |||
60 | TAP=`$TUNCTL -b $GROUP 2>&1` | ||
61 | STATUS=$? | ||
62 | if [ $STATUS -ne 0 ]; then | ||
63 | # If tunctl -g fails, try using tunctl -u, for older host kernels | ||
64 | # which do not support the TUNSETGROUP ioctl | ||
65 | TAP=`$TUNCTL -b $USERID 2>&1` | ||
66 | STATUS=$? | ||
67 | if [ $STATUS -ne 0 ]; then | ||
68 | echo "tunctl failed:" | ||
69 | exit 1 | ||
70 | fi | ||
71 | fi | ||
72 | |||
73 | IFCONFIG=`which ip 2> /dev/null` | ||
74 | if [ "x$IFCONFIG" = "x" ]; then | ||
75 | # better than nothing... | ||
76 | IFCONFIG=/sbin/ip | ||
77 | fi | ||
78 | if [ ! -x "$IFCONFIG" ]; then | ||
79 | echo "$IFCONFIG cannot be executed" | ||
80 | exit 1 | ||
81 | fi | ||
82 | |||
83 | IPTABLES=`which iptables 2> /dev/null` | ||
84 | if [ "x$IPTABLES" = "x" ]; then | ||
85 | IPTABLES=/sbin/iptables | ||
86 | fi | ||
87 | if [ ! -x "$IPTABLES" ]; then | ||
88 | echo "$IPTABLES cannot be executed" | ||
89 | exit 1 | ||
90 | fi | ||
91 | |||
92 | n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] | ||
93 | $IFCONFIG addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP | ||
94 | $IFCONFIG link set dev $TAP up | ||
95 | |||
96 | dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] | ||
97 | $IFCONFIG route add to 192.168.7.$dest dev $TAP | ||
98 | |||
99 | # setup NAT for tap0 interface to have internet access in QEMU | ||
100 | $IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32 | ||
101 | $IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$dest/32 | ||
102 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
103 | echo 1 > /proc/sys/net/ipv4/conf/$TAP/proxy_arp | ||
104 | $IPTABLES -P FORWARD ACCEPT | ||
105 | |||
106 | echo $TAP | ||
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal new file mode 100755 index 0000000000..38745dd126 --- /dev/null +++ b/scripts/runqemu-internal | |||
@@ -0,0 +1,659 @@ | |||
1 | #!/bin/bash -x | ||
2 | |||
3 | # Handle running OE images under qemu | ||
4 | # | ||
5 | # Copyright (C) 2006-2011 Linux Foundation | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License version 2 as | ||
9 | # published by the Free Software Foundation. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along | ||
17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | |||
20 | # Call setting: | ||
21 | # QEMU_MEMORY (optional) - set the amount of memory in the emualted system. | ||
22 | # SERIAL_LOGFILE (optional) - log the serial port output to a file | ||
23 | # | ||
24 | # Image options: | ||
25 | # MACHINE - the machine to run | ||
26 | # FSTYPE - the image type to run | ||
27 | # KERNEL - the kernel image file to use | ||
28 | # ROOTFS - the disk image file to use | ||
29 | # | ||
30 | |||
31 | |||
32 | mem_size=-1 | ||
33 | |||
34 | #Get rid of <> and get the contents of extra qemu running params | ||
35 | SCRIPT_QEMU_EXTRA_OPT=`echo $SCRIPT_QEMU_EXTRA_OPT | sed -e 's/<//' -e 's/>//'` | ||
36 | #if user set qemu memory, eg: -m 256 in qemu extra params, we need to do some | ||
37 | # validation check | ||
38 | mem_set=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-m[[:space:]] *[0-9]*\)'` | ||
39 | if [ ! -z "$mem_set" ] ; then | ||
40 | #Get memory setting size from user input | ||
41 | mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'` | ||
42 | else | ||
43 | case "$MACHINE" in | ||
44 | "qemux86") | ||
45 | mem_size=256 | ||
46 | ;; | ||
47 | "qemux86-64") | ||
48 | mem_size=256 | ||
49 | ;; | ||
50 | "qemuarm") | ||
51 | mem_size=128 | ||
52 | ;; | ||
53 | "qemumicroblaze") | ||
54 | mem_size=64 | ||
55 | ;; | ||
56 | "qemumips"|"qemumips64") | ||
57 | mem_size=256 | ||
58 | ;; | ||
59 | "qemuppc") | ||
60 | mem_size=256 | ||
61 | ;; | ||
62 | "qemush4") | ||
63 | mem_size=1024 | ||
64 | ;; | ||
65 | "qemuzynq") | ||
66 | mem_size=1024 | ||
67 | ;; | ||
68 | *) | ||
69 | mem_size=64 | ||
70 | ;; | ||
71 | esac | ||
72 | |||
73 | fi | ||
74 | |||
75 | # QEMU_MEMORY has 'M' appended to mem_size | ||
76 | QEMU_MEMORY="$mem_size"M | ||
77 | |||
78 | # Bug 433: qemuarm cannot use > 256 MB RAM | ||
79 | if [ "$MACHINE" = "qemuarm" ]; then | ||
80 | if [ -z "$mem_size" -o $mem_size -gt 256 ]; then | ||
81 | echo "WARNING: qemuarm does not support > 256M of RAM." | ||
82 | echo "Changing QEMU_MEMORY to default of 256M." | ||
83 | QEMU_MEMORY="256M" | ||
84 | mem_size="256" | ||
85 | SCRIPT_QEMU_EXTRA_OPT=`echo $SCRIPT_QEMU_EXTRA_OPT | sed -e "s/$mem_set/-m 256/" ` | ||
86 | fi | ||
87 | fi | ||
88 | |||
89 | # We need to specify -m <mem_size> to overcome a bug in qemu 0.14.0 | ||
90 | # https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/584480 | ||
91 | |||
92 | if [ -z "$mem_set" ] ; then | ||
93 | SCRIPT_QEMU_EXTRA_OPT="$SCRIPT_QEMU_EXTRA_OPT -m $mem_size" | ||
94 | fi | ||
95 | # This file is created when runqemu-gen-tapdevs creates a bank of tap | ||
96 | # devices, indicating that the user should not bring up new ones using | ||
97 | # sudo. | ||
98 | NOSUDO_FLAG="/etc/runqemu-nosudo" | ||
99 | |||
100 | QEMUIFUP=`which runqemu-ifup 2> /dev/null` | ||
101 | QEMUIFDOWN=`which runqemu-ifdown 2> /dev/null` | ||
102 | if [ -z "$QEMUIFUP" -o ! -x "$QEMUIFUP" ]; then | ||
103 | echo "runqemu-ifup cannot be found or executed" | ||
104 | exit 1 | ||
105 | fi | ||
106 | if [ -z "$QEMUIFDOWN" -o ! -x "$QEMUIFDOWN" ]; then | ||
107 | echo "runqemu-ifdown cannot be found or executed" | ||
108 | exit 1 | ||
109 | fi | ||
110 | |||
111 | NFSRUNNING="false" | ||
112 | |||
113 | #capture original stty values | ||
114 | ORIG_STTY=$(stty -g) | ||
115 | |||
116 | if [ "$SLIRP_ENABLED" = "yes" ]; then | ||
117 | KERNEL_NETWORK_CMD="ip=dhcp" | ||
118 | QEMU_TAP_CMD="" | ||
119 | QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" | ||
120 | if [ "$KVM_ACTIVE" = "yes" ]; then | ||
121 | QEMU_NETWORK_CMD="" | ||
122 | DROOT="/dev/vda" | ||
123 | ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio" | ||
124 | else | ||
125 | QEMU_NETWORK_CMD="" | ||
126 | DROOT="/dev/hda" | ||
127 | ROOTFS_OPTIONS="-hda $ROOTFS" | ||
128 | fi | ||
129 | |||
130 | else | ||
131 | acquire_lock() { | ||
132 | lockfile=$1 | ||
133 | if [ -z "$lockfile" ]; then | ||
134 | echo "Error: missing lockfile arg passed to acquire_lock()" | ||
135 | return 1 | ||
136 | fi | ||
137 | |||
138 | touch $lockfile.lock | ||
139 | exec 8>$lockfile.lock | ||
140 | flock -n -x 8 | ||
141 | if [ $? -ne 0 ]; then | ||
142 | exec 8>&- | ||
143 | return 1 | ||
144 | fi | ||
145 | |||
146 | return 0 | ||
147 | } | ||
148 | |||
149 | release_lock() { | ||
150 | lockfile=$1 | ||
151 | if [ -z "$lockfile" ]; then | ||
152 | echo "Error: missing lockfile arg passed to release_lock()" | ||
153 | return 1 | ||
154 | fi | ||
155 | |||
156 | rm -f $lockfile.lock | ||
157 | exec 8>&- | ||
158 | } | ||
159 | |||
160 | LOCKDIR="/tmp/qemu-tap-locks" | ||
161 | if [ ! -d "$LOCKDIR" ]; then | ||
162 | mkdir $LOCKDIR | ||
163 | chmod 777 $LOCKDIR | ||
164 | fi | ||
165 | |||
166 | IFCONFIG=`which ip 2> /dev/null` | ||
167 | if [ -z "$IFCONFIG" ]; then | ||
168 | IFCONFIG=/sbin/ip | ||
169 | fi | ||
170 | if [ ! -x "$IFCONFIG" ]; then | ||
171 | echo "$IFCONFIG cannot be executed" | ||
172 | exit 1 | ||
173 | fi | ||
174 | |||
175 | POSSIBLE=`$IFCONFIG link | grep 'tap' | awk '{print $2}' | sed s/://` | ||
176 | TAP="" | ||
177 | LOCKFILE="" | ||
178 | USE_PRECONF_TAP="no" | ||
179 | for tap in $POSSIBLE; do | ||
180 | LOCKFILE="$LOCKDIR/$tap" | ||
181 | if [ -e "$LOCKFILE.skip" ]; then | ||
182 | echo "Found $LOCKFILE.skip, skipping $tap" | ||
183 | continue | ||
184 | fi | ||
185 | echo "Acquiring lockfile for $tap..." | ||
186 | acquire_lock $LOCKFILE | ||
187 | if [ $? -eq 0 ]; then | ||
188 | TAP=$tap | ||
189 | USE_PRECONF_TAP="yes" | ||
190 | break | ||
191 | fi | ||
192 | done | ||
193 | |||
194 | if [ "$TAP" = "" ]; then | ||
195 | if [ -e "$NOSUDO_FLAG" ]; then | ||
196 | echo "Error: There are no available tap devices to use for networking," | ||
197 | echo "and I see $NOSUDO_FLAG exists, so I am not going to try creating" | ||
198 | echo "a new one with sudo." | ||
199 | exit 1 | ||
200 | fi | ||
201 | |||
202 | GROUPID=`id -g` | ||
203 | USERID=`id -u` | ||
204 | echo "Setting up tap interface under sudo" | ||
205 | # Redirect stderr since we could see a LD_PRELOAD warning here if pseudo is loaded | ||
206 | # but inactive. This looks scary but is harmless | ||
207 | tap=`sudo $QEMUIFUP $USERID $GROUPID $OECORE_NATIVE_SYSROOT 2> /dev/null` | ||
208 | if [ $? -ne 0 ]; then | ||
209 | # Re-run standalone to see verbose errors | ||
210 | sudo $QEMUIFUP $USERID $GROUPID $OECORE_NATIVE_SYSROOT | ||
211 | return 1 | ||
212 | fi | ||
213 | LOCKFILE="$LOCKDIR/$tap" | ||
214 | echo "Acquiring lockfile for $tap..." | ||
215 | acquire_lock $LOCKFILE | ||
216 | if [ $? -eq 0 ]; then | ||
217 | TAP=$tap | ||
218 | fi | ||
219 | else | ||
220 | echo "Using preconfigured tap device '$TAP'" | ||
221 | echo "If this is not intended, touch $LOCKFILE.skip to make runqemu skip $TAP." | ||
222 | fi | ||
223 | |||
224 | cleanup() { | ||
225 | if [ ! -e "$NOSUDO_FLAG" -a "$USE_PRECONF_TAP" = "no" ]; then | ||
226 | # Redirect stderr since we could see a LD_PRELOAD warning here if pseudo is loaded | ||
227 | # but inactive. This looks scary but is harmless | ||
228 | sudo $QEMUIFDOWN $TAP $OECORE_NATIVE_SYSROOT 2> /dev/null | ||
229 | fi | ||
230 | echo "Releasing lockfile of preconfigured tap device '$TAP'" | ||
231 | release_lock $LOCKFILE | ||
232 | |||
233 | if [ "$NFSRUNNING" = "true" ]; then | ||
234 | echo "Shutting down the userspace NFS server..." | ||
235 | echo "runqemu-export-rootfs stop $ROOTFS" | ||
236 | runqemu-export-rootfs stop $ROOTFS | ||
237 | fi | ||
238 | # If QEMU crashes or somehow tty properties are not restored | ||
239 | # after qemu exits, we need to run stty sane | ||
240 | #stty sane | ||
241 | |||
242 | #instead of using stty sane we set the original stty values | ||
243 | stty ${ORIG_STTY} | ||
244 | |||
245 | } | ||
246 | |||
247 | |||
248 | n0=$(echo $TAP | sed 's/tap//') | ||
249 | n1=$(($n0 * 2 + 1)) | ||
250 | n2=$(($n1 + 1)) | ||
251 | |||
252 | KERNEL_NETWORK_CMD="ip=192.168.7.$n2::192.168.7.$n1:255.255.255.0" | ||
253 | QEMU_TAP_CMD="-net tap,vlan=0,ifname=$TAP,script=no,downscript=no" | ||
254 | if [ "$KVM_ACTIVE" = "yes" ]; then | ||
255 | QEMU_NETWORK_CMD="-net nic,model=virtio $QEMU_TAP_CMD,vhost=on" | ||
256 | DROOT="/dev/vda" | ||
257 | ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio" | ||
258 | else | ||
259 | QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD" | ||
260 | DROOT="/dev/hda" | ||
261 | ROOTFS_OPTIONS="-hda $ROOTFS" | ||
262 | fi | ||
263 | KERNCMDLINE="mem=$QEMU_MEMORY" | ||
264 | QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" | ||
265 | |||
266 | NFS_INSTANCE=`echo $TAP | sed 's/tap//'` | ||
267 | export NFS_INSTANCE | ||
268 | |||
269 | SERIALOPTS="" | ||
270 | if [ "x$SERIAL_LOGFILE" != "x" ]; then | ||
271 | SERIALOPTS="-serial file:$SERIAL_LOGFILE" | ||
272 | fi | ||
273 | fi | ||
274 | |||
275 | case "$MACHINE" in | ||
276 | "qemuarm") ;; | ||
277 | "qemumicroblaze") ;; | ||
278 | "qemumips") ;; | ||
279 | "qemumipsel") ;; | ||
280 | "qemumips64") ;; | ||
281 | "qemush4") ;; | ||
282 | "qemuppc") ;; | ||
283 | "qemuarmv6") ;; | ||
284 | "qemuarmv7") ;; | ||
285 | "qemux86") ;; | ||
286 | "qemux86-64") ;; | ||
287 | "qemuzynq") ;; | ||
288 | "akita") ;; | ||
289 | "spitz") ;; | ||
290 | *) | ||
291 | echo "Error: Unsupported machine type $MACHINE" | ||
292 | return 1 | ||
293 | ;; | ||
294 | esac | ||
295 | |||
296 | if [ ! -f "$KERNEL" -a "x$FSTYPE" != "xvmdk" ]; then | ||
297 | echo "Error: Kernel image file $KERNEL doesn't exist" | ||
298 | cleanup | ||
299 | return 1 | ||
300 | fi | ||
301 | |||
302 | if [ "$FSTYPE" != "nfs" -a "$FSTYPE" != "vmdk" -a ! -f "$ROOTFS" ]; then | ||
303 | echo "Error: Image file $ROOTFS doesn't exist" | ||
304 | cleanup | ||
305 | return 1 | ||
306 | fi | ||
307 | |||
308 | if [ "$NFS_SERVER" = "" ]; then | ||
309 | NFS_SERVER="192.168.7.1" | ||
310 | if [ "$SLIRP_ENABLED" = "yes" ]; then | ||
311 | NFS_SERVER="10.0.2.2" | ||
312 | fi | ||
313 | fi | ||
314 | |||
315 | if [ "$FSTYPE" = "nfs" ]; then | ||
316 | NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'` | ||
317 | if [ "$NFS_INSTANCE" = "" ] ; then | ||
318 | NFS_INSTANCE=0 | ||
319 | fi | ||
320 | MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ] | ||
321 | NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ] | ||
322 | NFSD_PORT=$[ 3049 + 2 * $NFS_INSTANCE ] | ||
323 | MOUNTD_PORT=$[ 3048 + 2 * $NFS_INSTANCE ] | ||
324 | UNFS_OPTS="nfsvers=3,port=$NFSD_PORT,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,mountport=$MOUNTD_PORT" | ||
325 | |||
326 | PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo | ||
327 | export PSEUDO_LOCALSTATEDIR | ||
328 | |||
329 | # Start the userspace NFS server | ||
330 | echo "runqemu-export-rootfs restart $ROOTFS" | ||
331 | runqemu-export-rootfs restart $ROOTFS | ||
332 | if [ $? != 0 ]; then | ||
333 | return 1 | ||
334 | fi | ||
335 | NFSRUNNING="true" | ||
336 | fi | ||
337 | |||
338 | if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then | ||
339 | QEMU=qemu-system-arm | ||
340 | MACHINE_SUBTYPE=versatilepb | ||
341 | export QEMU_AUDIO_DRV="none" | ||
342 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | ||
343 | # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer" | ||
344 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
345 | KERNCMDLINE="root=/dev/sda rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off" | ||
346 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS" | ||
347 | fi | ||
348 | if [ "$FSTYPE" = "nfs" ]; then | ||
349 | if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then | ||
350 | echo "Error: NFS mount point $ROOTFS doesn't exist" | ||
351 | cleanup | ||
352 | return 1 | ||
353 | fi | ||
354 | KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
355 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} --no-reboot $QEMU_UI_OPTIONS" | ||
356 | fi | ||
357 | if [ "$MACHINE" = "qemuarmv6" ]; then | ||
358 | QEMUOPTIONS="$QEMUOPTIONS -cpu arm1136" | ||
359 | fi | ||
360 | if [ "$MACHINE" = "qemuarmv7" ]; then | ||
361 | QEMUOPTIONS="$QEMUOPTIONS -cpu cortex-a8" | ||
362 | fi | ||
363 | fi | ||
364 | |||
365 | if [ "$MACHINE" = "qemux86" ]; then | ||
366 | QEMU=qemu-system-i386 | ||
367 | if [ "$KVM_ACTIVE" = "yes" ]; then | ||
368 | CPU_SUBTYPE=kvm32 | ||
369 | else | ||
370 | CPU_SUBTYPE=qemu32 | ||
371 | fi | ||
372 | if [ ! -z "$vga_option" ]; then | ||
373 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | ||
374 | else | ||
375 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware" | ||
376 | fi | ||
377 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
378 | KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" | ||
379 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" | ||
380 | fi | ||
381 | if [ "$FSTYPE" = "nfs" ]; then | ||
382 | if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then | ||
383 | echo "Error: NFS mount point $ROOTFS doesn't exist." | ||
384 | cleanup | ||
385 | return 1 | ||
386 | fi | ||
387 | KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
388 | QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" | ||
389 | fi | ||
390 | if [ "$FSTYPE" = "vmdk" ]; then | ||
391 | QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS" | ||
392 | fi | ||
393 | # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in | ||
394 | # qemux86 and qemux86-64. We can use timer interrupt mode for now. | ||
395 | KERNCMDLINE="$KERNCMDLINE oprofile.timer=1" | ||
396 | fi | ||
397 | |||
398 | if [ "$MACHINE" = "qemux86-64" ]; then | ||
399 | QEMU=qemu-system-x86_64 | ||
400 | if [ "$KVM_ACTIVE" = "yes" ]; then | ||
401 | CPU_SUBTYPE=kvm64 | ||
402 | else | ||
403 | CPU_SUBTYPE=core2duo | ||
404 | fi | ||
405 | if [ ! -z "$vga_option" ]; then | ||
406 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | ||
407 | else | ||
408 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware" | ||
409 | fi | ||
410 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
411 | KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" | ||
412 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" | ||
413 | fi | ||
414 | if [ "$FSTYPE" = "nfs" ]; then | ||
415 | if [ "x$ROOTFS" = "x" ]; then | ||
416 | ROOTFS=/srv/nfs/qemux86-64 | ||
417 | fi | ||
418 | if [ ! -d "$ROOTFS" ]; then | ||
419 | echo "Error: NFS mount point $ROOTFS doesn't exist." | ||
420 | cleanup | ||
421 | return 1 | ||
422 | fi | ||
423 | KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
424 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $QEMU_UI_OPTIONS" | ||
425 | fi | ||
426 | if [ "$FSTYPE" = "vmdk" ]; then | ||
427 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $QEMU_UI_OPTIONS" | ||
428 | fi | ||
429 | # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in | ||
430 | # qemux86 and qemux86-64. We can use timer interrupt mode for now. | ||
431 | KERNCMDLINE="$KERNCMDLINE oprofile.timer=1" | ||
432 | fi | ||
433 | |||
434 | if [ "$MACHINE" = "spitz" ]; then | ||
435 | QEMU=qemu-system-arm | ||
436 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
437 | echo $ROOTFS | ||
438 | ROOTFS=`readlink -f $ROOTFS` | ||
439 | echo $ROOTFS | ||
440 | if [ ! -e "$ROOTFS.qemudisk" ]; then | ||
441 | echo "Adding a partition table to the ext3 image for use by QEMU, please wait..." | ||
442 | runqemu-addptable2image $ROOTFS $ROOTFS.qemudisk | ||
443 | fi | ||
444 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M spitz -hda $ROOTFS.qemudisk -portrait" | ||
445 | fi | ||
446 | fi | ||
447 | |||
448 | if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then | ||
449 | case "$MACHINE" in | ||
450 | qemumips) QEMU=qemu-system-mips ;; | ||
451 | qemumipsel) QEMU=qemu-system-mipsel ;; | ||
452 | qemumips64) QEMU=qemu-system-mips64 ;; | ||
453 | esac | ||
454 | MACHINE_SUBTYPE=malta | ||
455 | QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS" | ||
456 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
457 | #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
458 | KERNCMDLINE="root=/dev/hda rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
459 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS" | ||
460 | fi | ||
461 | if [ "$FSTYPE" = "nfs" ]; then | ||
462 | if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then | ||
463 | echo "Error: NFS mount point $ROOTFS doesn't exist" | ||
464 | cleanup | ||
465 | return 1 | ||
466 | fi | ||
467 | KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
468 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS" | ||
469 | fi | ||
470 | fi | ||
471 | |||
472 | if [ "$MACHINE" = "qemuppc" ]; then | ||
473 | QEMU=qemu-system-ppc | ||
474 | MACHINE_SUBTYPE=mac99 | ||
475 | CPU_SUBTYPE=G4 | ||
476 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | ||
477 | if [ "$SLIRP_ENABLED" = "yes" ]; then | ||
478 | QEMU_NETWORK_CMD="" | ||
479 | else | ||
480 | QEMU_NETWORK_CMD="-net nic,model=pcnet $QEMU_TAP_CMD" | ||
481 | fi | ||
482 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
483 | KERNCMDLINE="root=/dev/hda rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
484 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS" | ||
485 | fi | ||
486 | if [ "$FSTYPE" = "nfs" ]; then | ||
487 | if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then | ||
488 | echo "Error: NFS mount point $ROOTFS doesn't exist" | ||
489 | cleanup | ||
490 | return 1 | ||
491 | fi | ||
492 | KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
493 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS" | ||
494 | fi | ||
495 | fi | ||
496 | |||
497 | if [ "$MACHINE" = "qemush4" ]; then | ||
498 | QEMU=qemu-system-sh4 | ||
499 | MACHINE_SUBTYPE=r2d | ||
500 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | ||
501 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
502 | #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
503 | KERNCMDLINE="root=/dev/hda rw console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
504 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio" | ||
505 | SERIALSTDIO="1" | ||
506 | fi | ||
507 | if [ "$FSTYPE" = "nfs" ]; then | ||
508 | if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then | ||
509 | echo "Error: NFS mount point $ROOTFS doesn't exist" | ||
510 | cleanup | ||
511 | return 1 | ||
512 | fi | ||
513 | KERNCMDLINE="root=/dev/nfs console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | ||
514 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio" | ||
515 | SERIALSTDIO="1" | ||
516 | fi | ||
517 | fi | ||
518 | |||
519 | if [ "$MACHINE" = "akita" ]; then | ||
520 | QEMU=qemu-system-arm | ||
521 | if [ "$FSTYPE" = "jffs2" ]; then | ||
522 | ROOTFS=`readlink -f $ROOTFS` | ||
523 | if [ ! -e "$ROOTFS.qemuflash" ]; then | ||
524 | echo "Converting raw image into flash image format for use by QEMU, please wait..." | ||
525 | raw2flash.akita < $ROOTFS > $ROOTFS.qemuflash | ||
526 | fi | ||
527 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M akita -mtdblock $ROOTFS.qemuflash -portrait" | ||
528 | fi | ||
529 | fi | ||
530 | |||
531 | if [ "$MACHINE" = "qemumicroblaze" ]; then | ||
532 | QEMU=qemu-system-microblazeel | ||
533 | QEMU_SYSTEM_OPTIONS="-M petalogix-ml605 -serial mon:stdio -dtb $KERNEL-$MACHINE.dtb" | ||
534 | if [ "${FSTYPE:0:3}" = "ext" -o "${FSTYPE:0:4}" = "cpio" ]; then | ||
535 | KERNCMDLINE="earlyprintk root=/dev/ram rw" | ||
536 | QEMUOPTIONS="$QEMU_SYSTEM_OPTIONS -initrd $ROOTFS" | ||
537 | fi | ||
538 | fi | ||
539 | |||
540 | if [ "$MACHINE" = "qemuzynq" ]; then | ||
541 | QEMU=qemu-system-arm | ||
542 | QEMU_SYSTEM_OPTIONS="-M xilinx-zynq-a9 -serial null -serial mon:stdio -dtb $KERNEL-$MACHINE.dtb" | ||
543 | # zynq serial ports are named 'ttyPS0' and 'ttyPS1', fixup the default values | ||
544 | SCRIPT_KERNEL_OPT=$(echo "$SCRIPT_KERNEL_OPT" | sed 's/console=ttyS/console=ttyPS/g') | ||
545 | if [ "${FSTYPE:0:3}" = "ext" -o "${FSTYPE:0:4}" = "cpio" ]; then | ||
546 | KERNCMDLINE="earlyprintk root=/dev/ram rw" | ||
547 | QEMUOPTIONS="$QEMU_SYSTEM_OPTIONS -initrd $ROOTFS" | ||
548 | fi | ||
549 | fi | ||
550 | |||
551 | if [ "x$RAMFS" = "xtrue" ]; then | ||
552 | QEMUOPTIONS="-initrd $ROOTFS -nographic" | ||
553 | KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell" | ||
554 | fi | ||
555 | |||
556 | if [ "x$ISOFS" = "xtrue" ]; then | ||
557 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cdrom $ROOTFS $QEMU_UI_OPTIONS" | ||
558 | fi | ||
559 | |||
560 | if [ "x$QEMUOPTIONS" = "x" ]; then | ||
561 | echo "Error: Unable to support this combination of options" | ||
562 | cleanup | ||
563 | return 1 | ||
564 | fi | ||
565 | |||
566 | PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$PATH | ||
567 | |||
568 | QEMUBIN=`which $QEMU 2> /dev/null` | ||
569 | if [ ! -x "$QEMUBIN" ]; then | ||
570 | echo "Error: No QEMU binary '$QEMU' could be found." | ||
571 | cleanup | ||
572 | return 1 | ||
573 | fi | ||
574 | |||
575 | NEED_GL=`ldd $QEMUBIN/$QEMU 2>&1 | grep libGLU` | ||
576 | # We can't run without a libGL.so | ||
577 | if [ "$NEED_GL" != "" ]; then | ||
578 | libgl='no' | ||
579 | |||
580 | [ -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so ] && libgl='yes' | ||
581 | [ -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so ] && libgl='yes' | ||
582 | [ -e /usr/lib/*-linux-gnu/libGL.so -a -e /usr/lib/*-linux-gnu/libGLU.so ] && libgl='yes' | ||
583 | |||
584 | if [ "$libgl" != 'yes' ]; then | ||
585 | echo "You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator. | ||
586 | Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev. | ||
587 | Fedora package names are: mesa-libGL-devel mesa-libGLU-devel." | ||
588 | return 1; | ||
589 | fi | ||
590 | fi | ||
591 | |||
592 | do_quit() { | ||
593 | cleanup | ||
594 | return 1 | ||
595 | } | ||
596 | |||
597 | trap do_quit INT TERM QUIT | ||
598 | |||
599 | # qemu got segfault if linked with nVidia's libgl | ||
600 | GL_LD_PRELOAD=$LD_PRELOAD | ||
601 | |||
602 | if ldd $QEMUBIN | grep -i nvidia &> /dev/null | ||
603 | then | ||
604 | cat << EOM | ||
605 | WARNING: nVidia proprietary OpenGL libraries detected. | ||
606 | nVidia's OpenGL libraries are known to have compatibility issues with qemu, | ||
607 | resulting in a segfault. Please uninstall these drivers or ensure the mesa libGL | ||
608 | libraries precede nvidia's via LD_PRELOAD(Already do it on Ubuntu 10). | ||
609 | EOM | ||
610 | |||
611 | # Automatically use Ubuntu system's mesa libGL, other distro can add its own path | ||
612 | if grep -i ubuntu /etc/lsb-release &> /dev/null | ||
613 | then | ||
614 | # precede nvidia's driver on Ubuntu 10 | ||
615 | UBUNTU_MAIN_VERSION=`cat /etc/lsb-release |grep DISTRIB_RELEASE |cut -d= -f 2| cut -d. -f 1` | ||
616 | if [ "$UBUNTU_MAIN_VERSION" = "10" ]; | ||
617 | then | ||
618 | GL_PATH="" | ||
619 | if test -e /usr/lib/libGL.so | ||
620 | then | ||
621 | GL_PATH="/usr/lib/libGL.so" | ||
622 | elif test -e /usr/lib/x86_64-linux-gnu/libGL.so | ||
623 | then | ||
624 | GL_PATH="/usr/lib/x86_64-linux-gnu/libGL.so" | ||
625 | fi | ||
626 | |||
627 | echo "Skip nVidia's libGL on Ubuntu 10!" | ||
628 | GL_LD_PRELOAD="$GL_PATH $LD_PRELOAD" | ||
629 | fi | ||
630 | fi | ||
631 | fi | ||
632 | |||
633 | if [ "x$SERIALSTDIO" = "x1" ]; then | ||
634 | echo "Interrupt character is '^]'" | ||
635 | stty intr ^] | ||
636 | fi | ||
637 | |||
638 | echo "Running $QEMU..." | ||
639 | # -no-reboot is a mandatory option - see bug #100 | ||
640 | if [ "$FSTYPE" = "vmdk" ]; then | ||
641 | echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | ||
642 | LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | ||
643 | elif [ "$FSTYPE" = "iso" ]; then | ||
644 | echo $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | ||
645 | LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | ||
646 | else | ||
647 | echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SLIRP_CMD $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"' | ||
648 | LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" | ||
649 | fi | ||
650 | ret=$? | ||
651 | if [ "$SLIRP_ENABLED" != "yes" ]; then | ||
652 | cleanup | ||
653 | fi | ||
654 | |||
655 | #set the original stty values before exit | ||
656 | stty ${ORIG_STTY} | ||
657 | trap - INT TERM QUIT | ||
658 | |||
659 | return $ret | ||
diff --git a/scripts/runqemu.README b/scripts/runqemu.README new file mode 100644 index 0000000000..5908d831a4 --- /dev/null +++ b/scripts/runqemu.README | |||
@@ -0,0 +1,42 @@ | |||
1 | Using OE images with QEMU | ||
2 | ========================= | ||
3 | |||
4 | OE-Core can generate qemu bootable kernels and images with can be used | ||
5 | on a desktop system. The scripts currently support booting ARM, MIPS, PowerPC | ||
6 | and x86 (32 and 64 bit) images. The scripts can be used within the OE build | ||
7 | system or externaly. | ||
8 | |||
9 | The runqemu script is run as: | ||
10 | |||
11 | runqemu <machine> <zimage> <filesystem> | ||
12 | |||
13 | where: | ||
14 | |||
15 | <machine> is the machine/architecture to use (qemuarm/qemumips/qemuppc/qemux86/qemux86-64) | ||
16 | <zimage> is the path to a kernel (e.g. zimage-qemuarm.bin) | ||
17 | <filesystem> is the path to an ext2 image (e.g. filesystem-qemuarm.ext2) or an nfs directory | ||
18 | |||
19 | If <machine> isn't specified, the script will try to detect the machine name | ||
20 | from the name of the <zimage> file. | ||
21 | |||
22 | If <filesystem> isn't specified, nfs booting will be assumed. | ||
23 | |||
24 | When used within the build system, it will default to qemuarm, ext2 and the last kernel and | ||
25 | core-image-sato-sdk image built by the build system. If an sdk image isn't present it will look | ||
26 | for sato and minimal images. | ||
27 | |||
28 | Full usage instructions can be seen by running the command with no options specified. | ||
29 | |||
30 | |||
31 | Notes | ||
32 | ===== | ||
33 | |||
34 | - The scripts run qemu using sudo. Change perms on /dev/net/tun to | ||
35 | run as non root. The runqemu-gen-tapdevs script can also be used by | ||
36 | root to prepopulate the appropriate network devices. | ||
37 | - You can access the host computer at 192.168.7.1 within the image. | ||
38 | - Your qemu system will be accessible as 192.16.7.2. | ||
39 | - The script extracts the root filesystem specified under pseudo and sets up a userspace | ||
40 | NFS server to share the image over by default meaning the filesystem can be accessed by | ||
41 | both the host and guest systems. | ||
42 | |||
diff --git a/scripts/send-error-report b/scripts/send-error-report new file mode 100755 index 0000000000..01c292ead1 --- /dev/null +++ b/scripts/send-error-report | |||
@@ -0,0 +1,114 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # Sends an error report (if the report-error class was enabled) to a remote server. | ||
4 | # | ||
5 | # Copyright (C) 2013 Intel Corporation | ||
6 | # Author: Andreea Proca <andreea.b.proca@intel.com> | ||
7 | |||
8 | |||
9 | |||
10 | import httplib, urllib, os, sys, json, base64 | ||
11 | from urllib2 import _parse_proxy as parseproxy | ||
12 | |||
13 | |||
14 | def handle_connection(server, data): | ||
15 | params = urllib.urlencode({'data': data}) | ||
16 | headers = {"Content-type": "application/json"} | ||
17 | proxyrequired = False | ||
18 | if os.environ.get("http_proxy") or os.environ.get("HTTP_PROXY"): | ||
19 | proxyrequired = True | ||
20 | # we need to check that the server isn't a local one, as in no_proxy | ||
21 | try: | ||
22 | temp = httplib.HTTPConnection(server, strict=True, timeout=5) | ||
23 | temp.request("GET", "/Errors/") | ||
24 | tempres = temp.getresponse() | ||
25 | if tempres.status == 200: | ||
26 | proxyrequired = False | ||
27 | temp.close() | ||
28 | except: | ||
29 | pass | ||
30 | |||
31 | if proxyrequired: | ||
32 | proxy = parseproxy(os.environ.get("http_proxy") or os.environ.get("HTTP_PROXY")) | ||
33 | if proxy[1] and proxy[2]: | ||
34 | auth = base64.encodestring("%s:%s" % (proxy[1], proxy[2])) | ||
35 | headers["Authorization"] = "Basic %s" % auth | ||
36 | conn = httplib.HTTPConnection(proxy[3]) | ||
37 | conn.request("POST", "http://%s/ClientPost/" % server, params, headers) | ||
38 | else: | ||
39 | conn = httplib.HTTPConnection(server) | ||
40 | conn.request("POST", "/ClientPost/", params, headers) | ||
41 | |||
42 | return conn | ||
43 | |||
44 | |||
45 | def sendData(json_file, server): | ||
46 | |||
47 | if os.path.isfile(json_file): | ||
48 | |||
49 | home = os.path.expanduser("~") | ||
50 | userfile = os.path.join(home, ".oe-send-error") | ||
51 | if os.path.isfile(userfile): | ||
52 | with open(userfile) as g: | ||
53 | username = g.readline() | ||
54 | email = g.readline() | ||
55 | else: | ||
56 | print("Please enter your name and your email (optionally), they'll be saved in the file you send.") | ||
57 | username = raw_input("Name: ") | ||
58 | email = raw_input("E-mail (not required): ") | ||
59 | if len(username) > 0 and len(username) < 50: | ||
60 | with open(userfile, "w") as g: | ||
61 | g.write(username + "\n") | ||
62 | g.write(email + "\n") | ||
63 | else: | ||
64 | print("Invalid inputs, try again.") | ||
65 | sys.exit(1) | ||
66 | return | ||
67 | |||
68 | with open(json_file) as f: | ||
69 | data = f.read() | ||
70 | |||
71 | try: | ||
72 | jsondata = json.loads(data) | ||
73 | jsondata['username'] = username.strip() | ||
74 | jsondata['email'] = email.strip() | ||
75 | data = json.dumps(jsondata, indent=4, sort_keys=True) | ||
76 | except: | ||
77 | print("Invalid json data") | ||
78 | sys.exit(1) | ||
79 | return | ||
80 | |||
81 | try: | ||
82 | conn = handle_connection(server, data) | ||
83 | response = conn.getresponse() | ||
84 | print response.status, response.reason | ||
85 | res = response.read() | ||
86 | if response.status == 200: | ||
87 | print(res) | ||
88 | else: | ||
89 | print("There was a problem submiting your data, response written in %s.response.html" % json_file) | ||
90 | with open("%s.response.html" % json_file, "w") as f: | ||
91 | f.write(res) | ||
92 | sys.exit(1) | ||
93 | conn.close() | ||
94 | except Exception as e: | ||
95 | print("Server connection failed: %s" % e) | ||
96 | sys.exit(1) | ||
97 | else: | ||
98 | print("No data file found.") | ||
99 | sys.exit(1) | ||
100 | |||
101 | |||
102 | if __name__ == '__main__': | ||
103 | print ("\nSends an error report (if the report-error class was enabled) to a remote server.") | ||
104 | print("\nThis scripts sends the contents of the error to a public upstream server.") | ||
105 | print("\nPlease remove any identifying information before sending.") | ||
106 | if len(sys.argv) < 2: | ||
107 | print("\nUsage: send-error-report <error_fileName> [server]") | ||
108 | print("\nIf this is the first when sending a report you'll be asked for your name and optionally your email address.") | ||
109 | print("They will be associated with your report.\n") | ||
110 | |||
111 | elif len(sys.argv) == 3: | ||
112 | sendData(sys.argv[1], sys.argv[2]) | ||
113 | else: | ||
114 | sendData(sys.argv[1], "errors.yoctoproject.org") | ||
diff --git a/scripts/send-pull-request b/scripts/send-pull-request new file mode 100755 index 0000000000..575549db38 --- /dev/null +++ b/scripts/send-pull-request | |||
@@ -0,0 +1,179 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Copyright (c) 2010-2011, Intel Corporation. | ||
4 | # All Rights Reserved | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
14 | # the GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | # | ||
20 | |||
21 | # | ||
22 | # This script is intended to be used to send a patch series prepared by the | ||
23 | # create-pull-request script to Open Embedded and The Yocto Project, as well | ||
24 | # as to related projects and layers. | ||
25 | # | ||
26 | |||
27 | AUTO=0 | ||
28 | AUTO_CL=0 | ||
29 | GITSOBCC="--suppress-cc=all" | ||
30 | |||
31 | # Prevent environment leakage to these vars. | ||
32 | unset TO | ||
33 | unset CC | ||
34 | unset AUTO_CC | ||
35 | unset EXTRA_CC | ||
36 | |||
37 | usage() | ||
38 | { | ||
39 | cat <<EOM | ||
40 | Usage: $(basename $0) [-h] [-a] [-c] [[-t email]...] -p pull-dir | ||
41 | -a Send the cover letter to every recipient listed in Cc and | ||
42 | Signed-off-by lines found in the cover letter and the patches. | ||
43 | This option implies -c. | ||
44 | -c Expand the Cc list for the individual patches using the Cc and | ||
45 | Signed-off-by lines from the same patch. | ||
46 | -C Add extra CC to each email sent. | ||
47 | -p pull-dir Directory containing summary and patch files | ||
48 | -t email Explicitly add email to the recipients | ||
49 | EOM | ||
50 | } | ||
51 | |||
52 | # Collect addresses from a patch into AUTO_CC | ||
53 | # $1: a patch file | ||
54 | harvest_recipients() | ||
55 | { | ||
56 | PATCH=$1 | ||
57 | export IFS=$',\n' | ||
58 | for REGX in "^[Cc][Cc]: *" "^[Ss]igned-[Oo]ff-[Bb]y: *"; do | ||
59 | for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do | ||
60 | if [ "${AUTO_CC/$EMAIL/}" == "$AUTO_CC" ] && [ -n "$EMAIL" ]; then | ||
61 | if [ -z "$AUTO_CC" ]; then | ||
62 | AUTO_CC=$EMAIL; | ||
63 | else | ||
64 | AUTO_CC="$AUTO_CC,$EMAIL"; | ||
65 | fi | ||
66 | fi | ||
67 | done | ||
68 | done | ||
69 | unset IFS | ||
70 | } | ||
71 | |||
72 | # Parse and verify arguments | ||
73 | while getopts "acC:hp:t:" OPT; do | ||
74 | case $OPT in | ||
75 | a) | ||
76 | AUTO=1 | ||
77 | GITSOBCC="--signed-off-by-cc" | ||
78 | AUTO_CL=1 | ||
79 | ;; | ||
80 | c) | ||
81 | AUTO=1 | ||
82 | GITSOBCC="--signed-off-by-cc" | ||
83 | ;; | ||
84 | C) | ||
85 | EXTRA_CC="$OPTARG" | ||
86 | ;; | ||
87 | h) | ||
88 | usage | ||
89 | exit 0 | ||
90 | ;; | ||
91 | p) | ||
92 | PDIR=${OPTARG%/} | ||
93 | if [ ! -d $PDIR ]; then | ||
94 | echo "ERROR: pull-dir \"$PDIR\" does not exist." | ||
95 | usage | ||
96 | exit 1 | ||
97 | fi | ||
98 | ;; | ||
99 | t) | ||
100 | if [ -n "$TO" ]; then | ||
101 | TO="$TO,$OPTARG" | ||
102 | else | ||
103 | TO="$OPTARG" | ||
104 | fi | ||
105 | ;; | ||
106 | esac | ||
107 | done | ||
108 | |||
109 | if [ -z "$PDIR" ]; then | ||
110 | echo "ERROR: you must specify a pull-dir." | ||
111 | usage | ||
112 | exit 1 | ||
113 | fi | ||
114 | |||
115 | |||
116 | # Verify the cover letter is complete and free of tokens | ||
117 | if [ -e $PDIR/0000-cover-letter.patch ]; then | ||
118 | CL="$PDIR/0000-cover-letter.patch" | ||
119 | for TOKEN in SUBJECT BLURB; do | ||
120 | grep -q "*** $TOKEN HERE ***" "$CL" | ||
121 | if [ $? -eq 0 ]; then | ||
122 | echo "ERROR: Please edit $CL and try again (Look for '*** $TOKEN HERE ***')." | ||
123 | exit 1 | ||
124 | fi | ||
125 | done | ||
126 | else | ||
127 | echo "WARNING: No cover letter will be sent." | ||
128 | fi | ||
129 | |||
130 | # Harvest emails from the generated patches and populate AUTO_CC. | ||
131 | if [ $AUTO_CL -eq 1 ]; then | ||
132 | for PATCH in $PDIR/*.patch; do | ||
133 | harvest_recipients $PATCH | ||
134 | done | ||
135 | fi | ||
136 | |||
137 | AUTO_TO="$(git config sendemail.to)" | ||
138 | if [ -n "$AUTO_TO" ]; then | ||
139 | if [ -n "$TO" ]; then | ||
140 | TO="$TO,$AUTO_TO" | ||
141 | else | ||
142 | TO="$AUTO_TO" | ||
143 | fi | ||
144 | fi | ||
145 | |||
146 | if [ -z "$TO" ] && [ -z "$AUTO_CC" ]; then | ||
147 | echo "ERROR: you have not specified any recipients." | ||
148 | usage | ||
149 | exit 1 | ||
150 | fi | ||
151 | |||
152 | |||
153 | # Convert the collected addresses into git-send-email argument strings | ||
154 | export IFS=$',' | ||
155 | GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) | ||
156 | GIT_CC=$(for R in $AUTO_CC; do echo -n "--cc='$R' "; done) | ||
157 | GIT_EXTRA_CC=$(for R in $EXTRA_CC; do echo -n "--cc='$R' "; done) | ||
158 | unset IFS | ||
159 | |||
160 | # Handoff to git-send-email. It will perform the send confirmation. | ||
161 | PATCHES=$(echo $PDIR/*.patch) | ||
162 | if [ $AUTO_CL -eq 1 ]; then | ||
163 | # Send the cover letter to every recipient, both specified as well as | ||
164 | # harvested. Then remove it from the patches list. | ||
165 | eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always --no-chain-reply-to --suppress-cc=all $CL" | ||
166 | if [ $? -eq 1 ]; then | ||
167 | echo "ERROR: failed to send cover-letter with automatic recipients." | ||
168 | exit 1 | ||
169 | fi | ||
170 | PATCHES=${PATCHES/"$CL"/} | ||
171 | fi | ||
172 | |||
173 | # Send the patch to the specified recipients and, if -c was specified, those git | ||
174 | # finds in this specific patch. | ||
175 | eval "git send-email $GIT_TO $GIT_EXTRA_CC --confirm=always --no-chain-reply-to $GITSOBCC $PATCHES" | ||
176 | if [ $? -eq 1 ]; then | ||
177 | echo "ERROR: failed to send patches." | ||
178 | exit 1 | ||
179 | fi | ||
diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh new file mode 100755 index 0000000000..2286765ebd --- /dev/null +++ b/scripts/sstate-cache-management.sh | |||
@@ -0,0 +1,469 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Copyright (c) 2012 Wind River Systems, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License version 2 as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | # See the GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with this program; if not, write to the Free Software | ||
16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | # | ||
18 | |||
19 | # Global vars | ||
20 | cache_dir= | ||
21 | confirm= | ||
22 | fsym= | ||
23 | total_deleted=0 | ||
24 | verbose= | ||
25 | debug=0 | ||
26 | |||
27 | usage () { | ||
28 | cat << EOF | ||
29 | Welcome to sstate cache management utilities. | ||
30 | sstate-cache-management.sh <OPTION> | ||
31 | |||
32 | Options: | ||
33 | -h, --help | ||
34 | Display this help and exit. | ||
35 | |||
36 | --cache-dir=<sstate cache dir> | ||
37 | Specify sstate cache directory, will use the environment | ||
38 | variable SSTATE_CACHE_DIR if it is not specified. | ||
39 | |||
40 | --extra-archs=<arch1>,<arch2>...<archn> | ||
41 | Specify list of architectures which should be tested, this list | ||
42 | will be extended with native arch, allarch and empty arch. The | ||
43 | script won't be trying to generate list of available archs from | ||
44 | AVAILTUNES in tune files. | ||
45 | |||
46 | --extra-layer=<layer1>,<layer2>...<layern> | ||
47 | Specify the layer which will be used for searching the archs, | ||
48 | it will search the meta and meta-* layers in the top dir by | ||
49 | default, and will search meta, meta-*, <layer1>, <layer2>, | ||
50 | ...<layern> when specified. Use "," as the separator. | ||
51 | |||
52 | This is useless for --stamps-dir or when --extra-archs is used. | ||
53 | |||
54 | -d, --remove-duplicated | ||
55 | Remove the duplicated sstate cache files of one package, only | ||
56 | the newest one will be kept. The duplicated sstate cache files | ||
57 | of one package must have the same arch, which means sstate cache | ||
58 | files with multiple archs are not considered duplicate. | ||
59 | |||
60 | Conflicts with --stamps-dir. | ||
61 | |||
62 | --stamps-dir=<dir1>,<dir2>...<dirn> | ||
63 | Specify the build directory's stamps directories, the sstate | ||
64 | cache file which IS USED by these build diretories will be KEPT, | ||
65 | other sstate cache files in cache-dir will be removed. Use "," | ||
66 | as the separator. For example: | ||
67 | --stamps-dir=build1/tmp/stamps,build2/tmp/stamps | ||
68 | |||
69 | Conflicts with --remove-duplicated. | ||
70 | |||
71 | -L, --follow-symlink | ||
72 | Remove both the symbol link and the destination file, default: no. | ||
73 | |||
74 | -y, --yes | ||
75 | Automatic yes to prompts; assume "yes" as answer to all prompts | ||
76 | and run non-interactively. | ||
77 | |||
78 | -v, --verbose | ||
79 | Explain what is being done. | ||
80 | |||
81 | -D, --debug | ||
82 | Show debug info, repeat for more debug info. | ||
83 | |||
84 | EOF | ||
85 | } | ||
86 | |||
87 | if [ $# -lt 1 ]; then | ||
88 | usage | ||
89 | exit 0 | ||
90 | fi | ||
91 | |||
92 | # Echo no files to remove | ||
93 | no_files () { | ||
94 | echo No files to remove | ||
95 | } | ||
96 | |||
97 | # Echo nothing to do | ||
98 | do_nothing () { | ||
99 | echo Nothing to do | ||
100 | } | ||
101 | |||
102 | # Read the input "y" | ||
103 | read_confirm () { | ||
104 | echo "$total_deleted from $total_files files will be removed! " | ||
105 | if [ "$confirm" != "y" ]; then | ||
106 | echo "Do you want to continue (y/n)? " | ||
107 | while read confirm; do | ||
108 | [ "$confirm" = "Y" -o "$confirm" = "y" -o "$confirm" = "n" \ | ||
109 | -o "$confirm" = "N" ] && break | ||
110 | echo "Invalid input \"$confirm\", please input 'y' or 'n': " | ||
111 | done | ||
112 | else | ||
113 | echo | ||
114 | fi | ||
115 | } | ||
116 | |||
117 | # Print error information and exit. | ||
118 | echo_error () { | ||
119 | echo "ERROR: $1" >&2 | ||
120 | exit 1 | ||
121 | } | ||
122 | |||
123 | # Generate the remove list: | ||
124 | # | ||
125 | # * Add .done/.siginfo to the remove list | ||
126 | # * Add destination of symlink to the remove list | ||
127 | # | ||
128 | # $1: output file, others: sstate cache file (.tgz) | ||
129 | gen_rmlist (){ | ||
130 | local rmlist_file="$1" | ||
131 | shift | ||
132 | local files="$@" | ||
133 | for i in $files; do | ||
134 | echo $i >> $rmlist_file | ||
135 | # Add the ".siginfo" | ||
136 | if [ -e $i.siginfo ]; then | ||
137 | echo $i.siginfo >> $rmlist_file | ||
138 | fi | ||
139 | # Add the destination of symlink | ||
140 | if [ -L "$i" ]; then | ||
141 | if [ "$fsym" = "y" ]; then | ||
142 | dest="`readlink -e $i`" | ||
143 | if [ -n "$dest" ]; then | ||
144 | echo $dest >> $rmlist_file | ||
145 | # Remove the .siginfo when .tgz is removed | ||
146 | if [ -f "$dest.siginfo" ]; then | ||
147 | echo $dest.siginfo >> $rmlist_file | ||
148 | fi | ||
149 | fi | ||
150 | fi | ||
151 | # Add the ".tgz.done" and ".siginfo.done" (may exist in the future) | ||
152 | base_fn="${i##/*/}" | ||
153 | t_fn="$base_fn.done" | ||
154 | s_fn="$base_fn.siginfo.done" | ||
155 | for d in $t_fn $s_fn; do | ||
156 | if [ -f $cache_dir/$d ]; then | ||
157 | echo $cache_dir/$d >> $rmlist_file | ||
158 | fi | ||
159 | done | ||
160 | fi | ||
161 | done | ||
162 | } | ||
163 | |||
164 | # Remove the duplicated cache files for the pkg, keep the newest one | ||
165 | remove_duplicated () { | ||
166 | |||
167 | local topdir | ||
168 | local oe_core_dir | ||
169 | local tunedirs | ||
170 | local all_archs | ||
171 | local all_machines | ||
172 | local ava_archs | ||
173 | local arch | ||
174 | local file_names | ||
175 | local sstate_files_list | ||
176 | local fn_tmp | ||
177 | local list_suffix=`mktemp` || exit 1 | ||
178 | |||
179 | if [ -z "$extra_archs" ] ; then | ||
180 | # Find out the archs in all the layers | ||
181 | echo "Figuring out the archs in the layers ... " | ||
182 | oe_core_dir=$(dirname $(dirname $(readlink -e $0))) | ||
183 | topdir=$(dirname $oe_core_dir) | ||
184 | tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/include' 2>/dev/null`" | ||
185 | [ -n "$tunedirs" ] || echo_error "Can't find the tune directory" | ||
186 | all_machines="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/*' -name '*.conf' 2>/dev/null | sed -e 's/.*\///' -e 's/.conf$//'`" | ||
187 | all_archs=`grep -r -h "^AVAILTUNES .*=" $tunedirs | sed -e 's/.*=//' -e 's/\"//g'` | ||
188 | fi | ||
189 | |||
190 | # Use the "_" to substitute "-", e.g., x86-64 to x86_64, but not for extra_archs which can be something like cortexa9t2-vfp-neon | ||
191 | # Sort to remove the duplicated ones | ||
192 | # Add allarch and builder arch (native) | ||
193 | builder_arch=$(uname -m) | ||
194 | all_archs="$(echo allarch $all_archs $all_machines $builder_arch \ | ||
195 | | sed -e 's/-/_/g' -e 's/ /\n/g' | sort -u) $extra_archs" | ||
196 | echo "Done" | ||
197 | |||
198 | # Total number of files including sstate-, .siginfo and .done files | ||
199 | total_files=`find $cache_dir -name 'sstate*' | wc -l` | ||
200 | # Save all the sstate files in a file | ||
201 | sstate_files_list=`mktemp` || exit 1 | ||
202 | find $cache_dir -name 'sstate:*:*:*:*:*:*:*.tgz*' >$sstate_files_list | ||
203 | |||
204 | echo "Figuring out the suffixes in the sstate cache dir ... " | ||
205 | sstate_suffixes="`sed 's%.*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^_]*_\([^:]*\)\.tgz.*%\1%g' $sstate_files_list | sort -u`" | ||
206 | echo "Done" | ||
207 | echo "The following suffixes have been found in the cache dir:" | ||
208 | echo $sstate_suffixes | ||
209 | |||
210 | echo "Figuring out the archs in the sstate cache dir ... " | ||
211 | # Using this SSTATE_PKGSPEC definition it's 6th colon separated field | ||
212 | # SSTATE_PKGSPEC = "sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:" | ||
213 | for arch in $all_archs; do | ||
214 | grep -q ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:$arch:[^:]*:[^:]*\.tgz$" $sstate_files_list | ||
215 | [ $? -eq 0 ] && ava_archs="$ava_archs $arch" | ||
216 | # ${builder_arch}_$arch used by toolchain sstate | ||
217 | grep -q ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:${builder_arch}_$arch:[^:]*:[^:]*\.tgz$" $sstate_files_list | ||
218 | [ $? -eq 0 ] && ava_archs="$ava_archs ${builder_arch}_$arch" | ||
219 | done | ||
220 | echo "Done" | ||
221 | echo "The following archs have been found in the cache dir:" | ||
222 | echo $ava_archs | ||
223 | echo "" | ||
224 | |||
225 | # Save the file list which needs to be removed | ||
226 | local remove_listdir=`mktemp -d` || exit 1 | ||
227 | for suffix in $sstate_suffixes; do | ||
228 | if [ "$suffix" = "populate_lic" ] ; then | ||
229 | echo "Skipping populate_lic, because removing duplicates doesn't work correctly for them (use --stamps-dir instead)" | ||
230 | continue | ||
231 | fi | ||
232 | # Total number of files including .siginfo and .done files | ||
233 | total_files_suffix=`grep ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:_]*_$suffix\.tgz.*" $sstate_files_list | wc -l 2>/dev/null` | ||
234 | total_tgz_suffix=`grep ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:_]*_$suffix\.tgz$" $sstate_files_list | wc -l 2>/dev/null` | ||
235 | # Save the file list to a file, some suffix's file may not exist | ||
236 | grep ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:_]*_$suffix\.tgz.*" $sstate_files_list >$list_suffix 2>/dev/null | ||
237 | local deleted_tgz=0 | ||
238 | local deleted_files=0 | ||
239 | for ext in tgz tgz.siginfo tgz.done; do | ||
240 | echo "Figuring out the sstate:xxx_$suffix.$ext ... " | ||
241 | # Uniq BPNs | ||
242 | file_names=`for arch in $ava_archs ""; do | ||
243 | sed -ne "s%.*/sstate:\([^:]*\):[^:]*:[^:]*:[^:]*:$arch:[^:]*:[^:]*\.${ext}$%\1%p" $list_suffix | ||
244 | done | sort -u` | ||
245 | |||
246 | fn_tmp=`mktemp` || exit 1 | ||
247 | rm_list="$remove_listdir/sstate:xxx_$suffix" | ||
248 | for fn in $file_names; do | ||
249 | [ -z "$verbose" ] || echo "Analyzing sstate:$fn-xxx_$suffix.${ext}" | ||
250 | for arch in $ava_archs ""; do | ||
251 | grep -h ".*/sstate:$fn:[^:]*:[^:]*:[^:]*:$arch:[^:]*:[^:]*\.${ext}$" $list_suffix >$fn_tmp | ||
252 | if [ -s $fn_tmp ] ; then | ||
253 | [ $debug -gt 1 ] && echo "Available files for $fn-$arch- with suffix $suffix.${ext}:" && cat $fn_tmp | ||
254 | # Use the modification time | ||
255 | to_del=$(ls -t $(cat $fn_tmp) | sed -n '1!p') | ||
256 | [ $debug -gt 2 ] && echo "Considering to delete: $to_del" | ||
257 | # The sstate file which is downloaded from the SSTATE_MIRROR is | ||
258 | # put in SSTATE_DIR, and there is a symlink in SSTATE_DIR/??/ to | ||
259 | # it, so filter it out from the remove list if it should not be | ||
260 | # removed. | ||
261 | to_keep=$(ls -t $(cat $fn_tmp) | sed -n '1p') | ||
262 | [ $debug -gt 2 ] && echo "Considering to keep: $to_keep" | ||
263 | for k in $to_keep; do | ||
264 | if [ -L "$k" ]; then | ||
265 | # The symlink's destination | ||
266 | k_dest="`readlink -e $k`" | ||
267 | # Maybe it is the one in cache_dir | ||
268 | k_maybe="$cache_dir/${k##/*/}" | ||
269 | # Remove it from the remove list if they are the same. | ||
270 | if [ "$k_dest" = "$k_maybe" ]; then | ||
271 | to_del="`echo $to_del | sed 's#'\"$k_maybe\"'##g'`" | ||
272 | fi | ||
273 | fi | ||
274 | done | ||
275 | rm -f $fn_tmp | ||
276 | [ $debug -gt 2 ] && echo "Decided to delete: $to_del" | ||
277 | gen_rmlist $rm_list.$ext "$to_del" | ||
278 | fi | ||
279 | done | ||
280 | done | ||
281 | done | ||
282 | deleted_tgz=`cat $rm_list.* 2>/dev/null | grep ".tgz$" | wc -l` | ||
283 | deleted_files=`cat $rm_list.* 2>/dev/null | wc -l` | ||
284 | [ "$deleted_files" -gt 0 -a $debug -gt 0 ] && cat $rm_list.* | ||
285 | echo "($deleted_tgz from $total_tgz_suffix .tgz files for $suffix suffix will be removed or $deleted_files from $total_files_suffix when counting also .siginfo and .done files)" | ||
286 | let total_deleted=$total_deleted+$deleted_files | ||
287 | done | ||
288 | deleted_tgz=0 | ||
289 | rm_old_list=$remove_listdir/sstate-old-filenames | ||
290 | find $cache_dir -name 'sstate-*.tgz' >$rm_old_list | ||
291 | [ -s "$rm_old_list" ] && deleted_tgz=`cat $rm_old_list | grep ".tgz$" | wc -l` | ||
292 | [ -s "$rm_old_list" ] && deleted_files=`cat $rm_old_list | wc -l` | ||
293 | [ -s "$rm_old_list" -a $debug -gt 0 ] && cat $rm_old_list | ||
294 | echo "($deleted_tgz .tgz files with old sstate-* filenames will be removed or $deleted_files when counting also .siginfo and .done files)" | ||
295 | let total_deleted=$total_deleted+$deleted_files | ||
296 | |||
297 | rm -f $list_suffix | ||
298 | rm -f $sstate_files_list | ||
299 | if [ $total_deleted -gt 0 ]; then | ||
300 | read_confirm | ||
301 | if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then | ||
302 | for list in `ls $remove_listdir/`; do | ||
303 | echo "Removing $list.tgz (`cat $remove_listdir/$list | wc -w` files) ... " | ||
304 | # Remove them one by one to avoid the argument list too long error | ||
305 | for i in `cat $remove_listdir/$list`; do | ||
306 | rm -f $verbose $i | ||
307 | done | ||
308 | echo "Done" | ||
309 | done | ||
310 | echo "$total_deleted files have been removed!" | ||
311 | else | ||
312 | do_nothing | ||
313 | fi | ||
314 | else | ||
315 | no_files | ||
316 | fi | ||
317 | [ -d $remove_listdir ] && rm -fr $remove_listdir | ||
318 | } | ||
319 | |||
320 | # Remove the sstate file by stamps dir, the file not used by the stamps dir | ||
321 | # will be removed. | ||
322 | rm_by_stamps (){ | ||
323 | |||
324 | local cache_list=`mktemp` || exit 1 | ||
325 | local keep_list=`mktemp` || exit 1 | ||
326 | local rm_list=`mktemp` || exit 1 | ||
327 | local sums | ||
328 | local all_sums | ||
329 | |||
330 | # Total number of files including sstate-, .siginfo and .done files | ||
331 | total_files=`find $cache_dir -type f -name 'sstate*' | wc -l` | ||
332 | # Save all the state file list to a file | ||
333 | find $cache_dir -type f -name 'sstate*' | sort -u -o $cache_list | ||
334 | |||
335 | echo "Figuring out the suffixes in the sstate cache dir ... " | ||
336 | local sstate_suffixes="`sed 's%.*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^_]*_\([^:]*\)\.tgz.*%\1%g' $cache_list | sort -u`" | ||
337 | echo "Done" | ||
338 | echo "The following suffixes have been found in the cache dir:" | ||
339 | echo $sstate_suffixes | ||
340 | |||
341 | # Figure out all the md5sums in the stamps dir. | ||
342 | echo "Figuring out all the md5sums in stamps dir ... " | ||
343 | for i in $sstate_suffixes; do | ||
344 | # There is no "\.sigdata" but "_setcene" when it is mirrored | ||
345 | # from the SSTATE_MIRRORS, use them to figure out the sum. | ||
346 | sums=`find $stamps -maxdepth 3 -name "*.do_$i.*" \ | ||
347 | -o -name "*.do_${i}_setscene.*" | \ | ||
348 | sed -ne 's#.*_setscene\.##p' -e 's#.*\.sigdata\.##p' | \ | ||
349 | sed -e 's#\..*##' | sort -u` | ||
350 | all_sums="$all_sums $sums" | ||
351 | done | ||
352 | echo "Done" | ||
353 | |||
354 | echo "Figuring out the files which will be removed ... " | ||
355 | for i in $all_sums; do | ||
356 | grep ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:${i}_.*" $cache_list >>$keep_list | ||
357 | done | ||
358 | echo "Done" | ||
359 | |||
360 | if [ -s $keep_list ]; then | ||
361 | sort -u $keep_list -o $keep_list | ||
362 | to_del=`comm -1 -3 $keep_list $cache_list` | ||
363 | gen_rmlist $rm_list "$to_del" | ||
364 | let total_deleted=`cat $rm_list | sort -u | wc -w` | ||
365 | if [ $total_deleted -gt 0 ]; then | ||
366 | [ $debug -gt 0 ] && cat $rm_list | sort -u | ||
367 | read_confirm | ||
368 | if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then | ||
369 | echo "Removing sstate cache files ... ($total_deleted files)" | ||
370 | # Remove them one by one to avoid the argument list too long error | ||
371 | for i in `cat $rm_list | sort -u`; do | ||
372 | rm -f $verbose $i | ||
373 | done | ||
374 | echo "$total_deleted files have been removed" | ||
375 | else | ||
376 | do_nothing | ||
377 | fi | ||
378 | else | ||
379 | no_files | ||
380 | fi | ||
381 | else | ||
382 | echo_error "All files in cache dir will be removed! Abort!" | ||
383 | fi | ||
384 | |||
385 | rm -f $cache_list | ||
386 | rm -f $keep_list | ||
387 | rm -f $rm_list | ||
388 | } | ||
389 | |||
390 | # Parse arguments | ||
391 | while [ -n "$1" ]; do | ||
392 | case $1 in | ||
393 | --cache-dir=*) | ||
394 | cache_dir=`echo $1 | sed -e 's#^--cache-dir=##' | xargs readlink -e` | ||
395 | [ -d "$cache_dir" ] || echo_error "Invalid argument to --cache-dir" | ||
396 | shift | ||
397 | ;; | ||
398 | --remove-duplicated|-d) | ||
399 | rm_duplicated="y" | ||
400 | shift | ||
401 | ;; | ||
402 | --yes|-y) | ||
403 | confirm="y" | ||
404 | shift | ||
405 | ;; | ||
406 | --follow-symlink|-L) | ||
407 | fsym="y" | ||
408 | shift | ||
409 | ;; | ||
410 | --extra-archs=*) | ||
411 | extra_archs=`echo $1 | sed -e 's#^--extra-archs=##' -e 's#,# #g'` | ||
412 | [ -n "$extra_archs" ] || echo_error "Invalid extra arch parameter" | ||
413 | shift | ||
414 | ;; | ||
415 | --extra-layer=*) | ||
416 | extra_layers=`echo $1 | sed -e 's#^--extra-layer=##' -e 's#,# #g'` | ||
417 | [ -n "$extra_layers" ] || echo_error "Invalid extra layer parameter" | ||
418 | for i in $extra_layers; do | ||
419 | l=`readlink -e $i` | ||
420 | if [ -d "$l" ]; then | ||
421 | layers="$layers $l" | ||
422 | else | ||
423 | echo_error "Can't find layer $i" | ||
424 | fi | ||
425 | done | ||
426 | shift | ||
427 | ;; | ||
428 | --stamps-dir=*) | ||
429 | stamps=`echo $1 | sed -e 's#^--stamps-dir=##' -e 's#,# #g'` | ||
430 | [ -n "$stamps" ] || echo_error "Invalid stamps dir $i" | ||
431 | for i in $stamps; do | ||
432 | [ -d "$i" ] || echo_error "Invalid stamps dir $i" | ||
433 | done | ||
434 | shift | ||
435 | ;; | ||
436 | --verbose|-v) | ||
437 | verbose="-v" | ||
438 | shift | ||
439 | ;; | ||
440 | --debug|-D) | ||
441 | debug=`expr $debug + 1` | ||
442 | echo "Debug level $debug" | ||
443 | shift | ||
444 | ;; | ||
445 | --help|-h) | ||
446 | usage | ||
447 | exit 0 | ||
448 | ;; | ||
449 | *) | ||
450 | echo "Invalid arguments $*" | ||
451 | echo_error "Try 'sstate-cache-management.sh -h' for more information." | ||
452 | ;; | ||
453 | esac | ||
454 | done | ||
455 | |||
456 | # sstate cache directory, use environment variable SSTATE_CACHE_DIR | ||
457 | # if it was not specified, otherwise, error. | ||
458 | [ -n "$cache_dir" ] || cache_dir=$SSTATE_CACHE_DIR | ||
459 | [ -n "$cache_dir" ] || echo_error "No cache dir found!" | ||
460 | [ -d "$cache_dir" ] || echo_error "Invalid cache directory \"$cache_dir\"" | ||
461 | |||
462 | [ -n "$rm_duplicated" -a -n "$stamps" ] && \ | ||
463 | echo_error "Can not use both --remove-duplicated and --stamps-dir" | ||
464 | |||
465 | [ "$rm_duplicated" = "y" ] && remove_duplicated | ||
466 | [ -n "$stamps" ] && rm_by_stamps | ||
467 | [ -z "$rm_duplicated" -a -z "$stamps" ] && \ | ||
468 | echo "What do you want to do?" | ||
469 | exit 0 | ||
diff --git a/scripts/sstate-diff-machines.sh b/scripts/sstate-diff-machines.sh new file mode 100755 index 0000000000..056aa0a04c --- /dev/null +++ b/scripts/sstate-diff-machines.sh | |||
@@ -0,0 +1,172 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Used to compare sstate checksums between MACHINES. | ||
4 | # Execute script and compare generated list.M files. | ||
5 | # Using bash to have PIPESTATUS variable. | ||
6 | |||
7 | # It's also usefull to keep older sstate checksums | ||
8 | # to be able to find out why something is rebuilding | ||
9 | # after updating metadata | ||
10 | |||
11 | # $ diff \ | ||
12 | # sstate-diff/1349348392/fake-cortexa8/list.M \ | ||
13 | # sstate-diff/1349348392/fake-cortexa9/list.M \ | ||
14 | # | wc -l | ||
15 | # 538 | ||
16 | |||
17 | # Then to compare sigdata use something like: | ||
18 | # $ ls sstate-diff/1349348392/*/armv7a-vfp-neon*/linux-libc-headers/*do_configure*sigdata* | ||
19 | # sstate-diff/1349348392/fake-cortexa8/armv7a-vfp-neon-oe-linux-gnueabi/linux-libc-headers/3.4.3-r0.do_configure.sigdata.cb73b3630a7b8191e72fc469c5137025 | ||
20 | # sstate-diff/1349348392/fake-cortexa9/armv7a-vfp-neon-oe-linux-gnueabi/linux-libc-headers/3.4.3-r0.do_configure.sigdata.f37ada177bf99ce8af85914df22b5a0b | ||
21 | # $ bitbake-diffsigs stamps.1349348392/*/armv7a-vfp-neon*/linux-libc-headers/*do_configure*sigdata* | ||
22 | # basehash changed from 8d0bd67bb1da6f68717760fc3ef43171 to e869fa61426e88e9c30726ba88a1216a | ||
23 | # Variable TUNE_CCARGS value changed from -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 to -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 | ||
24 | |||
25 | # Global vars | ||
26 | tmpdir= | ||
27 | machines= | ||
28 | targets= | ||
29 | default_machines="qemuarm qemux86 qemux86-64" | ||
30 | default_targets="core-image-base" | ||
31 | analyze="N" | ||
32 | |||
33 | usage () { | ||
34 | cat << EOF | ||
35 | Welcome to utility to compare sstate checksums between different MACHINEs. | ||
36 | $0 <OPTION> | ||
37 | |||
38 | Options: | ||
39 | -h, --help | ||
40 | Display this help and exit. | ||
41 | |||
42 | --tmpdir=<tmpdir> | ||
43 | Specify tmpdir, will use the environment variable TMPDIR if it is not specified. | ||
44 | Something like /OE/oe-core/tmp-eglibc (no / at the end). | ||
45 | |||
46 | --machines=<machines> | ||
47 | List of MACHINEs separated by space, will use the environment variable MACHINES if it is not specified. | ||
48 | Default value is "qemuarm qemux86 qemux86-64". | ||
49 | |||
50 | --targets=<targets> | ||
51 | List of targets separated by space, will use the environment variable TARGETS if it is not specified. | ||
52 | Default value is "core-image-base". | ||
53 | |||
54 | --analyze | ||
55 | Show the differences between MACHINEs. It assumes: | ||
56 | * First 2 MACHINEs in --machines parameter have the same TUNE_PKGARCH | ||
57 | * Third optional MACHINE has different TUNE_PKGARCH - only native and allarch recipes are compared). | ||
58 | * Next MACHINEs are ignored | ||
59 | EOF | ||
60 | } | ||
61 | |||
62 | # Print error information and exit. | ||
63 | echo_error () { | ||
64 | echo "ERROR: $1" >&2 | ||
65 | exit 1 | ||
66 | } | ||
67 | |||
68 | while [ -n "$1" ]; do | ||
69 | case $1 in | ||
70 | --tmpdir=*) | ||
71 | tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e` | ||
72 | [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir" | ||
73 | shift | ||
74 | ;; | ||
75 | --machines=*) | ||
76 | machines=`echo $1 | sed -e 's#^--machines="*\([^"]*\)"*#\1#'` | ||
77 | shift | ||
78 | ;; | ||
79 | --targets=*) | ||
80 | targets=`echo $1 | sed -e 's#^--targets="*\([^"]*\)"*#\1#'` | ||
81 | shift | ||
82 | ;; | ||
83 | --analyze) | ||
84 | analyze="Y" | ||
85 | shift | ||
86 | ;; | ||
87 | --help|-h) | ||
88 | usage | ||
89 | exit 0 | ||
90 | ;; | ||
91 | *) | ||
92 | echo "Invalid arguments $*" | ||
93 | echo_error "Try '$0 -h' for more information." | ||
94 | ;; | ||
95 | esac | ||
96 | done | ||
97 | |||
98 | # tmpdir directory, use environment variable TMPDIR | ||
99 | # if it was not specified, otherwise, error. | ||
100 | [ -n "$tmpdir" ] || tmpdir=$TMPDIR | ||
101 | [ -n "$tmpdir" ] || echo_error "No tmpdir found!" | ||
102 | [ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\"" | ||
103 | [ -n "$machines" ] || machines=$MACHINES | ||
104 | [ -n "$machines" ] || machines=$default_machines | ||
105 | [ -n "$targets" ] || targets=$TARGETS | ||
106 | [ -n "$targets" ] || targets=$default_targets | ||
107 | |||
108 | OUTPUT=${tmpdir}/sstate-diff/`date "+%s"` | ||
109 | declare -i RESULT=0 | ||
110 | |||
111 | for M in ${machines}; do | ||
112 | [ -d ${tmpdir}/stamps/ ] && find ${tmpdir}/stamps/ -name \*sigdata\* | xargs rm -f | ||
113 | mkdir -p ${OUTPUT}/${M} | ||
114 | export MACHINE=${M} | ||
115 | bitbake -S none ${targets} 2>&1 | tee -a ${OUTPUT}/${M}/log; | ||
116 | RESULT+=${PIPESTATUS[0]} | ||
117 | if ls ${tmpdir}/stamps/* >/dev/null 2>/dev/null ; then | ||
118 | cp -ra ${tmpdir}/stamps/* ${OUTPUT}/${M} | ||
119 | find ${OUTPUT}/${M} -name \*sigdata\* | sed "s#${OUTPUT}/${M}/##g" | sort > ${OUTPUT}/${M}/list | ||
120 | M_UNDERSCORE=`echo ${M} | sed 's/-/_/g'` | ||
121 | sed "s/${M_UNDERSCORE}/MACHINE/g; s/${M}/MACHINE/g" ${OUTPUT}/${M}/list | sort > ${OUTPUT}/${M}/list.M | ||
122 | find ${tmpdir}/stamps/ -name \*sigdata\* | xargs rm -f | ||
123 | else | ||
124 | printf "ERROR: no sigdata files were generated for MACHINE $M in ${tmpdir}/stamps\n"; | ||
125 | fi | ||
126 | done | ||
127 | |||
128 | function compareSignatures() { | ||
129 | MACHINE1=$1 | ||
130 | MACHINE2=$2 | ||
131 | PATTERN="$3" | ||
132 | PRE_PATTERN="" | ||
133 | [ -n "${PATTERN}" ] || PRE_PATTERN="-v" | ||
134 | [ -n "${PATTERN}" ] || PATTERN="MACHINE" | ||
135 | for TASK in do_configure.sigdata do_populate_sysroot.sigdata do_package_write_ipk.sigdata; do | ||
136 | printf "\n\n === Comparing signatures for task ${TASK} between ${MACHINE1} and ${MACHINE2} ===\n" | tee -a ${OUTPUT}/signatures.${MACHINE2}.${TASK}.log | ||
137 | diff ${OUTPUT}/${MACHINE1}/list.M ${OUTPUT}/${MACHINE2}/list.M | grep ${PRE_PATTERN} "${PATTERN}" | grep ${TASK} > ${OUTPUT}/signatures.${MACHINE2}.${TASK} | ||
138 | for i in `cat ${OUTPUT}/signatures.${MACHINE2}.${TASK} | sed 's#[^/]*/\([^/]*\)/.*#\1#g' | sort -u | xargs`; do | ||
139 | [ -e ${OUTPUT}/${MACHINE1}/*/$i/*${TASK}* ] || echo "INFO: ${i} task ${TASK} doesn't exist in ${MACHINE1}" >&2 | ||
140 | [ -e ${OUTPUT}/${MACHINE1}/*/$i/*${TASK}* ] || continue | ||
141 | [ -e ${OUTPUT}/${MACHINE2}/*/$i/*${TASK}* ] || echo "INFO: ${i} task ${TASK} doesn't exist in ${MACHINE2}" >&2 | ||
142 | [ -e ${OUTPUT}/${MACHINE2}/*/$i/*${TASK}* ] || continue | ||
143 | printf "ERROR: $i different signature for task ${TASK} between ${MACHINE1} and ${MACHINE2}\n"; | ||
144 | bitbake-diffsigs ${OUTPUT}/${MACHINE1}/*/$i/*${TASK}* ${OUTPUT}/${MACHINE2}/*/$i/*${TASK}*; | ||
145 | echo "$i" >> ${OUTPUT}/failed-recipes.log | ||
146 | echo | ||
147 | done | tee -a ${OUTPUT}/signatures.${MACHINE2}.${TASK}.log | ||
148 | # don't create empty files | ||
149 | ERRORS=`grep "^ERROR.*" ${OUTPUT}/signatures.${MACHINE2}.${TASK}.log | wc -l` | ||
150 | if [ "${ERRORS}" != "0" ] ; then | ||
151 | echo "ERROR: ${ERRORS} errors found in ${OUTPUT}/signatures.${MACHINE2}.${TASK}.log" | ||
152 | RESULT+=${ERRORS} | ||
153 | fi | ||
154 | done | ||
155 | } | ||
156 | |||
157 | function compareMachines() { | ||
158 | [ "$#" -ge 2 ] && compareSignatures $1 $2 | ||
159 | [ "$#" -ge 3 ] && compareSignatures $1 $3 "\(^< all\)\|\(^< x86_64-linux\)\|\(^< i586-linux\)" | ||
160 | } | ||
161 | |||
162 | if [ "${analyze}" = "Y" ] ; then | ||
163 | compareMachines ${machines} | ||
164 | fi | ||
165 | |||
166 | if [ "${RESULT}" != "0" -a -f ${OUTPUT}/failed-recipes.log ] ; then | ||
167 | cat ${OUTPUT}/failed-recipes.log | sort -u >${OUTPUT}/failed-recipes.log.u && mv ${OUTPUT}/failed-recipes.log.u ${OUTPUT}/failed-recipes.log | ||
168 | echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT}/failed-recipes.log | xargs`" | ||
169 | fi | ||
170 | |||
171 | echo "INFO: Output written in: ${OUTPUT}" | ||
172 | exit ${RESULT} | ||
diff --git a/scripts/sstate-sysroot-cruft.sh b/scripts/sstate-sysroot-cruft.sh new file mode 100755 index 0000000000..f62485eaaa --- /dev/null +++ b/scripts/sstate-sysroot-cruft.sh | |||
@@ -0,0 +1,152 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Used to find files installed in sysroot which are not tracked by sstate manifest | ||
4 | |||
5 | # Global vars | ||
6 | tmpdir= | ||
7 | |||
8 | usage () { | ||
9 | cat << EOF | ||
10 | Welcome to sysroot cruft finding utility. | ||
11 | $0 <OPTION> | ||
12 | |||
13 | Options: | ||
14 | -h, --help | ||
15 | Display this help and exit. | ||
16 | |||
17 | --tmpdir=<tmpdir> | ||
18 | Specify tmpdir, will use the environment variable TMPDIR if it is not specified. | ||
19 | Something like /OE/oe-core/tmp-eglibc (no / at the end). | ||
20 | |||
21 | --whitelist=<whitelist-file> | ||
22 | Text file, each line is regular expression for paths we want to ignore in resulting diff. | ||
23 | You can use diff file from the script output, if it contains only expected exceptions. | ||
24 | '#' is used as regexp delimiter, so you don't need to prefix forward slashes in paths. | ||
25 | ^ and $ is automatically added, so provide only the middle part. | ||
26 | Lines starting with '#' are ignored as comments. | ||
27 | All paths are relative to "sysroots" directory. | ||
28 | Directories don't end with forward slash. | ||
29 | EOF | ||
30 | } | ||
31 | |||
32 | # Print error information and exit. | ||
33 | echo_error () { | ||
34 | echo "ERROR: $1" >&2 | ||
35 | exit 1 | ||
36 | } | ||
37 | |||
38 | while [ -n "$1" ]; do | ||
39 | case $1 in | ||
40 | --tmpdir=*) | ||
41 | tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e` | ||
42 | [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir" | ||
43 | shift | ||
44 | ;; | ||
45 | --whitelist=*) | ||
46 | fwhitelist=`echo $1 | sed -e 's#^--whitelist=##' | xargs readlink -e` | ||
47 | [ -f "$fwhitelist" ] || echo_error "Invalid argument to --whitelist" | ||
48 | shift | ||
49 | ;; | ||
50 | --help|-h) | ||
51 | usage | ||
52 | exit 0 | ||
53 | ;; | ||
54 | *) | ||
55 | echo "Invalid arguments $*" | ||
56 | echo_error "Try '$0 -h' for more information." | ||
57 | ;; | ||
58 | esac | ||
59 | done | ||
60 | |||
61 | # sstate cache directory, use environment variable TMPDIR | ||
62 | # if it was not specified, otherwise, error. | ||
63 | [ -n "$tmpdir" ] || tmpdir=$TMPDIR | ||
64 | [ -n "$tmpdir" ] || echo_error "No tmpdir found!" | ||
65 | [ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\"" | ||
66 | |||
67 | OUTPUT=${tmpdir}/sysroot.cruft.`date "+%s"` | ||
68 | |||
69 | # top level directories | ||
70 | WHITELIST="[^/]*" | ||
71 | |||
72 | # generated by base-passwd recipe | ||
73 | WHITELIST="${WHITELIST} \ | ||
74 | .*/etc/group-\? \ | ||
75 | .*/etc/passwd-\? \ | ||
76 | " | ||
77 | # generated by pseudo-native | ||
78 | WHITELIST="${WHITELIST} \ | ||
79 | .*/var/pseudo \ | ||
80 | .*/var/pseudo/[^/]* \ | ||
81 | " | ||
82 | |||
83 | # generated by package.bbclass:SHLIBSDIRS = "${PKGDATA_DIR}/${MLPREFIX}shlibs" | ||
84 | WHITELIST="${WHITELIST} \ | ||
85 | .*/shlibs \ | ||
86 | .*/pkgdata \ | ||
87 | " | ||
88 | |||
89 | # generated by python | ||
90 | WHITELIST="${WHITELIST} \ | ||
91 | .*\.pyc \ | ||
92 | .*\.pyo \ | ||
93 | " | ||
94 | |||
95 | # generated by sgml-common-native | ||
96 | WHITELIST="${WHITELIST} \ | ||
97 | .*/etc/sgml/sgml-docbook.bak \ | ||
98 | " | ||
99 | |||
100 | # generated by toolchain | ||
101 | WHITELIST="${WHITELIST} \ | ||
102 | [^/]*-tcbootstrap/lib \ | ||
103 | " | ||
104 | |||
105 | # generated by useradd.bbclass | ||
106 | WHITELIST="${WHITELIST} \ | ||
107 | [^/]*/home \ | ||
108 | [^/]*/home/xuser \ | ||
109 | " | ||
110 | |||
111 | SYSROOTS="`readlink -f ${tmpdir}`/sysroots/" | ||
112 | |||
113 | mkdir ${OUTPUT} | ||
114 | find ${tmpdir}/sstate-control -name \*.populate-sysroot\* -o -name \*.populate_sysroot\* -o -name \*.package\* | xargs cat | grep sysroots | \ | ||
115 | sed 's#/$##g; s#///*#/#g' | \ | ||
116 | # work around for paths ending with / for directories and multiplied // (e.g. paths to native sysroot) | ||
117 | sort | sed "s#^${SYSROOTS}##g" > ${OUTPUT}/master.list.all.txt | ||
118 | sort -u ${OUTPUT}/master.list.all.txt > ${OUTPUT}/master.list.txt # -u because some directories are listed for more recipes | ||
119 | find ${tmpdir}/sysroots/ | \ | ||
120 | sort | sed "s#^${SYSROOTS}##g" > ${OUTPUT}/sysroot.list.txt | ||
121 | |||
122 | diff ${OUTPUT}/master.list.all.txt ${OUTPUT}/master.list.txt > ${OUTPUT}/duplicates.txt | ||
123 | diff ${OUTPUT}/master.list.txt ${OUTPUT}/sysroot.list.txt > ${OUTPUT}/diff.all.txt | ||
124 | |||
125 | grep "^> ." ${OUTPUT}/diff.all.txt | sed 's/^> //g' > ${OUTPUT}/diff.txt | ||
126 | for item in ${WHITELIST}; do | ||
127 | sed -i "\\#^${item}\$#d" ${OUTPUT}/diff.txt; | ||
128 | echo "${item}" >> ${OUTPUT}/used.whitelist.txt | ||
129 | done | ||
130 | |||
131 | if [ -s "$fwhitelist" ] ; then | ||
132 | cat $fwhitelist >> ${OUTPUT}/used.whitelist.txt | ||
133 | cat $fwhitelist | grep -v '^#' | while read item; do | ||
134 | sed -i "\\#^${item}\$#d" ${OUTPUT}/diff.txt; | ||
135 | done | ||
136 | fi | ||
137 | # too many false positives for directories | ||
138 | # echo "Following files are installed in sysroot at least twice" | ||
139 | # cat ${OUTPUT}/duplicates | ||
140 | |||
141 | RESULT=`cat ${OUTPUT}/diff.txt | wc -l` | ||
142 | |||
143 | if [ "${RESULT}" != "0" ] ; then | ||
144 | echo "ERROR: ${RESULT} issues were found." | ||
145 | echo "ERROR: Following files are installed in sysroot, but not tracked by sstate:" | ||
146 | cat ${OUTPUT}/diff.txt | ||
147 | else | ||
148 | echo "INFO: All files are tracked by sstate or were explicitly ignored by this script" | ||
149 | fi | ||
150 | |||
151 | echo "INFO: Output written in: ${OUTPUT}" | ||
152 | exit ${RESULT} | ||
diff --git a/scripts/swabber-strace-attach b/scripts/swabber-strace-attach new file mode 100755 index 0000000000..bb0391a7ca --- /dev/null +++ b/scripts/swabber-strace-attach | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/bin/env python | ||
2 | import os | ||
3 | import sys | ||
4 | import subprocess | ||
5 | |||
6 | # Detach from the controlling terminal and parent process by forking twice to daemonize ourselves, | ||
7 | # then run the command passed as argv[1]. Send log data to argv[2]. | ||
8 | |||
9 | pid = os.fork() | ||
10 | if (pid == 0): | ||
11 | os.setsid() | ||
12 | pid = os.fork() | ||
13 | if (pid != 0): | ||
14 | os._exit(0) | ||
15 | else: | ||
16 | sys.exit() | ||
17 | |||
18 | |||
19 | si = file(os.devnull, 'r') | ||
20 | so = file(sys.argv[2], 'w') | ||
21 | se = so | ||
22 | |||
23 | # Replace those fds with our own | ||
24 | os.dup2(si.fileno(), sys.stdin.fileno()) | ||
25 | os.dup2(so.fileno(), sys.stdout.fileno()) | ||
26 | os.dup2(se.fileno(), sys.stderr.fileno()) | ||
27 | |||
28 | ret = subprocess.call(sys.argv[1], shell=True) | ||
29 | |||
30 | os._exit(ret) | ||
31 | |||
diff --git a/scripts/sysroot-relativelinks.py b/scripts/sysroot-relativelinks.py new file mode 100755 index 0000000000..ac26367e77 --- /dev/null +++ b/scripts/sysroot-relativelinks.py | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/bin/env python | ||
2 | import sys | ||
3 | import os | ||
4 | |||
5 | # Take a sysroot directory and turn all the abolute symlinks and turn them into | ||
6 | # relative ones such that the sysroot is usable within another system. | ||
7 | |||
8 | if len(sys.argv) != 2: | ||
9 | print("Usage is " + sys.argv[0] + "<directory>") | ||
10 | sys.exit(1) | ||
11 | |||
12 | topdir = sys.argv[1] | ||
13 | topdir = os.path.abspath(topdir) | ||
14 | |||
15 | def handlelink(filep, subdir): | ||
16 | link = os.readlink(filep) | ||
17 | if link[0] != "/": | ||
18 | return | ||
19 | if link.startswith(topdir): | ||
20 | return | ||
21 | #print("Replacing %s with %s for %s" % (link, topdir+link, filep)) | ||
22 | print("Replacing %s with %s for %s" % (link, os.path.relpath(topdir+link, subdir), filep)) | ||
23 | os.unlink(filep) | ||
24 | os.symlink(os.path.relpath(topdir+link, subdir), filep) | ||
25 | |||
26 | for subdir, dirs, files in os.walk(topdir): | ||
27 | for f in files: | ||
28 | filep = os.path.join(subdir, f) | ||
29 | if os.path.islink(filep): | ||
30 | #print("Considering %s" % filep) | ||
31 | handlelink(filep, subdir) | ||
diff --git a/scripts/test-dependencies.sh b/scripts/test-dependencies.sh new file mode 100755 index 0000000000..2bcc2ca4f6 --- /dev/null +++ b/scripts/test-dependencies.sh | |||
@@ -0,0 +1,286 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Author: Martin Jansa <martin.jansa@gmail.com> | ||
4 | # | ||
5 | # Copyright (c) 2013 Martin Jansa <Martin.Jansa@gmail.com> | ||
6 | |||
7 | # Used to detect missing dependencies or automagically | ||
8 | # enabled dependencies which aren't explicitly enabled | ||
9 | # or disabled. Using bash to have PIPESTATUS variable. | ||
10 | |||
11 | # It does 3 builds of <target> | ||
12 | # 1st to populate sstate-cache directory and sysroot | ||
13 | # 2nd to rebuild each recipe with every possible | ||
14 | # dependency found in sysroot (which stays populated | ||
15 | # from 1st build | ||
16 | # 3rd to rebuild each recipe only with dependencies defined | ||
17 | # in DEPENDS | ||
18 | # 4th (optional) repeat build like 3rd to make sure that | ||
19 | # minimal versions of dependencies defined in DEPENDS | ||
20 | # is also enough | ||
21 | |||
22 | # Global vars | ||
23 | tmpdir= | ||
24 | targets= | ||
25 | recipes= | ||
26 | buildhistory= | ||
27 | buildtype= | ||
28 | default_targets="world" | ||
29 | default_buildhistory="buildhistory" | ||
30 | default_buildtype="1 2 3 c" | ||
31 | |||
32 | usage () { | ||
33 | cat << EOF | ||
34 | Welcome to utility to detect missing or autoenabled dependencies. | ||
35 | WARNING: this utility will completely remove your tmpdir (make sure | ||
36 | you don't have important buildhistory or persistent dir there). | ||
37 | $0 <OPTION> | ||
38 | |||
39 | Options: | ||
40 | -h, --help | ||
41 | Display this help and exit. | ||
42 | |||
43 | --tmpdir=<tmpdir> | ||
44 | Specify tmpdir, will use the environment variable TMPDIR if it is not specified. | ||
45 | Something like /OE/oe-core/tmp-eglibc (no / at the end). | ||
46 | |||
47 | --targets=<targets> | ||
48 | List of targets separated by space, will use the environment variable TARGETS if it is not specified. | ||
49 | It will run "bitbake <targets>" to populate sysroots. | ||
50 | Default value is "world". | ||
51 | |||
52 | --recipes=<recipes> | ||
53 | File with list of recipes we want to rebuild with minimal and maximal sysroot. | ||
54 | Will use the environment variable RECIPES if it is not specified. | ||
55 | Default value will use all packages ever recorded in buildhistory directory. | ||
56 | |||
57 | --buildhistory=<buildhistory> | ||
58 | Path to buildhistory directory, it needs to be enabled in your config, | ||
59 | because it's used to detect different dependencies and to create list | ||
60 | of recipes to rebuild when it's not specified. | ||
61 | Will use the environment variable BUILDHISTORY if it is not specified. | ||
62 | Default value is "buildhistory" | ||
63 | |||
64 | --buildtype=<buildtype> | ||
65 | There are 4 types of build: | ||
66 | 1: build to populate sstate-cache directory and sysroot | ||
67 | 2: build to rebuild each recipe with every possible dep | ||
68 | 3: build to rebuild each recipe with minimal dependencies | ||
69 | 4: build to rebuild each recipe again with minimal dependencies | ||
70 | c: compare buildhistory directories from build 2 and 3 | ||
71 | Will use the environment variable BUILDTYPE if it is not specified. | ||
72 | Default value is "1 2 3 c", order is important, type 4 is optional. | ||
73 | EOF | ||
74 | } | ||
75 | |||
76 | # Print error information and exit. | ||
77 | echo_error () { | ||
78 | echo "ERROR: $1" >&2 | ||
79 | exit 1 | ||
80 | } | ||
81 | |||
82 | while [ -n "$1" ]; do | ||
83 | case $1 in | ||
84 | --tmpdir=*) | ||
85 | tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e` | ||
86 | [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir" | ||
87 | shift | ||
88 | ;; | ||
89 | --targets=*) | ||
90 | targets=`echo $1 | sed -e 's#^--targets="*\([^"]*\)"*#\1#'` | ||
91 | shift | ||
92 | ;; | ||
93 | --recipes=*) | ||
94 | recipes=`echo $1 | sed -e 's#^--recipes="*\([^"]*\)"*#\1#'` | ||
95 | shift | ||
96 | ;; | ||
97 | --buildhistory=*) | ||
98 | buildhistory=`echo $1 | sed -e 's#^--buildhistory="*\([^"]*\)"*#\1#'` | ||
99 | shift | ||
100 | ;; | ||
101 | --buildtype=*) | ||
102 | buildtype=`echo $1 | sed -e 's#^--buildtype="*\([^"]*\)"*#\1#'` | ||
103 | shift | ||
104 | ;; | ||
105 | --help|-h) | ||
106 | usage | ||
107 | exit 0 | ||
108 | ;; | ||
109 | *) | ||
110 | echo "Invalid arguments $*" | ||
111 | echo_error "Try '$0 -h' for more information." | ||
112 | ;; | ||
113 | esac | ||
114 | done | ||
115 | |||
116 | # tmpdir directory, use environment variable TMPDIR | ||
117 | # if it was not specified, otherwise, error. | ||
118 | [ -n "$tmpdir" ] || tmpdir=$TMPDIR | ||
119 | [ -n "$tmpdir" ] || echo_error "No tmpdir found!" | ||
120 | [ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\"" | ||
121 | [ -n "$targets" ] || targets=$TARGETS | ||
122 | [ -n "$targets" ] || targets=$default_targets | ||
123 | [ -n "$recipes" ] || recipes=$RECIPES | ||
124 | [ -n "$recipes" -a ! -f "$recipes" ] && echo_error "Invalid file with list of recipes to rebuild" | ||
125 | [ -n "$recipes" ] || echo "All packages ever recorded in buildhistory directory will be rebuilt" | ||
126 | [ -n "$buildhistory" ] || buildhistory=$BUILDHISTORY | ||
127 | [ -n "$buildhistory" ] || buildhistory=$default_buildhistory | ||
128 | [ -d "$buildhistory" ] || echo_error "Invalid buildhistory directory \"$buildhistory\"" | ||
129 | [ -n "$buildtype" ] || buildtype=$BUILDTYPE | ||
130 | [ -n "$buildtype" ] || buildtype=$default_buildtype | ||
131 | echo "$buildtype" | grep -v '^[1234c ]*$' && echo_error "Invalid buildtype \"$buildtype\", only some combination of 1, 2, 3, 4, c separated by space is allowed" | ||
132 | |||
133 | OUTPUT_BASE=test-dependencies/`date "+%s"` | ||
134 | declare -i RESULT=0 | ||
135 | |||
136 | build_all() { | ||
137 | echo "===== 1st build to populate sstate-cache directory and sysroot =====" | ||
138 | OUTPUT1=${OUTPUT_BASE}/${TYPE}_all | ||
139 | mkdir -p ${OUTPUT1} | ||
140 | echo "Logs will be stored in ${OUTPUT1} directory" | ||
141 | bitbake -k $targets 2>&1 | tee -a ${OUTPUT1}/complete.log | ||
142 | RESULT+=${PIPESTATUS[0]} | ||
143 | grep "ERROR: Task.*failed" ${OUTPUT1}/complete.log > ${OUTPUT1}/failed-tasks.log | ||
144 | cat ${OUTPUT1}/failed-tasks.log | sed 's@.*/@@g; s@_.*@@g; s@\..*@@g' | sort -u > ${OUTPUT1}/failed-recipes.log | ||
145 | } | ||
146 | |||
147 | build_every_recipe() { | ||
148 | if [ "${TYPE}" = "2" ] ; then | ||
149 | echo "===== 2nd build to rebuild each recipe with every possible dep =====" | ||
150 | OUTPUT_MAX=${OUTPUT_BASE}/${TYPE}_max | ||
151 | OUTPUTB=${OUTPUT_MAX} | ||
152 | else | ||
153 | echo "===== 3rd or 4th build to rebuild each recipe with minimal dependencies =====" | ||
154 | OUTPUT_MIN=${OUTPUT_BASE}/${TYPE}_min | ||
155 | OUTPUTB=${OUTPUT_MIN} | ||
156 | fi | ||
157 | |||
158 | mkdir -p ${OUTPUTB} ${OUTPUTB}/failed ${OUTPUTB}/ok | ||
159 | echo "Logs will be stored in ${OUTPUTB} directory" | ||
160 | if [ -z "$recipes" ]; then | ||
161 | ls -d $buildhistory/packages/*/* | xargs -n 1 basename | sort -u > ${OUTPUTB}/recipe.list | ||
162 | recipes=${OUTPUTB}/recipe.list | ||
163 | fi | ||
164 | if [ "${TYPE}" != "2" ] ; then | ||
165 | echo "!!!Removing tmpdir \"$tmpdir\"!!!" | ||
166 | rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null | ||
167 | fi | ||
168 | i=1 | ||
169 | count=`cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u | wc -l` | ||
170 | for recipe in `cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u`; do | ||
171 | echo "Building recipe: ${recipe} ($i/$count)" | ||
172 | declare -i RECIPE_RESULT=0 | ||
173 | bitbake -c cleansstate ${recipe} > ${OUTPUTB}/${recipe}.log 2>&1; | ||
174 | RECIPE_RESULT+=$? | ||
175 | bitbake ${recipe} >> ${OUTPUTB}/${recipe}.log 2>&1; | ||
176 | RECIPE_RESULT+=$? | ||
177 | if [ "${RECIPE_RESULT}" != "0" ] ; then | ||
178 | RESULT+=${RECIPE_RESULT} | ||
179 | mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/failed/ | ||
180 | grep "ERROR: Task.*failed" ${OUTPUTB}/failed/${recipe}.log | tee -a ${OUTPUTB}/failed-tasks.log | ||
181 | grep "ERROR: Task.*failed" ${OUTPUTB}/failed/${recipe}.log | sed 's@.*/@@g; s@_.*@@g; s@\..*@@g' >> ${OUTPUTB}/failed-recipes.log | ||
182 | # and append also ${recipe} in case the failed task was from some dependency | ||
183 | echo ${recipe} >> ${OUTPUTB}/failed-recipes.log | ||
184 | else | ||
185 | mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/ok/ | ||
186 | fi | ||
187 | if [ "${TYPE}" != "2" ] ; then | ||
188 | rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null | ||
189 | fi | ||
190 | i=`expr $i + 1` | ||
191 | done | ||
192 | echo "Copying buildhistory/packages to ${OUTPUTB}" | ||
193 | cp -ra $buildhistory/packages ${OUTPUTB} | ||
194 | # This will be usefull to see which library is pulling new dependency | ||
195 | echo "Copying do_package logs to ${OUTPUTB}/do_package/" | ||
196 | mkdir ${OUTPUTB}/do_package | ||
197 | find $tmpdir/work/ -name log.do_package 2>/dev/null| while read f; do | ||
198 | # pn is 3 levels back, but we don't know if there is just one log per pn (only one arch and version) | ||
199 | # dest=`echo $f | sed 's#^.*/\([^/]*\)/\([^/]*\)/\([^/]*\)/log.do_package#\1#g'` | ||
200 | dest=`echo $f | sed "s#$tmpdir/work/##g; s#/#_#g"` | ||
201 | cp $f ${OUTPUTB}/do_package/$dest | ||
202 | done | ||
203 | } | ||
204 | |||
205 | compare_deps() { | ||
206 | # you can run just compare task with command like this | ||
207 | # OUTPUT_BASE=test-dependencies/1373140172 \ | ||
208 | # OUTPUT_MAX=${OUTPUT_BASE}/2_max \ | ||
209 | # OUTPUT_MIN=${OUTPUT_BASE}/3_min \ | ||
210 | # openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c | ||
211 | echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" =====" | ||
212 | [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}/comp | ||
213 | mkdir -p ${OUTPUTC} | ||
214 | OUTPUT_FILE=${OUTPUTC}/dependency-changes | ||
215 | echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages" | ||
216 | echo > ${OUTPUT_FILE} | ||
217 | |||
218 | [ -d ${OUTPUT_MAX} ] || echo_error "Directory with output from build 2 \"${OUTPUT_MAX}\" does not exist" | ||
219 | [ -d ${OUTPUT_MIN} ] || echo_error "Directory with output from build 3 \"${OUTPUT_MIN}\" does not exist" | ||
220 | [ -d ${OUTPUT_MAX}/packages/ ] || echo_error "Directory with packages from build 2 \"${OUTPUT_MAX}/packages/\" does not exist" | ||
221 | [ -d ${OUTPUT_MIN}/packages/ ] || echo_error "Directory with packages from build 3 \"${OUTPUT_MIN}/packages/\" does not exist" | ||
222 | i=0 | ||
223 | find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do | ||
224 | max_pkg=${OUTPUT_MAX}/${pkg} | ||
225 | min_pkg=${OUTPUT_MIN}/${pkg} | ||
226 | # pkg=packages/armv5te-oe-linux-gnueabi/libungif/libungif/latest | ||
227 | recipe=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\1#g'` | ||
228 | package=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\2#g'` | ||
229 | if [ ! -f "${min_pkg}" ] ; then | ||
230 | echo "ERROR: ${recipe}: ${package} package isn't created when building with minimal dependencies?" | tee -a ${OUTPUT_FILE} | ||
231 | echo ${recipe} >> ${OUTPUTC}/failed-recipes.log | ||
232 | continue | ||
233 | fi | ||
234 | # strip version information in parenthesis | ||
235 | max_deps=`grep "^RDEPENDS = " ${max_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'` | ||
236 | min_deps=`grep "^RDEPENDS = " ${min_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'` | ||
237 | if [ "$i" = 100 ] ; then | ||
238 | echo -n "." # cheap progressbar | ||
239 | i=0 | ||
240 | fi | ||
241 | if [ "${max_deps}" = "${min_deps}" ] ; then | ||
242 | # it's annoying long, but at least it's showing some progress, warnings are grepped at the end | ||
243 | echo "NOTE: ${recipe}: ${package} rdepends weren't changed" >> ${OUTPUT_FILE} | ||
244 | else | ||
245 | missing_deps= | ||
246 | for dep in ${max_deps}; do | ||
247 | if ! echo "${min_deps}" | grep -q " ${dep} " ; then | ||
248 | missing_deps="${missing_deps} ${dep}" | ||
249 | echo # to get rid of dots on last line | ||
250 | echo "WARN: ${recipe}: ${package} rdepends on ${dep}, but it isn't a build dependency?" | tee -a ${OUTPUT_FILE} | ||
251 | fi | ||
252 | done | ||
253 | if [ -n "${missing_deps}" ] ; then | ||
254 | echo ${recipe} >> ${OUTPUTC}/failed-recipes.log | ||
255 | fi | ||
256 | fi | ||
257 | i=`expr $i + 1` | ||
258 | done | ||
259 | echo # to get rid of dots on last line | ||
260 | echo "Found differences: " | ||
261 | grep "^WARN: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.warn.log | ||
262 | echo "Found errors: " | ||
263 | grep "^ERROR: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.error.log | ||
264 | RESULT+=`cat ${OUTPUT_FILE}.warn.log | wc -l` | ||
265 | RESULT+=`cat ${OUTPUT_FILE}.error.log | wc -l` | ||
266 | } | ||
267 | |||
268 | for TYPE in $buildtype; do | ||
269 | case ${TYPE} in | ||
270 | 1) build_all;; | ||
271 | 2) build_every_recipe;; | ||
272 | 3) build_every_recipe;; | ||
273 | 4) build_every_recipe;; | ||
274 | c) compare_deps;; | ||
275 | *) echo_error "Invalid buildtype \"$TYPE\"" | ||
276 | esac | ||
277 | done | ||
278 | |||
279 | cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u >> ${OUTPUT_BASE}/failed-recipes.log | ||
280 | |||
281 | if [ "${RESULT}" != "0" ] ; then | ||
282 | echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`" | ||
283 | fi | ||
284 | |||
285 | echo "INFO: Output written in: ${OUTPUT_BASE}" | ||
286 | exit ${RESULT} | ||
diff --git a/scripts/test-reexec b/scripts/test-reexec new file mode 100755 index 0000000000..9eaa96e754 --- /dev/null +++ b/scripts/test-reexec | |||
@@ -0,0 +1,123 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Test Script for task re-execution | ||
4 | # | ||
5 | # Copyright 2012 Intel Corporation | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License as published by | ||
10 | # the Free Software Foundation; either version 2 of the License, or | ||
11 | # (at your option) any later version. | ||
12 | # | ||
13 | # This program is distributed in the hope that it will be useful, | ||
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | # GNU General Public License for more details. | ||
17 | # | ||
18 | # You should have received a copy of the GNU General Public License | ||
19 | # along with this program; if not, write to the Free Software | ||
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | # | ||
22 | # DESCRIPTION | ||
23 | # This script is intended to address issues for re-execution of | ||
24 | # tasks. The test results are saved in ./reexeclogs. Force build | ||
25 | # logs are saved with prefix "force". Build failure logs are saved with | ||
26 | # prefix "failed". Log files with prefix "initial" are used to save | ||
27 | # initial build logs for each recipe. Log files with prefix "clean" are | ||
28 | # used to save logs of clean task after testing for a recipe is finished. | ||
29 | # | ||
30 | |||
31 | targets=`bitbake -s | cut -d " " -f 1` | ||
32 | |||
33 | LOGS=./reexeclogs | ||
34 | |||
35 | mkdir -p $LOGS | ||
36 | |||
37 | # Clear sstate files for specified recipe | ||
38 | function clearsstate { | ||
39 | target=$1 | ||
40 | |||
41 | sstate_dir=`bitbake $target -e | grep "^SSTATE_DIR" | cut -d "\"" -f 2` | ||
42 | sstate_pkgspec=`bitbake $target -e | grep "^SSTATE_PKGSPEC" | cut -d "\"" -f 2` | ||
43 | sstasks=`bitbake $target -e | grep "^SSTATETASKS" | cut -d "\"" -f 2` | ||
44 | |||
45 | for sstask in $sstasks | ||
46 | do | ||
47 | sstask=${sstask:3} | ||
48 | case $sstask in | ||
49 | populate_sysroot) sstask="populate-sysroot" | ||
50 | ;; | ||
51 | populate_lic) sstask="populate-lic" | ||
52 | ;; | ||
53 | package_write_ipk) sstask="deploy-ipk" | ||
54 | ;; | ||
55 | package_write_deb) sstask="deploy-deb" | ||
56 | ;; | ||
57 | package_write_rpm) sstask="deploy-rpm" | ||
58 | ;; | ||
59 | package) sstask="package" | ||
60 | ;; | ||
61 | deploy) sstask="deploy" | ||
62 | ;; | ||
63 | *) | ||
64 | ;; | ||
65 | esac | ||
66 | |||
67 | echo "Removing ${sstate_dir}/${sstate_pkgspec}*_${sstask}.tgz* for $target" | ||
68 | rm -rf ${sstate_dir}/${sstate_pkgspec}*_${sstask}.tgz* | ||
69 | done | ||
70 | } | ||
71 | |||
72 | # Function to re-execute specified task of recipe | ||
73 | function testit { | ||
74 | target=$1 | ||
75 | task=$2 | ||
76 | |||
77 | task=`echo $task | sed 's/_setscene//'` | ||
78 | |||
79 | if [ -f $LOGS/force.$target.$task ]; then | ||
80 | return | ||
81 | fi | ||
82 | |||
83 | case $task in | ||
84 | clean|build|cleansstate|cleanall|package|cleansstate2|package_write|package_write_ipk|package_write_rpm|package_write_deb|fetch|populate_lic) return;; | ||
85 | fetchall|devshell|buildall|listtasks|checkuri|checkuriall) return;; | ||
86 | esac | ||
87 | |||
88 | echo "Attempting target $target, task $task" | ||
89 | echo "Initial build" | ||
90 | bitbake $target -c cleansstate > $LOGS/initial.$target.$task | ||
91 | bitbake $target >> $LOGS/initial.$target.$task | ||
92 | clearsstate $target >> $LOGS/initial.$target.$task | ||
93 | echo "Re-execution build" | ||
94 | bitbake $target -c $task -f > $LOGS/force.$target.$task | ||
95 | if [ "$?" != 0 ]; then | ||
96 | echo "FAILURE for $target $task" | ||
97 | cp $LOGS/force.$target.$task $LOGS/failed.$target.$task | ||
98 | bitbake $target -c clean > $LOGS/clean.$target.$task | ||
99 | else | ||
100 | bitbake $target >> $LOGS/force.$target.$task | ||
101 | if [ "$?" != 0 ]; then | ||
102 | echo "FAILURE2 for $target $task" | ||
103 | cp $LOGS/force.$target.$task $LOGS/failed.$target.$task | ||
104 | bitbake $target -c clean > $LOGS/clean.$target.$task | ||
105 | fi | ||
106 | fi | ||
107 | echo "Done" | ||
108 | } | ||
109 | |||
110 | # Go through the recipe list and these recipes' task list | ||
111 | # Then re-execute them | ||
112 | for target in $targets; do | ||
113 | # Remove log messages from bitbake output | ||
114 | case $target in | ||
115 | Summary*|WARNING*|Loading*|Loaded*|Package*|=====*) continue;; | ||
116 | esac | ||
117 | tasks=`bitbake $target -c listtasks | grep ^do_ | sed s/do_//` | ||
118 | for task in $tasks; do | ||
119 | testit $target $task | ||
120 | done | ||
121 | done | ||
122 | |||
123 | |||
diff --git a/scripts/test-remote-image b/scripts/test-remote-image new file mode 100755 index 0000000000..f3a44ebe51 --- /dev/null +++ b/scripts/test-remote-image | |||
@@ -0,0 +1,360 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | # Copyright (c) 2014 Intel Corporation | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License version 2 as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | |||
18 | # DESCRIPTION | ||
19 | # This script is used to test public autobuilder images on remote hardware. | ||
20 | # The script is called from a machine that is able download the images from the remote images repository and to connect to the test hardware. | ||
21 | # | ||
22 | # test-remote-image --image-type core-image-sato --repo-link http://192.168.10.2/images --required-packages rpm psplash | ||
23 | # | ||
24 | # Translation: Build the 'rpm' and 'pslash' packages and test a remote core-image-sato image using the http://192.168.10.2/images repository. | ||
25 | # | ||
26 | # You can also use the '-h' option to see some help information. | ||
27 | |||
28 | import os | ||
29 | import sys | ||
30 | import argparse | ||
31 | import logging | ||
32 | import shutil | ||
33 | from abc import ABCMeta, abstractmethod | ||
34 | |||
35 | # Add path to scripts/lib in sys.path; | ||
36 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
37 | lib_path = scripts_path + '/lib' | ||
38 | sys.path = sys.path + [lib_path] | ||
39 | |||
40 | import scriptpath | ||
41 | |||
42 | # Add meta/lib to sys.path | ||
43 | scriptpath.add_oe_lib_path() | ||
44 | |||
45 | import oeqa.utils.ftools as ftools | ||
46 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var | ||
47 | |||
48 | # Add all lib paths relative to BBPATH to sys.path; this is used to find and import the target controllers. | ||
49 | for path in get_bb_var('BBPATH').split(":"): | ||
50 | sys.path.insert(0, os.path.abspath(os.path.join(path, 'lib'))) | ||
51 | |||
52 | # In order to import modules that contain target controllers, we need the bitbake libraries in sys.path . | ||
53 | bitbakepath = scriptpath.add_bitbake_lib_path() | ||
54 | if not bitbakepath: | ||
55 | sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n") | ||
56 | sys.exit(1) | ||
57 | |||
58 | # create a logger | ||
59 | def logger_create(): | ||
60 | log = logging.getLogger('hwauto') | ||
61 | log.setLevel(logging.DEBUG) | ||
62 | |||
63 | fh = logging.FileHandler(filename='hwauto.log', mode='w') | ||
64 | fh.setLevel(logging.DEBUG) | ||
65 | |||
66 | ch = logging.StreamHandler(sys.stdout) | ||
67 | ch.setLevel(logging.INFO) | ||
68 | |||
69 | formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | ||
70 | fh.setFormatter(formatter) | ||
71 | ch.setFormatter(formatter) | ||
72 | |||
73 | log.addHandler(fh) | ||
74 | log.addHandler(ch) | ||
75 | |||
76 | return log | ||
77 | |||
78 | # instantiate the logger | ||
79 | log = logger_create() | ||
80 | |||
81 | |||
82 | # Define and return the arguments parser for the script | ||
83 | def get_args_parser(): | ||
84 | description = "This script is used to run automated runtime tests using remotely published image files. You should prepare the build environment just like building local images and running the tests." | ||
85 | parser = argparse.ArgumentParser(description=description) | ||
86 | parser.add_argument('--image-types', required=True, action="store", nargs='*', dest="image_types", default=None, help='The image types to test(ex: core-image-minimal).') | ||
87 | parser.add_argument('--repo-link', required=True, action="store", type=str, dest="repo_link", default=None, help='The link to the remote images repository.') | ||
88 | parser.add_argument('--required-packages', required=False, action="store", nargs='*', dest="required_packages", default=None, help='Required packages for the tests. They will be built before the testing begins.') | ||
89 | parser.add_argument('--targetprofile', required=False, action="store", nargs=1, dest="targetprofile", default='AutoTargetProfile', help='The target profile to be used.') | ||
90 | parser.add_argument('--repoprofile', required=False, action="store", nargs=1, dest="repoprofile", default='PublicAB', help='The repo profile to be used.') | ||
91 | parser.add_argument('--skip-download', required=False, action="store_true", dest="skip_download", default=False, help='Skip downloading the images completely. This needs the correct files to be present in the directory specified by the target profile.') | ||
92 | return parser | ||
93 | |||
94 | class BaseTargetProfile(object): | ||
95 | """ | ||
96 | This class defines the meta profile for a specific target (MACHINE type + image type). | ||
97 | """ | ||
98 | |||
99 | __metaclass__ = ABCMeta | ||
100 | |||
101 | def __init__(self, image_type): | ||
102 | self.image_type = image_type | ||
103 | |||
104 | self.kernel_file = None | ||
105 | self.rootfs_file = None | ||
106 | self.manifest_file = None | ||
107 | self.extra_download_files = [] # Extra files (full name) to be downloaded. They should be situated in repo_link | ||
108 | |||
109 | # This method is used as the standard interface with the target profile classes. | ||
110 | # It returns a dictionary containing a list of files and their meaning/description. | ||
111 | def get_files_dict(self): | ||
112 | files_dict = {} | ||
113 | |||
114 | if self.kernel_file: | ||
115 | files_dict['kernel_file'] = self.kernel_file | ||
116 | else: | ||
117 | log.error('The target profile did not set a kernel file.') | ||
118 | sys.exit(1) | ||
119 | |||
120 | if self.rootfs_file: | ||
121 | files_dict['rootfs_file'] = self.rootfs_file | ||
122 | else: | ||
123 | log.error('The target profile did not set a rootfs file.') | ||
124 | sys.exit(1) | ||
125 | |||
126 | if self.manifest_file: | ||
127 | files_dict['manifest_file'] = self.manifest_file | ||
128 | else: | ||
129 | log.error('The target profile did not set a manifest file.') | ||
130 | sys.exit(1) | ||
131 | |||
132 | for idx, f in enumerate(self.extra_download_files): | ||
133 | files_dict['extra_download_file' + str(idx)] = f | ||
134 | |||
135 | return files_dict | ||
136 | |||
137 | class AutoTargetProfile(BaseTargetProfile): | ||
138 | |||
139 | def __init__(self, image_type): | ||
140 | super(AutoTargetProfile, self).__init__(image_type) | ||
141 | self.image_name = get_bb_var('IMAGE_LINK_NAME', target=image_type) | ||
142 | self.kernel_type = get_bb_var('KERNEL_IMAGETYPE', target=image_type) | ||
143 | self.controller = self.get_controller() | ||
144 | |||
145 | self.set_kernel_file() | ||
146 | self.set_rootfs_file() | ||
147 | self.set_manifest_file() | ||
148 | self.set_extra_download_files() | ||
149 | |||
150 | # Get the controller object that will be used by bitbake. | ||
151 | def get_controller(self): | ||
152 | from oeqa.controllers.testtargetloader import TestTargetLoader | ||
153 | |||
154 | target_controller = get_bb_var('TEST_TARGET') | ||
155 | bbpath = get_bb_var('BBPATH').split(':') | ||
156 | |||
157 | if target_controller == "qemu": | ||
158 | from oeqa.targetcontrol import QemuTarget | ||
159 | controller = QemuTarget | ||
160 | else: | ||
161 | testtargetloader = TestTargetLoader() | ||
162 | controller = testtargetloader.get_controller_module(target_controller, bbpath) | ||
163 | return controller | ||
164 | |||
165 | def set_kernel_file(self): | ||
166 | postconfig = "QA_GET_MACHINE = \"${MACHINE}\"" | ||
167 | machine = get_bb_var('QA_GET_MACHINE', postconfig=postconfig) | ||
168 | self.kernel_file = self.kernel_type + '-' + machine + '.bin' | ||
169 | |||
170 | def set_rootfs_file(self): | ||
171 | image_fstypes = get_bb_var('IMAGE_FSTYPES').split(' ') | ||
172 | # Get a matching value between target's IMAGE_FSTYPES and the image fstypes suppoerted by the target controller. | ||
173 | fstype = self.controller.match_image_fstype(d=None, image_fstypes=image_fstypes) | ||
174 | if fstype: | ||
175 | self.rootfs_file = self.image_name + '.' + fstype | ||
176 | else: | ||
177 | log.error("Could not get a compatible image fstype. Check that IMAGE_FSTYPES and the target controller's supported_image_fstypes fileds have common values.") | ||
178 | sys.exit(1) | ||
179 | |||
180 | def set_manifest_file(self): | ||
181 | self.manifest_file = self.image_name + ".manifest" | ||
182 | |||
183 | def set_extra_download_files(self): | ||
184 | self.extra_download_files = self.get_controller_extra_files() | ||
185 | if not self.extra_download_files: | ||
186 | self.extra_download_files = [] | ||
187 | |||
188 | def get_controller_extra_files(self): | ||
189 | controller = self.get_controller() | ||
190 | return controller.get_extra_files() | ||
191 | |||
192 | |||
193 | class BaseRepoProfile(object): | ||
194 | """ | ||
195 | This class defines the meta profile for an images repository. | ||
196 | """ | ||
197 | |||
198 | __metaclass__ = ABCMeta | ||
199 | |||
200 | def __init__(self, repolink, localdir): | ||
201 | self.localdir = localdir | ||
202 | self.repolink = repolink | ||
203 | |||
204 | # The following abstract methods are the interfaces to the repository profile classes derived from this abstract class. | ||
205 | |||
206 | # This method should check the file named 'file_name' if it is different than the upstream one. | ||
207 | # Should return False if the image is the same as the upstream and True if it differs. | ||
208 | @abstractmethod | ||
209 | def check_old_file(self, file_name): | ||
210 | pass | ||
211 | |||
212 | # This method should fetch file_name and create a symlink to localname if set. | ||
213 | @abstractmethod | ||
214 | def fetch(self, file_name, localname=None): | ||
215 | pass | ||
216 | |||
217 | class PublicAB(BaseRepoProfile): | ||
218 | |||
219 | def __init__(self, repolink, localdir=None): | ||
220 | super(PublicAB, self).__init__(repolink, localdir) | ||
221 | if localdir is None: | ||
222 | self.localdir = os.path.join(os.environ['BUILDDIR'], 'PublicABMirror') | ||
223 | |||
224 | # Not yet implemented. Always returning True. | ||
225 | def check_old_file(self, file_name): | ||
226 | return True | ||
227 | |||
228 | def get_repo_path(self): | ||
229 | path = '/machines/' | ||
230 | |||
231 | postconfig = "QA_GET_MACHINE = \"${MACHINE}\"" | ||
232 | machine = get_bb_var('QA_GET_MACHINE', postconfig=postconfig) | ||
233 | if 'qemu' in machine: | ||
234 | path += 'qemu/' | ||
235 | |||
236 | postconfig = "QA_GET_DISTRO = \"${DISTRO}\"" | ||
237 | distro = get_bb_var('QA_GET_DISTRO', postconfig=postconfig) | ||
238 | path += distro.replace('poky', machine) + '/' | ||
239 | return path | ||
240 | |||
241 | |||
242 | def fetch(self, file_name, localname=None): | ||
243 | repo_path = self.get_repo_path() | ||
244 | link = self.repolink + repo_path + file_name | ||
245 | |||
246 | self.wget(link, self.localdir, localname) | ||
247 | |||
248 | def wget(self, link, localdir, localname=None, extraargs=None): | ||
249 | wget_cmd = '/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate ' | ||
250 | |||
251 | if localname: | ||
252 | wget_cmd += ' -O ' + localname + ' ' | ||
253 | |||
254 | if extraargs: | ||
255 | wget_cmd += ' ' + extraargs + ' ' | ||
256 | |||
257 | wget_cmd += " -P %s '%s'" % (localdir, link) | ||
258 | runCmd(wget_cmd) | ||
259 | |||
260 | class HwAuto(): | ||
261 | |||
262 | def __init__(self, image_types, repolink, required_packages, targetprofile, repoprofile, skip_download): | ||
263 | log.info('Initializing..') | ||
264 | self.image_types = image_types | ||
265 | self.repolink = repolink | ||
266 | self.required_packages = required_packages | ||
267 | self.targetprofile = targetprofile | ||
268 | self.repoprofile = repoprofile | ||
269 | self.skip_download = skip_download | ||
270 | self.repo = self.get_repo_profile(self.repolink) | ||
271 | |||
272 | # Get the repository profile; for now we only look inside this module. | ||
273 | def get_repo_profile(self, *args, **kwargs): | ||
274 | repo = getattr(sys.modules[__name__], self.repoprofile)(*args, **kwargs) | ||
275 | log.info("Using repo profile: %s" % repo.__class__.__name__) | ||
276 | return repo | ||
277 | |||
278 | # Get the target profile; for now we only look inside this module. | ||
279 | def get_target_profile(self, *args, **kwargs): | ||
280 | target = getattr(sys.modules[__name__], self.targetprofile)(*args, **kwargs) | ||
281 | log.info("Using target profile: %s" % target.__class__.__name__) | ||
282 | return target | ||
283 | |||
284 | # Run the testimage task on a build while redirecting DEPLOY_DIR_IMAGE to repo.localdir, where the images are downloaded. | ||
285 | def runTestimageBuild(self, image_type): | ||
286 | log.info("Running the runtime tests for %s.." % image_type) | ||
287 | postconfig = "DEPLOY_DIR_IMAGE = \"%s\"" % self.repo.localdir | ||
288 | result = bitbake("%s -c testimage" % image_type, ignore_status=True, postconfig=postconfig) | ||
289 | testimage_results = ftools.read_file(os.path.join(get_bb_var("T", image_type), "log.do_testimage")) | ||
290 | log.info('Runtime tests results for %s:' % image_type) | ||
291 | print testimage_results | ||
292 | return result | ||
293 | |||
294 | # Start the procedure! | ||
295 | def run(self): | ||
296 | if self.required_packages: | ||
297 | # Build the required packages for the tests | ||
298 | log.info("Building the required packages: %s ." % ', '.join(map(str, self.required_packages))) | ||
299 | result = bitbake(self.required_packages, ignore_status=True) | ||
300 | if result.status != 0: | ||
301 | log.error("Could not build required packages: %s. Output: %s" % (self.required_packages, result.output)) | ||
302 | sys.exit(1) | ||
303 | |||
304 | # Build the package repository meta data. | ||
305 | log.info("Building the package index.") | ||
306 | result = bitbake("package-index", ignore_status=True) | ||
307 | if result.status != 0: | ||
308 | log.error("Could not build 'package-index'. Output: %s" % result.output) | ||
309 | sys.exit(1) | ||
310 | |||
311 | # Create the directory structure for the images to be downloaded | ||
312 | log.info("Creating directory structure %s" % self.repo.localdir) | ||
313 | if not os.path.exists(self.repo.localdir): | ||
314 | os.makedirs(self.repo.localdir) | ||
315 | |||
316 | # For each image type, download the needed files and run the tests. | ||
317 | noissuesfound = True | ||
318 | for image_type in self.image_types: | ||
319 | if self.skip_download: | ||
320 | log.info("Skipping downloading the images..") | ||
321 | else: | ||
322 | target = self.get_target_profile(image_type) | ||
323 | files_dict = target.get_files_dict() | ||
324 | log.info("Downloading files for %s" % image_type) | ||
325 | for f in files_dict: | ||
326 | if self.repo.check_old_file(files_dict[f]): | ||
327 | filepath = os.path.join(self.repo.localdir, files_dict[f]) | ||
328 | if os.path.exists(filepath): | ||
329 | os.remove(filepath) | ||
330 | self.repo.fetch(files_dict[f]) | ||
331 | |||
332 | result = self.runTestimageBuild(image_type) | ||
333 | if result.status != 0: | ||
334 | noissuesfound = False | ||
335 | |||
336 | if noissuesfound: | ||
337 | log.info('Finished. No issues found.') | ||
338 | else: | ||
339 | log.error('Finished. Some runtime tests have failed. Returning non-0 status code.') | ||
340 | sys.exit(1) | ||
341 | |||
342 | |||
343 | |||
344 | def main(): | ||
345 | |||
346 | parser = get_args_parser() | ||
347 | args = parser.parse_args() | ||
348 | |||
349 | hwauto = HwAuto(image_types=args.image_types, repolink=args.repo_link, required_packages=args.required_packages, targetprofile=args.targetprofile, repoprofile=args.repoprofile, skip_download=args.skip_download) | ||
350 | |||
351 | hwauto.run() | ||
352 | |||
353 | if __name__ == "__main__": | ||
354 | try: | ||
355 | ret = main() | ||
356 | except Exception: | ||
357 | ret = 1 | ||
358 | import traceback | ||
359 | traceback.print_exc(5) | ||
360 | sys.exit(ret) | ||
diff --git a/scripts/tiny/dirsize.py b/scripts/tiny/dirsize.py new file mode 100755 index 0000000000..40ff4ab895 --- /dev/null +++ b/scripts/tiny/dirsize.py | |||
@@ -0,0 +1,93 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # Copyright (c) 2011, Intel Corporation. | ||
4 | # All rights reserved. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | # | ||
20 | # | ||
21 | # Display details of the root filesystem size, broken up by directory. | ||
22 | # Allows for limiting by size to focus on the larger files. | ||
23 | # | ||
24 | # Author: Darren Hart <dvhart@linux.intel.com> | ||
25 | # | ||
26 | |||
27 | import os | ||
28 | import sys | ||
29 | import stat | ||
30 | |||
31 | class Record: | ||
32 | def create(path): | ||
33 | r = Record(path) | ||
34 | |||
35 | s = os.lstat(path) | ||
36 | if stat.S_ISDIR(s.st_mode): | ||
37 | for p in os.listdir(path): | ||
38 | pathname = path + "/" + p | ||
39 | ss = os.lstat(pathname) | ||
40 | if not stat.S_ISLNK(ss.st_mode): | ||
41 | r.records.append(Record.create(pathname)) | ||
42 | r.size += r.records[-1].size | ||
43 | r.records.sort(reverse=True) | ||
44 | else: | ||
45 | r.size = os.lstat(path).st_size | ||
46 | |||
47 | return r | ||
48 | create = staticmethod(create) | ||
49 | |||
50 | def __init__(self, path): | ||
51 | self.path = path | ||
52 | self.size = 0 | ||
53 | self.records = [] | ||
54 | |||
55 | def __cmp__(this, that): | ||
56 | if that is None: | ||
57 | return 1 | ||
58 | if not isinstance(that, Record): | ||
59 | raise TypeError | ||
60 | if len(this.records) > 0 and len(that.records) == 0: | ||
61 | return -1 | ||
62 | if len(this.records) == 0 and len(that.records) > 0: | ||
63 | return 1 | ||
64 | if this.size < that.size: | ||
65 | return -1 | ||
66 | if this.size > that.size: | ||
67 | return 1 | ||
68 | return 0 | ||
69 | |||
70 | def show(self, minsize): | ||
71 | total = 0 | ||
72 | if self.size <= minsize: | ||
73 | return 0 | ||
74 | print "%10d %s" % (self.size, self.path) | ||
75 | for r in self.records: | ||
76 | total += r.show(minsize) | ||
77 | if len(self.records) == 0: | ||
78 | total = self.size | ||
79 | return total | ||
80 | |||
81 | |||
82 | def main(): | ||
83 | minsize = 0 | ||
84 | if len(sys.argv) == 2: | ||
85 | minsize = int(sys.argv[1]) | ||
86 | rootfs = Record.create(".") | ||
87 | total = rootfs.show(minsize) | ||
88 | print "Displayed %d/%d bytes (%.2f%%)" % \ | ||
89 | (total, rootfs.size, 100 * float(total) / rootfs.size) | ||
90 | |||
91 | |||
92 | if __name__ == "__main__": | ||
93 | main() | ||
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py new file mode 100755 index 0000000000..4006f2f6f1 --- /dev/null +++ b/scripts/tiny/ksize.py | |||
@@ -0,0 +1,165 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # Copyright (c) 2011, Intel Corporation. | ||
4 | # All rights reserved. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License as published by | ||
8 | # the Free Software Foundation; either version 2 of the License, or | ||
9 | # (at your option) any later version. | ||
10 | # | ||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | # GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License | ||
17 | # along with this program; if not, write to the Free Software | ||
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | # | ||
20 | # | ||
21 | # Display details of the kernel build size, broken up by built-in.o. Sort | ||
22 | # the objects by size. Run from the top level kernel build directory. | ||
23 | # | ||
24 | # Author: Darren Hart <dvhart@linux.intel.com> | ||
25 | # | ||
26 | |||
27 | import sys | ||
28 | import getopt | ||
29 | import os | ||
30 | from subprocess import * | ||
31 | from string import join | ||
32 | |||
33 | |||
34 | def usage(): | ||
35 | prog = os.path.basename(sys.argv[0]) | ||
36 | print 'Usage: %s [OPTION]...' % (prog) | ||
37 | print ' -d, display an additional level of drivers detail' | ||
38 | print ' -h, --help display this help and exit' | ||
39 | print '' | ||
40 | print 'Run %s from the top-level Linux kernel build directory.' % (prog) | ||
41 | |||
42 | |||
43 | class Sizes: | ||
44 | def __init__(self, glob): | ||
45 | self.title = glob | ||
46 | p = Popen("size -t " + glob, shell=True, stdout=PIPE, stderr=PIPE) | ||
47 | output = p.communicate()[0].splitlines() | ||
48 | if len(output) > 2: | ||
49 | sizes = output[-1].split()[0:4] | ||
50 | self.text = int(sizes[0]) | ||
51 | self.data = int(sizes[1]) | ||
52 | self.bss = int(sizes[2]) | ||
53 | self.total = int(sizes[3]) | ||
54 | else: | ||
55 | self.text = self.data = self.bss = self.total = 0 | ||
56 | |||
57 | def show(self, indent=""): | ||
58 | print "%-32s %10d | %10d %10d %10d" % \ | ||
59 | (indent+self.title, self.total, self.text, self.data, self.bss) | ||
60 | |||
61 | |||
62 | class Report: | ||
63 | def create(filename, title, subglob=None): | ||
64 | r = Report(filename, title) | ||
65 | path = os.path.dirname(filename) | ||
66 | |||
67 | p = Popen("ls " + path + "/*.o | grep -v built-in.o", | ||
68 | shell=True, stdout=PIPE, stderr=PIPE) | ||
69 | glob = join(p.communicate()[0].splitlines()) | ||
70 | oreport = Report(glob, path + "/*.o") | ||
71 | oreport.sizes.title = path + "/*.o" | ||
72 | r.parts.append(oreport) | ||
73 | |||
74 | if subglob: | ||
75 | p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE) | ||
76 | for f in p.communicate()[0].splitlines(): | ||
77 | path = os.path.dirname(f) | ||
78 | r.parts.append(Report.create(f, path, path + "/*/built-in.o")) | ||
79 | r.parts.sort(reverse=True) | ||
80 | |||
81 | for b in r.parts: | ||
82 | r.totals["total"] += b.sizes.total | ||
83 | r.totals["text"] += b.sizes.text | ||
84 | r.totals["data"] += b.sizes.data | ||
85 | r.totals["bss"] += b.sizes.bss | ||
86 | |||
87 | r.deltas["total"] = r.sizes.total - r.totals["total"] | ||
88 | r.deltas["text"] = r.sizes.text - r.totals["text"] | ||
89 | r.deltas["data"] = r.sizes.data - r.totals["data"] | ||
90 | r.deltas["bss"] = r.sizes.bss - r.totals["bss"] | ||
91 | return r | ||
92 | create = staticmethod(create) | ||
93 | |||
94 | def __init__(self, glob, title): | ||
95 | self.glob = glob | ||
96 | self.title = title | ||
97 | self.sizes = Sizes(glob) | ||
98 | self.parts = [] | ||
99 | self.totals = {"total":0, "text":0, "data":0, "bss":0} | ||
100 | self.deltas = {"total":0, "text":0, "data":0, "bss":0} | ||
101 | |||
102 | def show(self, indent=""): | ||
103 | rule = str.ljust(indent, 80, '-') | ||
104 | print "%-32s %10s | %10s %10s %10s" % \ | ||
105 | (indent+self.title, "total", "text", "data", "bss") | ||
106 | print rule | ||
107 | self.sizes.show(indent) | ||
108 | print rule | ||
109 | for p in self.parts: | ||
110 | if p.sizes.total > 0: | ||
111 | p.sizes.show(indent) | ||
112 | print rule | ||
113 | print "%-32s %10d | %10d %10d %10d" % \ | ||
114 | (indent+"sum", self.totals["total"], self.totals["text"], | ||
115 | self.totals["data"], self.totals["bss"]) | ||
116 | print "%-32s %10d | %10d %10d %10d" % \ | ||
117 | (indent+"delta", self.deltas["total"], self.deltas["text"], | ||
118 | self.deltas["data"], self.deltas["bss"]) | ||
119 | print "\n" | ||
120 | |||
121 | def __cmp__(this, that): | ||
122 | if that is None: | ||
123 | return 1 | ||
124 | if not isinstance(that, Report): | ||
125 | raise TypeError | ||
126 | if this.sizes.total < that.sizes.total: | ||
127 | return -1 | ||
128 | if this.sizes.total > that.sizes.total: | ||
129 | return 1 | ||
130 | return 0 | ||
131 | |||
132 | |||
133 | def main(): | ||
134 | try: | ||
135 | opts, args = getopt.getopt(sys.argv[1:], "dh", ["help"]) | ||
136 | except getopt.GetoptError, err: | ||
137 | print '%s' % str(err) | ||
138 | usage() | ||
139 | sys.exit(2) | ||
140 | |||
141 | driver_detail = False | ||
142 | for o, a in opts: | ||
143 | if o == '-d': | ||
144 | driver_detail = True | ||
145 | elif o in ('-h', '--help'): | ||
146 | usage() | ||
147 | sys.exit(0) | ||
148 | else: | ||
149 | assert False, "unhandled option" | ||
150 | |||
151 | glob = "arch/*/built-in.o */built-in.o" | ||
152 | vmlinux = Report.create("vmlinux", "Linux Kernel", glob) | ||
153 | |||
154 | vmlinux.show() | ||
155 | for b in vmlinux.parts: | ||
156 | if b.totals["total"] > 0 and len(b.parts) > 1: | ||
157 | b.show() | ||
158 | if b.title == "drivers" and driver_detail: | ||
159 | for d in b.parts: | ||
160 | if d.totals["total"] > 0 and len(d.parts) > 1: | ||
161 | d.show(" ") | ||
162 | |||
163 | |||
164 | if __name__ == "__main__": | ||
165 | main() | ||
diff --git a/scripts/wic b/scripts/wic new file mode 100755 index 0000000000..c708a58e90 --- /dev/null +++ b/scripts/wic | |||
@@ -0,0 +1,328 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright (c) 2013, Intel Corporation. | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | # | ||
21 | # DESCRIPTION 'wic' is the OpenEmbedded Image Creator that users can | ||
22 | # use to generate bootable images. Invoking it without any arguments | ||
23 | # will display help screens for the 'wic' command and list the | ||
24 | # available 'wic' subcommands. Invoking a subcommand without any | ||
25 | # arguments will likewise display help screens for the specified | ||
26 | # subcommand. Please use that interface for detailed help. | ||
27 | # | ||
28 | # AUTHORS | ||
29 | # Tom Zanussi <tom.zanussi (at] linux.intel.com> | ||
30 | # | ||
31 | |||
32 | __version__ = "0.1.0" | ||
33 | |||
34 | # Python Standard Library modules | ||
35 | import os | ||
36 | import sys | ||
37 | import optparse | ||
38 | import logging | ||
39 | |||
40 | # External modules | ||
41 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
42 | lib_path = scripts_path + '/lib' | ||
43 | sys.path = sys.path + [lib_path] | ||
44 | |||
45 | from image.help import * | ||
46 | from image.engine import * | ||
47 | |||
48 | def rootfs_dir_to_args(krootfs_dir): | ||
49 | """ | ||
50 | Get a rootfs_dir dict and serialize to string | ||
51 | """ | ||
52 | rootfs_dir = '' | ||
53 | for k, v in krootfs_dir.items(): | ||
54 | rootfs_dir += ' ' | ||
55 | rootfs_dir += '='.join([k, v]) | ||
56 | return rootfs_dir.strip() | ||
57 | |||
58 | def callback_rootfs_dir(option, opt, value, parser): | ||
59 | """ | ||
60 | Build a dict using --rootfs_dir connection=dir | ||
61 | """ | ||
62 | if not type(parser.values.rootfs_dir) is dict: | ||
63 | parser.values.rootfs_dir = dict() | ||
64 | |||
65 | if '=' in value: | ||
66 | (key, rootfs_dir) = value.split('=') | ||
67 | else: | ||
68 | key = 'ROOTFS_DIR' | ||
69 | rootfs_dir = value | ||
70 | |||
71 | parser.values.rootfs_dir[key] = rootfs_dir | ||
72 | |||
73 | def wic_create_subcommand(args, usage_str): | ||
74 | """ | ||
75 | Command-line handling for image creation. The real work is done | ||
76 | by image.engine.wic_create() | ||
77 | """ | ||
78 | parser = optparse.OptionParser(usage = usage_str) | ||
79 | |||
80 | parser.add_option("-o", "--outdir", dest = "outdir", | ||
81 | action = "store", help = "name of directory to create image in") | ||
82 | parser.add_option("-i", "--infile", dest = "properties_file", | ||
83 | action = "store", help = "name of file containing the values for image properties as a JSON file") | ||
84 | parser.add_option("-e", "--image-name", dest = "image_name", | ||
85 | action = "store", help = "name of the image to use the artifacts from e.g. core-image-sato") | ||
86 | parser.add_option("-r", "--rootfs-dir", dest = "rootfs_dir", | ||
87 | action = "callback", callback = callback_rootfs_dir, type = "string", | ||
88 | help = "path to the /rootfs dir to use as the .wks rootfs source") | ||
89 | parser.add_option("-b", "--bootimg-dir", dest = "bootimg_dir", | ||
90 | action = "store", help = "path to the dir containing the boot artifacts (e.g. /EFI or /syslinux dirs) to use as the .wks bootimg source") | ||
91 | parser.add_option("-k", "--kernel-dir", dest = "kernel_dir", | ||
92 | action = "store", help = "path to the dir containing the kernel to use in the .wks bootimg") | ||
93 | parser.add_option("-n", "--native-sysroot", dest = "native_sysroot", | ||
94 | action = "store", help = "path to the native sysroot containing the tools to use to build the image") | ||
95 | parser.add_option("-p", "--skip-build-check", dest = "build_check", | ||
96 | action = "store_false", default = True, help = "skip the build check") | ||
97 | parser.add_option("-D", "--debug", dest = "debug", action = "store_true", | ||
98 | default = False, help = "output debug information") | ||
99 | |||
100 | (options, args) = parser.parse_args(args) | ||
101 | |||
102 | if options.debug: | ||
103 | loglevel = logging.DEBUG | ||
104 | start_logging(loglevel) | ||
105 | |||
106 | if len(args) != 1: | ||
107 | logging.error("Wrong number of arguments, exiting\n") | ||
108 | parser.print_help() | ||
109 | sys.exit(1) | ||
110 | |||
111 | if not options.image_name and not (options.rootfs_dir and | ||
112 | options.bootimg_dir and | ||
113 | options.kernel_dir and | ||
114 | options.native_sysroot or | ||
115 | options.native_sysroot): | ||
116 | print "Build artifacts not completely specified, exiting." | ||
117 | print " (Use 'wic -e' or 'wic -r -b -k -n' or 'wic -r -n' to specify artifacts)" | ||
118 | print options | ||
119 | sys.exit(1) | ||
120 | |||
121 | if not options.image_name: | ||
122 | options.build_check = False | ||
123 | |||
124 | if options.build_check and not options.properties_file: | ||
125 | print "Checking basic build environment..." | ||
126 | if not verify_build_env(): | ||
127 | print "Couldn't verify build environment, exiting\n" | ||
128 | sys.exit(1) | ||
129 | else: | ||
130 | print "Done.\n" | ||
131 | |||
132 | print "Creating image(s)...\n" | ||
133 | |||
134 | # If '-e' option is used the values are extracted from bitbake env. | ||
135 | if options.image_name: | ||
136 | bitbake_env_lines = find_bitbake_env_lines(options.image_name) | ||
137 | if not bitbake_env_lines: | ||
138 | print "Couldn't get bitbake environment, exiting." | ||
139 | sys.exit(1) | ||
140 | set_bitbake_env_lines(bitbake_env_lines) | ||
141 | |||
142 | bootimg_dir = "" | ||
143 | rootfs_dir = native_sysroot = kernel_dir = image_output_dir = "" | ||
144 | |||
145 | if options.image_name: | ||
146 | (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot) \ | ||
147 | = find_artifacts(options.image_name) | ||
148 | |||
149 | wks_file = args[0] | ||
150 | |||
151 | if not wks_file.endswith(".wks"): | ||
152 | # Return full path of the .wks file | ||
153 | wks_file = find_canned_image(scripts_path, wks_file) | ||
154 | if not wks_file: | ||
155 | print "No image named %s found, exiting.\n" % wks_file | ||
156 | print "(Use 'wic list images' to list available images, or specify a fully-qualified OE kickstart (.wks) filename)\n" | ||
157 | sys.exit(1) | ||
158 | |||
159 | if options.outdir: | ||
160 | image_output_dir = options.outdir | ||
161 | |||
162 | if options.native_sysroot: | ||
163 | native_sysroot = options.native_sysroot | ||
164 | print "Using native_sysroot from user command: %s" % native_sysroot | ||
165 | |||
166 | if not os.path.isdir(native_sysroot): | ||
167 | print "--native-sysroot (-n) not found, exiting" | ||
168 | sys.exit(1) | ||
169 | |||
170 | native_sysroot = os.path.abspath(native_sysroot) | ||
171 | |||
172 | if not options.image_name: | ||
173 | if (options.bootimg_dir and options.kernel_dir and | ||
174 | options.rootfs_dir and options.native_sysroot): | ||
175 | rootfs_dir = '' | ||
176 | if 'ROOTFS_DIR' in options.rootfs_dir: | ||
177 | rootfs_dir = options.rootfs_dir['ROOTFS_DIR'] | ||
178 | bootimg_dir = options.bootimg_dir | ||
179 | kernel_dir = options.kernel_dir | ||
180 | native_sysroot = options.native_sysroot | ||
181 | |||
182 | if rootfs_dir and not os.path.isdir(rootfs_dir): | ||
183 | print "--roofs-dir (-r) not found, exiting\n" | ||
184 | sys.exit(1) | ||
185 | if not os.path.isdir(bootimg_dir): | ||
186 | print "--bootimg-dir (-b) not found, exiting\n" | ||
187 | sys.exit(1) | ||
188 | if not os.path.isdir(kernel_dir): | ||
189 | print "--kernel-dir (-k) not found, exiting\n" | ||
190 | sys.exit(1) | ||
191 | if not os.path.isdir(native_sysroot): | ||
192 | print "--native-sysroot (-n) not found, exiting\n" | ||
193 | sys.exit(1) | ||
194 | else: | ||
195 | print 'Build image from rootfs and a package list using native rootfs\n' | ||
196 | if options.rootfs_dir and 'ROOTFS_DIR' in options.rootfs_dir: | ||
197 | rootfs_dir = options.rootfs_dir['ROOTFS_DIR'] | ||
198 | elif options.rootfs_dir: | ||
199 | rootfs_dir = options.rootfs_dir | ||
200 | else: | ||
201 | rootfs_dir = "" | ||
202 | |||
203 | native_sysroot = options.native_sysroot | ||
204 | |||
205 | if rootfs_dir and not os.path.isdir(rootfs_dir): | ||
206 | print "--roofs-dir (-r) not found, exiting\n" | ||
207 | sys.exit(1) | ||
208 | if not os.path.isdir(native_sysroot): | ||
209 | print "--native-sysroot (-n) not found, exiting\n" | ||
210 | sys.exit(1) | ||
211 | else: | ||
212 | not_found = not_found_dir = "" | ||
213 | if not os.path.isdir(rootfs_dir): | ||
214 | (not_found, not_found_dir) = ("rootfs-dir", rootfs_dir) | ||
215 | elif not os.path.isdir(kernel_dir): | ||
216 | (not_found, not_found_dir) = ("kernel-dir", kernel_dir) | ||
217 | elif not os.path.isdir(native_sysroot): | ||
218 | (not_found, not_found_dir) = ("native-sysroot", native_sysroot) | ||
219 | if not_found: | ||
220 | if not not_found_dir: | ||
221 | not_found_dir = "Completely missing artifact - wrong image (.wks) used?" | ||
222 | print "Build artifacts not found, exiting." | ||
223 | print " (Please check that the build artifacts for the machine" | ||
224 | print " selected in local.conf actually exist and that they" | ||
225 | print " are the correct artifacts for the image (.wks file)).\n" | ||
226 | print "The artifact that couldn't be found was %s:\n %s" % \ | ||
227 | (not_found, not_found_dir) | ||
228 | sys.exit(1) | ||
229 | |||
230 | krootfs_dir = options.rootfs_dir | ||
231 | if krootfs_dir is None: | ||
232 | krootfs_dir = {} | ||
233 | krootfs_dir['ROOTFS_DIR'] = rootfs_dir | ||
234 | |||
235 | rootfs_dir = rootfs_dir_to_args(krootfs_dir) | ||
236 | |||
237 | wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | ||
238 | native_sysroot, scripts_path, image_output_dir, | ||
239 | options.debug, options.properties_file) | ||
240 | |||
241 | |||
242 | def wic_list_subcommand(args, usage_str): | ||
243 | """ | ||
244 | Command-line handling for listing available image properties and | ||
245 | values. The real work is done by image.engine.wic_list() | ||
246 | """ | ||
247 | parser = optparse.OptionParser(usage = usage_str) | ||
248 | |||
249 | parser.add_option("-o", "--outfile", action = "store", | ||
250 | dest = "properties_file", | ||
251 | help = "dump the possible values for image properties to a JSON file") | ||
252 | |||
253 | (options, args) = parser.parse_args(args) | ||
254 | |||
255 | bitbake_env_lines = find_bitbake_env_lines(None) | ||
256 | if not bitbake_env_lines: | ||
257 | print "Couldn't get bitbake environment, exiting." | ||
258 | sys.exit(1) | ||
259 | set_bitbake_env_lines(bitbake_env_lines) | ||
260 | |||
261 | if not wic_list(args, scripts_path, options.properties_file): | ||
262 | logging.error("Bad list arguments, exiting\n") | ||
263 | parser.print_help() | ||
264 | sys.exit(1) | ||
265 | |||
266 | |||
267 | def wic_help_topic_subcommand(args, usage_str): | ||
268 | """ | ||
269 | Command-line handling for help-only 'subcommands'. This is | ||
270 | essentially a dummy command that doesn nothing but allow users to | ||
271 | use the existing subcommand infrastructure to display help on a | ||
272 | particular topic not attached to any particular subcommand. | ||
273 | """ | ||
274 | pass | ||
275 | |||
276 | |||
277 | wic_help_topic_usage = """ | ||
278 | """ | ||
279 | |||
280 | subcommands = { | ||
281 | "create": [wic_create_subcommand, | ||
282 | wic_create_usage, | ||
283 | wic_create_help], | ||
284 | "list": [wic_list_subcommand, | ||
285 | wic_list_usage, | ||
286 | wic_list_help], | ||
287 | "plugins": [wic_help_topic_subcommand, | ||
288 | wic_help_topic_usage, | ||
289 | wic_plugins_help], | ||
290 | "overview": [wic_help_topic_subcommand, | ||
291 | wic_help_topic_usage, | ||
292 | wic_overview_help], | ||
293 | "kickstart": [wic_help_topic_subcommand, | ||
294 | wic_help_topic_usage, | ||
295 | wic_kickstart_help], | ||
296 | } | ||
297 | |||
298 | |||
299 | def start_logging(loglevel): | ||
300 | logging.basicConfig(filname = 'wic.log', filemode = 'w', level=loglevel) | ||
301 | |||
302 | |||
303 | def main(): | ||
304 | parser = optparse.OptionParser(version = "wic version %s" % __version__, | ||
305 | usage = wic_usage) | ||
306 | |||
307 | parser.disable_interspersed_args() | ||
308 | |||
309 | (options, args) = parser.parse_args() | ||
310 | |||
311 | if len(args): | ||
312 | if args[0] == "help": | ||
313 | if len(args) == 1: | ||
314 | parser.print_help() | ||
315 | sys.exit(1) | ||
316 | |||
317 | invoke_subcommand(args, parser, wic_help_usage, subcommands) | ||
318 | |||
319 | |||
320 | if __name__ == "__main__": | ||
321 | try: | ||
322 | ret = main() | ||
323 | except Exception: | ||
324 | ret = 1 | ||
325 | import traceback | ||
326 | traceback.print_exc(5) | ||
327 | sys.exit(ret) | ||
328 | |||
diff --git a/scripts/wipe-sysroot b/scripts/wipe-sysroot new file mode 100755 index 0000000000..c22d39a405 --- /dev/null +++ b/scripts/wipe-sysroot | |||
@@ -0,0 +1,54 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | # Wipe out all of the sysroots and all of the stamps that populated it. | ||
4 | # Author: Ross Burton <ross.burton@intel.com> | ||
5 | # | ||
6 | # Copyright (c) 2012 Intel Corporation | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
15 | # See the GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, write to the Free Software | ||
19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | |||
21 | set -e | ||
22 | |||
23 | if [ $# -gt 0 ]; then | ||
24 | echo "Wipe all sysroots and sysroot-related stamps for the current build directory." >&2 | ||
25 | echo "Usage: $0" >&2 | ||
26 | exit 1 | ||
27 | fi | ||
28 | |||
29 | ENVS=`mktemp --suffix -wipe-sysroot-envs` | ||
30 | bitbake -p -e > $ENVS | ||
31 | |||
32 | eval `grep -F SSTATE_MANIFESTS= $ENVS` | ||
33 | eval `grep -F STAGING_DIR= $ENVS` | ||
34 | eval `grep -F STAMPS_DIR= $ENVS` | ||
35 | rm -f $ENVS | ||
36 | |||
37 | if [ -z "$SSTATE_MANIFESTS" -o -z "$STAGING_DIR" -o -z "$STAMPS_DIR" ]; then | ||
38 | echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR from bitbake, check above for errors" | ||
39 | exit 1 | ||
40 | fi | ||
41 | |||
42 | echo "Deleting the sysroots in $STAGING_DIR, and selected stamps in $SSTATE_MANIFESTS and $STAMPS_DIR." | ||
43 | |||
44 | # The sysroots themselves | ||
45 | rm -rf $STAGING_DIR | ||
46 | |||
47 | # The stamps that said the sysroot was populated | ||
48 | rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot.* | ||
49 | rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot_setscene.* | ||
50 | rm -rf $STAMPS_DIR/*/*/*.do_packagedata.* | ||
51 | rm -rf $STAMPS_DIR/*/*/*.do_packagedata_setscene.* | ||
52 | |||
53 | # The sstate manifests | ||
54 | rm -rf $SSTATE_MANIFESTS/manifest-*.populate-sysroot | ||
diff --git a/scripts/yocto-bsp b/scripts/yocto-bsp new file mode 100755 index 0000000000..d269861769 --- /dev/null +++ b/scripts/yocto-bsp | |||
@@ -0,0 +1,156 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright (c) 2012, Intel Corporation. | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | # | ||
21 | # DESCRIPTION | ||
22 | # 'yocto-bsp' is the Yocto BSP Tool that helps users create a new | ||
23 | # Yocto BSP. Invoking it without any arguments will display help | ||
24 | # screens for the 'yocto-bsp' command and list the available | ||
25 | # 'yocto-bsp' subcommands. Invoking a subcommand without any | ||
26 | # arguments will likewise display help screens for the specified | ||
27 | # subcommand. Please use that interface for detailed help. | ||
28 | # | ||
29 | # AUTHORS | ||
30 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
31 | # | ||
32 | |||
33 | __version__ = "0.1.0" | ||
34 | |||
35 | import os | ||
36 | import sys | ||
37 | import optparse | ||
38 | import logging | ||
39 | |||
40 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
41 | lib_path = scripts_path + '/lib' | ||
42 | sys.path = sys.path + [lib_path] | ||
43 | |||
44 | from bsp.help import * | ||
45 | from bsp.engine import * | ||
46 | |||
47 | |||
48 | def yocto_bsp_create_subcommand(args, usage_str): | ||
49 | """ | ||
50 | Command-line handling for BSP creation. The real work is done by | ||
51 | bsp.engine.yocto_bsp_create() | ||
52 | """ | ||
53 | parser = optparse.OptionParser(usage = usage_str) | ||
54 | |||
55 | parser.add_option("-o", "--outdir", dest = "outdir", action = "store", | ||
56 | help = "name of BSP dir to create") | ||
57 | parser.add_option("-i", "--infile", dest = "properties_file", action = "store", | ||
58 | help = "name of file containing the values for BSP properties as a JSON file") | ||
59 | parser.add_option("-c", "--codedump", dest = "codedump", action = "store_true", | ||
60 | default = False, help = "dump the generated code to bspgen.out") | ||
61 | parser.add_option("-s", "--skip-git-check", dest = "git_check", action = "store_false", | ||
62 | default = True, help = "skip the git connectivity check") | ||
63 | (options, args) = parser.parse_args(args) | ||
64 | |||
65 | if len(args) != 2: | ||
66 | logging.error("Wrong number of arguments, exiting\n") | ||
67 | parser.print_help() | ||
68 | sys.exit(1) | ||
69 | |||
70 | machine = args[0] | ||
71 | karch = args[1] | ||
72 | |||
73 | if options.outdir: | ||
74 | bsp_output_dir = options.outdir | ||
75 | else: | ||
76 | bsp_output_dir = "meta-" + machine | ||
77 | |||
78 | if options.git_check and not options.properties_file: | ||
79 | print "Checking basic git connectivity..." | ||
80 | if not verify_git_repo(GIT_CHECK_URI): | ||
81 | print "Couldn't verify git connectivity, exiting\n" | ||
82 | print "Details: couldn't access %s" % GIT_CHECK_URI | ||
83 | print " (this most likely indicates a network connectivity problem or" | ||
84 | print " a misconfigured git intallation)" | ||
85 | sys.exit(1) | ||
86 | else: | ||
87 | print "Done.\n" | ||
88 | |||
89 | yocto_bsp_create(machine, karch, scripts_path, bsp_output_dir, options.codedump, options.properties_file) | ||
90 | |||
91 | |||
92 | def yocto_bsp_list_subcommand(args, usage_str): | ||
93 | """ | ||
94 | Command-line handling for listing available BSP properties and | ||
95 | values. The real work is done by bsp.engine.yocto_bsp_list() | ||
96 | """ | ||
97 | parser = optparse.OptionParser(usage = usage_str) | ||
98 | |||
99 | parser.add_option("-o", "--outfile", action = "store", dest = "properties_file", | ||
100 | help = "dump the possible values for BSP properties to a JSON file") | ||
101 | |||
102 | (options, args) = parser.parse_args(args) | ||
103 | |||
104 | if not yocto_bsp_list(args, scripts_path, options.properties_file): | ||
105 | logging.error("Bad list arguments, exiting\n") | ||
106 | parser.print_help() | ||
107 | sys.exit(1) | ||
108 | |||
109 | |||
110 | subcommands = { | ||
111 | "create": [yocto_bsp_create_subcommand, | ||
112 | yocto_bsp_create_usage, | ||
113 | yocto_bsp_create_help], | ||
114 | "list": [yocto_bsp_list_subcommand, | ||
115 | yocto_bsp_list_usage, | ||
116 | yocto_bsp_list_help], | ||
117 | } | ||
118 | |||
119 | |||
120 | def start_logging(loglevel): | ||
121 | logging.basicConfig(filname = 'yocto-bsp.log', filemode = 'w', level=loglevel) | ||
122 | |||
123 | |||
124 | def main(): | ||
125 | parser = optparse.OptionParser(version = "yocto-bsp version %s" % __version__, | ||
126 | usage = yocto_bsp_usage) | ||
127 | |||
128 | parser.disable_interspersed_args() | ||
129 | parser.add_option("-D", "--debug", dest = "debug", action = "store_true", | ||
130 | default = False, help = "output debug information") | ||
131 | |||
132 | (options, args) = parser.parse_args() | ||
133 | |||
134 | loglevel = logging.INFO | ||
135 | if options.debug: | ||
136 | loglevel = logging.DEBUG | ||
137 | start_logging(loglevel) | ||
138 | |||
139 | if len(args): | ||
140 | if args[0] == "help": | ||
141 | if len(args) == 1: | ||
142 | parser.print_help() | ||
143 | sys.exit(1) | ||
144 | |||
145 | invoke_subcommand(args, parser, yocto_bsp_help_usage, subcommands) | ||
146 | |||
147 | |||
148 | if __name__ == "__main__": | ||
149 | try: | ||
150 | ret = main() | ||
151 | except Exception: | ||
152 | ret = 1 | ||
153 | import traceback | ||
154 | traceback.print_exc(5) | ||
155 | sys.exit(ret) | ||
156 | |||
diff --git a/scripts/yocto-kernel b/scripts/yocto-kernel new file mode 100755 index 0000000000..c9b2821e00 --- /dev/null +++ b/scripts/yocto-kernel | |||
@@ -0,0 +1,399 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright (c) 2012, Intel Corporation. | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | # | ||
21 | # DESCRIPTION | ||
22 | # 'yocto-kernel' is the Yocto BSP Tool that helps users manage kernel | ||
23 | # config options and patches for a Yocto BSP. Invoking it without any | ||
24 | # arguments will display help screens for the 'yocto-kernel' command | ||
25 | # and list the available 'yocto-kernel' subcommands. Invoking a | ||
26 | # subcommand without any arguments will likewise display help screens | ||
27 | # for the specified subcommand. Please use that interface for | ||
28 | # detailed help. | ||
29 | # | ||
30 | # AUTHORS | ||
31 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
32 | # | ||
33 | |||
34 | __version__ = "0.1.0" | ||
35 | |||
36 | import os | ||
37 | import sys | ||
38 | import optparse | ||
39 | import logging | ||
40 | |||
41 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
42 | lib_path = scripts_path + '/lib' | ||
43 | sys.path = sys.path + [lib_path] | ||
44 | |||
45 | from bsp.help import * | ||
46 | from bsp.kernel import * | ||
47 | |||
48 | |||
49 | def yocto_kernel_config_list_subcommand(args, usage_str): | ||
50 | """ | ||
51 | Command-line handling for listing BSP config options. The | ||
52 | real work is done by bsp.kernel.yocto_kernel_config_list(). | ||
53 | """ | ||
54 | logging.debug("yocto_kernel_config_list_subcommand") | ||
55 | |||
56 | parser = optparse.OptionParser(usage = usage_str) | ||
57 | |||
58 | (options, args) = parser.parse_args(args) | ||
59 | |||
60 | if len(args) != 1: | ||
61 | logging.error("Wrong number of arguments, exiting\n") | ||
62 | parser.print_help() | ||
63 | sys.exit(1) | ||
64 | |||
65 | yocto_kernel_config_list(scripts_path, args[0]) | ||
66 | |||
67 | |||
68 | def yocto_kernel_config_add_subcommand(args, usage_str): | ||
69 | """ | ||
70 | Command-line handling for adding BSP config items. The real work | ||
71 | is done by bsp.kernel.yocto_kernel_config_add(). | ||
72 | """ | ||
73 | logging.debug("yocto_kernel_config_add_subcommand") | ||
74 | |||
75 | parser = optparse.OptionParser(usage = usage_str) | ||
76 | |||
77 | (options, args) = parser.parse_args(args) | ||
78 | |||
79 | if len(args) < 2: | ||
80 | logging.error("Wrong number of arguments, exiting\n") | ||
81 | parser.print_help() | ||
82 | sys.exit(1) | ||
83 | |||
84 | machine = args.pop(0) | ||
85 | yocto_kernel_config_add(scripts_path, machine, args) | ||
86 | |||
87 | |||
88 | def yocto_kernel_config_rm_subcommand(args, usage_str): | ||
89 | """ | ||
90 | Command-line handling for removing BSP config items. The real | ||
91 | work is done by bsp.kernel.yocto_kernel_config_rm(). | ||
92 | """ | ||
93 | logging.debug("yocto_kernel_config_rm_subcommand") | ||
94 | |||
95 | parser = optparse.OptionParser(usage = usage_str) | ||
96 | |||
97 | (options, args) = parser.parse_args(args) | ||
98 | |||
99 | if len(args) != 1: | ||
100 | logging.error("Wrong number of arguments, exiting\n") | ||
101 | parser.print_help() | ||
102 | sys.exit(1) | ||
103 | |||
104 | yocto_kernel_config_rm(scripts_path, args[0]) | ||
105 | |||
106 | |||
107 | def yocto_kernel_patch_list_subcommand(args, usage_str): | ||
108 | """ | ||
109 | Command-line handling for listing BSP (SRC_URI patches. The real | ||
110 | work is done by bsp.kernel.yocto_kernel_patch_list(). | ||
111 | """ | ||
112 | logging.debug("yocto_kernel_patch_list_subcommand") | ||
113 | |||
114 | parser = optparse.OptionParser(usage = usage_str) | ||
115 | |||
116 | (options, args) = parser.parse_args(args) | ||
117 | |||
118 | if len(args) != 1: | ||
119 | logging.error("Wrong number of arguments, exiting\n") | ||
120 | parser.print_help() | ||
121 | sys.exit(1) | ||
122 | |||
123 | yocto_kernel_patch_list(scripts_path, args[0]) | ||
124 | |||
125 | |||
126 | def yocto_kernel_patch_add_subcommand(args, usage_str): | ||
127 | """ | ||
128 | Command-line handling for adding BSP patches. The real work is | ||
129 | done by bsp.kernel.yocto_kernel_patch_add(). | ||
130 | """ | ||
131 | logging.debug("yocto_kernel_patch_add_subcommand") | ||
132 | |||
133 | parser = optparse.OptionParser(usage = usage_str) | ||
134 | |||
135 | (options, args) = parser.parse_args(args) | ||
136 | |||
137 | if len(args) < 2: | ||
138 | logging.error("Wrong number of arguments, exiting\n") | ||
139 | parser.print_help() | ||
140 | sys.exit(1) | ||
141 | |||
142 | machine = args.pop(0) | ||
143 | yocto_kernel_patch_add(scripts_path, machine, args) | ||
144 | |||
145 | |||
146 | def yocto_kernel_patch_rm_subcommand(args, usage_str): | ||
147 | """ | ||
148 | Command-line handling for removing BSP patches. The real work is | ||
149 | done by bsp.kernel.yocto_kernel_patch_rm(). | ||
150 | """ | ||
151 | logging.debug("yocto_kernel_patch_rm_subcommand") | ||
152 | |||
153 | parser = optparse.OptionParser(usage = usage_str) | ||
154 | |||
155 | (options, args) = parser.parse_args(args) | ||
156 | |||
157 | if len(args) != 1: | ||
158 | logging.error("Wrong number of arguments, exiting\n") | ||
159 | parser.print_help() | ||
160 | sys.exit(1) | ||
161 | |||
162 | yocto_kernel_patch_rm(scripts_path, args[0]) | ||
163 | |||
164 | |||
165 | def yocto_kernel_feature_list_subcommand(args, usage_str): | ||
166 | """ | ||
167 | Command-line handling for listing the BSP features that are being | ||
168 | used by the BSP. The real work is done by | ||
169 | bsp.kernel.yocto_kernel_feature_list(). | ||
170 | """ | ||
171 | logging.debug("yocto_kernel_feature_list_subcommand") | ||
172 | |||
173 | parser = optparse.OptionParser(usage = usage_str) | ||
174 | |||
175 | (options, args) = parser.parse_args(args) | ||
176 | |||
177 | if len(args) != 1: | ||
178 | logging.error("Wrong number of arguments, exiting\n") | ||
179 | parser.print_help() | ||
180 | sys.exit(1) | ||
181 | |||
182 | yocto_kernel_feature_list(scripts_path, args[0]) | ||
183 | |||
184 | |||
185 | def yocto_kernel_feature_add_subcommand(args, usage_str): | ||
186 | """ | ||
187 | Command-line handling for adding the use of kernel features to a | ||
188 | BSP. The real work is done by bsp.kernel.yocto_kernel_feature_add(). | ||
189 | """ | ||
190 | logging.debug("yocto_kernel_feature_add_subcommand") | ||
191 | |||
192 | parser = optparse.OptionParser(usage = usage_str) | ||
193 | |||
194 | (options, args) = parser.parse_args(args) | ||
195 | |||
196 | if len(args) < 2: | ||
197 | logging.error("Wrong number of arguments, exiting\n") | ||
198 | parser.print_help() | ||
199 | sys.exit(1) | ||
200 | |||
201 | machine = args.pop(0) | ||
202 | yocto_kernel_feature_add(scripts_path, machine, args) | ||
203 | |||
204 | |||
205 | def yocto_kernel_feature_rm_subcommand(args, usage_str): | ||
206 | """ | ||
207 | Command-line handling for removing the use of kernel features from | ||
208 | a BSP. The real work is done by bsp.kernel.yocto_kernel_feature_rm(). | ||
209 | """ | ||
210 | logging.debug("yocto_kernel_feature_rm_subcommand") | ||
211 | |||
212 | parser = optparse.OptionParser(usage = usage_str) | ||
213 | |||
214 | (options, args) = parser.parse_args(args) | ||
215 | |||
216 | if len(args) != 1: | ||
217 | logging.error("Wrong number of arguments, exiting\n") | ||
218 | parser.print_help() | ||
219 | sys.exit(1) | ||
220 | |||
221 | yocto_kernel_feature_rm(scripts_path, args[0]) | ||
222 | |||
223 | |||
224 | def yocto_kernel_available_features_list_subcommand(args, usage_str): | ||
225 | """ | ||
226 | Command-line handling for listing all the kernel features | ||
227 | available for use in a BSP. This includes the features present in | ||
228 | the meta branch(es) of the pointed-to repo(s) as well as the local | ||
229 | features added in recipe-space to the current BSP as well. The | ||
230 | real work is done by bsp.kernel.yocto_kernel_available_features_list(). | ||
231 | """ | ||
232 | logging.debug("yocto_kernel_feature_available_features_list_subcommand") | ||
233 | |||
234 | parser = optparse.OptionParser(usage = usage_str) | ||
235 | |||
236 | (options, args) = parser.parse_args(args) | ||
237 | |||
238 | if len(args) != 1: | ||
239 | logging.error("Wrong number of arguments, exiting\n") | ||
240 | parser.print_help() | ||
241 | sys.exit(1) | ||
242 | |||
243 | yocto_kernel_available_features_list(scripts_path, args[0]) | ||
244 | |||
245 | |||
246 | def yocto_kernel_feature_describe_subcommand(args, usage_str): | ||
247 | """ | ||
248 | Command-line handling for listing the description of a specific | ||
249 | kernel feature available for use in a BSP. This includes the | ||
250 | features present in the meta branch(es) of the pointed-to repo(s) | ||
251 | as well as the local features added in recipe-space to the current | ||
252 | BSP as well. The real work is done by | ||
253 | bsp.kernel.yocto_kernel_feature_describe(). | ||
254 | """ | ||
255 | logging.debug("yocto_kernel_feature_describe_subcommand") | ||
256 | |||
257 | parser = optparse.OptionParser(usage = usage_str) | ||
258 | |||
259 | (options, args) = parser.parse_args(args) | ||
260 | |||
261 | if len(args) != 2: | ||
262 | logging.error("Wrong number of arguments, exiting\n") | ||
263 | parser.print_help() | ||
264 | sys.exit(1) | ||
265 | |||
266 | yocto_kernel_feature_describe(scripts_path, args[0], args[1]) | ||
267 | |||
268 | |||
269 | def yocto_kernel_feature_create_subcommand(args, usage_str): | ||
270 | """ | ||
271 | Command-line handling for creating a recipe-space kernel feature | ||
272 | in a BSP. The real work is done by | ||
273 | bsp.kernel.yocto_kernel_feature_create(). | ||
274 | """ | ||
275 | logging.debug("yocto_kernel_feature_create_subcommand") | ||
276 | |||
277 | parser = optparse.OptionParser(usage = usage_str) | ||
278 | |||
279 | (options, args) = parser.parse_args(args) | ||
280 | |||
281 | if len(args) < 4: | ||
282 | logging.error("Wrong number of arguments, exiting\n") | ||
283 | parser.print_help() | ||
284 | sys.exit(1) | ||
285 | |||
286 | machine = args.pop(0) | ||
287 | yocto_kernel_feature_create(scripts_path, machine, args) | ||
288 | |||
289 | |||
290 | def yocto_kernel_feature_destroy_subcommand(args, usage_str): | ||
291 | """ | ||
292 | Command-line handling for removing a recipe-space kernel feature | ||
293 | from a BSP. The real work is done by | ||
294 | bsp.kernel.yocto_kernel_feature_destroy(). | ||
295 | """ | ||
296 | logging.debug("yocto_kernel_feature_destroy_subcommand") | ||
297 | |||
298 | parser = optparse.OptionParser(usage = usage_str) | ||
299 | |||
300 | (options, args) = parser.parse_args(args) | ||
301 | |||
302 | if len(args) != 2: | ||
303 | logging.error("Wrong number of arguments, exiting\n") | ||
304 | parser.print_help() | ||
305 | sys.exit(1) | ||
306 | |||
307 | yocto_kernel_feature_destroy(scripts_path, args[0], args[1]) | ||
308 | |||
309 | |||
310 | subcommands = { | ||
311 | "config-list": [yocto_kernel_config_list_subcommand, | ||
312 | yocto_kernel_config_list_usage, | ||
313 | yocto_kernel_config_list_help], | ||
314 | "config-add": [yocto_kernel_config_add_subcommand, | ||
315 | yocto_kernel_config_add_usage, | ||
316 | yocto_kernel_config_add_help], | ||
317 | "config-rm": [yocto_kernel_config_rm_subcommand, | ||
318 | yocto_kernel_config_rm_usage, | ||
319 | yocto_kernel_config_rm_help], | ||
320 | "patch-list": [yocto_kernel_patch_list_subcommand, | ||
321 | yocto_kernel_patch_list_usage, | ||
322 | yocto_kernel_patch_list_help], | ||
323 | "patch-add": [yocto_kernel_patch_add_subcommand, | ||
324 | yocto_kernel_patch_add_usage, | ||
325 | yocto_kernel_patch_add_help], | ||
326 | "patch-rm": [yocto_kernel_patch_rm_subcommand, | ||
327 | yocto_kernel_patch_rm_usage, | ||
328 | yocto_kernel_patch_rm_help], | ||
329 | "feature-list": [yocto_kernel_feature_list_subcommand, | ||
330 | yocto_kernel_feature_list_usage, | ||
331 | yocto_kernel_feature_list_help], | ||
332 | "feature-add": [yocto_kernel_feature_add_subcommand, | ||
333 | yocto_kernel_feature_add_usage, | ||
334 | yocto_kernel_feature_add_help], | ||
335 | "feature-rm": [yocto_kernel_feature_rm_subcommand, | ||
336 | yocto_kernel_feature_rm_usage, | ||
337 | yocto_kernel_feature_rm_help], | ||
338 | "features-list": [yocto_kernel_available_features_list_subcommand, | ||
339 | yocto_kernel_available_features_list_usage, | ||
340 | yocto_kernel_available_features_list_help], | ||
341 | "feature-describe": [yocto_kernel_feature_describe_subcommand, | ||
342 | yocto_kernel_feature_describe_usage, | ||
343 | yocto_kernel_feature_describe_help], | ||
344 | "feature-create": [yocto_kernel_feature_create_subcommand, | ||
345 | yocto_kernel_feature_create_usage, | ||
346 | yocto_kernel_feature_create_help], | ||
347 | "feature-destroy": [yocto_kernel_feature_destroy_subcommand, | ||
348 | yocto_kernel_feature_destroy_usage, | ||
349 | yocto_kernel_feature_destroy_help], | ||
350 | } | ||
351 | |||
352 | |||
353 | def start_logging(loglevel): | ||
354 | logging.basicConfig(filname = 'yocto-kernel.log', filemode = 'w', level=loglevel) | ||
355 | |||
356 | |||
357 | def main(): | ||
358 | parser = optparse.OptionParser(version = "yocto-kernel version %s" % __version__, | ||
359 | usage = yocto_kernel_usage) | ||
360 | |||
361 | parser.disable_interspersed_args() | ||
362 | parser.add_option("-D", "--debug", dest = "debug", action = "store_true", | ||
363 | default = False, help = "output debug information") | ||
364 | |||
365 | (options, args) = parser.parse_args() | ||
366 | |||
367 | loglevel = logging.INFO | ||
368 | if options.debug: | ||
369 | loglevel = logging.DEBUG | ||
370 | start_logging(loglevel) | ||
371 | |||
372 | if len(args): | ||
373 | if args[0] == "help": | ||
374 | if len(args) == 1: | ||
375 | parser.print_help() | ||
376 | sys.exit(1) | ||
377 | sc = 1 | ||
378 | else: | ||
379 | sc = 0 | ||
380 | |||
381 | if args[sc] == "config" or args[sc] == "patch" or \ | ||
382 | args[sc] == "feature" or args[sc] == "features": | ||
383 | if len(args) < 2 + sc: | ||
384 | parser.print_help() | ||
385 | sys.exit(1) | ||
386 | args[sc] += "-" + args[sc + 1] | ||
387 | args.pop(sc + 1) | ||
388 | |||
389 | invoke_subcommand(args, parser, yocto_kernel_help_usage, subcommands) | ||
390 | |||
391 | |||
392 | if __name__ == "__main__": | ||
393 | try: | ||
394 | ret = main() | ||
395 | except Exception: | ||
396 | ret = 1 | ||
397 | import traceback | ||
398 | traceback.print_exc(5) | ||
399 | sys.exit(ret) | ||
diff --git a/scripts/yocto-layer b/scripts/yocto-layer new file mode 100755 index 0000000000..53d2aabd3f --- /dev/null +++ b/scripts/yocto-layer | |||
@@ -0,0 +1,147 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright (c) 2012, Intel Corporation. | ||
6 | # All rights reserved. | ||
7 | # | ||
8 | # This program is free software; you can redistribute it and/or modify | ||
9 | # it under the terms of the GNU General Public License version 2 as | ||
10 | # published by the Free Software Foundation. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License along | ||
18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | # | ||
21 | # DESCRIPTION | ||
22 | # 'yocto-layer' is the Yocto Tool that helps users create a new Yocto | ||
23 | # layer. Invoking it without any arguments will display help screens | ||
24 | # for the 'yocto-layer' command and list the available 'yocto-layer' | ||
25 | # subcommands. Invoking a subcommand without any arguments will | ||
26 | # likewise display help screens for the specified subcommand. Please | ||
27 | # use that interface for detailed help. | ||
28 | # | ||
29 | # AUTHORS | ||
30 | # Tom Zanussi <tom.zanussi (at] intel.com> | ||
31 | # | ||
32 | |||
33 | __version__ = "0.1.0" | ||
34 | |||
35 | import os | ||
36 | import sys | ||
37 | import optparse | ||
38 | import logging | ||
39 | |||
40 | scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) | ||
41 | lib_path = scripts_path + '/lib' | ||
42 | sys.path = sys.path + [lib_path] | ||
43 | |||
44 | from bsp.help import * | ||
45 | from bsp.engine import * | ||
46 | |||
47 | |||
48 | def yocto_layer_create_subcommand(args, usage_str): | ||
49 | """ | ||
50 | Command-line handling for layer creation. The real work is done by | ||
51 | bsp.engine.yocto_layer_create() | ||
52 | """ | ||
53 | parser = optparse.OptionParser(usage = usage_str) | ||
54 | |||
55 | parser.add_option("-o", "--outdir", dest = "outdir", action = "store", | ||
56 | help = "name of layer dir to create") | ||
57 | parser.add_option("-i", "--infile", dest = "properties_file", action = "store", | ||
58 | help = "name of file containing the values for layer input properties as a JSON file") | ||
59 | parser.add_option("-c", "--codedump", dest = "codedump", action = "store_true", | ||
60 | default = False, help = "dump the generated code to layergen.out") | ||
61 | (options, args) = parser.parse_args(args) | ||
62 | |||
63 | if len(args) < 1 or len(args) > 2: | ||
64 | logging.error("Wrong number of arguments, exiting\n") | ||
65 | parser.print_help() | ||
66 | sys.exit(1) | ||
67 | |||
68 | layer_name = args[0] | ||
69 | properties = "" | ||
70 | |||
71 | if len(args) == 2: | ||
72 | layer_priority = args[1] | ||
73 | properties = '{"layer_priority":"' + layer_priority + '"}' | ||
74 | |||
75 | if options.outdir: | ||
76 | layer_output_dir = options.outdir | ||
77 | else: | ||
78 | layer_output_dir = "meta-" + layer_name | ||
79 | |||
80 | yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file, properties) | ||
81 | |||
82 | |||
83 | def yocto_layer_list_subcommand(args, usage_str): | ||
84 | """ | ||
85 | Command-line handling for listing available layer properties and | ||
86 | values. The real work is done by bsp.engine.yocto_layer_list() | ||
87 | """ | ||
88 | parser = optparse.OptionParser(usage = usage_str) | ||
89 | |||
90 | parser.add_option("-o", "--outfile", action = "store", dest = "properties_file", | ||
91 | help = "dump the possible values for layer properties to a JSON file") | ||
92 | |||
93 | (options, args) = parser.parse_args(args) | ||
94 | |||
95 | if not yocto_layer_list(args, scripts_path, options.properties_file): | ||
96 | logging.error("Bad list arguments, exiting\n") | ||
97 | parser.print_help() | ||
98 | sys.exit(1) | ||
99 | |||
100 | |||
101 | subcommands = { | ||
102 | "create": [yocto_layer_create_subcommand, | ||
103 | yocto_layer_create_usage, | ||
104 | yocto_layer_create_help], | ||
105 | "list": [yocto_layer_list_subcommand, | ||
106 | yocto_layer_list_usage, | ||
107 | yocto_layer_list_help], | ||
108 | } | ||
109 | |||
110 | |||
111 | def start_logging(loglevel): | ||
112 | logging.basicConfig(filname = 'yocto-layer.log', filemode = 'w', level=loglevel) | ||
113 | |||
114 | |||
115 | def main(): | ||
116 | parser = optparse.OptionParser(version = "yocto-layer version %s" % __version__, | ||
117 | usage = yocto_layer_usage) | ||
118 | |||
119 | parser.disable_interspersed_args() | ||
120 | parser.add_option("-D", "--debug", dest = "debug", action = "store_true", | ||
121 | default = False, help = "output debug information") | ||
122 | |||
123 | (options, args) = parser.parse_args() | ||
124 | |||
125 | loglevel = logging.INFO | ||
126 | if options.debug: | ||
127 | loglevel = logging.DEBUG | ||
128 | start_logging(loglevel) | ||
129 | |||
130 | if len(args): | ||
131 | if args[0] == "help": | ||
132 | if len(args) == 1: | ||
133 | parser.print_help() | ||
134 | sys.exit(1) | ||
135 | |||
136 | invoke_subcommand(args, parser, yocto_layer_help_usage, subcommands) | ||
137 | |||
138 | |||
139 | if __name__ == "__main__": | ||
140 | try: | ||
141 | ret = main() | ||
142 | except Exception: | ||
143 | ret = 1 | ||
144 | import traceback | ||
145 | traceback.print_exc(5) | ||
146 | sys.exit(ret) | ||
147 | |||