Fix do_clean to obey ${WORKDIR}.
[vuplus_openembedded] / classes / base.oeclass
1 PATCHES_DIR="${S}"
2
3 def base_dep_prepend(d):
4         import oe;
5         #
6         # Ideally this will check a flag so we will operate properly in
7         # the case where host == build == target, for now we don't work in
8         # that case though.
9         #
10         deps = ""
11         if not oe.data.getVar('INHIBIT_DEFAULT_DEPS', d):
12                 deps += "patcher-native"
13                 if (oe.data.getVar('HOST_SYS', d, 1) !=
14                     oe.data.getVar('BUILD_SYS', d, 1)):
15                         deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
16         return deps
17
18 def base_read_file(filename):
19         try:
20                 f = file( filename, "r" )
21         except IOError, reason:
22                 return "<unknown>:%s" % reason
23         else:
24                 return f.read().strip()
25         return None
26
27 DEPENDS_prepend="${@base_dep_prepend(d)} "
28
29 def base_set_filespath(d):
30         import os, oe
31         filespath = []
32         for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
33                 overrides = oe.data.getVar("OVERRIDES", d, 1) or ""
34                 overrides = overrides + ":"
35                 for o in overrides.split(":"):
36                         filespath.append(os.path.join(p, o))
37         oe.data.setVar("FILESPATH", ":".join(filespath), d)
38
39 FILESPATH = "${@base_set_filespath(d)}"
40
41 die() {
42         oefatal "$*"
43 }
44
45 oenote() {
46         echo "NOTE:" "$*"
47 }
48
49 oewarn() {
50         echo "WARNING:" "$*"
51 }
52
53 oefatal() {
54         echo "FATAL:" "$*"
55         exit 1
56 }
57
58 oedebug() {
59         test $# -ge 2 || {
60                 echo "Usage: oedebug level \"message\""
61                 exit 1
62         }
63
64         test ${OEDEBUG:-0} -ge $1 && {
65                 shift
66                 echo "DEBUG:" $*
67         }
68 }
69
70 oe_runmake() {
71         if [ x"$MAKE" = x ]; then MAKE=make; fi
72         oenote ${MAKE} ${EXTRA_OEMAKE} "$@"
73         ${MAKE} ${EXTRA_OEMAKE} "$@" || die "oemake failed"
74 }
75
76 oe_soinstall() {
77         # Purpose: Install shared library file and
78         #          create the necessary links
79         # Example:
80         #
81         # oe_
82         #
83         #oenote installing shared library $1 to $2
84         #
85         libname=`basename $1`
86         install -m 755 $1 $2/$libname
87         sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
88         solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
89         ln -sf $libname $2/$sonamelink
90         ln -sf $libname $2/$solink
91 }
92
93 oe_libinstall() {
94         # Purpose: Install a library, in all its forms
95         # Example
96         #
97         # oe_libinstall libltdl ${STAGING_LIBDIR}/
98         # oe_libinstall -C src/libblah libblah ${D}/${libdir}/
99         dir=""
100         libtool=""
101         while [ "$#" -gt 0 ]; do
102                 case "$1" in
103                 -C)
104                         shift
105                         dir="$1"
106                         ;;
107                 -s)
108                         silent=1
109                         ;;
110                 -a)
111                         require_static=1
112                         ;;
113                 -so)
114                         require_shared=1
115                         ;;
116                 -*)
117                         oefatal "oe_libinstall: unknown option: $1"
118                         ;;
119                 *)
120                         break;
121                         ;;
122                 esac
123                 shift
124         done
125
126         libname="$1"
127         shift
128         destpath="$1"
129         if [ -z "$destpath" ]; then
130                 oefatal "oe_libinstall: no destination path specified"
131         fi
132
133         __runcmd () {
134                 if [ -z "$silent" ]; then
135                         echo >&2 "oe_libinstall: $*"
136                 fi
137                 $*
138         }
139
140         if [ -z "$dir" ]; then
141                 dir=`pwd`
142         fi
143         if [ -d "$dir/.libs" ]; then
144                 dir=$dir/.libs
145         fi
146         olddir=`pwd`
147         __runcmd cd $dir
148
149         lafile=$libname.la
150         if [ -f "$lafile" ]; then
151                 # libtool archive
152                 eval `cat $lafile|grep "^library_names="`
153                 libtool=1
154         else
155                 library_names="$libname.so* $libname.dll.a"
156         fi
157
158         __runcmd install -d $destpath/
159         dota=$libname.a
160         if [ -f "$dota" -o -n "$require_static" ]; then
161                 __runcmd install -m 0644 $dota $destpath/
162         fi
163         dotlai=$libname.lai
164         if [ -f "$dotlai" -o -n "$libtool" ]; then
165                 __runcmd install -m 0644 $dotlai $destpath/$libname.la
166         fi
167
168         for name in $library_names; do
169                 files=`eval echo $name`
170                 for f in $files; do
171                         if [ ! -e "$f" ]; then
172                                 if [ -n "$libtool" ]; then
173                                         oefatal "oe_libinstall: $dir/$f not found."
174                                 fi
175                         elif [ -L "$f" ]; then
176                                 __runcmd cp -P "$f" $destpath/
177                         elif [ ! -L "$f" ]; then
178                                 libfile="$f"
179                                 __runcmd install -m 0755 $libfile $destpath/
180                         fi
181                 done
182         done
183
184         if [ -z "$libfile" ]; then
185                 if  [ -n "$require_shared" ]; then
186                         oefatal "oe_libinstall: unable to locate shared library"
187                 fi
188         elif [ -z "$libtool" ]; then
189                 # special case hack for non-libtool .so.#.#.# links
190                 baselibfile=`basename "$libfile"`
191                 if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
192                         sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
193                         solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
194                         if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
195                                 __runcmd ln -sf $baselibfile $destpath/$sonamelink
196                         fi
197                         __runcmd ln -sf $baselibfile $destpath/$solink
198                 fi
199         fi
200
201         __runcmd cd "$olddir"
202 }
203
204 oe_machinstall() {
205         # Purpose: Install machine dependent files, if available
206         #          If not available, check if there is a default
207         #          If no default, just touch the destination
208         # Example:
209         #                $1  $2   $3         $4
210         # oe_machinstall -m 0644 fstab ${D}/etc/fstab
211         #
212         # TODO: Check argument number?
213         #
214         filename=`basename $3`
215         dirname=`dirname $3`
216
217         for o in `echo ${OVERRIDES} | tr ':' ' '`; do
218                 if [ -e $dirname/$o/$filename ]; then
219                         oenote $dirname/$o/$filename present, installing to $4
220                         install $1 $2 $dirname/$o/$filename $4
221                         return
222                 fi
223         done
224 #       oenote overrides specific file NOT present, trying default=$3...
225         if [ -e $3 ]; then
226                 oenote $3 present, installing to $4
227                 install $1 $2 $3 $4
228         else
229                 oenote $3 NOT present, touching empty $4
230                 touch $4
231         fi
232 }
233
234 addtask showdata
235 do_showdata[nostamp] = "1"
236 python do_showdata() {
237         import sys
238         # emit variables and shell functions
239         oe.data.emit_env(sys.__stdout__, d, True)
240         # emit the metadata which isnt valid shell
241         for e in d.keys():
242                 if oe.data.getVarFlag(e, 'python', d):
243                         sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, oe.data.getVar(e, d, 1)))
244                 elif oe.data.getVarFlag(e, 'func', d):
245                         sys.__stdout__.write("\n%s () {\n%s}\n" % (e, oe.data.getVar(e, d, 1)))
246                 else:
247                         sys.__stdout__.write("%s=%s\n" % (e, oe.data.getVar(e, d, 1)))
248 }
249
250 addtask listtasks
251 do_listtasks[nostamp] = "1"
252 python do_listtasks() {
253         import sys
254         # emit variables and shell functions
255         #oe.data.emit_env(sys.__stdout__, d)
256         # emit the metadata which isnt valid shell
257         for e in d.keys():
258                 if oe.data.getVarFlag(e, 'task', d):
259                         sys.__stdout__.write("%s\n" % e)
260 }
261
262 addtask clean
263 do_clean[dirs] = "${TOPDIR}"
264 do_clean[nostamp] = "1"
265 python base_do_clean() {
266         """clear the build and temp directories"""
267         dir = oe.data.expand("${WORKDIR}", d)
268         if dir == '//': raise oe.build.FuncFailed("wrong DATADIR")
269         oe.note("removing " + dir)
270         os.system('rm -rf ' + dir)
271
272         dir = "%s.*" % oe.data.expand(oe.data.getVar('STAMP', d), d)
273         oe.note("removing " + dir)
274         os.system('rm -f '+ dir)
275 }
276
277 addtask mrproper
278 do_mrproper[dirs] = "${TOPDIR}"
279 do_mrproper[nostamp] = "1"
280 python base_do_mrproper() {
281         """clear downloaded sources, build and temp directories"""
282         dir = oe.data.expand("${DL_DIR}", d)
283         if dir == '/': oe.build.FuncFailed("wrong DATADIR")
284         oe.debug(2, "removing " + dir)
285         os.system('rm -rf ' + dir)
286         oe.build.exec_task('do_clean', d)
287 }
288
289 addtask patch after do_unpack
290 do_patch[dirs] = "${WORKDIR}"
291 python base_do_patch() {
292         import re
293
294         src_uri = oe.data.getVar('SRC_URI', d)
295         if not src_uri:
296                 return
297         src_uri = oe.data.expand(src_uri, d)
298         for url in src_uri.split():
299 #               oe.note('url is %s' % url)
300                 (type, host, path, user, pswd, parm) = oe.decodeurl(url)
301                 if not "patch" in parm:
302                         continue
303                 from oe.fetch import init, localpath
304                 init([url])
305                 url = oe.encodeurl((type, host, path, user, pswd, []))
306                 local = '/' + localpath(url, d)
307                 # patch!
308                 dots = local.split(".")
309                 if dots[-1] in ['gz', 'bz2', 'Z']:
310                         efile = os.path.join(oe.data.getVar('WORKDIR', d),os.path.basename('.'.join(dots[0:-1])))
311                 else:
312                         efile = local
313                 efile = oe.data.expand(efile, d)
314                 patches_dir = oe.data.expand(oe.data.getVar('PATCHES_DIR', d), d)
315                 oe.mkdirhier(patches_dir)
316                 os.chdir(patches_dir)
317                 cmd = "PATH=\"%s\" patcher" % oe.data.getVar("PATH", d, 1)
318                 if "pnum" in parm:
319                         cmd += " -p %s" % parm["pnum"]
320                 cmd += " -n \"%s\" -i %s" % (os.path.basename(efile), efile)
321                 ret = os.system(cmd)
322                 if ret != 0:
323                         raise oe.build.FuncFailed("'patcher' execution failed")
324 }
325
326 addtask fetch
327 do_fetch[dirs] = "${DL_DIR}"
328 do_fetch[nostamp] = "1"
329 python base_do_fetch() {
330         import sys, copy
331
332         localdata = copy.deepcopy(d)
333         oe.data.update_data(localdata)
334
335         src_uri = oe.data.getVar('SRC_URI', localdata, 1)
336         if not src_uri:
337                 return 1
338
339         try:
340                 oe.fetch.init(src_uri.split())
341         except oe.fetch.NoMethodError:
342                 (type, value, traceback) = sys.exc_info()
343                 raise oe.build.FuncFailed("No method: %s" % value)
344
345         try:
346                 oe.fetch.go(localdata)
347         except oe.fetch.MissingParameterError:
348                 (type, value, traceback) = sys.exc_info()
349                 raise oe.build.FuncFailed("Missing parameters: %s" % value)
350         except oe.fetch.FetchError:
351                 (type, value, traceback) = sys.exc_info()
352                 raise oe.build.FuncFailed("Fetch failed: %s" % value)
353 }
354
355 addtask unpack after do_fetch
356 do_unpack[dirs] = "${WORKDIR}"
357 python base_do_unpack() {
358         import re, copy, os
359
360         localdata = copy.deepcopy(d)
361         oe.data.update_data(localdata)
362
363         src_uri = oe.data.getVar('SRC_URI', localdata)
364         if not src_uri:
365                 return
366         src_uri = oe.data.expand(src_uri, localdata)
367         for url in src_uri.split():
368                 try:
369                         local = oe.data.expand(oe.fetch.localpath(url, localdata), localdata)
370                 except oe.MalformedUrl, e:
371                         raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
372                 # dont need any parameters for extraction, strip them off
373                 local = re.sub(';.*$', '', local)
374                 local = os.path.realpath(local)
375                 dots = local.split(".")
376                 if dots[-1] in ['gz', 'bz2', 'Z']:
377                         efile = os.path.join(oe.data.getVar('WORKDIR', localdata, 1),os.path.basename('.'.join(dots[0:-1])))
378                 else:
379                         efile = local
380                 cmd = None
381                 if local.endswith('.tar'):
382                         cmd = 'tar x --no-same-owner -f %s' % local
383                 elif local.endswith('.tgz') or local.endswith('.tar.gz'):
384                         cmd = 'tar xz --no-same-owner -f %s' % local
385                 elif local.endswith('.tbz') or local.endswith('.tar.bz2'):
386                         cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % local
387                 elif local.endswith('.gz') or local.endswith('.Z') or local.endswith('.z'):
388                         loc = local.rfind('.')
389                         cmd = 'gzip -dc %s > %s' % (local, efile)
390                 elif local.endswith('.bz2'):
391                         loc = local.rfind('.')
392                         cmd = 'bzip2 -dc %s > %s' % (local, efile)
393                 elif local.endswith('.zip'):
394                         loc = local.rfind('.')
395                         cmd = 'unzip %s' % local
396                 elif os.path.isdir(local):
397                         filesdir = os.path.realpath(oe.data.getVar("FILESDIR", localdata, 1))
398                         destdir = "."
399                         if local[0:len(filesdir)] == filesdir:
400                                 destdir = local[len(filesdir):local.rfind('/')]
401                                 destdir = destdir.strip('/')
402                                 if len(destdir) < 1:
403                                         destdir = "."
404                                 elif not os.access("%s/%s" % (os.getcwd(), destdir), os.F_OK):
405                                         os.makedirs("%s/%s" % (os.getcwd(), destdir))
406                         cmd = 'cp -a %s %s/%s/' % (local, os.getcwd(), destdir)
407                 else:
408                         (type, host, path, user, pswd, parm) = oe.decodeurl(url)
409                         if not 'patch' in parm:
410                                 destdir = oe.decodeurl(url)[1] or "."
411                                 oe.mkdirhier("%s/%s" % (os.getcwd(), destdir))
412                                 cmd = 'cp %s %s/%s/' % (local, os.getcwd(), destdir)
413                 if not cmd:
414                         continue
415                 oe.note("Unpacking %s to %s/" % (local, os.getcwd()))
416                 ret = os.system(cmd)
417                 if ret != 0:
418                         raise oe.build.FuncFailed("%s execution failed" % cmd)
419 }
420
421 addhandler base_eventhandler
422 python base_eventhandler() {
423         from oe import note, error, data
424         from oe.event import Handled, NotHandled, getName
425         import os
426
427         name = getName(e)
428         if name in ["PkgSucceeded"]:
429                 note("package %s: build completed" % e.pkg)
430         if name in ["PkgStarted"]:
431                 note("package %s: build %s" % (e.pkg, name[3:].lower()))
432         elif name in ["PkgFailed"]:
433                 error("package %s: build %s" % (e.pkg, name[3:].lower()))
434         elif name in ["TaskStarted"]:
435                 note("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
436         elif name in ["TaskSucceeded"]:
437                 note("package %s: task %s completed" % (data.expand(data.getVar("PF", e.data), e.data), e.task))
438         elif name in ["TaskFailed"]:
439                 error("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
440         elif name in ["UnsatisfiedDep"]:
441                 note("package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()))
442         elif name in ["BuildStarted", "BuildCompleted"]:
443                 note("build %s %s" % (e.name, name[5:].lower()))
444         return NotHandled
445 }
446
447 addtask configure after do_unpack do_patch
448 do_configure[dirs] = "${S} ${B}"
449
450 base_do_configure() {
451         :
452 }
453
454 addtask compile after do_configure
455 do_compile[dirs] = "${S} ${B}"
456 base_do_compile() {
457         if [ -e Makefile -o -e makefile ]; then
458                 oe_runmake || die "make failed"
459         else
460                 oenote "nothing to compile"
461         fi
462 }
463
464
465 addtask stage after do_compile
466 base_do_stage () {
467         :
468 }
469
470 do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${TARGET_SYS}/lib \
471                              ${STAGING_DIR}/${TARGET_SYS}/include \
472                              ${STAGING_DIR}/${BUILD_SYS}/bin ${STAGING_DIR}/${BUILD_SYS}/lib \
473                              ${STAGING_DIR}/${BUILD_SYS}/include \
474                              ${STAGING_DATADIR} \
475                              ${S} ${B}"
476
477 addtask populate_staging after do_compile
478
479 #python do_populate_staging () {
480 #       if not oe.data.getVar('manifest', d):
481 #               oe.build.exec_func('do_emit_manifest', d)
482 #       if oe.data.getVar('do_stage', d):
483 #               oe.build.exec_func('do_stage', d)
484 #       else:
485 #               oe.build.exec_func('manifest_do_populate_staging', d)
486 #}
487
488 python do_populate_staging () {
489         if oe.data.getVar('manifest_do_populate_staging', d):
490                 oe.build.exec_func('manifest_do_populate_staging', d)
491         else:
492                 oe.build.exec_func('do_stage', d)
493 }
494
495 #addtask install
496 addtask install after do_compile
497 do_install[dirs] = "${S} ${B}"
498
499 base_do_install() {
500         :
501 }
502
503 #addtask populate_pkgs after do_compile
504 #python do_populate_pkgs () {
505 #       if not oe.data.getVar('manifest', d):
506 #               oe.build.exec_func('do_emit_manifest', d)
507 #       oe.build.exec_func('manifest_do_populate_pkgs', d)
508 #       oe.build.exec_func('package_do_shlibs', d)
509 #}
510
511 base_do_package() {
512         :
513 }
514
515 addtask build after do_populate_staging
516 do_build = ""
517 do_build[nostamp] = "1"
518 do_build[func] = "1"
519
520 # Functions that update metadata based on files outputted
521 # during the build process.
522
523 SHLIBS = ""
524 RDEPENDS_prepend = " ${SHLIBS}"
525
526 python read_manifest () {
527         import sys
528         mfn = oe.data.getVar("MANIFEST", d, 1)
529         if os.access(mfn, os.R_OK):
530                 # we have a manifest, so emit do_stage and do_populate_pkgs,
531                 # and stuff some additional bits of data into the metadata store
532                 mfile = file(mfn, "r")
533                 manifest = oe.manifest.parse(mfile, d)
534                 if not manifest:
535                         return
536
537                 oe.data.setVar('manifest', manifest, d)
538 }
539
540 python parse_manifest () {
541                 manifest = oe.data.getVar("manifest", d)
542                 if not manifest:
543                         return
544                 for func in ("do_populate_staging", "do_populate_pkgs"):
545                         value = oe.manifest.emit(func, manifest, d)
546                         if value:
547                                 oe.data.setVar("manifest_" + func, value, d)
548                                 oe.data.delVarFlag("manifest_" + func, "python", d)
549                                 oe.data.delVarFlag("manifest_" + func, "fakeroot", d)
550                                 oe.data.setVarFlag("manifest_" + func, "func", 1, d)
551                 packages = []
552                 for l in manifest:
553                         if "pkg" in l and l["pkg"] is not None:
554                                 packages.append(l["pkg"])
555                 oe.data.setVar("PACKAGES", " ".join(packages), d)
556 }
557
558 def explode_deps(s):
559         r = []
560         l = s.split()
561         flag = False
562         for i in l:
563                 if i[0] == '(':
564                         flag = True
565                         j = []
566                 if flag:
567                         j.append(i)
568                         if i.endswith(')'):
569                                 flag = False
570                                 r[-1] += ' ' + ' '.join(j)
571                 else:
572                         r.append(i)
573         return r
574
575 python read_shlibdeps () {
576         packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
577         for pkg in packages:
578                 shlibsfile = oe.data.expand("${WORKDIR}/install/" + pkg + ".shlibdeps", d)
579                 if os.access(shlibsfile, os.R_OK):
580                         fd = file(shlibsfile)
581                         lines = fd.readlines()
582                         fd.close()
583                         rdepends = explode_deps(oe.data.getVar('RDEPENDS_' + pkg, d, 1) or oe.data.getVar('RDEPENDS', d, 1) or "")
584                         for l in lines:
585                                 rdepends.append(l.rstrip())
586                         oe.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
587 }
588
589 python read_subpackage_metadata () {
590         import re
591
592         data_file = oe.data.expand("${WORKDIR}/install/${PN}.package", d)
593         if os.access(data_file, os.R_OK):
594                 f = file(data_file, 'r')
595                 lines = f.readlines()
596                 f.close()
597                 r = re.compile("([^:]+):\s*(.*)")
598                 for l in lines:
599                         m = r.match(l)
600                         if m:
601                                 oe.data.setVar(m.group(1), m.group(2), d)
602 }
603
604 python __anonymous () {
605         need_host = oe.data.getVar('COMPATIBLE_HOST', d, 1)
606         if need_host:
607                 import re
608                 this_host = oe.data.getVar('HOST_SYS', d, 1)
609                 if not re.match(need_host, this_host):
610                         raise oe.parse.SkipPackage("incompatible with host %s" % this_host)
611         
612         pn = oe.data.getVar('PN', d, 1)
613         cvsdate = oe.data.getVar('CVSDATE_%s' % pn, d, 1)
614         if cvsdate:
615                 oe.data.setVar('CVSDATE', cvsdate, d)
616
617         try:
618                 oe.build.exec_func('read_manifest', d)
619                 oe.build.exec_func('parse_manifest', d)
620                 oe.build.exec_func('read_shlibdeps', d)
621                 oe.build.exec_func('read_subpackage_metadata', d)
622         except Exception, e:
623                 oe.error("anonymous function: %s" % e)
624                 pass
625 }
626
627 addtask emit_manifest
628 python do_emit_manifest () {
629 #       FIXME: emit a manifest here
630 #       1) adjust PATH to hit the wrapper scripts
631         wrappers = oe.which(oe.data.getVar("OEPATH", d, 1), 'build/install', 0)
632         path = (oe.data.getVar('PATH', d, 1) or '').split(':')
633         path.insert(0, os.path.dirname(wrappers))
634         oe.data.setVar('PATH', ':'.join(path), d)
635 #       2) exec_func("do_install", d)
636         oe.build.exec_func('do_install', d)
637 #       3) read in data collected by the wrappers
638         oe.build.exec_func('read_manifest', d)
639 #       4) mangle the manifest we just generated, get paths back into
640 #          our variable form
641 #       5) write it back out
642 #       6) re-parse it to ensure the generated functions are proper
643         oe.build.exec_func('parse_manifest', d)
644 }
645
646 EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_patch do_populate_pkgs do_stage
647
648 MIRRORS[func] = "0"
649 MIRRORS () {
650 ${DEBIAN_MIRROR}/main   http://snapshot.debian.net/archive/pool
651 ${DEBIAN_MIRROR}        ftp://ftp.de.debian.org/debian/pool
652 ${DEBIAN_MIRROR}        ftp://ftp.au.debian.org/debian/pool
653 ${DEBIAN_MIRROR}        ftp://ftp.cl.debian.org/debian/pool
654 ${DEBIAN_MIRROR}        ftp://ftp.hr.debian.org/debian/pool
655 ${DEBIAN_MIRROR}        ftp://ftp.fi.debian.org/debian/pool
656 ${DEBIAN_MIRROR}        ftp://ftp.hk.debian.org/debian/pool
657 ${DEBIAN_MIRROR}        ftp://ftp.hu.debian.org/debian/pool
658 ${DEBIAN_MIRROR}        ftp://ftp.ie.debian.org/debian/pool
659 ${DEBIAN_MIRROR}        ftp://ftp.it.debian.org/debian/pool
660 ${DEBIAN_MIRROR}        ftp://ftp.jp.debian.org/debian/pool
661 ${DEBIAN_MIRROR}        ftp://ftp.no.debian.org/debian/pool
662 ${DEBIAN_MIRROR}        ftp://ftp.pl.debian.org/debian/pool
663 ${DEBIAN_MIRROR}        ftp://ftp.ro.debian.org/debian/pool
664 ${DEBIAN_MIRROR}        ftp://ftp.si.debian.org/debian/pool
665 ${DEBIAN_MIRROR}        ftp://ftp.es.debian.org/debian/pool
666 ${DEBIAN_MIRROR}        ftp://ftp.se.debian.org/debian/pool
667 ${DEBIAN_MIRROR}        ftp://ftp.tr.debian.org/debian/pool
668 ${GNU_MIRROR}   ftp://mirrors.kernel.org/gnu
669 ${GNU_MIRROR}   ftp://ftp.matrix.com.br/pub/gnu
670 ${GNU_MIRROR}   ftp://ftp.cs.ubc.ca/mirror2/gnu
671 ${GNU_MIRROR}   ftp://sunsite.ust.hk/pub/gnu
672 ${GNU_MIRROR}   ftp://ftp.ayamura.org/pub/gnu
673 ftp://ftp.kernel.org/pub        http://www.kernel.org/pub
674 ftp://ftp.kernel.org/pub        ftp://ftp.us.kernel.org/pub
675 ftp://ftp.kernel.org/pub        ftp://ftp.uk.kernel.org/pub
676 ftp://ftp.kernel.org/pub        ftp://ftp.hk.kernel.org/pub
677 ftp://ftp.kernel.org/pub        ftp://ftp.au.kernel.org/pub
678 ftp://ftp.kernel.org/pub        ftp://ftp.jp.kernel.org/pub
679 ftp://.*/.*/    http://treke.net/oe/source/
680 http://.*/.*/   http://treke.net/oe/source/
681 }
682